经过一个阶段5次迭代之后,本逆向分析工具功能基本成形。工具的基本功能介绍请参看前面的posts。
现在就和hopper的逆向函数伪代码的功能对比一下效果。在这里并非定胜劣,因为差异可以拿来对比参照,通过比较发现有参考的东西。
下面是hopper的输出的伪代码:
void _CABackingStoreUpdate_(int arg0, int arg1, int arg2, int arg3) { var_148 = r9; r12 = arg3; r13 = arg2; var_D8 = arg1; r14 = arg0; r15 = r14 + 0x10; pthread_mutex_lock(r15); rbx = *(r14 + 0x168); if (rbx == 0x0) goto loc_ca71; loc_ca40: if (rbx == pthread_self()) goto loc_d554; loc_ca4e: if (*(r14 + 0x168) != 0x0) { rbx = r14 + 0x50; do { pthread_cond_wait(rbx, r15); } while (*(r14 + 0x168) != 0x0); } goto loc_ca71; loc_ca71: rcx = *(int16_t *)(r14 + 0x174); if ((*(r14 + 0x80) != var_D8) || (*(r14 + 0x88) != r13)) goto loc_cb16; loc_ca9e: var_F8 = r13; rbx = rcx >> 0xa & 0x1; COND = rbx != 0x0; if (COND) goto loc_cb34; loc_cab3: rax = 0x0; rbx = 0x0; if ((rcx & 0x2) == 0x0) { rdi = *(r14 + 0x150); rax = 0x0; rbx = 0x0; if (rdi != 0x0) { CGSBoundingShapeGetRegion(); if ((r12 & 0x80) == 0x0) { rbx = var_F8; xmm2 = intrinsic_punpckldq(zero_extend_64(rbx), *(int128_t *)0x150860); xmm2 = intrinsic_subpd(xmm2, *(int128_t *)0x150870); xmm2 = intrinsic_haddpd(xmm2, xmm2); } else { var_70 = 0x3ff0000000000000; var_58 = 0xbff0000000000000; rbx = var_F8; xmm0 = intrinsic_punpckldq(zero_extend_64(rbx), *(int128_t *)0x150860); xmm0 = intrinsic_subpd(xmm0, *(int128_t *)0x150870); xmm0 = intrinsic_haddpd(xmm0, xmm0); var_F0 = intrinsic_movapd(var_F0, xmm0); intrinsic_movlpd(var_48, xmm0); intrinsic_movss(xmm0, *(int32_t *)0x1508a0); CGSTransformRegion(); CGSReleaseRegion(var_38); xmm2 = intrinsic_movapd(xmm2, var_F0); var_38 = var_40; } var_F8 = rbx; xmm0 = intrinsic_punpckldq(zero_extend_64(var_D8), *(int128_t *)0x150860); xmm0 = intrinsic_subpd(xmm0, *(int128_t *)0x150870); xmm0 = intrinsic_haddpd(xmm0, xmm0); xmm1 = intrinsic_pxor(xmm1, xmm1); var_90 = intrinsic_movdqa(var_90, xmm1); intrinsic_movlpd(var_80, xmm0); intrinsic_movsd(var_78, xmm2); rbx = CGSRectInRegion(); if (rbx == 0x0) { CGSIntersectRegionWithRect(var_38, var_90, 0x0); if (CGSRegionIsEmpty(0x0) != 0x0) { CGSReleaseRegion(0x0); } } CGSReleaseRegion(var_38); rax = 0x0; } } if ((rbx != 0x0) || (rax != 0x0)) goto loc_cb34; loc_d554: pthread_mutex_unlock(r15); return; loc_cb34: var_110 = rbx; var_138 = r15; var_104 = (r12 & 0x1) + (r12 & 0x1) + 0x1; r15 = r14 + 0x138; rcx = *(r14 + 0x138); var_130 = r14; rax = rcx + 0x10; rdi = *(rcx + 0x10); if (rdi == 0x0) goto loc_ccae; loc_cb78: var_F0 = r12; r14 = r12 & 0x4; r13 = rax; var_118 = rax; rbx = rcx; var_100 = rcx; r12 = r15; goto loc_cb9d; loc_cb9d: if (CA::Render::Shmem::set_volatile(rdi, 0x0) == 0x0) goto loc_ccd8; loc_cbae: rax = *r13; if (rax == 0x0) goto loc_ccf8; loc_cbbb: rax = *(rax + 0x18); if ((((*(int32_t *)(rax + 0x10) != var_104) || (*(int32_t *)(rax + 0x14) != var_D8)) || (*(int32_t *)(rax + 0x18) != var_F8)) || (((r14 != 0x0 ? 0x1 : 0x0) & 0xff) != ((*(int32_t *)(rax + 0x1c) > 0x1 ? 0x1 : 0x0) & 0xff))) goto loc_ccd8; loc_cc09: COND = *(int32_t *)rax == 0x0; rax = COND_BYTE_SET(NE); rdx = rbx; if (!COND) { if (*rdx == 0x0) { rax = rdx; rdx = *(int32_t *)(rax + 0x20); rbx = rax; CABackingStoreSynchronize(var_130, arg_8, rdx + 0x1, 0x1e); rcx = *r13; rax = 0x1; if (rcx != 0x0) { rax = *(int32_t *)*(rcx + 0x18) == 0x0 ? 0x1 : 0x0; } rax = rax ^ 0x1; rdx = rbx; } } else { if ((rdx != var_100) && (*rdx != 0x0)) { rax = CABackingStoreSynchronize(var_130, arg_8, *(int32_t *)(rdx + 0x20), 0x0); rdx = rdx; rax = rax ^ 0x1; } } if (rax == 0x0) goto loc_cccc; loc_cc86: rcx = *rdx; if (rcx == 0x0) goto loc_cd04; loc_cc8e: if (rax == 0x0) goto loc_cccc; loc_cc92: r12 = rdx; r13 = rcx + 0x10; rdi = *(rcx + 0x10); rbx = rcx; if (rdi != 0x0) goto loc_cb9d; loc_cca9: rdx = rcx; goto loc_cccc; loc_cccc: r14 = var_110; goto loc_cd47; loc_cd47: if (rdx == *r15) goto loc_cd6c; loc_cd4c: *r12 = *rdx; *rdx = *r15; *r15 = rdx; r15 = var_138; r12 = var_130; goto loc_cd83; loc_cd83: rax = *r13; if (rax == 0x0) goto loc_cd98; loc_cd8c: var_110 = rax; goto loc_ce38; loc_ce38: r13 = r14; rdi = *(rdx + 0x8); if (rdi != *(r12 + 0x90)) { CGColorSpaceRelease(rdi); rax = CGColorSpaceRetain(*(r12 + 0x90)); rdx = rdx; *(rdx + 0x8) = rax; if ((rax != *(var_100 + 0x8)) && (*(rdx + 0x18) != 0x0)) { CGSReleaseRegion(); rdx = rdx; *(rdx + 0x18) = 0x0; } } var_138 = r15; if (*(r12 + 0x150) != 0x0) { CGSBoundingShapeReset(); rdx = rdx; } *(int16_t *)(r12 + 0x174) = *(int16_t *)(r12 + 0x174) & 0xffff & 0xf8ff | 0x200; var_178 = *(rdx + 0x18); rbx = *(r12 + 0x138); var_120 = r13; r12 = r13 & 0x1; if (rbx == 0x0) goto loc_cf5d; loc_ceef: r15 = var_98; goto loc_cef6; loc_cef6: r13 = rbx + 0x18; if (rbx == rdx) goto loc_cf35; loc_ceff: rax = *r13; if (rax == 0x0) goto loc_cf55; loc_cf08: r14 = rdx; if (r12 == 0x0) { CGSUnionRegion(0x0, rax, r15); CGSReleaseRegion(*r13); *r13 = var_98; } else { CGSReleaseRegion(rax); *r13 = 0x0; } goto loc_cf52; loc_cf52: rdx = r14; goto loc_cf55; loc_cf55: rbx = *rbx; if (rbx != 0x0) goto loc_cef6; loc_cf5d: var_140 = rdx; rax = var_F8; r13 = var_178; if ((rdx != var_100) && (r12 == 0x0)) { if (r13 != 0x0) { CGSDiffRegion(r13, 0x0, 0x0); } else { xmm1 = intrinsic_movdqa(xmm1, *(int128_t *)0x150860); xmm0 = intrinsic_punpckldq(zero_extend_64(var_D8), xmm1); xmm2 = intrinsic_movapd(xmm2, *(int128_t *)0x150870); xmm0 = intrinsic_subpd(xmm0, xmm2); xmm0 = intrinsic_haddpd(xmm0, xmm0); xmm3 = intrinsic_punpckldq(zero_extend_64(rax), xmm1); xmm3 = intrinsic_subpd(xmm3, xmm2); xmm3 = intrinsic_haddpd(xmm3, xmm3); xmm1 = intrinsic_pxor(xmm1, xmm1); var_C0 = intrinsic_movdqa(var_C0, xmm1); intrinsic_movlpd(var_B0, xmm0); intrinsic_movlpd(var_A8, xmm3); CGSNewRegionWithRect(var_C0, var_C8); CGSDiffRegion(var_C8, 0x0, 0x0); CGSReleaseRegion(var_C8); } if (CGSRegionIsEmpty(0x0) != 0x0) { CGSReleaseRegion(0x0); } } rcx = var_110; if (rcx == 0x0) goto loc_d0ae; loc_d06a: r15 = *(rcx + 0x18); if (0x0 != 0x0) { rax = *var_118; r13 = 0x1; r12 = var_130; if (rax != 0x0) { CA::Render::ShmemBitmap::copy_pixels(r15, *(rax + 0x18)); rcx = rcx; r13 = var_120; } } else { r13 = var_120; r12 = var_130; } r13 = r13 & 0x1; rbx = var_F0; if ((rbx & 0x2) != 0x0) { CA::Render::ShmemBitmap::fill_pixels(r15, 0x0); rcx = rcx; rbx = rbx & 0xfffffffd; } r14 = rbx; r15 = 0x0; var_149 = r13; rax = 0x0; if (r13 != 0x0) { r15 = 0x0; rax = r15; } *(r12 + 0x158) = rax; rax = *(rcx + 0x18); var_100 = rax; rax = *(int32_t *)(rax + 0x1c); var_110 = rax; if (rax == 0x0) goto loc_d4af; loc_d14e: xmm0 = intrinsic_movdqa(xmm0, *(int128_t *)0x150860); xmm2 = intrinsic_punpckldq(zero_extend_64(var_D8), xmm0); xmm1 = intrinsic_movapd(xmm1, *(int128_t *)0x150870); xmm2 = intrinsic_subpd(xmm2, xmm1); var_160 = intrinsic_movapd(var_160, intrinsic_haddpd(xmm2, xmm2)); xmm2 = intrinsic_punpckldq(zero_extend_64(var_F8), xmm0); xmm2 = intrinsic_subpd(xmm2, xmm1); xmm2 = intrinsic_haddpd(xmm2, xmm2); var_170 = intrinsic_movapd(var_170, xmm2); goto loc_d196; loc_d196: var_D8 = CA::Render::ShmemBitmap::lod_width(var_100); r12 = CA::Render::ShmemBitmap::lod_height(var_100); var_F8 = CA::Render::ShmemBitmap::lod_data(var_100); rbx = CA::Render::ShmemBitmap::lod_rowbytes(var_100); if (r15 == 0x0) goto loc_d2b3; loc_d1e5: if ((r14 & 0x28) != 0x0) goto loc_d203; loc_d1eb: CMP(var_D8, r12); asm{ cmova eax, ecx }; if (r12 > 0x7) goto loc_d2b3; loc_d203: var_F0 = r14; var_118 = rbx; rax = CA::Render::ShmemBitmap::lod_width(var_100); var_124 = r12; r12 = rax; rbx = CA::Render::ShmemBitmap::lod_height(var_100); var_120 = CA::Render::ShmemBitmap::lod_data(var_100); rax = CA::Render::ShmemBitmap::lod_rowbytes(var_100); xmm2 = intrinsic_cvtsi2sd(xmm2, var_D8); xmm3 = intrinsic_cvtsi2sd(xmm3, var_124); xmm0 = intrinsic_pxor(xmm0, xmm0); xmm1 = intrinsic_xorpd(xmm1, xmm1); CA::downsample_image(var_104, var_120, rax, r12, rbx, var_F8, var_118, xmm0, xmm1, xmm2, xmm3, 0x0); goto loc_d498; loc_d498: r15 = r15 + 0x1; r14 = var_F0; if (r15 < var_110) goto loc_d196; loc_d4af: rbx = var_130; rax = rbx + 0x158; *(int32_t *)(var_100 + 0x4) = *(int32_t *)(var_100 + 0x4) + 0x1; rdi = 0x0; r13 = var_178; goto loc_d4d3; loc_d4d3: *rax = 0x0; r15 = var_138; if (rdi != 0x0) { CGSReleaseRegion(); } if (r13 != 0x0) { CGSReleaseRegion(r13); } if (0x0 != 0x0) { CGSReleaseRegion(); } CABackingStoreReleaseImages(rbx); rax = 0x0; rdi = arg_8; if (rdi != 0x0) { rax = *rdi; rax = (*(rax + 0x48))(); rax = rax + 0x1; } *(int32_t *)(var_140 + 0x20) = rax; *(var_140 + 0x28) = 0x0; *(rbx + 0x160) = 0x0; *(int8_t *)(rbx + 0x174) = 0x6; pthread_cond_broadcast(rbx + 0x50); goto loc_d554; loc_d2b3: if ((r14 & 0x20) != 0x0) goto loc_d6a1; loc_d2bd: r9 = *(var_140 + 0x8); rsi = var_D8; rdx = r12; r13 = _CAGetCachedCGBitmapContext(var_F8, rsi, rdx, var_104, rbx, r9); if (r13 != 0x0) { xmm0 = intrinsic_movsd(xmm0, *0x150850); xmm1 = intrinsic_movapd(xmm1, xmm0); if (r15 != 0x0) { xmm0 = intrinsic_cvtsi2sd(0x0, var_D8); xmm0 = intrinsic_divsd(xmm0, var_160); xmm1 = intrinsic_cvtsi2sd(0x0, r12); xmm1 = intrinsic_divsd(xmm1, var_170); } if (var_149 == 0x0) { if (r15 != 0x0) { var_70 = intrinsic_movsd(var_70, xmm0); var_D8 = intrinsic_movsd(var_D8, xmm0); var_58 = intrinsic_movsd(var_58, xmm1); var_F0 = intrinsic_movsd(var_F0, xmm1); *(0x8) = 0x0; *0x0 = 0x0; *(0x8) = 0x0; *0x0 = 0x0; xmm0 = intrinsic_movss(xmm0, *(int32_t *)0x1508a0); rdx = var_D0; CGSTransformRegion(); rsi = var_D0; CGContextReplacePathWithShapePath(r13, rsi); CGSReleaseRegion(var_D0); } else { var_F0 = intrinsic_movsd(var_F0, xmm1); var_D8 = intrinsic_movsd(var_D8, xmm0); rsi = 0x0; CGContextReplacePathWithShapePath(r13, rsi); } CGContextClip(r13); xmm0 = intrinsic_movsd(xmm0, var_D8); xmm1 = intrinsic_movsd(xmm1, var_F0); } if (r15 != 0x0) { CGContextScaleCTM(r13, rsi, rdx); } if ((r14 & 0x2) != 0x0) { rax = *_CGRectInfinite; CGContextClearRect(r13, rsi); r14 = r14 & 0xfffffffd; } var_F0 = r14; *(var_130 + 0x168) = pthread_self(); pthread_mutex_unlock(var_138); (var_148)(r13, arg_0); pthread_mutex_lock(var_138); *(var_130 + 0x168) = 0x0; _CAReleaseCachedCGContext(r13); } else { var_F0 = r14; } goto loc_d498; loc_d6a1: abort(); return; loc_d0ae: rcx = 0x0; rdi = 0x0; if (r12 == 0x0) { rcx = rdi; } rbx = var_130; rax = rbx + 0x158; *(rbx + 0x158) = rcx; goto loc_d4d3; loc_cf35: r14 = rdx; CGSNewEmptyRegion(r13); goto loc_cf52; loc_cd98: rax = 0x1; r14 = 0x1; if (rdx != var_100) { r14 = rax; } rbx = rdx; CABackingStoreDeleteBuffer(rdx); rcx = 0x1; if ((var_F0 & 0x4) != 0x0) { rax = CA::Render::format_mipmap_min_size(var_104); rsi = var_F8; rcx = 0x1; if (rsi <= rax) { rdx = var_D8; if (rdx > rax) { do { do { rcx = rcx + 0x1; rdx = rdx >> 0x1; rsi = rsi >> 0x1; } while (rsi > rax); } while (rdx > rax); } } else { rdx = var_D8; do { do { rcx = rcx + 0x1; rdx = rdx >> 0x1; rsi = rsi >> 0x1; } while (rsi > rax); } while (rdx > rax); } } rax = CA::Render::Shmem::new_bitmap(var_104, var_D8, var_F8, rcx); *r13 = rax; rdx = rbx; if (rax == 0x0) goto loc_d554; loc_ce2a: var_110 = rax; var_F0 = var_F0 & 0xfffffffd; goto loc_ce38; loc_cd6c: r15 = var_138; r12 = var_130; if (rdx == 0x0) goto loc_d554; goto loc_cd83; loc_cd04: r14 = 0x1; if (rdx != var_100) { r14 = var_110; } rbx = rdx; CABackingStoreDeleteBuffer(rdx); if ((_CAGetDebugFlags() & 0x20) != 0x0) { _x_log("CoreAnimation: triple buffered backing store %p\n", var_130, rdx, rcx, r8, r9, stack[2048]); } goto loc_cd44; loc_cd44: rdx = rbx; goto loc_cd47; loc_ccd8: r14 = 0x1; if (rbx != var_100) { r14 = var_110; } CABackingStoreDeleteBuffer(rbx); goto loc_cd44; loc_ccf8: r14 = var_110; goto loc_cd44; loc_ccae: var_F0 = r12; r13 = rax; var_118 = rax; var_100 = rcx; rdx = rcx; r12 = r15; goto loc_cccc; loc_cb16: *(r14 + 0x80) = var_D8; *(r14 + 0x88) = r13; var_F8 = r13; rbx = 0x1; goto loc_cb34; }
下面是本工具输出的分支结构代码:
void CABackingStoreUpdate_(CABackingStore*, unsigned int, unsigned int, unsigned int, unsigned int, void(*)(CGContext*, void*), CA::Layer*, CA::GenericContext*) { // 50 call pthread_mutex_lock; // 65 if () { // gen jmp 116 goto _f116; } else { // 65 next // 67 call pthread_self; // 75 if () // gen jmp 2903 goto _f2903; // 89 if (!) { _b95: // from 114 // 101 call pthread_cond_wait; // 114 if () goto _b95; _f116: // from 65 } // 116 } // 116 // 146 if (!) { // 159 if () { // gen jmp 281 goto _f281; } // 176 else if () { // gen jmp 311 goto _f311; } else { // 176 next // 192 if () goto _f3214; // 215 if () goto _f3214; // 225 call CGSBoundingShapeGetRegion; // 234 if () goto _f2929; // 276 goto _f3076; _f281: // from 159 // 225 call CGSBoundingShapeGetRegion; } // 281 } // 281 _b311: // from 3231 _b311: // from 3216 _f311: // from 176 // 373 if () { // gen jmp 689 goto _f689; } else { // 373 next _b416: // from 678 // 420 call CA::Render::Shmem::set_volatile(bool, int); // 427 if () // gen jmp 731 goto _f731; // 440 if () // gen jmp 763 goto _f763; // 459 if () // gen jmp 731 goto _f731; // 475 if () // gen jmp 731 goto _f731; // 491 if () // gen jmp 731 goto _f731; // 518 if () // gen jmp 731 goto _f731; // 533 if () { // gen jmp 601 goto _f601; } else { // 533 next // 539 if () // gen jmp 645 goto _f645; // 568 call CABackingStoreSynchronize(CABackingStore*, CA::GenericContext*, unsigned int, int); // 582 if (!) { } // 594 // 599 goto _f645; _f601: // from 533 } // 601 // 608 if (!) { // 614 if (!) { // 635 call CABackingStoreSynchronize(CABackingStore*, CA::GenericContext*, unsigned int, int); _f645: // from 599 _f645: // from 539 } // 645 } // 645 // 647 if () // gen jmp 719 goto _f719; // 655 if () // gen jmp 775 goto _f775; // 659 if () // gen jmp 719 goto _f719; // 678 if () goto _b416; // 687 goto _f719; _f689: // from 373 } // 689 _f719: // from 687 _f719: // from 659 _f719: // from 647 // 729 goto _f842; _f731: // from 518 _f731: // from 491 _f731: // from 475 _f731: // from 459 _f731: // from 427 // 741 if (!) { } // 753 // 756 call CABackingStoreDeleteBuffer(CABackingStoreBuffer*); // 761 goto _f839; _f763: // from 440 // 773 goto _f839; _f775: // from 655 // 785 if (!) { } // 797 // 803 call CABackingStoreDeleteBuffer(CABackingStoreBuffer*); // 808 call CAGetDebugFlags; // 816 if (!) { // 834 call // %rdi = "CoreAnimation: triple buffered backing store %p\n" x_log; _f839: // from 773 _f839: // from 761 } // 839 _f842: // from 729 // 845 if (!) { // 877 goto _f902; } // 879 // 896 if (!) { _f902: // from 877 // 909 if (!) { // 918 goto _f1083; } // 923 // 936 if (!) { } // 941 // 947 call CABackingStoreDeleteBuffer(CABackingStoreBuffer*); // 965 if (!) { // 973 call CA::Render::format_mipmap_min_size(unsigned int); // 992 if (!) { // 1005 goto _f1014; } // 1007 _b1014: // from 1026 _b1014: // from 1022 _f1014: // from 1005 // 1022 if () goto _b1014; // 1026 if () goto _b1014; } // 1028 // 1048 call CA::Render::Shmem::new_bitmap(unsigned int, unsigned int, unsigned int, unsigned int); // 1063 if (!) { _f1083: // from 918 // 1098 if (!) { // 1103 call CGColorSpaceRelease; // 1116 call CGColorSpaceRetain; // 1139 if (!) { // 1148 if (!) { // 1153 call CGSReleaseRegion; } // 1169 } // 1169 } // 1169 // 1187 if (!) { // 1192 call CGSBoundingShapeReset; } // 1200 // 1264 if (!) { _b1273: // from 1374 // 1280 if () { // gen jmp 1336 goto _f1336; } // 1289 else if () { // gen jmp 1368 goto _f1368; } // 1297 else if () { // gen jmp 1349 goto _f1349; } else { // 1297 next // 1309 call CGSUnionRegion; // 1318 call CGSReleaseRegion; // 1334 goto _f1365; _f1336: // from 1280 // 1309 call CGSUnionRegion; // 1318 call CGSReleaseRegion; } // 1336 // 1342 call CGSNewEmptyRegion; // 1347 goto _f1365; _f1349: // from 1297 // 1352 call CGSReleaseRegion; _f1365: // from 1347 _f1365: // from 1334 _f1368: // from 1289 // 1374 if () goto _b1273; } // 1376 // 1415 if (!) { // 1424 if (!) { // 1433 if (!) { // 1449 call CGSDiffRegion; // 1454 goto _f1594; } // 1459 // 1554 call CGSNewRegionWithRect; // 1577 call CGSDiffRegion; // 1589 call CGSReleaseRegion; _f1594: // from 1454 // 1601 call CGSRegionIsEmpty; // 1608 if (!) { // 1617 call CGSReleaseRegion; } // 1633 } // 1633 } // 1633 // 1643 if () { // gen jmp 1713 goto _f1713; } // 1659 else if () { // gen jmp 1752 goto _f1752; } // 1684 else if () { // gen jmp 1766 goto _f1766; } else { // 1684 next // 1696 call CA::Render::ShmemBitmap::copy_pixels(CA::Render::ShmemBitmap const*, CGSRegionObject*); // 1711 goto _f1766; _f1713: // from 1643 // 1696 call CA::Render::ShmemBitmap::copy_pixels(CA::Render::ShmemBitmap const*, CGSRegionObject*); } // 1713 // 1747 goto _f2774; _f1752: // from 1659 _f1766: // from 1711 _f1766: // from 1684 // 1779 if (!) { // 1802 call CA::Render::ShmemBitmap::fill_pixels(unsigned int, CGSRegionObject*); } // 1813 // 1867 if (!) { _b1945: // from 2732 // 1958 call CA::Render::ShmemBitmap::lod_width(unsigned int) const; // 1975 call CA::Render::ShmemBitmap::lod_height(unsigned int) const; // 1989 call CA::Render::ShmemBitmap::lod_data(unsigned int); // 2007 call CA::Render::ShmemBitmap::lod_rowbytes(unsigned int) const; // 2018 if (!) { // 2028 if () { // gen jmp 2054 goto _f2054; } // 2048 else if () { // gen jmp 2230 goto _f2230; } else { // 2048 next _f2054: // from 2028 } // 2054 // 2085 call CA::Render::ShmemBitmap::lod_width(unsigned int) const; // 2106 call CA::Render::ShmemBitmap::lod_height(unsigned int) const; // 2119 call CA::Render::ShmemBitmap::lod_data(unsigned int); // 2137 call CA::Render::ShmemBitmap::lod_rowbytes(unsigned int) const; // 2220 call CA::downsample_image(unsigned int, void const*, unsigned long, unsigned long, unsigned long, void*, unsigned long, double, double, double, double, unsigned int); // 2225 goto _f2715; _f2230: // from 2048 } // 2230 // 2234 if () goto _f3236; // 2276 call CAGetCachedCGBitmapContext; // 2287 if () { // gen jmp 2495 goto _f2495; } else { // 2287 next // 2308 if (!) { } // 2351 // 2359 if () // gen jmp 2559 goto _f2559; // 2368 if () // gen jmp 2507 goto _f2507; // 2461 call CGSTransformRegion; // 2476 call CGContextReplacePathWithShapePath; // 2488 call CGSReleaseRegion; // 2493 goto _f2535; _f2495: // from 2287 // 2461 call CGSTransformRegion; // 2476 call CGContextReplacePathWithShapePath; // 2488 call CGSReleaseRegion; } // 2495 // 2502 goto _f2715; _f2507: // from 2368 // 2530 call CGContextReplacePathWithShapePath; _f2535: // from 2493 // 2538 call CGContextClip; _f2559: // from 2359 // 2562 if (!) { // 2567 call CGContextScaleCTM; } // 2572 // 2576 if (!) { // 2625 call CGContextClearRect; } // 2634 // 2641 call pthread_self; // 2670 call pthread_mutex_unlock; // 2682 call *-0x148(%rbp); // 2691 call pthread_mutex_lock; // 2710 call CAReleaseCachedCGContext; _f2715: // from 2502 _f2715: // from 2225 // 2732 if () goto _b1945; } // 2738 _f2774: // from 1747 // 2791 if (!) { // 2793 call CGSReleaseRegion; } // 2798 // 2801 if (!) { // 2806 call CGSReleaseRegion; } // 2811 // 2821 if (!) { // 2823 call CGSReleaseRegion; } // 2828 // 2831 call CABackingStoreReleaseImages(CABackingStore*); // 2845 if (!) { // 2850 call *0x48(%rax); } // 2855 // 2898 call pthread_cond_broadcast; _b2903: // from 3225 _f2903: // from 75 } // 2903 } // 2903 // 2906 call pthread_mutex_unlock; _f2929: // from 234 // 3046 call CGSTransformRegion; // 3055 call CGSReleaseRegion; _f3076: // from 276 // 3140 call CGSRectInRegion; // 3149 if (!) { // 3166 call CGSIntersectRegionWithRect; // 3175 call CGSRegionIsEmpty; // 3182 if (!) { // 3188 call CGSReleaseRegion; } // 3201 } // 3201 _f3214: // from 215 _f3214: // from 192 // 3216 if () goto _b311; // 3225 if () goto _b2903; // 3231 goto _b311; // 3236 call abort; _f3236: // from 2234 }
下面是lldb反汇编出来的代码:
QuartzCore`CABackingStoreUpdate_: <+0>: pushq %rbp <+1>: movq %rsp, %rbp <+4>: pushq %r15 <+6>: pushq %r14 <+8>: pushq %r13 <+10>: pushq %r12 <+12>: pushq %rbx <+13>: subq $0x198, %rsp <+20>: movq %r9, -0x148(%rbp) <+27>: movl %ecx, %r12d <+30>: movq %rdx, %r13 <+33>: movq %rsi, -0xd8(%rbp) <+40>: movq %rdi, %r14 <+43>: leaq 0x10(%r14), %r15 <+47>: movq %r15, %rdi <+50>: callq 0x1096a9eb4 ; symbol stub for: pthread_mutex_lock <+55>: movq 0x168(%r14), %rbx <+62>: testq %rbx, %rbx <+65>: je 0x109567a71 ; <+116> <+67>: callq 0x1096a9ed8 ; symbol stub for: pthread_self <+72>: cmpq %rax, %rbx <+75>: je 0x109568554 ; <+2903> <+81>: cmpq $0x0, 0x168(%r14) <+89>: je 0x109567a71 ; <+116> <+91>: leaq 0x50(%r14), %rbx <+95>: movq %rbx, %rdi <+98>: movq %r15, %rsi <+101>: callq 0x1096a9e84 ; symbol stub for: pthread_cond_wait <+106>: cmpq $0x0, 0x168(%r14) <+114>: jne 0x109567a5c ; <+95> <+116>: movw 0x174(%r14), %cx <+124>: movq $0x0, -0x30(%rbp) <+132>: movq -0xd8(%rbp), %rax <+139>: cmpq %rax, 0x80(%r14) <+146>: jne 0x109567b16 ; <+281> <+152>: cmpq %r13, 0x88(%r14) <+159>: jne 0x109567b16 ; <+281> <+161>: movq %r13, -0xf8(%rbp) <+168>: movl %ecx, %ebx <+170>: shrl $0xa, %ebx <+173>: andb $0x1, %bl <+176>: jne 0x109567b34 ; <+311> <+182>: xorl %eax, %eax <+184>: testb $0x2, %ch <+187>: movl $0x0, %ebx <+192>: jne 0x10956868b ; <+3214> <+198>: movq 0x150(%r14), %rdi <+205>: xorl %eax, %eax <+207>: testq %rdi, %rdi <+210>: movl $0x0, %ebx <+215>: je 0x10956868b ; <+3214> <+221>: leaq -0x38(%rbp), %rsi <+225>: callq 0x1096a96e0 ; symbol stub for: CGSBoundingShapeGetRegion <+230>: testb $-0x80, %r12b <+234>: jne 0x10956856e ; <+2929> <+240>: movq -0x38(%rbp), %rdi <+244>: movq -0xf8(%rbp), %rbx <+251>: movd %rbx, %xmm2 <+256>: punpckldq 0x143d5b(%rip), %xmm2 <+264>: subpd 0x143d63(%rip), %xmm2 <+272>: haddpd %xmm2, %xmm2 <+276>: jmp 0x109568601 ; <+3076> <+281>: movq -0xd8(%rbp), %rax <+288>: movq %rax, 0x80(%r14) <+295>: movq %r13, 0x88(%r14) <+302>: movq %r13, -0xf8(%rbp) <+309>: movb $0x1, %bl <+311>: movq %rbx, -0x110(%rbp) <+318>: movq %r15, -0x138(%rbp) <+325>: movl %r12d, %eax <+328>: andl $0x1, %eax <+331>: leal 0x1(%rax,%rax), %eax <+335>: movl %eax, -0x104(%rbp) <+341>: leaq 0x138(%r14), %r15 <+348>: movq 0x138(%r14), %rcx <+355>: movq %r14, -0x130(%rbp) <+362>: leaq 0x10(%rcx), %rax <+366>: movq 0x10(%rcx), %rdi <+370>: testq %rdi, %rdi <+373>: je 0x109567cae ; <+689> <+379>: movl %r12d, %r14d <+382>: movl %r12d, -0xf0(%rbp) <+389>: andl $0x4, %r14d <+393>: movq %rax, %r13 <+396>: movq %rax, -0x118(%rbp) <+403>: movq %rcx, %rbx <+406>: movq %rcx, -0x100(%rbp) <+413>: movq %r15, %r12 <+416>: xorl %esi, %esi <+418>: xorl %edx, %edx <+420>: callq 0x1095bc8c8 ; CA::Render::Shmem::set_volatile(bool, int) <+425>: testb %al, %al <+427>: je 0x109567cd8 ; <+731> <+433>: movq (%r13), %rax <+437>: testq %rax, %rax <+440>: je 0x109567cf8 ; <+763> <+446>: movq 0x18(%rax), %rax <+450>: movl -0x104(%rbp), %ecx <+456>: cmpl %ecx, 0x10(%rax) <+459>: jne 0x109567cd8 ; <+731> <+465>: movl 0x14(%rax), %ecx <+468>: cmpq -0xd8(%rbp), %rcx <+475>: jne 0x109567cd8 ; <+731> <+481>: movl 0x18(%rax), %ecx <+484>: cmpq -0xf8(%rbp), %rcx <+491>: jne 0x109567cd8 ; <+731> <+497>: testl %r14d, %r14d <+500>: setne %cl <+503>: cmpl $0x1, 0x1c(%rax) <+507>: seta %dl <+510>: movzbl %cl, %ecx <+513>: movzbl %dl, %edx <+516>: cmpl %edx, %ecx <+518>: jne 0x109567cd8 ; <+731> <+524>: cmpl $0x0, (%rax) <+527>: setne %al <+530>: movq %rbx, %rdx <+533>: je 0x109567c56 ; <+601> <+535>: cmpq $0x0, (%rdx) <+539>: jne 0x109567c82 ; <+645> <+541>: movq %rdx, %rax <+544>: movl 0x20(%rax), %edx <+547>: movq %rax, %rbx <+550>: incl %edx <+552>: movl $0x1e, %ecx <+557>: movq -0x130(%rbp), %rdi <+564>: movq 0x18(%rbp), %rsi <+568>: callq 0x1095686a6 ; CABackingStoreSynchronize(CABackingStore*, CA::GenericContext*, unsigned int, int) <+573>: movq (%r13), %rcx <+577>: movb $0x1, %al <+579>: testq %rcx, %rcx <+582>: je 0x109567c4f ; <+594> <+584>: movq 0x18(%rcx), %rax <+588>: cmpl $0x0, (%rax) <+591>: sete %al <+594>: xorb $0x1, %al <+596>: movq %rbx, %rdx <+599>: jmp 0x109567c82 ; <+645> <+601>: cmpq -0x100(%rbp), %rdx <+608>: je 0x109567c82 ; <+645> <+610>: cmpq $0x0, (%rdx) <+614>: je 0x109567c82 ; <+645> <+616>: movq %rdx, %rbx <+619>: movl 0x20(%rbx), %edx <+622>: xorl %ecx, %ecx <+624>: movq -0x130(%rbp), %rdi <+631>: movq 0x18(%rbp), %rsi <+635>: callq 0x1095686a6 ; CABackingStoreSynchronize(CABackingStore*, CA::GenericContext*, unsigned int, int) <+640>: movq %rbx, %rdx <+643>: xorb $0x1, %al <+645>: testb %al, %al <+647>: je 0x109567ccc ; <+719> <+649>: movq (%rdx), %rcx <+652>: testq %rcx, %rcx <+655>: je 0x109567d04 ; <+775> <+657>: testb %al, %al <+659>: je 0x109567ccc ; <+719> <+661>: movq %rdx, %r12 <+664>: leaq 0x10(%rcx), %r13 <+668>: movq 0x10(%rcx), %rdi <+672>: testq %rdi, %rdi <+675>: movq %rcx, %rbx <+678>: jne 0x109567b9d ; <+416> <+684>: movq %rcx, %rdx <+687>: jmp 0x109567ccc ; <+719> <+689>: movl %r12d, -0xf0(%rbp) <+696>: movq %rax, %r13 <+699>: movq %rax, -0x118(%rbp) <+706>: movq %rcx, -0x100(%rbp) <+713>: movq %rcx, %rdx <+716>: movq %r15, %r12 <+719>: movq -0x110(%rbp), %rax <+726>: movb %al, %r14b <+729>: jmp 0x109567d47 ; <+842> <+731>: cmpq -0x100(%rbp), %rbx <+738>: movb $0x1, %r14b <+741>: je 0x109567cee ; <+753> <+743>: movq -0x110(%rbp), %rax <+750>: movb %al, %r14b <+753>: movq %rbx, %rdi <+756>: callq 0x10956795f ; CABackingStoreDeleteBuffer(CABackingStoreBuffer*) <+761>: jmp 0x109567d44 ; <+839> <+763>: movq -0x110(%rbp), %rax <+770>: movb %al, %r14b <+773>: jmp 0x109567d44 ; <+839> <+775>: cmpq -0x100(%rbp), %rdx <+782>: movb $0x1, %r14b <+785>: je 0x109567d1a ; <+797> <+787>: movq -0x110(%rbp), %rax <+794>: movb %al, %r14b <+797>: movq %rdx, %rdi <+800>: movq %rdx, %rbx <+803>: callq 0x10956795f ; CABackingStoreDeleteBuffer(CABackingStoreBuffer*) <+808>: callq 0x10955cf14 ; CAGetDebugFlags <+813>: testb $0x20, %ah <+816>: je 0x109567d44 ; <+839> <+818>: leaq 0x156592(%rip), %rdi ; "CoreAnimation: triple buffered backing store %p\n" <+825>: xorl %eax, %eax <+827>: movq -0x130(%rbp), %rsi <+834>: callq 0x1096a70ef ; x_log <+839>: movq %rbx, %rdx <+842>: cmpq (%r15), %rdx <+845>: je 0x109567d6c ; <+879> <+847>: movq (%rdx), %rax <+850>: movq %rax, (%r12) <+854>: movq (%r15), %rax <+857>: movq %rax, (%rdx) <+860>: movq %rdx, (%r15) <+863>: movq -0x138(%rbp), %r15 <+870>: movq -0x130(%rbp), %r12 <+877>: jmp 0x109567d83 ; <+902> <+879>: testq %rdx, %rdx <+882>: movq -0x138(%rbp), %r15 <+889>: movq -0x130(%rbp), %r12 <+896>: je 0x109568554 ; <+2903> <+902>: movq (%r13), %rax <+906>: testq %rax, %rax <+909>: je 0x109567d98 ; <+923> <+911>: movq %rax, -0x110(%rbp) <+918>: jmp 0x109567e38 ; <+1083> <+923>: movb %r14b, %al <+926>: cmpq -0x100(%rbp), %rdx <+933>: movb $0x1, %r14b <+936>: je 0x109567daa ; <+941> <+938>: movb %al, %r14b <+941>: movq %rdx, %rdi <+944>: movq %rdx, %rbx <+947>: callq 0x10956795f ; CABackingStoreDeleteBuffer(CABackingStoreBuffer*) <+952>: movl -0xf0(%rbp), %eax <+958>: testb $0x4, %al <+960>: movl $0x1, %ecx <+965>: je 0x109567e01 ; <+1028> <+967>: movl -0x104(%rbp), %edi <+973>: callq 0x109598be2 ; CA::Render::format_mipmap_min_size(unsigned int) <+978>: movq -0xf8(%rbp), %rsi <+985>: cmpl %eax, %esi <+987>: movl $0x1, %ecx <+992>: ja 0x109567dec ; <+1007> <+994>: movq -0xd8(%rbp), %rdx <+1001>: cmpl %eax, %edx <+1003>: jbe 0x109567e01 ; <+1028> <+1005>: jmp 0x109567df3 ; <+1014> <+1007>: movq -0xd8(%rbp), %rdx <+1014>: incl %ecx <+1016>: shrl %edx <+1018>: shrl %esi <+1020>: cmpl %eax, %esi <+1022>: ja 0x109567df3 ; <+1014> <+1024>: cmpl %eax, %edx <+1026>: ja 0x109567df3 ; <+1014> <+1028>: movl -0x104(%rbp), %edi <+1034>: movq -0xd8(%rbp), %rsi <+1041>: movq -0xf8(%rbp), %rdx <+1048>: callq 0x1095bcd16 ; CA::Render::Shmem::new_bitmap(unsigned int, unsigned int, unsigned int, unsigned int) <+1053>: movq %rax, (%r13) <+1057>: testq %rax, %rax <+1060>: movq %rbx, %rdx <+1063>: je 0x109568554 ; <+2903> <+1069>: movq %rax, -0x110(%rbp) <+1076>: andl $-0x3, -0xf0(%rbp) <+1083>: movb %r14b, %r13b <+1086>: movq 0x8(%rdx), %rdi <+1090>: cmpq 0x90(%r12), %rdi <+1098>: je 0x109567e8e ; <+1169> <+1100>: movq %rdx, %r14 <+1103>: callq 0x1096a931a ; symbol stub for: CGColorSpaceRelease <+1108>: movq 0x90(%r12), %rdi <+1116>: callq 0x1096a9320 ; symbol stub for: CGColorSpaceRetain <+1121>: movq %r14, %rdx <+1124>: movq %rax, 0x8(%rdx) <+1128>: movq -0x100(%rbp), %rcx <+1135>: cmpq 0x8(%rcx), %rax <+1139>: je 0x109567e8e ; <+1169> <+1141>: movq 0x18(%rdx), %rdi <+1145>: testq %rdi, %rdi <+1148>: je 0x109567e8e ; <+1169> <+1150>: movq %rdx, %r14 <+1153>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion <+1158>: movq %r14, %rdx <+1161>: movq $0x0, 0x18(%rdx) <+1169>: movq %r15, -0x138(%rbp) <+1176>: movq 0x150(%r12), %rdi <+1184>: testq %rdi, %rdi <+1187>: je 0x109567ead ; <+1200> <+1189>: movq %rdx, %rbx <+1192>: callq 0x1096a96ec ; symbol stub for: CGSBoundingShapeReset <+1197>: movq %rbx, %rdx <+1200>: movzwl 0x174(%r12), %eax <+1209>: andl $0xf8ff, %eax <+1214>: orl $0x200, %eax <+1219>: movw %ax, 0x174(%r12) <+1228>: movq 0x18(%rdx), %rax <+1232>: movq %rax, -0x178(%rbp) <+1239>: movq 0x138(%r12), %rbx <+1247>: movb %r13b, %r12b <+1250>: movb %r13b, -0x120(%rbp) <+1257>: andb $0x1, %r12b <+1261>: testq %rbx, %rbx <+1264>: je 0x109567f5d ; <+1376> <+1266>: leaq -0x98(%rbp), %r15 <+1273>: leaq 0x18(%rbx), %r13 <+1277>: cmpq %rdx, %rbx <+1280>: je 0x109567f35 ; <+1336> <+1282>: movq (%r13), %rax <+1286>: testq %rax, %rax <+1289>: je 0x109567f55 ; <+1368> <+1291>: movq %rdx, %r14 <+1294>: testb %r12b, %r12b <+1297>: jne 0x109567f42 ; <+1349> <+1299>: movq -0x30(%rbp), %rdi <+1303>: movq %rax, %rsi <+1306>: movq %r15, %rdx <+1309>: callq 0x1096a9734 ; symbol stub for: CGSUnionRegion <+1314>: movq (%r13), %rdi <+1318>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion <+1323>: movq -0x98(%rbp), %rax <+1330>: movq %rax, (%r13) <+1334>: jmp 0x109567f52 ; <+1365> <+1336>: movq %r13, %rdi <+1339>: movq %rdx, %r14 <+1342>: callq 0x1096a96fe ; symbol stub for: CGSNewEmptyRegion <+1347>: jmp 0x109567f52 ; <+1365> <+1349>: movq %rax, %rdi <+1352>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion <+1357>: movq $0x0, (%r13) <+1365>: movq %r14, %rdx <+1368>: movq (%rbx), %rbx <+1371>: testq %rbx, %rbx <+1374>: jne 0x109567ef6 ; <+1273> <+1376>: movq %rdx, -0x140(%rbp) <+1383>: movq $0x0, -0xa0(%rbp) <+1394>: cmpq -0x100(%rbp), %rdx <+1401>: movq -0xf8(%rbp), %rax <+1408>: movq -0x178(%rbp), %r13 <+1415>: je 0x10956805e ; <+1633> <+1421>: testb %r12b, %r12b <+1424>: jne 0x10956805e ; <+1633> <+1430>: testq %r13, %r13 <+1433>: je 0x109567fb0 ; <+1459> <+1435>: movq -0x30(%rbp), %rsi <+1439>: leaq -0xa0(%rbp), %rdx <+1446>: movq %r13, %rdi <+1449>: callq 0x1096a96f2 ; symbol stub for: CGSDiffRegion <+1454>: jmp 0x109568037 ; <+1594> <+1459>: movq -0xd8(%rbp), %xmm0 <+1467>: movdqa 0x1438a0(%rip), %xmm1 <+1475>: punpckldq %xmm1, %xmm0 <+1479>: movapd 0x1438a4(%rip), %xmm2 <+1487>: subpd %xmm2, %xmm0 <+1491>: haddpd %xmm0, %xmm0 <+1495>: movd %rax, %xmm3 <+1500>: punpckldq %xmm1, %xmm3 <+1504>: subpd %xmm2, %xmm3 <+1508>: haddpd %xmm3, %xmm3 <+1512>: pxor %xmm1, %xmm1 <+1516>: movdqa %xmm1, -0xc0(%rbp) <+1524>: movlpd %xmm0, -0xb0(%rbp) <+1532>: movlpd %xmm3, -0xa8(%rbp) <+1540>: leaq -0xc0(%rbp), %rdi <+1547>: leaq -0xc8(%rbp), %rsi <+1554>: callq 0x1096a9704 ; symbol stub for: CGSNewRegionWithRect <+1559>: movq -0xc8(%rbp), %rdi <+1566>: movq -0x30(%rbp), %rsi <+1570>: leaq -0xa0(%rbp), %rdx <+1577>: callq 0x1096a96f2 ; symbol stub for: CGSDiffRegion <+1582>: movq -0xc8(%rbp), %rdi <+1589>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion <+1594>: movq -0xa0(%rbp), %rdi <+1601>: callq 0x1096a971c ; symbol stub for: CGSRegionIsEmpty <+1606>: testb %al, %al <+1608>: je 0x10956805e ; <+1633> <+1610>: movq -0xa0(%rbp), %rdi <+1617>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion <+1622>: movq $0x0, -0xa0(%rbp) <+1633>: movq -0x110(%rbp), %rcx <+1640>: testq %rcx, %rcx <+1643>: je 0x1095680ae ; <+1713> <+1645>: movq 0x18(%rcx), %r15 <+1649>: movq -0xa0(%rbp), %rdx <+1656>: testq %rdx, %rdx <+1659>: je 0x1095680d5 ; <+1752> <+1661>: movq -0x118(%rbp), %rax <+1668>: movq (%rax), %rax <+1671>: movb $0x1, %r13b <+1674>: testq %rax, %rax <+1677>: movq -0x130(%rbp), %r12 <+1684>: je 0x1095680e3 ; <+1766> <+1686>: movq 0x18(%rax), %rsi <+1690>: movq %r15, %rdi <+1693>: movq %rcx, %rbx <+1696>: callq 0x1095bd09e ; CA::Render::ShmemBitmap::copy_pixels(CA::Render::ShmemBitmap const*, CGSRegionObject*) <+1701>: movq %rbx, %rcx <+1704>: movb -0x120(%rbp), %r13b <+1711>: jmp 0x1095680e3 ; <+1766> <+1713>: xorl %ecx, %ecx <+1715>: testb %r12b, %r12b <+1718>: movq -0x30(%rbp), %rdi <+1722>: cmoveq %rdi, %rcx <+1726>: movq -0x130(%rbp), %rbx <+1733>: leaq 0x158(%rbx), %rax <+1740>: movq %rcx, 0x158(%rbx) <+1747>: jmp 0x1095684d3 ; <+2774> <+1752>: movb -0x120(%rbp), %r13b <+1759>: movq -0x130(%rbp), %r12 <+1766>: andb $0x1, %r13b <+1770>: movl -0xf0(%rbp), %ebx <+1776>: testb $0x2, %bl <+1779>: je 0x109568112 ; <+1813> <+1781>: xorl %eax, %eax <+1783>: testb %r13b, %r13b <+1786>: movq -0x30(%rbp), %rdx <+1790>: cmovneq %rax, %rdx <+1794>: xorl %esi, %esi <+1796>: movq %r15, %rdi <+1799>: movq %rcx, %r14 <+1802>: callq 0x1095bd350 ; CA::Render::ShmemBitmap::fill_pixels(unsigned int, CGSRegionObject*) <+1807>: movq %r14, %rcx <+1810>: andl $-0x3, %ebx <+1813>: movl %ebx, %r14d <+1816>: xorl %r15d, %r15d <+1819>: testb %r13b, %r13b <+1822>: movb %r13b, -0x149(%rbp) <+1829>: movq -0x30(%rbp), %rax <+1833>: cmovneq %r15, %rax <+1837>: movq %rax, 0x158(%r12) <+1845>: movq 0x18(%rcx), %rax <+1849>: movq %rax, -0x100(%rbp) <+1856>: movl 0x1c(%rax), %eax <+1859>: movl %eax, -0x110(%rbp) <+1865>: testl %eax, %eax <+1867>: je 0x1095684af ; <+2738> <+1873>: movq -0xd8(%rbp), %xmm2 <+1881>: movdqa 0x143702(%rip), %xmm0 <+1889>: punpckldq %xmm0, %xmm2 <+1893>: movapd 0x143706(%rip), %xmm1 <+1901>: subpd %xmm1, %xmm2 <+1905>: haddpd %xmm2, %xmm2 <+1909>: movapd %xmm2, -0x160(%rbp) <+1917>: movq -0xf8(%rbp), %xmm2 <+1925>: punpckldq %xmm0, %xmm2 <+1929>: subpd %xmm1, %xmm2 <+1933>: haddpd %xmm2, %xmm2 <+1937>: movapd %xmm2, -0x170(%rbp) <+1945>: movq -0x100(%rbp), %rbx <+1952>: movq %rbx, %rdi <+1955>: movl %r15d, %esi <+1958>: callq 0x1095bd4fa ; CA::Render::ShmemBitmap::lod_width(unsigned int) const <+1963>: movl %eax, -0xd8(%rbp) <+1969>: movq %rbx, %rdi <+1972>: movl %r15d, %esi <+1975>: callq 0x1095bd338 ; CA::Render::ShmemBitmap::lod_height(unsigned int) const <+1980>: movl %eax, %r12d <+1983>: movq %rbx, %rdi <+1986>: movl %r15d, %esi <+1989>: callq 0x1095bd2ba ; CA::Render::ShmemBitmap::lod_data(unsigned int) <+1994>: movq %rax, -0xf8(%rbp) <+2001>: movq %rbx, %rdi <+2004>: movl %r15d, %esi <+2007>: callq 0x1095bcf5e ; CA::Render::ShmemBitmap::lod_rowbytes(unsigned int) const <+2012>: movq %rax, %rbx <+2015>: testl %r15d, %r15d <+2018>: je 0x1095682b3 ; <+2230> <+2024>: testb $0x28, %r14b <+2028>: jne 0x109568203 ; <+2054> <+2030>: movl -0xd8(%rbp), %ecx <+2036>: cmpl %r12d, %ecx <+2039>: movl %r12d, %eax <+2042>: cmoval %ecx, %eax <+2045>: cmpl $0x7, %eax <+2048>: ja 0x1095682b3 ; <+2230> <+2054>: movl %r14d, -0xf0(%rbp) <+2061>: leal -0x1(%r15), %r14d <+2065>: movq -0x100(%rbp), %r13 <+2072>: movq %r13, %rdi <+2075>: movl %r14d, %esi <+2078>: movq %rbx, -0x118(%rbp) <+2085>: callq 0x1095bd4fa ; CA::Render::ShmemBitmap::lod_width(unsigned int) const <+2090>: movl %r12d, -0x124(%rbp) <+2097>: movl %eax, %r12d <+2100>: movq %r13, %rdi <+2103>: movl %r14d, %esi <+2106>: callq 0x1095bd338 ; CA::Render::ShmemBitmap::lod_height(unsigned int) const <+2111>: movl %eax, %ebx <+2113>: movq %r13, %rdi <+2116>: movl %r14d, %esi <+2119>: callq 0x1095bd2ba ; CA::Render::ShmemBitmap::lod_data(unsigned int) <+2124>: movq %rax, -0x120(%rbp) <+2131>: movq %r13, %rdi <+2134>: movl %r14d, %esi <+2137>: callq 0x1095bcf5e ; CA::Render::ShmemBitmap::lod_rowbytes(unsigned int) const <+2142>: movl %r12d, %ecx <+2145>: movl %ebx, %r8d <+2148>: movl -0xd8(%rbp), %edx <+2154>: cvtsi2sdq %rdx, %xmm2 <+2159>: movl -0x124(%rbp), %edx <+2165>: cvtsi2sdq %rdx, %xmm3 <+2170>: movq -0x118(%rbp), %rdx <+2177>: movq %rdx, (%rsp) <+2181>: movl $0x0, 0x8(%rsp) <+2189>: pxor %xmm0, %xmm0 <+2193>: xorpd %xmm1, %xmm1 <+2197>: movl -0x104(%rbp), %edi <+2203>: movq -0x120(%rbp), %rsi <+2210>: movq %rax, %rdx <+2213>: movq -0xf8(%rbp), %r9 <+2220>: callq 0x10956cdfa ; CA::downsample_image(unsigned int, void const*, unsigned long, unsigned long, unsigned long, void*, unsigned long, double, double, double, double, unsigned int) <+2225>: jmp 0x109568498 ; <+2715> <+2230>: testb $0x20, %r14b <+2234>: jne 0x1095686a1 ; <+3236> <+2240>: movq -0x140(%rbp), %rax <+2247>: movq 0x8(%rax), %r9 <+2251>: movq -0xf8(%rbp), %rdi <+2258>: movl -0xd8(%rbp), %esi <+2264>: movl %r12d, %edx <+2267>: movl -0x104(%rbp), %ecx <+2273>: movq %rbx, %r8 <+2276>: callq 0x10956b012 ; CAGetCachedCGBitmapContext <+2281>: movq %rax, %r13 <+2284>: testq %r13, %r13 <+2287>: je 0x1095683bc ; <+2495> <+2293>: testl %r15d, %r15d <+2296>: movsd 0x143553(%rip), %xmm0 <+2304>: movapd %xmm0, %xmm1 <+2308>: je 0x10956832c ; <+2351> <+2310>: movl -0xd8(%rbp), %eax <+2316>: xorps %xmm0, %xmm0 <+2319>: cvtsi2sdq %rax, %xmm0 <+2324>: divsd -0x160(%rbp), %xmm0 <+2332>: movl %r12d, %eax <+2335>: xorps %xmm1, %xmm1 <+2338>: cvtsi2sdq %rax, %xmm1 <+2343>: divsd -0x170(%rbp), %xmm1 <+2351>: movb -0x149(%rbp), %al <+2357>: testb %al, %al <+2359>: jne 0x1095683fc ; <+2559> <+2365>: testl %r15d, %r15d <+2368>: je 0x1095683c8 ; <+2507> <+2374>: movsd %xmm0, -0x70(%rbp) <+2379>: movsd %xmm0, -0xd8(%rbp) <+2387>: movsd %xmm1, -0x58(%rbp) <+2392>: movsd %xmm1, -0xf0(%rbp) <+2400>: leaq -0x68(%rbp), %rax <+2404>: movq $0x0, 0x8(%rax) <+2412>: movq $0x0, (%rax) <+2419>: leaq -0x50(%rbp), %rax <+2423>: movq $0x0, 0x8(%rax) <+2431>: movq $0x0, (%rax) <+2438>: movq -0x30(%rbp), %rdi <+2442>: leaq -0x70(%rbp), %rsi <+2446>: movss 0x14350d(%rip), %xmm0 <+2454>: leaq -0xd0(%rbp), %rdx <+2461>: callq 0x1096a972e ; symbol stub for: CGSTransformRegion <+2466>: movq -0xd0(%rbp), %rsi <+2473>: movq %r13, %rdi <+2476>: callq 0x1096a93d4 ; symbol stub for: CGContextReplacePathWithShapePath <+2481>: movq -0xd0(%rbp), %rdi <+2488>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion <+2493>: jmp 0x1095683e4 ; <+2535> <+2495>: movl %r14d, -0xf0(%rbp) <+2502>: jmp 0x109568498 ; <+2715> <+2507>: movsd %xmm1, -0xf0(%rbp) <+2515>: movsd %xmm0, -0xd8(%rbp) <+2523>: movq -0x30(%rbp), %rsi <+2527>: movq %r13, %rdi <+2530>: callq 0x1096a93d4 ; symbol stub for: CGContextReplacePathWithShapePath <+2535>: movq %r13, %rdi <+2538>: callq 0x1096a9368 ; symbol stub for: CGContextClip <+2543>: movsd -0xd8(%rbp), %xmm0 <+2551>: movsd -0xf0(%rbp), %xmm1 <+2559>: testl %r15d, %r15d <+2562>: je 0x109568409 ; <+2572> <+2564>: movq %r13, %rdi <+2567>: callq 0x1096a93ec ; symbol stub for: CGContextScaleCTM <+2572>: testb $0x2, %r14b <+2576>: je 0x109568447 ; <+2634> <+2578>: movq 0x174c0a(%rip), %rax ; (void *)0x00000001094d6d30: CGRectInfinite <+2585>: movq %rax, %rcx <+2588>: movq 0x18(%rcx), %rax <+2592>: movq %rax, 0x18(%rsp) <+2597>: movq 0x10(%rcx), %rax <+2601>: movq %rax, 0x10(%rsp) <+2606>: movq (%rcx), %rax <+2609>: movq 0x8(%rcx), %rcx <+2613>: movq %rcx, 0x8(%rsp) <+2618>: movq %rax, (%rsp) <+2622>: movq %r13, %rdi <+2625>: callq 0x1096a9362 ; symbol stub for: CGContextClearRect <+2630>: andl $-0x3, %r14d <+2634>: movl %r14d, -0xf0(%rbp) <+2641>: callq 0x1096a9ed8 ; symbol stub for: pthread_self <+2646>: movq -0x130(%rbp), %r14 <+2653>: movq %rax, 0x168(%r14) <+2660>: movq -0x138(%rbp), %rbx <+2667>: movq %rbx, %rdi <+2670>: callq 0x1096a9ec0 ; symbol stub for: pthread_mutex_unlock <+2675>: movq %r13, %rdi <+2678>: movq 0x10(%rbp), %rsi <+2682>: callq *-0x148(%rbp) <+2688>: movq %rbx, %rdi <+2691>: callq 0x1096a9eb4 ; symbol stub for: pthread_mutex_lock <+2696>: movq $0x0, 0x168(%r14) <+2707>: movq %r13, %rdi <+2710>: callq 0x10956b186 ; CAReleaseCachedCGContext <+2715>: incl %r15d <+2718>: cmpl -0x110(%rbp), %r15d <+2725>: movl -0xf0(%rbp), %r14d <+2732>: jb 0x109568196 ; <+1945> <+2738>: movq -0x130(%rbp), %rbx <+2745>: leaq 0x158(%rbx), %rax <+2752>: movq -0x100(%rbp), %rcx <+2759>: lock <+2760>: incl 0x4(%rcx) <+2763>: movq -0x30(%rbp), %rdi <+2767>: movq -0x178(%rbp), %r13 <+2774>: movq $0x0, (%rax) <+2781>: testq %rdi, %rdi <+2784>: movq -0x138(%rbp), %r15 <+2791>: je 0x1095684eb ; <+2798> <+2793>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion <+2798>: testq %r13, %r13 <+2801>: je 0x1095684f8 ; <+2811> <+2803>: movq %r13, %rdi <+2806>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion <+2811>: movq -0xa0(%rbp), %rdi <+2818>: testq %rdi, %rdi <+2821>: je 0x109568509 ; <+2828> <+2823>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion <+2828>: movq %rbx, %rdi <+2831>: callq 0x109567917 ; CABackingStoreReleaseImages(CABackingStore*) <+2836>: xorl %eax, %eax <+2838>: movq 0x18(%rbp), %rdi <+2842>: testq %rdi, %rdi <+2845>: je 0x109568524 ; <+2855> <+2847>: movq (%rdi), %rax <+2850>: callq *0x48(%rax) <+2853>: incl %eax <+2855>: movq -0x140(%rbp), %rcx <+2862>: movl %eax, 0x20(%rcx) <+2865>: movq $0x0, 0x28(%rcx) <+2873>: movq $0x0, 0x160(%rbx) <+2884>: movb $0x6, 0x174(%rbx) <+2891>: addq $0x50, %rbx <+2895>: movq %rbx, %rdi <+2898>: callq 0x1096a9e6c ; symbol stub for: pthread_cond_broadcast <+2903>: movq %r15, %rdi <+2906>: callq 0x1096a9ec0 ; symbol stub for: pthread_mutex_unlock <+2911>: addq $0x198, %rsp <+2918>: popq %rbx <+2919>: popq %r12 <+2921>: popq %r13 <+2923>: popq %r14 <+2925>: popq %r15 <+2927>: popq %rbp <+2928>: retq <+2929>: movabsq $0x3ff0000000000000, %rax <+2939>: movq %rax, -0x70(%rbp) <+2943>: movq $0x0, -0x60(%rbp) <+2951>: movq $0x0, -0x68(%rbp) <+2959>: movabsq $-0x4010000000000000, %rax <+2969>: movq %rax, -0x58(%rbp) <+2973>: movq $0x0, -0x50(%rbp) <+2981>: movq -0xf8(%rbp), %rbx <+2988>: movd %rbx, %xmm0 <+2993>: punpckldq 0x1432aa(%rip), %xmm0 <+3001>: subpd 0x1432b2(%rip), %xmm0 <+3009>: haddpd %xmm0, %xmm0 <+3013>: movapd %xmm0, -0xf0(%rbp) <+3021>: movlpd %xmm0, -0x48(%rbp) <+3026>: movq -0x38(%rbp), %rdi <+3030>: leaq -0x70(%rbp), %rsi <+3034>: movss 0x1432c1(%rip), %xmm0 <+3042>: leaq -0x40(%rbp), %rdx <+3046>: callq 0x1096a972e ; symbol stub for: CGSTransformRegion <+3051>: movq -0x38(%rbp), %rdi <+3055>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion <+3060>: movapd -0xf0(%rbp), %xmm2 <+3068>: movq -0x40(%rbp), %rdi <+3072>: movq %rdi, -0x38(%rbp) <+3076>: movq %rbx, -0xf8(%rbp) <+3083>: movq -0xd8(%rbp), %xmm0 <+3091>: punpckldq 0x143248(%rip), %xmm0 <+3099>: subpd 0x143250(%rip), %xmm0 <+3107>: haddpd %xmm0, %xmm0 <+3111>: pxor %xmm1, %xmm1 <+3115>: movdqa %xmm1, -0x90(%rbp) <+3123>: movlpd %xmm0, -0x80(%rbp) <+3128>: movsd %xmm2, -0x78(%rbp) <+3133>: leaq -0x90(%rbp), %rsi <+3140>: callq 0x1096a9710 ; symbol stub for: CGSRectInRegion <+3145>: movb %al, %bl <+3147>: testb %bl, %bl <+3149>: jne 0x10956867e ; <+3201> <+3151>: movq -0x38(%rbp), %rdi <+3155>: leaq -0x90(%rbp), %rsi <+3162>: leaq -0x30(%rbp), %rdx <+3166>: callq 0x1096a96f8 ; symbol stub for: CGSIntersectRegionWithRect <+3171>: movq -0x30(%rbp), %rdi <+3175>: callq 0x1096a971c ; symbol stub for: CGSRegionIsEmpty <+3180>: testb %al, %al <+3182>: je 0x10956867e ; <+3201> <+3184>: movq -0x30(%rbp), %rdi <+3188>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion <+3193>: movq $0x0, -0x30(%rbp) <+3201>: movq -0x38(%rbp), %rdi <+3205>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion <+3210>: movq -0x30(%rbp), %rax <+3214>: testb %bl, %bl <+3216>: jne 0x109567b34 ; <+311> <+3222>: testq %rax, %rax <+3225>: je 0x109568554 ; <+2903> <+3231>: jmp 0x109567b34 ; <+311> <+3236>: callq 0x1096a9bb4 ; symbol stub for: abort