name
stringlengths
1
473k
code
stringlengths
7
647k
asm
stringlengths
4
3.39M
file
stringlengths
8
196
mbedtls_des3_crypt_cbc
int mbedtls_des3_crypt_cbc( mbedtls_des3_context *ctx, int mode, size_t length, unsigned char iv[8], const unsigned char *input, unsigned char *output ) { int i; unsigned char temp[8]; if( length % 8 ) return( MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH ); if( mode == MBEDTLS_DES_ENCRYPT ) { while( length > 0 ) { for( i = 0; i < 8; i++ ) output[i] = (unsigned char)( input[i] ^ iv[i] ); mbedtls_des3_crypt_ecb( ctx, output, output ); memcpy( iv, output, 8 ); input += 8; output += 8; length -= 8; } } else /* MBEDTLS_DES_DECRYPT */ { while( length > 0 ) { memcpy( temp, input, 8 ); mbedtls_des3_crypt_ecb( ctx, input, output ); for( i = 0; i < 8; i++ ) output[i] = (unsigned char)( output[i] ^ iv[i] ); memcpy( iv, temp, 8 ); input += 8; output += 8; length -= 8; } } return( 0 ); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r12 testb $0x7, %r12b je 0x5577 pushq $-0x32 popq %rax jmp 0x5604 movq %r9, %rbx movq %r8, %r14 movq %rcx, %r15 movq %rdi, %rbp cmpl $0x1, %esi jne 0x55c7 testq %r12, %r12 je 0x5602 xorl %eax, %eax cmpq $0x8, %rax je 0x55a5 movb (%r15,%rax), %cl xorb (%r14,%rax), %cl movb %cl, (%rbx,%rax) incq %rax jmp 0x558f movq %rbp, %rdi movq %rbx, %rsi movq %rbx, %rdx callq 0x50c4 movq (%rbx), %rax movq %rax, (%r15) addq $0x8, %r14 addq $0x8, %rbx addq $-0x8, %r12 jmp 0x5588 testq %r12, %r12 je 0x5602 movq (%r14), %r13 movq %rbp, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x50c4 xorl %eax, %eax cmpq $0x8, %rax je 0x55f1 movb (%r15,%rax), %cl xorb %cl, (%rbx,%rax) incq %rax jmp 0x55df movq %r13, (%r15) addq $0x8, %r14 addq $0x8, %rbx addq $-0x8, %r12 jmp 0x55c7 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/project-everest[P]mbedtls/library/des.c
mbedtls_des_self_test
int mbedtls_des_self_test( int verbose ) { int i, j, u, v, ret = 0; mbedtls_des_context ctx; mbedtls_des3_context ctx3; unsigned char buf[8]; #if defined(MBEDTLS_CIPHER_MODE_CBC) unsigned char prv[8]; unsigned char iv[8]; #endif mbedtls_des_init( &ctx ); mbedtls_des3_init( &ctx3 ); /* * ECB mode */ for( i = 0; i < 6; i++ ) { u = i >> 1; v = i & 1; if( verbose != 0 ) mbedtls_printf( " DES%c-ECB-%3d (%s): ", ( u == 0 ) ? ' ' : '3', 56 + u * 56, ( v == MBEDTLS_DES_DECRYPT ) ? "dec" : "enc" ); memcpy( buf, des3_test_buf, 8 ); switch( i ) { case 0: mbedtls_des_setkey_dec( &ctx, des3_test_keys ); break; case 1: mbedtls_des_setkey_enc( &ctx, des3_test_keys ); break; case 2: mbedtls_des3_set2key_dec( &ctx3, des3_test_keys ); break; case 3: mbedtls_des3_set2key_enc( &ctx3, des3_test_keys ); break; case 4: mbedtls_des3_set3key_dec( &ctx3, des3_test_keys ); break; case 5: mbedtls_des3_set3key_enc( &ctx3, des3_test_keys ); break; default: return( 1 ); } for( j = 0; j < 10000; j++ ) { if( u == 0 ) mbedtls_des_crypt_ecb( &ctx, buf, buf ); else mbedtls_des3_crypt_ecb( &ctx3, buf, buf ); } if( ( v == MBEDTLS_DES_DECRYPT && memcmp( buf, des3_test_ecb_dec[u], 8 ) != 0 ) || ( v != MBEDTLS_DES_DECRYPT && memcmp( buf, des3_test_ecb_enc[u], 8 ) != 0 ) ) { if( verbose != 0 ) mbedtls_printf( "failed\n" ); ret = 1; goto exit; } if( verbose != 0 ) mbedtls_printf( "passed\n" ); } if( verbose != 0 ) mbedtls_printf( "\n" ); #if defined(MBEDTLS_CIPHER_MODE_CBC) /* * CBC mode */ for( i = 0; i < 6; i++ ) { u = i >> 1; v = i & 1; if( verbose != 0 ) mbedtls_printf( " DES%c-CBC-%3d (%s): ", ( u == 0 ) ? ' ' : '3', 56 + u * 56, ( v == MBEDTLS_DES_DECRYPT ) ? "dec" : "enc" ); memcpy( iv, des3_test_iv, 8 ); memcpy( prv, des3_test_iv, 8 ); memcpy( buf, des3_test_buf, 8 ); switch( i ) { case 0: mbedtls_des_setkey_dec( &ctx, des3_test_keys ); break; case 1: mbedtls_des_setkey_enc( &ctx, des3_test_keys ); break; case 2: mbedtls_des3_set2key_dec( &ctx3, des3_test_keys ); break; case 3: mbedtls_des3_set2key_enc( &ctx3, des3_test_keys ); break; case 4: mbedtls_des3_set3key_dec( &ctx3, des3_test_keys ); break; case 5: mbedtls_des3_set3key_enc( &ctx3, des3_test_keys ); break; default: return( 1 ); } if( v == MBEDTLS_DES_DECRYPT ) { for( j = 0; j < 10000; j++ ) { if( u == 0 ) mbedtls_des_crypt_cbc( &ctx, v, 8, iv, buf, buf ); else mbedtls_des3_crypt_cbc( &ctx3, v, 8, iv, buf, buf ); } } else { for( j = 0; j < 10000; j++ ) { unsigned char tmp[8]; if( u == 0 ) mbedtls_des_crypt_cbc( &ctx, v, 8, iv, buf, buf ); else mbedtls_des3_crypt_cbc( &ctx3, v, 8, iv, buf, buf ); memcpy( tmp, prv, 8 ); memcpy( prv, buf, 8 ); memcpy( buf, tmp, 8 ); } memcpy( buf, prv, 8 ); } if( ( v == MBEDTLS_DES_DECRYPT && memcmp( buf, des3_test_cbc_dec[u], 8 ) != 0 ) || ( v != MBEDTLS_DES_DECRYPT && memcmp( buf, des3_test_cbc_enc[u], 8 ) != 0 ) ) { if( verbose != 0 ) mbedtls_printf( "failed\n" ); ret = 1; goto exit; } if( verbose != 0 ) mbedtls_printf( "passed\n" ); } #endif /* MBEDTLS_CIPHER_MODE_CBC */ if( verbose != 0 ) mbedtls_printf( "\n" ); exit: mbedtls_des_free( &ctx ); mbedtls_des3_free( &ctx3 ); return( ret ); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x238, %rsp # imm = 0x238 movl %edi, 0xc(%rsp) xorps %xmm0, %xmm0 leaq 0x30(%rsp), %rbx movaps %xmm0, (%rbx) movaps %xmm0, 0x10(%rbx) movaps %xmm0, 0x20(%rbx) movaps %xmm0, 0x30(%rbx) movaps %xmm0, 0x40(%rbx) movaps %xmm0, 0x50(%rbx) movaps %xmm0, 0x60(%rbx) movaps %xmm0, 0x70(%rbx) leaq 0xb8(%rsp), %r14 movl $0x180, %edx # imm = 0x180 movq %r14, %rdi xorl %esi, %esi callq 0x20d0 leaq 0x10(%rsp), %r13 xorl %ebp, %ebp cmpl $0x6, %ebp je 0x57b2 movl %ebp, %r15d shrl %r15d cmpl $0x0, 0xc(%rsp) je 0x56ba cmpl $0x2, %ebp pushq $0x33 popq %rsi pushq $0x20 popq %rax cmovbl %eax, %esi imull $0x38, %r15d, %edx addl $0x38, %edx testb $0x1, %bpl leaq 0x1c22(%rip), %rcx # 0x72c3 leaq 0x1c17(%rip), %rax # 0x72bf cmoveq %rax, %rcx leaq 0x1bf5(%rip), %rdi # 0x72a8 xorl %eax, %eax callq 0x20a0 movabsq $0x7420736920776f4e, %rax # imm = 0x7420736920776F4E movq %rax, 0x10(%rsp) movl %ebp, %eax leaq 0x118e(%rip), %rcx # 0x6860 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq %rbx, %rdi leaq 0x1b2b(%rip), %rsi # 0x7210 callq 0x4b94 jmp 0x573f movq %r14, %rdi leaq 0x1b1a(%rip), %rsi # 0x7210 callq 0x4d89 jmp 0x573f movq %r14, %rdi leaq 0x1b09(%rip), %rsi # 0x7210 callq 0x4c8a jmp 0x573f movq %r14, %rdi leaq 0x1af8(%rip), %rsi # 0x7210 callq 0x4bcf jmp 0x573f movq %rbx, %rdi leaq 0x1ae7(%rip), %rsi # 0x7210 callq 0x4720 jmp 0x573f movq %r14, %rdi leaq 0x1ad6(%rip), %rsi # 0x7210 callq 0x4cbb movl $0x2710, %r12d # imm = 0x2710 subl $0x1, %r12d jb 0x5770 cmpl $0x1, %ebp ja 0x5760 movq %rbx, %rdi movq %r13, %rsi movq %r13, %rdx callq 0x4dba jmp 0x5745 movq %r14, %rdi movq %r13, %rsi movq %r13, %rdx callq 0x50c4 jmp 0x5745 movl %r15d, %eax movq 0x10(%rsp), %rcx testb $0x1, %bpl jne 0x5787 leaq 0x1aab(%rip), %rdx # 0x7230 jmp 0x578e leaq 0x1ac2(%rip), %rdx # 0x7250 cmpq (%rdx,%rax,8), %rcx jne 0x59d1 cmpl $0x0, 0xc(%rsp) je 0x57ab leaq 0x1b38(%rip), %rdi # 0x72de callq 0x2070 incl %ebp jmp 0x566d cmpl $0x0, 0xc(%rsp) je 0x57c1 pushq $0xa popq %rdi callq 0x2040 movabsq $-0x1032546f87a9cbee, %rbp # imm = 0xEFCDAB9078563412 pushq $0x8 popq %r12 leaq 0x28(%rsp), %r13 leaq 0x10(%rsp), %r14 pushq $0x1 popq %rax movl %eax, 0x1c(%rsp) xorl %r15d, %r15d cmpl $0x6, %r15d je 0x59ed movl %r15d, %ebx shrl %ebx cmpl $0x0, 0xc(%rsp) je 0x5830 cmpl $0x2, %r15d pushq $0x33 popq %rsi pushq $0x20 popq %rax cmovbl %eax, %esi imull $0x38, %ebx, %edx addl $0x38, %edx testb $0x1, %r15b leaq 0x1aac(%rip), %rcx # 0x72c3 leaq 0x1aa1(%rip), %rax # 0x72bf cmoveq %rax, %rcx leaq 0x1a9e(%rip), %rdi # 0x72c7 xorl %eax, %eax callq 0x20a0 movq %rbp, 0x28(%rsp) movabsq $0x7420736920776f4e, %rax # imm = 0x7420736920776F4E movq %rax, 0x10(%rsp) movl %r15d, %eax leaq 0x102a(%rip), %rcx # 0x6878 movslq (%rcx,%rax,4), %rax addq %rcx, %rax movl %ebx, %ecx movq %rcx, 0x20(%rsp) jmpq *%rax leaq 0x30(%rsp), %rdi leaq 0x19a6(%rip), %rsi # 0x7210 callq 0x4b94 jmp 0x589b leaq 0xb8(%rsp), %rdi leaq 0x1990(%rip), %rsi # 0x7210 callq 0x4d89 jmp 0x589b leaq 0xb8(%rsp), %rdi leaq 0x197a(%rip), %rsi # 0x7210 callq 0x4c8a movl $0x2710, %ebx # imm = 0x2710 subl $0x1, %ebx jb 0x58e2 cmpl $0x1, %r15d ja 0x58c5 leaq 0x30(%rsp), %rdi xorl %esi, %esi movq %r12, %rdx movq %r13, %rcx movq %r14, %r8 movq %r14, %r9 callq 0x500c jmp 0x58a0 leaq 0xb8(%rsp), %rdi xorl %esi, %esi movq %r12, %rdx movq %r13, %rcx movq %r14, %r8 movq %r14, %r9 callq 0x555b jmp 0x58a0 movq 0x10(%rsp), %rax leaq 0x1982(%rip), %rcx # 0x7270 movq 0x20(%rsp), %rdx cmpq (%rcx,%rdx,8), %rax je 0x59b6 jmp 0x59d8 leaq 0xb8(%rsp), %rdi leaq 0x18ff(%rip), %rsi # 0x7210 callq 0x4bcf jmp 0x593f leaq 0x30(%rsp), %rdi leaq 0x18ec(%rip), %rsi # 0x7210 callq 0x4720 jmp 0x593f leaq 0xb8(%rsp), %rdi leaq 0x18d6(%rip), %rsi # 0x7210 callq 0x4cbb movl $0x2710, %ebx # imm = 0x2710 subl $0x1, %ebx jb 0x5995 cmpl $0x1, %r15d ja 0x596a leaq 0x30(%rsp), %rdi pushq $0x1 popq %rsi movq %r12, %rdx movq %r13, %rcx movq %r14, %r8 movq %r14, %r9 callq 0x500c jmp 0x5986 leaq 0xb8(%rsp), %rdi pushq $0x1 popq %rsi movq %r12, %rdx movq %r13, %rcx movq %r14, %r8 movq %r14, %r9 callq 0x555b movq 0x10(%rsp), %rax movq %rbp, 0x10(%rsp) movq %rax, %rbp jmp 0x5944 movq %rbp, 0x10(%rsp) leaq 0x18ef(%rip), %rax # 0x7290 movq 0x20(%rsp), %rcx cmpq (%rax,%rcx,8), %rbp movabsq $-0x1032546f87a9cbee, %rbp # imm = 0xEFCDAB9078563412 jne 0x59d8 cmpl $0x0, 0xc(%rsp) je 0x59c9 leaq 0x191a(%rip), %rdi # 0x72de callq 0x2070 incl %r15d jmp 0x57e3 pushq $0x1 popq %rax movl %eax, 0x1c(%rsp) cmpl $0x0, 0xc(%rsp) je 0x5a04 leaq 0x18ff(%rip), %rdi # 0x72e5 callq 0x2070 jmp 0x5a04 movl $0x0, 0x1c(%rsp) cmpl $0x0, 0xc(%rsp) je 0x5a04 pushq $0xa popq %rdi callq 0x2040 leaq 0x30(%rsp), %rdi callq 0x4673 leaq 0xb8(%rsp), %rdi callq 0x469d movl 0x1c(%rsp), %eax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/project-everest[P]mbedtls/library/des.c
main
int main() { diy::MemoryBuffer bb; std::cout << "Position: " << bb.position << std::endl; { std::vector<Point> points; Point p; p[0] = p[1] = p[2] = 5; points.push_back(p); p[0] = 1; points.push_back(p); p[2] = 1; points.push_back(p); save(bb, points); } std::cout << "Position: " << bb.position << std::endl; { std::vector<PointVec> points; PointVec p(3); points.push_back(p); p[0] = 2; points.push_back(p); p[2] = 2; points.push_back(p); save(bb, points); } std::cout << "Position: " << bb.position << std::endl; bb.reset(); std::cout << "Position: " << bb.position << std::endl; { std::vector<Point> points; load(bb, points); for (unsigned i = 0; i < points.size(); ++i) { for (unsigned j = 0; j < 3; ++j) std::cout << points[i][j] << ' '; std::cout << std::endl; } } std::cout << "Position: " << bb.position << std::endl; { std::vector<PointVec> points; load(bb, points); for (unsigned i = 0; i < points.size(); ++i) { for (unsigned j = 0; j < 3; ++j) std::cout << points[i][j] << ' '; std::cout << std::endl; } } std::cout << "Position: " << bb.position << std::endl; }
subq $0x1d8, %rsp # imm = 0x1D8 movl $0x0, 0x1d4(%rsp) xorl %eax, %eax movl %eax, %esi leaq 0x188(%rsp), %rdi callq 0x2a30 movq 0x10cde(%rip), %rdi # 0x12fd8 leaq 0xad47(%rip), %rsi # 0xd048 callq 0x20d0 movq %rax, 0xd8(%rsp) jmp 0x2310 movq 0xd8(%rsp), %rdi movq 0x190(%rsp), %rsi callq 0x2040 movq %rax, 0xd0(%rsp) jmp 0x232f movq 0xd0(%rsp), %rdi movq 0x10c8a(%rip), %rsi # 0x12fc8 callq 0x2100 jmp 0x2345 leaq 0x160(%rsp), %rdi callq 0x2a90 leaq 0x154(%rsp), %rdi movl $0x2, %esi callq 0x2aa0 movq %rax, 0xc8(%rsp) jmp 0x236e movq 0xc8(%rsp), %rax movl $0x5, (%rax) leaq 0x154(%rsp), %rdi movl $0x1, %esi callq 0x2aa0 movq %rax, 0xc0(%rsp) jmp 0x2398 movq 0xc0(%rsp), %rax movl $0x5, (%rax) leaq 0x154(%rsp), %rdi xorl %esi, %esi callq 0x2aa0 movq %rax, 0xb8(%rsp) jmp 0x23bf movq 0xb8(%rsp), %rax movl $0x5, (%rax) leaq 0x160(%rsp), %rdi leaq 0x154(%rsp), %rsi callq 0x2ac0 jmp 0x23e4 leaq 0x154(%rsp), %rdi xorl %esi, %esi callq 0x2aa0 movq %rax, 0xb0(%rsp) jmp 0x23fd movq 0xb0(%rsp), %rax movl $0x1, (%rax) leaq 0x160(%rsp), %rdi leaq 0x154(%rsp), %rsi callq 0x2ac0 jmp 0x2422 leaq 0x154(%rsp), %rdi movl $0x2, %esi callq 0x2aa0 movq %rax, 0xa8(%rsp) jmp 0x243e movq 0xa8(%rsp), %rax movl $0x1, (%rax) leaq 0x160(%rsp), %rdi leaq 0x154(%rsp), %rsi callq 0x2ac0 jmp 0x2463 leaq 0x188(%rsp), %rdi leaq 0x160(%rsp), %rsi callq 0x2b30 jmp 0x247a leaq 0x160(%rsp), %rdi callq 0x2b60 movq 0x10b4a(%rip), %rdi # 0x12fd8 leaq 0xabb3(%rip), %rsi # 0xd048 callq 0x20d0 movq %rax, 0xa0(%rsp) jmp 0x24a4 movq 0xa0(%rsp), %rdi movq 0x190(%rsp), %rsi callq 0x2040 movq %rax, 0x98(%rsp) jmp 0x24c3 movq 0x98(%rsp), %rdi movq 0x10af6(%rip), %rsi # 0x12fc8 callq 0x2100 jmp 0x24d9 leaq 0x138(%rsp), %rdi callq 0x2bc0 leaq 0x120(%rsp), %rdi movl $0x3, %esi callq 0x2bd0 jmp 0x24fa leaq 0x138(%rsp), %rdi leaq 0x120(%rsp), %rsi callq 0x2c50 jmp 0x2511 xorl %eax, %eax movl %eax, %esi leaq 0x120(%rsp), %rdi callq 0x2cc0 movq %rax, 0x90(%rsp) jmp 0x252c movq 0x90(%rsp), %rax movl $0x2, (%rax) leaq 0x138(%rsp), %rdi leaq 0x120(%rsp), %rsi callq 0x2c50 jmp 0x2551 leaq 0x120(%rsp), %rdi movl $0x2, %esi callq 0x2cc0 movq %rax, 0x88(%rsp) jmp 0x256d movq 0x88(%rsp), %rax movl $0x2, (%rax) leaq 0x138(%rsp), %rdi leaq 0x120(%rsp), %rsi callq 0x2c50 jmp 0x2592 leaq 0x188(%rsp), %rdi leaq 0x138(%rsp), %rsi callq 0x2cf0 jmp 0x25a9 leaq 0x120(%rsp), %rdi callq 0x2d20 leaq 0x138(%rsp), %rdi callq 0x2d30 movq 0x10a0e(%rip), %rdi # 0x12fd8 leaq 0xaa77(%rip), %rsi # 0xd048 callq 0x20d0 movq %rax, 0x80(%rsp) jmp 0x25e0 movq 0x80(%rsp), %rdi movq 0x190(%rsp), %rsi callq 0x2040 movq %rax, 0x78(%rsp) jmp 0x25fc movq 0x78(%rsp), %rdi movq 0x109c0(%rip), %rsi # 0x12fc8 callq 0x2100 jmp 0x260f leaq 0x188(%rsp), %rdi callq 0x2d90 jmp 0x261e movq 0x109b3(%rip), %rdi # 0x12fd8 leaq 0xaa1c(%rip), %rsi # 0xd048 callq 0x20d0 movq %rax, 0x70(%rsp) jmp 0x2638 movq 0x70(%rsp), %rdi movq 0x190(%rsp), %rsi callq 0x2040 movq %rax, 0x68(%rsp) jmp 0x2651 movq 0x68(%rsp), %rdi movq 0x1096b(%rip), %rsi # 0x12fc8 callq 0x2100 jmp 0x2664 leaq 0x108(%rsp), %rdi movq %rdi, 0x60(%rsp) callq 0x2a90 movq 0x60(%rsp), %rsi leaq 0x188(%rsp), %rdi callq 0x2db0 jmp 0x268a movl $0x0, 0x104(%rsp) movl 0x104(%rsp), %eax movq %rax, 0x58(%rsp) leaq 0x108(%rsp), %rdi callq 0x2de0 movq %rax, %rcx movq 0x58(%rsp), %rax cmpq %rcx, %rax jae 0x281f movl $0x0, 0x100(%rsp) cmpl $0x3, 0x100(%rsp) jae 0x27f2 movl 0x104(%rsp), %eax movl %eax, %esi leaq 0x108(%rsp), %rdi callq 0x2e00 movq %rax, %rdi movl 0x100(%rsp), %esi callq 0x2aa0 movq %rax, 0x50(%rsp) jmp 0x2704 movq 0x50(%rsp), %rax movl (%rax), %esi movq 0x108c6(%rip), %rdi # 0x12fd8 callq 0x2170 movq %rax, 0x48(%rsp) jmp 0x271e movq 0x48(%rsp), %rdi movl $0x20, %esi callq 0x2110 jmp 0x272f jmp 0x2731 movl 0x100(%rsp), %eax addl $0x1, %eax movl %eax, 0x100(%rsp) jmp 0x26ca movq %rax, %rcx movl %edx, %eax movq %rcx, 0x180(%rsp) movl %eax, 0x17c(%rsp) jmp 0x2a16 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x180(%rsp) movl %eax, 0x17c(%rsp) leaq 0x160(%rsp), %rdi callq 0x2b60 jmp 0x2a16 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x180(%rsp) movl %eax, 0x17c(%rsp) jmp 0x27ba movq %rax, %rcx movl %edx, %eax movq %rcx, 0x180(%rsp) movl %eax, 0x17c(%rsp) leaq 0x120(%rsp), %rdi callq 0x2d20 leaq 0x138(%rsp), %rdi callq 0x2d30 jmp 0x2a16 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x180(%rsp) movl %eax, 0x17c(%rsp) leaq 0x108(%rsp), %rdi callq 0x2b60 jmp 0x2a16 movq 0x107df(%rip), %rdi # 0x12fd8 movq 0x107c8(%rip), %rsi # 0x12fc8 callq 0x2100 jmp 0x2807 jmp 0x2809 movl 0x104(%rsp), %eax addl $0x1, %eax movl %eax, 0x104(%rsp) jmp 0x2695 leaq 0x108(%rsp), %rdi callq 0x2b60 movq 0x107a5(%rip), %rdi # 0x12fd8 leaq 0xa80e(%rip), %rsi # 0xd048 callq 0x20d0 movq %rax, 0x40(%rsp) jmp 0x2846 movq 0x40(%rsp), %rdi movq 0x190(%rsp), %rsi callq 0x2040 movq %rax, 0x38(%rsp) jmp 0x285f movq 0x38(%rsp), %rdi movq 0x1075d(%rip), %rsi # 0x12fc8 callq 0x2100 jmp 0x2872 leaq 0xe8(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0x2bc0 movq 0x30(%rsp), %rsi leaq 0x188(%rsp), %rdi callq 0x2e20 jmp 0x2898 movl $0x0, 0xe4(%rsp) movl 0xe4(%rsp), %eax movq %rax, 0x28(%rsp) leaq 0xe8(%rsp), %rdi callq 0x2e50 movq %rax, %rcx movq 0x28(%rsp), %rax cmpq %rcx, %rax jae 0x29a7 movl $0x0, 0xe0(%rsp) cmpl $0x3, 0xe0(%rsp) jae 0x297a movl 0xe4(%rsp), %eax movl %eax, %esi leaq 0xe8(%rsp), %rdi callq 0x2e70 movq %rax, %rdi movl 0xe0(%rsp), %eax movl %eax, %esi callq 0x2cc0 movq %rax, 0x20(%rsp) jmp 0x2914 movq 0x20(%rsp), %rax movl (%rax), %esi movq 0x106b6(%rip), %rdi # 0x12fd8 callq 0x2170 movq %rax, 0x18(%rsp) jmp 0x292e movq 0x18(%rsp), %rdi movl $0x20, %esi callq 0x2110 jmp 0x293f jmp 0x2941 movl 0xe0(%rsp), %eax addl $0x1, %eax movl %eax, 0xe0(%rsp) jmp 0x28d8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x180(%rsp) movl %eax, 0x17c(%rsp) leaq 0xe8(%rsp), %rdi callq 0x2d30 jmp 0x2a16 movq 0x10657(%rip), %rdi # 0x12fd8 movq 0x10640(%rip), %rsi # 0x12fc8 callq 0x2100 jmp 0x298f jmp 0x2991 movl 0xe4(%rsp), %eax addl $0x1, %eax movl %eax, 0xe4(%rsp) jmp 0x28a3 leaq 0xe8(%rsp), %rdi callq 0x2d30 movq 0x1061d(%rip), %rdi # 0x12fd8 leaq 0xa686(%rip), %rsi # 0xd048 callq 0x20d0 movq %rax, 0x10(%rsp) jmp 0x29ce movq 0x10(%rsp), %rdi movq 0x190(%rsp), %rsi callq 0x2040 movq %rax, 0x8(%rsp) jmp 0x29e7 movq 0x8(%rsp), %rdi movq 0x105d5(%rip), %rsi # 0x12fc8 callq 0x2100 jmp 0x29fa leaq 0x188(%rsp), %rdi callq 0x2e90 movl 0x1d4(%rsp), %eax addq $0x1d8, %rsp # imm = 0x1D8 retq leaq 0x188(%rsp), %rdi callq 0x2e90 movq 0x180(%rsp), %rdi callq 0x2180
/diatomic[P]diy/examples/serialization/test-serialization.cpp
PropTestSlowFunction::check(std::vector<int, std::allocator<int>> const&) const
bool check(const std::vector<int>& v) const override { if (shrinking) { std::cout << "Sleeping..." << std::endl; std::this_thread::sleep_for(std::chrono::seconds(1)); } if (v.size() >= 4 && (v[3] % 5) == 1) { shrinking = true; return false; } return true; }
subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rdi movq %rdi, 0x8(%rsp) addq $0x10, %rdi callq 0x26070 testb $0x1, %al jne 0x1e857 jmp 0x1e89a movq 0x1675a(%rip), %rdi # 0x34fb8 leaq 0xdbb0(%rip), %rsi # 0x2c415 callq 0x1d210 movq %rax, %rdi movq 0x16734(%rip), %rsi # 0x34fa8 callq 0x1d250 movl $0x1, 0x14(%rsp) leaq 0x18(%rsp), %rdi leaq 0x14(%rsp), %rsi callq 0x261e0 leaq 0x18(%rsp), %rdi callq 0x26110 movq 0x20(%rsp), %rdi callq 0x1fc90 cmpq $0x4, %rax jb 0x1e8e2 movq 0x20(%rsp), %rdi movl $0x3, %esi callq 0x20d10 movl (%rax), %eax movl $0x5, %ecx cltd idivl %ecx cmpl $0x1, %edx jne 0x1e8e2 movq 0x8(%rsp), %rdi addq $0x10, %rdi movl $0x1, %esi callq 0x26200 movb $0x0, 0x37(%rsp) jmp 0x1e8e7 movb $0x1, 0x37(%rsp) movb 0x37(%rsp), %al andb $0x1, %al addq $0x38, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax)
/philipp-classen[P]CppQuickCheck/examples/src/TestSlowShrinking.cpp
roaring_bitmap_maximum
uint32_t roaring_bitmap_maximum(const roaring_bitmap_t *bm) { if (bm->high_low_container.size > 0) { container_t *container = bm->high_low_container.containers[bm->high_low_container.size - 1]; uint8_t typecode = bm->high_low_container.typecodes[bm->high_low_container.size - 1]; uint32_t key = bm->high_low_container.keys[bm->high_low_container.size - 1]; uint32_t lowvalue = container_maximum(container, typecode); return lowvalue | (key << 16); } return 0; }
subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax cmpl $0x0, (%rax) jle 0x14e8a movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq 0x18(%rsp), %rcx movl (%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rax movq 0x18(%rax), %rax movq 0x18(%rsp), %rcx movl (%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx movb (%rax,%rcx), %al movb %al, 0xf(%rsp) movq 0x18(%rsp), %rax movq 0x10(%rax), %rax movq 0x18(%rsp), %rcx movl (%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx movzwl (%rax,%rcx,2), %eax movl %eax, 0x8(%rsp) movq 0x10(%rsp), %rdi movzbl 0xf(%rsp), %esi callq 0x1b680 movzwl %ax, %eax movl %eax, 0x4(%rsp) movl 0x4(%rsp), %eax movl 0x8(%rsp), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, 0x24(%rsp) jmp 0x14e92 movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopl (%rax,%rax)
/RoaringBitmap[P]CRoaring/src/roaring.c
roaring_bitmap_remove
void roaring_bitmap_remove(roaring_bitmap_t *r, uint32_t val) { const uint16_t hb = val >> 16; const int i = ra_get_index(&r->high_low_container, hb); uint8_t typecode; if (i >= 0) { ra_unshare_container_at_index(&r->high_low_container, (uint16_t)i); container_t *container = ra_get_container_at_index( &r->high_low_container, (uint16_t)i, &typecode); uint8_t newtypecode = typecode; container_t *container2 = container_remove(container, val & 0xFFFF, typecode, &newtypecode); if (container2 != container) { container_free(container, typecode); ra_set_container_at_index(&r->high_low_container, i, container2, newtypecode); } if (container_nonzero_cardinality(container2, newtypecode)) { ra_set_container_at_index(&r->high_low_container, i, container2, newtypecode); } else { ra_remove_at_index_and_free(&r->high_low_container, i); } } }
subq $0x38, %rsp movq %rdi, 0x30(%rsp) movl %esi, 0x2c(%rsp) movl 0x2c(%rsp), %eax shrl $0x10, %eax movw %ax, 0x2a(%rsp) movq 0x30(%rsp), %rdi movzwl 0x2a(%rsp), %esi callq 0x226e0 movl %eax, 0x24(%rsp) cmpl $0x0, 0x24(%rsp) jl 0x15712 movq 0x30(%rsp), %rdi movl 0x24(%rsp), %eax movzwl %ax, %esi callq 0x14080 movq 0x30(%rsp), %rdi movl 0x24(%rsp), %eax leaq 0x23(%rsp), %rdx movzwl %ax, %esi callq 0x22760 movq %rax, 0x18(%rsp) movb 0x23(%rsp), %al movb %al, 0x17(%rsp) movq 0x18(%rsp), %rdi movl 0x2c(%rsp), %eax andl $0xffff, %eax # imm = 0xFFFF leaq 0x17(%rsp), %rcx movzwl %ax, %esi movzbl 0x23(%rsp), %edx callq 0x15720 movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax cmpq 0x18(%rsp), %rax je 0x156d3 movq 0x18(%rsp), %rdi movzbl 0x23(%rsp), %esi callq 0x6f3b0 movq 0x30(%rsp), %rdi movl 0x24(%rsp), %esi movq 0x8(%rsp), %rdx movzbl 0x17(%rsp), %ecx callq 0x22860 movq 0x8(%rsp), %rdi movzbl 0x17(%rsp), %esi callq 0x15820 testb $0x1, %al jne 0x156e8 jmp 0x15702 movq 0x30(%rsp), %rdi movl 0x24(%rsp), %esi movq 0x8(%rsp), %rdx movzbl 0x17(%rsp), %ecx callq 0x22860 jmp 0x15710 movq 0x30(%rsp), %rdi movl 0x24(%rsp), %esi callq 0x23ac0 jmp 0x15712 addq $0x38, %rsp retq nopw (%rax,%rax)
/RoaringBitmap[P]CRoaring/src/roaring.c
container_nonzero_cardinality
static inline bool container_nonzero_cardinality(const container_t *c, uint8_t typecode) { c = container_unwrap_shared(c, &typecode); switch (typecode) { case BITSET_CONTAINER_TYPE: return bitset_container_const_nonzero_cardinality( const_CAST_bitset(c)); case ARRAY_CONTAINER_TYPE: return array_container_nonzero_cardinality(const_CAST_array(c)); case RUN_CONTAINER_TYPE: return run_container_nonzero_cardinality(const_CAST_run(c)); } assert(false); roaring_unreachable; return 0; // unreached }
subq $0x18, %rsp movb %sil, %al movq %rdi, 0x8(%rsp) movb %al, 0x7(%rsp) movq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rsi callq 0x1cc50 movq %rax, 0x8(%rsp) movzbl 0x7(%rsp), %eax movl %eax, (%rsp) subl $0x1, %eax je 0x1585f jmp 0x15853 movl (%rsp), %eax subl $0x2, %eax je 0x15871 jmp 0x1585d jmp 0x15883 movq 0x8(%rsp), %rdi callq 0x21b40 andb $0x1, %al movb %al, 0x17(%rsp) jmp 0x15895 movq 0x8(%rsp), %rdi callq 0x21b60 andb $0x1, %al movb %al, 0x17(%rsp) jmp 0x15895 movq 0x8(%rsp), %rdi callq 0x21b80 andb $0x1, %al movb %al, 0x17(%rsp) jmp 0x15895 movb 0x17(%rsp), %al andb $0x1, %al addq $0x18, %rsp retq
/RoaringBitmap[P]CRoaring/include/roaring/containers/containers.h
roaring_bitmap_andnot_inplace
void roaring_bitmap_andnot_inplace(roaring_bitmap_t *x1, const roaring_bitmap_t *x2) { assert(x1 != x2); uint8_t result_type = 0; int length1 = x1->high_low_container.size; const int length2 = x2->high_low_container.size; int intersection_size = 0; if (0 == length2) return; if (0 == length1) { roaring_bitmap_clear(x1); return; } int pos1 = 0, pos2 = 0; uint8_t type1, type2; uint16_t s1 = ra_get_key_at_index(&x1->high_low_container, (uint16_t)pos1); uint16_t s2 = ra_get_key_at_index(&x2->high_low_container, (uint16_t)pos2); while (true) { if (s1 == s2) { container_t *c1 = ra_get_container_at_index(&x1->high_low_container, (uint16_t)pos1, &type1); container_t *c2 = ra_get_container_at_index(&x2->high_low_container, (uint16_t)pos2, &type2); // We do the computation "in place" only when c1 is not a shared // container. Rationale: using a shared container safely with in // place computation would require making a copy and then doing the // computation in place which is likely less efficient than avoiding // in place entirely and always generating a new container. container_t *c; if (type1 == SHARED_CONTAINER_TYPE) { c = container_andnot(c1, type1, c2, type2, &result_type); shared_container_free(CAST_shared(c1)); // release } else { c = container_iandnot(c1, type1, c2, type2, &result_type); } if (container_nonzero_cardinality(c, result_type)) { ra_replace_key_and_container_at_index(&x1->high_low_container, intersection_size++, s1, c, result_type); } else { container_free(c, result_type); } ++pos1; ++pos2; if (pos1 == length1) break; if (pos2 == length2) break; s1 = ra_get_key_at_index(&x1->high_low_container, (uint16_t)pos1); s2 = ra_get_key_at_index(&x2->high_low_container, (uint16_t)pos2); } else if (s1 < s2) { // s1 < s2 if (pos1 != intersection_size) { container_t *c1 = ra_get_container_at_index( &x1->high_low_container, (uint16_t)pos1, &type1); ra_replace_key_and_container_at_index( &x1->high_low_container, intersection_size, s1, c1, type1); } intersection_size++; pos1++; if (pos1 == length1) break; s1 = ra_get_key_at_index(&x1->high_low_container, (uint16_t)pos1); } else { // s1 > s2 pos2 = ra_advance_until(&x2->high_low_container, s1, pos2); if (pos2 == length2) break; s2 = ra_get_key_at_index(&x2->high_low_container, (uint16_t)pos2); } } if (pos1 < length1) { // all containers between intersection_size and // pos1 are junk. However, they have either been moved // (thus still referenced) or involved in an iandnot // that will clean up all containers that could not be reused. // Thus we should not free the junk containers between // intersection_size and pos1. if (pos1 > intersection_size) { // left slide of remaining items ra_copy_range(&x1->high_low_container, pos1, length1, intersection_size); } // else current placement is fine intersection_size += (length1 - pos1); } ra_downsize(&x1->high_low_container, intersection_size); }
subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movb $0x0, 0x47(%rsp) movq 0x50(%rsp), %rax movl (%rax), %eax movl %eax, 0x40(%rsp) movq 0x48(%rsp), %rax movl (%rax), %eax movl %eax, 0x3c(%rsp) movl $0x0, 0x38(%rsp) xorl %eax, %eax cmpl 0x3c(%rsp), %eax jne 0x19efe jmp 0x1a1cb xorl %eax, %eax cmpl 0x40(%rsp), %eax jne 0x19f15 movq 0x50(%rsp), %rdi callq 0x15380 jmp 0x1a1cb movl $0x0, 0x34(%rsp) movl $0x0, 0x30(%rsp) movq 0x50(%rsp), %rdi movl 0x34(%rsp), %eax movzwl %ax, %esi callq 0x23760 movw %ax, 0x2c(%rsp) movq 0x48(%rsp), %rdi movl 0x30(%rsp), %eax movzwl %ax, %esi callq 0x23760 movw %ax, 0x2a(%rsp) movzwl 0x2c(%rsp), %eax movzwl 0x2a(%rsp), %ecx cmpl %ecx, %eax jne 0x1a0ae movq 0x50(%rsp), %rdi movl 0x34(%rsp), %eax leaq 0x2f(%rsp), %rdx movzwl %ax, %esi callq 0x22760 movq %rax, 0x20(%rsp) movq 0x48(%rsp), %rdi movl 0x30(%rsp), %eax leaq 0x2e(%rsp), %rdx movzwl %ax, %esi callq 0x22760 movq %rax, 0x18(%rsp) movzbl 0x2f(%rsp), %eax cmpl $0x4, %eax jne 0x19fd4 movq 0x20(%rsp), %rdi movb 0x2f(%rsp), %al movq 0x18(%rsp), %rdx leaq 0x47(%rsp), %r8 movzbl %al, %esi movzbl 0x2e(%rsp), %ecx callq 0x19bc0 movq %rax, 0x10(%rsp) movq 0x20(%rsp), %rdi callq 0x6f420 jmp 0x19ff9 movq 0x20(%rsp), %rdi movb 0x2f(%rsp), %al movq 0x18(%rsp), %rdx leaq 0x47(%rsp), %r8 movzbl %al, %esi movzbl 0x2e(%rsp), %ecx callq 0x1a1d0 movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rdi movzbl 0x47(%rsp), %esi callq 0x15820 testb $0x1, %al jne 0x1a00e jmp 0x1a03a movq 0x50(%rsp), %rdi movl 0x38(%rsp), %esi movl %esi, %eax addl $0x1, %eax movl %eax, 0x38(%rsp) movw 0x2c(%rsp), %ax movq 0x10(%rsp), %rcx movzwl %ax, %edx movzbl 0x47(%rsp), %r8d callq 0x22800 jmp 0x1a049 movq 0x10(%rsp), %rdi movzbl 0x47(%rsp), %esi callq 0x6f3b0 movl 0x34(%rsp), %eax addl $0x1, %eax movl %eax, 0x34(%rsp) movl 0x30(%rsp), %eax addl $0x1, %eax movl %eax, 0x30(%rsp) movl 0x34(%rsp), %eax cmpl 0x40(%rsp), %eax jne 0x1a06e jmp 0x1a183 movl 0x30(%rsp), %eax cmpl 0x3c(%rsp), %eax jne 0x1a07d jmp 0x1a183 movq 0x50(%rsp), %rdi movl 0x34(%rsp), %eax movzwl %ax, %esi callq 0x23760 movw %ax, 0x2c(%rsp) movq 0x48(%rsp), %rdi movl 0x30(%rsp), %eax movzwl %ax, %esi callq 0x23760 movw %ax, 0x2a(%rsp) jmp 0x1a17e movzwl 0x2c(%rsp), %eax movzwl 0x2a(%rsp), %ecx cmpl %ecx, %eax jge 0x1a140 movl 0x34(%rsp), %eax cmpl 0x38(%rsp), %eax je 0x1a106 movq 0x50(%rsp), %rdi movl 0x34(%rsp), %eax leaq 0x2f(%rsp), %rdx movzwl %ax, %esi callq 0x22760 movq %rax, 0x8(%rsp) movq 0x50(%rsp), %rdi movl 0x38(%rsp), %esi movw 0x2c(%rsp), %ax movq 0x8(%rsp), %rcx movzwl %ax, %edx movzbl 0x2f(%rsp), %r8d callq 0x22800 movl 0x38(%rsp), %eax addl $0x1, %eax movl %eax, 0x38(%rsp) movl 0x34(%rsp), %eax addl $0x1, %eax movl %eax, 0x34(%rsp) movl 0x34(%rsp), %eax cmpl 0x40(%rsp), %eax jne 0x1a128 jmp 0x1a183 movq 0x50(%rsp), %rdi movl 0x34(%rsp), %eax movzwl %ax, %esi callq 0x23760 movw %ax, 0x2c(%rsp) jmp 0x1a17c movq 0x48(%rsp), %rdi movw 0x2c(%rsp), %ax movl 0x30(%rsp), %edx movzwl %ax, %esi callq 0x13670 movl %eax, 0x30(%rsp) movl 0x30(%rsp), %eax cmpl 0x3c(%rsp), %eax jne 0x1a166 jmp 0x1a183 movq 0x48(%rsp), %rdi movl 0x30(%rsp), %eax movzwl %ax, %esi callq 0x23760 movw %ax, 0x2a(%rsp) jmp 0x1a17e jmp 0x19f51 movl 0x34(%rsp), %eax cmpl 0x40(%rsp), %eax jge 0x1a1bd movl 0x34(%rsp), %eax cmpl 0x38(%rsp), %eax jle 0x1a1ad movq 0x50(%rsp), %rdi movl 0x34(%rsp), %esi movl 0x40(%rsp), %edx movl 0x38(%rsp), %ecx callq 0x23b10 movl 0x40(%rsp), %eax subl 0x34(%rsp), %eax addl 0x38(%rsp), %eax movl %eax, 0x38(%rsp) movq 0x50(%rsp), %rdi movl 0x38(%rsp), %esi callq 0x239b0 addq $0x58, %rsp retq
/RoaringBitmap[P]CRoaring/src/roaring.c
container_add_offset
static inline void container_add_offset(const container_t *c, uint8_t type, container_t **lo, container_t **hi, uint16_t offset) { assert(offset != 0); assert(container_nonzero_cardinality(c, type)); assert(lo != NULL || hi != NULL); assert(lo == NULL || *lo == NULL); assert(hi == NULL || *hi == NULL); switch (type) { case BITSET_CONTAINER_TYPE: bitset_container_offset(const_CAST_bitset(c), lo, hi, offset); break; case ARRAY_CONTAINER_TYPE: array_container_offset(const_CAST_array(c), lo, hi, offset); break; case RUN_CONTAINER_TYPE: run_container_offset(const_CAST_run(c), lo, hi, offset); break; default: assert(false); roaring_unreachable; break; } }
subq $0x28, %rsp movw %r8w, %ax movq %rdi, 0x20(%rsp) movb %sil, 0x1f(%rsp) movq %rdx, 0x10(%rsp) movq %rcx, 0x8(%rsp) movw %ax, 0x6(%rsp) movzbl 0x1f(%rsp), %eax movl %eax, (%rsp) subl $0x1, %eax je 0x1ccdc jmp 0x1ccd0 movl (%rsp), %eax subl $0x2, %eax je 0x1ccf7 jmp 0x1ccda jmp 0x1cd12 movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdx movzwl 0x6(%rsp), %ecx callq 0x32b20 jmp 0x1cd2d movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdx movzwl 0x6(%rsp), %ecx callq 0x30ed0 jmp 0x1cd2d movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdx movzwl 0x6(%rsp), %ecx callq 0x79fa0 jmp 0x1cd2d addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
/RoaringBitmap[P]CRoaring/include/roaring/containers/containers.h
container_get_index
static inline int container_get_index(const container_t *c, uint8_t type, uint16_t x) { c = container_unwrap_shared(c, &type); switch (type) { case BITSET_CONTAINER_TYPE: return bitset_container_get_index(const_CAST_bitset(c), x); case ARRAY_CONTAINER_TYPE: return array_container_get_index(const_CAST_array(c), x); case RUN_CONTAINER_TYPE: return run_container_get_index(const_CAST_run(c), x); default: assert(false); roaring_unreachable; } assert(false); roaring_unreachable; return false; }
subq $0x18, %rsp movw %dx, %ax movb %sil, %cl movq %rdi, 0x8(%rsp) movb %cl, 0x7(%rsp) movw %ax, 0x4(%rsp) movq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rsi callq 0x1cc50 movq %rax, 0x8(%rsp) movzbl 0x7(%rsp), %eax movl %eax, (%rsp) subl $0x1, %eax je 0x1de97 jmp 0x1de8b movl (%rsp), %eax subl $0x2, %eax je 0x1deac jmp 0x1de95 jmp 0x1dec1 movq 0x8(%rsp), %rdi movzwl 0x4(%rsp), %esi callq 0x41f30 movl %eax, 0x14(%rsp) jmp 0x1ded6 movq 0x8(%rsp), %rdi movzwl 0x4(%rsp), %esi callq 0x30b20 movl %eax, 0x14(%rsp) jmp 0x1ded6 movq 0x8(%rsp), %rdi movzwl 0x4(%rsp), %esi callq 0x7c700 movl %eax, 0x14(%rsp) jmp 0x1ded6 movl 0x14(%rsp), %eax addq $0x18, %rsp retq nop
/RoaringBitmap[P]CRoaring/include/roaring/containers/containers.h
ra_append_copy
void ra_append_copy(roaring_array_t *ra, const roaring_array_t *sa, uint16_t index, bool copy_on_write) { extend_array(ra, 1); const int32_t pos = ra->size; // old contents is junk that does not need freeing ra->keys[pos] = sa->keys[index]; // the shared container will be in two bitmaps if (copy_on_write) { sa->containers[index] = get_copy_of_container( sa->containers[index], &sa->typecodes[index], copy_on_write); ra->containers[pos] = sa->containers[index]; ra->typecodes[pos] = sa->typecodes[index]; } else { ra->containers[pos] = container_clone(sa->containers[index], sa->typecodes[index]); ra->typecodes[pos] = sa->typecodes[index]; } ra->size++; }
subq $0x18, %rsp movb %cl, %al movw %dx, %cx movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movw %cx, 0x6(%rsp) andb $0x1, %al movb %al, 0x5(%rsp) movq 0x10(%rsp), %rdi movl $0x1, %esi callq 0x22f50 movq 0x10(%rsp), %rax movl (%rax), %eax movl %eax, (%rsp) movq 0x8(%rsp), %rax movq 0x10(%rax), %rax movzwl 0x6(%rsp), %ecx movw (%rax,%rcx,2), %dx movq 0x10(%rsp), %rax movq 0x10(%rax), %rax movslq (%rsp), %rcx movw %dx, (%rax,%rcx,2) testb $0x1, 0x5(%rsp) je 0x23171 movq 0x8(%rsp), %rax movq 0x8(%rax), %rax movzwl 0x6(%rsp), %ecx movq (%rax,%rcx,8), %rdi movq 0x8(%rsp), %rax movq 0x18(%rax), %rsi movzwl 0x6(%rsp), %eax addq %rax, %rsi movb 0x5(%rsp), %al andb $0x1, %al movzbl %al, %edx callq 0x701d0 movq %rax, %rdx movq 0x8(%rsp), %rax movq 0x8(%rax), %rax movzwl 0x6(%rsp), %ecx movq %rdx, (%rax,%rcx,8) movq 0x8(%rsp), %rax movq 0x8(%rax), %rax movzwl 0x6(%rsp), %ecx movq (%rax,%rcx,8), %rdx movq 0x10(%rsp), %rax movq 0x8(%rax), %rax movslq (%rsp), %rcx movq %rdx, (%rax,%rcx,8) movq 0x8(%rsp), %rax movq 0x18(%rax), %rax movzwl 0x6(%rsp), %ecx movb (%rax,%rcx), %dl movq 0x10(%rsp), %rax movq 0x18(%rax), %rax movslq (%rsp), %rcx movb %dl, (%rax,%rcx) jmp 0x231cf movq 0x8(%rsp), %rax movq 0x8(%rax), %rax movzwl 0x6(%rsp), %ecx movq (%rax,%rcx,8), %rdi movq 0x8(%rsp), %rax movq 0x18(%rax), %rax movzwl 0x6(%rsp), %ecx movzbl (%rax,%rcx), %esi callq 0x702e0 movq %rax, %rdx movq 0x10(%rsp), %rax movq 0x8(%rax), %rax movslq (%rsp), %rcx movq %rdx, (%rax,%rcx,8) movq 0x8(%rsp), %rax movq 0x18(%rax), %rax movzwl 0x6(%rsp), %ecx movb (%rax,%rcx), %dl movq 0x10(%rsp), %rax movq 0x18(%rax), %rax movslq (%rsp), %rcx movb %dl, (%rax,%rcx) movq 0x10(%rsp), %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) addq $0x18, %rsp retq
/RoaringBitmap[P]CRoaring/src/roaring_array.c
store_unique_xor
static inline int store_unique_xor(__m128i old, __m128i newval, uint16_t *output) { __m128i vecTmp1 = _mm_alignr_epi8(newval, old, 16 - 4); __m128i vecTmp2 = _mm_alignr_epi8(newval, old, 16 - 2); __m128i equalleft = _mm_cmpeq_epi16(vecTmp2, vecTmp1); __m128i equalright = _mm_cmpeq_epi16(vecTmp2, newval); __m128i equalleftoright = _mm_or_si128(equalleft, equalright); int M = _mm_movemask_epi8( _mm_packs_epi16(equalleftoright, _mm_setzero_si128())); int numberofnewvalues = 8 - _mm_popcnt_u32(M); __m128i key = _mm_lddqu_si128((const __m128i *)uniqshuf + M); __m128i val = _mm_shuffle_epi8(vecTmp2, key); _mm_storeu_si128((__m128i *)output, val); return numberofnewvalues; }
subq $0x128, %rsp # imm = 0x128 vmovdqa %xmm0, 0x20(%rsp) vmovdqa %xmm1, 0x10(%rsp) movq %rdi, 0x8(%rsp) vmovdqa 0x10(%rsp), %xmm0 vmovdqa 0x20(%rsp), %xmm1 vpalignr $0xc, %xmm1, %xmm0, %xmm0 # xmm0 = xmm1[12,13,14,15],xmm0[0,1,2,3,4,5,6,7,8,9,10,11] vmovdqa %xmm0, -0x10(%rsp) vmovdqa 0x10(%rsp), %xmm0 vmovdqa 0x20(%rsp), %xmm1 vpalignr $0xe, %xmm1, %xmm0, %xmm0 # xmm0 = xmm1[14,15],xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13] vmovdqa %xmm0, -0x20(%rsp) vmovdqa -0x20(%rsp), %xmm1 vmovdqa -0x10(%rsp), %xmm0 vmovdqa %xmm1, 0x110(%rsp) vmovdqa %xmm0, 0x100(%rsp) vmovdqa 0x110(%rsp), %xmm0 vmovdqa 0x100(%rsp), %xmm1 vpcmpeqw %xmm1, %xmm0, %xmm0 vmovdqa %xmm0, -0x30(%rsp) vmovdqa -0x20(%rsp), %xmm1 vmovdqa 0x10(%rsp), %xmm0 vmovdqa %xmm1, 0xf0(%rsp) vmovdqa %xmm0, 0xe0(%rsp) vmovdqa 0xf0(%rsp), %xmm0 vmovdqa 0xe0(%rsp), %xmm1 vpcmpeqw %xmm1, %xmm0, %xmm0 vmovdqa %xmm0, -0x40(%rsp) vmovdqa -0x30(%rsp), %xmm1 vmovdqa -0x40(%rsp), %xmm0 vmovdqa %xmm1, 0xa0(%rsp) vmovdqa %xmm0, 0x90(%rsp) vmovdqa 0xa0(%rsp), %xmm0 vmovdqa 0x90(%rsp), %xmm1 vpor %xmm1, %xmm0, %xmm0 vmovdqa %xmm0, -0x50(%rsp) vmovdqa -0x50(%rsp), %xmm1 vxorps %xmm0, %xmm0, %xmm0 vmovdqa %xmm0, 0x80(%rsp) vmovdqa 0x80(%rsp), %xmm0 vmovdqa %xmm1, 0xd0(%rsp) vmovdqa %xmm0, 0xc0(%rsp) vmovdqa 0xd0(%rsp), %xmm0 vmovdqa 0xc0(%rsp), %xmm1 vpacksswb %xmm1, %xmm0, %xmm0 vmovdqa %xmm0, 0xb0(%rsp) vmovdqa 0xb0(%rsp), %xmm0 vpmovmskb %xmm0, %eax movl %eax, -0x54(%rsp) movl -0x54(%rsp), %eax movl %eax, 0x7c(%rsp) movl 0x7c(%rsp), %eax popcntl %eax, %ecx movl $0x8, %eax subl %ecx, %eax movl %eax, -0x58(%rsp) movslq -0x54(%rsp), %rcx leaq 0x6ba45(%rip), %rax # 0x96290 shlq $0x4, %rcx addq %rcx, %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax vlddqu (%rax), %xmm0 vmovdqa %xmm0, -0x70(%rsp) vmovdqa -0x20(%rsp), %xmm1 vmovdqa -0x70(%rsp), %xmm0 vmovdqa %xmm1, 0x50(%rsp) vmovdqa %xmm0, 0x40(%rsp) vmovdqa 0x50(%rsp), %xmm0 vmovdqa 0x40(%rsp), %xmm1 vpshufb %xmm1, %xmm0, %xmm0 vmovdqa %xmm0, -0x80(%rsp) movq 0x8(%rsp), %rax vmovdqa -0x80(%rsp), %xmm0 movq %rax, 0x70(%rsp) vmovdqa %xmm0, 0x60(%rsp) vmovdqa 0x60(%rsp), %xmm0 movq 0x70(%rsp), %rax vmovdqu %xmm0, (%rax) movl -0x58(%rsp), %eax addq $0x128, %rsp # imm = 0x128 retq nopw %cs:(%rax,%rax)
/RoaringBitmap[P]CRoaring/src/array_util.c
memequals
bool memequals(const void *s1, const void *s2, size_t n) { if (n == 0) { return true; } #if CROARING_IS_X64 int support = croaring_hardware_support(); #if CROARING_COMPILER_SUPPORTS_AVX512 if (support & ROARING_SUPPORTS_AVX512) { return _avx512_memequals(s1, s2, n); } else #endif // CROARING_COMPILER_SUPPORTS_AVX512 if (support & ROARING_SUPPORTS_AVX2) { return _avx2_memequals(s1, s2, n); } else { return memcmp(s1, s2, n) == 0; } #else return memcmp(s1, s2, n) == 0; #endif }
subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq %rdx, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x2af22 movb $0x1, 0x27(%rsp) jmp 0x2af9b callq 0x7d800 movl %eax, 0x4(%rsp) movl 0x4(%rsp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x2af53 movq 0x18(%rsp), %rdi movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x2afb0 andb $0x1, %al movb %al, 0x27(%rsp) jmp 0x2af9b movl 0x4(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x2af7b movq 0x18(%rsp), %rdi movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x2b3c0 andb $0x1, %al movb %al, 0x27(%rsp) jmp 0x2af9b movq 0x18(%rsp), %rdi movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x20f0 cmpl $0x0, %eax sete %al andb $0x1, %al movb %al, 0x27(%rsp) movb 0x27(%rsp), %al andb $0x1, %al addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
/RoaringBitmap[P]CRoaring/src/array_util.c
array_container_validate
bool array_container_validate(const array_container_t *v, const char **reason) { if (v->capacity < 0) { *reason = "negative capacity"; return false; } if (v->cardinality < 0) { *reason = "negative cardinality"; return false; } if (v->cardinality > v->capacity) { *reason = "cardinality exceeds capacity"; return false; } if (v->cardinality > DEFAULT_MAX_SIZE) { *reason = "cardinality exceeds DEFAULT_MAX_SIZE"; return false; } if (v->cardinality == 0) { *reason = "zero cardinality"; return false; } if (v->array == NULL) { *reason = "NULL array pointer"; return false; } uint16_t prev = v->array[0]; for (int i = 1; i < v->cardinality; ++i) { if (v->array[i] <= prev) { *reason = "array elements not strictly increasing"; return false; } prev = v->array[i]; } return true; }
movq %rdi, -0x10(%rsp) movq %rsi, -0x18(%rsp) movq -0x10(%rsp), %rax cmpl $0x0, 0x4(%rax) jge 0x31dee movq -0x18(%rsp), %rax leaq 0x56270(%rip), %rcx # 0x88051 movq %rcx, (%rax) movb $0x0, -0x1(%rsp) jmp 0x31f29 movq -0x10(%rsp), %rax cmpl $0x0, (%rax) jge 0x31e11 movq -0x18(%rsp), %rax leaq 0x5625f(%rip), %rcx # 0x88063 movq %rcx, (%rax) movb $0x0, -0x1(%rsp) jmp 0x31f29 movq -0x10(%rsp), %rax movl (%rax), %eax movq -0x10(%rsp), %rcx cmpl 0x4(%rcx), %eax jle 0x31e3b movq -0x18(%rsp), %rax leaq 0x5624a(%rip), %rcx # 0x88078 movq %rcx, (%rax) movb $0x0, -0x1(%rsp) jmp 0x31f29 movq -0x10(%rsp), %rax cmpl $0x1000, (%rax) # imm = 0x1000 jle 0x31e61 movq -0x18(%rsp), %rax leaq 0x56241(%rip), %rcx # 0x88095 movq %rcx, (%rax) movb $0x0, -0x1(%rsp) jmp 0x31f29 movq -0x10(%rsp), %rax cmpl $0x0, (%rax) jne 0x31e84 movq -0x18(%rsp), %rax leaq 0x56243(%rip), %rcx # 0x880ba movq %rcx, (%rax) movb $0x0, -0x1(%rsp) jmp 0x31f29 movq -0x10(%rsp), %rax cmpq $0x0, 0x8(%rax) jne 0x31ea9 movq -0x18(%rsp), %rax leaq 0x5622f(%rip), %rcx # 0x880cb movq %rcx, (%rax) movb $0x0, -0x1(%rsp) jmp 0x31f29 movq -0x10(%rsp), %rax movq 0x8(%rax), %rax movw (%rax), %ax movw %ax, -0x1a(%rsp) movl $0x1, -0x20(%rsp) movl -0x20(%rsp), %eax movq -0x10(%rsp), %rcx cmpl (%rcx), %eax jge 0x31f24 movq -0x10(%rsp), %rax movq 0x8(%rax), %rax movslq -0x20(%rsp), %rcx movzwl (%rax,%rcx,2), %eax movzwl -0x1a(%rsp), %ecx cmpl %ecx, %eax jg 0x31f00 movq -0x18(%rsp), %rax leaq 0x561e8(%rip), %rcx # 0x880de movq %rcx, (%rax) movb $0x0, -0x1(%rsp) jmp 0x31f29 movq -0x10(%rsp), %rax movq 0x8(%rax), %rax movslq -0x20(%rsp), %rcx movw (%rax,%rcx,2), %ax movw %ax, -0x1a(%rsp) movl -0x20(%rsp), %eax addl $0x1, %eax movl %eax, -0x20(%rsp) jmp 0x31ec2 movb $0x1, -0x1(%rsp) movb -0x1(%rsp), %al andb $0x1, %al retq
/RoaringBitmap[P]CRoaring/src/containers/array.c
array_container_is_subset
bool array_container_is_subset(const array_container_t *container1, const array_container_t *container2) { if (container1->cardinality > container2->cardinality) { return false; } int i1 = 0, i2 = 0; while (i1 < container1->cardinality && i2 < container2->cardinality) { if (container1->array[i1] == container2->array[i2]) { i1++; i2++; } else if (container1->array[i1] > container2->array[i2]) { i2++; } else { // container1->array[i1] < container2->array[i2] return false; } } if (i1 == container1->cardinality) { return true; } else { return false; } }
movq %rdi, -0x10(%rsp) movq %rsi, -0x18(%rsp) movq -0x10(%rsp), %rax movl (%rax), %eax movq -0x18(%rsp), %rcx cmpl (%rcx), %eax jle 0x32044 movb $0x0, -0x1(%rsp) jmp 0x32122 movl $0x0, -0x1c(%rsp) movl $0x0, -0x20(%rsp) movl -0x1c(%rsp), %ecx movq -0x10(%rsp), %rdx xorl %eax, %eax cmpl (%rdx), %ecx movb %al, -0x21(%rsp) jge 0x32079 movl -0x20(%rsp), %eax movq -0x18(%rsp), %rcx cmpl (%rcx), %eax setl %al movb %al, -0x21(%rsp) movb -0x21(%rsp), %al testb $0x1, %al jne 0x32086 jmp 0x32109 movq -0x10(%rsp), %rax movq 0x8(%rax), %rax movslq -0x1c(%rsp), %rcx movzwl (%rax,%rcx,2), %eax movq -0x18(%rsp), %rcx movq 0x8(%rcx), %rcx movslq -0x20(%rsp), %rdx movzwl (%rcx,%rdx,2), %ecx cmpl %ecx, %eax jne 0x320c6 movl -0x1c(%rsp), %eax addl $0x1, %eax movl %eax, -0x1c(%rsp) movl -0x20(%rsp), %eax addl $0x1, %eax movl %eax, -0x20(%rsp) jmp 0x32104 movq -0x10(%rsp), %rax movq 0x8(%rax), %rax movslq -0x1c(%rsp), %rcx movzwl (%rax,%rcx,2), %eax movq -0x18(%rsp), %rcx movq 0x8(%rcx), %rcx movslq -0x20(%rsp), %rdx movzwl (%rcx,%rdx,2), %ecx cmpl %ecx, %eax jle 0x320fb movl -0x20(%rsp), %eax addl $0x1, %eax movl %eax, -0x20(%rsp) jmp 0x32102 movb $0x0, -0x1(%rsp) jmp 0x32122 jmp 0x32104 jmp 0x32054 movl -0x1c(%rsp), %eax movq -0x10(%rsp), %rcx cmpl (%rcx), %eax jne 0x3211d movb $0x1, -0x1(%rsp) jmp 0x32122 movb $0x0, -0x1(%rsp) movb -0x1(%rsp), %al andb $0x1, %al retq nopl (%rax)
/RoaringBitmap[P]CRoaring/src/containers/array.c
bitset_container_create
bitset_container_t *bitset_container_create(void) { bitset_container_t *bitset = (bitset_container_t *)roaring_malloc(sizeof(bitset_container_t)); if (!bitset) { return NULL; } size_t align_size = 32; #if CROARING_IS_X64 int support = croaring_hardware_support(); if (support & ROARING_SUPPORTS_AVX512) { // sizeof(__m512i) == 64 align_size = 64; } else { // sizeof(__m256i) == 32 align_size = 32; } #endif bitset->words = (uint64_t *)roaring_aligned_malloc( align_size, sizeof(uint64_t) * BITSET_CONTAINER_SIZE_IN_WORDS); if (!bitset->words) { roaring_free(bitset); return NULL; } bitset_container_clear(bitset); return bitset; }
subq $0x28, %rsp movl $0x10, %edi callq 0x12e00 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) jne 0x32739 movq $0x0, 0x20(%rsp) jmp 0x327bb movq $0x20, 0x10(%rsp) callq 0x7d800 movl %eax, 0xc(%rsp) movl 0xc(%rsp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x32762 movq $0x40, 0x10(%rsp) jmp 0x3276b movq $0x20, 0x10(%rsp) movq 0x10(%rsp), %rdi movl $0x2000, %esi # imm = 0x2000 callq 0x12ea0 movq %rax, %rcx movq 0x18(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x18(%rsp), %rax cmpq $0x0, 0x8(%rax) jne 0x327a7 movq 0x18(%rsp), %rdi callq 0x12e80 movq $0x0, 0x20(%rsp) jmp 0x327bb movq 0x18(%rsp), %rdi callq 0x326b0 movq 0x18(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
/RoaringBitmap[P]CRoaring/src/containers/bitset.c
bitset_container_intersect
bool bitset_container_intersect(const bitset_container_t *src_1, const bitset_container_t *src_2) { // could vectorize, but this is probably already quite fast in practice const uint64_t *__restrict__ words_1 = src_1->words; const uint64_t *__restrict__ words_2 = src_2->words; for (int i = 0; i < BITSET_CONTAINER_SIZE_IN_WORDS; i++) { if ((words_1[i] & words_2[i]) != 0) return true; } return false; }
movq %rdi, -0x10(%rsp) movq %rsi, -0x18(%rsp) movq -0x10(%rsp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rsp) movq -0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, -0x28(%rsp) movl $0x0, -0x2c(%rsp) cmpl $0x400, -0x2c(%rsp) # imm = 0x400 jge 0x33090 movq -0x20(%rsp), %rax movslq -0x2c(%rsp), %rcx movq (%rax,%rcx,8), %rax movq -0x28(%rsp), %rcx movslq -0x2c(%rsp), %rdx andq (%rcx,%rdx,8), %rax cmpq $0x0, %rax je 0x33081 movb $0x1, -0x1(%rsp) jmp 0x33095 jmp 0x33083 movl -0x2c(%rsp), %eax addl $0x1, %eax movl %eax, -0x2c(%rsp) jmp 0x3304e movb $0x0, -0x1(%rsp) movb -0x1(%rsp), %al andb $0x1, %al retq nopl (%rax)
/RoaringBitmap[P]CRoaring/src/containers/bitset.c
container_mutable_unwrap_shared
static inline container_t *container_mutable_unwrap_shared(container_t *c, uint8_t *type) { if (*type == SHARED_CONTAINER_TYPE) { // the passed in container is shared *type = CAST_shared(c)->typecode; assert(*type != SHARED_CONTAINER_TYPE); return CAST_shared(c)->container; // return the enclosed container } else { return c; // wasn't shared, so return as-is } }
movq %rdi, -0x10(%rsp) movq %rsi, -0x18(%rsp) movq -0x18(%rsp), %rax movzbl (%rax), %eax cmpl $0x4, %eax jne 0x6e8e5 movq -0x10(%rsp), %rax movb 0x8(%rax), %cl movq -0x18(%rsp), %rax movb %cl, (%rax) movq -0x10(%rsp), %rax movq (%rax), %rax movq %rax, -0x8(%rsp) jmp 0x6e8ef movq -0x10(%rsp), %rax movq %rax, -0x8(%rsp) movq -0x8(%rsp), %rax retq nopw %cs:(%rax,%rax)
/RoaringBitmap[P]CRoaring/include/roaring/containers/containers.h
array_container_try_add
static inline int array_container_try_add(array_container_t *arr, uint16_t value, int32_t max_cardinality) { const int32_t cardinality = arr->cardinality; // best case, we can append. if ((array_container_empty(arr) || arr->array[cardinality - 1] < value) && cardinality < max_cardinality) { array_container_append(arr, value); return 1; } const int32_t loc = binarySearch(arr->array, cardinality, value); if (loc >= 0) { return 0; } else if (cardinality < max_cardinality) { if (array_container_full(arr)) { array_container_grow(arr, arr->capacity + 1, true); } const int32_t insert_idx = -loc - 1; memmove(arr->array + insert_idx + 1, arr->array + insert_idx, (cardinality - insert_idx) * sizeof(uint16_t)); arr->array[insert_idx] = value; arr->cardinality++; return 1; } else { return -1; } }
subq $0x28, %rsp movw %si, %ax movq %rdi, 0x18(%rsp) movw %ax, 0x16(%rsp) movl %edx, 0x10(%rsp) movq 0x18(%rsp), %rax movl (%rax), %eax movl %eax, 0xc(%rsp) movq 0x18(%rsp), %rdi callq 0x726c0 testb $0x1, %al jne 0x724ee movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movl 0xc(%rsp), %ecx subl $0x1, %ecx movslq %ecx, %rcx movzwl (%rax,%rcx,2), %eax movzwl 0x16(%rsp), %ecx cmpl %ecx, %eax jge 0x72514 movl 0xc(%rsp), %eax cmpl 0x10(%rsp), %eax jge 0x72514 movq 0x18(%rsp), %rdi movzwl 0x16(%rsp), %esi callq 0x726e0 movl $0x1, 0x24(%rsp) jmp 0x725fc movq 0x18(%rsp), %rax movq 0x8(%rax), %rdi movl 0xc(%rsp), %esi movzwl 0x16(%rsp), %edx callq 0x25750 movl %eax, 0x8(%rsp) cmpl $0x0, 0x8(%rsp) jl 0x72543 movl $0x0, 0x24(%rsp) jmp 0x725fc movl 0xc(%rsp), %eax cmpl 0x10(%rsp), %eax jge 0x725f4 movq 0x18(%rsp), %rdi callq 0x72750 testb $0x1, %al jne 0x72561 jmp 0x7257b movq 0x18(%rsp), %rdi movq 0x18(%rsp), %rax movl 0x4(%rax), %esi addl $0x1, %esi movl $0x1, %edx callq 0x311e0 xorl %eax, %eax subl 0x8(%rsp), %eax subl $0x1, %eax movl %eax, 0x4(%rsp) movq 0x18(%rsp), %rax movq 0x8(%rax), %rdi movslq 0x4(%rsp), %rax shlq %rax addq %rax, %rdi addq $0x2, %rdi movq 0x18(%rsp), %rax movq 0x8(%rax), %rsi movslq 0x4(%rsp), %rax shlq %rax addq %rax, %rsi movl 0xc(%rsp), %eax subl 0x4(%rsp), %eax movslq %eax, %rdx shlq %rdx callq 0x2360 movw 0x16(%rsp), %dx movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movslq 0x4(%rsp), %rcx movw %dx, (%rax,%rcx,2) movq 0x18(%rsp), %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) movl $0x1, 0x24(%rsp) jmp 0x725fc movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
/RoaringBitmap[P]CRoaring/include/roaring/containers/array.h
run_container_cardinality
int run_container_cardinality(const run_container_t *run) { #if CROARING_COMPILER_SUPPORTS_AVX512 if (croaring_hardware_support() & ROARING_SUPPORTS_AVX512) { return _avx512_run_container_cardinality(run); } else #endif if (croaring_hardware_support() & ROARING_SUPPORTS_AVX2) { return _avx2_run_container_cardinality(run); } else { return _scalar_run_container_cardinality(run); } }
subq $0x18, %rsp movq %rdi, 0x8(%rsp) callq 0x7d800 andl $0x2, %eax cmpl $0x0, %eax je 0x7b666 movq 0x8(%rsp), %rdi callq 0x7cf50 movl %eax, 0x14(%rsp) jmp 0x7b691 callq 0x7d800 andl $0x1, %eax cmpl $0x0, %eax je 0x7b683 movq 0x8(%rsp), %rdi callq 0x7d310 movl %eax, 0x14(%rsp) jmp 0x7b691 movq 0x8(%rsp), %rdi callq 0x7d660 movl %eax, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopw (%rax,%rax)
/RoaringBitmap[P]CRoaring/src/containers/run.c
run_container_iterate
bool run_container_iterate(const run_container_t *cont, uint32_t base, roaring_iterator iterator, void *ptr) { for (int i = 0; i < cont->n_runs; ++i) { uint32_t run_start = base + cont->runs[i].value; uint16_t le = cont->runs[i].length; for (int j = 0; j <= le; ++j) if (!iterator(run_start + j, ptr)) return false; } return true; }
subq $0x38, %rsp movq %rdi, 0x28(%rsp) movl %esi, 0x24(%rsp) movq %rdx, 0x18(%rsp) movq %rcx, 0x10(%rsp) movl $0x0, 0xc(%rsp) movl 0xc(%rsp), %eax movq 0x28(%rsp), %rcx cmpl (%rcx), %eax jge 0x7c174 movl 0x24(%rsp), %eax movq 0x28(%rsp), %rcx movq 0x8(%rcx), %rcx movslq 0xc(%rsp), %rdx movzwl (%rcx,%rdx,4), %ecx addl %ecx, %eax movl %eax, 0x8(%rsp) movq 0x28(%rsp), %rax movq 0x8(%rax), %rax movslq 0xc(%rsp), %rcx movw 0x2(%rax,%rcx,4), %ax movw %ax, 0x6(%rsp) movl $0x0, (%rsp) movl (%rsp), %eax movzwl 0x6(%rsp), %ecx cmpl %ecx, %eax jg 0x7c162 movq 0x18(%rsp), %rax movl 0x8(%rsp), %edi addl (%rsp), %edi movq 0x10(%rsp), %rsi callq *%rax testb $0x1, %al jne 0x7c155 movb $0x0, 0x37(%rsp) jmp 0x7c179 jmp 0x7c157 movl (%rsp), %eax addl $0x1, %eax movl %eax, (%rsp) jmp 0x7c12b jmp 0x7c164 movl 0xc(%rsp), %eax addl $0x1, %eax movl %eax, 0xc(%rsp) jmp 0x7c0df movb $0x1, 0x37(%rsp) movb 0x37(%rsp), %al andb $0x1, %al addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
/RoaringBitmap[P]CRoaring/src/containers/run.c
run_container_get_index
int run_container_get_index(const run_container_t *container, uint16_t x) { if (run_container_contains(container, x)) { int sum = 0; uint32_t x32 = x; for (int i = 0; i < container->n_runs; i++) { uint32_t startpoint = container->runs[i].value; uint32_t length = container->runs[i].length; uint32_t endpoint = length + startpoint; if (x <= endpoint) { if (x < startpoint) break; return sum + (x32 - startpoint); } else { sum += length + 1; } } return sum - 1; } else { return -1; } }
subq $0x38, %rsp movw %si, %ax movq %rdi, 0x28(%rsp) movw %ax, 0x26(%rsp) movq 0x28(%rsp), %rdi movzwl 0x26(%rsp), %esi callq 0x79760 testb $0x1, %al jne 0x7c729 jmp 0x7c7e6 movl $0x0, 0x20(%rsp) movzwl 0x26(%rsp), %eax movl %eax, 0x1c(%rsp) movl $0x0, 0x18(%rsp) movl 0x18(%rsp), %eax movq 0x28(%rsp), %rcx cmpl (%rcx), %eax jge 0x7c7d9 movq 0x28(%rsp), %rax movq 0x8(%rax), %rax movslq 0x18(%rsp), %rcx movzwl (%rax,%rcx,4), %eax movl %eax, 0x14(%rsp) movq 0x28(%rsp), %rax movq 0x8(%rax), %rax movslq 0x18(%rsp), %rcx movzwl 0x2(%rax,%rcx,4), %eax movl %eax, 0x10(%rsp) movl 0x10(%rsp), %eax addl 0x14(%rsp), %eax movl %eax, 0xc(%rsp) movzwl 0x26(%rsp), %eax cmpl 0xc(%rsp), %eax ja 0x7c7b8 movzwl 0x26(%rsp), %eax cmpl 0x14(%rsp), %eax jae 0x7c7a4 jmp 0x7c7d9 movl 0x20(%rsp), %eax movl 0x1c(%rsp), %ecx subl 0x14(%rsp), %ecx addl %ecx, %eax movl %eax, 0x34(%rsp) jmp 0x7c7ee movl 0x10(%rsp), %eax addl $0x1, %eax addl 0x20(%rsp), %eax movl %eax, 0x20(%rsp) jmp 0x7c7c9 movl 0x18(%rsp), %eax addl $0x1, %eax movl %eax, 0x18(%rsp) jmp 0x7c742 movl 0x20(%rsp), %eax subl $0x1, %eax movl %eax, 0x34(%rsp) jmp 0x7c7ee movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopw (%rax,%rax)
/RoaringBitmap[P]CRoaring/src/containers/run.c
add_symbol_value
static void add_symbol_value(ListNode * const symbol_map_head, const char * const symbol_names[], const size_t number_of_symbol_names, const void* value, const int refcount) { const char* symbol_name; ListNode *target_node; SymbolMapValue *target_map_value; assert_non_null(symbol_map_head); assert_non_null(symbol_names); assert_true(number_of_symbol_names); symbol_name = symbol_names[0]; if (!list_find(symbol_map_head, symbol_name, symbol_names_match, &target_node)) { SymbolMapValue * const new_symbol_map_value = (SymbolMapValue*)malloc(sizeof(*new_symbol_map_value)); new_symbol_map_value->symbol_name = symbol_name; list_initialize(&new_symbol_map_value->symbol_values_list_head); target_node = list_add_value(symbol_map_head, new_symbol_map_value, 1); } target_map_value = (SymbolMapValue*)target_node->value; if (number_of_symbol_names == 1) { list_add_value(&target_map_value->symbol_values_list_head, value, refcount); } else { add_symbol_value(&target_map_value->symbol_values_list_head, &symbol_names[1], number_of_symbol_names - 1, value, refcount); } }
subq $0x58, %rsp movq %fs:0x28, %rax movq %rax, 0x50(%rsp) movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq %rdx, 0x30(%rsp) movq %rcx, 0x28(%rsp) movl %r8d, 0x24(%rsp) movq 0x40(%rsp), %rdi leaq 0xa5e2(%rip), %rsi # 0x88cc9 leaq 0x9fe6(%rip), %rdx # 0x886d4 movl $0x2ee, %ecx # imm = 0x2EE callq 0x7e610 movq 0x38(%rsp), %rdi leaq 0xa561(%rip), %rsi # 0x88c65 leaq 0x9fc9(%rip), %rdx # 0x886d4 movl $0x2ef, %ecx # imm = 0x2EF callq 0x7e610 movq 0x30(%rsp), %rdi leaq 0xa53a(%rip), %rsi # 0x88c5b leaq 0x9fac(%rip), %rdx # 0x886d4 movl $0x2f0, %ecx # imm = 0x2F0 callq 0x7e610 movq 0x38(%rsp), %rax movq (%rax), %rax movq %rax, 0x18(%rsp) movq 0x40(%rsp), %rdi movq 0x18(%rsp), %rsi leaq 0x45e0(%rip), %rdx # 0x82d30 leaq 0x48(%rsp), %rcx callq 0x82c80 cmpl $0x0, %eax jne 0x7e7a2 movl $0x28, %edi callq 0x22f0 movq %rax, 0x8(%rsp) movq 0x18(%rsp), %rcx movq 0x8(%rsp), %rax movq %rcx, (%rax) movq 0x8(%rsp), %rdi addq $0x8, %rdi callq 0x82ea0 movq 0x40(%rsp), %rdi movq 0x8(%rsp), %rsi movl $0x1, %edx callq 0x7e9f0 movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rax movq (%rax), %rax movq %rax, 0x10(%rsp) cmpq $0x1, 0x30(%rsp) jne 0x7e7d0 movq 0x10(%rsp), %rdi addq $0x8, %rdi movq 0x28(%rsp), %rsi movl 0x24(%rsp), %edx callq 0x7e9f0 jmp 0x7e7fa movq 0x10(%rsp), %rdi addq $0x8, %rdi movq 0x38(%rsp), %rsi addq $0x8, %rsi movq 0x30(%rsp), %rdx subq $0x1, %rdx movq 0x28(%rsp), %rcx movl 0x24(%rsp), %r8d callq 0x7e6b0 movq %fs:0x28, %rax movq 0x50(%rsp), %rcx cmpq %rcx, %rax jne 0x7e812 addq $0x58, %rsp retq callq 0x2250 nopw (%rax,%rax)
/RoaringBitmap[P]CRoaring/build_O0/_deps/cmocka-src/src/cmocka.c
check_in_range
static int check_in_range(const LargestIntegralType value, const LargestIntegralType check_value_data) { CheckIntegerRange * const check_integer_range = cast_largest_integral_type_to_pointer(CheckIntegerRange*, check_value_data); assert_non_null(check_integer_range); return integer_in_range_display_error(value, check_integer_range->minimum, check_integer_range->maximum); }
subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq 0x8(%rsp), %rax movq %rax, (%rsp) movq (%rsp), %rdi leaq 0x9f18(%rip), %rsi # 0x88cea leaq 0x98fb(%rip), %rdx # 0x886d4 movl $0x5a5, %ecx # imm = 0x5A5 callq 0x7e610 movq 0x10(%rsp), %rdi movq (%rsp), %rax movq 0x28(%rax), %rsi movq (%rsp), %rax movq 0x30(%rax), %rdx callq 0x7fef0 addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
/RoaringBitmap[P]CRoaring/build_O0/_deps/cmocka-src/src/cmocka.c
expect_memory_setup
static void expect_memory_setup( const char* const function, const char* const parameter, const char* const file, const int line, const void * const memory, const size_t size, const CheckParameterValue check_function, const int count) { CheckMemoryData * const check_data = (CheckMemoryData*)malloc(sizeof(*check_data) + size); void * const mem = (void*)(check_data + 1); declare_initialize_value_pointer_pointer(check_data_pointer, check_data); assert_non_null(memory); assert_true(size); memcpy(mem, memory, size); check_data->memory = mem; check_data->size = size; _expect_check(function, parameter, file, line, check_function, check_data_pointer.value, &check_data->event, count); }
subq $0x58, %rsp movl 0x68(%rsp), %eax movq 0x60(%rsp), %rax movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq %rdx, 0x40(%rsp) movl %ecx, 0x3c(%rsp) movq %r8, 0x30(%rsp) movq %r9, 0x28(%rsp) movq 0x28(%rsp), %rdi addq $0x38, %rdi callq 0x22f0 movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x38, %rax movq %rax, 0x18(%rsp) movq $0x0, 0x10(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x30(%rsp), %rdi leaq 0x9b04(%rip), %rsi # 0x88cfe leaq 0x94d3(%rip), %rdx # 0x886d4 movl $0x644, %ecx # imm = 0x644 callq 0x7e610 movq 0x28(%rsp), %rdi leaq 0x96b4(%rip), %rsi # 0x888cb leaq 0x94b6(%rip), %rdx # 0x886d4 movl $0x645, %ecx # imm = 0x645 callq 0x7e610 movq 0x18(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x28(%rsp), %rdx callq 0x21c0 movq 0x18(%rsp), %rcx movq 0x20(%rsp), %rax movq %rcx, 0x28(%rax) movq 0x28(%rsp), %rcx movq 0x20(%rsp), %rax movq %rcx, 0x30(%rax) movq 0x50(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x40(%rsp), %rdx movl 0x3c(%rsp), %ecx movq 0x60(%rsp), %r8 movq 0x10(%rsp), %r9 movq 0x20(%rsp), %r10 movl 0x68(%rsp), %eax movq %r10, (%rsp) movl %eax, 0x8(%rsp) callq 0x7e820 addq $0x58, %rsp retq
/RoaringBitmap[P]CRoaring/build_O0/_deps/cmocka-src/src/cmocka.c
cmprintf_group_finish
static void cmprintf_group_finish(const char *group_name, size_t total_executed, size_t total_passed, size_t total_failed, size_t total_errors, size_t total_skipped, double total_runtime, struct CMUnitTestState *cm_tests) { enum cm_message_output output; output = cm_get_output(); switch (output) { case CM_OUTPUT_STDOUT: cmprintf_group_finish_standard(total_executed, total_passed, total_failed, total_errors, total_skipped, cm_tests); break; case CM_OUTPUT_SUBUNIT: break; case CM_OUTPUT_TAP: cmprintf_group_finish_tap(group_name, total_executed, total_passed, total_skipped); break; case CM_OUTPUT_XML: cmprintf_group_finish_xml(group_name, total_executed, total_failed, total_errors, total_skipped, total_runtime, cm_tests); break; } }
subq $0x48, %rsp movq 0x50(%rsp), %rax movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq %rdx, 0x30(%rsp) movq %rcx, 0x28(%rsp) movq %r8, 0x20(%rsp) movq %r9, 0x18(%rsp) movsd %xmm0, 0x10(%rsp) callq 0x808b0 movl %eax, 0xc(%rsp) movl 0xc(%rsp), %eax movq %rax, (%rsp) subq $0x3, %rax ja 0x81c53 movq (%rsp), %rax leaq 0x68e1(%rip), %rcx # 0x884c0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x28(%rsp), %rdx movq 0x20(%rsp), %rcx movq 0x18(%rsp), %r8 movq 0x50(%rsp), %r9 callq 0x838e0 jmp 0x81c53 jmp 0x81c53 movq 0x40(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x30(%rsp), %rdx movq 0x18(%rsp), %rcx callq 0x83a60 jmp 0x81c53 movq 0x40(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x28(%rsp), %rdx movq 0x20(%rsp), %rcx movq 0x18(%rsp), %r8 movsd 0x10(%rsp), %xmm0 movq 0x50(%rsp), %r9 callq 0x83ac0 addq $0x48, %rsp retq nopl (%rax,%rax)
/RoaringBitmap[P]CRoaring/build_O0/_deps/cmocka-src/src/cmocka.c
free_allocated_blocks
static void free_allocated_blocks(const ListNode * const check_point) { const ListNode * const head = get_allocated_blocks_list(); const ListNode *node; assert_non_null(check_point); node = check_point->next; assert_non_null(node); while (node != head) { const MallocBlockInfo block_info = { .ptr = discard_const(node->value), }; node = node->next; free(discard_const_p(char, block_info.data) + sizeof(struct MallocBlockInfoData) + MALLOC_GUARD_SIZE); } }
subq $0x28, %rsp movq %rdi, 0x20(%rsp) callq 0x803f0 movq %rax, 0x18(%rsp) movq 0x20(%rsp), %rdi leaq 0x5055(%rip), %rsi # 0x89184 leaq 0x459e(%rip), %rdx # 0x886d4 movl $0x86b, %ecx # imm = 0x86B callq 0x7e610 movq 0x20(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rdi leaq 0x4b26(%rip), %rsi # 0x88c80 leaq 0x4573(%rip), %rdx # 0x886d4 movl $0x86e, %ecx # imm = 0x86E callq 0x7e610 movq 0x10(%rsp), %rax cmpq 0x18(%rsp), %rax je 0x841b2 movq 0x10(%rsp), %rax movq (%rax), %rax movq %rax, 0x8(%rsp) movq 0x10(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) movq 0x8(%rsp), %rdi addq $0x48, %rdi addq $0x10, %rdi leaq 0x452e(%rip), %rsi # 0x886d4 movl $0x877, %edx # imm = 0x877 callq 0x80560 jmp 0x8416b addq $0x28, %rsp retq nopw (%rax,%rax)
/RoaringBitmap[P]CRoaring/build_O0/_deps/cmocka-src/src/cmocka.c
remove_always_return_values_from_list
static void remove_always_return_values_from_list(ListNode * const map_head) { ListNode * current = NULL; ListNode * next = NULL; assert_non_null(map_head); for (current = map_head->next, next = current->next; current != map_head; current = next, next = current->next) { if (current->refcount < -1) { list_remove_free(current, free_value, NULL); } } }
subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq $0x0, 0x8(%rsp) movq $0x0, (%rsp) movq 0x10(%rsp), %rdi leaq 0x47ca(%rip), %rsi # 0x88cd0 leaq 0x41c7(%rip), %rdx # 0x886d4 movl $0x34c, %ecx # imm = 0x34C callq 0x7e610 movq 0x10(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq 0x10(%rax), %rax movq %rax, (%rsp) movq 0x8(%rsp), %rax cmpq 0x10(%rsp), %rax je 0x84578 movq 0x8(%rsp), %rax cmpl $-0x1, 0x8(%rax) jge 0x8455e movq 0x8(%rsp), %rdi leaq -0x6055(%rip), %rsi # 0x7e500 xorl %eax, %eax movl %eax, %edx callq 0x7e4b0 jmp 0x84560 movq (%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq 0x10(%rax), %rax movq %rax, (%rsp) jmp 0x84532 addq $0x18, %rsp retq nopl (%rax)
/RoaringBitmap[P]CRoaring/build_O0/_deps/cmocka-src/src/cmocka.c
MapWrapper::freeAllItems()
void freeAllItems() { for (auto& entry : map) { delete entry.second; } }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx addq $0x10, %rbx movq (%rbx), %rbx testq %rbx, %rbx je 0x2c42 movq 0x28(%rbx), %r14 testq %r14, %r14 je 0x2c38 movq %r14, %rdi callq 0x2c4a movq %r14, %rdi callq 0x2200 jmp 0x2c1f addq $0x8, %rsp popq %rbx popq %r14 retq
/greensky00[P]latency-collector/src/latency_collector.h
MapWrapper::addItem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
LatencyItem* addItem(const std::string& bin_name) { LatencyItem* item = new LatencyItem(bin_name); map.insert( std::make_pair(bin_name, item) ); return item; }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r15 movq %rdi, %r14 pushq $0x50 popq %rdi callq 0x2220 movq %rax, %rbx movq %rax, %rdi movq %r15, %rsi callq 0x398e movq %rsp, %r12 movq %r12, %rdi movq %r15, %rsi callq 0x2280 movq %rbx, 0x20(%r12) movq %r14, %rdi movq %r12, %rsi callq 0x3a0c movq %rsp, %rdi callq 0x2110 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r14 movq %rsp, %rdi callq 0x2110 jmp 0x3344 movq %rax, %r14 movq %rbx, %rdi callq 0x2200 movq %r14, %rdi callq 0x2340
/greensky00[P]latency-collector/src/latency_collector.h
main
int main(int argc, const char* argv[]) { if (argc < 3) { Usage(argv); return EXIT_FAILURE; } const std::string input_path = argv[1]; const std::string output_path = argv[2]; libwebm::VpxPes2Ts converter(input_path, output_path); return converter.ConvertToFile() == true ? EXIT_SUCCESS : EXIT_FAILURE; }
pushq %rbx subq $0xb0, %rsp movq %rsi, %rbx cmpl $0x2, %edi jg 0xba44 movq (%rbx), %rsi leaq 0x115ce(%rip), %rdi # 0x1d004 xorl %eax, %eax callq 0xb050 movl $0x1, %eax jmp 0xbabc movq 0x8(%rbx), %rsi leaq 0x20(%rsp), %rdi leaq 0x40(%rsp), %rdx callq 0xb0c0 movq 0x10(%rbx), %rsi movq %rsp, %rdi leaq 0x40(%rsp), %rdx callq 0xb0c0 leaq 0x40(%rsp), %rdi leaq 0x20(%rsp), %rsi movq %rsp, %rdx callq 0xbb0a leaq 0x40(%rsp), %rdi callq 0xc1ca movl %eax, %ebx leaq 0x40(%rsp), %rdi callq 0xbb9a leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbaa3 callq 0xb180 xorb $0x1, %bl leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbab9 callq 0xb180 movzbl %bl, %eax addq $0xb0, %rsp popq %rbx retq movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0xbb9a jmp 0xbad7 movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbaef callq 0xb180 jmp 0xbaef movq %rax, %rbx leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbb02 callq 0xb180 movq %rbx, %rdi callq 0xb2b0
/webmproject[P]libwebm/m2ts/vpxpes2ts_main.cc
libwebm::Webm2Pes::~Webm2Pes()
~Webm2Pes() = default;
pushq %rbx movq %rdi, %rbx movq 0x88(%rdi), %rdi testq %rdi, %rdi je 0xbcd3 callq 0xb180 movq 0x68(%rbx), %rdi testq %rdi, %rdi je 0xbce1 callq 0xb190 movq $0x0, 0x68(%rbx) leaq 0x48(%rbx), %rdi callq 0x1cb34 leaq 0x40(%rbx), %rdi callq 0xbd22 movq 0x20(%rbx), %rdi leaq 0x30(%rbx), %rax cmpq %rax, %rdi je 0xbd0d callq 0xb180 movq (%rbx), %rdi addq $0x10, %rbx cmpq %rbx, %rdi je 0xbd1f popq %rbx jmp 0xb180 popq %rbx retq nop
/webmproject[P]libwebm/m2ts/webm2pes.h
libwebm::Webm2Pes::Webm2Pes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, libwebm::PacketReceiverInterface*)
Webm2Pes(const std::string& input_file, PacketReceiverInterface* packet_sink) : input_file_name_(input_file), packet_sink_(packet_sink) {}
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) movq (%rsi), %rax movq 0x8(%rsi), %rdx addq %rax, %rdx movq %rax, %rsi callq 0xbc00 leaq 0x30(%rbx), %r13 movq %r13, 0x20(%rbx) xorl %eax, %eax movq %rax, 0x28(%rbx) movb $0x0, 0x30(%rbx) leaq 0x40(%rbx), %r15 movq %rax, 0x40(%rbx) leaq 0x48(%rbx), %rdi callq 0x1ca98 movq $0x0, 0x68(%rbx) movl $0x0, 0x70(%rbx) movq $0xf4240, 0x78(%rbx) # imm = 0xF4240 movq %r14, 0x80(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x88(%rbx) movups %xmm0, 0x98(%rbx) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq %r15, %rdi callq 0xbd22 movq 0x20(%rbx), %rdi cmpq %r13, %rdi je 0xc5b3 callq 0xb180 movq (%rbx), %rdi cmpq %r12, %rdi je 0xc5c0 callq 0xb180 movq %r14, %rdi callq 0xb2b0
/webmproject[P]libwebm/m2ts/webm2pes.h
libwebm::VpxPesParser::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool VpxPesParser::Open(const std::string& pes_file) { pes_file_size_ = static_cast<size_t>(libwebm::GetFileSize(pes_file)); if (pes_file_size_ <= 0) return false; pes_file_data_.reserve(static_cast<size_t>(pes_file_size_)); libwebm::FilePtr file = libwebm::FilePtr(std::fopen(pes_file.c_str(), "rb"), libwebm::FILEDeleter()); int byte; while ((byte = fgetc(file.get())) != EOF) { pes_file_data_.push_back(static_cast<std::uint8_t>(byte)); } if (!feof(file.get()) || ferror(file.get()) || pes_file_size_ != pes_file_data_.size()) { return false; } read_pos_ = 0; parse_state_ = kFindStartCode; return true; }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0xe63a movq %rax, 0x38(%r14) testq %rax, %rax je 0xc78e leaq 0x58(%r14), %r15 movq %r15, %rdi movq %rax, %rsi callq 0xc5c8 movq (%rbx), %rdi leaq 0x10b52(%rip), %rsi # 0x1d24c callq 0xb1f0 movq %rax, %rbx movq %rax, %rdi callq 0xb280 cmpl $-0x1, %eax je 0xc742 leaq 0xf(%rsp), %r12 movb %al, 0xf(%rsp) movq 0x60(%r14), %rsi cmpq 0x68(%r14), %rsi je 0xc72a movb %al, (%rsi) incq 0x60(%r14) jmp 0xc735 movq %r15, %rdi movq %r12, %rdx callq 0xd034 movq %rbx, %rdi callq 0xb280 cmpl $-0x1, %eax jne 0xc714 movq %rbx, %rdi callq 0xb270 testl %eax, %eax je 0xc77d movq %rbx, %rdi callq 0xb2f0 testl %eax, %eax jne 0xc77d movq 0x60(%r14), %rax subq 0x58(%r14), %rax cmpq %rax, 0x38(%r14) jne 0xc77d movq $0x0, 0x70(%r14) movl $0x0, 0x78(%r14) movb $0x1, %bpl jmp 0xc77f xorl %ebp, %ebp testq %rbx, %rbx je 0xc790 movq %rbx, %rdi callq 0xb190 jmp 0xc790 xorl %ebp, %ebp movl %ebp, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 testq %rbx, %rbx je 0xc7af movq %rbx, %rdi callq 0xb190 movq %r14, %rdi callq 0xb2b0 nop
/webmproject[P]libwebm/m2ts/vpxpes_parser.cc
libwebm::VpxPesParser::ParsePesHeader(libwebm::VpxPesParser::PesHeader*)
bool VpxPesParser::ParsePesHeader(PesHeader* header) { if (!header || parse_state_ != kParsePesHeader) return false; if (!VerifyPacketStartCode()) return false; std::size_t pos = read_pos_; for (auto& a : header->start_code) { a = pes_file_data_[pos++]; } // PES Video stream IDs start at E0. if (!ReadStreamId(&header->stream_id)) return false; if (header->stream_id < kMinVideoStreamId || header->stream_id > kMaxVideoStreamId) return false; if (!ReadPacketLength(&header->packet_length)) return false; read_pos_ += kPesHeaderSize; parse_state_ = kParsePesOptionalHeader; return true; }
testq %rsi, %rsi je 0xc8a8 cmpl $0x1, 0x78(%rdi) jne 0xc8a8 movq 0x70(%rdi), %rax leaq 0x2(%rax), %rcx movq 0x58(%rdi), %rdx movq 0x60(%rdi), %r8 subq %rdx, %r8 cmpq %r8, %rcx ja 0xc8a8 cmpb $0x0, (%rdx,%rax) jne 0xc8a8 cmpb $0x0, 0x1(%rdx,%rax) jne 0xc8a8 cmpb $0x1, (%rdx,%rcx) jne 0xc8a8 xorl %ecx, %ecx movq 0x58(%rdi), %rdx addq %rax, %rdx movb (%rcx,%rdx), %dl movb %dl, (%rsi,%rcx) incq %rcx cmpq $0x4, %rcx jne 0xc87e movl 0x60(%rdi), %edx movq 0x58(%rdi), %rax movq 0x70(%rdi), %rcx subl %ecx, %edx subl %eax, %edx cmpl $0x4, %edx jge 0xc8ab xorl %eax, %eax retq movb 0x3(%rax,%rcx), %cl movb %cl, 0x6(%rsi) xorl %eax, %eax cmpb (%rdi), %cl jb 0xc8aa cmpb 0x1(%rdi), %cl ja 0xc8aa movl 0x60(%rdi), %edx movq 0x58(%rdi), %rcx movq 0x70(%rdi), %rax subl %eax, %edx subl %ecx, %edx cmpl $0x6, %edx jl 0xc8a8 movzwl 0x4(%rcx,%rax), %ecx rolw $0x8, %cx movw %cx, 0x4(%rsi) addq 0x8(%rdi), %rax movq %rax, 0x70(%rdi) movl $0x2, 0x78(%rdi) movb $0x1, %al retq
/webmproject[P]libwebm/m2ts/vpxpes_parser.cc
libwebm::VpxPesParser::FindStartCode(unsigned long, unsigned long*) const
bool VpxPesParser::FindStartCode(std::size_t origin, std::size_t* offset) const { if (read_pos_ + 2 >= pes_file_size_) return false; const std::size_t length = pes_file_size_ - origin; if (length < 3) return false; const uint8_t* const data = &pes_file_data_[origin]; for (std::size_t i = 0; i < length - 3; ++i) { if (data[i] == 0 && data[i + 1] == 0 && data[i + 2] == 1) { *offset = origin + i; return true; } } return false; }
movq 0x38(%rdi), %rcx movq 0x70(%rdi), %rax addq $0x2, %rax cmpq %rcx, %rax jae 0xccec movq %rcx, %rax subq %rsi, %rax cmpq $0x3, %rax jb 0xccec addq $-0x3, %rax setne %al je 0xccee movq 0x58(%rdi), %rax addq $-0x3, %rcx cmpb $0x0, (%rax,%rsi) jne 0xcce4 cmpb $0x0, 0x1(%rax,%rsi) jne 0xcce4 cmpb $0x1, 0x2(%rax,%rsi) je 0xccef incq %rsi cmpq %rsi, %rcx jne 0xccd0 xorl %eax, %eax retq movq %rsi, (%rdx) movb $0x1, %al retq nop
/webmproject[P]libwebm/m2ts/vpxpes_parser.cc
libwebm::VpxPesParser::ParseNextPacket(libwebm::VpxPesParser::PesHeader*, libwebm::VideoFrame*)
bool VpxPesParser::ParseNextPacket(PesHeader* header, VideoFrame* frame) { if (!header || !frame || parse_state_ != kFindStartCode || BytesAvailable() == 0) { return false; } std::size_t packet_start_pos = read_pos_; if (!FindStartCode(read_pos_, &packet_start_pos)) { return false; } parse_state_ = kParsePesHeader; read_pos_ = packet_start_pos; if (!ParsePesHeader(header)) { return false; } if (!ParsePesOptionalHeader(&header->opt_header)) { return false; } if (!ParseBcmvHeader(&header->bcmv_header)) { return false; } // BCMV header length includes the length of the BCMVHeader itself. Adjust: const std::size_t payload_length = header->bcmv_header.length - BcmvHeader::size(); // Make sure there's enough input data to read the entire frame. if (read_pos_ + payload_length > pes_file_data_.size()) { // Need more data. printf("VpxPesParser: Not enough data. Required: %u Available: %u\n", static_cast<unsigned int>(payload_length), static_cast<unsigned int>(pes_file_data_.size() - read_pos_)); parse_state_ = kFindStartCode; read_pos_ = packet_start_pos; return false; } if (IsPayloadFragmented(*header)) { if (!AccumulateFragmentedPayload(header->packet_length, payload_length)) { fprintf(stderr, "VpxPesParser: Failed parsing fragmented payload!\n"); return false; } } else { std::size_t consumed = 0; if (!RemoveStartCodeEmulationPreventionBytes( &pes_file_data_[read_pos_], payload_length, &payload_, &consumed)) { return false; } read_pos_ += consumed; } if (frame->buffer().capacity < payload_.size()) { if (frame->Init(payload_.size()) == false) { fprintf(stderr, "VpxPesParser: Out of memory.\n"); return false; } } frame->set_nanosecond_pts(Khz90TicksToNanoseconds(header->opt_header.pts)); std::memcpy(frame->buffer().data.get(), &payload_[0], payload_.size()); frame->SetBufferLength(payload_.size()); payload_.clear(); parse_state_ = kFindStartCode; return true; }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp testq %rsi, %rsi sete %al testq %rdx, %rdx sete %cl orb %al, %cl jne 0xcea9 movq %rdi, %rbx cmpl $0x0, 0x78(%rdi) je 0xceba xorl %ebp, %ebp movl %ebp, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rsi, %r15 movq 0x70(%rbx), %rsi movl 0x58(%rbx), %eax addl %esi, %eax cmpl %eax, 0x60(%rbx) je 0xcea9 movq %rdx, %r14 leaq 0x8(%rsp), %rdx movq %rsi, (%rdx) movq %rbx, %rdi callq 0xcca2 testb %al, %al je 0xcea9 movl $0x1, 0x78(%rbx) movq 0x8(%rsp), %r12 movq %r12, 0x70(%rbx) movq %rbx, %rdi movq %r15, %rsi callq 0xc846 testb %al, %al je 0xcea9 leaq 0x8(%r15), %rsi movq %rbx, %rdi callq 0xc8f0 testb %al, %al je 0xcea9 leaq 0x48(%r15), %rsi movq %rbx, %rdi callq 0xcb6e testb %al, %al je 0xcea9 movl 0x4c(%r15), %edi leaq -0xa(%rdi), %rdx movq 0x70(%rbx), %rcx leaq (%rdi,%rcx), %r8 addq $-0xa, %r8 movq 0x58(%rbx), %rsi movq 0x60(%rbx), %rax subq %rsi, %rax cmpq %rax, %r8 jbe 0xcf6b subl %ecx, %eax leaq 0x10301(%rip), %rdi # 0x1d24f xorl %ebp, %ebp movl %edx, %esi movl %eax, %edx xorl %eax, %eax callq 0xb050 movl $0x0, 0x78(%rbx) movq %r12, 0x70(%rbx) jmp 0xceab movzwl 0x4(%r15), %eax testq %rax, %rax je 0xcf9a movq %rax, %r8 subq 0x18(%rbx), %r8 cmpq %rdi, %r8 je 0xcf9a movq %rbx, %rdi movq %rax, %rsi callq 0xcd10 testb %al, %al jne 0xcfc3 callq 0xb46e jmp 0xcea9 movq %rsp, %r8 movq $0x0, (%r8) addq %rcx, %rsi leaq 0x40(%rbx), %rcx movq %rbx, %rdi callq 0xcab4 testb %al, %al je 0xcea9 movq (%rsp), %rax addq %rax, 0x70(%rbx) movq 0x48(%rbx), %rsi subq 0x40(%rbx), %rsi cmpq %rsi, 0x10(%r14) jae 0xcfdd movq %r14, %rdi callq 0xc112 testb %al, %al je 0xd02a movq 0x38(%r15), %rdi callq 0xbd6b movq %rax, 0x20(%r14) movq (%r14), %rdi movq 0x40(%rbx), %rsi movq 0x48(%rbx), %rdx subq %rsi, %rdx callq 0xb160 movq 0x48(%rbx), %rsi subq 0x40(%rbx), %rsi movq %r14, %rdi callq 0xc124 movq 0x40(%rbx), %rax cmpq %rax, 0x48(%rbx) je 0xd01b movq %rax, 0x48(%rbx) movl $0x0, 0x78(%rbx) movb $0x1, %bpl jmp 0xceab callq 0xb48a jmp 0xcea9
/webmproject[P]libwebm/m2ts/vpxpes_parser.cc
libwebm::PesOptionalHeader::SetPtsBits(long)
void PesOptionalHeader::SetPtsBits(std::int64_t pts_90khz) { // PTS is broken up and stored in 40 bits as shown: // // PES PTS Only flag // / Marker Marker Marker // | / / / // | | | | // 7654 321 0 765432107654321 0 765432107654321 0 // 0010 PTS 32-30 1 PTS 29-15 1 PTS 14-0 1 const std::uint32_t pts1 = (pts_90khz >> 30) & 0x7; const std::uint32_t pts2 = (pts_90khz >> 15) & 0x7FFF; const std::uint32_t pts3 = pts_90khz & 0x7FFF; pts.bits = 0; // bottom 7 bits of second PTS chunk. pts.bits |= (pts3 << 1) & 0xff; // Marker. pts.bits |= 1; // Last 15 bits of pts and 1 bit marker. // Top 8 bits of second PTS chunk. pts.bits <<= 8; pts.bits |= (pts3 >> 7) & 0xff; // bottom 7 bits of second PTS chunk. pts.bits <<= 8; pts.bits |= (pts2 << 1); // Marker. pts.bits |= 1; // Next 15 bits of pts and 1 bit marker. // Top 8 bits of second PTS chunk. pts.bits <<= 8; pts.bits |= (pts2 >> 7) & 0xff; // PTS only flag. pts.bits <<= 8; pts.bits |= 1 << 5; // Top 3 bits of PTS and 1 bit marker. pts.bits |= pts1 << 1; // Marker. pts.bits |= 1; }
movl %esi, %eax shrl $0x6, %eax andl $0xfffe00, %eax # imm = 0xFFFE00 movl %esi, %ecx shll $0x19, %ecx movl %esi, %edx shll $0x9, %edx andl $0xff0000, %edx # imm = 0xFF0000 orl %ecx, %edx orl %eax, %edx movl %esi, %eax shrl $0x16, %eax movzbl %al, %eax orl %edx, %eax shlq $0x8, %rax shrq $0x1d, %rsi andl $0xe, %esi orq %rax, %rsi movabsq $0x100010021, %rax # imm = 0x100010021 orq %rsi, %rax movq %rax, 0xf0(%rdi) retq nop
/webmproject[P]libwebm/m2ts/webm2pes.cc
libwebm::PesOptionalHeader::Write(bool, std::vector<unsigned char, std::allocator<unsigned char>>*) const
bool PesOptionalHeader::Write(bool write_pts, PacketDataBuffer* buffer) const { if (buffer == nullptr) { std::fprintf(stderr, "Webm2Pes: nullptr in opt header writer.\n"); return false; } const int kHeaderSize = 9; std::uint8_t header[kHeaderSize] = {0}; std::uint8_t* byte = header; if (marker.Check() != true || scrambling.Check() != true || priority.Check() != true || data_alignment.Check() != true || copyright.Check() != true || original.Check() != true || has_pts.Check() != true || has_dts.Check() != true || pts.Check() != true || stuffing_byte.Check() != true) { std::fprintf(stderr, "Webm2Pes: Invalid PES Optional Header field.\n"); return false; } // TODO(tomfinegan): As noted in above, the PesHeaderFields should be an // array (or some data structure) that can be iterated over. // First byte of header, fields: marker, scrambling, priority, alignment, // copyright, original. *byte = 0; *byte |= marker.bits << marker.shift; *byte |= scrambling.bits << scrambling.shift; *byte |= priority.bits << priority.shift; *byte |= data_alignment.bits << data_alignment.shift; *byte |= copyright.bits << copyright.shift; *byte |= original.bits << original.shift; // Second byte of header, fields: has_pts, has_dts, unused fields. *++byte = 0; if (write_pts == true) *byte |= has_pts.bits << has_pts.shift; *byte |= has_dts.bits << has_dts.shift; // Third byte of header, fields: remaining size of header. *++byte = remaining_size.bits & 0xff; // Field is 8 bits wide. int num_stuffing_bytes = (pts.num_bits + 7) / 8 + 1 /* always 1 stuffing byte */; if (write_pts == true) { // Write the PTS value as big endian and adjust stuffing byte count // accordingly. *++byte = pts.bits & 0xff; *++byte = (pts.bits >> 8) & 0xff; *++byte = (pts.bits >> 16) & 0xff; *++byte = (pts.bits >> 24) & 0xff; *++byte = (pts.bits >> 32) & 0xff; num_stuffing_bytes = 1; } // Add the stuffing byte(s). for (int i = 0; i < num_stuffing_bytes; ++i) *++byte = stuffing_byte.bits & 0xff; return CopyAndEscapeStartCodes(&header[0], kHeaderSize, buffer); }
pushq %rbx subq $0x10, %rsp testq %rdx, %rdx je 0xd4b7 movb $0x0, 0x8(%rsp) movq $0x0, (%rsp) movl 0x8(%rdi), %eax decl %eax cmpl $0x3f, %eax ja 0xd474 movl 0x10(%rdi), %ecx cmpl $0x3f, %ecx ja 0xd474 movl 0x20(%rdi), %eax decl %eax cmpl $0x3f, %eax ja 0xd474 cmpl $0x3f, 0x28(%rdi) ja 0xd474 movl 0x38(%rdi), %eax decl %eax cmpl $0x3f, %eax ja 0xd474 cmpl $0x3f, 0x40(%rdi) ja 0xd474 movl 0x50(%rdi), %eax decl %eax cmpl $0x3f, %eax ja 0xd474 cmpl $0x3f, 0x58(%rdi) ja 0xd474 movl 0x68(%rdi), %eax decl %eax cmpl $0x3f, %eax ja 0xd474 cmpl $0x3f, 0x70(%rdi) ja 0xd474 movl 0x80(%rdi), %eax decl %eax cmpl $0x3f, %eax ja 0xd474 cmpl $0x3f, 0x88(%rdi) ja 0xd474 movl 0x98(%rdi), %eax decl %eax cmpl $0x3f, %eax ja 0xd474 cmpl $0x3f, 0xa0(%rdi) ja 0xd474 movl 0xb0(%rdi), %eax decl %eax cmpl $0x3f, %eax ja 0xd474 cmpl $0x3f, 0xb8(%rdi) ja 0xd474 movl 0xf8(%rdi), %eax decl %eax cmpl $0x3f, %eax ja 0xd474 cmpl $0x3f, 0x100(%rdi) ja 0xd474 movl 0x110(%rdi), %eax decl %eax cmpl $0x3f, %eax ja 0xd474 cmpl $0x40, 0x118(%rdi) jae 0xd474 movq %rdx, %rbx xorl %eax, %eax movb %al, (%rsp) movq (%rdi), %rdx shlq %cl, %rdx movb %dl, (%rsp) movq 0x18(%rdi), %r8 movb 0x28(%rdi), %cl shlq %cl, %r8 orq %rdx, %r8 movb %r8b, (%rsp) movq 0x30(%rdi), %rdx movb 0x40(%rdi), %cl shlq %cl, %rdx orq %r8, %rdx movb %dl, (%rsp) movq 0x48(%rdi), %r8 movb 0x58(%rdi), %cl shlq %cl, %r8 orq %rdx, %r8 movb %r8b, (%rsp) movq 0x60(%rdi), %rdx movb 0x70(%rdi), %cl shlq %cl, %rdx orq %r8, %rdx movb %dl, (%rsp) movq 0x78(%rdi), %r8 movb 0x88(%rdi), %cl shlq %cl, %r8 orl %edx, %r8d movb %r8b, (%rsp) movb %al, 0x1(%rsp) testb %sil, %sil je 0xd40b movq 0x90(%rdi), %rax movb 0xa0(%rdi), %cl shlq %cl, %rax movb %al, 0x1(%rsp) movq 0xa8(%rdi), %rax movb 0xb8(%rdi), %cl shlq %cl, %rax orb %al, 0x1(%rsp) movb 0xd8(%rdi), %al movb %al, 0x2(%rsp) movl 0xf8(%rdi), %ecx leal 0x7(%rcx), %eax addl $0xe, %ecx testl %eax, %eax cmovnsl %eax, %ecx testb %sil, %sil je 0xd47d movq 0xf0(%rdi), %rax movb %al, 0x3(%rsp) movb %ah, 0x4(%rsp) movl %eax, %ecx shrl $0x10, %ecx movb %cl, 0x5(%rsp) movl %eax, %ecx shrl $0x18, %ecx movb %cl, 0x6(%rsp) shrq $0x20, %rax movb %al, 0x7(%rsp) movl $0x1, %ecx movl $0x7, %eax jmp 0xd487 callq 0xb4a6 xorl %eax, %eax jmp 0xd4b1 sarl $0x3, %ecx incl %ecx movl $0x2, %eax testl %ecx, %ecx jle 0xd4a1 addq %rsp, %rax incq %rax movl %ecx, %edx movl 0x108(%rdi), %esi movq %rax, %rdi callq 0xb100 movq %rsp, %rdi movl $0x9, %esi movq %rbx, %rdx callq 0xd4be addq $0x10, %rsp popq %rbx retq callq 0xb4c2 jmp 0xd479
/webmproject[P]libwebm/m2ts/webm2pes.cc
libwebm::CopyAndEscapeStartCodes(unsigned char const*, unsigned long, std::vector<unsigned char, std::allocator<unsigned char>>*)
bool CopyAndEscapeStartCodes(const std::uint8_t* raw_input, std::size_t raw_input_length, PacketDataBuffer* packet_buffer) { if (raw_input == nullptr || raw_input_length < 1 || packet_buffer == nullptr) return false; int num_zeros = 0; for (std::size_t i = 0; i < raw_input_length; ++i) { const uint8_t byte = raw_input[i]; if (byte == 0) { ++num_zeros; } else if (num_zeros >= 2 && (byte == 0x1 || byte == 0x3)) { packet_buffer->push_back(0x3); num_zeros = 0; } else { num_zeros = 0; } packet_buffer->push_back(byte); } return true; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax testq %rdi, %rdi setne %al testq %rsi, %rsi setne %cl andb %al, %cl testq %rdx, %rdx setne %bpl andb %cl, %bpl cmpb $0x1, %bpl jne 0xd566 movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 xorl %r13d, %r13d xorl %r12d, %r12d movb (%r15,%r13), %al movb %al, 0x6(%rsp) testb %al, %al je 0xd526 cmpl $0x2, %r12d jl 0xd538 andb $-0x3, %al cmpb $0x1, %al jne 0xd538 movb $0x3, 0x7(%rsp) movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0xd52b movb $0x3, (%rsi) incq 0x8(%rbx) jmp 0xd538 incl %r12d jmp 0xd53b movq %rbx, %rdi leaq 0x7(%rsp), %rdx callq 0xd034 xorl %r12d, %r12d movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0xd551 movb 0x6(%rsp), %al movb %al, (%rsi) incq 0x8(%rbx) jmp 0xd55e movq %rbx, %rdi leaq 0x6(%rsp), %rdx callq 0xd122 incq %r13 cmpq %r13, %r14 jne 0xd4f6 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/webmproject[P]libwebm/m2ts/webm2pes.cc
libwebm::BCMVHeader::Write(std::vector<unsigned char, std::allocator<unsigned char>>*) const
bool BCMVHeader::Write(PacketDataBuffer* buffer) const { if (buffer == nullptr) { std::fprintf(stderr, "Webm2Pes: nullptr for buffer in BCMV Write.\n"); return false; } const int kBcmvSize = 4; for (int i = 0; i < kBcmvSize; ++i) buffer->push_back(bcmv[i]); // Note: The 4 byte length field must include the size of the BCMV header. const int kRemainingBytes = 6; const uint32_t bcmv_total_length = length + static_cast<uint32_t>(size()); const uint8_t bcmv_buffer[kRemainingBytes] = { static_cast<std::uint8_t>((bcmv_total_length >> 24) & 0xff), static_cast<std::uint8_t>((bcmv_total_length >> 16) & 0xff), static_cast<std::uint8_t>((bcmv_total_length >> 8) & 0xff), static_cast<std::uint8_t>(bcmv_total_length & 0xff), 0, 0 /* 2 bytes 0 padding */}; return CopyAndEscapeStartCodes(bcmv_buffer, kRemainingBytes, buffer); }
pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp testq %rsi, %rsi je 0xd5f7 movq %rsi, %rbx movq %rdi, %r14 xorl %r15d, %r15d leaq (%r14,%r15), %rdx movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0xd5a7 movb (%rdx), %al movb %al, (%rsi) incq 0x8(%rbx) jmp 0xd5af movq %rbx, %rdi callq 0xd122 incq %r15 cmpq $0x4, %r15 jne 0xd58f movl 0x4(%r14), %eax addl $0xa, %eax movl %eax, %ecx shrl $0x18, %ecx leaq 0xa(%rsp), %rdi movb %cl, (%rdi) movl %eax, %ecx shrl $0x10, %ecx movb %cl, 0x1(%rdi) movb %ah, 0xc(%rsp) movb %al, 0x3(%rdi) movw $0x0, 0x4(%rdi) movl $0x6, %esi movq %rbx, %rdx callq 0xd4be addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq callq 0xb4de xorl %eax, %eax jmp 0xd5ed
/webmproject[P]libwebm/m2ts/webm2pes.cc
libwebm::TempFileDeleter::TempFileDeleter()
TempFileDeleter::TempFileDeleter() { file_name_ = GetTempFileName(); }
pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx leaq 0x10(%rdi), %r15 movq %r15, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsp, %rdi callq 0xe478 movq %rsp, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0xb210 movq (%r14), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0xe79f callq 0xb180 addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r15, %rdi je 0xe7b9 callq 0xb180 movq %r14, %rdi callq 0xb2b0 nop
/webmproject[P]libwebm/common/file_util.cc
mkvparser::ReadUInt(mkvparser::IMkvReader*, long long, long&)
long long ReadUInt(IMkvReader* pReader, long long pos, long& len) { if (!pReader || pos < 0) return E_FILE_FORMAT_INVALID; len = 1; unsigned char b; int status = pReader->Read(pos, 1, &b); if (status < 0) // error or underflow return status; if (status > 0) // interpreted as "underflow" return E_BUFFER_NOT_FULL; if (b == 0) // we can't handle u-int values larger than 8 bytes return E_FILE_FORMAT_INVALID; unsigned char m = 0x80; while (!(b & m)) { m >>= 1; ++len; } long long result = b & (~m); ++pos; for (int i = 1; i < len; ++i) { status = pReader->Read(pos, 1, &b); if (status < 0) { len = 1; return status; } if (status > 0) { len = 1; return E_BUFFER_NOT_FULL; } result <<= 8; result |= b; ++pos; } return result; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax testq %rdi, %rdi sete %al testq %rsi, %rsi sets %cl orb %al, %cl movq $-0x2, %r12 jne 0xe92d movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq $0x1, (%rdx) movq (%rdi), %rax leaq 0x7(%rsp), %rcx movl $0x1, %edx callq *(%rax) testl %eax, %eax js 0xe92a movq $-0x3, %r12 jne 0xe92d movzbl 0x7(%rsp), %eax testl %eax, %eax je 0xe8d1 testb %al, %al js 0xe8da movq (%rbx), %rcx movl $0x80, %r12d shrl %r12d incq %rcx testl %eax, %r12d je 0xe8be movq %rcx, (%rbx) notl %r12d jmp 0xe8e0 movq $-0x2, %r12 jmp 0xe92d movl $0xffffff7f, %r12d # imm = 0xFFFFFF7F andl %eax, %r12d cmpq $0x2, (%rbx) jl 0xe92d movl $0x1, %ebp leaq 0x7(%rsp), %r13 leaq (%r14,%rbp), %rsi movq (%r15), %rax movl $0x1, %edx movq %r15, %rdi movq %r13, %rcx callq *(%rax) testl %eax, %eax js 0xe923 jne 0xe93f shlq $0x8, %r12 movzbl 0x7(%rsp), %eax orq %rax, %r12 incq %rbp cmpq %rbp, (%rbx) jg 0xe8f3 jmp 0xe92d movq $0x1, (%rbx) movslq %eax, %r12 movq %r12, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq $0x1, (%rbx) movq $-0x3, %r12 jmp 0xe92d
/webmproject[P]libwebm/mkvparser/mkvparser.cc
mkvparser::ParseElementHeader(mkvparser::IMkvReader*, long long&, long long, long long&, long long&)
long ParseElementHeader(IMkvReader* pReader, long long& pos, long long stop, long long& id, long long& size) { if (stop >= 0 && pos >= stop) return E_FILE_FORMAT_INVALID; long len; id = ReadID(pReader, pos, len); if (id < 0) return E_FILE_FORMAT_INVALID; pos += len; // consume id if (stop >= 0 && pos >= stop) return E_FILE_FORMAT_INVALID; size = ReadUInt(pReader, pos, len); if (size < 0 || len < 1 || len > 8) { // Invalid: Negative payload size, negative or 0 length integer, or integer // larger than 64 bits (libwebm cannot handle them). return E_FILE_FORMAT_INVALID; } // Avoid rolling over pos when very close to LLONG_MAX. const unsigned long long rollover_check = static_cast<unsigned long long>(pos) + len; if (rollover_check > LLONG_MAX) return E_FILE_FORMAT_INVALID; pos += len; // consume length of size // pos now designates payload if (stop >= 0 && pos > stop) return E_FILE_FORMAT_INVALID; return 0; // success }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbp movq %rsi, %r14 testq %rdx, %rdx setns %al movq (%rsi), %rsi cmpq %rdx, %rsi setge %cl movq $-0x2, %r15 testb %cl, %al jne 0xef07 movq %r8, %r12 movq %rdx, %rbx movq %rdi, %r13 movq %rsp, %rdx callq 0xe94f movq %rax, (%rbp) movq $-0x2, %r15 testq %rax, %rax js 0xef07 testq %rbx, %rbx setns %al movq (%r14), %rsi addq (%rsp), %rsi movq %rsi, (%r14) cmpq %rbx, %rsi setge %cl testb %cl, %al jne 0xef07 movq %rsp, %rbp movq %r13, %rdi movq %rbp, %rdx callq 0xe84e movq %rax, (%r12) testq %rax, %rax sets %cl movq (%rbp), %rax leaq -0x9(%rax), %rdx cmpq $-0x8, %rdx setb %dl orb %cl, %dl jne 0xef07 addq (%r14), %rax js 0xef07 movq %rax, (%r14) xorl %ecx, %ecx cmpq %rbx, %rax setbe %cl leaq -0x2(,%rcx,2), %r15 movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/webmproject[P]libwebm/mkvparser/mkvparser.cc
mkvparser::Match(mkvparser::IMkvReader*, long long&, unsigned long, long long&)
bool Match(IMkvReader* pReader, long long& pos, unsigned long expected_id, long long& val) { if (!pReader || pos < 0) return false; long long total = 0; long long available = 0; const long status = pReader->Length(&total, &available); if (status < 0 || (total >= 0 && available > total)) return false; long len = 0; const long long id = ReadID(pReader, pos, len); if (id < 0 || (available - pos) > len) return false; if (static_cast<unsigned long>(id) != expected_id) return false; pos += len; // consume id const long long size = ReadUInt(pReader, pos, len); if (size < 0 || size > 8 || len < 1 || len > 8 || (available - pos) > len) return false; pos += len; // consume length of size of payload val = UnserializeUInt(pReader, pos, size); if (val < 0) return false; pos += size; // consume size of payload return true; }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x20, %rsp xorl %r12d, %r12d testq %rdi, %rdi je 0xf022 movq %rsi, %rbx cmpq $0x0, (%rsi) js 0xf022 movq %rcx, %r14 movq %rdx, %r13 movq %rdi, %r15 xorl %r12d, %r12d leaq 0x18(%rsp), %rsi movq %r12, (%rsi) leaq 0x8(%rsp), %rdx movq %r12, (%rdx) movq (%rdi), %rax callq *0x8(%rax) testl %eax, %eax js 0xf022 movq 0x18(%rsp), %rax testq %rax, %rax js 0xef7e cmpq %rax, 0x8(%rsp) jg 0xf01f leaq 0x10(%rsp), %rdx movq $0x0, (%rdx) movq (%rbx), %rsi movq %r15, %rdi callq 0xe94f testq %rax, %rax js 0xf01f xorl %r12d, %r12d cmpq %r13, %rax jne 0xf022 movq 0x8(%rsp), %rcx movq (%rbx), %rax subq %rax, %rcx movq 0x10(%rsp), %rsi cmpq %rsi, %rcx jg 0xf022 addq %rax, %rsi movq %rsi, (%rbx) leaq 0x10(%rsp), %r13 movq %r15, %rdi movq %r13, %rdx callq 0xe84e movq %rax, %r12 cmpq $0x9, %rax setae %cl movq (%r13), %rax leaq -0x9(%rax), %rdx cmpq $-0x8, %rdx setb %dl orb %cl, %dl jne 0xf01f movq 0x8(%rsp), %rcx movq (%rbx), %rsi subq %rsi, %rcx cmpq %rax, %rcx jg 0xf01f addq %rax, %rsi movq %rsi, (%rbx) movq %r15, %rdi movq %r12, %rdx callq 0xeb62 movq %rax, (%r14) testq %rax, %rax js 0xf01f addq %r12, (%rbx) movb $0x1, %r12b jmp 0xf022 xorl %r12d, %r12d movl %r12d, %eax addq $0x20, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
/webmproject[P]libwebm/mkvparser/mkvparser.cc
mkvparser::EBMLHeader::Init()
void EBMLHeader::Init() { m_version = 1; m_readVersion = 1; m_maxIdLength = 4; m_maxSizeLength = 8; if (m_docType) { delete[] m_docType; m_docType = NULL; } m_docTypeVersion = 1; m_docTypeReadVersion = 1; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x1, %r14d movq %r14, (%rdi) movq %r14, 0x8(%rdi) movq $0x4, 0x10(%rdi) movq $0x8, 0x18(%rdi) movq 0x20(%rdi), %rdi testq %rdi, %rdi je 0xf1fe callq 0xb240 movq $0x0, 0x20(%rbx) movq %r14, 0x28(%rbx) movq %r14, 0x30(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
/webmproject[P]libwebm/mkvparser/mkvparser.cc
mkvparser::Tracks::Parse()
long Tracks::Parse() { assert(m_trackEntries == NULL); assert(m_trackEntriesEnd == NULL); const long long stop = m_start + m_size; IMkvReader* const pReader = m_pSegment->m_pReader; long long count = 0; long long pos = m_start; while (pos < stop) { long long id, size; const long status = ParseElementHeader(pReader, pos, stop, id, size); if (status < 0) // error return status; if (size == 0) // weird continue; if (id == libwebm::kMkvTrackEntry) { ++count; if (count > INT_MAX) return E_PARSE_FAILED; } pos += size; // consume payload if (pos > stop) return E_FILE_FORMAT_INVALID; } if (pos != stop) return E_FILE_FORMAT_INVALID; if (count <= 0) return 0; // success m_trackEntries = new (std::nothrow) Track*[static_cast<size_t>(count)]; if (m_trackEntries == NULL) return -1; m_trackEntriesEnd = m_trackEntries; pos = m_start; while (pos < stop) { const long long element_start = pos; long long id, payload_size; const long status = ParseElementHeader(pReader, pos, stop, id, payload_size); if (status < 0) // error return status; if (payload_size == 0) // weird continue; const long long payload_stop = pos + payload_size; assert(payload_stop <= stop); // checked in ParseElement const long long element_size = payload_stop - element_start; if (id == libwebm::kMkvTrackEntry) { Track*& pTrack = *m_trackEntriesEnd; pTrack = NULL; const long status = ParseTrackEntry(pos, payload_size, element_start, element_size, pTrack); if (status) return status; if (pTrack) ++m_trackEntriesEnd; } pos = payload_stop; if (pos > stop) return E_FILE_FORMAT_INVALID; } if (pos != stop) return E_FILE_FORMAT_INVALID; return 0; // success }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp cmpq $0x0, 0x28(%rdi) jne 0x1046b cmpq $0x0, 0x30(%rdi) jne 0x1048a movq (%rdi), %rax movq 0x8(%rdi), %rcx movq %rdi, 0x8(%rsp) movq 0x10(%rdi), %rdx leaq (%rdx,%rcx), %r14 movq (%rax), %rax movq %rax, 0x20(%rsp) movq %rcx, (%rsp) xorl %r15d, %r15d testq %rdx, %rdx jle 0x1031a leaq 0x18(%rsp), %rbp leaq 0x10(%rsp), %rbx movq 0x20(%rsp), %rdi movq %rsp, %rsi movq %r14, %rdx movq %rbp, %rcx movq %rbx, %r8 callq 0xee5e movq %rax, %r13 movl $0x1, %eax testq %r13, %r13 js 0x10300 movq 0x10(%rsp), %rcx testq %rcx, %rcx je 0x102f8 cmpq $0xae, 0x18(%rsp) jne 0x102db leaq 0x1(%r15), %rdx movq $-0x1, %r13 cmpq $0x7ffffffe, %r15 # imm = 0x7FFFFFFE movq %rdx, %r15 jg 0x10300 addq (%rsp), %rcx movq %rcx, (%rsp) xorl %eax, %eax cmpq %r14, %rcx setg %al movq $-0x2, %rcx cmovgq %rcx, %r12 jmp 0x102fd movl $0x2, %eax movq %r12, %r13 testb $0x1, %al jne 0x1044c movq (%rsp), %rcx movq %r13, %r12 cmpq %r14, %rcx jl 0x1028c jmp 0x1031a movq $-0x2, %rax cmpq %r14, %rcx jne 0x1045c testq %r15, %r15 jle 0x10451 movq %r15, %rax shrq $0x3d, %rax shlq $0x3, %r15 xorl %edi, %edi negq %rax sbbq %rdi, %rdi orq %r15, %rdi movq 0x15c78(%rip), %rsi # 0x25fc8 callq 0xb2a0 movq 0x8(%rsp), %rcx movq %rax, 0x28(%rcx) testq %rax, %rax je 0x10455 movq %rax, 0x30(%rcx) movq 0x8(%rcx), %rbx movq %rbx, (%rsp) cmpq %r14, %rbx jge 0x1043a movq %rsp, %rbp movq 0x20(%rsp), %rdi movq %rbp, %rsi movq %r14, %rdx leaq 0x18(%rsp), %rcx leaq 0x10(%rsp), %r8 callq 0xee5e movl $0x1, %r15d testq %rax, %rax js 0x1041c movq 0x10(%rsp), %rdx testq %rdx, %rdx je 0x10421 movq (%rsp), %rsi leaq (%rsi,%rdx), %r12 cmpq %r14, %r12 jg 0x104a9 cmpq $0xae, 0x18(%rsp) jne 0x10413 movq %r12, %r8 subq %rbx, %r8 movq 0x8(%rsp), %rdi movq 0x30(%rdi), %rbp movq $0x0, (%rbp) movq %rbx, %rcx movq %rbp, %r9 callq 0x19e74 movq %rax, %rcx testq %rax, %rax jne 0x10408 cmpq $0x0, (%rbp) je 0x10405 movq 0x8(%rsp), %rcx addq $0x8, 0x30(%rcx) movq %r13, %rcx movq %rcx, %r13 testq %rax, %rax movq %rsp, %rbp jne 0x10427 movq %r12, (%rsp) xorl %r15d, %r15d jmp 0x10427 movq %rax, %r13 jmp 0x10427 movl $0x4, %r15d testb $0x3, %r15b jne 0x1044c movq (%rsp), %rbx cmpq %r14, %rbx jl 0x1037f xorl %eax, %eax cmpq %r14, %rbx sete %al leaq -0x2(,%rax,2), %rax jmp 0x1045c movq %r13, %rax jmp 0x1045c xorl %eax, %eax jmp 0x1045c movq $-0x1, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xe524(%rip), %rdi # 0x1e996 leaq 0xd50f(%rip), %rsi # 0x1d988 leaq 0xe52d(%rip), %rcx # 0x1e9ad movl $0x162b, %edx # imm = 0x162B callq 0xb130 leaq 0xe53c(%rip), %rdi # 0x1e9cd leaq 0xd4f0(%rip), %rsi # 0x1d988 leaq 0xe50e(%rip), %rcx # 0x1e9ad movl $0x162c, %edx # imm = 0x162C callq 0xb130 leaq 0xe537(%rip), %rdi # 0x1e9e7 leaq 0xd4d1(%rip), %rsi # 0x1d988 leaq 0xe4ef(%rip), %rcx # 0x1e9ad movl $0x1668, %edx # imm = 0x1668 callq 0xb130
/webmproject[P]libwebm/mkvparser/mkvparser.cc
mkvparser::Segment::DoLoadClusterUnknownSize(long long&, long&)
long Segment::DoLoadClusterUnknownSize(long long& pos, long& len) { if (m_pos >= 0 || m_pUnknownSize == NULL) return E_PARSE_FAILED; const long status = m_pUnknownSize->Parse(pos, len); if (status < 0) // error or underflow return status; if (status == 0) // parsed a block return 2; // continue parsing const long long start = m_pUnknownSize->m_element_start; const long long size = m_pUnknownSize->GetElementSize(); if (size < 0) return E_FILE_FORMAT_INVALID; pos = start + size; m_pos = pos; m_pUnknownSize = 0; return 2; // continue parsing }
movq $-0x1, %rax cmpq $0x0, 0x68(%rdi) js 0x10fe7 retq pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x70(%rdi), %rdi testq %rdi, %rdi je 0x11034 movq %rsi, %r14 callq 0x1182a testq %rax, %rax js 0x11034 movl $0x2, %eax je 0x11034 movq 0x70(%rbx), %rdx movq 0x20(%rdx), %rcx testq %rcx, %rcx js 0x1102d addq 0x8(%rdx), %rcx movq %rcx, (%r14) movq %rcx, 0x68(%rbx) movq $0x0, 0x70(%rbx) jmp 0x11034 movq $-0x2, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
/webmproject[P]libwebm/mkvparser/mkvparser.cc
mkvparser::AudioTrack::Parse(mkvparser::Segment*, mkvparser::Track::Info const&, long long, long long, mkvparser::AudioTrack*&)
long AudioTrack::Parse(Segment* pSegment, const Info& info, long long element_start, long long element_size, AudioTrack*& pResult) { if (pResult) return -1; if (info.type != Track::kAudio) return -1; IMkvReader* const pReader = pSegment->m_pReader; const Settings& s = info.settings; assert(s.start >= 0); assert(s.size >= 0); long long pos = s.start; assert(pos >= 0); const long long stop = pos + s.size; double rate = 8000.0; // MKV default long long channels = 1; long long bit_depth = 0; while (pos < stop) { long long id, size; long status = ParseElementHeader(pReader, pos, stop, id, size); if (status < 0) // error return status; if (id == libwebm::kMkvSamplingFrequency) { status = UnserializeFloat(pReader, pos, size, rate); if (status < 0) return status; if (rate <= 0) return E_FILE_FORMAT_INVALID; } else if (id == libwebm::kMkvChannels) { channels = UnserializeUInt(pReader, pos, size); if (channels <= 0) return E_FILE_FORMAT_INVALID; } else if (id == libwebm::kMkvBitDepth) { bit_depth = UnserializeUInt(pReader, pos, size); if (bit_depth <= 0) return E_FILE_FORMAT_INVALID; } pos += size; // consume payload if (pos > stop) return E_FILE_FORMAT_INVALID; } if (pos != stop) return E_FILE_FORMAT_INVALID; AudioTrack* const pTrack = new (std::nothrow) AudioTrack(pSegment, element_start, element_size); if (pTrack == NULL) return -1; // generic error const int status = info.Copy(pTrack->m_info); if (status) { delete pTrack; return status; } pTrack->m_rate = rate; pTrack->m_channels = channels; pTrack->m_bitDepth = bit_depth; pResult = pTrack; return 0; // success }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp cmpq $0x0, (%r8) movq $-0x1, %rbp jne 0x19ded cmpq $0x2, (%rsi) jne 0x19ded movq 0x68(%rsi), %rax testq %rax, %rax js 0x19dff movq %rdx, 0x38(%rsp) movq %rcx, 0x40(%rsp) movq %r8, 0x28(%rsp) movq %rsi, 0x48(%rsp) movq 0x70(%rsi), %r13 testq %r13, %r13 js 0x19e1e movq %rdi, 0x30(%rsp) movq (%rdi), %rbx movq %rsp, %r14 movq %rax, (%r14) addq %rax, %r13 movabsq $0x40bf400000000000, %rax # imm = 0x40BF400000000000 leaq 0x10(%rsp), %rcx movq %rax, (%rcx) movl $0x1, %eax movq %rax, 0x18(%rsp) movq $0x0, 0x20(%rsp) leaq 0x50(%rsp), %r15 leaq 0x8(%rsp), %r12 cmpq %r13, (%rsp) jge 0x19cf6 movq %rbx, %rdi movq %r14, %rsi movq %r13, %rdx movq %r15, %rcx movq %r12, %r8 callq 0xee5e testq %rax, %rax js 0x19c91 movq 0x50(%rsp), %rax cmpq $0x9f, %rax je 0x19cb0 cmpq $0x6264, %rax # imm = 0x6264 je 0x19c98 cmpq $0xb5, %rax jne 0x19ccb movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq %rbx, %rdi leaq 0x10(%rsp), %rcx callq 0xebf7 testq %rax, %rax js 0x19c91 xorpd %xmm0, %xmm0 ucomisd 0x10(%rsp), %xmm0 jb 0x19ccb movq $-0x2, %rbp xorl %ecx, %ecx jmp 0x19ce9 xorl %ecx, %ecx movq %rax, %rbp jmp 0x19ce9 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq %rbx, %rdi callq 0xeb62 movq %rax, 0x20(%rsp) jmp 0x19cc6 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq %rbx, %rdi callq 0xeb62 movq %rax, 0x18(%rsp) testq %rax, %rax jle 0x19c86 movq (%rsp), %rax addq 0x8(%rsp), %rax movq %rax, (%rsp) cmpq %r13, %rax setle %cl movq $-0x2, %rax cmovgq %rax, %rbp testb %cl, %cl jne 0x19c1f jmp 0x19ded movq $-0x2, %rbp jne 0x19ded movq 0xc2be(%rip), %rsi # 0x25fc8 movl $0xd8, %edi callq 0xb330 testq %rax, %rax je 0x19d92 movq %rax, %rbx movq 0x30(%rsp), %rax movq %rax, 0x8(%rbx) movq 0x38(%rsp), %rax movq %rax, 0x10(%rbx) movq 0x40(%rsp), %rax movq %rax, 0x18(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) movups %xmm0, 0x40(%rbx) movups %xmm0, 0x50(%rbx) movups %xmm0, 0x60(%rbx) movups %xmm0, 0x70(%rbx) movb $0x0, 0x80(%rbx) movq $0x0, 0xa0(%rbx) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0xa8(%rbx) leaq 0xbe40(%rip), %rax # 0x25bb8 movq %rax, 0x98(%rbx) movups %xmm0, 0xb0(%rbx) leaq 0xbf9b(%rip), %rax # 0x25d28 movq %rax, (%rbx) jmp 0x19d94 xorl %ebx, %ebx movq $-0x1, %rbp testq %rbx, %rbx je 0x19ded leaq 0x20(%rbx), %rsi movq 0x48(%rsp), %rdi callq 0x1718a testl %eax, %eax je 0x19dbd movq (%rbx), %rax movq %rbx, %rdi callq *0x8(%rax) jmp 0x19ded movsd 0x10(%rsp), %xmm0 movsd %xmm0, 0xc0(%rbx) movq 0x18(%rsp), %rax movq %rax, 0xc8(%rbx) movq 0x20(%rsp), %rax movq %rax, 0xd0(%rbx) movq 0x28(%rsp), %rax movq %rbx, (%rax) xorl %ebp, %ebp movq %rbp, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x4a5a(%rip), %rdi # 0x1e860 leaq 0x3b7b(%rip), %rsi # 0x1d988 leaq 0x4b1b(%rip), %rcx # 0x1e92f movl $0x15d5, %edx # imm = 0x15D5 callq 0xb130 leaq 0x4aaf(%rip), %rdi # 0x1e8d4 leaq 0x3b5c(%rip), %rsi # 0x1d988 leaq 0x4afc(%rip), %rcx # 0x1e92f movl $0x15d6, %edx # imm = 0x15D6 callq 0xb130 nop
/webmproject[P]libwebm/mkvparser/mkvparser.cc
mkvparser::Cluster::ParseBlockGroup(long long, long long&, long&)
long Cluster::ParseBlockGroup(long long payload_size, long long& pos, long& len) { const long long payload_start = pos; const long long payload_stop = pos + payload_size; IMkvReader* const pReader = m_pSegment->m_pReader; long long total, avail; long status = pReader->Length(&total, &avail); if (status < 0) // error return status; assert((total < 0) || (avail <= total)); if ((total >= 0) && (payload_stop > total)) return E_FILE_FORMAT_INVALID; if (payload_stop > avail) { len = static_cast<long>(payload_size); return E_BUFFER_NOT_FULL; } long long discard_padding = 0; while (pos < payload_stop) { // parse sub-block element ID if ((pos + 1) > avail) { len = 1; return E_BUFFER_NOT_FULL; } long long result = GetUIntLength(pReader, pos, len); if (result < 0) // error return static_cast<long>(result); if (result > 0) // weird return E_BUFFER_NOT_FULL; if ((pos + len) > payload_stop) return E_FILE_FORMAT_INVALID; if ((pos + len) > avail) return E_BUFFER_NOT_FULL; const long long id = ReadID(pReader, pos, len); if (id < 0) // error return static_cast<long>(id); if (id == 0) // not a valid ID return E_FILE_FORMAT_INVALID; pos += len; // consume ID field // Parse Size if ((pos + 1) > avail) { len = 1; return E_BUFFER_NOT_FULL; } result = GetUIntLength(pReader, pos, len); if (result < 0) // error return static_cast<long>(result); if (result > 0) // weird return E_BUFFER_NOT_FULL; if ((pos + len) > payload_stop) return E_FILE_FORMAT_INVALID; if ((pos + len) > avail) return E_BUFFER_NOT_FULL; const long long size = ReadUInt(pReader, pos, len); if (size < 0) // error return static_cast<long>(size); pos += len; // consume size field // pos now points to start of sub-block group payload if (pos > payload_stop) return E_FILE_FORMAT_INVALID; if (size == 0) // weird continue; const long long unknown_size = (1LL << (7 * len)) - 1; if (size == unknown_size) return E_FILE_FORMAT_INVALID; if (id == libwebm::kMkvDiscardPadding) { status = UnserializeInt(pReader, pos, size, discard_padding); if (status < 0) // error return status; } if (id != libwebm::kMkvBlock) { pos += size; // consume sub-part of block group if (pos > payload_stop) return E_FILE_FORMAT_INVALID; continue; } const long long block_stop = pos + size; if (block_stop > payload_stop) return E_FILE_FORMAT_INVALID; // parse track number if ((pos + 1) > avail) { len = 1; return E_BUFFER_NOT_FULL; } result = GetUIntLength(pReader, pos, len); if (result < 0) // error return static_cast<long>(result); if (result > 0) // weird return E_BUFFER_NOT_FULL; if ((pos + len) > block_stop) return E_FILE_FORMAT_INVALID; if ((pos + len) > avail) return E_BUFFER_NOT_FULL; const long long track = ReadUInt(pReader, pos, len); if (track < 0) // error return static_cast<long>(track); if (track == 0) return E_FILE_FORMAT_INVALID; pos += len; // consume track number if ((pos + 2) > block_stop) return E_FILE_FORMAT_INVALID; if ((pos + 2) > avail) { len = 2; return E_BUFFER_NOT_FULL; } pos += 2; // consume timecode if ((pos + 1) > block_stop) return E_FILE_FORMAT_INVALID; if ((pos + 1) > avail) { len = 1; return E_BUFFER_NOT_FULL; } unsigned char flags; status = pReader->Read(pos, 1, &flags); if (status < 0) { // error or underflow len = 1; return status; } ++pos; // consume flags byte assert(pos <= avail); if (pos >= block_stop) return E_FILE_FORMAT_INVALID; const int lacing = int(flags & 0x06) >> 1; if ((lacing != 0) && (block_stop > avail)) { len = static_cast<long>(block_stop - pos); return E_BUFFER_NOT_FULL; } pos = block_stop; // consume block-part of block group if (pos > payload_stop) return E_FILE_FORMAT_INVALID; } if (pos != payload_stop) return E_FILE_FORMAT_INVALID; status = CreateBlock(libwebm::kMkvBlockGroup, payload_start, payload_size, discard_padding); if (status != 0) return status; m_pos = payload_stop; return 0; // success }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %r14 movq %rdi, %rbx movq (%rdx), %r15 movq (%rdi), %rax movq (%rax), %rbp movq (%rbp), %rax leaq 0x40(%rsp), %rsi leaq 0x8(%rsp), %rdx movq %rbp, %rdi callq *0x8(%rax) testl %eax, %eax js 0x1acf7 movq %rbx, 0x20(%rsp) movq 0x40(%rsp), %rcx testq %rcx, %rcx sets %dl movq 0x8(%rsp), %rax cmpq %rcx, %rax setle %sil orb %dl, %sil je 0x1b069 movq %r14, 0x28(%rsp) movq %r15, 0x38(%rsp) addq %r15, %r14 testq %rcx, %rcx setns %dl cmpq %rcx, %r14 setg %cl movq $-0x2, %r15 testb %cl, %dl jne 0x1acfa cmpq %rax, %r14 jle 0x1ad0c movq 0x28(%rsp), %rax movq %rax, (%r12) movq $-0x3, %r15 jmp 0x1acfa movslq %eax, %r15 movq %r15, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq $0x0, 0x30(%rsp) movq (%r13), %rsi cmpq %r14, %rsi jge 0x1b011 cmpq 0x8(%rsp), %rsi jge 0x1b05c movq %rbp, %rdi movq %r12, %rdx callq 0xea98 movl $0x1, %ebx testq %rax, %rax js 0x1af23 je 0x1ad54 movq $-0x3, %r15 jmp 0x1af26 movq (%r13), %rsi movq (%r12), %rax addq %rsi, %rax cmpq %r14, %rax jle 0x1ad70 movq $-0x2, %r15 jmp 0x1af26 cmpq 0x8(%rsp), %rax jg 0x1ad48 movq %rbp, %rdi movq %r12, %rdx callq 0xe94f testq %rax, %rax js 0x1af23 je 0x1ad64 movq (%r13), %rsi addq (%r12), %rsi movq %rsi, (%r13) cmpq 0x8(%rsp), %rsi jge 0x1af82 movq %rax, 0x18(%rsp) movq %rbp, %rdi movq %r12, %rdx callq 0xea98 testq %rax, %rax js 0x1af23 jne 0x1ad48 movq (%r13), %rsi movq (%r12), %rax addq %rsi, %rax cmpq %r14, %rax jg 0x1ad64 cmpq 0x8(%rsp), %rax jg 0x1ad48 movq %rbp, %rdi movq %r12, %rdx callq 0xe84e testq %rax, %rax js 0x1af23 movq (%r12), %rdx movq (%r13), %rsi addq %rdx, %rsi movq %rsi, (%r13) cmpq %r14, %rsi jg 0x1ad64 testq %rax, %rax je 0x1af41 leal (,%rdx,8), %ecx subl %edx, %ecx movq $-0x1, %rdx shlq %cl, %rdx xorq %rax, %rdx cmpq $-0x1, %rdx je 0x1ad64 movq 0x18(%rsp), %rcx cmpq $0xa1, %rcx je 0x1ae7c cmpq $0x75a2, %rcx # imm = 0x75A2 jne 0x1af48 movq %rbp, %rdi movq %rax, 0x10(%rsp) movq %rax, %rdx leaq 0x30(%rsp), %rcx callq 0xecc0 testq %rax, %rax js 0x1af23 cmpq $0xa1, 0x18(%rsp) movq 0x10(%rsp), %rax jne 0x1af48 movq (%r13), %rsi addq %rsi, %rax movq %rax, 0x10(%rsp) cmpq %r14, %rax jg 0x1ad64 cmpq 0x8(%rsp), %rsi jge 0x1af82 movq %rbp, %rdi movq %r12, %rdx callq 0xea98 testq %rax, %rax js 0x1af23 jne 0x1ad48 movq (%r13), %rsi movq (%r12), %rax addq %rsi, %rax cmpq 0x10(%rsp), %rax jg 0x1ad64 cmpq 0x8(%rsp), %rax jg 0x1ad48 movq %rbp, %rdi movq %r12, %rdx callq 0xe84e testq %rax, %rax js 0x1af23 je 0x1ad64 movq (%r12), %rcx movq (%r13), %rdx leaq (%rdx,%rcx), %rax movq %rax, (%r13) leaq (%rdx,%rcx), %rsi addq $0x2, %rsi cmpq 0x10(%rsp), %rsi jg 0x1ad64 movq 0x8(%rsp), %rcx cmpq %rcx, %rsi jle 0x1af6a movq $0x2, (%r12) jmp 0x1ad48 movq %rax, %r15 testb $0x1, %bl jne 0x1acfa movq (%r13), %rsi cmpq %r14, %rsi jl 0x1ad22 jmp 0x1b011 movl $0x2, %ebx jmp 0x1af26 movq (%r13), %rcx addq %rax, %rcx movq %rcx, (%r13) xorl %ebx, %ebx cmpq %r14, %rcx setle %bl movq $-0x2, %rax cmovgq %rax, %r15 incl %ebx jmp 0x1af26 movq %rsi, (%r13) addq $0x3, %rax cmpq 0x10(%rsp), %rax jg 0x1ad64 cmpq %rcx, %rax jle 0x1af8f movq $0x1, (%r12) jmp 0x1ad48 movq (%rbp), %rax movl $0x1, %edx movq %rbp, %rdi leaq 0x7(%rsp), %rcx callq *(%rax) testl %eax, %eax js 0x1afec movq (%r13), %rax leaq 0x1(%rax), %rdx movq %rdx, (%r13) movq 0x8(%rsp), %rcx cmpq %rcx, %rax jge 0x1b088 movl $0x1, %ebx movq 0x10(%rsp), %rax subq %rdx, %rax jle 0x1ad64 cmpq %rcx, 0x10(%rsp) jle 0x1b001 movb 0x7(%rsp), %cl andb $0x6, %cl je 0x1b001 movq %rax, (%r12) jmp 0x1ad48 movslq %eax, %r15 movq $0x1, (%r12) movl $0x1, %ebx jmp 0x1af26 movq 0x10(%rsp), %rax movq %rax, (%r13) xorl %ebx, %ebx jmp 0x1af26 movq $-0x2, %r15 cmpq %r14, %rsi jne 0x1acfa movq 0x30(%rsp), %r8 movl $0xa0, %esi movq 0x20(%rsp), %rdi movq 0x38(%rsp), %rdx movq 0x28(%rsp), %rcx callq 0x1b2b6 movq %rax, %r15 testq %rax, %rax jne 0x1acfa movq 0x20(%rsp), %rax movq %r14, 0x18(%rax) xorl %r15d, %r15d jmp 0x1acfa movq $0x1, (%r12) jmp 0x1acee leaq 0x29fc(%rip), %rdi # 0x1da6c leaq 0x2911(%rip), %rsi # 0x1d988 leaq 0x3a7d(%rip), %rcx # 0x1eafb movl $0x19b9, %edx # imm = 0x19B9 callq 0xb130 leaq 0x3a5f(%rip), %rdi # 0x1eaee leaq 0x28f2(%rip), %rsi # 0x1d988 leaq 0x3a5e(%rip), %rcx # 0x1eafb movl $0x1a5e, %edx # imm = 0x1A5E callq 0xb130 nop
/webmproject[P]libwebm/mkvparser/mkvparser.cc
mkvparser::Cluster::CreateSimpleBlock(long long, long long)
long Cluster::CreateSimpleBlock(long long st, long long sz) { assert(m_entries); assert(m_entries_size > 0); assert(m_entries_count >= 0); assert(m_entries_count < m_entries_size); const long idx = m_entries_count; BlockEntry** const ppEntry = m_entries + idx; BlockEntry*& pEntry = *ppEntry; pEntry = new (std::nothrow) SimpleBlock(this, idx, st, sz); if (pEntry == NULL) return -1; // generic error SimpleBlock* const p = static_cast<SimpleBlock*>(pEntry); const long status = p->Parse(); if (status == 0) { ++m_entries_count; return 0; } delete pEntry; pEntry = 0; return status; }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq 0x30(%rdi), %r12 testq %r12, %r12 je 0x1bd36 movq %rdi, %rbx movq 0x38(%rdi), %rax testq %rax, %rax jle 0x1bd55 movq 0x40(%rbx), %r13 testq %r13, %r13 js 0x1bd74 cmpq %rax, %r13 jge 0x1bd93 movq %rdx, %r14 movq %rsi, %r15 movq 0xa335(%rip), %rsi # 0x25fc8 movl $0x50, %edi callq 0xb330 testq %rax, %rax je 0x1bcdd movq %rbx, 0x8(%rax) movq %r13, 0x10(%rax) leaq 0x9f97(%rip), %rcx # 0x25c48 movq %rcx, (%rax) movq %r15, 0x18(%rax) movq %r14, 0x20(%rax) xorl %ecx, %ecx movq %rcx, 0x28(%rax) movw $0xffff, 0x30(%rax) # imm = 0xFFFF movb $0x0, 0x32(%rax) movq %rcx, 0x38(%rax) movl $0xffffffff, 0x40(%rax) # imm = 0xFFFFFFFF movq %rcx, 0x48(%rax) jmp 0x1bcdf xorl %eax, %eax movq %rax, (%r12,%r13,8) testq %rax, %rax je 0x1bd19 movq 0x8(%rax), %rsi addq $0x18, %rax movq %rax, %rdi callq 0x1bec8 testq %rax, %rax je 0x1bd22 movq %rax, %r14 movq (%r12,%r13,8), %rdi testq %rdi, %rdi je 0x1bd0f movq (%rdi), %rax callq *0x8(%rax) movq $0x0, (%r12,%r13,8) jmp 0x1bd29 movq $-0x1, %r14 jmp 0x1bd29 incq 0x40(%rbx) xorl %r14d, %r14d movq %r14, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0x2e6e(%rip), %rdi # 0x1ebab leaq 0x1c44(%rip), %rsi # 0x1d988 leaq 0x3115(%rip), %rcx # 0x1ee60 movl $0x1c91, %edx # imm = 0x1C91 callq 0xb130 leaq 0x2e59(%rip), %rdi # 0x1ebb5 leaq 0x1c25(%rip), %rsi # 0x1d988 leaq 0x30f6(%rip), %rcx # 0x1ee60 movl $0x1c92, %edx # imm = 0x1C92 callq 0xb130 leaq 0x3098(%rip), %rdi # 0x1ee13 leaq 0x1c06(%rip), %rsi # 0x1d988 leaq 0x30d7(%rip), %rcx # 0x1ee60 movl $0x1c93, %edx # imm = 0x1C93 callq 0xb130 leaq 0x308e(%rip), %rdi # 0x1ee28 leaq 0x1be7(%rip), %rsi # 0x1d988 leaq 0x30b8(%rip), %rcx # 0x1ee60 movl $0x1c94, %edx # imm = 0x1C94 callq 0xb130
/webmproject[P]libwebm/mkvparser/mkvparser.cc
solver_started_cb(baryonyx::solver_parameters const&)
static void solver_started_cb(const baryonyx::solver_parameters& params) { fmt::print("Solver starts\n"); fmt::print(" * Global parameters:\n" " - limit: {}\n" " - time-limit: {:.10g}s\n" " - floating-point-type: {}\n" " - print-level: {}\n" " - auto-tune: {}\n" " - observation: {}\n", params.limit, params.time_limit, params.float_type, params.print_level, params.mode, params.observer); if (params.solver == baryonyx::solver_parameters::solver_type::bastert) { fmt::print(" * In The Middle parameters:\n" " - preprocessing: {}\n" " - constraint-order: {}\n" " - theta: {:.10g}\n" " - delta: {:.10g}\n" " - kappa: {:.10g} {:.10g} {:.10g}\n" " - alpha: {:.10g}\n" " - w: {:.10g}\n" " - norm: {}\n", params.pre_order, params.order, params.theta, params.delta, params.kappa_min, params.kappa_step, params.kappa_max, params.alpha, params.w, params.cost_norm); fmt::print(" * Pushes system parameters:\n" " - pushes-limit: {}\n" " - pushing-objective-amplifier: {:.10g}\n" " - pushing-iteration-limit: {}\n" " - pushing-k-factor: {:.10g}\n", params.pushes_limit, params.pushing_objective_amplifier, params.pushing_iteration_limit, params.pushing_k_factor); fmt::print(" * Solver initialization parameters:\n" " - init-policy: {}\n" " - init-policy-random: {}\n", params.init_policy, params.init_policy_random); fmt::print(" * Optimizer initialization parameters:\n" " - init-population-size: {}\n" " - init-crossover-bastert-insertion: {}\n" " - init-crossover-solution-selection-mean: {}\n" " - init-crossover-solution-selection-stddev: {}\n" " - init-mutation-variable-mean: {}\n" " - init-mutation-variable-stddev: {}\n" " - init-mutation-value-mean: {}\n" " - init-mutation-value-stddev: {}\n" " - init-kappa-improve-start: {}\n" " - init-kappa-improve-increase: {}\n" " - init-kappa-improve-stop: {}\n", params.init_population_size, params.init_crossover_bastert_insertion, params.init_crossover_solution_selection_mean, params.init_crossover_solution_selection_stddev, params.init_mutation_variable_mean, params.init_mutation_variable_stddev, params.init_mutation_value_mean, params.init_mutation_value_stddev, params.init_kappa_improve_start, params.init_kappa_improve_increase, params.init_kappa_improve_stop); } else { fmt::print(" * Random solvers:\n" " - random: bernouilli with p=0.5\n"); } }
pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x447c6e(%rip), %rdi # 0x455ff6 callq 0x1e470 leaq 0xb0(%rbx), %rsi leaq 0xd0(%rbx), %rcx leaq 0xb8(%rbx), %r8 leaq 0xdc(%rbx), %r9 leaq 0xe4(%rbx), %rax subq $0x8, %rsp leaq 0x447c4a(%rip), %rdi # 0x456005 movq %rbx, %rdx pushq %rax callq 0x1e497 popq %rax popq %rcx cmpl $0x0, 0xec(%rbx) je 0xe3e0 leaq 0x448039(%rip), %rdi # 0x45640f popq %rbx popq %r14 popq %r15 jmp 0x1e70b leaq 0xc8(%rbx), %rsi leaq 0xcc(%rbx), %rdx leaq 0x8(%rbx), %rcx leaq 0x10(%rbx), %r8 leaq 0x18(%rbx), %r9 leaq 0x20(%rbx), %rax leaq 0x28(%rbx), %r10 leaq 0x30(%rbx), %r11 leaq 0xa0(%rbx), %r14 leaq 0xd8(%rbx), %r15 subq $0x8, %rsp leaq 0x447c7a(%rip), %rdi # 0x456099 pushq %r15 pushq %r14 pushq %r11 pushq %r10 pushq %rax callq 0x1e503 addq $0x30, %rsp leaq 0xbc(%rbx), %rsi leaq 0x40(%rbx), %rdx leaq 0xc0(%rbx), %rcx leaq 0x38(%rbx), %r8 leaq 0x447d10(%rip), %rdi # 0x45615e callq 0x1e5cd leaq 0xd4(%rbx), %rsi leaq 0x48(%rbx), %rdx leaq 0x447d93(%rip), %rdi # 0x4561f8 callq 0x1e60c leaq 0xc4(%rbx), %rsi leaq 0x50(%rbx), %rdx leaq 0x58(%rbx), %rcx leaq 0x60(%rbx), %r8 leaq 0x68(%rbx), %r9 leaq 0x70(%rbx), %rax leaq 0x78(%rbx), %r10 leaq 0x80(%rbx), %r11 leaq 0x88(%rbx), %r14 leaq 0x90(%rbx), %r15 addq $0x98, %rbx leaq 0x447da1(%rip), %rdi # 0x45624d pushq %rbx pushq %r15 pushq %r14 pushq %r11 pushq %r10 pushq %rax callq 0x1e647 addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq
/quesnel[P]baryonyx/app/src/main.cpp
solver_updated_cb(int, double, long, double, long)
static void solver_updated_cb(int remaining_constraints, double value, long int loop, double duration, long int reinit_number) { if (remaining_constraints > 0) { fmt::print( " - Constraints remaining: {} (loop: {} t: {}s reinit: {})\n", remaining_constraints, loop, duration, reinit_number); } else { if (loop >= 0) fmt::print( " - Solution found: {:f} (loop: {} t: {}s reinit: {})\n", value, loop, duration, reinit_number); else fmt::print(" - Solution found via push: {:f} (loop: {} t: {}s " "reinit: {})\n", value, -loop, duration, reinit_number); } }
subq $0x38, %rsp movl %edi, 0x1c(%rsp) vmovsd %xmm0, 0x28(%rsp) movq %rsi, 0x20(%rsp) vmovsd %xmm1, 0x10(%rsp) movq %rdx, 0x8(%rsp) testl %edi, %edi jle 0xe509 leaq 0x447f83(%rip), %rdi # 0x456471 leaq 0x1c(%rsp), %rsi leaq 0x20(%rsp), %rdx leaq 0x10(%rsp), %rcx leaq 0x8(%rsp), %r8 callq 0x1f8a6 jmp 0xe556 testq %rsi, %rsi js 0xe530 leaq 0x447f98(%rip), %rdi # 0x4564ad leaq 0x28(%rsp), %rsi leaq 0x20(%rsp), %rdx leaq 0x10(%rsp), %rcx leaq 0x8(%rsp), %r8 callq 0x1f8e6 jmp 0xe556 negq %rsi leaq 0x30(%rsp), %rdx leaq 0x447fa5(%rip), %rdi # 0x4564e4 leaq 0x10(%rsp), %rcx leaq 0x8(%rsp), %r8 movq %rsi, (%rdx) leaq 0x28(%rsp), %rsi callq 0x1f927 addq $0x38, %rsp retq
/quesnel[P]baryonyx/app/src/main.cpp
solver_finished_cb(baryonyx::result const&)
static void solver_finished_cb(const baryonyx::result& r) { fmt::print("Solver finished\n"); switch (r.status) { case baryonyx::result_status::success: if (!r.solutions.empty()) { if (r.solutions.back().variables.empty()) { fmt::print( "Best solution found via preprocessor: {:.10g} in {}s\n", r.solutions.back().value, r.duration); } else { if (r.loop >= 0) fmt::print( "Best solution found: {:.10g} in {} loop and {}s\n", r.solutions.back().value, r.loop, r.duration); else fmt::print("Best solution found via push: {:.10g} in {} " "loop and {}s\n", r.solutions.back().value, -r.loop, r.duration); } } break; case baryonyx::result_status::internal_error: fmt::print("No solution. Internal error\n"); break; case baryonyx::result_status::uninitialized: fmt::print("No solution. Uninitialized error\n"); break; case baryonyx::result_status::kappa_max_reached: fmt::print( "No solution. Constraint remaining: {}. Kappa reached in {}s.\n", r.remaining_constraints, r.duration); break; case baryonyx::result_status::time_limit_reached: fmt::print("No solution. Constraint remaining: {}. Time limit reached " "at {}s.\n", r.remaining_constraints, r.duration); break; case baryonyx::result_status::limit_reached: fmt::print("No solution. Constraint remaining: {}. Loop limit reached " "in {}s.\n", r.remaining_constraints, r.duration); break; case baryonyx::result_status::empty_context: fmt::print("Context uninitialized\n"); break; } }
pushq %rbx subq $0x10, %rsp movq %rdi, %rbx leaq 0x447fba(%rip), %rdi # 0x456524 callq 0x1f968 movl 0xa0(%rbx), %eax cmpq $0x6, %rax ja 0xe69d leaq 0x445ad6(%rip), %rcx # 0x45405c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x70(%rbx), %rsi cmpq %rsi, 0x68(%rbx) je 0xe69d movq -0x20(%rsi), %rax cmpq -0x18(%rsi), %rax je 0xe663 movq 0x88(%rbx), %rax addq $-0x8, %rsi testq %rax, %rax js 0xe67f leaq 0x88(%rbx), %rdx subq $-0x80, %rbx leaq 0x447f9a(%rip), %rdi # 0x45656b movq %rbx, %rcx addq $0x10, %rsp popq %rbx jmp 0x1f9c2 leaq 0x98(%rbx), %rsi subq $-0x80, %rbx leaq 0x448025(%rip), %rdi # 0x456615 movq %rbx, %rdx addq $0x10, %rsp popq %rbx jmp 0x1fa84 leaq 0x447fef(%rip), %rdi # 0x4565f3 addq $0x10, %rsp popq %rbx jmp 0x1fa5d leaq 0x98(%rbx), %rsi subq $-0x80, %rbx leaq 0x448033(%rip), %rdi # 0x456653 jmp 0xe645 leaq 0x447fad(%rip), %rdi # 0x4565d6 addq $0x10, %rsp popq %rbx jmp 0x1fa36 leaq 0x98(%rbx), %rsi subq $-0x80, %rbx leaq 0x448051(%rip), %rdi # 0x456696 movq %rbx, %rdx addq $0x10, %rsp popq %rbx jmp 0x1fab6 leaq 0x448080(%rip), %rdi # 0x4566d9 addq $0x10, %rsp popq %rbx jmp 0x1fae8 subq $-0x80, %rbx addq $-0x8, %rsi leaq 0x447ec3(%rip), %rdi # 0x456535 movq %rbx, %rdx addq $0x10, %rsp popq %rbx jmp 0x1f98f subq $-0x80, %rbx negq %rax leaq 0x8(%rsp), %rdx leaq 0x447f0a(%rip), %rdi # 0x45659c movq %rbx, %rcx movq %rax, (%rdx) callq 0x1f9fc addq $0x10, %rsp popq %rbx retq
/quesnel[P]baryonyx/app/src/main.cpp
void fmt::v7::print<char [35], std::basic_string_view<char, std::char_traits<char>>, char const*, 0>(_IO_FILE*, fmt::v7::text_style const&, char const (&) [35], std::basic_string_view<char, std::char_traits<char>> const&, char const* const&)
void print(std::FILE* f, const text_style& ts, const S& format_str, const Args&... args) { vprint(f, ts, format_str, fmt::make_args_checked<Args...>(format_str, args...)); }
subq $0x28, %rsp movq (%rcx), %rax movq 0x8(%rcx), %rcx movq (%r8), %r9 movq %rsp, %r8 movq %rcx, (%r8) movl $0xcd, %ecx movq %rax, 0x8(%r8) movq %r9, 0x10(%r8) callq 0x2027a addq $0x28, %rsp retq
/quesnel[P]baryonyx/external/fmt/include/fmt/color.h
void fmt::v7::print<char [10], double&, double&, char>(std::basic_ostream<char, std::char_traits<char>>&, char const (&) [10], double&, double&)
void print(std::basic_ostream<Char>& os, const S& format_str, Args&&... args) { vprint(os, to_string_view(format_str), fmt::make_args_checked<Args...>(format_str, args...)); }
pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %r15 movq %rsi, %rdi movq %rcx, %rbx movq %rdx, %r14 callq 0xf277 movq (%r14), %rcx movq (%rbx), %rsi movq %rsp, %r8 movq %r15, %rdi movq %rcx, (%r8) movl $0xaa, %ecx movq %rsi, 0x10(%r8) movq %rax, %rsi callq 0x1fd97 addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq
/quesnel[P]baryonyx/external/fmt/include/fmt/ostream.h
get_param::operator()(int, std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>)
constexpr std::optional<std::string_view> operator()( int arg_position, const std::string_view longp, const std::string_view shortp) noexcept { std::string_view arg(argv[arg_position]); i = arg_position; if (starts_with(arg, longp) && arg.size() > longp.size() && (arg[longp.size()] == '=' || arg[longp.size()] == ':')) return arg.substr(longp.size() + 1); if (starts_with(arg, shortp) && arg.size() > shortp.size()) return arg.substr(shortp.size()); if (arg_position + 1 < argc) { if (arg == longp) { i = arg_position + 1; return argv[i]; } if (arg == shortp) { i = arg_position + 1; return argv[i]; } } return std::nullopt; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq (%rsi), %rax movslq %edx, %rbx movq %r8, %rbp movq %rcx, %r15 movq %rsi, %r14 movq %rdi, 0x8(%rsp) movl %edx, 0x14(%rsp) movq (%rax,%rbx,8), %r12 movq %r12, %rdi callq 0xb220 movq %rax, 0x28(%rsp) movq %r12, 0x30(%rsp) movq %rax, %r13 movl %ebx, 0xc(%r14) movq %rax, %rdi movq %r12, %rsi movq %r15, %rdx movq %rbp, %rcx movq %rbp, 0x20(%rsp) callq 0xe6f1 cmpq %r15, %r13 seta %cl andb %al, %cl cmpb $0x1, %cl jne 0xeffe movzbl (%r12,%r15), %eax cmpl $0x3d, %eax je 0xefe9 cmpl $0x3a, %eax jne 0xeffe incq %r15 leaq 0x28(%rsp), %rdi pushq $-0x1 popq %rdx movq %r15, %rsi callq 0x1dad8 jmp 0xf038 leaq 0x70(%rsp), %rax movq %r13, %rdi movq %r12, %rsi movq (%rax), %rbx movq 0x8(%rax), %rbp movq %rbx, %rdx movq %rbp, %rcx callq 0xe6f1 cmpq %rbx, %r13 seta %cl andb %al, %cl cmpb $0x1, %cl jne 0xf04a leaq 0x28(%rsp), %rdi pushq $-0x1 popq %rdx movq %rbx, %rsi callq 0x1dad8 movq 0x8(%rsp), %rcx movq %rax, (%rcx) movq %rdx, 0x8(%rcx) movb $0x1, 0x10(%rcx) jmp 0xf0b2 movq %rbp, 0x18(%rsp) movl 0x14(%rsp), %ebp incl %ebp cmpl 0x8(%r14), %ebp jge 0xf0a9 movq 0x20(%rsp), %rcx movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x1db0d testb %al, %al jne 0xf089 movq 0x18(%rsp), %rcx movq %r13, %rdi movq %r12, %rsi movq %rbx, %rdx callq 0x1db0d testb %al, %al je 0xf0a9 movslq %ebp, %rsi movl %ebp, 0xc(%r14) movq 0x8(%rsp), %rbx shlq $0x3, %rsi addq (%r14), %rsi movq %rbx, %rdi callq 0x1db42 movq %rbx, %rax jmp 0xf0b5 movq 0x8(%rsp), %rcx movb $0x0, 0x10(%rcx) movq %rcx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rdi callq 0xeb9f
/quesnel[P]baryonyx/app/src/main.cpp
void fmt::v7::detail::vformat_to<char>(fmt::v7::detail::buffer<char>&, fmt::v7::basic_string_view<char>, fmt::v7::basic_format_args<fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<fmt::v7::type_identity<char>::type>, fmt::v7::type_identity<char>::type>>, fmt::v7::detail::locale_ref)
void detail::vformat_to( detail::buffer<Char>& buf, basic_string_view<Char> format_str, basic_format_args<buffer_context<type_identity_t<Char>>> args, detail::locale_ref loc) { using iterator = typename buffer_context<Char>::iterator; auto out = buffer_appender<Char>(buf); if (format_str.size() == 2 && equal2(format_str.data(), "{}")) { auto arg = args.get(0); if (!arg) error_handler().on_error("argument not found"); visit_format_arg(default_arg_formatter<iterator, Char>{out, args, loc}, arg); return; } format_handler<iterator, Char, buffer_context<Char>> h(out, format_str, args, loc); parse_format_string<false>(format_str, h); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r9, %r15 movq %r8, %r12 movq %rcx, %r13 movq %rdx, %rbp movq %rsi, %r14 movq %rdi, %rbx cmpq $0x2, %rdx jne 0xf351 leaq 0x44a539(%rip), %rsi # 0x459864 movq %r14, %rdi callq 0xf6d7 testb %al, %al je 0xf351 testq %r13, %r13 js 0xf47e movl %r13d, %eax andl $0xf, %eax jne 0xf494 jmp 0xf5ba movq %r14, 0x28(%rsp) movq %rbp, 0x30(%rsp) andl $0x0, 0x38(%rsp) movq %rbx, 0x40(%rsp) movq %r13, 0x48(%rsp) movq %r12, 0x50(%rsp) movq %r15, 0x58(%rsp) leaq (%r14,%rbp), %rbx leaq 0x20(%rsp), %r15 cmpq $0x1f, %rbp jg 0xf3ef movq %r14, %r12 cmpq %rbx, %r12 je 0xf44d movzbl (%r12), %eax incq %r12 cmpl $0x7d, %eax je 0xf3c5 cmpl $0x7b, %eax jne 0xf386 decq %r12 movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx callq 0x14ecc movq %r12, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x14f15 movq %rax, %r14 jmp 0xf383 cmpq %rbx, %r12 je 0xf5b1 cmpb $0x7d, (%r12) jne 0xf5b1 movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx callq 0x14ecc incq %r12 movq %r12, %r14 jmp 0xf383 leaq 0x60(%rsp), %r12 movq %r15, (%r12) pushq $0x7b popq %rbp leaq 0x18(%rsp), %r13 cmpq %rbx, %r14 je 0xf46f movq %r14, 0x18(%rsp) movq %r14, %rdx cmpb $0x7b, (%r14) je 0xf42d leaq 0x1(%r14), %rdi movq %rbx, %rsi movl %ebp, %edx movq %r13, %rcx callq 0x151c1 testb %al, %al je 0xf45f movq 0x18(%rsp), %rdx movq %r12, %rdi movq %r14, %rsi callq 0x151f4 movq 0x18(%rsp), %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x14f15 movq %rax, %r14 jmp 0xf400 leaq 0x20(%rsp), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x14ecc jmp 0xf46f leaq 0x60(%rsp), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x151f4 addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testl %r13d, %r13d jle 0xf5ba movl 0x10(%r12), %eax testl %eax, %eax je 0xf5ba movq (%r12), %rsi movq 0x8(%r12), %rdx decl %eax movq %rbx, 0x20(%rsp) movq %r13, 0x28(%rsp) movq %r12, 0x30(%rsp) movq %r15, 0x38(%rsp) cmpl $0xe, %eax ja 0xf524 leaq 0x444e01(%rip), %rcx # 0x4542c0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq %rbx, %rdi callq 0xf7d8 jmp 0xf46f leaq 0x20(%rsp), %rdi callq 0xf796 jmp 0xf46f movq %rbx, %rdi callq 0x14c22 jmp 0xf46f movq %rbx, %rdi callq 0xfcac jmp 0xf46f addq %rsi, %rdx movq %rbx, %rdi callq 0xff86 jmp 0xf46f vmovq %rsi, %xmm0 movq %rbx, %rdi callq 0x11209 jmp 0xf46f movq %rbx, %rdi callq 0xfac5 jmp 0xf46f movq %rbx, %rdi callq 0x14eb2 jmp 0xf46f movq %rbx, %rdi callq 0xfc48 jmp 0xf46f movsbl %sil, %esi movq %rbx, %rdi callq 0x10024 jmp 0xf46f movq %rbx, %rdi callq 0xfa62 jmp 0xf46f movq %rbx, %rdi callq 0xfedf jmp 0xf46f movq %rbx, %rdi callq 0x14c96 jmp 0xf46f movzbl %sil, %esi movq %rbx, %rdi andl $0x1, %esi callq 0xff58 jmp 0xf46f movq %rbx, %rdi movq %rsi, (%rsp) movw %dx, 0x8(%rsp) callq 0x1241a jmp 0xf46f vmovd %esi, %xmm0 movq %rbx, %rdi callq 0x10051 jmp 0xf46f leaq 0x445f83(%rip), %rsi # 0x45553b jmp 0xf5c1 leaq 0x445ba7(%rip), %rsi # 0x455168 leaq 0x20(%rsp), %rdi callq 0xf73a
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::default_arg_formatter<fmt::v7::detail::buffer_appender<char>, char>::operator()(fmt::v7::basic_format_arg<fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>::handle)
OutputIt operator()(typename basic_format_arg<context>::handle handle) { basic_format_parse_context<Char> parse_ctx({}); basic_format_context<OutputIt, Char> format_ctx(out, args, loc); handle.format(parse_ctx, format_ctx); return format_ctx.out(); }
pushq %rbx subq $0x40, %rsp vxorps %xmm0, %xmm0, %xmm0 movq %rsi, %rcx movq %rsp, %rsi andl $0x0, 0x10(%rsi) leaq 0x20(%rsp), %rbx movq %rdx, %rax vmovaps %xmm0, (%rsi) movq %rbx, %rdx vmovups (%rdi), %xmm0 vmovups %xmm0, (%rbx) vmovups 0x10(%rdi), %xmm0 movq %rcx, %rdi vmovups %xmm0, 0x10(%rbx) callq *%rax movq (%rbx), %rax addq $0x40, %rsp popq %rbx retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write<char, fmt::v7::detail::buffer_appender<char>, int, 0>(fmt::v7::detail::buffer_appender<char>, int)
OutputIt write(OutputIt out, T value) { auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value); bool negative = is_negative(value); // Don't do -abs_value since it trips unsigned-integer-overflow sanitizer. if (negative) abs_value = ~abs_value + 1; int num_digits = count_digits(abs_value); auto size = (negative ? 1 : 0) + static_cast<size_t>(num_digits); auto it = reserve(out, size); if (auto ptr = to_pointer<Char>(it, size)) { if (negative) *ptr++ = static_cast<Char>('-'); format_decimal<Char>(ptr, abs_value, num_digits); return out; } if (negative) *it++ = static_cast<Char>('-'); it = format_decimal<Char>(it, abs_value, num_digits).end; return base_iterator(out, it); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebx negl %ebx movl %esi, %r15d movq %rdi, %r14 cmovsl %esi, %ebx movl %ebx, %edi callq 0xf872 movl %eax, %ebp movl %r15d, %eax shrl $0x1f, %eax movslq %ebp, %r13 movq %r14, %rdi addq %rax, %r13 movq %r13, %rsi callq 0xf897 movq %rax, %r12 movq %rax, %rdi movq %r13, %rsi callq 0xf8b2 testq %rax, %rax je 0xf83c testl %r15d, %r15d jns 0xf82e movb $0x2d, (%rax) incq %rax movq %rax, %rdi movl %ebx, %esi movl %ebp, %edx callq 0xf8de jmp 0xf860 testl %r15d, %r15d jns 0xf851 leaq 0x7(%rsp), %rsi movq %r12, %rdi movb $0x2d, (%rsi) callq 0xf9f2 movq %r12, %rdi movl %ebx, %esi movl %ebp, %edx callq 0xf962 movq %rdx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::format_decimal_result<char*> fmt::v7::detail::format_decimal<char, unsigned int>(char*, unsigned int, int)
inline format_decimal_result<Char*> format_decimal(Char* out, UInt value, int size) { FMT_ASSERT(size >= count_digits(value), "invalid digit count"); out += size; Char* end = out; while (value >= 100) { // Integer division is slow so do it for a group of two digits instead // of for every digit. The idea comes from the talk by Alexandrescu // "Three Optimization Tips for C++". See speed-test for a comparison. out -= 2; copy2(out, data::digits[value % 100]); value /= 100; } if (value < 10) { *--out = static_cast<Char>('0' + value); return {out, end}; } out -= 2; copy2(out, data::digits[value]); return {out, end}; }
pushq %rbp pushq %r14 pushq %rbx movq %rdi, %r14 movl %esi, %edi movl %edx, %ebp movl %esi, %ebx callq 0xf872 cmpl %ebp, %eax jg 0xf94a movslq %ebp, %rax leaq -0x2(%r14,%rax), %rsi leaq (%r14,%rax), %rcx pushq $0x64 popq %r8 leaq 0x4474b5(%rip), %rdi # 0x456dc0 cmpl $0x64, %ebx jb 0xf926 movl %ebx, %eax xorl %edx, %edx divl %r8d movzwl (%rdi,%rdx,2), %edx movw %dx, (%rsi) addq $-0x2, %rsi movl %eax, %ebx jmp 0xf90b cmpl $0x9, %ebx ja 0xf936 orb $0x30, %bl movb %bl, 0x1(%rsi) incq %rsi jmp 0xf93f movl %ebx, %eax movzwl (%rdi,%rax,2), %eax movw %ax, (%rsi) movq %rsi, %rax movq %rcx, %rdx popq %rbx popq %r14 popq %rbp retq leaq 0x44582a(%rip), %rdi # 0x45517b leaq 0x44588a(%rip), %rdx # 0x4551e2 movl $0x41b, %esi # imm = 0x41B callq 0xf9cb
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::assert_fail(char const*, int, char const*)
FMT_FUNC void assert_fail(const char* file, int line, const char* message) { // Use unchecked std::fprintf to avoid triggering another assertion when // writing to stderr fails std::fprintf(stderr, "%s:%d: assertion failed: %s", file, line, message); // Chosen instead of std::abort to satisfy Clang in CUDA mode during device // code pass. std::terminate(); }
pushq %rax movq 0x62d5fd(%rip), %rax # 0x63cfd0 movq %rdx, %r8 movq %rdi, %rdx movl %esi, %ecx leaq 0x445814(%rip), %rsi # 0x4551f6 movq (%rax), %rdi xorl %eax, %eax callq 0xb170 callq 0xb6e0 nop
/quesnel[P]baryonyx/external/fmt/include/fmt/format-inl.h
fmt::v7::detail::count_digits(unsigned __int128)
inline int count_digits(uint128_t n) { int count = 1; for (;;) { // Integer division is slow so do it for a group of four digits instead // of for every digit. The idea comes from the talk by Alexandrescu // "Three Optimization Tips for C++". See speed-test for a comparison. if (n < 10) return count; if (n < 100) return count + 1; if (n < 1000) return count + 2; if (n < 10000) return count + 3; n /= 10000U; count += 4; } }
pushq %r15 pushq %r14 pushq %rbx pushq $0x4 popq %rbx pushq $0x63 popq %r14 movl $0x3e7, %r15d # imm = 0x3E7 cmpq $0xa, %rdi movq %rsi, %rax sbbq $0x0, %rax jb 0xfdcf cmpq %rdi, %r14 movl $0x0, %eax sbbq %rsi, %rax jae 0xfdd4 cmpq %rdi, %r15 movl $0x0, %eax sbbq %rsi, %rax jae 0xfdd9 cmpq $0x2710, %rdi # imm = 0x2710 movq %rsi, %rax sbbq $0x0, %rax jb 0xfddb movl $0x2710, %edx # imm = 0x2710 xorl %ecx, %ecx callq 0xb390 movq %rax, %rdi movq %rdx, %rsi addl $0x4, %ebx jmp 0xfd81 addl $-0x3, %ebx jmp 0xfddb addl $-0x2, %ebx jmp 0xfddb decl %ebx movl %ebx, %eax popq %rbx popq %r14 popq %r15 retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::format_decimal_result<char*> fmt::v7::detail::format_decimal<char, unsigned __int128>(char*, unsigned __int128, int)
inline format_decimal_result<Char*> format_decimal(Char* out, UInt value, int size) { FMT_ASSERT(size >= count_digits(value), "invalid digit count"); out += size; Char* end = out; while (value >= 100) { // Integer division is slow so do it for a group of two digits instead // of for every digit. The idea comes from the talk by Alexandrescu // "Three Optimization Tips for C++". See speed-test for a comparison. out -= 2; copy2(out, data::digits[value % 100]); value /= 100; } if (value < 10) { *--out = static_cast<Char>('0' + value); return {out, end}; } out -= 2; copy2(out, data::digits[value]); return {out, end}; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r15 movl %ecx, %ebx movq %rdx, %r12 movq %rsi, %r14 movq %rsi, %rdi movq %rdx, %rsi callq 0xfd6f cmpl %ebx, %eax jg 0xfe96 movslq %ebx, %rax leaq (%r15,%rax), %rbx leaq -0x2(%r15,%rax), %r15 pushq $0x64 popq %r13 leaq 0x446f9d(%rip), %rbp # 0x456dc0 cmpq $0x64, %r14 movq %r12, %rax sbbq $0x0, %rax jb 0xfe5d movq %r14, %rdi movq %r12, %rsi movq %r13, %rdx xorl %ecx, %ecx callq 0xb390 imulq $0x64, %rax, %rcx movq %rdx, %r12 subq %rcx, %r14 movzwl (%rbp,%r14,2), %ecx movq %rax, %r14 movw %cx, (%r15) addq $-0x2, %r15 jmp 0xfe23 xorl %eax, %eax pushq $0x9 popq %rcx cmpq %r14, %rcx sbbq %r12, %rax jb 0xfe77 orb $0x30, %r14b movb %r14b, 0x1(%r15) incq %r15 jmp 0xfe81 movzwl (%rbp,%r14,2), %eax movw %ax, (%r15) movq %r15, %rax movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x4452de(%rip), %rdi # 0x45517b leaq 0x44533e(%rip), %rdx # 0x4551e2 movl $0x41b, %esi # imm = 0x41B callq 0xf9cb
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write<char, fmt::v7::detail::buffer_appender<char>, unsigned __int128, 0>(fmt::v7::detail::buffer_appender<char>, unsigned __int128)
OutputIt write(OutputIt out, T value) { auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value); bool negative = is_negative(value); // Don't do -abs_value since it trips unsigned-integer-overflow sanitizer. if (negative) abs_value = ~abs_value + 1; int num_digits = count_digits(abs_value); auto size = (negative ? 1 : 0) + static_cast<size_t>(num_digits); auto it = reserve(out, size); if (auto ptr = to_pointer<Char>(it, size)) { if (negative) *ptr++ = static_cast<Char>('-'); format_decimal<Char>(ptr, abs_value, num_digits); return out; } if (negative) *it++ = static_cast<Char>('-'); it = format_decimal<Char>(it, abs_value, num_digits).end; return base_iterator(out, it); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rsi, %rdi movq %rdx, %rsi callq 0xfd6f movslq %eax, %r13 movl %eax, %ebp movq %rbx, %rdi movq %r13, %rsi callq 0xf897 movq %rax, %r12 movq %rax, %rdi movq %r13, %rsi callq 0xf8b2 testq %rax, %rax je 0xff33 movq %rax, %rdi movq %r15, %rsi movq %r14, %rdx movl %ebp, %ecx callq 0xfde3 jmp 0xff46 movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx movl %ebp, %ecx callq 0xfeae movq %rdx, %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write<char, fmt::v7::detail::buffer_appender<char>>(fmt::v7::detail::buffer_appender<char>, bool)
OutputIt write(OutputIt out, bool value) { return write<Char>(out, string_view(value ? "true" : "false")); }
pushq %rbx leaq 0x4452b2(%rip), %rcx # 0x455212 leaq 0x4452b0(%rip), %rax # 0x455217 testl %esi, %esi movl %esi, %edx movq %rdi, %rbx cmovneq %rcx, %rax xorq $0x5, %rdx addq %rax, %rdx movq %rax, %rsi callq 0xff86 movq %rbx, %rax popq %rbx retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
void fmt::v7::detail::buffer<char>::append<char>(char const*, char const*)
void buffer<T>::append(const U* begin, const U* end) { do { auto count = to_unsigned(end - begin); try_reserve(size_ + count); auto free_cap = capacity_ - size_; if (free_cap < count) count = free_cap; std::uninitialized_copy_n(begin, count, make_checked(ptr_ + size_, count)); size_ += count; begin += count; } while (begin != end); }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq %rbx, %rdi subq %r14, %rdi callq 0x10002 movq 0x10(%r15), %rdi movq 0x18(%r15), %r12 movq %rax, %r13 leaq (%rdi,%rax), %rsi cmpq %rsi, %r12 jae 0xffc7 movq (%r15), %rax movq %r15, %rdi callq *(%rax) movq 0x10(%r15), %rdi movq 0x18(%r15), %r12 subq %rdi, %r12 cmpq %r13, %r12 cmovaeq %r13, %r12 testq %r12, %r12 je 0xffe9 addq 0x8(%r15), %rdi movq %r14, %rsi movq %r12, %rdx callq 0xb140 movq 0x10(%r15), %rdi addq %r12, %rdi addq %r12, %r14 movq %rdi, 0x10(%r15) cmpq %rbx, %r14 jne 0xff98 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write<char, fmt::v7::detail::buffer_appender<char>, float, 0>(fmt::v7::detail::buffer_appender<char>, float)
OutputIt write(OutputIt out, T value) { if (const_check(!is_supported_floating_point(value))) return out; using floaty = conditional_t<std::is_same<T, long double>::value, double, T>; using uint = typename dragonbox::float_info<floaty>::carrier_uint; auto bits = bit_cast<uint>(value); auto fspecs = float_specs(); auto sign_bit = bits & (uint(1) << (num_bits<uint>() - 1)); if (sign_bit != 0) { fspecs.sign = sign::minus; value = -value; } static const auto specs = basic_format_specs<Char>(); uint mask = exponent_mask<floaty>(); if ((bits & mask) == mask) return write_nonfinite(out, std::isinf(value), specs, fspecs); auto dec = dragonbox::to_decimal(static_cast<floaty>(value)); return write_float(out, dec, specs, fspecs, static_cast<Char>('.')); }
pushq %rbx subq $0x10, %rsp andq $0x0, (%rsp) vmovd %xmm0, %eax movq %rdi, %rbx testl %eax, %eax jns 0x10078 vpxord 0x44428c(%rip){1to4}, %xmm0, %xmm0 # 0x4542fc movl $0x100, 0x4(%rsp) # imm = 0x100 notl %eax testl $0x7f800000, %eax # imm = 0x7F800000 jne 0x100a9 vmovd %xmm0, %eax xorl %esi, %esi leaq 0x446eaa(%rip), %rdx # 0x456f38 movq %rsp, %rcx movq %rbx, %rdi andl $0x7fffffff, %eax # imm = 0x7FFFFFFF cmpl $0x7f800000, %eax # imm = 0x7F800000 sete %sil callq 0x100d3 jmp 0x100cd callq 0x1013a movq (%rsp), %rcx leaq 0x8(%rsp), %rsi leaq 0x446e7a(%rip), %rdx # 0x456f38 movq %rax, (%rsi) pushq $0x2e popq %r8 movq %rbx, %rdi callq 0x10479 addq $0x10, %rsp popq %rbx retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_nonfinite<char, fmt::v7::detail::buffer_appender<char>>(fmt::v7::detail::buffer_appender<char>, bool, fmt::v7::basic_format_specs<char> const&, fmt::v7::detail::float_specs const&)
OutputIt write_nonfinite(OutputIt out, bool isinf, const basic_format_specs<Char>& specs, const float_specs& fspecs) { auto str = isinf ? (fspecs.upper ? "INF" : "inf") : (fspecs.upper ? "NAN" : "nan"); constexpr size_t str_size = 3; auto sign = fspecs.sign; auto size = str_size + (sign ? 1 : 0); using iterator = remove_reference_t<decltype(reserve(out, 0))>; return write_padded(out, specs, size, [=](iterator it) { if (sign) *it++ = static_cast<Char>(data::signs[sign]); return copy_str<Char>(str, str + str_size, it); }); }
subq $0x18, %rsp movl 0x4(%rcx), %r8d leaq 0x4451b3(%rip), %rax # 0x455295 leaq 0x4451a8(%rip), %rcx # 0x455291 leaq 0x4451a9(%rip), %r9 # 0x455299 btl $0x10, %r8d cmovaeq %rax, %rcx leaq 0x44519d(%rip), %rax # 0x45529d cmovaeq %rax, %r9 testl %esi, %esi movq %rdx, %rsi cmovneq %rcx, %r9 shrl $0x8, %r8d xorl %eax, %eax leaq 0x8(%rsp), %rcx andl $0xff, %r8d setne %al movl %r8d, (%rcx) movq %r9, 0x8(%rcx) addq $0x3, %rax movq %rax, %rdx callq 0x107c2 addq $0x18, %rsp retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_float<fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::dragonbox::decimal_fp<float>, char>(fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::dragonbox::decimal_fp<float> const&, fmt::v7::basic_format_specs<char> const&, fmt::v7::detail::float_specs, char)
OutputIt write_float(OutputIt out, const DecimalFP& fp, const basic_format_specs<Char>& specs, float_specs fspecs, Char decimal_point) { auto significand = fp.significand; int significand_size = get_significand_size(fp); static const Char zero = static_cast<Char>('0'); auto sign = fspecs.sign; size_t size = to_unsigned(significand_size) + (sign ? 1 : 0); using iterator = remove_reference_t<decltype(reserve(out, 0))>; int output_exp = fp.exponent + significand_size - 1; auto use_exp_format = [=]() { if (fspecs.format == float_format::exp) return true; if (fspecs.format != float_format::general) return false; // Use the fixed notation if the exponent is in [exp_lower, exp_upper), // e.g. 0.0001 instead of 1e-04. Otherwise use the exponent notation. const int exp_lower = -4, exp_upper = 16; return output_exp < exp_lower || output_exp >= (fspecs.precision > 0 ? fspecs.precision : exp_upper); }; if (use_exp_format()) { int num_zeros = 0; if (fspecs.showpoint) { num_zeros = (std::max)(fspecs.precision - significand_size, 0); size += to_unsigned(num_zeros); } else if (significand_size == 1) { decimal_point = Char(); } auto abs_output_exp = output_exp >= 0 ? output_exp : -output_exp; int exp_digits = 2; if (abs_output_exp >= 100) exp_digits = abs_output_exp >= 1000 ? 4 : 3; size += to_unsigned((decimal_point ? 1 : 0) + 2 + exp_digits); char exp_char = fspecs.upper ? 'E' : 'e'; auto write = [=](iterator it) { if (sign) *it++ = static_cast<Char>(data::signs[sign]); // Insert a decimal point after the first digit and add an exponent. it = write_significand(it, significand, significand_size, 1, decimal_point); if (num_zeros > 0) it = std::fill_n(it, num_zeros, zero); *it++ = static_cast<Char>(exp_char); return write_exponent<Char>(output_exp, it); }; return specs.width > 0 ? write_padded<align::right>(out, specs, size, write) : base_iterator(out, write(reserve(out, size))); } int exp = fp.exponent + significand_size; if (fp.exponent >= 0) { // 1234e5 -> 123400000[.0+] size += to_unsigned(fp.exponent); int num_zeros = fspecs.precision - exp; #ifdef FMT_FUZZ if (num_zeros > 5000) throw std::runtime_error("fuzz mode - avoiding excessive cpu use"); #endif if (fspecs.showpoint) { if (num_zeros <= 0 && fspecs.format != float_format::fixed) num_zeros = 1; if (num_zeros > 0) size += to_unsigned(num_zeros); } return write_padded<align::right>(out, specs, size, [&](iterator it) { if (sign) *it++ = static_cast<Char>(data::signs[sign]); it = write_significand<Char>(it, significand, significand_size); it = std::fill_n(it, fp.exponent, zero); if (!fspecs.showpoint) return it; *it++ = decimal_point; return num_zeros > 0 ? std::fill_n(it, num_zeros, zero) : it; }); } else if (exp > 0) { // 1234e-2 -> 12.34[0+] int num_zeros = fspecs.showpoint ? fspecs.precision - significand_size : 0; size += 1 + to_unsigned(num_zeros > 0 ? num_zeros : 0); return write_padded<align::right>(out, specs, size, [&](iterator it) { if (sign) *it++ = static_cast<Char>(data::signs[sign]); it = write_significand(it, significand, significand_size, exp, decimal_point); return num_zeros > 0 ? std::fill_n(it, num_zeros, zero) : it; }); } // 1234e-6 -> 0.001234 int num_zeros = -exp; if (significand_size == 0 && fspecs.precision >= 0 && fspecs.precision < num_zeros) { num_zeros = fspecs.precision; } size += 2 + to_unsigned(num_zeros); return write_padded<align::right>(out, specs, size, [&](iterator it) { if (sign) *it++ = static_cast<Char>(data::signs[sign]); *it++ = zero; if (num_zeros == 0 && significand_size == 0 && !fspecs.showpoint) return it; *it++ = decimal_point; it = std::fill_n(it, num_zeros, zero); return write_significand<Char>(it, significand, significand_size); }); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rcx, 0x40(%rsp) movb %r8b, 0xf(%rsp) movq %rdi, 0x30(%rsp) movq %rsi, %rdi movq %rcx, %rbp movq %rdx, 0x20(%rsp) movq %rsi, %r14 movl %r8d, 0x3c(%rsp) movl (%rsi), %eax movl %eax, 0x50(%rsp) movl %eax, 0x1c(%rsp) callq 0x10b7d movq %rbp, %r12 shrq $0x28, %r12 movq %rbp, %r13 shrq $0x20, %r13 xorl %ebx, %ebx movl %eax, %edi movl %eax, %r15d movl %eax, 0x18(%rsp) andl $0xff, %r12d movl %r12d, 0x14(%rsp) setne %bl callq 0x1085f addl %eax, %ebx leaq 0x98(%rsp), %rdi movq %rbx, 0x28(%rsp) movl 0x4(%r14), %ebx movq %rbp, (%rdi) leal -0x1(%r15,%rbx), %eax movl %eax, 0x4c(%rsp) movl %eax, 0x8(%rdi) callq 0x10b84 testb %al, %al je 0x1053c addl %r15d, %ebx btl $0x14, %r13d movq %r13, 0x58(%rsp) jb 0x10594 movl 0x3c(%rsp), %r13d movq 0x28(%rsp), %r14 xorl %ebp, %ebp cmpl $0x1, %r15d movzbl %r13b, %r13d cmovel %ebp, %r13d jmp 0x105b7 movl 0x4(%r14), %edi leal (%r15,%rdi), %ebx movl %ebx, 0x54(%rsp) testl %edi, %edi js 0x10644 callq 0x1085f movl %eax, %r15d movl 0x40(%rsp), %edi movl 0x44(%rsp), %eax addq 0x28(%rsp), %r15 subl %ebx, %edi btl $0x14, %eax movl %edi, 0x10(%rsp) jae 0x106f2 testl %edi, %edi setg %cl cmpb $0x2, %al sete %al orb %cl, %al je 0x106dd testl %edi, %edi jg 0x106e8 jmp 0x106f2 subl %r15d, %ebp movl %ebp, %eax sarl $0x1f, %eax andnl %ebp, %eax, %ebp movl %ebp, %edi callq 0x1085f movq 0x28(%rsp), %r14 movl 0x3c(%rsp), %r13d movl %eax, %eax addq %rax, %r14 pushq $0x1 popq %rax subl %ebx, %eax testl %ebx, %ebx movl 0x4c(%rsp), %ebx cmovgl %ebx, %eax xorl %ecx, %ecx cmpl $0x3e8, %eax # imm = 0x3E8 setge %cl addl $0x3, %ecx cmpl $0x64, %eax pushq $0x2 popq %rax cmovgel %ecx, %eax cmpb $0x1, %r13b pushq $0x3 popq %rdi sbbl $0x0, %edi addl %eax, %edi callq 0x1085f movl %eax, %edx addq %r14, %rdx btl $0x10, 0x58(%rsp) movl 0x50(%rsp), %ecx movq 0x20(%rsp), %rsi movl %r12d, 0x60(%rsp) setae %al movl %ecx, 0x64(%rsp) movl %r15d, 0x68(%rsp) movb %r13b, 0x6c(%rsp) movl %ebp, 0x70(%rsp) shlb $0x5, %al orb $0x45, %al movb %al, 0x74(%rsp) movl %ebx, 0x78(%rsp) cmpl $0x0, (%rsi) jle 0x106c1 movq 0x30(%rsp), %rdi leaq 0x60(%rsp), %rcx callq 0x10bb1 jmp 0x10742 testl %ebx, %ebx jle 0x10754 shll $0xb, %r13d subl %r15d, %ebp leaq 0x10(%rsp), %rbx sarl $0x1f, %r13d andl %r13d, %ebp movl %ebp, %eax sarl $0x1f, %eax movl %ebp, (%rbx) andnl %ebp, %eax, %edi callq 0x1085f leal 0x1(%rax), %edx leaq 0x14(%rsp), %rax leaq 0x60(%rsp), %rcx leaq 0x1c(%rsp), %rdi leaq 0x18(%rsp), %rsi addq 0x28(%rsp), %rdx movq %rax, (%rcx) movq %rdi, 0x8(%rcx) movq %rsi, 0x10(%rcx) leaq 0x54(%rsp), %rdi leaq 0xf(%rsp), %rsi movq %rdi, 0x18(%rcx) movq %rsi, 0x20(%rcx) movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rsi movq %rbx, 0x28(%rcx) callq 0x10c48 jmp 0x10742 movq 0x30(%rsp), %rdi movq %rdx, %rsi callq 0xf897 leaq 0x60(%rsp), %rdi movq %rax, %rsi callq 0x10bbc jmp 0x10742 movl $0x1, 0x10(%rsp) pushq $0x1 popq %rdi callq 0x1085f movl %eax, %eax addq %rax, %r15 leaq 0x14(%rsp), %rax leaq 0x60(%rsp), %rcx leaq 0x1c(%rsp), %rdx leaq 0x18(%rsp), %rdi movq 0x20(%rsp), %rsi movq %rax, (%rcx) movq %rdx, 0x8(%rcx) movq %rdi, 0x10(%rcx) leaq 0x40(%rsp), %rdx leaq 0xf(%rsp), %rdi movq %r14, 0x18(%rcx) movq %rdx, 0x20(%rcx) movq %rdi, 0x28(%rcx) movq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rdx movq %rdx, 0x30(%rcx) movq %r15, %rdx callq 0x10c3d addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq negl %ebx cmpl %ebx, %ebp movl %ebx, %edi cmovll %ebp, %edi testl %ebp, %ebp cmovsl %ebx, %edi testl %r15d, %r15d cmovnel %ebx, %edi leaq 0x10(%rsp), %rbx movl %edi, (%rbx) callq 0x1085f leal 0x2(%rax), %edx leaq 0x14(%rsp), %rax leaq 0x60(%rsp), %rcx leaq 0x18(%rsp), %rdi leaq 0x40(%rsp), %rsi addq 0x28(%rsp), %rdx movq %rax, (%rcx) movq %rbx, 0x8(%rcx) movq %rdi, 0x10(%rcx) movq %rsi, 0x18(%rcx) leaq 0xf(%rsp), %rdi leaq 0x1c(%rsp), %rsi movq %rdi, 0x20(%rcx) movq %rsi, 0x28(%rcx) movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0x10c53 jmp 0x10742
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_padded<(fmt::v7::align::type)1, fmt::v7::detail::buffer_appender<char>, char, fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_nonfinite<char, fmt::v7::detail::buffer_appender<char>>(fmt::v7::detail::buffer_appender<char>, bool, fmt::v7::basic_format_specs<char> const&, fmt::v7::detail::float_specs const&)::'lambda'(fmt::v7::detail::buffer_appender<char>)&>(fmt::v7::detail::buffer_appender<char>, fmt::v7::basic_format_specs<char> const&, unsigned long, unsigned long, fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_nonfinite<char, fmt::v7::detail::buffer_appender<char>>(fmt::v7::detail::buffer_appender<char>, bool, fmt::v7::basic_format_specs<char> const&, fmt::v7::detail::float_specs const&)::'lambda'(fmt::v7::detail::buffer_appender<char>)&)
inline OutputIt write_padded(OutputIt out, const basic_format_specs<Char>& specs, size_t size, size_t width, F&& f) { static_assert(align == align::left || align == align::right, ""); unsigned spec_width = to_unsigned(specs.width); size_t padding = spec_width > width ? spec_width - width : 0; auto* shifts = align == align::left ? data::left_padding_shifts : data::right_padding_shifts; size_t left_padding = padding >> shifts[specs.align]; auto it = reserve(out, size + padding * specs.fill.size()); it = fill(it, left_padding, specs.fill); it = f(it); it = fill(it, padding - left_padding, specs.fill); return base_iterator(out, it); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r12 movl (%rsi), %edi movq %r8, %r14 movq %rcx, %rbp movq %rdx, %r13 movq %rsi, %rbx callq 0x1085f movl %eax, %eax xorl %r15d, %r15d subq %rbp, %rax movzbl 0xe(%rbx), %esi leaq 0x446747(%rip), %rcx # 0x456f48 movq %r12, %rdi cmovaeq %rax, %r15 movzbl 0x9(%rbx), %eax addq $0xa, %rbx imulq %r15, %rsi andl $0xf, %eax movb (%rax,%rcx), %al addq %r13, %rsi shrxq %rax, %r15, %rbp callq 0xf897 movq %rax, %rdi movq %rbp, %rsi movq %rbx, %rdx callq 0x1087f movq %r14, %rdi movq %rax, %rsi callq 0x108c8 subq %rbp, %r15 movq %rax, %rdi movq %rbx, %rdx movq %r15, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1087f
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
bool fmt::v7::detail::dragonbox::is_center_integer<float>(fmt::v7::detail::dragonbox::float_info<float>::carrier_uint, int, int)
bool is_center_integer(typename float_info<T>::carrier_uint two_f, int exponent, int minus_k) FMT_NOEXCEPT { // Exponent for 5 is negative. if (exponent > float_info<T>::divisibility_check_by_5_threshold) return false; if (exponent > float_info<T>::case_fc_upper_threshold) return divisible_by_power_of_5(two_f, minus_k); // Both exponents are nonnegative. if (exponent >= float_info<T>::case_fc_lower_threshold) return true; // Exponent for 2 is negative. return divisible_by_power_of_2(two_f, minus_k - exponent + 1); }
cmpl $0x27, %esi jle 0x10a8a xorl %eax, %eax retq cmpl $0x7, %esi jl 0x10a96 movl %edx, %esi jmp 0x10b05 movb $0x1, %al cmpl $-0x3, %esi jg 0x10a89 subl %esi, %edx incl %edx movl %edx, %esi jmp 0x10b39
/quesnel[P]baryonyx/external/fmt/include/fmt/format-inl.h
fmt::v7::detail::dragonbox::decimal_fp<double> fmt::v7::detail::write_padded<(fmt::v7::align::type)2, fmt::v7::detail::buffer_appender<char>, char, fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_float<fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::dragonbox::decimal_fp<double>, char>(fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::dragonbox::decimal_fp<double> const&, fmt::v7::basic_format_specs<char> const&, fmt::v7::detail::float_specs, char)::'lambda1'(fmt::v7::detail::buffer_appender<char>)&>(fmt::v7::detail::dragonbox::decimal_fp<double>, fmt::v7::basic_format_specs<char> const&, unsigned long, unsigned long, fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_float<fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::dragonbox::decimal_fp<double>, char>(fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::dragonbox::decimal_fp<double> const&, fmt::v7::basic_format_specs<char> const&, fmt::v7::detail::float_specs, char)::'lambda1'(fmt::v7::detail::buffer_appender<char>)&)
inline OutputIt write_padded(OutputIt out, const basic_format_specs<Char>& specs, size_t size, size_t width, F&& f) { static_assert(align == align::left || align == align::right, ""); unsigned spec_width = to_unsigned(specs.width); size_t padding = spec_width > width ? spec_width - width : 0; auto* shifts = align == align::left ? data::left_padding_shifts : data::right_padding_shifts; size_t left_padding = padding >> shifts[specs.align]; auto it = reserve(out, size + padding * specs.fill.size()); it = fill(it, left_padding, specs.fill); it = f(it); it = fill(it, padding - left_padding, specs.fill); return base_iterator(out, it); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r12 movl (%rsi), %edi movq %r8, %r14 movq %rcx, %rbp movq %rdx, %r13 movq %rsi, %rbx callq 0x1085f movl %eax, %eax xorl %r15d, %r15d subq %rbp, %rax movzbl 0xe(%rbx), %esi leaq 0x44500d(%rip), %rcx # 0x457229 movq %r12, %rdi cmovaeq %rax, %r15 movzbl 0x9(%rbx), %eax addq $0xa, %rbx imulq %r15, %rsi andl $0xf, %eax movb (%rax,%rcx), %al addq %r13, %rsi shrxq %rax, %r15, %rbp callq 0xf897 movq %rax, %rdi movq %rbp, %rsi movq %rbx, %rdx callq 0x1087f movq %r14, %rdi movq %rax, %rsi callq 0x1227a subq %rbp, %r15 movq %rax, %rdi movq %rbx, %rdx movq %r15, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1087f
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_float<fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::big_decimal_fp, char>(fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::big_decimal_fp const&, fmt::v7::basic_format_specs<char> const&, fmt::v7::detail::float_specs, char)
OutputIt write_float(OutputIt out, const DecimalFP& fp, const basic_format_specs<Char>& specs, float_specs fspecs, Char decimal_point) { auto significand = fp.significand; int significand_size = get_significand_size(fp); static const Char zero = static_cast<Char>('0'); auto sign = fspecs.sign; size_t size = to_unsigned(significand_size) + (sign ? 1 : 0); using iterator = remove_reference_t<decltype(reserve(out, 0))>; int output_exp = fp.exponent + significand_size - 1; auto use_exp_format = [=]() { if (fspecs.format == float_format::exp) return true; if (fspecs.format != float_format::general) return false; // Use the fixed notation if the exponent is in [exp_lower, exp_upper), // e.g. 0.0001 instead of 1e-04. Otherwise use the exponent notation. const int exp_lower = -4, exp_upper = 16; return output_exp < exp_lower || output_exp >= (fspecs.precision > 0 ? fspecs.precision : exp_upper); }; if (use_exp_format()) { int num_zeros = 0; if (fspecs.showpoint) { num_zeros = (std::max)(fspecs.precision - significand_size, 0); size += to_unsigned(num_zeros); } else if (significand_size == 1) { decimal_point = Char(); } auto abs_output_exp = output_exp >= 0 ? output_exp : -output_exp; int exp_digits = 2; if (abs_output_exp >= 100) exp_digits = abs_output_exp >= 1000 ? 4 : 3; size += to_unsigned((decimal_point ? 1 : 0) + 2 + exp_digits); char exp_char = fspecs.upper ? 'E' : 'e'; auto write = [=](iterator it) { if (sign) *it++ = static_cast<Char>(data::signs[sign]); // Insert a decimal point after the first digit and add an exponent. it = write_significand(it, significand, significand_size, 1, decimal_point); if (num_zeros > 0) it = std::fill_n(it, num_zeros, zero); *it++ = static_cast<Char>(exp_char); return write_exponent<Char>(output_exp, it); }; return specs.width > 0 ? write_padded<align::right>(out, specs, size, write) : base_iterator(out, write(reserve(out, size))); } int exp = fp.exponent + significand_size; if (fp.exponent >= 0) { // 1234e5 -> 123400000[.0+] size += to_unsigned(fp.exponent); int num_zeros = fspecs.precision - exp; #ifdef FMT_FUZZ if (num_zeros > 5000) throw std::runtime_error("fuzz mode - avoiding excessive cpu use"); #endif if (fspecs.showpoint) { if (num_zeros <= 0 && fspecs.format != float_format::fixed) num_zeros = 1; if (num_zeros > 0) size += to_unsigned(num_zeros); } return write_padded<align::right>(out, specs, size, [&](iterator it) { if (sign) *it++ = static_cast<Char>(data::signs[sign]); it = write_significand<Char>(it, significand, significand_size); it = std::fill_n(it, fp.exponent, zero); if (!fspecs.showpoint) return it; *it++ = decimal_point; return num_zeros > 0 ? std::fill_n(it, num_zeros, zero) : it; }); } else if (exp > 0) { // 1234e-2 -> 12.34[0+] int num_zeros = fspecs.showpoint ? fspecs.precision - significand_size : 0; size += 1 + to_unsigned(num_zeros > 0 ? num_zeros : 0); return write_padded<align::right>(out, specs, size, [&](iterator it) { if (sign) *it++ = static_cast<Char>(data::signs[sign]); it = write_significand(it, significand, significand_size, exp, decimal_point); return num_zeros > 0 ? std::fill_n(it, num_zeros, zero) : it; }); } // 1234e-6 -> 0.001234 int num_zeros = -exp; if (significand_size == 0 && fspecs.precision >= 0 && fspecs.precision < num_zeros) { num_zeros = fspecs.precision; } size += 2 + to_unsigned(num_zeros); return write_padded<align::right>(out, specs, size, [&](iterator it) { if (sign) *it++ = static_cast<Char>(data::signs[sign]); *it++ = zero; if (num_zeros == 0 && significand_size == 0 && !fspecs.showpoint) return it; *it++ = decimal_point; it = std::fill_n(it, num_zeros, zero); return write_significand<Char>(it, significand, significand_size); }); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rcx, 0x38(%rsp) movb %r8b, 0xb(%rsp) movq %rcx, %r14 shrq $0x28, %r14 movq %rcx, %r13 shrq $0x20, %r13 xorl %ebx, %ebx movq %rcx, %rbp movq %rdx, 0x18(%rsp) movq %rsi, %r12 movq %rdi, 0x28(%rsp) movl %r8d, 0x34(%rsp) movq (%rsi), %rax andl $0xff, %r14d setne %bl movq %rax, 0x40(%rsp) movq %rax, 0x58(%rsp) movl 0x8(%rsi), %r15d movl %r14d, 0x10(%rsp) movl %r15d, %edi movl %r15d, 0x14(%rsp) callq 0x1085f addl %eax, %ebx leaq 0x98(%rsp), %rdi movq %rbx, 0x20(%rsp) movl 0xc(%r12), %ebx movq %rbp, (%rdi) leal -0x1(%r15,%rbx), %eax movl %eax, 0x48(%rsp) movl %eax, 0x8(%rdi) callq 0x146dc testb %al, %al je 0x1300f addl %r15d, %ebx btl $0x14, %r13d movq %r13, 0x50(%rsp) jb 0x13068 movl 0x34(%rsp), %ebp movq 0x20(%rsp), %r13 xorl %r12d, %r12d cmpl $0x1, %r15d movzbl %bpl, %ebp cmovel %r12d, %ebp jmp 0x1308b movl 0xc(%r12), %edi leal (%r15,%rdi), %ebx movl %ebx, 0x4c(%rsp) testl %edi, %edi js 0x1311e callq 0x1085f movl %eax, %r15d movl 0x38(%rsp), %edi movl 0x3c(%rsp), %eax addq 0x20(%rsp), %r15 subl %ebx, %edi btl $0x14, %eax movl %edi, 0xc(%rsp) jae 0x131cc testl %edi, %edi setg %cl cmpb $0x2, %al sete %al orb %cl, %al je 0x131b7 testl %edi, %edi jg 0x131c2 jmp 0x131cc subl %r15d, %ebp movl %ebp, %eax sarl $0x1f, %eax andnl %ebp, %eax, %r12d movl %r12d, %edi callq 0x1085f movq 0x20(%rsp), %r13 movl 0x34(%rsp), %ebp movl %eax, %eax addq %rax, %r13 pushq $0x1 popq %rax subl %ebx, %eax testl %ebx, %ebx movl 0x48(%rsp), %ebx cmovgl %ebx, %eax xorl %ecx, %ecx cmpl $0x3e8, %eax # imm = 0x3E8 setge %cl addl $0x3, %ecx cmpl $0x64, %eax pushq $0x2 popq %rax cmovgel %ecx, %eax cmpb $0x1, %bpl pushq $0x3 popq %rdi sbbl $0x0, %edi addl %eax, %edi callq 0x1085f movl %eax, %edx addq %r13, %rdx btl $0x10, 0x50(%rsp) movq 0x58(%rsp), %rcx movq 0x18(%rsp), %rsi movl %r14d, 0x60(%rsp) setae %al movq %rcx, 0x68(%rsp) movl %r15d, 0x70(%rsp) movb %bpl, 0x74(%rsp) movl %r12d, 0x78(%rsp) shlb $0x5, %al orb $0x45, %al movb %al, 0x7c(%rsp) movl %ebx, 0x80(%rsp) cmpl $0x0, (%rsi) jle 0x1319b movq 0x28(%rsp), %rdi leaq 0x60(%rsp), %rcx callq 0x14709 jmp 0x1321c testl %ebx, %ebx jle 0x1322e shll $0xb, %r13d subl %r15d, %ebp leaq 0xc(%rsp), %rbx sarl $0x1f, %r13d andl %r13d, %ebp movl %ebp, %eax sarl $0x1f, %eax movl %ebp, (%rbx) andnl %ebp, %eax, %edi callq 0x1085f leal 0x1(%rax), %edx leaq 0x10(%rsp), %rax leaq 0x60(%rsp), %rcx leaq 0x40(%rsp), %rdi leaq 0x14(%rsp), %rsi addq 0x20(%rsp), %rdx movq %rax, (%rcx) movq %rdi, 0x8(%rcx) movq %rsi, 0x10(%rcx) leaq 0x4c(%rsp), %rdi leaq 0xb(%rsp), %rsi movq %rdi, 0x18(%rcx) movq %rsi, 0x20(%rcx) movq 0x28(%rsp), %rdi movq 0x18(%rsp), %rsi movq %rbx, 0x28(%rcx) callq 0x147a1 jmp 0x1321c movq 0x28(%rsp), %rdi movq %rdx, %rsi callq 0xf897 leaq 0x60(%rsp), %rdi movq %rax, %rsi callq 0x14714 jmp 0x1321c movl $0x1, 0xc(%rsp) pushq $0x1 popq %rdi callq 0x1085f movl %eax, %eax addq %rax, %r15 leaq 0x10(%rsp), %rax leaq 0x60(%rsp), %rcx leaq 0x40(%rsp), %rdx leaq 0x14(%rsp), %rdi movq 0x18(%rsp), %rsi movq %rax, (%rcx) movq %rdx, 0x8(%rcx) movq %rdi, 0x10(%rcx) leaq 0x38(%rsp), %rdx leaq 0xb(%rsp), %rdi movq %r12, 0x18(%rcx) movq %rdx, 0x20(%rcx) movq %rdi, 0x28(%rcx) movq 0x28(%rsp), %rdi leaq 0xc(%rsp), %rdx movq %rdx, 0x30(%rcx) movq %r15, %rdx callq 0x14796 addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq negl %ebx cmpl %ebx, %ebp movl %ebx, %edi cmovll %ebp, %edi testl %ebp, %ebp cmovsl %ebx, %edi testl %r15d, %r15d cmovnel %ebx, %edi leaq 0xc(%rsp), %rbx movl %edi, (%rbx) callq 0x1085f leal 0x2(%rax), %edx leaq 0x10(%rsp), %rax leaq 0x60(%rsp), %rcx leaq 0x14(%rsp), %rdi leaq 0x38(%rsp), %rsi addq 0x20(%rsp), %rdx movq %rax, (%rcx) movq %rbx, 0x8(%rcx) movq %rdi, 0x10(%rcx) movq %rsi, 0x18(%rcx) leaq 0xb(%rsp), %rdi leaq 0x40(%rsp), %rsi movq %rdi, 0x20(%rcx) movq %rsi, 0x28(%rcx) movq 0x28(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x147ac jmp 0x1321c
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write<char, fmt::v7::detail::buffer_appender<char>, unsigned long, 0>(fmt::v7::detail::buffer_appender<char>, unsigned long)
OutputIt write(OutputIt out, T value) { auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value); bool negative = is_negative(value); // Don't do -abs_value since it trips unsigned-integer-overflow sanitizer. if (negative) abs_value = ~abs_value + 1; int num_digits = count_digits(abs_value); auto size = (negative ? 1 : 0) + static_cast<size_t>(num_digits); auto it = reserve(out, size); if (auto ptr = to_pointer<Char>(it, size)) { if (negative) *ptr++ = static_cast<Char>('-'); format_decimal<Char>(ptr, abs_value, num_digits); return out; } if (negative) *it++ = static_cast<Char>('-'); it = format_decimal<Char>(it, abs_value, num_digits).end; return base_iterator(out, it); }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx movq %rsi, %rdi movq %rsi, %r14 callq 0xfb66 movslq %eax, %r12 movl %eax, %ebp movq %rbx, %rdi movq %r12, %rsi callq 0xf897 movq %rax, %r15 movq %rax, %rdi movq %r12, %rsi callq 0xf8b2 testq %rax, %rax je 0x13397 movq %rax, %rdi movq %r14, %rsi movl %ebp, %edx callq 0xfb8f jmp 0x133a7 movq %r15, %rdi movq %r14, %rsi movl %ebp, %edx callq 0xfc17 movq %rdx, %rbx movq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::fixed_handler::on_digit(char, unsigned long, unsigned long, unsigned long, int, bool)
digits::result on_digit(char digit, uint64_t divisor, uint64_t remainder, uint64_t error, int, bool integral) { FMT_ASSERT(remainder < divisor, ""); buf[size++] = digit; if (!integral && error >= remainder) return digits::error; if (size < precision) return digits::more; if (!integral) { // Check if error * 2 < divisor with overflow prevention. // The check is not needed for the integral part because error = 1 // and divisor > (1 << 32) there. if (error >= divisor || error >= divisor - error) return digits::error; } else { FMT_ASSERT(error == 1 && divisor > 2, ""); } auto dir = get_round_direction(divisor, remainder, error); if (dir != round_direction::up) return dir == round_direction::down ? digits::done : digits::error; ++buf[size - 1]; for (int i = size - 1; i > 0 && buf[i] > '9'; --i) { buf[i] = '0'; ++buf[i - 1]; } if (buf[0] > '9') { buf[0] = '1'; if (fixed) buf[size++] = '0'; else ++exp10; } return digits::done; }
pushq %rbx cmpq %rdx, %rcx jae 0x13b47 movq %rdi, %rbx movslq 0x8(%rbx), %r9 movb 0x10(%rsp), %dil movq (%rbx), %rax cmpq %rcx, %r8 leal 0x1(%r9), %r10d movl %r10d, 0x8(%rbx) movb %sil, (%rax,%r9) movl %edi, %r9d setae %al xorb $0x1, %r9b pushq $0x2 popq %rsi testb %r9b, %al jne 0x13aad movl 0x8(%rbx), %r9d xorl %eax, %eax cmpl 0xc(%rbx), %r9d jl 0x13aaf testb %dil, %dil je 0x13ab1 cmpq $0x3, %rdx jb 0x13a95 cmpq $0x1, %r8 je 0x13ac9 leaq 0x441805(%rip), %rdi # 0x4552a1 leaq 0x442e85(%rip), %rdx # 0x456928 movl $0x659, %esi # imm = 0x659 callq 0xf9cb movl %esi, %eax popq %rbx retq movq %rdx, %rax subq %r8, %rax seta %dil cmpq %r8, %rax movl %esi, %eax seta %r9b testb %r9b, %dil je 0x13aaf movq %rdx, %rdi movq %rcx, %rsi movq %r8, %rdx callq 0x13b5f cmpl $0x1, %eax jne 0x13b0a movq (%rbx), %rax movslq 0x8(%rbx), %rcx incb -0x1(%rax,%rcx) movl 0x8(%rbx), %eax movq (%rbx), %rcx cmpl $0x2, %eax jl 0x13b18 cmpb $0x39, -0x1(%rcx,%rax) jle 0x13b18 movb $0x30, -0x1(%rcx,%rax) movq (%rbx), %rcx incb -0x2(%rcx,%rax) decq %rax jmp 0x13aea movl %eax, %ecx xorl %eax, %eax cmpl $0x2, %ecx setne %al incl %eax jmp 0x13aaf pushq $0x1 popq %rax cmpb $0x39, (%rcx) jle 0x13aaf movb $0x31, (%rcx) cmpb $0x1, 0x14(%rbx) jne 0x13b3f movslq 0x8(%rbx), %rdx movq (%rbx), %rcx leal 0x1(%rdx), %esi movl %esi, 0x8(%rbx) movb $0x30, (%rcx,%rdx) jmp 0x13aaf incl 0x10(%rbx) jmp 0x13aaf leaq 0x441753(%rip), %rdi # 0x4552a1 leaq 0x442dd3(%rip), %rdx # 0x456928 movl $0x64f, %esi # imm = 0x64F callq 0xf9cb
/quesnel[P]baryonyx/external/fmt/include/fmt/format-inl.h
fmt::v7::detail::bigint::assign(unsigned long)
void assign(uint64_t n) { size_t num_bigits = 0; do { bigits_[num_bigits++] = n & ~bigit(0); n >>= bigit_bits; } while (n != 0); bigits_.resize(num_bigits); exp_ = 0; }
pushq %rbx movq 0x8(%rdi), %rcx movq %rsi, %rax movq %rdi, %rbx xorl %esi, %esi movl %eax, (%rcx,%rsi,4) incq %rsi shrq $0x20, %rax jne 0x13c3f movq %rbx, %rdi callq 0x140f0 andl $0x0, 0xa8(%rbx) popq %rbx retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format-inl.h
fmt::v7::detail::bigint::operator<<=(int)
FMT_NOINLINE bigint& operator<<=(int shift) { assert(shift >= 0); exp_ += shift / bigit_bits; shift %= bigit_bits; if (shift == 0) return *this; bigit carry = 0; for (size_t i = 0, n = bigits_.size(); i < n; ++i) { bigit c = bigits_[i] >> (bigit_bits - shift); bigits_[i] = (bigits_[i] << shift) + carry; carry = c; } if (carry != 0) bigits_.push_back(carry); return *this; }
pushq %rbx subq $0x10, %rsp testl %esi, %esi js 0x13cce movl %esi, %eax shrl $0x5, %eax movq %rdi, %rbx addl %eax, 0xa8(%rdi) andl $0x1f, %esi je 0x13cc5 andl $0x0, 0xc(%rsp) movq 0x8(%rbx), %rax movq 0x10(%rbx), %rcx pushq $0x20 popq %rdx subl %esi, %edx xorl %r8d, %r8d xorl %edi, %edi cmpq %rdi, %rcx je 0x13cb3 movl (%rax,%rdi,4), %r9d shlxl %esi, %r9d, %r10d addl %r8d, %r10d shrxl %edx, %r9d, %r8d movl %r10d, (%rax,%rdi,4) movl %r8d, 0xc(%rsp) incq %rdi jmp 0x13c8f testl %r8d, %r8d je 0x13cc5 leaq 0xc(%rsp), %rsi movq %rbx, %rdi callq 0x14126 movq %rbx, %rax addq $0x10, %rsp popq %rbx retq leaq 0x441779(%rip), %rdi # 0x45544e leaq 0x4415c5(%rip), %rsi # 0x4552a1 leaq 0x441776(%rip), %rcx # 0x455459 movl $0x538, %edx # imm = 0x538 callq 0xb150 nop
/quesnel[P]baryonyx/external/fmt/include/fmt/format-inl.h
fmt::v7::detail::bigint::divmod_assign(fmt::v7::detail::bigint const&)
int divmod_assign(const bigint& divisor) { FMT_ASSERT(this != &divisor, ""); if (compare(*this, divisor) < 0) return 0; FMT_ASSERT(divisor.bigits_[divisor.bigits_.size() - 1u] != 0, ""); align(divisor); int quotient = 0; do { subtract_aligned(divisor); ++quotient; } while (compare(*this, divisor) >= 0); return quotient; }
pushq %rbp pushq %r14 pushq %rbx cmpq %rsi, %rdi je 0x13e57 movq %rsi, %rbx movq %rdi, %r14 callq 0x13e87 testl %eax, %eax js 0x13e4e movq 0x8(%rbx), %rax movq 0x10(%rbx), %rcx cmpl $0x0, -0x4(%rax,%rcx,4) je 0x13e6f movq %r14, %rdi movq %rbx, %rsi callq 0x14426 xorl %ebp, %ebp movq %r14, %rdi movq %rbx, %rsi callq 0x144a2 incl %ebp movq %r14, %rdi movq %rbx, %rsi callq 0x13e87 testl %eax, %eax jns 0x13e30 jmp 0x13e50 xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r14 popq %rbp retq leaq 0x441443(%rip), %rdi # 0x4552a1 leaq 0x442ac3(%rip), %rdx # 0x456928 movl $0x5b6, %esi # imm = 0x5B6 callq 0xf9cb leaq 0x44142b(%rip), %rdi # 0x4552a1 leaq 0x442aab(%rip), %rdx # 0x456928 movl $0x5b8, %esi # imm = 0x5B8 callq 0xf9cb
/quesnel[P]baryonyx/external/fmt/include/fmt/format-inl.h
fmt::v7::basic_memory_buffer<unsigned int, 32ul, std::allocator<unsigned int>>::grow(unsigned long)
void basic_memory_buffer<T, SIZE, Allocator>::grow(size_t size) { #ifdef FMT_FUZZ if (size > 5000) throw std::runtime_error("fuzz mode - won't grow that much"); #endif size_t old_capacity = this->capacity(); size_t new_capacity = old_capacity + old_capacity / 2; if (size > new_capacity) new_capacity = size; T* old_data = this->data(); T* new_data = std::allocator_traits<Allocator>::allocate(alloc_, new_capacity); // The following code doesn't throw, so the raw pointer above doesn't leak. std::uninitialized_copy(old_data, old_data + this->size(), detail::make_checked(new_data, new_capacity)); this->set(new_data, new_capacity); // deallocate must not throw according to the standard, but even if it does, // the buffer already uses the new storage and will deallocate it in // destructor. if (old_data != store_) alloc_.deallocate(old_data, old_capacity); }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq 0x18(%rdi), %r14 movq 0x8(%rdi), %rbx movq %rdi, %r15 addq $0xa0, %rdi movq %r14, %r12 shrq %r12 addq %r14, %r12 cmpq %rsi, %r12 cmovbeq %rsi, %r12 movq %r12, %rsi callq 0x140c0 movq 0x10(%r15), %rdx movq %rax, %r13 testq %rdx, %rdx je 0x1408c shlq $0x2, %rdx movq %r13, %rdi movq %rbx, %rsi callq 0xb140 movq %r13, 0x8(%r15) movq %r12, 0x18(%r15) addq $0x20, %r15 cmpq %r15, %rbx je 0x140b5 shlq $0x2, %r14 movq %rbx, %rdi movq %r14, %rsi popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0xb0d0 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::bigint::square()
void square() { basic_memory_buffer<bigit, bigits_capacity> n(std::move(bigits_)); int num_bigits = static_cast<int>(bigits_.size()); int num_result_bigits = 2 * num_bigits; bigits_.resize(to_unsigned(num_result_bigits)); using accumulator_t = conditional_t<FMT_USE_INT128, uint128_t, accumulator>; auto sum = accumulator_t(); for (int bigit_index = 0; bigit_index < num_bigits; ++bigit_index) { // Compute bigit at position bigit_index of the result by adding // cross-product terms n[i] * n[j] such that i + j == bigit_index. for (int i = 0, j = bigit_index; j >= 0; ++i, --j) { // Most terms are multiplied twice which can be optimized in the future. sum += static_cast<double_bigit>(n[i]) * n[j]; } (*this)[bigit_index] = static_cast<bigit>(sum); sum >>= bits<bigit>::value; // Compute the carry. } // Do the same for the top half. for (int bigit_index = num_bigits; bigit_index < num_result_bigits; ++bigit_index) { for (int j = num_bigits - 1, i = bigit_index - j; i < num_bigits;) sum += static_cast<double_bigit>(n[i++]) * n[j--]; (*this)[bigit_index] = static_cast<bigit>(sum); sum >>= bits<bigit>::value; } --num_result_bigits; remove_leading_zeros(); exp_ *= 2; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rdi, %rbx leaq 0x10(%rsp), %rdi movq %rbx, %rsi callq 0x142b4 movq 0x10(%rbx), %r14 leal (%r14,%r14), %edi movl %edi, 0x4(%rsp) callq 0x1085f movl %eax, %esi movq %rbx, %rdi callq 0x140f0 movl %r14d, %eax sarl $0x1f, %eax xorl %r15d, %r15d xorl %r12d, %r12d xorl %r13d, %r13d andnl %r14d, %eax, %ebp cmpl %ebp, %r15d je 0x14205 movq 0x18(%rsp), %rax movq %r15, %rdx movq %rax, %rcx cmpq $-0x1, %rdx je 0x141e5 movl %edx, %edi movl (%rcx), %esi movl (%rax,%rdi,4), %edi imulq %rsi, %rdi addq %rdi, %r12 adcq $0x0, %r13 decq %rdx addq $0x4, %rcx jmp 0x141c4 movl %r15d, %edi callq 0x1085f movq 0x8(%rbx), %rcx movl %eax, %eax incq %r15 movl %r12d, (%rcx,%rax,4) shrdq $0x20, %r13, %r12 shrq $0x20, %r13 jmp 0x141b4 leal -0x1(%r14), %eax movslq %r14d, %rbp movq %rbx, 0x8(%rsp) movslq %eax, %r15 pushq $0x1 popq %rbx cmpl 0x4(%rsp), %r14d jge 0x1426e movq 0x18(%rsp), %rcx movslq %ebx, %rax movq %r15, %rdx cmpq %rbp, %rax jge 0x14247 movl (%rcx,%rax,4), %esi movl (%rcx,%rdx,4), %edi incq %rax decq %rdx imulq %rsi, %rdi addq %rdi, %r12 adcq $0x0, %r13 jmp 0x14229 movl %r14d, %edi callq 0x1085f movq 0x8(%rsp), %rcx movl %eax, %eax incl %r14d incl %ebx movq 0x8(%rcx), %rcx movl %r12d, (%rcx,%rax,4) shrdq $0x20, %r13, %r12 shrq $0x20, %r13 jmp 0x14217 movq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0x142dc shll 0xa8(%rbx) leaq 0x10(%rsp), %rdi callq 0x1431c addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x1429f leaq 0x10(%rsp), %rdi movq %rax, %rbx callq 0x1431c movq %rbx, %rdi callq 0xb3d0
/quesnel[P]baryonyx/external/fmt/include/fmt/format-inl.h
fmt::v7::detail::bigint::remove_leading_zeros()
void remove_leading_zeros() { int num_bigits = static_cast<int>(bigits_.size()) - 1; while (num_bigits > 0 && (*this)[num_bigits] == 0) --num_bigits; bigits_.resize(to_unsigned(num_bigits + 1)); }
pushq %rbp pushq %r14 pushq %rbx movl 0x10(%rdi), %ebp movq %rdi, %rbx movl %ebp, %r14d cmpl $0x2, %ebp jl 0x14305 leal -0x1(%r14), %ebp movl %ebp, %edi callq 0x1085f movq 0x8(%rbx), %rcx movl %eax, %eax cmpl $0x0, (%rcx,%rax,4) je 0x142e6 movl %r14d, %edi callq 0x1085f movl %eax, %esi movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x140f0 nop
/quesnel[P]baryonyx/external/fmt/include/fmt/format-inl.h
fmt::v7::detail::bigint::align(fmt::v7::detail::bigint const&)
void align(const bigint& other) { int exp_difference = exp_ - other.exp_; if (exp_difference <= 0) return; int num_bigits = static_cast<int>(bigits_.size()); bigits_.resize(to_unsigned(num_bigits + exp_difference)); for (int i = num_bigits - 1, j = i + exp_difference; i >= 0; --i, --j) bigits_[j] = bigits_[i]; std::uninitialized_fill_n(bigits_.data(), exp_difference, 0); exp_ -= exp_difference; }
pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movl 0xa8(%rdi), %r14d subl 0xa8(%rsi), %r14d jle 0x14498 movl 0x10(%rdi), %r15d movq %rdi, %rbx leal (%r14,%r15), %edi callq 0x1085f movl %eax, %esi movq %rbx, %rdi callq 0x140f0 movq 0x8(%rbx), %rdi leal -0x1(%r15,%r14), %ecx movl %r15d, %eax decl %eax movslq %ecx, %rcx leaq (%rdi,%rcx,4), %rcx testl %eax, %eax js 0x14481 movl %eax, %edx movl (%rdi,%rdx,4), %edx decl %eax movl %edx, (%rcx) addq $-0x4, %rcx jmp 0x1446e leaq 0xc(%rsp), %rdx movl %r14d, %esi andl $0x0, (%rdx) callq 0x1457b subl %r14d, 0xa8(%rbx) addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format-inl.h
fmt::v7::detail::bigint::subtract_bigits(int, unsigned int, unsigned int&)
void subtract_bigits(int index, bigit other, bigit& borrow) { auto result = static_cast<double_bigit>((*this)[index]) - other - borrow; (*this)[index] = static_cast<bigit>(result); borrow = static_cast<bigit>(result >> (bigit_bits * 2 - 1)); }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %r15 movl %esi, %edi movq %rcx, %rbx movl %edx, %ebp movl %esi, %r14d callq 0x1085f movq 0x8(%r15), %rcx movl %eax, %eax movl %r14d, %edi movl (%rcx,%rax,4), %r12d movl (%rbx), %ecx movl %ebp, %eax addq %rax, %rcx subq %rcx, %r12 callq 0x1085f movq 0x8(%r15), %rcx movl %eax, %eax movl %r12d, (%rcx,%rax,4) shrq $0x3f, %r12 movl %r12d, (%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format-inl.h
fmt::v7::detail::bigint::multiply(unsigned int)
void multiply(uint32_t value) { const double_bigit wide_value = value; bigit carry = 0; for (size_t i = 0, n = bigits_.size(); i < n; ++i) { double_bigit result = bigits_[i] * wide_value + carry; bigits_[i] = static_cast<bigit>(result); carry = static_cast<bigit>(result >> bigit_bits); } if (carry != 0) bigits_.push_back(carry); }
pushq %rax andl $0x0, 0x4(%rsp) movl %esi, %eax xorl %edx, %edx xorl %r8d, %r8d movq 0x8(%rdi), %rcx movq 0x10(%rdi), %rsi cmpq %r8, %rsi je 0x14660 movl (%rcx,%r8,4), %r9d movl %edx, %edx imulq %rax, %r9 addq %r9, %rdx movl %edx, (%rcx,%r8,4) shrq $0x20, %rdx incq %r8 movl %edx, 0x4(%rsp) jmp 0x1463d testl %edx, %edx je 0x1466e leaq 0x4(%rsp), %rsi callq 0x14126 popq %rax retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format-inl.h
fmt::v7::detail::big_decimal_fp fmt::v7::detail::write_padded<(fmt::v7::align::type)2, fmt::v7::detail::buffer_appender<char>, char, fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_float<fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::big_decimal_fp, char>(fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::big_decimal_fp const&, fmt::v7::basic_format_specs<char> const&, fmt::v7::detail::float_specs, char)::'lambda'(fmt::v7::detail::buffer_appender<char>)&>(fmt::v7::detail::big_decimal_fp, fmt::v7::basic_format_specs<char> const&, unsigned long, unsigned long, fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_float<fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::big_decimal_fp, char>(fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::big_decimal_fp const&, fmt::v7::basic_format_specs<char> const&, fmt::v7::detail::float_specs, char)::'lambda'(fmt::v7::detail::buffer_appender<char>)&)
inline OutputIt write_padded(OutputIt out, const basic_format_specs<Char>& specs, size_t size, size_t width, F&& f) { static_assert(align == align::left || align == align::right, ""); unsigned spec_width = to_unsigned(specs.width); size_t padding = spec_width > width ? spec_width - width : 0; auto* shifts = align == align::left ? data::left_padding_shifts : data::right_padding_shifts; size_t left_padding = padding >> shifts[specs.align]; auto it = reserve(out, size + padding * specs.fill.size()); it = fill(it, left_padding, specs.fill); it = f(it); it = fill(it, padding - left_padding, specs.fill); return base_iterator(out, it); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r12 movl (%rsi), %edi movq %r8, %r14 movq %rcx, %rbp movq %rdx, %r13 movq %rsi, %rbx callq 0x1085f movl %eax, %eax xorl %r15d, %r15d subq %rbp, %rax movzbl 0xe(%rbx), %esi leaq 0x442a3e(%rip), %rcx # 0x457229 movq %r12, %rdi cmovaeq %rax, %r15 movzbl 0x9(%rbx), %eax addq $0xa, %rbx imulq %r15, %rsi andl $0xf, %eax movb (%rax,%rcx), %al addq %r13, %rsi shrxq %rax, %r15, %rbp callq 0xf897 movq %rax, %rdi movq %rbp, %rsi movq %rbx, %rdx callq 0x1087f movq %r14, %rdi movq %rax, %rsi callq 0x14714 subq %rbp, %r15 movq %rax, %rdi movq %rbx, %rdx movq %r15, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1087f
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_significand<fmt::v7::detail::buffer_appender<char>, char>(fmt::v7::detail::buffer_appender<char>, char const*, int, int, char)
inline OutputIt write_significand(OutputIt out, const char* significand, int significand_size, int integral_size, Char decimal_point) { out = detail::copy_str<Char>(significand, significand + integral_size, out); if (!decimal_point) return out; *out++ = decimal_point; return detail::copy_str<Char>(significand + integral_size, significand + significand_size, out); }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movslq %ecx, %r15 movl %r8d, %r12d movl %edx, %ebp movq %rdi, %rdx movq %rsi, %rbx movb %r12b, 0xf(%rsp) movq %rsi, %rdi addq %rsi, %r15 movq %r15, %rsi callq 0x10954 movq %rax, %r14 testb %r12b, %r12b je 0x148a2 leaq 0xf(%rsp), %rsi movq %r14, %rdi callq 0xf9f2 movslq %ebp, %rax movq %r15, %rdi movq %r14, %rdx addq %rax, %rbx movq %rbx, %rsi callq 0x10954 movq %rax, %r14 movq %r14, %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::big_decimal_fp fmt::v7::detail::write_padded<(fmt::v7::align::type)2, fmt::v7::detail::buffer_appender<char>, char, fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_float<fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::big_decimal_fp, char>(fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::big_decimal_fp const&, fmt::v7::basic_format_specs<char> const&, fmt::v7::detail::float_specs, char)::'lambda0'(fmt::v7::detail::buffer_appender<char>)&>(fmt::v7::detail::big_decimal_fp, fmt::v7::basic_format_specs<char> const&, unsigned long, unsigned long, fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_float<fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::big_decimal_fp, char>(fmt::v7::detail::buffer_appender<char>, fmt::v7::detail::big_decimal_fp const&, fmt::v7::basic_format_specs<char> const&, fmt::v7::detail::float_specs, char)::'lambda0'(fmt::v7::detail::buffer_appender<char>)&)
inline OutputIt write_padded(OutputIt out, const basic_format_specs<Char>& specs, size_t size, size_t width, F&& f) { static_assert(align == align::left || align == align::right, ""); unsigned spec_width = to_unsigned(specs.width); size_t padding = spec_width > width ? spec_width - width : 0; auto* shifts = align == align::left ? data::left_padding_shifts : data::right_padding_shifts; size_t left_padding = padding >> shifts[specs.align]; auto it = reserve(out, size + padding * specs.fill.size()); it = fill(it, left_padding, specs.fill); it = f(it); it = fill(it, padding - left_padding, specs.fill); return base_iterator(out, it); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r12 movl (%rsi), %edi movq %r8, %r14 movq %rcx, %rbp movq %rdx, %r13 movq %rsi, %rbx callq 0x1085f movl %eax, %eax xorl %r15d, %r15d subq %rbp, %rax movzbl 0xe(%rbx), %esi leaq 0x442943(%rip), %rcx # 0x457229 movq %r12, %rdi cmovaeq %rax, %r15 movzbl 0x9(%rbx), %eax addq $0xa, %rbx imulq %r15, %rsi andl $0xf, %eax movb (%rax,%rcx), %al addq %r13, %rsi shrxq %rax, %r15, %rbp callq 0xf897 movq %rax, %rdi movq %rbp, %rsi movq %rbx, %rdx callq 0x1087f movq %r14, %rdi movq %rax, %rsi callq 0x14944 subq %rbp, %r15 movq %rax, %rdi movq %rbx, %rdx movq %r15, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1087f
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_ptr<char, fmt::v7::detail::buffer_appender<char>, unsigned long>(fmt::v7::detail::buffer_appender<char>, unsigned long, fmt::v7::basic_format_specs<char> const*)
OutputIt write_ptr(OutputIt out, UIntPtr value, const basic_format_specs<Char>* specs) { int num_digits = count_digits<4>(value); auto size = to_unsigned(num_digits) + size_t(2); using iterator = remove_reference_t<decltype(reserve(out, 0))>; auto write = [=](iterator it) { *it++ = static_cast<Char>('0'); *it++ = static_cast<Char>('x'); return format_uint<4, Char>(it, value, num_digits); }; return specs ? write_padded<align::right>(out, *specs, size, write) : base_iterator(out, write(reserve(out, size))); }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %r14 movq %rsi, %rdi movq %rdx, %rbx movq %rsi, %r15 callq 0x14d0a movl %eax, %edi movl %eax, %ebp callq 0x1085f movl %eax, %edx addq $0x2, %rdx movq %r15, 0x8(%rsp) movl %ebp, 0x10(%rsp) testq %rbx, %rbx je 0x14ce7 leaq 0x8(%rsp), %rcx movq %r14, %rdi movq %rbx, %rsi callq 0x14d1f jmp 0x14cff movq %r14, %rdi movq %rdx, %rsi callq 0xf897 leaq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x14d2a addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_padded<(fmt::v7::align::type)2, fmt::v7::detail::buffer_appender<char>, char, fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_ptr<char, fmt::v7::detail::buffer_appender<char>, unsigned long>(fmt::v7::detail::buffer_appender<char>, unsigned long, fmt::v7::basic_format_specs<char> const*)::'lambda'(fmt::v7::detail::buffer_appender<char>)&>(fmt::v7::detail::buffer_appender<char>, fmt::v7::basic_format_specs<unsigned long> const&, unsigned long, unsigned long, fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write_ptr<char, fmt::v7::detail::buffer_appender<char>, unsigned long>(fmt::v7::detail::buffer_appender<char>, unsigned long, fmt::v7::basic_format_specs<char> const*)::'lambda'(fmt::v7::detail::buffer_appender<char>)&)
inline OutputIt write_padded(OutputIt out, const basic_format_specs<Char>& specs, size_t size, size_t width, F&& f) { static_assert(align == align::left || align == align::right, ""); unsigned spec_width = to_unsigned(specs.width); size_t padding = spec_width > width ? spec_width - width : 0; auto* shifts = align == align::left ? data::left_padding_shifts : data::right_padding_shifts; size_t left_padding = padding >> shifts[specs.align]; auto it = reserve(out, size + padding * specs.fill.size()); it = fill(it, left_padding, specs.fill); it = f(it); it = fill(it, padding - left_padding, specs.fill); return base_iterator(out, it); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r12 movl (%rsi), %edi movq %r8, %r14 movq %rcx, %rbp movq %rdx, %r13 movq %rsi, %rbx callq 0x1085f movl %eax, %eax xorl %r15d, %r15d subq %rbp, %rax movzbl 0xe(%rbx), %esi leaq 0x442488(%rip), %rcx # 0x457229 movq %r12, %rdi cmovaeq %rax, %r15 movzbl 0x9(%rbx), %eax addq $0xa, %rbx imulq %r15, %rsi andl $0xf, %eax movb (%rax,%rcx), %al addq %r13, %rsi shrxq %rax, %r15, %rbp callq 0xf897 movq %rax, %rdi movq %rbp, %rsi movq %rbx, %rdx callq 0x1087f movq %r14, %rdi movq %rax, %rsi callq 0x14d2a subq %rbp, %r15 movq %rax, %rdi movq %rbx, %rdx movq %r15, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1087f
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::format_handler<fmt::v7::detail::buffer_appender<char>, char, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>::on_text(char const*, char const*)
void on_text(const Char* begin, const Char* end) { auto size = to_unsigned(end - begin); auto out = context.out(); auto&& it = reserve(out, size); it = std::copy_n(begin, size, it); context.advance_to(out); }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax subq %rsi, %rdx movq %rdi, %r14 movq %rsi, %rbx movq %rdx, %rdi callq 0x10002 movq 0x20(%r14), %r12 movq %rax, %r15 movq %rax, %rsi movq %r12, %rdi callq 0xf897 movq %rbx, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x1090a movq %r12, 0x20(%r14) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
void fmt::v7::detail::parse_format_string<false, char, fmt::v7::detail::format_handler<fmt::v7::detail::buffer_appender<char>, char, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>&>(fmt::v7::basic_string_view<char>, fmt::v7::detail::format_handler<fmt::v7::detail::buffer_appender<char>, char, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>&)::writer::operator()(char const*, char const*)
FMT_CONSTEXPR void operator()(const Char* pbegin, const Char* pend) { if (pbegin == pend) return; for (;;) { const Char* p = nullptr; if (!find<IS_CONSTEXPR>(pbegin, pend, '}', p)) return handler_.on_text(pbegin, pend); ++p; if (p == pend || *p != '}') return handler_.on_error("unmatched '}' in format string"); handler_.on_text(pbegin, p); pbegin = p + 1; } }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp cmpq %rdx, %rsi je 0x1526a movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 pushq $0x7d popq %rbp leaq 0x8(%rsp), %r12 andq $0x0, 0x8(%rsp) movq %r15, %rdi movq %rbx, %rsi movl %ebp, %edx movq %r12, %rcx callq 0x151c1 testb %al, %al je 0x1525c movq 0x8(%rsp), %rdx incq %rdx movq %rdx, 0x8(%rsp) cmpq %rbx, %rdx je 0x15277 cmpb $0x7d, (%rdx) jne 0x15277 movq (%r14), %rdi movq %r15, %rsi callq 0x14ecc movq 0x8(%rsp), %r15 incq %r15 jmp 0x15216 movq (%r14), %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x14ecc addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq (%r14), %rdi leaq 0x4402ba(%rip), %rsi # 0x45553b callq 0xf73a
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
char const* fmt::v7::detail::parse_arg_id<char, fmt::v7::detail::id_adapter<fmt::v7::detail::format_handler<fmt::v7::detail::buffer_appender<char>, char, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>&, char>&>(char const*, char const*, fmt::v7::detail::id_adapter<fmt::v7::detail::format_handler<fmt::v7::detail::buffer_appender<char>, char, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>&, char>&)
FMT_CONSTEXPR const Char* parse_arg_id(const Char* begin, const Char* end, IDHandler&& handler) { FMT_ASSERT(begin != end, ""); Char c = *begin; if (c == '}' || c == ':') { handler(); return begin; } if (c >= '0' && c <= '9') { int index = 0; if (c != '0') index = parse_nonnegative_int(begin, end, handler); else ++begin; if (begin == end || (*begin != '}' && *begin != ':')) handler.on_error("invalid format string"); else handler(index); return begin; } if (!is_name_start(c)) { handler.on_error("invalid format string"); return begin; } auto it = begin; do { ++it; } while (it != end && (is_name_start(c = *it) || ('0' <= c && c <= '9'))); handler(basic_string_view<Char>(begin, to_unsigned(it - begin))); return it; }
pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, 0x8(%rsp) cmpq %rsi, %rdi je 0x1539b movzbl (%rdi), %eax movq %rdx, %rbx movq %rdi, %r14 cmpl $0x7d, %eax je 0x152b0 cmpl $0x3a, %eax jne 0x152c5 movq %rbx, %rdi callq 0x156b8 movq %r14, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq leal -0x30(%rax), %ecx movq %rsi, %r15 cmpb $0x9, %cl ja 0x152e3 cmpb $0x30, %al jne 0x1534d incq %r14 xorl %eax, %eax movq %r14, 0x8(%rsp) jmp 0x15363 cmpb $0x5f, %al je 0x15300 andb $-0x21, %al addb $-0x41, %al cmpb $0x19, %al jbe 0x15300 leaq 0x440264(%rip), %rsi # 0x45555a movq %rbx, %rdi callq 0x15748 jmp 0x152b8 leaq 0x1(%r14), %rax cmpq %r15, %rax je 0x1532c movb (%rax), %cl incq %rax leal -0x30(%rcx), %edx cmpb $0xa, %dl jb 0x15304 cmpb $0x5f, %cl je 0x15304 andb $-0x21, %cl addb $-0x41, %cl cmpb $0x1a, %cl jb 0x15304 decq %rax movq %rax, %r15 movq %r15, %rdi subq %r14, %rdi callq 0x10002 movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0x15774 movq %r15, %r14 jmp 0x152b8 leaq 0x8(%rsp), %r14 movq %r15, %rsi movq %rbx, %rdx movq %r14, %rdi callq 0x156cd movq (%r14), %r14 cmpq %r15, %r14 je 0x15382 movzbl (%r14), %ecx cmpl $0x3a, %ecx je 0x15376 cmpl $0x7d, %ecx jne 0x15382 movq %rbx, %rdi movl %eax, %esi callq 0x15752 jmp 0x15391 leaq 0x4401d1(%rip), %rsi # 0x45555a movq %rbx, %rdi callq 0x15748 movq 0x8(%rsp), %r14 jmp 0x152b8 leaq 0x43fdd9(%rip), %rdi # 0x45517b leaq 0x44157f(%rip), %rdx # 0x456928 movl $0xa8e, %esi # imm = 0xA8E callq 0xf9cb nop
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
fmt::v7::detail::format_handler<fmt::v7::detail::buffer_appender<char>, char, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>::on_format_specs(int, char const*, char const*)
const Char* on_format_specs(int id, const Char* begin, const Char* end) { auto arg = get_arg(context, id); if (arg.type() == type::custom_type) { advance_to(parse_context, begin); visit_format_arg(custom_formatter<Context>(parse_context, context), arg); return parse_context.begin(); } auto specs = basic_format_specs<Char>(); if (begin + 1 < end && begin[1] == '}' && is_ascii_letter(*begin)) { specs.type = static_cast<char>(*begin++); } else { using parse_context_t = basic_format_parse_context<Char>; specs_checker<specs_handler<parse_context_t, Context>> handler( specs_handler<parse_context_t, Context>(specs, parse_context, context), arg.type()); begin = parse_format_specs(begin, end, handler); if (begin == end || *begin != '}') on_error("missing '}' in format string"); } context.advance_to(visit_format_arg( arg_formatter<OutputIt, Char>(context, &parse_context, &specs), arg)); return begin; }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x70, %rsp leaq 0x20(%rdi), %rbx leaq 0x20(%rsp), %r14 movq %rdx, %r13 movl %esi, %edx movq %rdi, %r15 movq %rcx, %r12 movq %r14, %rdi movq %rbx, %rsi callq 0x1565d movl 0x10(%r14), %eax cmpl $0xf, %eax jne 0x15416 addq $0x8, %r15 movq %r13, %rsi movq %r15, %rdi callq 0x158b1 cmpl $0xf, 0x30(%rsp) jne 0x1540e movq 0x20(%rsp), %rdi movq %r15, %rsi movq %rbx, %rdx callq *0x28(%rsp) movq (%r15), %r14 jmp 0x155f6 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 leaq 0x1(%r13), %r14 movq %rcx, 0x10(%rsp) movl $0x200000, 0x18(%rsp) # imm = 0x200000 andw $0x0, 0x1c(%rsp) movb $0x1, 0x1e(%rsp) cmpq %r12, %r14 jae 0x1545e cmpb $0x7d, (%r14) jne 0x1545e movb (%r13), %cl movl %ecx, %edx andb $-0x21, %dl addb $-0x41, %dl cmpb $0x19, %dl ja 0x1545e movb %cl, 0x18(%rsp) jmp 0x154a2 leaq 0x8(%r15), %rcx leaq 0x10(%rsp), %rsi leaq 0x40(%rsp), %rdx movq %r13, %rdi movq %rsi, (%rdx) movq %rcx, 0x8(%rdx) movq %rbx, 0x10(%rdx) movq %rdx, 0x18(%rdx) movq %r12, %rsi movl %eax, 0x20(%rdx) callq 0x158b6 cmpq %r12, %rax je 0x1564e cmpb $0x7d, (%rax) movq %rax, %r14 jne 0x1564e movl 0x30(%rsp), %eax movq 0x20(%r15), %rdx movq 0x38(%r15), %rsi leaq 0x8(%r15), %rcx decl %eax movq %rdx, 0x40(%rsp) leaq 0x10(%rsp), %rdx movq %rsi, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq %rbx, 0x58(%rsp) movq %rcx, 0x60(%rsp) andq $0x0, 0x68(%rsp) cmpl $0xe, %eax ja 0x15590 leaq 0x43ef0c(%rip), %rcx # 0x4543f0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl 0x20(%rsp), %esi leaq 0x40(%rsp), %r15 movq %r15, %rdi callq 0x16816 jmp 0x155f0 movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x167c0 jmp 0x155f3 movq 0x20(%rsp), %rsi leaq 0x40(%rsp), %rdi callq 0x166f6 jmp 0x155f3 movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx leaq 0x40(%rsp), %r15 leaq 0x10(%rsp), %rcx movq %r15, %rdi callq 0x18352 jmp 0x155f0 movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x16730 jmp 0x155f3 vmovsd 0x20(%rsp), %xmm0 leaq 0x40(%rsp), %rdi callq 0x16670 jmp 0x155f3 movq 0x20(%rsp), %rsi leaq 0x40(%rsp), %r15 movq %r15, %rdi callq 0x1769e jmp 0x155f0 leaq 0x40(%rsp), %rdi callq 0x167fc jmp 0x155f3 movq 0x20(%rsp), %rsi leaq 0x40(%rsp), %r15 movq %r15, %rdi callq 0x182f2 jmp 0x155f0 movsbl 0x20(%rsp), %esi leaq 0x40(%rsp), %rdi callq 0x1660c jmp 0x155f3 movl 0x20(%rsp), %esi leaq 0x40(%rsp), %r15 movq %r15, %rdi callq 0x1763e jmp 0x155f0 movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx leaq 0x40(%rsp), %r15 leaq 0x10(%rsp), %rcx movq %r15, %rdi callq 0x1916e movq (%r15), %rax movq %rax, (%rbx) movq %r14, %rax addq $0x70, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq 0x20(%rsp), %rsi leaq 0x40(%rsp), %rdi callq 0x16788 jmp 0x155f3 movzbl 0x20(%rsp), %esi leaq 0x40(%rsp), %rdi callq 0x165da jmp 0x155f3 leaq 0x40(%rsp), %rdi fldt 0x20(%rsp) fstpt (%rsp) callq 0x166ac jmp 0x155f3 vmovss 0x20(%rsp), %xmm0 leaq 0x40(%rsp), %rdi callq 0x16634 jmp 0x155f3 leaq 0x43ff34(%rip), %rsi # 0x455589 movq %r15, %rdi callq 0xf73a
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
int fmt::v7::detail::parse_nonnegative_int<char, fmt::v7::detail::id_adapter<fmt::v7::detail::format_handler<fmt::v7::detail::buffer_appender<char>, char, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>&, char>&>(char const*&, char const*, fmt::v7::detail::id_adapter<fmt::v7::detail::format_handler<fmt::v7::detail::buffer_appender<char>, char, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>&, char>&)
FMT_CONSTEXPR int parse_nonnegative_int(const Char*& begin, const Char* end, ErrorHandler&& eh) { FMT_ASSERT(begin != end && '0' <= *begin && *begin <= '9', ""); unsigned value = 0; // Convert to unsigned to prevent a warning. constexpr unsigned max_int = max_value<int>(); unsigned big = max_int / 10; do { // Check for overflow. if (value > big) { value = max_int + 1; break; } value = value * 10 + unsigned(*begin - '0'); ++begin; } while (begin != end && '0' <= *begin && *begin <= '9'); if (value > max_int) eh.on_error("number is too big"); return static_cast<int>(value); }
pushq %rbx movq (%rdi), %rax cmpq %rsi, %rax je 0x15730 movb (%rax), %cl leal -0x30(%rcx), %r8d cmpb $0x9, %r8b ja 0x15730 incq %rax xorl %ebx, %ebx cmpl $0xccccccc, %ebx # imm = 0xCCCCCCC ja 0x15718 imull $0xa, %ebx, %r8d movzbl %cl, %ecx movq %rax, (%rdi) leal -0x30(%r8,%rcx), %ebx cmpq %rsi, %rax je 0x15712 movb (%rax), %cl incq %rax leal -0x30(%rcx), %r8d cmpb $0xa, %r8b jb 0x156e7 testl %ebx, %ebx jns 0x1572c jmp 0x1571d movl $0x80000000, %ebx # imm = 0x80000000 leaq 0x43fc4a(%rip), %rsi # 0x45536e movq %rdx, %rdi callq 0x15748 movl %ebx, %eax popq %rbx retq leaq 0x43fa44(%rip), %rdi # 0x45517b leaq 0x4411ea(%rip), %rdx # 0x456928 movl $0x92f, %esi # imm = 0x92F callq 0xf9cb
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
int fmt::v7::basic_format_args<fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>::get_id<char>(fmt::v7::basic_string_view<char>) const
int get_id(basic_string_view<Char> name) const { if (!has_named_args()) return -1; const auto& named_args = (is_packed() ? values_[-1] : args_[-1].value_).named_args; for (size_t i = 0; i < named_args.size; ++i) { if (named_args.data[i].name == name) return named_args.data[i].id; } return -1; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq (%rdi), %rcx movq %rdx, (%rsp) pushq $-0x1 popq %rax btq $0x3e, %rcx jae 0x1583d movq 0x8(%rdi), %r13 xorl %ebp, %ebp testq %rcx, %rcx movq %rsi, %r15 setns %bpl xorl %ebx, %ebx xorl %r14d, %r14d shll $0x4, %ebp orq $-0x20, %rbp cmpq 0x8(%r13,%rbp), %r14 jae 0x1582f movq (%r13,%rbp), %rax movq (%rax,%rbx), %r12 movq %r12, %rdi callq 0xb220 movq (%rsp), %rcx movq %r12, %rdi movq %rax, %rsi movq %r15, %rdx callq 0x1584c testb %al, %al jne 0x15834 incq %r14 addq $0x10, %rbx jmp 0x157f8 pushq $-0x1 popq %rax jmp 0x1583d movq (%r13,%rbp), %rax movl 0x8(%rax,%rbx), %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/quesnel[P]baryonyx/external/fmt/include/fmt/core.h
char const* fmt::v7::detail::parse_format_specs<char, fmt::v7::detail::specs_checker<fmt::v7::detail::specs_handler<fmt::v7::basic_format_parse_context<char, fmt::v7::detail::error_handler>, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>>&>(char const*, char const*, fmt::v7::detail::specs_checker<fmt::v7::detail::specs_handler<fmt::v7::basic_format_parse_context<char, fmt::v7::detail::error_handler>, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>>&)
FMT_CONSTEXPR const Char* parse_format_specs(const Char* begin, const Char* end, SpecHandler&& handler) { if (begin == end) return begin; begin = parse_align(begin, end, handler); if (begin == end) return begin; // Parse sign. switch (to_ascii(*begin)) { case '+': handler.on_plus(); ++begin; break; case '-': handler.on_minus(); ++begin; break; case ' ': handler.on_space(); ++begin; break; } if (begin == end) return begin; if (*begin == '#') { handler.on_hash(); if (++begin == end) return begin; } // Parse zero flag. if (*begin == '0') { handler.on_zero(); if (++begin == end) return begin; } begin = parse_width(begin, end, handler); if (begin == end) return begin; // Parse precision. if (*begin == '.') { begin = parse_precision(begin, end, handler); } // Parse type. if (begin != end && *begin != '}') handler.on_type(*begin++); return begin; }
pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx cmpq %rsi, %rdi je 0x15983 movq %rbx, %rdi movq %rdx, %r14 movq %rsi, %r15 callq 0x159a4 movq %rax, %rbx cmpq %r15, %rax je 0x15983 movzbl (%rbx), %eax cmpl $0x20, %eax je 0x15907 cmpl $0x2d, %eax je 0x158fd cmpl $0x2b, %eax jne 0x15912 movq %r14, %rdi callq 0x15a74 jmp 0x1590f movq %r14, %rdi callq 0x15a92 jmp 0x1590f movq %r14, %rdi callq 0x15ab0 incq %rbx cmpq %r15, %rbx je 0x15983 movb (%rbx), %al cmpb $0x23, %al jne 0x1592f movq %r14, %rdi callq 0x15ace incq %rbx cmpq %r15, %rbx je 0x15983 movb (%rbx), %al cmpb $0x30, %al jne 0x15943 movq %r14, %rdi callq 0x15ae4 incq %rbx cmpq %r15, %rbx je 0x15983 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x15b09 movq %rax, %rbx cmpq %r15, %rax je 0x15983 cmpb $0x2e, (%rbx) jne 0x1596f movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x15bae movq %rax, %rbx cmpq %r15, %rbx je 0x15983 movb (%rbx), %al cmpb $0x7d, %al je 0x15983 movq (%r14), %rcx incq %rbx movb %al, 0x8(%rcx) movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
char const* fmt::v7::detail::parse_align<char, fmt::v7::detail::specs_checker<fmt::v7::detail::specs_handler<fmt::v7::basic_format_parse_context<char, fmt::v7::detail::error_handler>, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>>&>(char const*, char const*, fmt::v7::detail::specs_checker<fmt::v7::detail::specs_handler<fmt::v7::basic_format_parse_context<char, fmt::v7::detail::error_handler>, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>>&)
FMT_CONSTEXPR const Char* parse_align(const Char* begin, const Char* end, Handler&& handler) { FMT_ASSERT(begin != end, ""); auto align = align::none; auto p = begin + code_point_length(begin); if (p >= end) p = begin; for (;;) { switch (to_ascii(*p)) { case '<': align = align::left; break; case '>': align = align::right; break; #if FMT_DEPRECATED_NUMERIC_ALIGN case '=': align = align::numeric; break; #endif case '^': align = align::center; break; } if (align != align::none) { if (p != begin) { auto c = *begin; if (c == '{') return handler.on_error("invalid fill character '{'"), begin; handler.on_fill(basic_string_view<Char>(begin, to_unsigned(p - begin))); begin = p + 1; } else ++begin; handler.on_align(align); break; } else if (p == begin) { break; } p = begin; } return begin; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax cmpq %rsi, %rdi je 0x15a5b movzbl (%rdi), %eax movq %rdx, %rbx leaq 0x43e8df(%rip), %rdx # 0x4542a0 movq %rdi, %r14 movl %eax, %ecx shrl $0x3, %ecx movsbq (%rcx,%rdx), %r15 movl $0x80ff0000, %edx # imm = 0x80FF0000 btl %ecx, %edx adcq %rdi, %r15 cmpq %rsi, %r15 cmovaeq %rdi, %r15 movzbl (%r15), %ecx cmpl $0x5e, %ecx je 0x159fd cmpl $0x3e, %ecx je 0x15a01 cmpl $0x3c, %ecx je 0x15a05 cmpq %r14, %r15 movq %r14, %r15 jne 0x159e0 jmp 0x15a4d pushq $0x3 jmp 0x15a07 pushq $0x2 jmp 0x15a07 pushq $0x1 popq %rbp movq %r15, %rdi subq %r14, %rdi je 0x15a25 cmpb $0x7b, %al jne 0x15a2a leaq 0x43fbfd(%rip), %rsi # 0x455618 movq %rbx, %rdi callq 0x15c76 jmp 0x15a4d movq %r14, %r15 jmp 0x15a3d callq 0x10002 movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0x15c80 incq %r15 movq %rbx, %rdi movl %ebp, %esi callq 0x15c8c movq %r15, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x43f719(%rip), %rdi # 0x45517b leaq 0x440ebf(%rip), %rdx # 0x456928 movl $0xaed, %esi # imm = 0xAED callq 0xf9cb nop
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
char const* fmt::v7::detail::parse_width<char, fmt::v7::detail::specs_checker<fmt::v7::detail::specs_handler<fmt::v7::basic_format_parse_context<char, fmt::v7::detail::error_handler>, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>>&>(char const*, char const*, fmt::v7::detail::specs_checker<fmt::v7::detail::specs_handler<fmt::v7::basic_format_parse_context<char, fmt::v7::detail::error_handler>, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>>&)
FMT_CONSTEXPR const Char* parse_width(const Char* begin, const Char* end, Handler&& handler) { FMT_ASSERT(begin != end, ""); if ('0' <= *begin && *begin <= '9') { handler.on_width(parse_nonnegative_int(begin, end, handler)); } else if (*begin == '{') { ++begin; if (begin != end) begin = parse_arg_id(begin, end, width_adapter<Handler, Char>(handler)); if (begin == end || *begin != '}') return handler.on_error("invalid format string"), begin; ++begin; } return begin; }
pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, (%rsp) cmpq %rsi, %rdi je 0x15b96 movb (%rdi), %al movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leal -0x30(%rax), %ecx cmpb $0x9, %cl ja 0x15b49 movq %rsp, %rbx movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x15d75 movq (%r14), %rcx movl %eax, (%rcx) movq (%rbx), %rbx jmp 0x15b89 cmpb $0x7b, %al jne 0x15b89 incq %rbx cmpq %r15, %rbx je 0x15b6b leaq 0x8(%rsp), %rdx movq %rbx, %rdi movq %r15, %rsi movq %r14, (%rdx) callq 0x15df0 movq %rax, %rbx cmpq %r15, %rbx je 0x15b7a cmpb $0x7d, (%rbx) jne 0x15b7a incq %rbx jmp 0x15b89 leaq 0x43f9d9(%rip), %rsi # 0x45555a movq %r14, %rdi callq 0x15c76 movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x43f5de(%rip), %rdi # 0x45517b leaq 0x440d84(%rip), %rdx # 0x456928 movl $0xb18, %esi # imm = 0xB18 callq 0xf9cb
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h
int fmt::v7::detail::parse_nonnegative_int<char, fmt::v7::detail::specs_checker<fmt::v7::detail::specs_handler<fmt::v7::basic_format_parse_context<char, fmt::v7::detail::error_handler>, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>>&>(char const*&, char const*, fmt::v7::detail::specs_checker<fmt::v7::detail::specs_handler<fmt::v7::basic_format_parse_context<char, fmt::v7::detail::error_handler>, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>>&)
FMT_CONSTEXPR int parse_nonnegative_int(const Char*& begin, const Char* end, ErrorHandler&& eh) { FMT_ASSERT(begin != end && '0' <= *begin && *begin <= '9', ""); unsigned value = 0; // Convert to unsigned to prevent a warning. constexpr unsigned max_int = max_value<int>(); unsigned big = max_int / 10; do { // Check for overflow. if (value > big) { value = max_int + 1; break; } value = value * 10 + unsigned(*begin - '0'); ++begin; } while (begin != end && '0' <= *begin && *begin <= '9'); if (value > max_int) eh.on_error("number is too big"); return static_cast<int>(value); }
pushq %rbx movq (%rdi), %rax cmpq %rsi, %rax je 0x15dd8 movb (%rax), %cl leal -0x30(%rcx), %r8d cmpb $0x9, %r8b ja 0x15dd8 incq %rax xorl %ebx, %ebx cmpl $0xccccccc, %ebx # imm = 0xCCCCCCC ja 0x15dc0 imull $0xa, %ebx, %r8d movzbl %cl, %ecx movq %rax, (%rdi) leal -0x30(%r8,%rcx), %ebx cmpq %rsi, %rax je 0x15dba movb (%rax), %cl incq %rax leal -0x30(%rcx), %r8d cmpb $0xa, %r8b jb 0x15d8f testl %ebx, %ebx jns 0x15dd4 jmp 0x15dc5 movl $0x80000000, %ebx # imm = 0x80000000 leaq 0x43f5a2(%rip), %rsi # 0x45536e movq %rdx, %rdi callq 0x15c76 movl %ebx, %eax popq %rbx retq leaq 0x43f39c(%rip), %rdi # 0x45517b leaq 0x440b42(%rip), %rdx # 0x456928 movl $0x92f, %esi # imm = 0x92F callq 0xf9cb
/quesnel[P]baryonyx/external/fmt/include/fmt/format.h