Dataset Viewer (First 5GB)
Auto-converted to Parquet
address
string
name
string
code
string
asm
string
file
string
bin
string
0x229c
init_platform_specific
void init_platform_specific(void) { #ifdef ALLEGRO_ANDROID al_install_touch_input(); al_android_set_apk_file_interface(); #endif }
retq
/guzmandrade[P]allegro5/examples/common.c
guzmandrade[P]allegro5[P]build_O1[P]examples[P]ex_blend_bench
0x229d
abort_example
void abort_example(char const *format, ...) { va_list args; va_start(args, format); vfprintf(stderr, format, args); va_end(args); exit(1); }
subq $0xd8, %rsp movq %rdi, %r10 leaq 0x20(%rsp), %rdi movq %rsi, 0x8(%rdi) movq %rdx, 0x10(%rdi) movq %rcx, 0x18(%rdi) movq %r8, 0x20(%rdi) movq %r9, 0x28(%rdi) testb %al, %al je 0x22fb movaps %xmm0, 0x50(%rsp) movaps %xmm1, 0x60(%rsp) movaps %xmm2, 0x70(%rsp) movaps %xmm3, 0x80(%rsp) movaps %xmm4, 0x90(%rsp) movaps %xmm5, 0xa0(%rsp) movaps %xmm6, 0xb0(%rsp) movaps %xmm7, 0xc0(%rsp) movq %rsp, %rdx movq %rdi, 0x10(%rdx) leaq 0xe0(%rsp), %rax movq %rax, 0x8(%rdx) movabsq $0x3000000008, %rax # imm = 0x3000000008 movq %rax, (%rdx) movq 0x2cbe(%rip), %rax # 0x4fe0 movq (%rax), %rdi movq %r10, %rsi callq 0x2100 movl $0x1, %edi callq 0x20e0
/guzmandrade[P]allegro5/examples/common.c
guzmandrade[P]allegro5[P]build_O1[P]examples[P]ex_blend_bench
0x2337
open_log
void open_log(void) { }
retq
/guzmandrade[P]allegro5/examples/common.c
guzmandrade[P]allegro5[P]build_O1[P]examples[P]ex_blend_bench
0x2338
open_log_monospace
void open_log_monospace(void) { }
retq
/guzmandrade[P]allegro5/examples/common.c
guzmandrade[P]allegro5[P]build_O1[P]examples[P]ex_blend_bench
0x2339
close_log
void close_log(bool wait_for_user) { (void)wait_for_user; }
retq
/guzmandrade[P]allegro5/examples/common.c
guzmandrade[P]allegro5[P]build_O1[P]examples[P]ex_blend_bench
0x233a
log_printf
void log_printf(char const *format, ...) { va_list args; va_start(args, format); #ifdef ALLEGRO_ANDROID char x[1024]; vsnprintf(x, sizeof x, format, args); ALLEGRO_TRACE_CHANNEL_LEVEL("log", 1)("%s", x); #else vprintf(format, args); #endif va_end(args); }
subq $0xd8, %rsp leaq 0x20(%rsp), %r10 movq %rsi, 0x8(%r10) movq %rdx, 0x10(%r10) movq %rcx, 0x18(%r10) movq %r8, 0x20(%r10) movq %r9, 0x28(%r10) testb %al, %al je 0x2395 movaps %xmm0, 0x50(%rsp) movaps %xmm1, 0x60(%rsp) movaps %xmm2, 0x70(%rsp) movaps %xmm3, 0x80(%rsp) movaps %xmm4, 0x90(%rsp) movaps %xmm5, 0xa0(%rsp) movaps %xmm6, 0xb0(%rsp) movaps %xmm7, 0xc0(%rsp) movq %rsp, %rsi movq %r10, 0x10(%rsi) leaq 0xe0(%rsp), %rax movq %rax, 0x8(%rsi) movabsq $0x3000000008, %rax # imm = 0x3000000008 movq %rax, (%rsi) callq 0x20b0 addq $0xd8, %rsp retq
/guzmandrade[P]allegro5/examples/common.c
guzmandrade[P]allegro5[P]build_O1[P]examples[P]ex_blend_bench
0x23c2
main
int main(int argc, char **argv) { enum Mode mode = ALL; int i; if (argc > 1) { i = strtol(argv[1], NULL, 10); switch (i) { case 0: mode = PLAIN_BLIT; break; case 1: mode = SCALED_BLIT; break; case 2: mode = ROTATE_BLIT; break; } } if (!al_init()) { abort_example("Could not init Allegro\n"); } open_log(); al_init_image_addon(); al_init_primitives_addon(); init_platform_specific(); display = al_create_display(640, 480); if (!display) { abort_example("Error creating display\n"); } if (mode == ALL) { for (mode = PLAIN_BLIT; mode <= ROTATE_BLIT; mode++) { do_test(mode); } } else { do_test(mode); } al_destroy_display(display); close_log(true); return 0; }
pushq %rbp pushq %rbx pushq %rax xorl %ebx, %ebx movb $0x1, %bpl cmpl $0x2, %edi jl 0x2404 movq 0x8(%rsi), %rdi xorl %ebx, %ebx xorl %esi, %esi movl $0xa, %edx callq 0x2120 cmpl $0x2, %eax je 0x23fd cmpl $0x1, %eax je 0x23f6 testl %eax, %eax jne 0x2404 movl $0x1, %ebx jmp 0x2402 movl $0x2, %ebx jmp 0x2402 movl $0x3, %ebx xorl %ebp, %ebp leaq 0x315(%rip), %rsi # 0x2720 movl $0x5020700, %edi # imm = 0x5020700 callq 0x2140 testb %al, %al je 0x2474 callq 0x2040 callq 0x2050 movl $0x280, %edi # imm = 0x280 movl $0x1e0, %esi # imm = 0x1E0 callq 0x20c0 movq %rax, 0x2caf(%rip) # 0x50e8 testq %rax, %rax je 0x247d testb %bpl, %bpl je 0x2458 movl $0x1, %ebx movl %ebx, %edi callq 0x248b incl %ebx cmpl $0x4, %ebx jne 0x2448 jmp 0x245f movl %ebx, %edi callq 0x248b movq 0x2c82(%rip), %rdi # 0x50e8 callq 0x2170 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq leaq 0xbc9(%rip), %rdi # 0x3044 jmp 0x2484 leaq 0xbd8(%rip), %rdi # 0x305c xorl %eax, %eax callq 0x229d
/guzmandrade[P]allegro5/examples/ex_blend_bench.c
guzmandrade[P]allegro5[P]build_O1[P]examples[P]ex_blend_bench
0x248b
do_test
static bool do_test(enum Mode mode) { ALLEGRO_STATE state; ALLEGRO_BITMAP *b1; ALLEGRO_BITMAP *b2; int REPEAT; double t0, t1; int i; al_set_new_bitmap_flags(ALLEGRO_MEMORY_BITMAP); b1 = al_load_bitmap("data/mysha.pcx"); if (!b1) { abort_example("Error loading data/mysha.pcx\n"); return false; } b2 = al_load_bitmap("data/allegro.pcx"); if (!b2) { abort_example("Error loading data/mysha.pcx\n"); return false; } al_set_target_bitmap(b1); al_set_blender(ALLEGRO_ADD, ALLEGRO_ONE, ALLEGRO_INVERSE_ALPHA); step(mode, b2); /* Display the blended bitmap to the screen so we can see something. */ al_store_state(&state, ALLEGRO_STATE_ALL); al_set_target_backbuffer(display); al_set_blender(ALLEGRO_ADD, ALLEGRO_ONE, ALLEGRO_ZERO); al_draw_bitmap(b1, 0, 0, 0); al_flip_display(); al_restore_state(&state); log_printf("Benchmark: %s\n", names[mode]); log_printf("Please wait...\n"); /* Do warmup run and estimate required runs for real test. */ t0 = current_clock(); for (i = 0; i < WARMUP; i++) { step(mode, b2); } t1 = current_clock(); REPEAT = TEST_TIME * 100 / (t1 - t0); /* Do the real test. */ t0 = current_clock(); for (i = 0; i < REPEAT; i++) { step(mode, b2); } t1 = current_clock(); log_printf("Time = %g s, %d steps\n", t1 - t0, REPEAT); log_printf("%s: %g FPS\n", names[mode], REPEAT / (t1 - t0)); log_printf("Done\n"); al_destroy_bitmap(b1); al_destroy_bitmap(b2); return true; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x418, %rsp # imm = 0x418 movl %edi, %ebp movl $0x1, %edi callq 0x2160 leaq 0xbc5(%rip), %rdi # 0x3074 callq 0x2090 testq %rax, %rax je 0x2682 movq %rax, %rbx leaq 0xbda(%rip), %rdi # 0x30a1 callq 0x2090 testq %rax, %rax je 0x2682 movq %rax, %r14 movq %rbx, %rdi callq 0x2180 xorl %edi, %edi movl $0x1, %esi movl $0x3, %edx callq 0x2030 movl %ebp, %edi movq %r14, %rsi callq 0x2690 leaq 0x18(%rsp), %r15 movq %r15, %rdi movl $0xffff, %esi # imm = 0xFFFF callq 0x2130 movq 0x2bd4(%rip), %rdi # 0x50e8 callq 0x2060 xorl %edi, %edi movl $0x1, %esi xorl %edx, %edx callq 0x2030 xorps %xmm0, %xmm0 xorps %xmm1, %xmm1 movq %rbx, %rdi xorl %esi, %esi callq 0x2190 callq 0x2150 movq %r15, %rdi callq 0x2070 movl %ebp, %eax leaq 0x2723(%rip), %rcx # 0x4c70 movq (%rcx,%rax,8), %rsi leaq 0xb5a(%rip), %rdi # 0x30b2 movq %rsi, 0x10(%rsp) xorl %eax, %eax callq 0x233a leaq 0xb56(%rip), %rdi # 0x30c1 xorl %eax, %eax callq 0x233a callq 0x2080 xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 movapd %xmm0, (%rsp) movl $0x64, %r12d movl %ebp, %edi movq %r14, %rsi callq 0x2690 decl %r12d jne 0x258a callq 0x2080 xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 unpcklpd (%rsp), %xmm0 # xmm0 = xmm0[0],mem[0] divpd 0xa5d(%rip), %xmm0 # 0x3010 movapd %xmm0, %xmm1 unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1] subsd %xmm1, %xmm0 movsd 0xa59(%rip), %xmm1 # 0x3020 divsd %xmm0, %xmm1 cvttsd2si %xmm1, %r15d callq 0x2080 movq %rax, %r13 testl %r15d, %r15d jle 0x25ef movl %r15d, %r12d movl %ebp, %edi movq %r14, %rsi callq 0x2690 decl %r12d jne 0x25e0 callq 0x2080 xorps %xmm1, %xmm1 cvtsi2sd %r13, %xmm1 xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 unpcklpd %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0] divpd 0xa00(%rip), %xmm0 # 0x3010 movapd %xmm0, %xmm1 unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1] subsd %xmm1, %xmm0 movapd %xmm0, (%rsp) leaq 0xaa9(%rip), %rdi # 0x30d1 movl %r15d, %esi movb $0x1, %al callq 0x233a xorps %xmm0, %xmm0 cvtsi2sd %r15d, %xmm0 divsd (%rsp), %xmm0 leaq 0xaa2(%rip), %rdi # 0x30e8 movq 0x10(%rsp), %rsi movb $0x1, %al callq 0x233a leaq 0xa9b(%rip), %rdi # 0x30f4 xorl %eax, %eax callq 0x233a movq %rbx, %rdi callq 0x20f0 movq %r14, %rdi callq 0x20f0 addq $0x418, %rsp # imm = 0x418 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x9fa(%rip), %rdi # 0x3083 xorl %eax, %eax callq 0x229d
/guzmandrade[P]allegro5/examples/ex_blend_bench.c
guzmandrade[P]allegro5[P]build_O1[P]examples[P]ex_blend_bench
0x2690
step
static void step(enum Mode mode, ALLEGRO_BITMAP *b2) { switch (mode) { case ALL: break; case PLAIN_BLIT: al_draw_bitmap(b2, 0, 0, 0); break; case SCALED_BLIT: al_draw_scaled_bitmap(b2, 0, 0, 320, 200, 0, 0, 640, 480, 0); break; case ROTATE_BLIT: al_draw_scaled_rotated_bitmap(b2, 10, 10, 10, 10, 2.0, 2.0, ALLEGRO_PI/30, 0); break; } }
cmpl $0x3, %edi je 0x26e5 cmpl $0x2, %edi je 0x26af cmpl $0x1, %edi jne 0x2713 xorps %xmm0, %xmm0 xorps %xmm1, %xmm1 movq %rsi, %rdi xorl %esi, %esi jmp 0x2190 movss 0x971(%rip), %xmm2 # 0x3028 movss 0x96d(%rip), %xmm3 # 0x302c movss 0x969(%rip), %xmm6 # 0x3030 movss 0x965(%rip), %xmm7 # 0x3034 xorps %xmm0, %xmm0 xorps %xmm1, %xmm1 xorps %xmm4, %xmm4 xorps %xmm5, %xmm5 movq %rsi, %rdi xorl %esi, %esi jmp 0x2110 movss 0x94b(%rip), %xmm0 # 0x3038 movss 0x947(%rip), %xmm4 # 0x303c movss 0x943(%rip), %xmm6 # 0x3040 movq %rsi, %rdi movaps %xmm0, %xmm1 movaps %xmm0, %xmm2 movaps %xmm0, %xmm3 movaps %xmm4, %xmm5 xorl %esi, %esi jmp 0x20d0 retq nopw %cs:(%rax,%rax) nop
/guzmandrade[P]allegro5/examples/ex_blend_bench.c
guzmandrade[P]allegro5[P]build_O1[P]examples[P]ex_blend_bench
0x3c25
opus_tags_parse_impl
static int opus_tags_parse_impl(OpusTags *_tags, const unsigned char *_data,size_t _len){ opus_uint32 count; size_t len; int ncomments; int ci; len=_len; if(len<8)return OP_ENOTFORMAT; if(memcmp(_data,"OpusTags",8)!=0)return OP_ENOTFORMAT; if(len<16)return OP_EBADHEADER; _data+=8; len-=8; count=op_parse_uint32le(_data); _data+=4; len-=4; if(count>len)return OP_EBADHEADER; if(_tags!=NULL){ _tags->vendor=op_strdup_with_len((char *)_data,count); if(_tags->vendor==NULL)return OP_EFAULT; } _data+=count; len-=count; if(len<4)return OP_EBADHEADER; count=op_parse_uint32le(_data); _data+=4; len-=4; /*Check to make sure there's minimally sufficient data left in the packet.*/ if(count>len>>2)return OP_EBADHEADER; /*Check for overflow (the API limits this to an int).*/ if(count>(opus_uint32)INT_MAX-1)return OP_EFAULT; if(_tags!=NULL){ int ret; ret=op_tags_ensure_capacity(_tags,count); if(ret<0)return ret; } ncomments=(int)count; for(ci=0;ci<ncomments;ci++){ /*Check to make sure there's minimally sufficient data left in the packet.*/ if((size_t)(ncomments-ci)>len>>2)return OP_EBADHEADER; count=op_parse_uint32le(_data); _data+=4; len-=4; if(count>len)return OP_EBADHEADER; /*Check for overflow (the API limits this to an int).*/ if(count>(opus_uint32)INT_MAX)return OP_EFAULT; if(_tags!=NULL){ _tags->user_comments[ci]=op_strdup_with_len((char *)_data,count); if(_tags->user_comments[ci]==NULL)return OP_EFAULT; _tags->comment_lengths[ci]=(int)count; _tags->comments=ci+1; /*Needed by opus_tags_clear() if we fail before parsing the (optional) binary metadata.*/ _tags->user_comments[ci+1]=NULL; } _data+=count; len-=count; } if(len>0&&(_data[0]&1)){ if(len>(opus_uint32)INT_MAX)return OP_EFAULT; if(_tags!=NULL){ _tags->user_comments[ncomments]=(char *)_ogg_malloc(len); if(OP_UNLIKELY(_tags->user_comments[ncomments]==NULL))return OP_EFAULT; memcpy(_tags->user_comments[ncomments],_data,len); _tags->comment_lengths[ncomments]=(int)len; } } return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl $0xffffff7c, %ebx # imm = 0xFFFFFF7C cmpq $0x8, %rdx jb 0x3cd0 movq %rsi, %r13 movabsq $0x736761547375704f, %rax # imm = 0x736761547375704F cmpq %rax, (%rsi) jne 0x3cd0 movq %rdx, %r14 movl $0xffffff7b, %ebx # imm = 0xFFFFFF7B cmpq $0x10, %rdx jb 0x3cd0 movl 0x8(%r13), %ebp addq $-0xc, %r14 subq %rbp, %r14 jb 0x3cd0 movq %rdi, %r15 addq $0xc, %r13 testq %rdi, %rdi je 0x3ca7 leaq 0x1(%rbp), %rdi callq 0x3460 movq %rax, %r12 testq %rax, %rax je 0x3e6b movq %r12, %rdi movq %r13, %rsi movq %rbp, %rdx callq 0x3260 movb $0x0, (%r12,%rbp) movq %r12, 0x18(%r15) cmpq $0x4, %r14 jb 0x3cd0 movl (%r13,%rbp), %r12d addq $-0x4, %r14 movq %r14, %rax shrq $0x2, %rax cmpq %r12, %rax jb 0x3cd0 cmpl $0x7ffffffe, %r12d # imm = 0x7FFFFFFE jbe 0x3ce1 movl $0xffffff7f, %ebx # imm = 0xFFFFFF7F movl %ebx, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testq %r15, %r15 jne 0x3e51 leaq 0x4(,%rbp), %rcx addq %r13, %rcx testq %r12, %r12 je 0x3dda cmpl $0x2, %r12d pushq $0x1 popq %rax cmovgel %r12d, %eax negq %rax movq %rax, 0x18(%rsp) pushq $0x1 popq %r13 movq %r12, %rdx movq %r12, 0x10(%rsp) movq %r14, %rax shrq $0x2, %rax cmpq %rdx, %rax jb 0x3cd0 movzwl (%rcx), %eax movzbl 0x2(%rcx), %ebp shll $0x10, %ebp orl %eax, %ebp movzbl 0x3(%rcx), %eax shll $0x18, %eax orl %eax, %ebp addq $-0x4, %r14 subq %rbp, %r14 jb 0x3cd0 testl %eax, %eax js 0x3ccb addq $0x4, %rcx testq %r15, %r15 je 0x3dbc movq %rdx, 0x20(%rsp) movq %rcx, 0x8(%rsp) leaq 0x1(%rbp), %rdi callq 0x3460 movq %rax, %r12 testq %rax, %rax je 0x3d84 movq %r12, %rdi movq 0x8(%rsp), %rsi movq %rbp, %rdx callq 0x3260 movb $0x0, (%r12,%rbp) movq (%r15), %rax movq %r12, -0x8(%rax,%r13,8) movq (%r15), %rax cmpq $0x0, -0x8(%rax,%r13,8) je 0x3ccb movq 0x8(%r15), %rcx movl %ebp, -0x4(%rcx,%r13,4) movl %r13d, 0x10(%r15) andq $0x0, (%rax,%r13,8) movq 0x10(%rsp), %r12 movq 0x8(%rsp), %rcx movq 0x20(%rsp), %rdx addq %rbp, %rcx decq %rdx movq 0x18(%rsp), %rax addq %r13, %rax incq %rax incq %r13 cmpq $0x1, %rax jne 0x3d1d xorl %ebx, %ebx testq %r14, %r14 je 0x3cd0 testb $0x1, (%rcx) je 0x3cd0 xorl %eax, %eax cmpq $0x7fffffff, %r14 # imm = 0x7FFFFFFF movl $0xffffff7f, %ebx # imm = 0xFFFFFF7F cmovbel %eax, %ebx testq %r15, %r15 je 0x3cd0 cmpq $0x7fffffff, %r14 # imm = 0x7FFFFFFF ja 0x3cd0 movq %rcx, %rbx movq %r14, %rdi callq 0x3460 movq (%r15), %rcx movq %rax, (%rcx,%r12,8) movq (%r15), %rax movq (%rax,%r12,8), %rdi testq %rdi, %rdi je 0x3ccb movq %rbx, %rsi movq %r14, %rdx callq 0x3260 movq 0x8(%r15), %rax movl %r14d, (%rax,%r12,4) xorl %ebx, %ebx jmp 0x3cd0 movq %r15, %rdi movq %r12, %rsi callq 0x4138 testl %eax, %eax jns 0x3cea movl %eax, %ebx jmp 0x3cd0 movq %r12, 0x18(%r15) jmp 0x3ccb
/xiph[P]opusfile/src/info.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x3e74
opus_tags_copy
int opus_tags_copy(OpusTags *_dst,const OpusTags *_src){ OpusTags dst; int ret; opus_tags_init(&dst); ret=opus_tags_copy_impl(&dst,_src); if(OP_UNLIKELY(ret<0))opus_tags_clear(&dst); else *_dst=*&dst; return ret; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq 0x18(%rsi), %r12 movq %r12, %rdi callq 0x3170 cmpq $-0x1, %rax je 0x4034 movq %rax, %r13 leaq 0x1(%rax), %rdi callq 0x3460 movq %rax, %r15 testq %rax, %rax je 0x3ed4 movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x3260 movb $0x0, (%r15,%r13) movq 0x8(%rsp), %r13 movq %r15, 0x28(%rsp) movl $0xffffff7f, %ebp # imm = 0xFFFFFF7F testq %r15, %r15 je 0x3ffe movl 0x10(%r13), %r14d movslq %r14d, %r15 leaq 0x10(%rsp), %rdi movq %r15, %rsi callq 0x4138 testl %eax, %eax js 0x4048 testl %r14d, %r14d jle 0x3fb8 movq %r15, 0x40(%rsp) movq %rbx, 0x38(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x48(%rsp) movl 0x20(%rsp), %ebp xorl %r15d, %r15d movq 0x8(%r13), %rax movslq (%rax,%r15,4), %r12 cmpq $-0x1, %r12 je 0x3f9f movq (%r13), %rax movq (%rax,%r15,8), %rbx leaq 0x1(%r12), %rdi callq 0x3460 movq %rax, %r13 testq %rax, %rax je 0x3f72 movq %r13, %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x3260 movb $0x0, (%r13,%r12) movq 0x50(%rsp), %rax movq %r13, (%rax,%r15,8) testq %r13, %r13 je 0x4024 movq 0x48(%rsp), %rax movl %r12d, (%rax,%r15,4) incq %r15 movl %r15d, %ebp cmpq %r15, %r14 movq 0x8(%rsp), %r13 jne 0x3f36 jmp 0x3fa4 xorl %r13d, %r13d jmp 0x3f72 movl %r14d, 0x20(%rsp) movq 0x38(%rsp), %rbx movl $0xffffff7f, %ebp # imm = 0xFFFFFF7F movq 0x40(%rsp), %r15 movq 0x8(%r13), %rax testq %rax, %rax je 0x3ffc movslq (%rax,%r15,4), %r12 testq %r12, %r12 jle 0x3ffc movq %r12, %rdi callq 0x3460 movq 0x10(%rsp), %rcx movq %rax, (%rcx,%r15,8) testq %rax, %rax je 0x3ffe movq (%r13), %rcx movq (%rcx,%r15,8), %rsi movq %rax, %rdi movq %r12, %rdx callq 0x3260 movq 0x18(%rsp), %rax movl %r12d, (%rax,%r15,4) xorl %ebp, %ebp testl %ebp, %ebp js 0x403c movaps 0x10(%rsp), %xmm0 movaps 0x20(%rsp), %xmm1 movups %xmm1, 0x10(%rbx) movups %xmm0, (%rbx) movl %ebp, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %ebp, 0x20(%rsp) movq 0x38(%rsp), %rbx movl $0xffffff7f, %ebp # imm = 0xFFFFFF7F jmp 0x3ffe xorl %r15d, %r15d jmp 0x3ed4 leaq 0x10(%rsp), %rdi callq 0x9fe6 jmp 0x4013 movl %eax, %ebp jmp 0x3ffe
/xiph[P]opusfile/src/info.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x404c
opus_tags_add
int opus_tags_add(OpusTags *_tags,const char *_tag,const char *_value){ char *comment; size_t tag_len; size_t value_len; int ncomments; int ret; ncomments=_tags->comments; ret=op_tags_ensure_capacity(_tags,ncomments+1); if(OP_UNLIKELY(ret<0))return ret; tag_len=strlen(_tag); value_len=strlen(_value); /*+2 for '=' and '\0'.*/ if(tag_len+value_len<tag_len)return OP_EFAULT; if(tag_len+value_len>(size_t)INT_MAX-2)return OP_EFAULT; comment=(char *)_ogg_malloc(sizeof(*comment)*(tag_len+value_len+2)); if(OP_UNLIKELY(comment==NULL))return OP_EFAULT; memcpy(comment,_tag,sizeof(*comment)*tag_len); comment[tag_len]='='; memcpy(comment+tag_len+1,_value,sizeof(*comment)*(value_len+1)); _tags->user_comments[ncomments]=comment; _tags->comment_lengths[ncomments]=(int)(tag_len+value_len+1); _tags->comments=ncomments+1; return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r13 movq %rsi, %rbp movq %rdi, %rbx movslq 0x10(%rdi), %r15 leaq 0x1(%r15), %r12 movq %r12, %rsi callq 0x4138 testl %eax, %eax js 0x4133 movq %r12, 0x20(%rsp) movq %rbp, 0x10(%rsp) movq %rbp, %rdi callq 0x3170 movq %rax, %rbp movq %r13, 0x18(%rsp) movq %r13, %rdi callq 0x3170 movq %rax, %r12 movq %rax, %r13 addq %rbp, %r13 setb %al cmpq $0x7ffffffe, %r13 # imm = 0x7FFFFFFE setae %cl orb %al, %cl movl $0xffffff7f, %r14d # imm = 0xFFFFFF7F jne 0x4121 movq %r15, 0x8(%rsp) leaq 0x2(%r13), %rdi callq 0x3460 testq %rax, %rax je 0x4121 movq %rax, %r15 movq %rax, %rdi movq 0x10(%rsp), %rsi movq %rbp, %rdx callq 0x3260 movb $0x3d, (%r15,%rbp) leaq (%r15,%rbp), %rdi incq %rdi incq %r12 movq 0x18(%rsp), %rsi movq %r12, %rdx callq 0x3260 movq (%rbx), %rax movq 0x8(%rsp), %rcx movq %r15, (%rax,%rcx,8) incl %r13d movq 0x8(%rbx), %rax movl %r13d, (%rax,%rcx,4) movq 0x20(%rsp), %rax movl %eax, 0x10(%rbx) xorl %r14d, %r14d movl %r14d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %r14d jmp 0x4121
/xiph[P]opusfile/src/info.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x4138
op_tags_ensure_capacity
static int op_tags_ensure_capacity(OpusTags *_tags,size_t _ncomments){ char **user_comments; int *comment_lengths; int cur_ncomments; size_t size; if(OP_UNLIKELY(_ncomments>=(size_t)INT_MAX))return OP_EFAULT; size=sizeof(*_tags->comment_lengths)*(_ncomments+1); if(size/sizeof(*_tags->comment_lengths)!=_ncomments+1)return OP_EFAULT; cur_ncomments=_tags->comments; /*We only support growing. Trimming requires cleaning up the allocated strings in the old space, and is best handled separately if it's ever needed.*/ OP_ASSERT(_ncomments>=(size_t)cur_ncomments); comment_lengths=(int *)_ogg_realloc(_tags->comment_lengths,size); if(OP_UNLIKELY(comment_lengths==NULL))return OP_EFAULT; if(_tags->comment_lengths==NULL){ OP_ASSERT(cur_ncomments==0); comment_lengths[cur_ncomments]=0; } comment_lengths[_ncomments]=comment_lengths[cur_ncomments]; _tags->comment_lengths=comment_lengths; size=sizeof(*_tags->user_comments)*(_ncomments+1); if(size/sizeof(*_tags->user_comments)!=_ncomments+1)return OP_EFAULT; user_comments=(char **)_ogg_realloc(_tags->user_comments,size); if(OP_UNLIKELY(user_comments==NULL))return OP_EFAULT; if(_tags->user_comments==NULL){ OP_ASSERT(cur_ncomments==0); user_comments[cur_ncomments]=NULL; } user_comments[_ncomments]=user_comments[cur_ncomments]; _tags->user_comments=user_comments; return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl $0xffffff7f, %ebp # imm = 0xFFFFFF7F cmpq $0x7ffffffe, %rsi # imm = 0x7FFFFFFE ja 0x41b2 movq %rsi, %r14 movq %rdi, %rbx leaq 0x4(,%rsi,4), %rsi movslq 0x10(%rdi), %r15 movq 0x8(%rdi), %rdi callq 0x3580 testq %rax, %rax je 0x41b2 leaq 0x1(%r14), %rsi cmpq $0x0, 0x8(%rbx) jne 0x417d andl $0x0, (%rax,%r15,4) movl (%rax,%r15,4), %ecx movl %ecx, (%rax,%r14,4) movq %rax, 0x8(%rbx) shlq $0x3, %rsi movq (%rbx), %rdi callq 0x3580 testq %rax, %rax je 0x41b2 cmpq $0x0, (%rbx) jne 0x41a5 andq $0x0, (%rax,%r15,8) movq (%rax,%r15,8), %rcx movq %rcx, (%rax,%r14,8) movq %rax, (%rbx) xorl %ebp, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
/xiph[P]opusfile/src/info.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x41bf
opus_tags_add_comment
int opus_tags_add_comment(OpusTags *_tags,const char *_comment){ char *comment; int comment_len; int ncomments; int ret; ncomments=_tags->comments; ret=op_tags_ensure_capacity(_tags,ncomments+1); if(OP_UNLIKELY(ret<0))return ret; comment_len=(int)strlen(_comment); comment=op_strdup_with_len(_comment,comment_len); if(OP_UNLIKELY(comment==NULL))return OP_EFAULT; _tags->user_comments[ncomments]=comment; _tags->comment_lengths[ncomments]=comment_len; _tags->comments=ncomments+1; return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r12 movq %rdi, %rbx movslq 0x10(%rdi), %r14 leaq 0x1(%r14), %rbp movq %rbp, %rsi callq 0x4138 testl %eax, %eax js 0x424b movq %r12, %rdi callq 0x3170 movq %rax, %r15 shlq $0x20, %rax movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 cmpq %rcx, %rax je 0x425a movq %rbp, (%rsp) movslq %r15d, %rbp leaq 0x1(%rbp), %rdi callq 0x3460 movq %rax, %r13 testq %rax, %rax je 0x422e movq %r13, %rdi movq %r12, %rsi movq %rbp, %rdx callq 0x3260 movb $0x0, (%r13,%rbp) movq (%rsp), %rbp testq %r13, %r13 je 0x425f movq (%rbx), %rax movq %r13, (%rax,%r14,8) movq 0x8(%rbx), %rax movl %r15d, (%rax,%r14,4) movl %ebp, 0x10(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %r13d, %r13d jmp 0x4232 movl $0xffffff7f, %eax # imm = 0xFFFFFF7F jmp 0x424b
/xiph[P]opusfile/src/info.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x4266
opus_tags_set_binary_suffix
int opus_tags_set_binary_suffix(OpusTags *_tags, const unsigned char *_data,int _len){ unsigned char *binary_suffix_data; int ncomments; int ret; if(_len<0||_len>0&&(_data==NULL||!(_data[0]&1)))return OP_EINVAL; ncomments=_tags->comments; ret=op_tags_ensure_capacity(_tags,ncomments); if(OP_UNLIKELY(ret<0))return ret; binary_suffix_data= (unsigned char *)_ogg_realloc(_tags->user_comments[ncomments],_len); if(OP_UNLIKELY(binary_suffix_data==NULL))return OP_EFAULT; memcpy(binary_suffix_data,_data,_len); _tags->user_comments[ncomments]=(char *)binary_suffix_data; _tags->comment_lengths[ncomments]=_len; return 0; }
movl $0xffffff7d, %eax # imm = 0xFFFFFF7D testl %edx, %edx js 0x429d pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %edx, %ebx movq %rsi, %r15 movq %rdi, %r14 je 0x429e testq %r15, %r15 je 0x428f testb $0x1, (%r15) jne 0x429e addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movslq 0x10(%r14), %r12 movq %r14, %rdi movq %r12, %rsi callq 0x4138 testl %eax, %eax js 0x428f movq (%r14), %rax movq (%rax,%r12,8), %rdi movl %ebx, %r13d movq %r13, %rsi callq 0x3580 testq %rax, %rax je 0x42ec movq %rax, %rbp movq %rax, %rdi movq %r15, %rsi movq %r13, %rdx callq 0x3260 movq (%r14), %rax movq %rbp, (%rax,%r12,8) movq 0x8(%r14), %rax movl %ebx, (%rax,%r12,4) xorl %eax, %eax jmp 0x428f movl $0xffffff7f, %eax # imm = 0xFFFFFF7F jmp 0x428f
/xiph[P]opusfile/src/info.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x42f3
opus_tagcompare
int opus_tagcompare(const char *_tag_name,const char *_comment){ size_t tag_len; tag_len=strlen(_tag_name); if(OP_UNLIKELY(tag_len>(size_t)INT_MAX))return -1; return opus_tagncompare(_tag_name,(int)tag_len,_comment); }
pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 callq 0x3170 cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF ja 0x4330 movq %rax, %r14 movq %r15, %rdi movq %rbx, %rsi movl %r14d, %edx callq 0xadac testl %eax, %eax jne 0x432a movsbl (%rbx,%r14), %ecx pushq $0x3d popq %rax subl %ecx, %eax popq %rbx popq %r14 popq %r15 retq pushq $-0x1 popq %rax jmp 0x432a
/xiph[P]opusfile/src/info.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x4335
opus_tags_query
const char *opus_tags_query(const OpusTags *_tags,const char *_tag,int _count){ char **user_comments; size_t tag_len; int found; int ncomments; int ci; tag_len=strlen(_tag); if(OP_UNLIKELY(tag_len>(size_t)INT_MAX))return NULL; ncomments=_tags->comments; user_comments=_tags->user_comments; found=0; for(ci=0;ci<ncomments;ci++){ if(!opus_tagncompare(_tag,(int)tag_len,user_comments[ci])){ /*We return a pointer to the data, not a copy.*/ if(_count==found++)return user_comments[ci]+tag_len+1; } } /*Didn't find anything.*/ return NULL; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %edx, 0xc(%rsp) movq %rdi, %r12 movq %rsi, 0x10(%rsp) movq %rsi, %rdi callq 0x3170 cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF ja 0x43a8 movq %rax, %r15 movslq 0x10(%r12), %r13 xorl %eax, %eax testq %r13, %r13 jle 0x43aa movq (%r12), %rbx xorl %ebp, %ebp xorl %r14d, %r14d movq (%rbx,%rbp,8), %r12 movq 0x10(%rsp), %rdi movq %r12, %rsi movl %r15d, %edx callq 0xadac testl %eax, %eax jne 0x43a0 cmpb $0x3d, (%r12,%r15) jne 0x43a0 cmpl 0xc(%rsp), %r14d je 0x43b9 incl %r14d incq %rbp cmpq %rbp, %r13 jne 0x4377 xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%rbx,%rbp,8), %rax addq %r15, %rax incq %rax jmp 0x43aa
/xiph[P]opusfile/src/info.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x43c5
opus_tags_query_count
int opus_tags_query_count(const OpusTags *_tags,const char *_tag){ char **user_comments; size_t tag_len; int found; int ncomments; int ci; tag_len=strlen(_tag); if(OP_UNLIKELY(tag_len>(size_t)INT_MAX))return 0; ncomments=_tags->comments; user_comments=_tags->user_comments; found=0; for(ci=0;ci<ncomments;ci++){ if(!opus_tagncompare(_tag,(int)tag_len,user_comments[ci]))found++; } return found; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r15 movq %rsi, (%rsp) movq %rsi, %rdi callq 0x3170 xorl %ebp, %ebp cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF ja 0x442d movslq 0x10(%r15), %r12 testq %r12, %r12 jle 0x442d movq %rax, %r14 movq (%r15), %r13 xorl %ebx, %ebx xorl %ebp, %ebp movq (%r13,%rbx,8), %r15 movq (%rsp), %rdi movq %r15, %rsi movl %r14d, %edx callq 0xadac movl $0x0, %ecx testl %eax, %eax jne 0x4423 xorl %ecx, %ecx cmpb $0x3d, (%r15,%r14) sete %cl addl %ecx, %ebp incq %rbx cmpq %rbx, %r12 jne 0x43fc movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/xiph[P]opusfile/src/info.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x443e
op_test
int op_test(OpusHead *_head, const unsigned char *_initial_data,size_t _initial_bytes){ ogg_sync_state oy; char *data; int err; /*The first page of a normal Opus file will be at most 57 bytes (27 Ogg page header bytes + 1 lacing value + 21 Opus header bytes + 8 channel mapping bytes). It will be at least 47 bytes (27 Ogg page header bytes + 1 lacing value + 19 Opus header bytes using channel mapping family 0). If we don't have at least that much data, give up now.*/ if(_initial_bytes<47)return OP_FALSE; /*Only proceed if we start with the magic OggS string. This is to prevent us spending a lot of time allocating memory and looking for Ogg pages in non-Ogg files.*/ if(memcmp(_initial_data,"OggS",4)!=0)return OP_ENOTFORMAT; if(OP_UNLIKELY(_initial_bytes>(size_t)LONG_MAX))return OP_EFAULT; ogg_sync_init(&oy); data=ogg_sync_buffer(&oy,(long)_initial_bytes); if(data!=NULL){ ogg_stream_state os; ogg_page og; int ret; memcpy(data,_initial_data,_initial_bytes); ogg_sync_wrote(&oy,(long)_initial_bytes); ogg_stream_init(&os,-1); err=OP_FALSE; do{ ogg_packet op; ret=ogg_sync_pageout(&oy,&og); /*Ignore holes.*/ if(ret<0)continue; /*Stop if we run out of data.*/ if(!ret)break; ogg_stream_reset_serialno(&os,ogg_page_serialno(&og)); ogg_stream_pagein(&os,&og); /*Only process the first packet on this page (if it's a BOS packet, it's required to be the only one).*/ if(ogg_stream_packetout(&os,&op)==1){ if(op.b_o_s){ ret=opus_head_parse(_head,op.packet,op.bytes); /*If this didn't look like Opus, keep going.*/ if(ret==OP_ENOTFORMAT)continue; /*Otherwise we're done, one way or another.*/ err=ret; } /*We finished parsing the headers. There is no Opus to be found.*/ else err=OP_ENOTFORMAT; } } while(err==OP_FALSE); ogg_stream_clear(&os); } else err=OP_EFAULT; ogg_sync_clear(&oy); return err; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x218, %rsp # imm = 0x218 cmpq $0x2f, %rdx jae 0x445d pushq $-0x1 popq %rbp jmp 0x4580 movq %rsi, %r14 cmpl $0x5367674f, (%rsi) # imm = 0x5367674F movl $0xffffff7c, %ebp # imm = 0xFFFFFF7C jne 0x4580 movq %rdx, %r15 testq %rdx, %rdx js 0x4594 movq %rdi, %rbx leaq 0x10(%rsp), %r12 movq %r12, %rdi callq 0x3180 movq %r12, %rdi movq %r15, %rsi callq 0x3540 testq %rax, %rax je 0x4571 movq %rbx, 0x8(%rsp) movq %rax, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x3260 leaq 0x10(%rsp), %r14 movq %r14, %rdi movq %r15, %rsi callq 0x3420 leaq 0x80(%rsp), %r15 pushq $-0x1 popq %r13 movq %r15, %rdi movl %r13d, %esi callq 0x3630 leaq 0x60(%rsp), %r12 movq %r14, %rdi movq %r12, %rsi callq 0x35a0 movb $0x1, %bl testl %eax, %eax js 0x454d je 0x454b movq %r12, %rdi callq 0x3290 movq %r15, %rdi movl %eax, %esi callq 0x32e0 movq %r15, %rdi movq %r12, %rsi callq 0x34d0 movq %r15, %rdi leaq 0x30(%rsp), %rsi callq 0x3510 cmpl $0x1, %eax jne 0x454d cmpq $0x0, 0x40(%rsp) je 0x455b movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movq 0x8(%rsp), %rdi callq 0x9e00 movl %eax, %ebp cmpl $0xffffff7c, %eax # imm = 0xFFFFFF7C cmovel %r13d, %ebp jmp 0x4550 xorl %ebx, %ebx movl %r13d, %ebp testb %bl, %bl je 0x4562 cmpl $-0x1, %ebp je 0x44e0 jmp 0x4562 movl $0xffffff7c, %ebp # imm = 0xFFFFFF7C jmp 0x4550 leaq 0x80(%rsp), %rdi callq 0x35e0 jmp 0x4576 movl $0xffffff7f, %ebp # imm = 0xFFFFFF7F leaq 0x10(%rsp), %rdi callq 0x36d0 movl %ebp, %eax addq $0x218, %rsp # imm = 0x218 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffff7f, %ebp # imm = 0xFFFFFF7F jmp 0x4580
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x459b
op_granpos_add
static int op_granpos_add(ogg_int64_t *_dst_gp,ogg_int64_t _src_gp, opus_int32 _delta){ /*The code below handles this case correctly, but there's no reason we should ever be called with these values, so make sure we aren't.*/ OP_ASSERT(_src_gp!=-1); if(_delta>0){ /*Adding this amount to the granule position would overflow its 64-bit range.*/ if(OP_UNLIKELY(_src_gp<0)&&OP_UNLIKELY(_src_gp>=-1-_delta))return OP_EINVAL; if(OP_UNLIKELY(_src_gp>OP_INT64_MAX-_delta)){ /*Adding this amount to the granule position would overflow the positive half of its 64-bit range. Since signed overflow is undefined in C, do it in a way the compiler isn't allowed to screw up.*/ _delta-=(opus_int32)(OP_INT64_MAX-_src_gp)+1; _src_gp=OP_INT64_MIN; } } else if(_delta<0){ /*Subtracting this amount from the granule position would underflow its 64-bit range.*/ if(_src_gp>=0&&OP_UNLIKELY(_src_gp<-_delta))return OP_EINVAL; if(OP_UNLIKELY(_src_gp<OP_INT64_MIN-_delta)){ /*Subtracting this amount from the granule position would underflow the negative half of its 64-bit range. Since signed underflow is undefined in C, do it in a way the compiler isn't allowed to screw up.*/ _delta+=(opus_int32)(_src_gp-OP_INT64_MIN)+1; _src_gp=OP_INT64_MAX; } } *_dst_gp=_src_gp+_delta; return 0; }
testl %edx, %edx jle 0x45bf testq %rsi, %rsi js 0x460a movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF movl %edx, %ecx xorq %rax, %rcx cmpq %rsi, %rcx jl 0x461b movq %rsi, %rax movl %edx, %ecx jmp 0x45c8 xorl %ecx, %ecx testl %edx, %edx js 0x45d4 movq %rsi, %rax movslq %ecx, %rcx addq %rax, %rcx movq %rcx, (%rdi) xorl %eax, %eax retq testq %rsi, %rsi setns %al movl %edx, %ecx negl %ecx cmpq %rsi, %rcx setg %cl testb %cl, %al jne 0x4615 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF movslq %edx, %rcx negq %rcx addq %rax, %rcx incq %rcx cmpq %rsi, %rcx jle 0x45b8 leal (%rsi,%rdx), %ecx incl %ecx jmp 0x45c8 movl %edx, %eax notl %eax cltq cmpq %rsi, %rax jg 0x45a4 movl $0xffffff7d, %eax # imm = 0xFFFFFF7D retq addl %edx, %esi incq %rax movl %esi, %ecx jmp 0x45c8
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x4624
op_clear
static void op_clear(OggOpusFile *_of){ OggOpusLink *links; _ogg_free(_of->od_buffer); if(_of->od!=NULL)opus_multistream_decoder_destroy(_of->od); links=_of->links; if(!_of->seekable){ if(_of->ready_state>OP_OPENED||_of->ready_state==OP_PARTOPEN){ opus_tags_clear(&links[0].tags); } } else if(OP_LIKELY(links!=NULL)){ int nlinks; int link; nlinks=_of->nlinks; for(link=0;link<nlinks;link++)opus_tags_clear(&links[link].tags); } _ogg_free(links); _ogg_free(_of->serialnos); ogg_stream_clear(&_of->os); ogg_sync_clear(&_of->oy); if(_of->callbacks.close!=NULL)(*_of->callbacks.close)(_of->stream); }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x3248(%rdi), %rdi callq 0x33f0 movq 0x3218(%rbx), %rdi testq %rdi, %rdi je 0x464c callq 0x30e0 movq 0x30(%rbx), %r14 cmpl $0x0, 0x28(%rbx) je 0x4681 testq %r14, %r14 je 0x46a0 movslq 0x2c(%rbx), %r12 testq %r12, %r12 jle 0x46a0 leaq 0x158(%r14), %r15 movq %r15, %rdi callq 0x9fe6 addq $0x178, %r15 # imm = 0x178 decq %r12 jne 0x466b jmp 0x46a0 movl 0x78(%rbx), %eax cmpl $0x3, %eax setl %cl cmpl $0x1, %eax setne %al testb %al, %cl jne 0x46a0 leaq 0x158(%r14), %rdi callq 0x9fe6 movq %r14, %rdi callq 0x33f0 movq 0x40(%rbx), %rdi callq 0x33f0 leaq 0xa8(%rbx), %rdi callq 0x35e0 leaq 0x58(%rbx), %rdi callq 0x36d0 movq 0x18(%rbx), %rax testq %rax, %rax je 0x46e0 movq 0x20(%rbx), %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmpq *%rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x46ec
op_open_callbacks
OggOpusFile *op_open_callbacks(void *_stream,const OpusFileCallbacks *_cb, const unsigned char *_initial_data,size_t _initial_bytes,int *_error){ OggOpusFile *of; of=op_test_callbacks(_stream,_cb,_initial_data,_initial_bytes,_error); if(OP_LIKELY(of!=NULL)){ int ret; ret=op_open2(of); if(OP_LIKELY(ret>=0))return of; if(_error!=NULL)*_error=ret; _ogg_free(of); } return NULL; }
pushq %r14 pushq %rbx pushq %rax movq %r8, %r14 callq 0xae24 testq %rax, %rax je 0x4727 movq %rax, %rbx movq %rax, %rdi callq 0xb0ac testl %eax, %eax js 0x4717 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq testq %r14, %r14 je 0x471f movl %eax, (%r14) movq %rbx, %rdi callq 0x33f0 xorl %ebx, %ebx jmp 0x470c
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x472b
op_test_open
int op_test_open(OggOpusFile *_of){ int ret; if(OP_UNLIKELY(_of->ready_state!=OP_PARTOPEN))return OP_EINVAL; ret=op_open2(_of); /*op_open2() will clear this structure on failure. Reset its contents to prevent double-frees in op_free().*/ if(OP_UNLIKELY(ret<0))memset(_of,0,sizeof(*_of)); return ret; }
pushq %r14 pushq %rbx pushq %rax cmpl $0x1, 0x78(%rdi) jne 0x474d movq %rdi, %r14 callq 0xb0ac movl %eax, %ebx testl %eax, %eax js 0x4754 movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0xffffff7d, %ebx # imm = 0xFFFFFF7D jmp 0x4743 movl $0x3390, %edx # imm = 0x3390 movq %r14, %rdi xorl %esi, %esi callq 0x31d0 jmp 0x4743
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x4765
op_free
void op_free(OggOpusFile *_of){ if(OP_LIKELY(_of!=NULL)){ op_clear(_of); _ogg_free(_of); } }
testq %rdi, %rdi je 0x477c pushq %rbx movq %rdi, %rbx callq 0x4624 movq %rbx, %rdi popq %rbx jmp 0x33f0 retq
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x477d
op_raw_total
opus_int64 op_raw_total(const OggOpusFile *_of,int _li){ if(OP_UNLIKELY(_of->ready_state<OP_OPENED) ||OP_UNLIKELY(!_of->seekable) ||OP_UNLIKELY(_li>=_of->nlinks)){ return OP_EINVAL; } if(_li<0)return _of->end; return (_li+1>=_of->nlinks?_of->end:_of->links[_li+1].offset) -(_li>0?_of->links[_li].offset:0); }
movq $-0x83, %rax cmpl $0x2, 0x78(%rdi) jl 0x47b5 cmpl $0x0, 0x28(%rdi) je 0x47b5 movl 0x2c(%rdi), %ecx cmpl %esi, %ecx jle 0x47b5 testl %esi, %esi js 0x47b1 leal 0x1(%rsi), %eax cmpl %ecx, %eax jge 0x47b6 movl %eax, %eax imulq $0x178, %rax, %rax # imm = 0x178 addq 0x30(%rdi), %rax jmp 0x47ba movq 0x50(%rdi), %rax retq leaq 0x50(%rdi), %rax movq (%rax), %rax testl %esi, %esi je 0x47d4 movq 0x30(%rdi), %rcx movl %esi, %edx imulq $0x178, %rdx, %rdx # imm = 0x178 movq (%rcx,%rdx), %rcx jmp 0x47d6 xorl %ecx, %ecx subq %rcx, %rax retq
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x47da
op_pcm_total
ogg_int64_t op_pcm_total(const OggOpusFile *_of,int _li){ OggOpusLink *links; ogg_int64_t pcm_total; ogg_int64_t diff; int nlinks; nlinks=_of->nlinks; if(OP_UNLIKELY(_of->ready_state<OP_OPENED) ||OP_UNLIKELY(!_of->seekable) ||OP_UNLIKELY(_li>=nlinks)){ return OP_EINVAL; } links=_of->links; /*We verify that the granule position differences are larger than the pre-skip and that the total duration does not overflow during link enumeration, so we don't have to check here.*/ pcm_total=0; if(_li<0){ pcm_total=links[nlinks-1].pcm_file_offset; _li=nlinks-1; } OP_ALWAYS_TRUE(!op_granpos_diff(&diff, links[_li].pcm_end,links[_li].pcm_start)); return pcm_total+(diff-links[_li].head.pre_skip); }
movq $-0x83, %rax cmpl $0x2, 0x78(%rdi) jl 0x483f cmpl $0x0, 0x28(%rdi) je 0x483f movslq 0x2c(%rdi), %rcx cmpl %esi, %ecx jle 0x483f movq 0x30(%rdi), %rdi testl %esi, %esi js 0x4801 xorl %ecx, %ecx jmp 0x4813 leal -0x1(%rcx), %esi imulq $0x178, %rcx, %rax # imm = 0x178 movq -0x160(%rax,%rdi), %rcx movslq %esi, %rax imulq $0x178, %rax, %rsi # imm = 0x178 leaq (%rdi,%rsi), %rdx movq 0x20(%rdi,%rsi), %rax movq 0x28(%rdi,%rsi), %rsi movq %rsi, %rdi xorq %rax, %rdi js 0x4840 subq %rsi, %rax addq %rcx, %rax movl 0x3c(%rdx), %ecx subq %rcx, %rax retq testq %rax, %rax js 0x4833 btsq $0x3f, %rax subq %rsi, %rax jl 0x485e movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000 xorq %rsi, %rax jmp 0x4836 jmp 0x4836
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x4860
op_current_link
int op_current_link(const OggOpusFile *_of){ if(OP_UNLIKELY(_of->ready_state<OP_OPENED))return OP_EINVAL; return _of->cur_link; }
cmpl $0x2, 0x78(%rdi) jl 0x486a movl 0x7c(%rdi), %eax retq movl $0xffffff7d, %eax # imm = 0xFFFFFF7D retq
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x4870
op_bitrate
opus_int32 op_bitrate(const OggOpusFile *_of,int _li){ if(OP_UNLIKELY(_of->ready_state<OP_OPENED)||OP_UNLIKELY(!_of->seekable) ||OP_UNLIKELY(_li>=_of->nlinks)){ return OP_EINVAL; } return op_calc_bitrate(op_raw_total(_of,_li),op_pcm_total(_of,_li)); }
pushq %r15 pushq %r14 pushq %rbx cmpl $0x2, 0x78(%rdi) jl 0x48b0 movq %rdi, %r14 cmpl $0x0, 0x28(%rdi) je 0x48b0 movl %esi, %ebx cmpl %esi, 0x2c(%r14) jle 0x48b0 movq %r14, %rdi movl %ebx, %esi callq 0x477d movq %rax, %r15 movq %r14, %rdi movl %ebx, %esi callq 0x47da movq %r15, %rdi movq %rax, %rsi popq %rbx popq %r14 popq %r15 jmp 0x48bb movl $0xffffff7d, %eax # imm = 0xFFFFFF7D popq %rbx popq %r14 popq %r15 retq
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x48bb
op_calc_bitrate
static opus_int32 op_calc_bitrate(opus_int64 _bytes,ogg_int64_t _samples){ if(OP_UNLIKELY(_samples<=0))return OP_INT32_MAX; /*These rates are absurd, but let's handle them anyway.*/ if(OP_UNLIKELY(_bytes>(OP_INT64_MAX-(_samples>>1))/(48000*8))){ ogg_int64_t den; if(OP_UNLIKELY(_bytes/(OP_INT32_MAX/(48000*8))>=_samples)){ return OP_INT32_MAX; } den=_samples/(48000*8); return (opus_int32)((_bytes+(den>>1))/den); } /*This can't actually overflow in normal operation: even with a pre-skip of 545 2.5 ms frames with 8 streams running at 1282*8+1 bytes per packet (1275 byte frames + Opus framing overhead + Ogg lacing values), that all produce a single sample of decoded output, we still don't top 45 Mbps. The only way to get bitrates larger than that is with excessive Opus padding, more encoded streams than output channels, or lots and lots of Ogg pages with no packets on them.*/ return (opus_int32)OP_MIN((_bytes*48000*8+(_samples>>1))/_samples, OP_INT32_MAX); }
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF testq %rsi, %rsi jle 0x4906 movq %rsi, %r8 shrq %r8 movabsq $0x7ffffffffffffc00, %rax # imm = 0x7FFFFFFFFFFFFC00 xorq %r8, %rax movl $0x5dc00, %r9d # imm = 0x5DC00 xorl %edx, %edx divq %r9 cmpq %rdi, %rax jl 0x4909 imulq $0x5dc00, %rdi, %rax # imm = 0x5DC00 addq %rax, %r8 movq %r8, %rax cqto idivq %rsi movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF cmpq %rcx, %rax cmovlq %rax, %rcx movl %ecx, %eax retq movl $0x15d8, %r8d # imm = 0x15D8 movq %rdi, %rax xorl %edx, %edx divq %r8 cmpq %rsi, %rax jge 0x4906 movl $0x5dc00, %ecx # imm = 0x5DC00 movq %rsi, %rax xorl %edx, %edx divq %rcx movq %rax, %rcx shrq %rax addq %rdi, %rax cqto idivq %rcx movq %rax, %rcx jmp 0x4906
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x493c
op_bitrate_instant
opus_int32 op_bitrate_instant(OggOpusFile *_of){ ogg_int64_t samples_tracked; opus_int32 ret; if(OP_UNLIKELY(_of->ready_state<OP_OPENED))return OP_EINVAL; samples_tracked=_of->samples_tracked; if(OP_UNLIKELY(samples_tracked==0))return OP_FALSE; ret=op_calc_bitrate(_of->bytes_tracked,samples_tracked); _of->bytes_tracked=0; _of->samples_tracked=0; return ret; }
pushq %rbx cmpl $0x2, 0x78(%rdi) jl 0x496a movq %rdi, %rbx movq 0xa0(%rdi), %rsi testq %rsi, %rsi je 0x4971 movq 0x98(%rbx), %rdi callq 0x48bb xorps %xmm0, %xmm0 movups %xmm0, 0x98(%rbx) popq %rbx retq movl $0xffffff7d, %eax # imm = 0xFFFFFF7D jmp 0x4968 pushq $-0x1 popq %rax jmp 0x4968
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x4976
op_raw_seek
int op_raw_seek(OggOpusFile *_of,opus_int64 _pos){ int ret; if(OP_UNLIKELY(_of->ready_state<OP_OPENED))return OP_EINVAL; /*Don't dump the decoder state if we can't seek.*/ if(OP_UNLIKELY(!_of->seekable))return OP_ENOSEEK; if(OP_UNLIKELY(_pos<0)||OP_UNLIKELY(_pos>_of->end))return OP_EINVAL; /*Clear out any buffered, decoded data.*/ op_decode_clear(_of); _of->bytes_tracked=0; _of->samples_tracked=0; ret=op_seek_helper(_of,_pos); if(OP_UNLIKELY(ret<0))return OP_EREAD; ret=op_fetch_and_process_page(_of,NULL,-1,1,1); /*If we hit EOF, op_fetch_and_process_page() leaves us uninitialized. Instead, jump to the end.*/ if(ret==OP_EOF){ int cur_link; op_decode_clear(_of); cur_link=_of->nlinks-1; _of->cur_link=cur_link; _of->prev_packet_gp=_of->links[cur_link].pcm_end; _of->cur_discard_count=0; ret=0; } return ret; }
movl $0xffffff7d, %eax # imm = 0xFFFFFF7D cmpl $0x2, 0x78(%rdi) jl 0x4a6d pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx cmpl $0x0, 0x28(%rdi) je 0x4a6e testq %rsi, %rsi js 0x4a66 cmpq %rsi, 0x50(%rbx) jl 0x4a66 andl $0x0, 0x3214(%rbx) andl $0x0, 0x3254(%rbx) pcmpeqd %xmm0, %xmm0 movdqu %xmm0, 0x88(%rbx) movl $0x2, 0x78(%rbx) pxor %xmm0, %xmm0 movdqu %xmm0, 0x98(%rbx) movq %rbx, %rdi callq 0xc182 testl %eax, %eax js 0x4a75 xorl %r14d, %r14d pushq $-0x1 popq %rdx pushq $0x1 popq %rcx movq %rbx, %rdi xorl %esi, %esi movl %ecx, %r8d callq 0x4a7a cmpl $-0x2, %eax jne 0x4a66 andl $0x0, 0x3214(%rbx) leaq 0x88(%rbx), %rax andl $0x0, 0x3254(%rbx) pcmpeqd %xmm0, %xmm0 movdqu %xmm0, (%rax) cmpl %r14d, 0x28(%rbx) jne 0x4a32 movl $0x158, %edi # imm = 0x158 addq 0x30(%rbx), %rdi callq 0x9fe6 movl $0x2, 0x78(%rbx) movslq 0x2c(%rbx), %rax leal -0x1(%rax), %ecx movl %ecx, 0x7c(%rbx) movq 0x30(%rbx), %rcx imulq $0x178, %rax, %rax # imm = 0x178 movq -0x158(%rax,%rcx), %rax movq %rax, 0x88(%rbx) andl $0x0, 0x80(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0xffffff76, %eax # imm = 0xFFFFFF76 jmp 0x4a66 pushq $-0x80 popq %rax jmp 0x4a66
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x4a7a
op_fetch_and_process_page
static int op_fetch_and_process_page(OggOpusFile *_of, ogg_page *_og,opus_int64 _page_offset,int _spanp,int _ignore_holes){ OggOpusLink *links; ogg_uint32_t cur_serialno; int seekable; int cur_link; int ret; /*We shouldn't get here if we have unprocessed packets.*/ OP_ASSERT(_of->ready_state<OP_INITSET||_of->op_pos>=_of->op_count); seekable=_of->seekable; links=_of->links; cur_link=seekable?_of->cur_link:0; cur_serialno=links[cur_link].serialno; /*Handle one page.*/ for(;;){ ogg_page og; OP_ASSERT(_of->ready_state>=OP_OPENED); /*If we were given a page to use, use it.*/ if(_og!=NULL){ *&og=*_og; _og=NULL; } /*Keep reading until we get a page with the correct serialno.*/ else _page_offset=op_get_next_page(_of,&og,_of->end); /*EOF: Leave uninitialized.*/ if(_page_offset<0)return _page_offset<OP_FALSE?(int)_page_offset:OP_EOF; if(OP_LIKELY(_of->ready_state>=OP_STREAMSET) &&cur_serialno!=(ogg_uint32_t)ogg_page_serialno(&og)){ /*Two possibilities: 1) Another stream is multiplexed into this logical section, or*/ if(OP_LIKELY(!ogg_page_bos(&og)))continue; /* 2) Our decoding just traversed a bitstream boundary.*/ if(!_spanp)return OP_EOF; if(OP_LIKELY(_of->ready_state>=OP_INITSET))op_decode_clear(_of); } /*Bitrate tracking: add the header's bytes here. The body bytes are counted when we consume the packets.*/ else _of->bytes_tracked+=og.header_len; /*Do we need to load a new machine before submitting the page? This is different in the seekable and non-seekable cases. In the seekable case, we already have all the header information loaded and cached. We just initialize the machine with it and continue on our merry way. In the non-seekable (streaming) case, we'll only be at a boundary if we just left the previous logical bitstream, and we're now nominally at the header of the next bitstream.*/ if(OP_UNLIKELY(_of->ready_state<OP_STREAMSET)){ if(seekable){ ogg_uint32_t serialno; serialno=ogg_page_serialno(&og); /*Match the serialno to bitstream section.*/ OP_ASSERT(cur_link>=0&&cur_link<_of->nlinks); if(links[cur_link].serialno!=serialno){ /*It wasn't a page from the current link. Is it from the next one?*/ if(OP_LIKELY(cur_link+1<_of->nlinks&&links[cur_link+1].serialno== serialno)){ cur_link++; } else{ int new_link; new_link= op_get_link_from_serialno(_of,cur_link,_page_offset,serialno); /*Not a desired Opus bitstream section. Keep trying.*/ if(new_link<0)continue; cur_link=new_link; } } cur_serialno=serialno; _of->cur_link=cur_link; ogg_stream_reset_serialno(&_of->os,serialno); _of->ready_state=OP_STREAMSET; /*If we're at the start of this link, initialize the granule position and pre-skip tracking.*/ if(_page_offset<=links[cur_link].data_offset){ _of->prev_packet_gp=links[cur_link].pcm_start; _of->prev_page_offset=-1; _of->cur_discard_count=links[cur_link].head.pre_skip; /*Ignore a hole at the start of a new link (this is common for streams joined in the middle) or after seeking.*/ _ignore_holes=1; } } else{ do{ /*We're streaming. Fetch the two header packets, build the info struct.*/ ret=op_fetch_headers(_of,&links[0].head,&links[0].tags, NULL,NULL,NULL,&og); if(OP_UNLIKELY(ret<0))return ret; /*op_find_initial_pcm_offset() will suppress any initial hole for us, so no need to set _ignore_holes.*/ ret=op_find_initial_pcm_offset(_of,links,&og); if(OP_UNLIKELY(ret<0))return ret; _of->links[0].serialno=cur_serialno=_of->os.serialno; _of->cur_link++; } /*If the link was empty, keep going, because we already have the BOS page of the next one in og.*/ while(OP_UNLIKELY(ret>0)); /*If we didn't get any packets out of op_find_initial_pcm_offset(), keep going (this is possible if end-trimming trimmed them all).*/ if(_of->op_count<=0)continue; /*Otherwise, we're done. TODO: This resets bytes_tracked, which misses the header bytes already processed by op_find_initial_pcm_offset().*/ ret=op_make_decode_ready(_of); if(OP_UNLIKELY(ret<0))return ret; return 0; } } /*The buffered page is the data we want, and we're ready for it. Add it to the stream state.*/ if(OP_UNLIKELY(_of->ready_state==OP_STREAMSET)){ ret=op_make_decode_ready(_of); if(OP_UNLIKELY(ret<0))return ret; } /*Extract all the packets from the current page.*/ ogg_stream_pagein(&_of->os,&og); if(OP_LIKELY(_of->ready_state>=OP_INITSET)){ opus_int32 total_duration; int durations[255]; int op_count; int report_hole; report_hole=0; total_duration=op_collect_audio_packets(_of,durations); if(OP_UNLIKELY(total_duration<0)){ /*libogg reported a hole (a gap in the page sequence numbers). Drain the packets from the page anyway. If we don't, they'll still be there when we fetch the next page. Then, when we go to pull out packets, we might get more than 255, which would overrun our packet buffer. We repeat this call until we get any actual packets, since we might have buffered multiple out-of-sequence pages with no packets on them.*/ do total_duration=op_collect_audio_packets(_of,durations); while(total_duration<0); if(!_ignore_holes){ /*Report the hole to the caller after we finish timestamping the packets.*/ report_hole=1; /*We had lost or damaged pages, so reset our granule position tracking. This makes holes behave the same as a small raw seek. If the next page is the EOS page, we'll discard it (because we can't perform end trimming properly), and we'll always discard at least 80 ms of audio (to allow decoder state to re-converge). We could try to fill in the gap with PLC by looking at timestamps in the non-EOS case, but that's complicated and error prone and we can't rely on the timestamps being valid.*/ _of->prev_packet_gp=-1; } } op_count=_of->op_count; /*If we found at least one audio data packet, compute per-packet granule positions for them.*/ if(op_count>0){ ogg_int64_t diff; ogg_int64_t prev_packet_gp; ogg_int64_t cur_packet_gp; ogg_int64_t cur_page_gp; int cur_page_eos; int pi; cur_page_gp=_of->op[op_count-1].granulepos; cur_page_eos=_of->op[op_count-1].e_o_s; prev_packet_gp=_of->prev_packet_gp; if(OP_UNLIKELY(prev_packet_gp==-1)){ opus_int32 cur_discard_count; /*This is the first call after a raw seek. Try to reconstruct prev_packet_gp from scratch.*/ OP_ASSERT(seekable); if(OP_UNLIKELY(cur_page_eos)){ /*If the first page we hit after our seek was the EOS page, and we didn't start from data_offset or before, we don't have enough information to do end-trimming. Proceed to the next link, rather than risk playing back some samples that shouldn't have been played.*/ _of->op_count=0; if(report_hole)return OP_HOLE; continue; } /*By default discard 80 ms of data after a seek, unless we seek into the pre-skip region.*/ cur_discard_count=80*48; cur_page_gp=_of->op[op_count-1].granulepos; /*Try to initialize prev_packet_gp. If the current page had packets but didn't have a granule position, or the granule position it had was too small (both illegal), just use the starting granule position for the link.*/ prev_packet_gp=links[cur_link].pcm_start; if(OP_LIKELY(cur_page_gp!=-1)){ op_granpos_add(&prev_packet_gp,cur_page_gp,-total_duration); } if(OP_LIKELY(!op_granpos_diff(&diff, prev_packet_gp,links[cur_link].pcm_start))){ opus_int32 pre_skip; /*If we start at the beginning of the pre-skip region, or we're at least 80 ms from the end of the pre-skip region, we discard to the end of the pre-skip region. Otherwise, we still use the 80 ms default, which will discard past the end of the pre-skip region.*/ pre_skip=links[cur_link].head.pre_skip; if(diff>=0&&diff<=OP_MAX(0,pre_skip-80*48)){ cur_discard_count=pre_skip-(int)diff; } } _of->cur_discard_count=cur_discard_count; } if(OP_UNLIKELY(cur_page_gp==-1)){ /*This page had completed packets but didn't have a valid granule position. This is illegal, but we'll try to handle it by continuing to count forwards from the previous page.*/ if(op_granpos_add(&cur_page_gp,prev_packet_gp,total_duration)<0){ /*The timestamp for this page overflowed.*/ cur_page_gp=links[cur_link].pcm_end; } } /*If we hit the last page, handle end-trimming.*/ if(OP_UNLIKELY(cur_page_eos) &&OP_LIKELY(!op_granpos_diff(&diff,cur_page_gp,prev_packet_gp)) &&OP_LIKELY(diff<total_duration)){ cur_packet_gp=prev_packet_gp; for(pi=0;pi<op_count;pi++){ /*Check for overflow.*/ if(diff<0&&OP_UNLIKELY(OP_INT64_MAX+diff<durations[pi])){ diff=durations[pi]+1; } else diff=durations[pi]-diff; /*If we have samples to trim...*/ if(diff>0){ /*If we trimmed the entire packet, stop (the spec says encoders shouldn't do this, but we support it anyway).*/ if(OP_UNLIKELY(diff>durations[pi]))break; cur_packet_gp=cur_page_gp; /*Move the EOS flag to this packet, if necessary, so we'll trim the samples during decode.*/ _of->op[pi].e_o_s=1; } else{ /*Update the granule position as normal.*/ OP_ALWAYS_TRUE(!op_granpos_add(&cur_packet_gp, cur_packet_gp,durations[pi])); } _of->op[pi].granulepos=cur_packet_gp; OP_ALWAYS_TRUE(!op_granpos_diff(&diff,cur_page_gp,cur_packet_gp)); } } else{ /*Propagate timestamps to earlier packets. op_granpos_add(&prev_packet_gp,prev_packet_gp,total_duration) should succeed and give prev_packet_gp==cur_page_gp. But we don't bother to check that, as there isn't much we can do if it's not true, and it actually will not be true on the first page after a seek, if there was a continued packet. The only thing we guarantee is that the start and end granule positions of the packets are valid, and that they are monotonic within a page. They might be completely out of range for this link (we'll check that elsewhere), or non-monotonic between pages.*/ if(OP_UNLIKELY(op_granpos_add(&prev_packet_gp, cur_page_gp,-total_duration)<0)){ /*The starting timestamp for the first packet on this page underflowed. This is illegal, but we ignore it.*/ prev_packet_gp=0; } for(pi=0;pi<op_count;pi++){ if(OP_UNLIKELY(op_granpos_add(&cur_packet_gp, cur_page_gp,-total_duration)<0)){ /*The start timestamp for this packet underflowed. This is illegal, but we ignore it.*/ cur_packet_gp=0; } total_duration-=durations[pi]; OP_ASSERT(total_duration>=0); OP_ALWAYS_TRUE(!op_granpos_add(&cur_packet_gp, cur_packet_gp,durations[pi])); _of->op[pi].granulepos=cur_packet_gp; } OP_ASSERT(total_duration==0); } _of->prev_packet_gp=prev_packet_gp; _of->prev_page_offset=_page_offset; _of->op_count=op_count=pi; } if(report_hole)return OP_HOLE; /*If end-trimming didn't trim all the packets, we're done.*/ if(op_count>0)return 0; } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x4d8, %rsp # imm = 0x4D8 movl %r8d, 0x5c(%rsp) movl %ecx, 0x68(%rsp) movq %rdx, %rbp movq %rdi, %r14 movl 0x28(%rdi), %eax movq 0x30(%rdi), %r12 movl $0x0, %ecx movl %eax, 0x6c(%rsp) testl %eax, %eax je 0x4ab2 movl 0x7c(%r14), %ecx movq %rcx, 0x48(%rsp) movslq %ecx, %rax imulq $0x178, %rax, %rax # imm = 0x178 movl 0x30(%r12,%rax), %r13d leaq 0x88(%r14), %rax movq %rax, 0xb8(%rsp) leaq 0xa8(%r14), %rax movq %rax, 0x88(%rsp) leaq 0x240(%r14), %rax movq %rax, 0xc0(%rsp) leaq 0x34(%r12), %rax movq %rax, 0x78(%rsp) leaq 0x158(%r12), %rax movq %rax, 0x70(%rsp) leaq 0x260(%r14), %rax movq %rax, 0x80(%rsp) leaq 0x90(%rsp), %rbx leaq 0xd0(%rsp), %r15 movq %r12, 0x30(%rsp) movq %r14, 0x20(%rsp) testq %rsi, %rsi je 0x4b53 movdqu (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movaps %xmm1, 0xa0(%rsp) movdqa %xmm0, 0x90(%rsp) jmp 0x4b65 movq 0x50(%r14), %rdx movq %r14, %rdi movq %rbx, %rsi callq 0xdc8c movq %rax, %rbp testq %rbp, %rbp js 0x4cd1 cmpl $0x3, 0x78(%r14) jl 0x4b86 movq %rbx, %rdi callq 0x3290 cmpl %eax, %r13d jne 0x4ce5 movq 0x98(%rsp), %rax addq %rax, 0x98(%r14) cmpl $0x2, 0x78(%r14) jle 0x4dbe movl %r13d, 0x2c(%rsp) cmpl $0x3, 0x78(%r14) je 0x4df7 movq 0x88(%rsp), %rdi movq %rbx, %rsi callq 0x34d0 cmpl $0x4, 0x78(%r14) jl 0x4e10 movq %r14, %rdi movq %r15, %rsi callq 0x5de6 movb $0x1, %r8b testl %eax, %eax js 0x4d99 movl %eax, %r13d movl 0x3214(%r14), %r15d testl %r15d, %r15d jle 0x4d43 leal -0x1(%r15), %eax imulq $0x30, %rax, %rax movq 0xc0(%rsp), %rcx movq 0x20(%rcx,%rax), %rsi movq %rsi, 0x50(%rsp) movl 0x18(%rcx,%rax), %ebx movq 0x88(%r14), %rax movq %rax, 0x40(%rsp) movslq 0x48(%rsp), %rdi cmpq $-0x1, %rax movl %r8d, 0xc(%rsp) je 0x4e78 cmpq $-0x1, 0x50(%rsp) je 0x4f35 testl %ebx, %ebx jne 0x4f74 movq %rbp, 0xc8(%rsp) movq 0x50(%rsp), %rbx movl %r13d, %edx negl %edx leaq 0x40(%rsp), %rdi movq %rbx, %rsi callq 0x459b testl %eax, %eax js 0x50ff cmpl $0x2, %r15d pushq $0x1 popq %rax cmovll %eax, %r15d movq 0x80(%rsp), %r12 xorl %ebp, %ebp leaq 0x38(%rsp), %r14 movl %r13d, %edx negl %edx movq %r14, %rdi movq %rbx, %rsi callq 0x459b testl %eax, %eax js 0x4cc9 movl 0xd0(%rsp,%rbp,4), %edx subl %edx, %r13d movq 0x38(%rsp), %rsi movq %r14, %rdi callq 0x459b movq 0x38(%rsp), %rax movq %rax, (%r12) incq %rbp addq $0x30, %r12 cmpq %rbp, %r15 jne 0x4c87 jmp 0x4cfa andq $0x0, 0x38(%rsp) jmp 0x4c9b cmpq $-0x1, %rbp movl %ebp, %ecx pushq $-0x2 popq %rax cmovel %eax, %ecx movl %ecx, 0x8(%rsp) pushq $0x1 jmp 0x4cf7 movq %rbx, %rdi callq 0x3610 testl %eax, %eax jne 0x4e1c pushq $0x3 popq %rcx jmp 0x4d79 movl %ebp, %r15d movq 0x30(%rsp), %r12 movq 0xc8(%rsp), %rbp movq 0x20(%rsp), %r14 movl 0xc(%rsp), %r8d movq 0x40(%rsp), %rax movq %rax, 0x88(%r14) movq %rbp, 0x90(%r14) movl %r15d, 0x3214(%r14) xorl %ecx, %ecx leaq 0x90(%rsp), %rbx movl 0x2c(%rsp), %r13d testl %ecx, %ecx jne 0x4d71 jmp 0x4d48 movl 0x2c(%rsp), %r13d testb %r8b, %r8b je 0x4d67 xorl %ecx, %ecx testl %r15d, %r15d setg %cl movl $0x0, %eax movl 0x8(%rsp), %edx cmovgl %eax, %edx movl %edx, 0x8(%rsp) jmp 0x4d71 pushq $0x1 popq %rcx pushq $-0x3 popq %rax movl %eax, 0x8(%rsp) leaq 0xd0(%rsp), %r15 movl $0x0, %esi testl %ecx, %ecx je 0x4b33 movl $0x0, %esi cmpl $0x3, %ecx je 0x4b33 jmp 0x5436 movq %r14, %rdi movq %r15, %rsi callq 0x5de6 testl %eax, %eax js 0x4d99 movl %eax, %r13d cmpl $0x0, 0x5c(%rsp) je 0x51b7 movb $0x1, %r8b jmp 0x4be4 cmpl $0x0, 0x6c(%rsp) je 0x51d6 movq %rbp, %r15 movq %rbx, %rdi callq 0x3290 movl %eax, %ebx movq 0x48(%rsp), %rsi movslq %esi, %rax imulq $0x178, %rax, %rax # imm = 0x178 cmpl %ebx, 0x30(%r12,%rax) jne 0x510a movl %esi, %ebp jmp 0x512c movq %r14, %rdi callq 0x5ee3 testl %eax, %eax jns 0x4bb0 pushq $0x1 popq %rcx movl %eax, 0x8(%rsp) jmp 0x4e12 xorl %ecx, %ecx movl 0x2c(%rsp), %r13d jmp 0x4d79 cmpl $0x0, 0x68(%rsp) je 0x51c7 cmpl $0x4, 0x78(%r14) jl 0x4b95 andl $0x0, 0x3214(%r14) andl $0x0, 0x3254(%r14) movq 0xb8(%rsp), %rax pcmpeqd %xmm0, %xmm0 movdqu %xmm0, (%rax) xorl %eax, %eax cmpl %eax, 0x28(%r14) jne 0x4e6b movq 0x30(%r14), %rdi movl $0x158, %eax # imm = 0x158 addq %rax, %rdi callq 0x9fe6 movl $0x2, 0x78(%r14) jmp 0x4b95 testl %ebx, %ebx jne 0x52cb movq %rsi, 0x50(%rsp) movq %rdi, 0x18(%rsp) imulq $0x178, %rdi, %rax # imm = 0x178 movq %rax, 0x60(%rsp) movq 0x28(%r12,%rax), %r12 movq %r12, 0x40(%rsp) cmpq $-0x1, %rsi je 0x4eb5 movl %r13d, %edx negl %edx leaq 0x40(%rsp), %rdi callq 0x459b movq 0x40(%rsp), %rax movq %rax, %rcx xorq %r12, %rcx movl 0xc(%rsp), %r8d movq 0x18(%rsp), %rdi js 0x533a subq %r12, %rax movb $0x1, %cl movq %rax, 0x10(%rsp) movl $0xf00, %eax # imm = 0xF00 testb %cl, %cl movq 0x30(%rsp), %r12 je 0x4f1f movq 0x10(%rsp), %rsi testq %rsi, %rsi js 0x4f1f movq 0x60(%rsp), %rax addq %r12, %rax movl 0x3c(%rax), %ecx cmpl $0xf01, %ecx # imm = 0xF01 movl $0xf00, %eax # imm = 0xF00 movl $0xf00, %edx # imm = 0xF00 cmovgel %ecx, %edx addl $0xfffff100, %edx # imm = 0xFFFFF100 cmpq %rdx, %rsi jg 0x4f1f subl %esi, %ecx movl %ecx, %eax movl %eax, 0x80(%r14) xorl %ecx, %ecx testl %ebx, %ebx jne 0x4d30 jmp 0x4c32 movq 0x40(%rsp), %rsi movq %rdi, 0x18(%rsp) leaq 0x50(%rsp), %rdi movl %r13d, %edx callq 0x459b movq 0x18(%rsp), %rcx movl 0xc(%rsp), %r8d testl %eax, %eax jns 0x4c3e imulq $0x178, %rcx, %rax # imm = 0x178 movq 0x20(%r12,%rax), %rax movq %rax, 0x50(%rsp) jmp 0x4c3e movq 0x50(%rsp), %r9 movq 0x40(%rsp), %rax movq %rax, %rcx xorq %r9, %rcx movq %r9, 0x18(%rsp) js 0x52f3 movq %r9, %rcx subq %rax, %rcx movq %rcx, 0x10(%rsp) movb $0x1, %cl testb %cl, %cl je 0x4c46 movl %r13d, %ecx movq 0x10(%rsp), %rdx cmpq %rcx, %rdx jge 0x4c46 movq %rdx, %rcx movq %rax, 0x38(%rsp) movq %r9, %rax btsq $0x3f, %rax movq %rax, 0x60(%rsp) pushq $-0x2 popq %rax subq %r9, %rax movq %rax, 0xb0(%rsp) cmpl $0x2, %r15d pushq $0x1 popq %rax cmovll %eax, %r15d movq 0x80(%rsp), %rbx xorl %r13d, %r13d testq %rcx, %rcx leaq 0x38(%rsp), %rdi jns 0x501f movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rcx, %rdx addq %rax, %rcx decq %rcx movslq 0xd0(%rsp,%r13,4), %rax cmpq %rax, %rcx movq %rdx, %rcx jl 0x50c6 movslq 0xd0(%rsp,%r13,4), %rax subq %rcx, %rax movq %rax, %rcx testq %rax, %rax movq %rax, 0x10(%rsp) jle 0x508a movslq 0xd0(%rsp,%r13,4), %rax cmpq %rax, %rcx jg 0x5284 movq %r9, 0x38(%rsp) movq $0x1, -0x8(%rbx) movq 0x38(%rsp), %rax movq %rax, (%rbx) movq %rax, %rcx xorq %r9, %rcx js 0x50a8 movq %r9, %rcx subq %rax, %rcx movq %rcx, 0x10(%rsp) incq %r13 addq $0x30, %rbx cmpq %r13, %r15 movq 0x10(%rsp), %rcx jne 0x4fee jmp 0x4d14 movq 0x38(%rsp), %rsi movl 0xd0(%rsp,%r13,4), %edx callq 0x459b movq 0x18(%rsp), %r9 movl 0xc(%rsp), %r8d jmp 0x5055 testq %r9, %r9 js 0x50ce movq 0x60(%rsp), %rcx subq %rax, %rcx jl 0x5070 movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 xorq %rax, %rcx jmp 0x506b incq %rax jmp 0x502a movq %r9, %rcx subq %rax, %rcx notq %rax movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000 addq %rdx, %rax cmpq %rax, 0xb0(%rsp) movq 0x10(%rsp), %rax cmovgeq %rcx, %rax movq %rax, 0x10(%rsp) jmp 0x5070 andq $0x0, 0x40(%rsp) jmp 0x4c6d leal 0x1(%rsi), %ebp cmpl 0x2c(%r14), %ebp jge 0x5294 movslq %ebp, %rax imulq $0x178, %rax, %rax # imm = 0x178 cmpl %ebx, 0x30(%r12,%rax) jne 0x5294 movl %ebp, 0x7c(%r14) movq 0x88(%rsp), %rdi movl %ebx, %esi callq 0x32e0 movl $0x3, 0x78(%r14) movslq %ebp, %rax imulq $0x178, %rax, %rax # imm = 0x178 xorl %ecx, %ecx cmpq 0x8(%r12,%rax), %r15 jle 0x5166 movl %ebx, %r13d movl %ebp, %eax movq %rax, 0x48(%rsp) jmp 0x5197 addq %r12, %rax movq 0x28(%rax), %rdx movq %rdx, 0x88(%r14) orq $-0x1, 0x90(%r14) movl 0x3c(%rax), %eax movl %eax, 0x80(%r14) movl %ebx, %r13d movl %ebp, %eax movq %rax, 0x48(%rsp) pushq $0x1 popq %rax movl %eax, 0x5c(%rsp) testl %ecx, %ecx movq %r15, %rbp leaq 0x90(%rsp), %rbx leaq 0xd0(%rsp), %r15 jne 0x4d79 jmp 0x4ba0 orq $-0x1, 0x88(%r14) xorl %r8d, %r8d jmp 0x4be4 pushq $0x1 popq %rcx pushq $-0x2 popq %rax movl %eax, 0x8(%rsp) jmp 0x4d79 movq %rbx, (%rsp) movq %r14, %rdi movq 0x78(%rsp), %rsi movq 0x70(%rsp), %rdx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x5a93 testl %eax, %eax js 0x528c movq %r14, %rdi movq %r12, %rsi movq %rbx, %rdx callq 0xd981 testl %eax, %eax js 0x528c movl 0x220(%r14), %r13d movq 0x30(%r14), %rcx movl %r13d, 0x30(%rcx) incl 0x7c(%r14) testl %eax, %eax je 0x5265 movq %rbx, (%rsp) movq %r14, %rdi movq 0x78(%rsp), %rsi movq 0x70(%rsp), %rdx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x5a93 testl %eax, %eax js 0x5418 movq 0x20(%rsp), %r14 movq %r14, %rdi movq 0x30(%rsp), %r12 movq %r12, %rsi leaq 0x90(%rsp), %rbx jmp 0x5202 cmpl $0x0, 0x3214(%r14) jle 0x4cf5 movq %r14, %rdi callq 0x5ee3 movl %eax, 0x8(%rsp) jmp 0x4ce1 movl %r13d, %r15d jmp 0x4d14 pushq $0x1 popq %rcx jmp 0x51cd movq %r14, %rdi movq %r15, %rdx movq %rsi, %r14 movl %ebx, %ecx callq 0xde46 testl %eax, %eax cmovnsl %eax, %r14d movq %r14, 0x48(%rsp) js 0x5368 movq 0x48(%rsp), %rax movl %eax, %ebp movq 0x30(%rsp), %r12 movq 0x20(%rsp), %r14 jmp 0x512c andl $0x0, 0x3214(%r14) movzbl %r8b, %eax leal 0x1(,%rax,2), %ecx testb %al, %al pushq $-0x3 popq %rax movl 0x8(%rsp), %edx cmovel %eax, %edx movl %edx, 0x8(%rsp) jmp 0x4f28 testq %r9, %r9 js 0x537d movq 0x18(%rsp), %rdx movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 orq %rcx, %rdx subq %rax, %rdx jl 0x540d xorq %rcx, %rdx movb $0x1, %cl movq %rdx, 0x10(%rsp) movq 0x30(%rsp), %r12 movq 0x20(%rsp), %r14 movl 0xc(%rsp), %r8d movq 0x18(%rsp), %r9 jmp 0x4f9c testq %rax, %rax js 0x53c9 movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 orq %rcx, %rax subq %r12, %rax jl 0x5414 xorq %rcx, %rax movb $0x1, %cl movq %rax, 0x10(%rsp) jmp 0x53f9 shrl $0x1f, %eax leal (%rax,%rax,2), %ecx movq 0x30(%rsp), %r12 movq 0x20(%rsp), %r14 jmp 0x5197 movq %rax, %rcx notq %rcx movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000 addq %rdx, %rcx pushq $-0x2 popq %rdx movq 0x18(%rsp), %r9 subq %r9, %rdx movq %r9, %rsi subq %rax, %rsi cmpq %rcx, %rdx setge %cl movq 0x10(%rsp), %rdx cmovgeq %rsi, %rdx movq %rdx, 0x10(%rsp) movq 0x30(%rsp), %r12 movq 0x20(%rsp), %r14 movl 0xc(%rsp), %r8d jmp 0x4f9c movq %r12, %rcx notq %rcx movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000 addq %rdx, %rcx pushq $-0x2 popq %rdx subq %rax, %rdx subq %r12, %rax cmpq %rcx, %rdx setge %cl movq 0x10(%rsp), %rdx cmovgeq %rax, %rdx movq %rdx, 0x10(%rsp) movq 0x20(%rsp), %r14 movl 0xc(%rsp), %r8d movq 0x18(%rsp), %rdi jmp 0x4eda xorl %ecx, %ecx jmp 0x5321 xorl %ecx, %ecx jmp 0x53f9 pushq $0x1 popq %rcx movl %eax, 0x8(%rsp) movq 0x30(%rsp), %r12 movq 0x20(%rsp), %r14 leaq 0x90(%rsp), %rbx jmp 0x4d79 movl 0x8(%rsp), %eax addq $0x4d8, %rsp # imm = 0x4D8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x544c
op_raw_tell
opus_int64 op_raw_tell(const OggOpusFile *_of){ if(OP_UNLIKELY(_of->ready_state<OP_OPENED))return OP_EINVAL; return _of->offset; }
cmpl $0x2, 0x78(%rdi) jl 0x5457 movq 0x48(%rdi), %rax retq movq $-0x83, %rax retq
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x545f
op_pcm_tell
ogg_int64_t op_pcm_tell(const OggOpusFile *_of){ ogg_int64_t gp; int nbuffered; int li; if(OP_UNLIKELY(_of->ready_state<OP_OPENED))return OP_EINVAL; gp=_of->prev_packet_gp; if(gp==-1)return 0; nbuffered=OP_MAX(_of->od_buffer_size-_of->od_buffer_pos,0); OP_ALWAYS_TRUE(!op_granpos_add(&gp,gp,-nbuffered)); li=_of->seekable?_of->cur_link:0; if(op_granpos_add(&gp,gp,_of->cur_discard_count)<0){ gp=_of->links[li].pcm_end; } return op_get_pcm_offset(_of,gp,li); }
pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp cmpl $0x2, 0x78(%rdi) jl 0x5562 movq %rdi, %r14 movq 0x88(%rdi), %rsi movq %rsi, 0x8(%rsp) xorl %ebx, %ebx cmpq $-0x1, %rsi jne 0x5494 movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq movl 0x3254(%r14), %edx subl 0x3250(%r14), %edx testl %edx, %edx cmovlel %ebx, %edx negl %edx leaq 0x8(%rsp), %rdi callq 0x459b movl 0x28(%r14), %ebp testl %ebp, %ebp je 0x54bf movslq 0x7c(%r14), %rbx leaq 0x8(%rsp), %rdi movq (%rdi), %rsi movl 0x80(%r14), %edx callq 0x459b testl %eax, %eax jns 0x54ec movq 0x30(%r14), %rax imulq $0x178, %rbx, %rcx # imm = 0x178 movq 0x20(%rax,%rcx), %rax movq %rax, 0x8(%rsp) movq 0x30(%r14), %rdx imulq $0x178, %rbx, %rsi # imm = 0x178 leaq (%rdx,%rsi), %rcx movq 0x8(%rsp), %rax testl %ebp, %ebp je 0x551a movq 0x20(%rcx), %rdi testq %rax, %rax js 0x55a2 cmpq %rax, %rdi jb 0x55b9 movq 0x18(%rdx,%rsi), %rdx movq 0x28(%rcx), %rsi testq %rax, %rax js 0x556e cmpq %rsi, %rax jbe 0x5581 movabsq $0x7fffffffffffffff, %rbx # imm = 0x7FFFFFFFFFFFFFFF movq %rsi, %rdi xorq %rax, %rdi js 0x5589 subq %rsi, %rax movb $0x1, %dil testb %dil, %dil je 0x5488 movl 0x3c(%rcx), %ecx xorl %ebx, %ebx subq %rcx, %rax cmovgeq %rax, %rbx addq %rdx, %rbx jmp 0x5488 movq $-0x83, %rbx jmp 0x5488 testq %rsi, %rsi setns %dil cmpq %rsi, %rax setg %r8b orb %dil, %r8b jne 0x552d movq %rdx, %rbx jmp 0x5488 testq %rax, %rax js 0x55c1 addq %rbx, %rax incq %rax subq %rsi, %rax jl 0x55dd leaq 0x1(%rbx), %rsi xorq %rsi, %rax jmp 0x5542 testq %rdi, %rdi setns %r8b cmpq %rax, %rdi setl %r9b orb %r8b, %r9b je 0x551a movq %rdi, %rax jmp 0x551a movq %rbx, %rdi subq %rsi, %rdi pushq $-0x2 popq %r8 subq %rax, %r8 cmpq %rdi, %r8 setge %dil subq %rsi, %rax jmp 0x5545 xorl %edi, %edi jmp 0x5545
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x55e4
op_filter_read_native
static int op_filter_read_native(OggOpusFile *_of,void *_dst,int _dst_sz, op_read_filter_func _filter,int *_li){ int ret; /*Ensure we have some decoded samples in our buffer.*/ ret=op_read_native(_of,NULL,0,_li); /*Now apply the filter to them.*/ if(OP_LIKELY(ret>=0)&&OP_LIKELY(_of->ready_state>=OP_INITSET)){ int od_buffer_pos; od_buffer_pos=_of->od_buffer_pos; ret=_of->od_buffer_size-od_buffer_pos; if(OP_LIKELY(ret>0)){ int nchannels; nchannels=_of->links[_of->seekable?_of->cur_link:0].head.channel_count; ret=(*_filter)(_of,_dst,_dst_sz, _of->od_buffer+nchannels*od_buffer_pos,ret,nchannels); OP_ASSERT(ret>=0); OP_ASSERT(ret<=_of->od_buffer_size-od_buffer_pos); od_buffer_pos+=ret; _of->od_buffer_pos=od_buffer_pos; } } return ret; }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %r14 movl %edx, %ebp movq %rsi, %r15 movq %rdi, %rbx xorl %esi, %esi xorl %edx, %edx movq %r8, %rcx callq 0x5674 testl %eax, %eax js 0x566b cmpl $0x4, 0x78(%rbx) jl 0x566b movl 0x3250(%rbx), %r12d movl 0x3254(%rbx), %eax subl %r12d, %eax jle 0x566b movq 0x30(%rbx), %rcx cmpl $0x0, 0x28(%rbx) je 0x562f movslq 0x7c(%rbx), %rdx jmp 0x5631 xorl %edx, %edx imulq $0x178, %rdx, %rdx # imm = 0x178 movl 0x38(%rcx,%rdx), %r9d movl %r9d, %ecx imull %r12d, %ecx movslq %ecx, %rcx shlq $0x2, %rcx addq 0x3248(%rbx), %rcx movq %rbx, %rdi movq %r15, %rsi movl %ebp, %edx movl %eax, %r8d callq *%r14 movl %eax, %ecx addl %r12d, %ecx movl %ecx, 0x3250(%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x5674
op_read_native
static int op_read_native(OggOpusFile *_of, op_sample *_pcm,int _buf_size,int *_li){ if(OP_UNLIKELY(_of->ready_state<OP_OPENED))return OP_EINVAL; for(;;){ int ret; if(OP_LIKELY(_of->ready_state>=OP_INITSET)){ int nchannels; int od_buffer_pos; int nsamples; int op_pos; nchannels=_of->links[_of->seekable?_of->cur_link:0].head.channel_count; od_buffer_pos=_of->od_buffer_pos; nsamples=_of->od_buffer_size-od_buffer_pos; /*If we have buffered samples, return them.*/ if(nsamples>0){ if(nsamples*nchannels>_buf_size)nsamples=_buf_size/nchannels; OP_ASSERT(_pcm!=NULL||nsamples<=0); /*Check nsamples again so we don't pass NULL to memcpy() if _buf_size is zero. That would technically be undefined behavior, even if the number of bytes to copy were zero.*/ if(nsamples>0){ memcpy(_pcm,_of->od_buffer+nchannels*od_buffer_pos, sizeof(*_pcm)*nchannels*nsamples); od_buffer_pos+=nsamples; _of->od_buffer_pos=od_buffer_pos; } if(_li!=NULL)*_li=_of->cur_link; return nsamples; } /*If we have buffered packets, decode one.*/ op_pos=_of->op_pos; if(OP_LIKELY(op_pos<_of->op_count)){ const ogg_packet *pop; ogg_int64_t diff; opus_int32 cur_discard_count; int duration; int trimmed_duration; pop=_of->op+op_pos++; _of->op_pos=op_pos; cur_discard_count=_of->cur_discard_count; duration=op_get_packet_duration(pop->packet,pop->bytes); /*We don't buffer packets with an invalid TOC sequence.*/ OP_ASSERT(duration>0); trimmed_duration=duration; /*Perform end-trimming.*/ if(OP_UNLIKELY(pop->e_o_s)){ if(OP_UNLIKELY(op_granpos_cmp(pop->granulepos, _of->prev_packet_gp)<=0)){ trimmed_duration=0; } else if(OP_LIKELY(!op_granpos_diff(&diff, pop->granulepos,_of->prev_packet_gp))){ trimmed_duration=(int)OP_MIN(diff,trimmed_duration); } } _of->prev_packet_gp=pop->granulepos; if(OP_UNLIKELY(duration*nchannels>_buf_size)){ op_sample *buf; /*If the user's buffer is too small, decode into a scratch buffer.*/ buf=_of->od_buffer; if(OP_UNLIKELY(buf==NULL)){ ret=op_init_buffer(_of); if(OP_UNLIKELY(ret<0))return ret; buf=_of->od_buffer; } ret=op_decode(_of,buf,pop,duration,nchannels); if(OP_UNLIKELY(ret<0))return ret; /*Perform pre-skip/pre-roll.*/ od_buffer_pos=(int)OP_MIN(trimmed_duration,cur_discard_count); cur_discard_count-=od_buffer_pos; _of->cur_discard_count=cur_discard_count; _of->od_buffer_pos=od_buffer_pos; _of->od_buffer_size=trimmed_duration; /*Update bitrate tracking based on the actual samples we used from what was decoded.*/ _of->bytes_tracked+=pop->bytes; _of->samples_tracked+=trimmed_duration-od_buffer_pos; } else{ OP_ASSERT(_pcm!=NULL); /*Otherwise decode directly into the user's buffer.*/ ret=op_decode(_of,_pcm,pop,duration,nchannels); if(OP_UNLIKELY(ret<0))return ret; if(OP_LIKELY(trimmed_duration>0)){ /*Perform pre-skip/pre-roll.*/ od_buffer_pos=(int)OP_MIN(trimmed_duration,cur_discard_count); cur_discard_count-=od_buffer_pos; _of->cur_discard_count=cur_discard_count; trimmed_duration-=od_buffer_pos; if(OP_LIKELY(trimmed_duration>0) &&OP_UNLIKELY(od_buffer_pos>0)){ memmove(_pcm,_pcm+od_buffer_pos*nchannels, sizeof(*_pcm)*trimmed_duration*nchannels); } /*Update bitrate tracking based on the actual samples we used from what was decoded.*/ _of->bytes_tracked+=pop->bytes; _of->samples_tracked+=trimmed_duration; if(OP_LIKELY(trimmed_duration>0)){ if(_li!=NULL)*_li=_of->cur_link; return trimmed_duration; } } } /*Don't grab another page yet. This one might have more packets, or might have buffered data now.*/ continue; } } /*Suck in another page.*/ ret=op_fetch_and_process_page(_of,NULL,-1,1,0); if(OP_UNLIKELY(ret==OP_EOF)){ if(_li!=NULL)*_li=_of->cur_link; return 0; } if(OP_UNLIKELY(ret<0))return ret; } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %edx, 0x4(%rsp) movq %rsi, 0x18(%rsp) cmpl $0x2, 0x78(%rdi) jl 0x5a56 movq %rcx, %r14 movq %rdi, %r15 leaq 0x240(%rdi), %rax movq %rax, 0x30(%rsp) movq %rcx, 0x8(%rsp) cmpl $0x4, 0x78(%r15) jl 0x586d cmpl $0x0, 0x28(%r15) je 0x56c4 movslq 0x7c(%r15), %rax jmp 0x56c6 xorl %eax, %eax movq 0x30(%r15), %rcx imulq $0x178, %rax, %rax # imm = 0x178 movslq 0x38(%rcx,%rax), %r12 movl 0x3250(%r15), %ebp movl 0x3254(%r15), %r13d subl %ebp, %r13d jle 0x574a movl %r13d, %eax imull %r12d, %eax cmpl 0x4(%rsp), %eax jle 0x5701 movl 0x4(%rsp), %eax cltd idivl %r12d movl %eax, %r13d testl %r13d, %r13d jle 0x573c movl %ebp, %eax imull %r12d, %eax movslq %eax, %rsi shlq $0x2, %rsi addq 0x3248(%r15), %rsi movl %r13d, %eax imulq %rax, %r12 shlq $0x2, %r12 movq 0x18(%rsp), %rdi movq %r12, %rdx callq 0x3260 addl %r13d, %ebp movl %ebp, 0x3250(%r15) testq %r14, %r14 jne 0x584b jmp 0x5852 movslq 0x3210(%r15), %rax cmpl 0x3214(%r15), %eax jge 0x5898 leal 0x1(%rax), %ecx imulq $0x30, %rax, %r13 movq 0x30(%rsp), %rbp movq %rbp, %rax addq %r13, %rax movq %rax, 0x10(%rsp) movl %ecx, 0x3210(%r15) movl 0x80(%r15), %r14d movq (%rbp,%r13), %rdi movl 0x8(%rbp,%r13), %esi callq 0x5ea4 movl %eax, %ecx cmpq $0x0, 0x18(%rbp,%r13) jne 0x589f movl %ecx, %r13d movq 0x10(%rsp), %rbp movq 0x20(%rbp), %rax movq %rax, 0x88(%r15) movl %ecx, %eax imull %r12d, %eax cmpl 0x4(%rsp), %eax jg 0x58f0 movq %r15, %rdi movq 0x18(%rsp), %rsi movq %rbp, %rdx movl %r12d, %r8d callq 0x632c testl %eax, %eax js 0x59d5 testl %r13d, %r13d jle 0x5950 cmpl %r14d, %r13d movl %r14d, %eax cmovll %r13d, %eax movl %r14d, %ecx subl %eax, %ecx movl %ecx, 0x80(%r15) subl %eax, %r13d setg %cl testl %r14d, %r14d setg %dl andb %cl, %dl cmpb $0x1, %dl je 0x595b movq 0x8(%rbp), %rax addq %rax, 0x98(%r15) movslq %r13d, %rax addq %rax, 0xa0(%r15) xorl %eax, %eax testl %r13d, %r13d setle %al cmovgl %r13d, %ebx leal 0x1(,%rax,2), %ecx movq 0x8(%rsp), %r14 testq %r14, %r14 je 0x589a testl %r13d, %r13d jle 0x589a movl 0x7c(%r15), %eax movl %eax, (%r14) pushq $0x1 popq %rcx movl %r13d, %ebx testl %ecx, %ecx je 0x586d movl %r13d, %ebx cmpl $0x1, %ecx jne 0x56ac jmp 0x5a5c movq %r15, %rdi xorl %esi, %esi pushq $-0x1 popq %rdx pushq $0x1 popq %rcx xorl %r8d, %r8d callq 0x4a7a cmpl $-0x2, %eax je 0x597f movl %eax, %ecx shrl $0x1f, %ecx testl %eax, %eax cmovsl %eax, %ebx movl %ebx, %r13d jmp 0x585c xorl %ecx, %ecx movl %ebx, %r13d jmp 0x5855 movq 0x10(%rsp), %rbp movq 0x20(%rbp), %rax movq 0x88(%r15), %rdi testq %rax, %rax js 0x5996 cmpq %rdi, %rax jbe 0x59a8 movq %rdi, %rdx xorq %rax, %rdx js 0x59e5 subq %rdi, %rax movb $0x1, %sil testb %sil, %sil movq %rax, 0x28(%rsp) je 0x5a09 movslq %ecx, %r13 cmpq %r13, %rax cmovlq %rax, %r13 jmp 0x57a8 movq 0x3248(%r15), %rsi testq %rsi, %rsi je 0x59b0 movq %r15, %rdi movq %rbp, %rdx movl %r12d, %r8d callq 0x632c testl %eax, %eax js 0x59d5 cmpl %r14d, %r13d movl %r14d, %eax cmovll %r13d, %eax subl %eax, %r14d movl %r14d, 0x80(%r15) movl %eax, 0x3250(%r15) movl %r13d, 0x3254(%r15) movq 0x8(%rbp), %rcx addq %rcx, 0x98(%r15) subl %eax, %r13d movslq %r13d, %rax addq %rax, 0xa0(%r15) pushq $0x3 popq %rcx movl %ebx, %r13d jmp 0x59db imull %r12d, %eax cltq movq 0x18(%rsp), %rdi leaq (%rdi,%rax,4), %rsi movl %r13d, %edx imulq %r12, %rdx shlq $0x2, %rdx callq 0x3570 jmp 0x5814 xorl %r13d, %r13d testq %r14, %r14 je 0x598e movl 0x7c(%r15), %eax movl %eax, (%r14) pushq $0x1 popq %rcx jmp 0x585c testq %rdi, %rdi jns 0x58c1 cmpq %rdi, %rax jg 0x58c1 xorl %r13d, %r13d jmp 0x57a8 movl %ecx, 0x24(%rsp) movq %r15, %rdi callq 0xdede testl %eax, %eax js 0x59d5 movq 0x3248(%r15), %rsi movq 0x10(%rsp), %rbp movl 0x24(%rsp), %ecx jmp 0x5900 pushq $0x1 popq %rcx movl %eax, %r13d movq 0x8(%rsp), %r14 jmp 0x5855 movl %ecx, %r8d testq %rax, %rax js 0x5a11 btsq $0x3f, %rax subq %rdi, %rax jl 0x5a4d movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 xorq %rcx, %rax movb $0x1, %sil jmp 0x5a40 movl %ecx, %r13d jmp 0x57a8 movq %rdi, %rdx notq %rdx movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000 addq %rsi, %rdx pushq $-0x2 popq %rsi subq %rax, %rsi subq %rdi, %rax cmpq %rdx, %rsi setge %sil movq 0x28(%rsp), %rdx cmovgeq %rax, %rdx movq %rdx, %rax movq 0x10(%rsp), %rbp movl %r8d, %ecx jmp 0x58d3 xorl %esi, %esi movq 0x28(%rsp), %rax jmp 0x5a40 movl $0xffffff7d, %r13d # imm = 0xFFFFFF7D movl %r13d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x5a6e
op_read_stereo
int op_read_stereo(OggOpusFile *_of,opus_int16 *_pcm,int _buf_size){ return op_filter_read_native(_of,_pcm,_buf_size, op_float2short_stereo_filter,NULL); }
leaq 0x7d8a(%rip), %rcx # 0xd7ff xorl %r8d, %r8d jmp 0x55e4
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x5a7d
op_read_float_stereo
int op_read_float_stereo(OggOpusFile *_of,float *_pcm,int _buf_size){ _of->state_channel_count=0; return op_filter_read_native(_of,_pcm,_buf_size,op_stereo_filter,NULL); }
andl $0x0, 0x338c(%rdi) leaq 0x7e15(%rip), %rcx # 0xd8a0 xorl %r8d, %r8d jmp 0x55e4
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x5a93
op_fetch_headers
static int op_fetch_headers(OggOpusFile *_of,OpusHead *_head, OpusTags *_tags,ogg_uint32_t **_serialnos,int *_nserialnos, int *_cserialnos,ogg_page *_og){ ogg_page og; int ret; if(!_og){ /*No need to clamp the boundary offset against _of->end, as all errors become OP_ENOTFORMAT.*/ if(OP_UNLIKELY(op_get_next_page(_of,&og, OP_ADV_OFFSET(_of->offset,OP_CHUNK_SIZE))<0)){ return OP_ENOTFORMAT; } _og=&og; } _of->ready_state=OP_OPENED; ret=op_fetch_headers_impl(_of,_head,_tags,_serialnos,_nserialnos, _cserialnos,_og); /*Revert back from OP_STREAMSET to OP_OPENED on failure, to prevent double-free of the tags in an unseekable stream.*/ if(OP_UNLIKELY(ret<0))_of->ready_state=OP_OPENED; return ret; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %r9, 0x18(%rsp) movq %r8, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq %rsi, 0x28(%rsp) movq %rdi, %rbx movq 0xc0(%rsp), %r15 movabsq $0x7ffffffffffeffff, %rbp # imm = 0x7FFFFFFFFFFEFFFF testq %r15, %r15 movq %rcx, (%rsp) jne 0x5b05 movq 0x48(%rbx), %rdx cmpq %rbp, %rdx cmovgeq %rbp, %rdx addq $0x10000, %rdx # imm = 0x10000 leaq 0x68(%rsp), %r15 movq %rbx, %rdi movq %r15, %rsi callq 0xdc8c movq (%rsp), %rcx testq %rax, %rax js 0x5ddb movl $0x2, 0x78(%rbx) testq %rcx, %rcx je 0x5b19 movq 0x8(%rsp), %rax andl $0x0, (%rax) leaq 0xa8(%rbx), %r13 movq %r13, 0x30(%rsp) movq %r15, %rdi callq 0x3610 testl %eax, %eax je 0x5cc9 movq (%rsp), %rax testq %rax, %rax je 0x5be9 movq (%rax), %r12 movq 0x8(%rsp), %rax movslq (%rax), %r14 movq %r15, %rdi callq 0x3290 testq %r14, %r14 setg %cl jle 0x5b8b cmpl %eax, (%r12) je 0x5d4e leaq -0x1(%r14), %rcx xorl %edx, %edx cmpq %rdx, %rcx je 0x5b82 leaq 0x1(%rdx), %rsi cmpl %eax, 0x4(%r12,%rdx,4) movq %rsi, %rdx jne 0x5b6d jmp 0x5b85 movq %r14, %rsi cmpq %r14, %rsi setb %cl testb %cl, %cl jne 0x5d4e movq %r15, %rdi callq 0x3290 movl %eax, %r12d movq (%rsp), %rsi movq (%rsi), %rax movq 0x8(%rsp), %rcx movslq (%rcx), %r14 movq 0x18(%rsp), %rcx movl (%rcx), %ecx cmpl %ecx, %r14d jge 0x5c67 leal 0x1(%r14), %edx movl %r12d, (%rax,%r14,4) movq %rax, (%rsi) movq 0x8(%rsp), %rax movl %edx, (%rax) movq 0x18(%rsp), %rax movl %ecx, (%rax) xorl %r13d, %r13d xorl %edx, %edx testb %r13b, %r13b movq 0x30(%rsp), %r13 jne 0x5d93 cmpl $0x2, 0x78(%rbx) jg 0x5c3c movq %r15, %rdi callq 0x3290 movq %r13, %rdi movl %eax, %esi callq 0x32e0 movq %r13, %rdi movq %r15, %rsi callq 0x34d0 movq %r13, %rdi leaq 0x38(%rsp), %rsi callq 0x3510 testl %eax, %eax jle 0x5c3c movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx movq 0x28(%rsp), %rdi callq 0x9e00 testl %eax, %eax js 0x5cb1 movl $0x3, 0x78(%rbx) movq 0x48(%rbx), %rdx cmpq %rbp, %rdx cmovgeq %rbp, %rdx addq $0x10000, %rdx # imm = 0x10000 movq %rbx, %rdi movq %r15, %rsi callq 0xdc8c testq %rax, %rax jns 0x5b25 jmp 0x5dab movb $0x1, %r13b cmpl $0xfffffff, %ecx # imm = 0xFFFFFFF jg 0x5cbf movslq %ecx, %rcx movq %rcx, 0x20(%rsp) addq %rcx, %rcx leaq 0x4(,%rcx,4), %rsi movq %rax, %rdi callq 0x3580 testq %rax, %rax movq (%rsp), %rsi movl $0xffffff7f, %edx # imm = 0xFFFFFF7F je 0x5bdb movq 0x20(%rsp), %rcx leaq 0x1(,%rcx,2), %rcx jmp 0x5bbd movl %eax, %edx cmpl $0xffffff7c, %eax # imm = 0xFFFFFF7C je 0x5c3c jmp 0x5d93 movl $0xffffff7f, %edx # imm = 0xFFFFFF7F jmp 0x5bdb cmpl $0x3, 0x78(%rbx) jne 0x5dc5 movq 0x220(%rbx), %r14 movq %r15, %rdi callq 0x3290 cltq cmpq %rax, %r14 jne 0x5cf4 movq %r13, %rdi movq %r15, %rsi callq 0x34d0 leaq 0x38(%rsp), %rsi movq %r13, %rdi callq 0x3510 movl $0xffffff7b, %edx # imm = 0xFFFFFF7B testl %eax, %eax jne 0x5d55 movq 0x48(%rbx), %rdx cmpq %rbp, %rdx cmovgeq %rbp, %rdx addq $0x10000, %rdx # imm = 0x10000 movq %rbx, %rdi movq %r15, %rsi callq 0xdc8c testq %rax, %rax js 0x5d4e movq 0x220(%rbx), %r14 movq %r15, %rdi callq 0x3290 cltq cmpq %rax, %r14 je 0x5ce9 movq %r15, %rdi callq 0x3610 testl %eax, %eax je 0x5d0a movl $0xffffff7b, %edx # imm = 0xFFFFFF7B jmp 0x5d93 cmpl $-0x1, %eax je 0x5d93 movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx movq 0x10(%rsp), %rdi callq 0xa043 testl %eax, %eax js 0x5de2 leaq 0x38(%rsp), %rsi movq %r13, %rdi callq 0x3510 testl %eax, %eax jne 0x5dcc movq (%r15), %rax movq 0x8(%r15), %rcx xorl %edx, %edx cmpb $-0x1, -0x1(%rax,%rcx) je 0x5dcc testl %edx, %edx js 0x5dbc movl %edx, %eax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %edx, %edx cmpl $0x3, 0x78(%rbx) setl %dl addl $0xffffff7b, %edx # imm = 0xFFFFFF7B jmp 0x5d93 movl $0x2, 0x78(%rbx) jmp 0x5d97 movl $0xffffff7c, %edx # imm = 0xFFFFFF7C jmp 0x5d93 movq 0x10(%rsp), %rdi callq 0x9fe6 jmp 0x5d4e movl $0xffffff7c, %edx # imm = 0xFFFFFF7C jmp 0x5d97 movl %eax, %edx jmp 0x5d93
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x5de6
op_collect_audio_packets
static opus_int32 op_collect_audio_packets(OggOpusFile *_of, int _durations[255]){ opus_int32 total_duration; int op_count; /*Count the durations of all packets in the page.*/ op_count=0; total_duration=0; for(;;){ int ret; /*This takes advantage of undocumented libogg behavior that returned ogg_packet buffers are valid at least until the next page is submitted. Relying on this is not too terrible, as _none_ of the Ogg memory ownership/lifetime rules are well-documented. But I can read its code and know this will work.*/ ret=ogg_stream_packetout(&_of->os,_of->op+op_count); if(!ret)break; if(OP_UNLIKELY(ret<0)){ /*We shouldn't get holes in the middle of pages.*/ OP_ASSERT(op_count==0); /*Set the return value and break out of the loop. We want to make sure op_count gets set to 0, because we've ingested a page, so any previously loaded packets are now invalid.*/ total_duration=OP_HOLE; break; } /*Unless libogg is broken, we can't get more than 255 packets from a single page.*/ OP_ASSERT(op_count<255); _durations[op_count]=op_get_packet_duration(_of->op[op_count].packet, _of->op[op_count].bytes); if(OP_LIKELY(_durations[op_count]>0)){ /*With at most 255 packets on a page, this can't overflow.*/ total_duration+=_durations[op_count++]; } /*Ignore packets with an invalid TOC sequence.*/ else if(op_count>0){ /*But save the granule position, if there was one.*/ _of->op[op_count-1].granulepos=_of->op[op_count].granulepos; } } _of->op_pos=0; _of->op_count=op_count; return total_duration; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, 0x8(%rsp) leaq 0xa8(%rdi), %rax movq %rax, 0x10(%rsp) movq %rdi, (%rsp) leaq 0x240(%rdi), %rbx xorl %r13d, %r13d xorl %ebp, %ebp movslq %r13d, %r14 imulq $0x30, %r14, %r15 leaq (%rbx,%r15), %r12 movq 0x10(%rsp), %rdi movq %r12, %rsi callq 0x3510 testl %eax, %eax je 0x5e57 js 0x5e5f movq (%rbx,%r15), %rdi movl 0x8(%rbx,%r15), %esi callq 0x5ea4 movq 0x8(%rsp), %rcx movl %eax, (%rcx,%r14,4) testl %eax, %eax jle 0x5e66 incl %r13d addl %eax, %ebp movb $0x1, %al jmp 0x5e59 xorl %eax, %eax testb %al, %al jne 0x5e15 jmp 0x5e81 xorl %eax, %eax pushq $-0x3 popq %rbp jmp 0x5e59 movb $0x1, %al testl %r13d, %r13d jle 0x5e59 movq 0x20(%r12), %rcx leal -0x1(%r13), %edx imulq $0x30, %rdx, %rdx movq %rcx, 0x20(%rbx,%rdx) jmp 0x5e59 movq (%rsp), %rax andl $0x0, 0x3210(%rax) movl %r13d, 0x3214(%rax) movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x5ea4
op_get_packet_duration
static int op_get_packet_duration(const unsigned char *_data,int _len){ int nframes; int frame_size; int nsamples; nframes=opus_packet_get_nb_frames(_data,_len); if(OP_UNLIKELY(nframes<0))return OP_EBADPACKET; frame_size=opus_packet_get_samples_per_frame(_data,48000); nsamples=nframes*frame_size; if(OP_UNLIKELY(nsamples>120*48))return OP_EBADPACKET; return nsamples; }
pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0x35d0 testl %eax, %eax js 0x5edc movl %eax, %ebp movq %rbx, %rdi movl $0xbb80, %esi # imm = 0xBB80 callq 0x3250 movl %eax, %ecx imull %ebp, %ecx cmpl $0x1681, %ecx # imm = 0x1681 movl $0xffffff78, %eax # imm = 0xFFFFFF78 cmovll %ecx, %eax addq $0x8, %rsp popq %rbx popq %rbp retq movl $0xffffff78, %eax # imm = 0xFFFFFF78 jmp 0x5ed5
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x5ee3
op_make_decode_ready
static int op_make_decode_ready(OggOpusFile *_of){ const OpusHead *head; int li; int stream_count; int coupled_count; int channel_count; if(_of->ready_state>OP_STREAMSET)return 0; if(OP_UNLIKELY(_of->ready_state<OP_STREAMSET))return OP_EFAULT; li=_of->seekable?_of->cur_link:0; head=&_of->links[li].head; stream_count=head->stream_count; coupled_count=head->coupled_count; channel_count=head->channel_count; /*Check to see if the current decoder is compatible with the current link.*/ if(_of->od!=NULL&&_of->od_stream_count==stream_count &&_of->od_coupled_count==coupled_count&&_of->od_channel_count==channel_count &&memcmp(_of->od_mapping,head->mapping, sizeof(*head->mapping)*channel_count)==0){ opus_multistream_decoder_ctl(_of->od,OPUS_RESET_STATE); } else{ int err; opus_multistream_decoder_destroy(_of->od); _of->od=opus_multistream_decoder_create(48000,channel_count, stream_count,coupled_count,head->mapping,&err); if(_of->od==NULL)return OP_EFAULT; _of->od_stream_count=stream_count; _of->od_coupled_count=coupled_count; _of->od_channel_count=channel_count; memcpy(_of->od_mapping,head->mapping,sizeof(*head->mapping)*channel_count); } _of->ready_state=OP_INITSET; _of->bytes_tracked=0; _of->samples_tracked=0; #if !defined(OP_FIXED_POINT) _of->state_channel_count=0; /*Use the serial number for the PRNG seed to get repeatable output for straight play-throughs.*/ _of->dither_seed=_of->links[li].serialno; #endif op_update_gain(_of); return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp xorl %ebp, %ebp cmpl $0x3, 0x78(%rdi) jg 0x6026 movl $0xffffff7f, %ebp # imm = 0xFFFFFF7F jne 0x6026 movq %rdi, %rbx cmpl $0x0, 0x28(%rdi) je 0x5f17 movslq 0x7c(%rbx), %rax jmp 0x5f19 xorl %eax, %eax movq 0x30(%rbx), %rcx imulq $0x178, %rax, %rax # imm = 0x178 movq %rax, 0x18(%rsp) leaq (%rcx,%rax), %r14 addq $0x34, %r14 movl 0x4(%r14), %r12d movl 0x18(%r14), %r13d movl 0x1c(%r14), %eax movl %eax, 0xc(%rsp) movslq %r12d, %rax movq %rax, 0x10(%rsp) movq 0x3218(%rbx), %r15 testq %r15, %r15 je 0x5f90 cmpl %r13d, 0x3230(%rbx) jne 0x5f90 movl 0xc(%rsp), %eax cmpl %eax, 0x3234(%rbx) jne 0x5f90 cmpl %r12d, 0x3238(%rbx) jne 0x5f90 leaq 0x323c(%rbx), %rdi leaq 0x20(%r14), %rsi movq 0x10(%rsp), %rdx callq 0x3330 testl %eax, %eax je 0x6037 movq %r15, %rdi callq 0x30e0 addq $0x20, %r14 leaq 0x24(%rsp), %r9 movl $0xbb80, %edi # imm = 0xBB80 movl %r12d, %esi movl %r13d, %edx movl 0xc(%rsp), %r15d movl %r15d, %ecx movq %r14, %r8 callq 0x3110 movq %rax, 0x3218(%rbx) testq %rax, %rax je 0x6026 movl %r13d, 0x3230(%rbx) movl %r15d, 0x3234(%rbx) movl %r12d, 0x3238(%rbx) leaq 0x323c(%rbx), %rdi movq %r14, %rsi movq 0x10(%rsp), %rdx callq 0x3260 movl $0x4, 0x78(%rbx) andl $0x0, 0x338c(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x98(%rbx) movq 0x30(%rbx), %rax movq 0x18(%rsp), %rcx movl 0x30(%rax,%rcx), %eax movl %eax, 0x3380(%rbx) movq %rbx, %rdi callq 0xd2e6 xorl %ebp, %ebp movl %ebp, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r15, %rdi movl $0xfbc, %esi # imm = 0xFBC xorl %eax, %eax callq 0x32f0 jmp 0x5ff1
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x6048
op_find_final_pcm_offset
static int op_find_final_pcm_offset(OggOpusFile *_of, const ogg_uint32_t *_serialnos,int _nserialnos,OggOpusLink *_link, opus_int64 _offset,ogg_uint32_t _end_serialno,ogg_int64_t _end_gp, ogg_int64_t *_total_duration){ ogg_int64_t total_duration; ogg_int64_t duration; ogg_uint32_t cur_serialno; /*For the time being, fetch end PCM offset the simple way.*/ cur_serialno=_link->serialno; if(_end_serialno!=cur_serialno||_end_gp==-1){ _offset=op_get_last_page(_of,&_end_gp,_offset, cur_serialno,_serialnos,_nserialnos); if(OP_UNLIKELY(_offset<0))return (int)_offset; } /*At worst we should have found the first page with completed packets.*/ if(OP_UNLIKELY(_offset<_link->data_offset))return OP_EBADLINK; /*This implementation requires that the difference between the first and last granule positions in each link be representable in a signed, 64-bit number, and that each link also have at least as many samples as the pre-skip requires.*/ if(OP_UNLIKELY(op_granpos_diff(&duration,_end_gp,_link->pcm_start)<0) ||OP_UNLIKELY(duration<_link->head.pre_skip)){ return OP_EBADTIMESTAMP; } /*We also require that the total duration be representable in a signed, 64-bit number.*/ duration-=_link->head.pre_skip; total_duration=*_total_duration; if(OP_UNLIKELY(OP_INT64_MAX-duration<total_duration))return OP_EBADTIMESTAMP; *_total_duration=total_duration+duration; _link->pcm_end=_end_gp; _link->end_offset=_offset; return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %r15 movq 0xb0(%rsp), %r10 movl 0x30(%rcx), %eax movl %eax, 0x34(%rsp) cmpl %r9d, %eax sete %al cmpq $-0x1, %r10 setne %sil testb %al, %sil jne 0x6276 movq %rdi, %r12 movq %rcx, 0x40(%rsp) testl %edx, %edx setg 0x3(%rsp) movl %edx, 0x30(%rsp) movl %edx, %eax movq %rax, 0x38(%rsp) leaq -0x1(%rax), %r14 pushq $-0x1 popq %rax movl $0x10000, %ecx # imm = 0x10000 leaq 0x58(%rsp), %r13 movq %r8, %rbp movq %r8, 0x48(%rsp) movq %r8, 0x28(%rsp) movq %rax, 0x18(%rsp) movl %ecx, 0x4(%rsp) movslq %ecx, %rax movq 0x28(%rsp), %rcx subq %rax, %rcx testq %rcx, %rcx movl $0x0, %esi movq %rcx, 0x50(%rsp) cmovgq %rcx, %rsi movq %r12, %rdi movq %rsi, 0x28(%rsp) callq 0xc182 testl %eax, %eax js 0x6229 movl $0x0, 0x14(%rsp) pushq $-0x1 popq %rax movq %rax, 0x8(%rsp) cmpq %rbp, 0x48(%r12) jge 0x61db movq %r12, %rdi movq %r13, %rbx movq %r13, %rsi movq %rbp, %rdx callq 0xdc8c movq %rax, %r13 cmpq $-0x1, %rax jl 0x61c1 je 0x6168 movq %rbx, %rdi callq 0x3290 cmpl 0x34(%rsp), %eax jne 0x6172 movq %rbx, %rdi callq 0x3550 cmpq $-0x1, %rax movq 0x18(%rsp), %rcx cmovneq %rax, %rcx movq %rcx, 0x18(%rsp) movq 0x8(%rsp), %rax cmovneq %r13, %rax movq %rax, 0x8(%rsp) xorl %ecx, %ecx movb $0x1, %al jmp 0x616d xorl %eax, %eax pushq $0x5 popq %rcx movq %rbx, %r13 jmp 0x61b7 movb 0x3(%rsp), %dl cmpl $0x0, 0x30(%rsp) movq %rbx, %r13 jle 0x61af cmpl %eax, (%r15) jne 0x618b xorl %ecx, %ecx movb $0x1, %al jmp 0x61b7 xorl %ecx, %ecx cmpq %rcx, %r14 je 0x61a2 leaq 0x1(%rcx), %rdx cmpl %eax, 0x4(%r15,%rcx,4) movq %rdx, %rcx jne 0x618d jmp 0x61a7 movq 0x38(%rsp), %rdx cmpq 0x38(%rsp), %rdx setb %dl xorl %ecx, %ecx movb $0x1, %al testb %dl, %dl je 0x61cd testl %ecx, %ecx je 0x6101 jmp 0x61d6 xorl %eax, %eax pushq $0x1 popq %rcx movq %r13, 0x20(%rsp) jmp 0x616d pushq $0x1 popq %rdx movl %edx, 0x14(%rsp) jmp 0x61b7 cmpl $0x5, %ecx jne 0x623a movl 0x4(%rsp), %ecx cmpq $0x0, 0x50(%rsp) jle 0x6216 cmpl $0x0, 0x14(%rsp) jne 0x6216 addl %ecx, %ecx movl $0x100000, %eax # imm = 0x100000 cmpl %eax, %ecx cmovgel %eax, %ecx movq 0x28(%rsp), %rax leaq 0xff1a(%rax), %rbp movq 0x48(%rsp), %rax cmpq %rax, %rbp cmovgeq %rax, %rbp movb $0x1, %al jmp 0x623e cmpq $0x0, 0x8(%rsp) jns 0x61ee movq $-0x89, 0x20(%rsp) jmp 0x6230 cltq movq %rax, 0x20(%rsp) xorl %eax, %eax pushq $-0x1 popq %rcx movq %rcx, 0x8(%rsp) movl 0x4(%rsp), %ecx testb %al, %al je 0x6252 movq 0x8(%rsp), %rax testq %rax, %rax js 0x60bc jmp 0x6264 movq 0xb0(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x20(%rsp), %rax testq %rax, %rax js 0x62cf movq 0x18(%rsp), %r10 movq %rax, %r8 movq 0x40(%rsp), %rcx cmpq 0x8(%rcx), %r8 jl 0x62e5 movq 0x28(%rcx), %rdx movq %rdx, %rax xorq %r10, %rax movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF js 0x62ec movq %r10, %rdi subq %rdx, %rdi xorl %esi, %esi testb %sil, %sil jne 0x62de movl 0x3c(%rcx), %edx subq %rdx, %rdi jl 0x62de movq 0xb8(%rsp), %rdx movq (%rdx), %rsi subq %rdi, %rax cmpq %rsi, %rax movl $0xffffff75, %eax # imm = 0xFFFFFF75 jl 0x62cf addq %rdi, %rsi movq %rsi, (%rdx) movq %r10, 0x20(%rcx) movq %r8, 0x10(%rcx) xorl %eax, %eax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffff75, %eax # imm = 0xFFFFFF75 jmp 0x62cf movl $0xffffff77, %eax # imm = 0xFFFFFF77 jmp 0x62cf testq %r10, %r10 js 0x6306 leaq (%r10,%rax), %rdi incq %rdi subq %rdx, %rdi jl 0x6324 leaq 0x1(%rax), %rdx xorq %rdx, %rdi jmp 0x6298 movq %rax, %rdi subq %rdx, %rdi pushq $-0x2 popq %rsi subq %r10, %rsi cmpq %rdi, %rsi setl %sil movq %r10, %rdi subq %rdx, %rdi jmp 0x629a movb $0x1, %sil jmp 0x629a
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x632c
op_decode
static int op_decode(OggOpusFile *_of,op_sample *_pcm, const ogg_packet *_op,int _nsamples,int _nchannels){ int ret; /*First we try using the application-provided decode callback.*/ if(_of->decode_cb!=NULL){ #if defined(OP_FIXED_POINT) ret=(*_of->decode_cb)(_of->decode_cb_ctx,_of->od,_pcm,_op, _nsamples,_nchannels,OP_DEC_FORMAT_SHORT,_of->cur_link); #else ret=(*_of->decode_cb)(_of->decode_cb_ctx,_of->od,_pcm,_op, _nsamples,_nchannels,OP_DEC_FORMAT_FLOAT,_of->cur_link); #endif } else ret=OP_DEC_USE_DEFAULT; /*If the application didn't want to handle decoding, do it ourselves.*/ if(ret==OP_DEC_USE_DEFAULT){ #if defined(OP_FIXED_POINT) ret=opus_multistream_decode(_of->od, _op->packet,_op->bytes,_pcm,_nsamples,0); #else ret=opus_multistream_decode_float(_of->od, _op->packet,_op->bytes,_pcm,_nsamples,0); #endif OP_ASSERT(ret<0||ret==_nsamples); } /*If the application returned a positive value other than 0 or OP_DEC_USE_DEFAULT, fail.*/ else if(OP_UNLIKELY(ret>0))return OP_EBADPACKET; if(OP_UNLIKELY(ret<0))return OP_EBADPACKET; return ret; }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movl %ecx, %ebx movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %r12 movq 0x3220(%rdi), %rax testq %rax, %rax je 0x637b movl %r8d, %r9d movq 0x3228(%r12), %rdi movq 0x3218(%r12), %rsi movl 0x7c(%r12), %r10d movq %r14, %rdx movq %r15, %rcx movl %ebx, %r8d pushq %r10 pushq $0x1b80 # imm = 0x1B80 callq *%rax addq $0x10, %rsp jmp 0x6380 movl $0x1a40, %eax # imm = 0x1A40 cmpl $0x1a40, %eax # imm = 0x1A40 jne 0x63a6 movq 0x3218(%r12), %rdi movq (%r15), %rsi movl 0x8(%r15), %edx movq %r14, %rcx movl %ebx, %r8d xorl %r9d, %r9d callq 0x31f0 jmp 0x63aa testl %eax, %eax jg 0x63c2 testl %eax, %eax movl $0xffffff78, %ecx # imm = 0xFFFFFF78 cmovnsl %eax, %ecx movl %ecx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movl $0xffffff78, %ecx # imm = 0xFFFFFF78 jmp 0x63b4
/xiph[P]opusfile/src/opusfile.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x649e
op_url_stream_create_impl
static void *op_url_stream_create_impl(OpusFileCallbacks *_cb,const char *_url, int _skip_certificate_check,const char *_proxy_host,unsigned _proxy_port, const char *_proxy_user,const char *_proxy_pass,OpusServerInfo *_info){ const char *path; /*Check to see if this is a valid file: URL.*/ path=op_parse_file_url(_url); if(path!=NULL){ char *unescaped_path; void *ret; unescaped_path=op_string_dup(path); if(OP_UNLIKELY(unescaped_path==NULL))return NULL; ret=op_fopen(_cb,op_unescape_url_component(unescaped_path),"rb"); _ogg_free(unescaped_path); return ret; } #if defined(OP_ENABLE_HTTP) /*If not, try http/https.*/ else{ OpusHTTPStream *stream; int ret; stream=(OpusHTTPStream *)_ogg_malloc(sizeof(*stream)); if(OP_UNLIKELY(stream==NULL))return NULL; op_http_stream_init(stream); ret=op_http_stream_open(stream,_url,_skip_certificate_check, _proxy_host,_proxy_port,_proxy_user,_proxy_pass,_info); if(OP_UNLIKELY(ret<0)){ op_http_stream_clear(stream); _ogg_free(stream); return NULL; } *_cb=*&OP_HTTP_CALLBACKS; return stream; } #else (void)_skip_certificate_check; (void)_proxy_host; (void)_proxy_port; (void)_proxy_user; (void)_proxy_pass; (void)_info; return NULL; #endif }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x118, %rsp # imm = 0x118 movq %r9, 0x58(%rsp) movl %r8d, %ebp movq %rcx, 0x38(%rsp) movl %edx, 0x50(%rsp) movq %rsi, %r13 movq %rdi, %r12 leaq 0xa403(%rip), %rsi # 0x108d0 movq %r13, %rdi callq 0x3160 xorl %edi, %edi cmpq $0x4, %rax movq %r13, 0x20(%rsp) jne 0x6509 movq %rax, %r14 cmpb $0x3a, (%r13,%rax) jne 0x6509 leaq 0xa41e(%rip), %rsi # 0x10912 pushq $0x4 popq %rdx movq %r13, %rdi callq 0xadac testl %eax, %eax je 0x74bc xorl %edi, %edi testq %rdi, %rdi jne 0x7484 movl $0x298, %edi # imm = 0x298 callq 0x3460 testq %rax, %rax je 0x7525 movq %rax, %rbx movq %r12, 0xd0(%rsp) movq %rax, %r13 leaq 0x198(%rax), %rcx addq $0x28, %rax xorl %edx, %edx xorps %xmm0, %xmm0 leaq (%rbx,%rdx), %rsi orq $-0x1, 0x10(%r13,%rdx) movups %xmm0, 0x20(%r13,%rdx) orl $-0x1, 0x50(%r13,%rdx) movq %rsi, (%rcx) leaq (%rax,%rdx), %rcx addq $0x60, %rdx cmpq $0x180, %rdx # imm = 0x180 jne 0x6543 xorps %xmm0, %xmm0 movups %xmm0, 0x1c0(%r13) movups %xmm0, 0x1b0(%r13) movups %xmm0, 0x1a0(%r13) andq $0x0, 0x270(%r13) andl $0x0, 0x280(%r13) leaq 0x1a0(%rbx), %rdi andq $0x0, 0x190(%r13) movups %xmm0, 0x180(%r13) movups %xmm0, 0x230(%r13) movups %xmm0, 0x240(%r13) movups %xmm0, 0x250(%r13) movq %rdi, 0x60(%rsp) movq 0x20(%rsp), %rsi callq 0x7669 testl %eax, %eax js 0x7515 cmpq $0x0, 0x38(%rsp) je 0x6605 cmpl $0xffff, %ebp # imm = 0xFFFF ja 0x7515 movq 0x38(%rsp), %rdi callq 0x75c4 movq %rax, 0x270(%r13) jmp 0x661a movq 0x1b8(%r13), %rax movq %rax, 0x270(%r13) movl 0x1c8(%r13), %ebp leaq 0x180(%rbx), %rax movq %rax, 0xd8(%rsp) leaq 0x230(%rbx), %r14 movl %ebp, 0x278(%r13) leaq 0x240(%rbx), %rax movq %rax, 0xc8(%rsp) cmpq $0x0, 0x58(%rsp) setne %al cmpq $0x0, 0x150(%rsp) setne %cl andb %al, %cl movb %cl, 0xf(%rsp) leaq 0x250(%rbx), %rax movq %rax, 0xe0(%rsp) leaq 0x1d0(%rbx), %rax movq %rax, 0xb0(%rsp) addq $0x190, %rbx # imm = 0x190 pushq $0x1 popq %r15 movq $0x0, 0x48(%rsp) xorl %ecx, %ecx movq 0x60(%rsp), %rax movq (%rax), %rax cmpb $0x73, 0x4(%rax) movl %ecx, 0x68(%rsp) jne 0x6736 movq 0xd8(%rsp), %rax cmpq $0x0, (%rax) jne 0x6736 xorl %r15d, %r15d xorl %edi, %edi xorl %esi, %esi callq 0x32a0 testl %eax, %eax je 0x6721 callq 0x31c0 movq %rax, %rdi callq 0x34b0 testq %rax, %rax je 0x671e movq %rax, %r15 movl 0x50(%rsp), %eax testl %eax, %eax jne 0x66ff movq %r15, %rdi callq 0x3390 movq %r15, %rdi pushq $0x1 popq %rsi xorl %edx, %edx callq 0x30c0 movl 0x50(%rsp), %eax movq %r15, 0x180(%r13) movl %eax, 0x288(%r13) cmpq $0x0, 0x38(%rsp) jne 0x727a movb $0x1, %r15b jmp 0x6729 xorl %r15d, %r15d movl $0xffffff7f, 0x8(%rsp) # imm = 0xFFFFFF7F testb %r15b, %r15b pushq $0x1 popq %r15 je 0x7147 movq %r13, %rdi movq %r13, %rsi movq 0x48(%rsp), %rdx leaq 0x108(%rsp), %rcx callq 0xe839 testl %eax, %eax js 0x73f7 andl $0x0, 0x238(%r13) movq %r14, %rdi leaq 0xa2b9(%rip), %rsi # 0x10a21 pushq $0x4 popq %rdx callq 0x7b66 movl %eax, %r15d movq 0x20(%rsp), %rsi cmpq $0x0, 0x38(%rsp) jne 0x6787 movq 0x1c0(%r13), %rsi movq %r14, %rdi callq 0x7bd1 movl %eax, %r12d orl %r15d, %r12d movq %r14, %rdi leaq 0xa287(%rip), %rsi # 0x10a26 pushq $0xb popq %rdx callq 0x7b66 movl %eax, %r15d movslq 0x238(%r13), %rax movq %rax, 0x30(%rsp) movq %r14, %rdi leaq 0xa217(%rip), %rsi # 0x109d7 pushq $0x6 popq %rdx callq 0x7b66 movl %eax, %ebp orl %r15d, %ebp orl %r12d, %ebp movq 0x1b8(%r13), %rsi movq %r14, %rdi callq 0x7bd1 movl %eax, %r15d orl %ebp, %r15d movq 0x1a0(%r13), %rax cmpb $0x73, 0x4(%rax) movl 0x1c8(%r13), %eax jne 0x6802 cmpl $0x1bb, %eax # imm = 0x1BB jne 0x6807 jmp 0x6832 cmpl $0x50, %eax je 0x6832 movl 0x1c8(%r13), %edx leaq 0x70(%rsp), %r12 movq %r12, %rdi leaq 0xa36e(%rip), %rsi # 0x10b8b xorl %eax, %eax callq 0x30a0 movq %r14, %rdi movq %r12, %rsi callq 0x7bd1 orl %eax, %r15d movq %r14, %rdi leaq 0xa4be(%rip), %rsi # 0x10cfa pushq $0x2 popq %rdx callq 0x7b66 movl %eax, %ebp movq %r14, %rdi leaq 0xa18e(%rip), %rsi # 0x109de pushq $0xf popq %rdx callq 0x7b66 movl %eax, %r12d orl %ebp, %r12d orl %r15d, %r12d cmpq $0x0, 0x38(%rsp) je 0x68a9 cmpq $0x0, 0x150(%rsp) je 0x68a9 cmpq $0x0, 0x58(%rsp) je 0x68a9 movq 0x60(%rsp), %rax movq (%rax), %rax cmpb $0x73, 0x4(%rax) je 0x68a9 movq %r14, %rdi leaq 0xa15a(%rip), %rsi # 0x109ee movq 0x58(%rsp), %rdx movq 0x150(%rsp), %rcx callq 0x7c0c orl %eax, %r12d movq 0x1a8(%r13), %rdx testq %rdx, %rdx je 0x68d3 movq 0x1b0(%r13), %rcx testq %rcx, %rcx je 0x68d3 movq %r14, %rdi leaq 0xa129(%rip), %rsi # 0x109f4 callq 0x7c0c orl %eax, %r12d movq %r14, %rdi leaq 0xa155(%rip), %rsi # 0x10a32 pushq $0xc popq %rdx callq 0x7b66 movl %eax, %ebp movq %r14, %rdi leaq 0xa14e(%rip), %rsi # 0x10a3f pushq $0x11 popq %rdx callq 0x7b66 movl %eax, %r15d orl %ebp, %r15d orl %r12d, %r15d movl 0x238(%r13), %eax addl $-0x4, %eax movl %eax, 0x28c(%r13) movq %r14, %rdi leaq 0xa3dd(%rip), %rsi # 0x10cfa pushq $0x2 popq %rdx callq 0x7b66 orl %r15d, %eax js 0x73f3 movq 0x230(%r13), %rsi movl 0x238(%r13), %edx movq %r13, %rdi callq 0xf05c testl %eax, %eax movq 0xe0(%rsp), %r15 js 0x73fc movq %r13, %rdi movq %r15, %rsi callq 0x7ea1 testl %eax, %eax js 0x73f3 leaq 0xf8(%rsp), %rdi callq 0xf181 movq (%r15), %rdx leaq 0x6c(%rsp), %rdi leaq 0xf0(%rsp), %rsi callq 0x8126 movq %rax, 0xc0(%rsp) testq %rax, %rax je 0x73fc movq 0xf0(%rsp), %rbp movzbl (%rbp), %eax cmpl $0x33, %eax pushq $0x1 popq %r15 je 0x6f43 cmpl $0x32, %eax jne 0x7400 cmpb $0x30, 0x1(%rbp) movl %r15d, %ecx pushq $-0x1 popq %rdx jne 0x7271 orq $-0x1, 0x18(%rsp) movl $0x0, 0x54(%rsp) pushq $-0x1 popq %rax movq %rax, 0x28(%rsp) movl $0x0, 0x44(%rsp) leaq 0xe8(%rsp), %rdi leaq 0x10(%rsp), %rsi leaq 0xc0(%rsp), %rdx callq 0x8259 testl %eax, %eax js 0x6e85 movq 0xe8(%rsp), %r12 testq %r12, %r12 je 0x6bd8 movq %r12, %rdi leaq 0xa02a(%rip), %rsi # 0x10a51 callq 0x3470 testl %eax, %eax je 0x6be0 movq %r12, %rdi leaq 0xa022(%rip), %rsi # 0x10a60 callq 0x3470 testl %eax, %eax je 0x6c46 movq %r12, %rdi leaq 0xa019(%rip), %rsi # 0x10a6e callq 0x3470 testl %eax, %eax je 0x6deb movq %r12, %rdi leaq 0xa00d(%rip), %rsi # 0x10a79 callq 0x3470 testl %eax, %eax je 0x6ccb cmpq $0x0, 0x158(%rsp) je 0x6e01 movq %r12, %rdi leaq 0x9fee(%rip), %rsi # 0x10a80 callq 0x3470 testl %eax, %eax je 0x6dc4 cmpb $0x69, (%r12) jne 0x6e01 cmpb $0x63, 0x1(%r12) jne 0x6e01 movzbl 0x2(%r12), %eax cmpl $0x79, %eax je 0x6aca cmpl $0x65, %eax jne 0x6e01 cmpb $0x2d, 0x3(%r12) jne 0x6e01 leaq 0x4(%r12), %r15 movq %r15, %rdi leaq 0x9fa8(%rip), %rsi # 0x10a8d callq 0x3470 testl %eax, %eax je 0x6e18 movq %r15, %rdi leaq 0x9f96(%rip), %rsi # 0x10a92 callq 0x3470 testl %eax, %eax je 0x6e41 movq %r15, %rdi leaq 0x9f8b(%rip), %rsi # 0x10a9e callq 0x3470 testl %eax, %eax je 0x6e68 movq %r15, %rdi leaq 0x9f7a(%rip), %rsi # 0x10aa4 callq 0x3470 testl %eax, %eax je 0x6ee2 movq %r12, %rdi leaq 0x9f67(%rip), %rsi # 0x10aa8 callq 0x3470 testl %eax, %eax pushq $0x1 popq %r15 je 0x6e90 movq %r12, %rdi leaq 0x9f53(%rip), %rsi # 0x10aaf callq 0x3470 testl %eax, %eax je 0x6e90 movq %r12, %rdi leaq 0x9f48(%rip), %rsi # 0x10abb callq 0x3470 testl %eax, %eax je 0x6b93 movq %r12, %rdi leaq 0x9f3d(%rip), %rsi # 0x10ac3 callq 0x3470 testl %eax, %eax jne 0x6e01 movq 0x158(%rsp), %rax cmpl $0x0, 0x34(%rax) jns 0x6e01 movq 0x10(%rsp), %rcx movzbl (%rcx), %eax movl %eax, %edx andb $-0x2, %dl cmpb $0x30, %dl jne 0x6e01 cmpb $0x0, 0x1(%rcx) jne 0x6e01 addl $-0x30, %eax movq 0x158(%rsp), %rcx movl %eax, 0x34(%rcx) jmp 0x6e01 pushq $0x5 popq %rcx jmp 0x6e0b cmpq $0x0, 0x28(%rsp) jns 0x6e85 movq 0x10(%rsp), %rsi leaq 0x70(%rsp), %rdi callq 0x87e5 movq 0x70(%rsp), %rcx xorl %edx, %edx cmpb (%rcx), %dl movl $0x0, %ecx sbbq %rcx, %rcx orq %rax, %rcx movq %rcx, 0x28(%rsp) js 0x6f14 movq 0x18(%rsp), %rdx testq %rdx, %rdx js 0x6e01 movl 0x8(%rsp), %eax movl %r15d, %ecx pushq $-0x1 popq %rsi movl %esi, 0x8(%rsp) cmpq %rdx, 0x28(%rsp) je 0x6e05 jmp 0x6e0b cmpq $0x0, 0x18(%rsp) jns 0x6cc1 movq 0x10(%rsp), %rcx leaq 0x70(%rsp), %rdi leaq 0xb8(%rsp), %rsi leaq 0x18(%rsp), %rdx callq 0x83e1 testl %eax, %eax js 0x6f21 cmpb $0x36, 0x2(%rbp) jne 0x6c94 xorl %edx, %edx cmpq $0x0, 0x70(%rsp) js 0x6cc3 cmpq $0x0, 0xb8(%rsp) pushq $-0x1 popq %rax js 0x6db7 movq 0x18(%rsp), %rcx movq 0xb8(%rsp), %rax testq %rcx, %rcx js 0x6d89 testq %rax, %rax sets %dl decq %rcx cmpq %rcx, %rax sete %al orb %dl, %al jne 0x6d96 xorl %edx, %edx pushq $-0x1 popq %rax jmp 0x6db7 movl 0x6c(%rsp), %eax movl %eax, 0x54(%rsp) testl %eax, %eax je 0x6d51 movq 0x10(%rsp), %rax movq %rax, 0xa8(%rsp) movb (%rax), %al addb $-0x45, %al cmpb $0x12, %al ja 0x6d4b movq 0xa8(%rsp), %rdi leaq 0x9f28(%rip), %rsi # 0x10c23 pushq $0xa popq %rdx callq 0x31a0 pushq $0x1 popq %rcx testl %eax, %eax je 0x6d4d pushq $-0x1 popq %r15 cmpq $0xa, %r15 je 0x6d4b leaq 0xe015(%rip), %rax # 0x14d30 movq 0x10(%rax,%r15,8), %r12 movq %r12, %rdi callq 0x3170 movq 0xa8(%rsp), %rdi movq %r12, %rsi movq %rax, %rdx callq 0x31a0 incq %r15 testl %eax, %eax jne 0x6d0e pushq $0x1 popq %rcx cmpq $0xb, %r15 jb 0x6d4d xorl %ecx, %ecx orl %ecx, 0x44(%rsp) movq 0x158(%rsp), %rax testq %rax, %rax je 0x6e7b cmpq $0x0, 0x20(%rax) pushq $0x1 popq %r15 jne 0x6e01 movq 0x10(%rsp), %rdi callq 0x75c4 movq 0x158(%rsp), %rcx movq %rax, 0x20(%rcx) jmp 0x6e01 testq %rax, %rax js 0x6d96 incq %rax movq %rax, 0x18(%rsp) movq 0x28(%rsp), %rcx testq %rcx, %rcx sets %al cmpq 0x18(%rsp), %rcx sete %dl orb %al, %dl pushq $-0x1 popq %rax movl 0x8(%rsp), %ecx cmovel %eax, %ecx movl %ecx, %eax movl %r15d, %ecx movl %eax, 0x8(%rsp) testb %dl, %dl jne 0x6e05 jmp 0x6e0b movq 0x158(%rsp), %rax cmpq $0x0, 0x28(%rax) jne 0x6e01 movq 0x10(%rsp), %rdi callq 0x75c4 movq 0x158(%rsp), %rcx movq %rax, 0x28(%rcx) jmp 0x6e01 movq 0x10(%rsp), %rdi callq 0x8541 testl %eax, %eax js 0x6e85 orl %eax, 0x44(%rsp) movl 0x8(%rsp), %eax xorl %ecx, %ecx movl %eax, 0x8(%rsp) testl %ecx, %ecx jne 0x6fe4 jmp 0x69ea movq 0x158(%rsp), %rax cmpq $0x0, (%rax) pushq $0x1 popq %r15 jne 0x6e01 movq 0x10(%rsp), %rdi callq 0x75c4 movq 0x158(%rsp), %rcx movq %rax, (%rcx) jmp 0x6e01 movq 0x158(%rsp), %rax cmpq $0x0, 0x8(%rax) jne 0x6e7b movq 0x10(%rsp), %rdi callq 0x75c4 movq 0x158(%rsp), %rcx movq %rax, 0x8(%rcx) jmp 0x6e7b movq 0x158(%rsp), %rax cmpq $0x0, 0x10(%rax) je 0x6f28 movl 0x8(%rsp), %eax pushq $0x1 popq %r15 jmp 0x6e05 movl %r15d, %ecx pushq $-0x1 popq %rax jmp 0x6e07 movq 0x158(%rsp), %rax cmpl $0x0, 0x30(%rax) jns 0x6e01 movq 0x10(%rsp), %rsi leaq 0x70(%rsp), %rdi callq 0x87e5 movq 0x70(%rsp), %rcx xorl %edx, %edx cmpb (%rcx), %dl movl $0x0, %ecx sbbq %rcx, %rcx orq %rax, %rcx cmpq $0x7fffffff, %rcx # imm = 0x7FFFFFFF ja 0x6e01 movq 0x158(%rsp), %rax movl %ecx, 0x30(%rax) jmp 0x6e01 movq 0x158(%rsp), %rax cmpq $0x0, 0x18(%rax) pushq $0x1 popq %r15 jne 0x6e01 movq 0x10(%rsp), %rdi callq 0x75c4 movq 0x158(%rsp), %rcx movq %rax, 0x18(%rcx) jmp 0x6e01 movl %r15d, %ecx movq 0x28(%rsp), %rax jmp 0x6e07 xorl %edx, %edx jmp 0x6db7 movq 0x10(%rsp), %rdi callq 0x75c4 movq 0x158(%rsp), %rcx movq %rax, 0x10(%rcx) jmp 0x6e7b cmpb $0x30, 0x1(%rbp) jne 0x7400 movzbl 0x2(%rbp), %eax cmpq $0x38, %rax ja 0x7400 movabsq $0x187000000000000, %rcx # imm = 0x187000000000000 btq %rax, %rcx jae 0x7135 movq $0x0, 0x20(%rsp) leaq 0x70(%rsp), %rdi leaq 0x18(%rsp), %rsi leaq 0xc0(%rsp), %rdx callq 0x8259 testl %eax, %eax js 0x6fd8 movq 0x70(%rsp), %rdi testq %rdi, %rdi je 0x6fcf leaq 0x9b2a(%rip), %rsi # 0x10ace callq 0x3470 movq 0x20(%rsp), %rdx movq %rdx, %rcx testq %rdx, %rdx jne 0x6fbb movq 0x18(%rsp), %rcx testl %eax, %eax movq 0x20(%rsp), %rax cmoveq %rcx, %rax movq %rax, 0x20(%rsp) xorl %ecx, %ecx jmp 0x6fd2 pushq $0x9 popq %rcx testl %ecx, %ecx jne 0x7020 jmp 0x6f78 movl %r15d, %ecx pushq $-0x1 popq %rax movl %eax, 0x8(%rsp) jmp 0x6fd2 cmpl $0x5, %ecx jne 0x712c movzbl 0x2(%rbp), %eax addl $-0x30, %eax movl %r15d, %ecx pushq $-0x1 popq %rdx cmpl $0x6, %eax ja 0x7271 leaq 0x984e(%rip), %rcx # 0x10858 movslq (%rcx,%rax,4), %rax addq %rcx, %rax movl %r15d, %ecx jmpq *%rax movq 0x28(%rsp), %rdx jmp 0x7188 cmpl $0x9, %ecx jne 0x740a movq 0x20(%rsp), %rsi testq %rsi, %rsi je 0x7433 leaq 0x70(%rsp), %rdi callq 0x7669 testl %eax, %eax js 0x73f7 cmpq $0x0, 0x38(%rsp) je 0x705b cmpq $0x0, 0x188(%r13) je 0x70a4 movq 0x1b8(%r13), %rdi movq 0x88(%rsp), %rsi callq 0x3470 testl %eax, %eax jne 0x708b movl 0x1c8(%r13), %ecx movq 0xb0(%rsp), %rax cmpl 0x98(%rsp), %ecx je 0x70a9 movq 0x188(%r13), %rdi testq %rdi, %rdi je 0x70a4 callq 0x3650 andq $0x0, 0x188(%r13) movq 0x48(%rsp), %rax movq 0xb0(%rsp), %rcx movq %rcx, 0x48(%rsp) cmpq $0x0, 0x38(%rsp) jne 0x70e0 movq 0x88(%rsp), %rcx movq %rcx, 0x270(%r13) movl 0x98(%rsp), %ecx movl %ecx, 0x278(%r13) movq %rax, 0x48(%rsp) movq 0x60(%rsp), %r15 movq %r15, %rdi callq 0xf1b4 movups 0x70(%rsp), %xmm0 movups 0x80(%rsp), %xmm1 movups 0x90(%rsp), %xmm2 movups %xmm2, 0x20(%r15) movups %xmm1, 0x10(%r15) movups %xmm0, (%r15) movq %r13, %rdi movq %r13, %rsi movq %rbx, %rdx pushq $0x1 popq %r15 movl %r15d, %ecx callq 0xf1e5 xorl %ecx, %ecx jmp 0x740a movl 0x8(%rsp), %edx jmp 0x7271 movl $0xffffff7e, 0x8(%rsp) # imm = 0xFFFFFF7E cmpq $0x35, %rax jne 0x7400 movl %r15d, %ecx jmp 0x740a movq 0x18(%rsp), %rsi movl %r15d, %ecx testq %rsi, %rsi js 0x7271 movl $0x1, 0x280(%r13) movq %rsi, %rdx jmp 0x7188 movq 0x28(%rsp), %rdx testq %rdx, %rdx js 0x7188 movl %r15d, %ecx pushq $-0x1 popq %rdx jne 0x7271 xorl %edx, %edx movq %rdx, 0x260(%r13) cmpl $0x0, 0x54(%rsp) setne %al cmpl $0x0, 0x44(%rsp) sete %cl andb %al, %cl movzbl %cl, %eax movl %eax, 0x284(%r13) cmpb $0x1, %al jne 0x71bc movq (%r14), %rax movq 0x30(%rsp), %rcx movb $0x31, -0x3(%rax,%rcx) andq $0x0, (%r13) cmpl $0x1, 0x280(%r13) movl $0x0, %eax sbbq %rax, %rax orq %rdx, %rax movq %rax, 0x8(%r13) orl $-0x1, 0x58(%r13) andl $0x0, 0x27c(%r13) movq 0xf8(%rsp), %rcx subq 0x108(%rsp), %rcx cmpq $0x20c49a, %rcx # imm = 0x20C49A movq 0x158(%rsp), %rsi jg 0x741f cmpq $-0x20c49a, %rcx # imm = 0xFFDF3B66 jl 0x7429 movabsq $0x3e800000000, %rax # imm = 0x3E800000000 imulq %rax, %rcx shrq $0x20, %rcx movq 0x100(%rsp), %rax subq 0x110(%rsp), %rax cqto movl $0xf4240, %edi # imm = 0xF4240 idivq %rdi addl %ecx, %eax cmpl $0x2, %eax cmovll %r15d, %eax xorl %edx, %edx movl %eax, 0x290(%r13) testq %rsi, %rsi je 0x726e movq 0x60(%rsp), %rax movq (%rax), %rax xorl %ecx, %ecx cmpb $0x73, 0x4(%rax) sete %cl movl %ecx, 0x38(%rsi) movl %r15d, %ecx movl %edx, 0x8(%rsp) jmp 0x740a andl $0x0, 0x248(%r13) movq 0xc8(%rsp), %rbp movq %rbp, %rdi leaq 0x972e(%rip), %rsi # 0x109c2 pushq $0x8 popq %rdx callq 0x7b66 movl %eax, %r12d movq 0x1b8(%r13), %rsi movq %rbp, %rdi callq 0x7bd1 movl %eax, 0x30(%rsp) movl 0x1c8(%r13), %edx leaq 0x70(%rsp), %r15 movq %r15, %rdi leaq 0x98c3(%rip), %rsi # 0x10b8b xorl %eax, %eax callq 0x30a0 movq %rbp, %rdi movq %r15, %rsi callq 0x7bd1 movl %eax, %r15d orl %r12d, %r15d movq %rbp, %rdi leaq 0x96e1(%rip), %rsi # 0x109cb pushq $0xb popq %rdx callq 0x7b66 movl %eax, %r12d orl %r15d, %r12d movq %rbp, %rdi leaq 0x96d5(%rip), %rsi # 0x109d7 pushq $0x6 popq %rdx callq 0x7b66 movl %eax, %r15d orl %r12d, %r15d orl 0x30(%rsp), %r15d movq 0x1b8(%r13), %rsi movq %rbp, %rdi callq 0x7bd1 movl %eax, 0x30(%rsp) movl 0x1c8(%r13), %edx leaq 0x70(%rsp), %r12 movq %r12, %rdi leaq 0x984d(%rip), %rsi # 0x10b8b xorl %eax, %eax callq 0x30a0 movq %rbp, %rdi movq %r12, %rsi callq 0x7bd1 movl %eax, %r12d orl 0x30(%rsp), %r12d orl %r15d, %r12d movq %rbp, %rdi leaq 0x9995(%rip), %rsi # 0x10cfa pushq $0x2 popq %rdx callq 0x7b66 movl %eax, 0x30(%rsp) movq %rbp, %rdi leaq 0x9663(%rip), %rsi # 0x109de pushq $0xf popq %rdx callq 0x7b66 movl %eax, %r15d orl 0x30(%rsp), %r15d orl %r12d, %r15d cmpb $0x0, 0xf(%rsp) je 0x73b4 movq %rbp, %rdi leaq 0x964f(%rip), %rsi # 0x109ee movq 0x58(%rsp), %rdx movq 0x150(%rsp), %rcx callq 0x7c0c orl %eax, %r15d movq %rbp, %rdi leaq 0x9644(%rip), %rsi # 0x10a02 pushq $0x1e popq %rdx callq 0x7b66 movl %eax, %r12d orl %r15d, %r12d movq %rbp, %rdi leaq 0x9924(%rip), %rsi # 0x10cfa pushq $0x2 popq %rdx callq 0x7b66 orl %r12d, %eax jns 0x6719 xorl %r15d, %r15d movl %eax, 0x8(%rsp) jmp 0x6729 pushq $0x1 popq %r15 movl %r15d, %ecx jmp 0x7406 pushq $0x1 popq %r15 movl %r15d, %ecx pushq $-0x1 popq %rax movl %eax, 0x8(%rsp) testl %ecx, %ecx movl 0x68(%rsp), %ecx jne 0x7441 incl %ecx cmpl $0x14, %ecx jne 0x6695 jmp 0x7447 movl $0x7fffffff, %eax # imm = 0x7FFFFFFF jmp 0x7245 movl $0x80000000, %eax # imm = 0x80000000 jmp 0x7245 movl %r15d, %ecx movq $0x0, 0x20(%rsp) jmp 0x7403 movl 0x8(%rsp), %eax jmp 0x744a pushq $-0x1 popq %rax testl %eax, %eax js 0x7515 movups 0xd8c7(%rip), %xmm0 # 0x14d20 movq 0xd0(%rsp), %rax movups %xmm0, 0x10(%rax) movups 0xd8a4(%rip), %xmm0 # 0x14d10 movups %xmm0, (%rax) movq %r13, %rax addq $0x118, %rsp # imm = 0x118 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x75c4 testq %rax, %rax je 0x7525 movq %rax, %rbx movq %rax, %rdi callq 0xe72b leaq 0x8b79(%rip), %rdx # 0x1001d movq %r12, %rdi movq %rbx, %rsi callq 0xdf4c movq %rax, %r13 movq %rbx, %rdi callq 0x33f0 jmp 0x746f addq %r13, %r14 leaq 0x1(%r14), %rbx movq %rbx, %rdi callq 0x760d testl %eax, %eax js 0x6507 cmpb $0x2f, (%rbx) jne 0x74f7 cmpb $0x2f, 0x2(%r14) jne 0x74f7 leaq 0x3(%r14), %r15 movb $0x1, %al cmpb $0x2f, 0x3(%r14) jne 0x752d movq %r15, %rbx testb %al, %al je 0x6507 leaq 0x9472(%rip), %rsi # 0x10970 movq %rbx, %rdi callq 0x3160 xorl %edi, %edi cmpb $0x0, (%rbx,%rax) cmoveq %rbx, %rdi jmp 0x6509 movq %r13, %rdi callq 0xe795 movq %r13, %rdi callq 0x33f0 xorl %r13d, %r13d jmp 0x746f movq %r12, %r13 leaq 0x93e0(%rip), %rsi # 0x10917 movq %r15, %rdi callq 0x3160 leaq (%r15,%rax), %rbx cmpq $0x1b, %rax jg 0x75ba movq %rax, %r14 cmpb $0x2f, (%r15,%rax) jne 0x75ba leaq 0x70(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x3260 movb $0x0, 0x70(%rsp,%r14) movq %r12, %rdi callq 0xe72b movb (%r12), %cl testb %cl, %cl je 0x759f leaq 0x71(%rsp), %rax leal -0x41(%rcx), %edx movzbl %cl, %esi orb $0x20, %cl cmpb $0x1a, %dl movzbl %cl, %ecx cmovael %esi, %ecx movb %cl, -0x1(%rax) movb (%rax), %cl incq %rax testb %cl, %cl jne 0x7581 leaq 0x93c0(%rip), %rsi # 0x10966 leaq 0x70(%rsp), %rdi pushq $0xa popq %rdx callq 0x3330 testl %eax, %eax sete %al jmp 0x75bc xorl %eax, %eax movq %r13, %r12 jmp 0x74ef
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x75c4
op_string_dup
static char *op_string_dup(const char *_s){ return op_string_range_dup(_s,_s+strlen(_s)); }
pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r14 callq 0x3170 cmpq $0x7ffffffe, %rax # imm = 0x7FFFFFFE ja 0x7609 movq %rax, %r15 leaq 0x1(%rax), %rdi callq 0x3460 movq %rax, %rbx testq %rax, %rax je 0x7600 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x3260 movb $0x0, (%rbx,%r15) movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq xorl %ebx, %ebx jmp 0x7600
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x760d
op_validate_url_escapes
static int op_validate_url_escapes(const char *_s){ int i; for(i=0;_s[i];i++){ if(_s[i]=='%'){ if(OP_UNLIKELY(!isxdigit(_s[i+1])) ||OP_UNLIKELY(!isxdigit(_s[i+2])) /*RFC 3986 says %00 "should be rejected if the application is not expecting to receive raw data within a component."*/ ||OP_UNLIKELY(_s[i+1]=='0'&&_s[i+2]=='0')){ return OP_FALSE; } i+=2; } } return 0; }
pushq %rbp pushq %r14 pushq %rbx movq %rdi, %rbx xorl %ecx, %ecx pushq $-0x1 popq %rbp movslq %ecx, %r14 movzbl (%rbx,%r14), %eax cmpl $0x25, %eax je 0x762c testl %eax, %eax jne 0x765e jmp 0x7664 callq 0x3370 movq (%rax), %rdx movsbq 0x1(%rbx,%r14), %rax testb $0x10, 0x1(%rdx,%rax,2) je 0x7662 movsbq 0x2(%rbx,%r14), %rcx testb $0x10, 0x1(%rdx,%rcx,2) je 0x7662 xorb $0x30, %al xorb $0x30, %cl orb %al, %cl je 0x7662 addq $0x2, %r14 movl %r14d, %ecx incl %ecx jmp 0x7619 movl %ebp, %eax popq %rbx popq %r14 popq %rbp retq
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x7669
op_parse_url
static int op_parse_url(OpusParsedURL *_dst,const char *_src){ OpusParsedURL url; int ret; op_parsed_url_init(&url); ret=op_parse_url_impl(&url,_src); if(OP_UNLIKELY(ret<0))op_parsed_url_clear(&url); else *_dst=*&url; return ret; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %rbx movq %rdi, %r14 xorps %xmm0, %xmm0 movaps %xmm0, 0x60(%rsp) movaps %xmm0, 0x50(%rsp) movaps %xmm0, 0x40(%rsp) leaq 0x923a(%rip), %rsi # 0x108d0 movq %rbx, %rdi callq 0x3160 cmpb $0x3a, (%rbx,%rax) movb $0x1, %r15b jne 0x7b1d movq %rax, %r12 addq $-0x6, %rax cmpq $-0x2, %rax jb 0x7b1d leaq 0x9414(%rip), %rsi # 0x10ad7 movq %rbx, %rdi movl %r12d, %edx callq 0xadac testl %eax, %eax jne 0x7b1d movq %rbx, 0x30(%rsp) leaq (%rbx,%r12), %rbp cmpb $0x2f, 0x1(%rbp) jne 0x7ad9 cmpb $0x2f, 0x2(%rbp) jne 0x7ad9 addq $0x3, %rbp movq %rbp, %rdi callq 0x760d testl %eax, %eax js 0x7ad9 leaq 0x93cf(%rip), %rsi # 0x10add movq %rbp, %rdi callq 0x3160 leaq (%rax,%rbp), %rbx xorl %ecx, %ecx cmpb $0x40, (%rbp,%rax) movq %rbx, 0x18(%rsp) jne 0x775a leaq 0x91e8(%rip), %rsi # 0x10917 movq %rbp, %rdi callq 0x3160 xorl %edx, %edx leaq (%rax,%rbp), %rcx incq %rcx cmpb $0x3a, -0x1(%rcx) cmoveq %rcx, %rdx movq %rdx, 0x20(%rsp) leaq (%rax,%rbp), %r13 movq %rbp, %rcx leaq 0x1(%rbx), %rbp jmp 0x7766 xorl %r13d, %r13d movq $0x0, 0x20(%rsp) movq %rcx, 0x38(%rsp) cmpb $0x5b, (%rbp) movq %r14, 0x8(%rsp) jne 0x77a7 leaq 0x1(%rbp), %rdi leaq 0x935c(%rip), %rsi # 0x10add movq %rdi, 0x10(%rsp) callq 0x3160 cmpb $0x5d, 0x1(%rbp,%rax) jne 0x7ad9 leaq (%rax,%rbp), %rbx incq %rbx leaq (%rax,%rbp), %r15 addq $0x2, %r15 jmp 0x77c4 leaq 0x9169(%rip), %rsi # 0x10917 movq %rbp, %rdi callq 0x3160 movq %rax, %r15 addq %rbp, %r15 movq %rbp, 0x10(%rsp) movq %r15, %rbx cmpb $0x3a, (%r15) jne 0x7844 leaq 0x1(%r15), %rdi leaq 0x9358(%rip), %rsi # 0x10b2d callq 0x3160 pushq $-0x1 popq %r14 testq %rax, %rax jle 0x7b48 leaq 0x1(%rax), %rcx movq %r15, %rdx decq %rcx cmpb $0x30, 0x1(%rdx) leaq 0x1(%rdx), %rdx je 0x77ee xorl %esi, %esi cmpq $0x5, %rcx jg 0x7b4f testq %rcx, %rcx jle 0x7828 xorl %edi, %edi xorl %esi, %esi imull $0xa, %esi, %esi movsbl (%rdx), %r8d addl %r8d, %esi addl $-0x30, %esi incq %rdi incq %rdx cmpq %rdi, %rcx jg 0x7810 cmpl $0x10000, %esi # imm = 0x10000 setl %cl movl %esi, %r14d testb %cl, %cl je 0x7ad1 addq %rax, %r15 incq %r15 jmp 0x7848 pushq $-0x1 popq %r14 leaq 0x9121(%rip), %rsi # 0x10970 movq %r15, %rdi callq 0x3160 movq %rax, %rbp testq %rax, %rax jle 0x7869 cmpb $0x2f, (%r15) jne 0x7993 addq %r15, %rbp cmpb $0x3f, (%rbp) jne 0x7884 leaq 0x92bf(%rip), %rsi # 0x10b38 movq %rbp, %rdi callq 0x3160 addq %rax, %rbp cmpb $0x23, (%rbp) movq %rbp, %rax jne 0x78a3 leaq 0x1(%rbp), %rdi leaq 0x92a0(%rip), %rsi # 0x10b38 callq 0x3160 addq %rbp, %rax incq %rax cmpb $0x0, (%rax) jne 0x7993 movl %r14d, 0x2c(%rsp) cmpq $0x7ffffffe, %r12 # imm = 0x7FFFFFFE ja 0x7b31 movq %r12, %rdi incq %rdi callq 0x3460 movq %rax, %r14 testq %rax, %rax je 0x78e6 movq %r14, %rdi movq 0x30(%rsp), %rsi movq %r12, %rdx callq 0x3260 movb $0x0, (%r14,%r12) movq %r14, 0x40(%rsp) movl $0xffffff7f, %r12d # imm = 0xFFFFFF7F testq %r14, %r14 je 0x7b13 movb (%r14), %al testb %al, %al je 0x7923 incq %r14 leal -0x41(%rax), %ecx movzbl %al, %edx orb $0x20, %al cmpb $0x1a, %cl movzbl %al, %eax cmovael %edx, %eax movb %al, -0x1(%r14) movb (%r14), %al incq %r14 testb %al, %al jne 0x7904 movq 0x38(%rsp), %rax testq %rax, %rax je 0x799e subq %rax, %r13 cmpq $0x7ffffffe, %r13 # imm = 0x7FFFFFFE ja 0x7b56 leaq 0x1(%r13), %rdi callq 0x3460 movq %rax, %r14 testq %rax, %rax je 0x7963 movq %r14, %rdi movq 0x38(%rsp), %rsi movq %r13, %rdx callq 0x3260 movb $0x0, (%r14,%r13) movq 0x18(%rsp), %r13 movq %r14, 0x48(%rsp) testq %r14, %r14 je 0x7b13 movq %r14, %rdi callq 0xe72b pushq $0x3a popq %rsi movq %r14, %rdi callq 0x3140 testq %rax, %rax movq 0x20(%rsp), %rax je 0x79ae movl $0xffffff7d, %r12d # imm = 0xFFFFFF7D jmp 0x7b13 andq $0x0, 0x48(%rsp) movq 0x18(%rsp), %r13 movq 0x20(%rsp), %rax testq %rax, %rax je 0x7a06 subq %rax, %r13 cmpq $0x7ffffffe, %r13 # imm = 0x7FFFFFFE ja 0x7b5e leaq 0x1(%r13), %rdi callq 0x3460 movq %rax, %r14 testq %rax, %rax je 0x79e9 movq %r14, %rdi movq 0x20(%rsp), %rsi movq %r13, %rdx callq 0x3260 movb $0x0, (%r14,%r13) movq 0x10(%rsp), %r13 movq %r14, 0x50(%rsp) testq %r14, %r14 je 0x7b13 movq %r14, %rdi callq 0xe72b jmp 0x7a11 andq $0x0, 0x50(%rsp) movq 0x10(%rsp), %r13 subq %r13, %rbx cmpq $0x7ffffffe, %rbx # imm = 0x7FFFFFFE ja 0x7b39 leaq 0x1(%rbx), %rdi callq 0x3460 movq %rax, %r14 testq %rax, %rax je 0x7a45 movq %r14, %rdi movq %r13, %rsi movq %rbx, %rdx callq 0x3260 movb $0x0, (%r14,%rbx) movq %r14, 0x58(%rsp) testq %r14, %r14 je 0x7b13 movl 0x2c(%rsp), %ecx testl %ecx, %ecx jns 0x7a6f movq 0x30(%rsp), %rax cmpb $0x73, 0x4(%rax) movl $0x1bb, %eax # imm = 0x1BB pushq $0x50 popq %rcx cmovel %eax, %ecx movl %ecx, 0x68(%rsp) cmpq %rbp, %r15 je 0x7a7e cmpb $0x3f, (%r15) jne 0x7a81 decq %r15 subq %r15, %rbp cmpq $0x7ffffffe, %rbp # imm = 0x7FFFFFFE ja 0x7b41 leaq 0x1(%rbp), %rdi callq 0x3460 movq %rax, %rbx testq %rax, %rax je 0x7ab4 movq %rbx, %rdi movq %r15, %rsi movq %rbp, %rdx callq 0x3260 movb $0x0, (%rbx,%rbp) movq %rbx, 0x60(%rsp) testq %rbx, %rbx movq 0x8(%rsp), %r14 movb $0x1, %r15b je 0x7adf movb $0x2f, (%rbx) xorl %r15d, %r15d xorl %r12d, %r12d jmp 0x7adf movb $0x1, %r15b movq 0x8(%rsp), %r14 movl $0xffffff7d, %r12d # imm = 0xFFFFFF7D testb %r15b, %r15b jne 0x7b25 movaps 0x40(%rsp), %xmm0 movaps 0x50(%rsp), %xmm1 movaps 0x60(%rsp), %xmm2 movups %xmm2, 0x20(%r14) movups %xmm1, 0x10(%r14) movups %xmm0, (%r14) movl %r12d, %eax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x8(%rsp), %r14 movb $0x1, %r15b jmp 0x7adf movl $0xffffff7e, %r12d # imm = 0xFFFFFF7E jmp 0x7adf leaq 0x40(%rsp), %rdi callq 0xf1b4 jmp 0x7b01 xorl %r14d, %r14d jmp 0x78e6 xorl %r14d, %r14d jmp 0x7a45 xorl %ebx, %ebx jmp 0x7ab4 movb $0x1, %cl jmp 0x7834 xorl %ecx, %ecx jmp 0x7834 xorl %r14d, %r14d jmp 0x7963 xorl %r14d, %r14d jmp 0x79e9
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x7b66
op_sb_append
static int op_sb_append(OpusStringBuf *_sb,const char *_s,int _len){ char *buf; int nbuf; int ret; nbuf=_sb->nbuf; if(OP_UNLIKELY(nbuf>INT_MAX-_len))return OP_EFAULT; ret=op_sb_ensure_capacity(_sb,nbuf+_len); if(OP_UNLIKELY(ret<0))return ret; buf=_sb->buf; memcpy(buf+nbuf,_s,sizeof(*buf)*_len); nbuf+=_len; buf[nbuf]='\0'; _sb->nbuf=nbuf; return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movslq 0x8(%rdi), %r12 movl %edx, %eax xorl $0x7fffffff, %eax # imm = 0x7FFFFFFF cmpl %eax, %r12d jg 0x7bca movl %edx, %r15d movq %rsi, %r14 movq %rdi, %rbx leal (%r12,%r15), %ebp movl %ebp, %esi callq 0x85d0 testl %eax, %eax js 0x7bbb movq (%rbx), %r13 addq %r13, %r12 movl %r15d, %edx movq %r12, %rdi movq %r14, %rsi callq 0x3260 movslq %ebp, %rax movb $0x0, (%r13,%rax) movl %ebp, 0x8(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffff7f, %eax # imm = 0xFFFFFF7F jmp 0x7bbb
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x7bd1
op_sb_append_string
static int op_sb_append_string(OpusStringBuf *_sb,const char *_s){ size_t len; len=strlen(_s); if(OP_UNLIKELY(len>(size_t)INT_MAX))return OP_EFAULT; return op_sb_append(_sb,_s,(int)len); }
pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0x3170 cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF ja 0x7bff movq %r14, %rdi movq %rbx, %rsi movl %eax, %edx addq $0x8, %rsp popq %rbx popq %r14 jmp 0x7b66 movl $0xffffff7f, %eax # imm = 0xFFFFFF7F addq $0x8, %rsp popq %rbx popq %r14 retq
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x7c0c
op_sb_append_basic_auth_header
static int op_sb_append_basic_auth_header(OpusStringBuf *_sb, const char *_header,const char *_user,const char *_pass){ size_t user_len; size_t pass_len; int user_pass_len; int base64_len; int nbuf_total; int ret; ret=op_sb_append_string(_sb,_header); ret|=op_sb_append(_sb,": Basic ",8); user_len=strlen(_user); pass_len=strlen(_pass); if(OP_UNLIKELY(user_len>(size_t)INT_MAX))return OP_EFAULT; if(OP_UNLIKELY(pass_len>INT_MAX-user_len))return OP_EFAULT; if(OP_UNLIKELY((int)(user_len+pass_len)>(INT_MAX>>2)*3-3))return OP_EFAULT; user_pass_len=(int)(user_len+pass_len)+1; base64_len=OP_BASE64_LENGTH(user_pass_len); /*Stick "user:pass" at the end of the buffer so we can Base64 encode it in-place.*/ nbuf_total=_sb->nbuf; if(OP_UNLIKELY(base64_len>INT_MAX-nbuf_total))return OP_EFAULT; nbuf_total+=base64_len; ret|=op_sb_ensure_capacity(_sb,nbuf_total); if(OP_UNLIKELY(ret<0))return ret; _sb->nbuf=nbuf_total-user_pass_len; OP_ALWAYS_TRUE(!op_sb_append(_sb,_user,(int)user_len)); OP_ALWAYS_TRUE(!op_sb_append(_sb,":",1)); OP_ALWAYS_TRUE(!op_sb_append(_sb,_pass,(int)pass_len)); op_base64_encode(_sb->buf+nbuf_total-base64_len, _sb->buf+nbuf_total-user_pass_len,user_pass_len); return op_sb_append(_sb,"\r\n",2); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rdi, %r12 callq 0x7bd1 movl %eax, %ebx leaq 0x8f5e(%rip), %rsi # 0x10b8f pushq $0x8 popq %rdx movq %r12, %rdi callq 0x7b66 movl %eax, %ebp movq %r15, %rdi callq 0x3170 movq %rax, %r13 movq %r14, %rdi callq 0x3170 movl $0x7fffffff, %edx # imm = 0x7FFFFFFF movl $0xffffff7f, %ecx # imm = 0xFFFFFF7F subq %r13, %rdx jb 0x7e90 cmpq %rdx, %rax ja 0x7e90 movl %ebx, %edi leaq (%rax,%r13), %rbx cmpl $0x5ffffffa, %ebx # imm = 0x5FFFFFFA jg 0x7e90 movq %rax, (%rsp) movq %r15, 0x8(%rsp) movq %r14, 0x10(%rsp) leal 0x3(%rbx), %eax pushq $0x3 popq %rsi cltd idivl %esi movl %eax, %r14d shll $0x2, %r14d movl 0x8(%r12), %r15d movl %r15d, %eax xorl $0x7fffffff, %eax # imm = 0x7FFFFFFF cmpl %eax, %r14d jg 0x7e90 orl %edi, %ebp addl %r14d, %r15d movq %r12, %rdi movl %r15d, %esi callq 0x85d0 movl %eax, %ecx orl %ebp, %ecx js 0x7e90 leal 0x1(%rbx), %ebp movl %r15d, %eax subl %ebp, %eax movl %eax, 0x8(%r12) movq %r12, %rdi movq 0x8(%rsp), %rsi movl %r13d, %edx callq 0x7b66 leaq 0x8e3a(%rip), %rsi # 0x10b2b pushq $0x1 popq %rdx movq %r12, %rdi callq 0x7b66 movq %r12, %rdi movq 0x10(%rsp), %rsi movq (%rsp), %rdx callq 0x7b66 movq %r12, %r13 movq (%r12), %r9 movslq %r15d, %r10 leaq (%r9,%r10), %rdi movslq %r14d, %r8 movl %ebx, %eax notl %eax movslq %eax, %rsi xorl %ecx, %ecx cmpl $0x2, %ebx jl 0x7dc2 xorl %ecx, %ecx movl %ebp, %eax xorl %edx, %edx pushq $0x3 popq %r11 divl %r11d movq %r10, %rdx subq %r8, %rdx addq %r9, %rdx addq $0x3, %rdx addq %rsi, %r10 addq %r10, %r9 addq $0x2, %r9 leaq 0x8b25(%rip), %r10 # 0x10880 movsbl -0x2(%r9), %ebx movsbl -0x1(%r9), %r14d movsbq (%r9), %r11 movl %ebx, %r15d shrl $0x2, %r15d movb (%r15,%r10), %r15b movb %r15b, -0x3(%rdx,%rcx,4) shll $0x4, %ebx andl $0x30, %ebx movl %r14d, %r15d shrl $0x4, %r15d orl %ebx, %r15d movb (%r15,%r10), %bl movb %bl, -0x2(%rdx,%rcx,4) shll $0x2, %r14d andl $0x3c, %r14d movl %r11d, %ebx shrl $0x6, %ebx orl %r14d, %ebx movb (%rbx,%r10), %bl movb %bl, -0x1(%rdx,%rcx,4) andl $0x3f, %r11d movb (%r11,%r10), %r11b movb %r11b, (%rdx,%rcx,4) incq %rcx addq $0x3, %r9 cmpq %rcx, %rax jne 0x7d5b movq %rdi, %rax subq %r8, %rax addq %rdi, %rsi movl %ecx, %edx leaq (%rdx,%rdx,2), %rdx subl %edx, %ebp cmpl $0x2, %ebp je 0x7e17 cmpl $0x1, %ebp movq %r13, %rdi jne 0x7e6c movsbl (%rsi,%rdx), %esi movl %esi, %edx shrl $0x2, %edx leaq 0x8a8c(%rip), %r9 # 0x10880 movb (%rdx,%r9), %r8b leal (,%rcx,4), %edx movb %r8b, (%rax,%rdx) shll $0x4, %esi andl $0x30, %esi movb (%rsi,%r9), %sil movb %sil, 0x1(%rax,%rdx) movb $0x3d, %sil jmp 0x7e5e movsbl (%rsi,%rdx), %edi movsbl 0x1(%rsi,%rdx), %esi movl %edi, %edx shrl $0x2, %edx leaq 0x8a54(%rip), %r8 # 0x10880 movb (%rdx,%r8), %r9b leal (,%rcx,4), %edx movb %r9b, (%rax,%rdx) shll $0x4, %edi andl $0x30, %edi movl %esi, %r9d shrl $0x4, %r9d orl %edi, %r9d movb (%r9,%r8), %dil movb %dil, 0x1(%rax,%rdx) andl $0xf, %esi movb (%r8,%rsi,4), %sil movq %r13, %rdi movl %edx, %edx movb %sil, 0x2(%rax,%rdx) movb $0x3d, 0x3(%rax,%rdx) incl %ecx movslq %ecx, %rcx movb $0x0, (%rax,%rcx,4) leaq 0x8e80(%rip), %rsi # 0x10cfa pushq $0x2 popq %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x7b66 movl %ecx, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x7ea1
op_http_conn_read_response
static int op_http_conn_read_response(OpusHTTPConn *_conn, OpusStringBuf *_response){ int ret; _response->nbuf=0; ret=op_sb_ensure_capacity(_response,OP_RESPONSE_SIZE_MIN); if(OP_UNLIKELY(ret<0))return ret; for(;;){ char *buf; int size; int capacity; int read_limit; int terminated; size=_response->nbuf; capacity=_response->cbuf-1; if(OP_UNLIKELY(size>=capacity)){ ret=op_sb_grow(_response,OP_RESPONSE_SIZE_MAX); if(OP_UNLIKELY(ret<0))return ret; capacity=_response->cbuf-1; /*The response was too large. This prevents a bad server from running us out of memory.*/ if(OP_UNLIKELY(size>=capacity))return OP_EIMPL; } buf=_response->buf; ret=op_http_conn_peek(_conn,buf+size,capacity-size); if(OP_UNLIKELY(ret<=0))return size<=0?OP_EREAD:OP_FALSE; /*We read some data.*/ /*Make sure the starting characters are "HTTP". Otherwise we could wind up waiting for a response from something that is not an HTTP server until we time out.*/ if(size<4&&op_strncasecmp(buf,"HTTP",OP_MIN(size+ret,4))!=0){ return OP_FALSE; } /*How far can we read without passing the "\r\n\r\n" terminator?*/ buf[size+ret]='\0'; terminated=0; for(read_limit=OP_MAX(size-3,0);read_limit<size+ret;read_limit++){ /*We don't look for the leading '\r' thanks to broken servers.*/ if(buf[read_limit]=='\n'){ if(buf[read_limit+1]=='\r'&&OP_LIKELY(buf[read_limit+2]=='\n')){ terminated=3; break; } /*This case is for broken servers.*/ else if(OP_UNLIKELY(buf[read_limit+1]=='\n')){ terminated=2; break; } } } read_limit+=terminated; OP_ASSERT(size<=read_limit); OP_ASSERT(read_limit<=size+ret); /*Actually consume that data.*/ ret=op_http_conn_read(_conn,buf+size,read_limit-size,1); if(OP_UNLIKELY(ret<=0))return OP_FALSE; size+=ret; buf[size]='\0'; _response->nbuf=size; /*We found the terminator and read all the data up to and including it.*/ if(terminated&&OP_LIKELY(size>=read_limit))return size; } return OP_EIMPL; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %r14 movq %rdi, 0x18(%rsp) andl $0x0, 0x8(%rsi) movq %rsi, %rdi movl $0x1fe, %esi # imm = 0x1FE callq 0x85d0 testl %eax, %eax js 0x8113 movq %r14, (%rsp) movslq 0x8(%r14), %r15 movl 0xc(%r14), %ebx decl %ebx cmpl %ebx, %r15d jge 0x80c8 movl %ebp, 0xc(%rsp) movq (%r14), %rax movq %rax, 0x28(%rsp) leaq (%rax,%r15), %r14 movq %r15, 0x20(%rsp) subl %r15d, %ebx movq 0x18(%rsp), %rcx movl 0x50(%rcx), %eax movl %eax, 0x10(%rsp) movq 0x20(%rcx), %r12 movslq %ebx, %rax movq %rax, 0x30(%rsp) testq %r12, %r12 je 0x7f35 movq %r12, %rdi movq %r14, %rsi movl %ebx, %edx callq 0x32c0 xorl %r13d, %r13d testl %eax, %eax js 0x7f60 movl %eax, %r15d jmp 0x7fb3 callq 0x3050 movq %rax, %rbp andl $0x0, (%rax) movl 0x10(%rsp), %edi movq %r14, %rsi movq 0x30(%rsp), %rdx pushq $0x2 popq %rcx callq 0x30f0 xorl %r13d, %r13d testl %eax, %eax js 0x7f7a movl %eax, %r15d jmp 0x7fb3 movq %r12, %rdi movl %eax, %esi callq 0x3040 cmpl $0x2, %eax je 0x7f89 cmpl $0x3, %eax jne 0x7f84 movw $0x4, %ax jmp 0x7f8d movw $0x1, %ax cmpl $0xb, (%rbp) je 0x7f8d xorl %r15d, %r15d jmp 0x7fb3 movw $0x1, %ax movw %ax, 0x14(%rsp) leaq 0x10(%rsp), %rdi pushq $0x1 popq %rsi movl $0x7530, %edx # imm = 0x7530 callq 0x34f0 testl %eax, %eax setg %r13b movl $0x0, %eax cmovlel %eax, %r15d testb %r13b, %r13b jne 0x7f17 testl %r15d, %r15d jle 0x80ec movq 0x20(%rsp), %r12 cmpl $0x3, %r12d movq 0x28(%rsp), %r13 jg 0x8003 leal (%r15,%r12), %edx cmpl $0x4, %edx pushq $0x4 popq %rax cmovgel %eax, %edx movq %r13, %rdi leaq 0x8bb2(%rip), %rsi # 0x10b9e callq 0xadac testl %eax, %eax je 0x8003 xorl %ebx, %ebx pushq $-0x1 popq %rbp movq (%rsp), %r14 jmp 0x80bd addl %r12d, %r15d movslq %r15d, %rcx movb $0x0, (%r13,%rcx) cmpl $0x4, %r12d pushq $0x3 popq %rax movl %eax, %edx cmovgel %r12d, %edx leal -0x3(%rdx), %esi xorl %eax, %eax cmpl %ecx, %esi setge %bl jl 0x802d movl %esi, %r15d jmp 0x807a movl %edx, %edx addq $-0x3, %rdx movl %r15d, %esi cmpb $0xa, (%r13,%rdx) jne 0x8065 movzbl 0x1(%r13,%rdx), %edi cmpl $0xd, %edi jne 0x805c cmpb $0xa, 0x2(%r13,%rdx) je 0x8074 cmpb $0xa, %dil jne 0x8065 jmp 0x8103 cmpl $0xa, %edi je 0x8103 incq %rdx cmpq %rcx, %rdx setge %bl cmpl %edx, %esi jne 0x8036 jmp 0x807a movl %edx, %r15d pushq $0x3 popq %rax addl %eax, %r15d movl %r15d, %edx subl %r12d, %edx movq 0x18(%rsp), %rdi movq %r14, %rsi callq 0xf3d5 testl %eax, %eax jle 0x7ff5 addl %r12d, %eax cltq movb $0x0, (%r13,%rax) movq (%rsp), %r14 movl %eax, 0x8(%r14) cmpl %r15d, %eax setl %cl orb %cl, %bl testb $0x1, %bl movl 0xc(%rsp), %ebp cmovel %eax, %ebp testb $0x1, %bl jne 0x7ed4 jmp 0x8115 movq %r14, %rdi callq 0x87a5 testl %eax, %eax js 0x810d movl 0xc(%r14), %ebx decl %ebx cmpl %ebx, %r15d jl 0x7ee7 movl $0xffffff7e, %ebp # imm = 0xFFFFFF7E xorl %ebx, %ebx jmp 0x80bd xorl %ebp, %ebp cmpl $0x0, 0x20(%rsp) setg %bpl negl %ebp orl $-0x80, %ebp xorl %ebx, %ebx jmp 0x7ffa movl %edx, %r15d pushq $0x2 jmp 0x8079 xorl %ebx, %ebx movl %eax, %ebp jmp 0x80bd movl %eax, %ebp movl %ebp, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x8126
op_http_parse_status_line
static char *op_http_parse_status_line(int *_v1_1_compat, char **_status_code,char *_response){ char *next; char *status_code; int v1_1_compat; size_t d; /*RFC 2616 Section 6.1 does not say if the tokens in the Status-Line can be separated by optional LWS, but since it specifically calls out where spaces are to be placed and that CR and LF are not allowed except at the end, we are assuming extra LWS is not allowed.*/ /*We already validated that this starts with "HTTP"*/ OP_ASSERT(op_strncasecmp(_response,"HTTP",4)==0); next=_response+4; if(OP_UNLIKELY(*next++!='/'))return NULL; d=strspn(next,OP_HTTP_DIGIT); /*"Leading zeros MUST be ignored by recipients."*/ while(*next=='0'){ next++; OP_ASSERT(d>0); d--; } /*We only support version 1.x*/ if(OP_UNLIKELY(d!=1)||OP_UNLIKELY(*next++!='1'))return NULL; if(OP_UNLIKELY(*next++!='.'))return NULL; d=strspn(next,OP_HTTP_DIGIT); if(OP_UNLIKELY(d<=0))return NULL; /*"Leading zeros MUST be ignored by recipients."*/ while(*next=='0'){ next++; OP_ASSERT(d>0); d--; } /*We don't need to parse the version number. Any non-zero digit means it's at least 1.*/ v1_1_compat=d>0; next+=d; if(OP_UNLIKELY(*next++!=' '))return NULL; status_code=next; d=strspn(next,OP_HTTP_DIGIT); if(OP_UNLIKELY(d!=3))return NULL; next+=d; /*The Reason-Phrase can be empty, but the space must be here.*/ if(OP_UNLIKELY(*next++!=' '))return NULL; next+=strcspn(next,OP_HTTP_CREASON_PHRASE); /*We are not mandating this be present thanks to broken servers.*/ if(OP_LIKELY(*next=='\r'))next++; if(OP_UNLIKELY(*next++!='\n'))return NULL; if(_v1_1_compat!=NULL)*_v1_1_compat=v1_1_compat; *_status_code=status_code; return next; }
cmpb $0x2f, 0x4(%rdx) jne 0x8256 pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r12 movq %rsi, %rbx movq %rdi, %r14 leaq 0x5(%rdx), %r15 leaq 0x89de(%rip), %rsi # 0x10b2d movq %r15, %rdi callq 0x3160 movq %rax, %rcx movb 0x5(%r12), %dl cmpb $0x30, %dl jne 0x8170 decq %rcx movb 0x1(%r15), %dl incq %r15 jmp 0x815f xorl %eax, %eax cmpq $0x1, %rcx jne 0x8243 cmpb $0x31, %dl jne 0x8243 cmpb $0x2e, 0x1(%r15) jne 0x8252 addq $0x2, %r15 leaq 0x8992(%rip), %rsi # 0x10b2d movq %r15, %rdi callq 0x3160 testq %rax, %rax je 0x8252 movq %rax, %r12 cmpb $0x30, (%r15) movq %rbx, (%rsp) jne 0x81cc leaq 0x1(%r15), %r13 decq %r12 cmpb $0x30, 0x1(%r15) movq %r13, %r15 je 0x81b9 jmp 0x81cf movq %r15, %r13 xorl %ebp, %ebp testq %r12, %r12 setne %bl cmpb $0x20, (%r13,%r12) jne 0x8252 leaq (%r12,%r13), %r15 incq %r15 leaq 0x8940(%rip), %rsi # 0x10b2d movq %r15, %rdi callq 0x3160 cmpq $0x3, %rax jne 0x8252 addq %r12, %r13 cmpb $0x20, 0x4(%r13) jne 0x8252 leaq 0x5(%r13), %rdi leaq 0x8993(%rip), %rsi # 0x10ba3 callq 0x3080 xorl %ecx, %ecx cmpb $0xd, 0x5(%r13,%rax) leaq 0x5(%r13,%rax), %rax sete %cl cmpb $0xa, (%rcx,%rax) jne 0x8252 testq %r14, %r14 je 0x8236 movb %bl, %bpl movl %ebp, (%r14) addq %rcx, %rax incq %rax movq (%rsp), %rcx movq %r15, (%rcx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %eax, %eax jmp 0x8243 xorl %eax, %eax retq
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x8259
op_http_get_next_header
static int op_http_get_next_header(char **_header,char **_cdr,char **_s){ char *header; char *header_end; char *cdr; char *cdr_end; char *next; size_t d; next=*_s; /*The second case is for broken servers.*/ if(next[0]=='\r'&&next[1]=='\n'||OP_UNLIKELY(next[0]=='\n')){ /*No more headers.*/ *_header=NULL; *_cdr=NULL; *_s=NULL; return 0; } header=next+op_http_lwsspn(next); d=strcspn(header,OP_HTTP_CTOKEN); if(OP_UNLIKELY(d<=0))return OP_FALSE; header_end=header+d; next=header_end+op_http_lwsspn(header_end); if(OP_UNLIKELY(*next++!=':'))return OP_FALSE; next+=op_http_lwsspn(next); cdr=next; do{ cdr_end=next+strcspn(next,OP_HTTP_CTLS); next=cdr_end+op_http_lwsspn(cdr_end); } while(next>cdr_end); /*We are not mandating this be present thanks to broken servers.*/ if(OP_LIKELY(*next=='\r'))next++; if(OP_UNLIKELY(*next++!='\n'))return OP_FALSE; *header_end='\0'; *cdr_end='\0'; /*Field names are case-insensitive.*/ op_string_tolower(header); *_header=header; *_cdr=cdr; *_s=next; return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r12 movq %rsi, %rbx movq (%rdx), %r13 movzbl (%r13), %eax cmpl $0xd, %eax jne 0x829b xorl %r8d, %r8d cmpb $0xa, %al je 0x83db cmpb $0xa, 0x1(%r13) movl $0x0, %eax movl $0x0, %ebp jne 0x82a4 jmp 0x83b9 cmpl $0xa, %eax je 0x83d8 movq %rdi, 0x18(%rsp) movq %r13, %rdi callq 0xf5bb cltq movq %rax, 0x20(%rsp) leaq (%rax,%r13), %rbp leaq 0x8900(%rip), %rsi # 0x10bc3 movq %rbp, %rdi callq 0x3080 pushq $-0x1 popq %r14 testq %rax, %rax je 0x83c6 movq %rax, %r15 movq %rbx, 0x10(%rsp) movq %rbp, 0x30(%rsp) addq %rbp, %r15 movq %r15, %rdi callq 0xf5bb movslq %eax, %rbx cmpb $0x3a, (%rbx,%r15) jne 0x83c6 movq %r12, 0x28(%rsp) addq %r15, %rbx leaq 0x1(%rbx), %rdi callq 0xf5bb cltq leaq (%rbx,%rax), %rbp incq %rbp leaq 0x88d7(%rip), %r12 # 0x10bf6 movq %rbp, 0x8(%rsp) movq %rbp, %rdi movq %r12, %rsi callq 0x3080 movq %rax, %rbx addq %rbp, %rbx movq %rbx, %rdi callq 0xf5bb cltq leaq (%rbx,%rax), %rbp testl %eax, %eax jg 0x8324 xorl %eax, %eax cmpb $0xd, (%rbp) sete %al cmpb $0xa, (%rbp,%rax) movq 0x28(%rsp), %r12 jne 0x83c6 addq %rax, %rbp incq %rbp xorl %eax, %eax movb %al, (%r15) movb %al, (%rbx) movq 0x30(%rsp), %r8 movb (%r8), %cl testb %cl, %cl je 0x83aa movq 0x20(%rsp), %rax addq %r13, %rax incq %rax movq 0x10(%rsp), %rbx movq 0x18(%rsp), %rdi leal -0x41(%rcx), %edx movzbl %cl, %esi orb $0x20, %cl cmpb $0x1a, %dl movzbl %cl, %ecx cmovael %esi, %ecx movb %cl, -0x1(%rax) movb (%rax), %cl incq %rax testb %cl, %cl jne 0x838a jmp 0x83b4 movq 0x10(%rsp), %rbx movq 0x18(%rsp), %rdi movq 0x8(%rsp), %rax movq %r8, (%rdi) movq %rax, (%rbx) movq %rbp, (%r12) xorl %r14d, %r14d movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %r8d, %r8d xorl %eax, %eax xorl %ebp, %ebp jmp 0x83b9
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x83e1
op_http_parse_content_range
static int op_http_parse_content_range(opus_int64 *_first,opus_int64 *_last, opus_int64 *_length,const char *_cdr){ opus_int64 first; opus_int64 last; opus_int64 length; size_t d; if(OP_UNLIKELY(op_strncasecmp(_cdr,"bytes",5)!=0))return OP_FALSE; _cdr+=5; d=op_http_lwsspn(_cdr); if(OP_UNLIKELY(d<=0))return OP_FALSE; _cdr+=d; if(*_cdr!='*'){ first=op_http_parse_nonnegative_int64(&_cdr,_cdr); if(OP_UNLIKELY(first<0))return (int)first; _cdr+=op_http_lwsspn(_cdr); if(*_cdr++!='-')return OP_FALSE; _cdr+=op_http_lwsspn(_cdr); last=op_http_parse_nonnegative_int64(&_cdr,_cdr); if(OP_UNLIKELY(last<0))return (int)last; _cdr+=op_http_lwsspn(_cdr); } else{ /*This is for a 416 response (Requested range not satisfiable).*/ first=last=-1; _cdr++; } if(OP_UNLIKELY(*_cdr++!='/'))return OP_FALSE; if(*_cdr!='*'){ length=op_http_parse_nonnegative_int64(&_cdr,_cdr); if(OP_UNLIKELY(length<0))return (int)length; } else{ /*The total length is unspecified.*/ _cdr++; length=-1; } if(OP_UNLIKELY(*_cdr!='\0'))return OP_FALSE; if(OP_UNLIKELY(last<first))return OP_FALSE; if(length>=0&&OP_UNLIKELY(last>=length))return OP_FALSE; *_first=first; *_last=last; *_length=length; return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r13 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 movq %rcx, 0x8(%rsp) leaq 0x8810(%rip), %rsi # 0x10c17 pushq $0x5 popq %rdx movq %rcx, %rdi callq 0xadac pushq $-0x1 popq %rbx testl %eax, %eax jne 0x8493 addq $0x5, %r13 movq %r13, 0x8(%rsp) movq %r13, %rdi callq 0xf5bb testl %eax, %eax je 0x8493 cltq leaq (%rax,%r13), %rsi movq %rsi, 0x8(%rsp) cmpb $0x2a, (%r13,%rax) jne 0x84a4 incq %rsi pushq $-0x1 popq %r13 movq %r13, %rbp leaq 0x1(%rsi), %rax movq %rax, 0x8(%rsp) cmpb $0x2f, (%rsi) jne 0x8493 cmpb $0x2a, (%rax) jne 0x8515 pushq $-0x1 popq %rax addq $0x2, %rsi movq %rsi, 0x8(%rsp) cmpq %r13, %rbp jl 0x8493 movq 0x8(%rsp), %rcx cmpb $0x0, (%rcx) jne 0x8493 testq %rax, %rax js 0x8487 cmpq %rax, %rbp jge 0x8493 movq %r13, (%r12) movq %rbp, (%r15) movq %rax, (%r14) xorl %ebx, %ebx movl %ebx, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x8(%rsp), %rdi callq 0x87e5 movq %rax, %r13 testq %rax, %rax js 0x8532 movq 0x8(%rsp), %rbp movq %rbp, %rdi callq 0xf5bb cltq addq %rax, %rbp incq %rbp movq %rbp, 0x8(%rsp) cmpb $0x2d, -0x1(%rbp) jne 0x8493 movq %rbp, %rdi callq 0xf5bb movslq %eax, %rsi addq %rbp, %rsi leaq 0x8(%rsp), %rdi movq %rsi, (%rdi) callq 0x87e5 movq %rax, %rbp testq %rax, %rax js 0x853a movq 0x8(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xf5bb movslq %eax, %rsi addq 0x10(%rsp), %rsi jmp 0x844b leaq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x87e5 testq %rax, %rax jns 0x846e movl %eax, %ebx jmp 0x8493 movl %r13d, %ebx jmp 0x8493 movl %ebp, %ebx jmp 0x8493
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x8541
op_http_parse_connection
static int op_http_parse_connection(char *_cdr){ size_t d; int ret; ret=0; for(;;){ d=strcspn(_cdr,OP_HTTP_CTOKEN); if(OP_UNLIKELY(d<=0))return OP_FALSE; if(op_strncasecmp(_cdr,"close",(int)d)==0)ret=1; /*We're supposed to strip and ignore any headers mentioned in the Connection header if this response is from an HTTP/1.0 server (to work around forwarding of hop-by-hop headers by old proxies), but the only hop-by-hop header we look at is Connection itself. Everything else is a well-defined end-to-end header, and going back and undoing the things we did based on already-examined headers would be hard (since we only scan them once, in a destructive manner). Therefore we just ignore all the other tokens.*/ _cdr+=d; d=op_http_lwsspn(_cdr); if(d<=0)break; _cdr+=d; } return OP_UNLIKELY(*_cdr!='\0')?OP_FALSE:ret; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 leaq 0x866d(%rip), %rsi # 0x10bc3 callq 0x3080 movq %rax, %r13 pushq $-0x1 popq %rax testq %r13, %r13 je 0x85c1 xorl %ebp, %ebp leaq 0x86ae(%rip), %r15 # 0x10c1d pushq $0x1 popq %rbx leaq 0x864a(%rip), %r12 # 0x10bc3 movq %r14, %rdi movq %r15, %rsi movl %r13d, %edx callq 0xadac testl %eax, %eax cmovel %ebx, %ebp addq %r13, %r14 movq %r14, %rdi callq 0xf5bb testl %eax, %eax je 0x85b8 cltq addq %rax, %r14 movq %r14, %rdi movq %r12, %rsi callq 0x3080 movq %rax, %r13 testq %rax, %rax jne 0x8579 pushq $-0x1 popq %rax jmp 0x85c1 xorl %eax, %eax cmpb (%r14), %al sbbl %eax, %eax orl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x85d0
op_sb_ensure_capacity
static int op_sb_ensure_capacity(OpusStringBuf *_sb,int _capacity){ char *buf; int cbuf; buf=_sb->buf; cbuf=_sb->cbuf; if(_capacity>=cbuf-1){ if(OP_UNLIKELY(cbuf>INT_MAX-1>>1))return OP_EFAULT; if(OP_UNLIKELY(_capacity>=INT_MAX-1))return OP_EFAULT; cbuf=OP_MAX(2*cbuf+1,_capacity+1); buf=_ogg_realloc(buf,sizeof(*buf)*cbuf); if(OP_UNLIKELY(buf==NULL))return OP_EFAULT; _sb->buf=buf; _sb->cbuf=cbuf; } return 0; }
pushq %rbp pushq %r14 pushq %rbx movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx xorl %ebx, %ebx cmpl %esi, %ecx jg 0x861f movl $0xffffff7f, %ebx # imm = 0xFFFFFF7F cmpl $0x7ffffffd, %esi # imm = 0x7FFFFFFD jg 0x861f cmpl $0x3fffffff, %eax # imm = 0x3FFFFFFF jg 0x861f movq %rdi, %r14 movq (%rdi), %rdi leal (%rax,%rax), %ecx leal 0x1(%rsi), %edx cmpl %esi, %ecx leal 0x1(%rax,%rax), %ebp cmovlel %edx, %ebp movslq %ebp, %rsi callq 0x3580 testq %rax, %rax je 0x861f movq %rax, (%r14) movl %ebp, 0xc(%r14) xorl %ebx, %ebx movl %ebx, %eax popq %rbx popq %r14 popq %rbp retq
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x8626
op_http_conn_establish_tunnel
static int op_http_conn_establish_tunnel(OpusHTTPStream *_stream, OpusHTTPConn *_conn,op_sock _fd,SSL *_ssl_conn,BIO *_ssl_bio){ # if (OPENSSL_VERSION_NUMBER>=0x10100000L||LIBRESSL_VERSION_NUMBER>=0x2070000fL) BIO_METHOD *bio_retry_method; # endif BIO *retry_bio; char *status_code; char *next; int ret; _conn->ssl_conn=NULL; _conn->fd=_fd; OP_ASSERT(_stream->proxy_connect.nbuf>0); ret=op_http_conn_write_fully(_conn, _stream->proxy_connect.buf,_stream->proxy_connect.nbuf); if(OP_UNLIKELY(ret<0))return ret; # if (OPENSSL_VERSION_NUMBER>=0x10100000L||LIBRESSL_VERSION_NUMBER>=0x2070000fL) bio_retry_method=BIO_meth_new(BIO_TYPE_NULL,"retry"); if(bio_retry_method==NULL)return OP_EFAULT; BIO_meth_set_write(bio_retry_method,op_bio_retry_write); BIO_meth_set_read(bio_retry_method,op_bio_retry_read); BIO_meth_set_puts(bio_retry_method,op_bio_retry_puts); BIO_meth_set_ctrl(bio_retry_method,op_bio_retry_ctrl); BIO_meth_set_create(bio_retry_method,op_bio_retry_new); BIO_meth_set_destroy(bio_retry_method,op_bio_retry_free); retry_bio=BIO_new(bio_retry_method); if(OP_UNLIKELY(retry_bio==NULL)){ BIO_meth_free(bio_retry_method); return OP_EFAULT; } # else retry_bio=BIO_new(&op_bio_retry_method); if(OP_UNLIKELY(retry_bio==NULL))return OP_EFAULT; # endif SSL_set_bio(_ssl_conn,retry_bio,_ssl_bio); SSL_set_connect_state(_ssl_conn); /*This shouldn't succeed, since we can't read yet.*/ OP_ALWAYS_TRUE(SSL_connect(_ssl_conn)<0); SSL_set_bio(_ssl_conn,_ssl_bio,_ssl_bio); # if (OPENSSL_VERSION_NUMBER>=0x10100000L||LIBRESSL_VERSION_NUMBER>=0x2070000fL) BIO_meth_free(bio_retry_method); # endif /*Only now do we disable write coalescing, to allow the CONNECT request and the start of the TLS handshake to be combined.*/ op_sock_set_tcp_nodelay(_fd,1); ret=op_http_conn_read_response(_conn,&_stream->response); if(OP_UNLIKELY(ret<0))return ret; next=op_http_parse_status_line(NULL,&status_code,_stream->response.buf); /*According to RFC 2817, "Any successful (2xx) response to a CONNECT request indicates that the proxy has established a connection to the requested host and port."*/ if(OP_UNLIKELY(next==NULL)||OP_UNLIKELY(status_code[0]!='2'))return OP_FALSE; return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %r12 movq %rcx, %r13 movl %edx, %ebp movq %rsi, %r15 andq $0x0, 0x20(%rsi) movq %rdi, %r14 movl %edx, 0x50(%rsi) movq 0x240(%rdi), %rsi movl 0x248(%rdi), %edx movq %r15, %rdi callq 0xf05c pushq $-0x1 popq %rbx testl %eax, %eax js 0x8790 movl %ebp, 0x4(%rsp) leaq 0x8523(%rip), %rsi # 0x10b98 movl $0x406, %edi # imm = 0x406 callq 0x3210 testq %rax, %rax je 0x878b movq %rax, %rbp leaq 0x6c81(%rip), %rsi # 0xf313 movq %rax, %rdi callq 0x35f0 leaq 0x6c94(%rip), %rsi # 0xf335 movq %rbp, %rdi callq 0x3380 leaq 0x6ca7(%rip), %rsi # 0xf357 movq %rbp, %rdi callq 0x3410 leaq 0x6cba(%rip), %rsi # 0xf379 movq %rbp, %rdi callq 0x36c0 leaq 0x6cdf(%rip), %rsi # 0xf3ad movq %rbp, %rdi callq 0x3120 leaq 0x6cef(%rip), %rsi # 0xf3cc movq %rbp, %rdi callq 0x33d0 movq %rbp, %rdi callq 0x35b0 testq %rax, %rax je 0x8783 movq %r13, %rdi movq %rax, %rsi movq %r12, %rdx callq 0x3320 movq %r13, %rdi callq 0x3130 movq %r13, %rdi callq 0x3480 movq %r13, %rdi movq %r12, %rsi movq %r12, %rdx callq 0x3320 movq %rbp, %rdi callq 0x35c0 leaq 0x14(%rsp), %rcx movl $0x1, (%rcx) pushq $0x6 popq %rsi pushq $0x1 popq %rdx pushq $0x4 popq %r8 movl 0x4(%rsp), %edi callq 0x3600 addq $0x250, %r14 # imm = 0x250 movq %r15, %rdi movq %r14, %rsi callq 0x7ea1 testl %eax, %eax js 0x87a1 movq (%r14), %rdx leaq 0x8(%rsp), %rsi xorl %edi, %edi callq 0x8126 testq %rax, %rax je 0x8790 movq 0x8(%rsp), %rax xorl %ebx, %ebx cmpb $0x32, (%rax) setne %bl negl %ebx jmp 0x8790 movq %rbp, %rdi callq 0x35c0 movl $0xffffff7f, %ebx # imm = 0xFFFFFF7F movl %ebx, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %ebx jmp 0x8790
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x87a5
op_sb_grow
static int op_sb_grow(OpusStringBuf *_sb,int _max_size){ char *buf; int cbuf; buf=_sb->buf; cbuf=_sb->cbuf; OP_ASSERT(_max_size<=INT_MAX-1); cbuf=cbuf<=_max_size-1>>1?2*cbuf+1:_max_size+1; buf=_ogg_realloc(buf,sizeof(*buf)*cbuf); if(OP_UNLIKELY(buf==NULL))return OP_EFAULT; _sb->buf=buf; _sb->cbuf=cbuf; return 0; }
pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %rdi movl 0xc(%rbx), %eax cmpl $0x3fff, %eax # imm = 0x3FFF leal 0x1(%rax,%rax), %eax movl $0x7fff, %ebp # imm = 0x7FFF cmovll %eax, %ebp movslq %ebp, %rsi callq 0x3580 testq %rax, %rax je 0x87de movq %rax, (%rbx) movl %ebp, 0xc(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq movl $0xffffff7f, %eax # imm = 0xFFFFFF7F jmp 0x87d7
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x87e5
op_http_parse_nonnegative_int64
static opus_int64 op_http_parse_nonnegative_int64(const char **_next, const char *_cdr){ const char *next; opus_int64 ret; int i; next=_cdr+strspn(_cdr,OP_HTTP_DIGIT); *_next=next; if(OP_UNLIKELY(next<=_cdr))return OP_FALSE; while(*_cdr=='0')_cdr++; if(OP_UNLIKELY(next-_cdr>19))return OP_EIMPL; ret=0; for(i=0;i<next-_cdr;i++){ int digit; digit=_cdr[i]-'0'; /*Check for overflow.*/ if(OP_UNLIKELY(ret>(OP_INT64_MAX-9)/10+(digit<=7)))return OP_EIMPL; ret=ret*10+digit; } return ret; }
pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 leaq 0x8337(%rip), %rsi # 0x10b2d movq %rbx, %rdi callq 0x3160 leaq (%rbx,%rax), %rcx movq %rcx, (%r14) testq %rax, %rax jle 0x8877 incq %rax decq %rax cmpb $0x30, (%rbx) leaq 0x1(%rbx), %rbx je 0x880d cmpq $0x13, %rax jg 0x8865 testq %rax, %rax jle 0x8861 movabsq $0xccccccccccccccb, %rdx # imm = 0xCCCCCCCCCCCCCCB xorl %esi, %esi leaq 0x1(%rdx), %rdi xorl %ecx, %ecx movsbq -0x1(%rbx,%rsi), %r8 cmpq $0x38, %r8 movq %rdx, %r9 cmovlq %rdi, %r9 cmpq %r9, %rcx jg 0x8865 imulq $0xa, %rcx, %rcx addq %r8, %rcx addq $-0x30, %rcx incq %rsi cmpq %rsi, %rax jg 0x8836 jmp 0x886c xorl %ecx, %ecx jmp 0x886c movq $-0x82, %rcx movq %rcx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq pushq $-0x1 popq %rcx jmp 0x886c
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x887c
op_http_stream_close
static int op_http_stream_close(void *_stream){ OpusHTTPStream *stream; stream=(OpusHTTPStream *)_stream; if(OP_LIKELY(stream!=NULL)){ op_http_stream_clear(stream); _ogg_free(stream); } return 0; }
testq %rdi, %rdi je 0x8893 pushq %rbx movq %rdi, %rbx callq 0xe795 movq %rbx, %rdi callq 0x33f0 popq %rbx xorl %eax, %eax retq
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x8896
op_http_conn_open_pos
static int op_http_conn_open_pos(OpusHTTPStream *_stream, OpusHTTPConn *_conn,opus_int64 _pos,opus_int32 _chunk_size){ op_time start_time; op_time end_time; opus_int32 connect_rate; opus_int32 connect_time; int ret; ret=op_http_connect(_stream,_conn,&_stream->addr_info,&start_time); if(OP_UNLIKELY(ret<0))return ret; ret=op_http_conn_send_request(_stream,_conn,_pos,_chunk_size,0); if(OP_UNLIKELY(ret<0))return ret; ret=op_http_conn_handle_response(_stream,_conn); if(OP_UNLIKELY(ret!=0))return OP_FALSE; op_time_get(&end_time); _stream->cur_conni=(int)(_conn-_stream->conns); OP_ASSERT(_stream->cur_conni>=0&&_stream->cur_conni<OP_NCONNS_MAX); /*The connection has been successfully opened. Update the connection time estimate.*/ connect_time=op_time_diff_ms(&end_time,&start_time); connect_rate=_stream->connect_rate; connect_rate+=OP_MAX(connect_time,1)-connect_rate+8>>4; _stream->connect_rate=connect_rate; return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movl %ecx, %ebp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx leaq 0x1d0(%rdi), %rdx leaq 0x8(%rsp), %rcx callq 0xe839 testl %eax, %eax js 0x8973 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movl %ebp, %ecx callq 0x8991 testl %eax, %eax js 0x8973 movq %rbx, %rdi movq %r14, %rsi callq 0x8ab7 testl %eax, %eax jne 0x897e leaq 0x18(%rsp), %r15 movq %r15, %rdi callq 0xf181 subq %rbx, %r14 pushq $0x60 popq %rcx movq %r14, %rax cqto idivq %rcx movl %eax, 0x27c(%rbx) movq (%r15), %rcx subq 0x8(%rsp), %rcx cmpq $0x20c49a, %rcx # imm = 0x20C49A jg 0x8983 cmpq $-0x20c49a, %rcx # imm = 0xFFDF3B66 jl 0x898a movabsq $0x3e800000000, %rax # imm = 0x3E800000000 imulq %rax, %rcx shrq $0x20, %rcx movq 0x20(%rsp), %rax subq 0x10(%rsp), %rax movl $0xf4240, %esi # imm = 0xF4240 cqto idivq %rsi addl %ecx, %eax movl 0x290(%rbx), %ecx cmpl $0x2, %eax pushq $0x1 popq %rdx cmovgel %eax, %edx subl %ecx, %edx addl $0x8, %edx sarl $0x4, %edx addl %ecx, %edx movl %edx, 0x290(%rbx) xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $-0x1 popq %rax jmp 0x8973 movl $0x7fffffff, %eax # imm = 0x7FFFFFFF jmp 0x8952 movl $0x80000000, %eax # imm = 0x80000000 jmp 0x8952
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x8991
op_http_conn_send_request
static int op_http_conn_send_request(OpusHTTPStream *_stream, OpusHTTPConn *_conn,opus_int64 _pos,opus_int32 _chunk_size, int _try_not_to_block){ opus_int64 next_end; int ret; /*We shouldn't have another request outstanding.*/ OP_ASSERT(_conn->next_pos<0); /*Build the request to send.*/ OP_ASSERT(_stream->request.nbuf>=_stream->request_tail); _stream->request.nbuf=_stream->request_tail; ret=op_sb_append_nonnegative_int64(&_stream->request,_pos); ret|=op_sb_append(&_stream->request,"-",1); if(_chunk_size>0&&OP_ADV_OFFSET(_pos,2*_chunk_size)<_stream->content_length){ /*We shouldn't be pipelining requests with non-HTTP/1.1 servers.*/ OP_ASSERT(_stream->pipeline); next_end=_pos+_chunk_size; ret|=op_sb_append_nonnegative_int64(&_stream->request,next_end-1); /*Use a larger chunk size for our next request.*/ _chunk_size<<=1; /*But after a while, just request the rest of the resource.*/ if(_chunk_size>OP_PIPELINE_CHUNK_SIZE_MAX)_chunk_size=-1; } else{ /*Either this was a non-pipelined request or we were close enough to the end to just ask for the rest.*/ next_end=-1; _chunk_size=-1; } ret|=op_sb_append(&_stream->request,"\r\n\r\n",4); if(OP_UNLIKELY(ret<0))return ret; /*If we don't want to block, check to see if there's enough space in the send queue. There's still a chance we might block, even if there is enough space, but it's a much slimmer one. Blocking at all is pretty unlikely, as we won't have any requests queued when _try_not_to_block is set, so if FIONSPACE isn't available (e.g., on Linux), just skip the test.*/ if(_try_not_to_block){ # if defined(FIONSPACE) int available; ret=ioctl(_conn->fd,FIONSPACE,&available); if(ret<0||available<_stream->request.nbuf)return 1; # endif } ret=op_http_conn_write_fully(_conn, _stream->request.buf,_stream->request.nbuf); if(OP_UNLIKELY(ret<0))return ret; _conn->next_pos=_pos; _conn->next_end=next_end; /*Save the chunk size to use for the next request.*/ _conn->chunk_size=_chunk_size; _conn->nrequests_left--; return ret; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %ecx, %ebp movq %rdx, %r13 movq %rsi, %rbx movq %rdi, %r15 movl 0x28c(%rdi), %eax leaq 0x230(%rdi), %r12 movl %eax, 0x238(%rdi) movq %r12, %rdi movq %rdx, %rsi callq 0x8d62 movl %eax, %r14d leaq 0x7649(%rip), %rsi # 0x1001b pushq $0x1 popq %rdx movq %r12, %rdi callq 0x7b66 movq %rbp, %rsi movl %eax, %ebp orl %r14d, %ebp pushq $-0x1 popq %r14 pushq $-0x1 popq %rdx testl %esi, %esi movq %r13, 0x10(%rsp) jle 0x8a54 movq %r14, %rcx leal (%rsi,%rsi), %r14d movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF xorq %r14, %rax cmpq %r13, %rax cmovgeq %r13, %rax addq %r14, %rax cmpq 0x260(%r15), %rax jge 0x8a5a movq %r13, %rax movl %esi, %r13d movq %rsi, 0x8(%rsp) leaq (%rax,%r13), %rsi decq %rsi addq %rax, %r13 movq %r12, %rdi callq 0x8d62 orl %eax, %ebp cmpl $0x80001, 0x8(%rsp) # imm = 0x80001 pushq $-0x1 popq %rax cmovael %eax, %r14d movl %r14d, 0x8(%rsp) movq %r13, %r14 jmp 0x8a61 movl %edx, 0x8(%rsp) jmp 0x8a61 movl %edx, 0x8(%rsp) movq %rcx, %r14 leaq 0x8290(%rip), %rsi # 0x10cf8 pushq $0x4 popq %rdx movq %r12, %rdi callq 0x7b66 orl %ebp, %eax js 0x8aa8 movq 0x230(%r15), %rsi movl 0x238(%r15), %edx movq %rbx, %rdi callq 0xf05c testl %eax, %eax js 0x8aa8 movq 0x10(%rsp), %rcx movq %rcx, 0x10(%rbx) movq %r14, 0x18(%rbx) movl 0x8(%rsp), %ecx movl %ecx, 0x58(%rbx) decl 0x54(%rbx) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x8ab7
op_http_conn_handle_response
static int op_http_conn_handle_response(OpusHTTPStream *_stream, OpusHTTPConn *_conn){ char *next; char *status_code; opus_int64 range_length; opus_int64 next_pos; opus_int64 next_end; int ret; ret=op_http_conn_read_response(_conn,&_stream->response); /*If the server just closed the connection on us, we may have just hit a connection re-use limit, so we might want to retry.*/ if(OP_UNLIKELY(ret<0))return ret==OP_EREAD?1:ret; next=op_http_parse_status_line(NULL,&status_code,_stream->response.buf); if(OP_UNLIKELY(next==NULL))return OP_FALSE; /*We _need_ a 206 Partial Content response. Nothing else will do.*/ if(strncmp(status_code,"206",3)!=0){ /*But on a 408 Request Timeout, we might want to re-try.*/ return strncmp(status_code,"408",3)==0?1:OP_FALSE; } next_pos=_conn->next_pos; next_end=_conn->next_end; range_length=-1; for(;;){ char *header; char *cdr; ret=op_http_get_next_header(&header,&cdr,&next); if(OP_UNLIKELY(ret<0))return ret; if(header==NULL)break; if(strcmp(header,"content-range")==0){ opus_int64 range_first; opus_int64 range_last; /*Two Content-Range headers?*/ if(OP_UNLIKELY(range_length>=0))return OP_FALSE; ret=op_http_parse_content_range(&range_first,&range_last, &range_length,cdr); if(OP_UNLIKELY(ret<0))return ret; /*"A response with satus code 206 (Partial Content) MUST NOT include a Content-Range field with a byte-range-resp-spec of '*'."*/ if(OP_UNLIKELY(range_first<0)||OP_UNLIKELY(range_last<0))return OP_FALSE; /*We also don't want range_last to overflow.*/ if(OP_UNLIKELY(range_last>=OP_INT64_MAX))return OP_FALSE; range_last++; /*Quit if we didn't get the offset we asked for.*/ if(range_first!=next_pos)return OP_FALSE; if(next_end<0){ /*We asked for the rest of the resource.*/ if(range_length>=0){ /*Quit if we didn't get it.*/ if(OP_UNLIKELY(range_last!=range_length))return OP_FALSE; } /*If there was no length, use the end of the range.*/ else range_length=range_last; next_end=range_last; } else{ if(range_last!=next_end)return OP_FALSE; /*If there was no length, use the larger of the content length or the end of this chunk.*/ if(range_length<0){ range_length=OP_MAX(range_last,_stream->content_length); } } } else if(strcmp(header,"content-length")==0){ opus_int64 content_length; /*Validate the Content-Length header, if present, against the request we made.*/ content_length=op_http_parse_content_length(cdr); if(OP_UNLIKELY(content_length<0))return (int)content_length; if(next_end<0){ /*If we haven't seen the Content-Range header yet and we asked for the rest of the resource, set next_end, so we can make sure they match when we do find the Content-Range header.*/ if(OP_UNLIKELY(next_pos>OP_INT64_MAX-content_length))return OP_FALSE; next_end=next_pos+content_length; } /*Otherwise, make sure they match now.*/ else if(OP_UNLIKELY(next_end-next_pos!=content_length))return OP_FALSE; } else if(strcmp(header,"connection")==0){ ret=op_http_parse_connection(cdr); if(OP_UNLIKELY(ret<0))return ret; /*If the server told us it was going to close the connection, don't make any more requests.*/ if(OP_UNLIKELY(ret>0))_conn->nrequests_left=0; } } /*No Content-Range header.*/ if(OP_UNLIKELY(range_length<0))return OP_FALSE; /*Update the content_length if necessary.*/ _stream->content_length=range_length; _conn->pos=next_pos; _conn->end_pos=next_end; _conn->next_pos=-1; return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %rbx movq %rdi, %r14 leaq 0x250(%rdi), %r15 movq %rsi, %rdi movq %r15, %rsi callq 0x7ea1 testl %eax, %eax js 0x8d55 movq (%r15), %rdx leaq 0x28(%rsp), %rsi xorl %edi, %edi callq 0x8126 movq %rax, 0x30(%rsp) testq %rax, %rax je 0x8d4f movq 0x28(%rsp), %r15 leaq 0x81ef(%rip), %rsi # 0x10cfd pushq $0x3 popq %rdx movq %r15, %rdi callq 0x31a0 testl %eax, %eax je 0x8b40 leaq 0x81dd(%rip), %rsi # 0x10d01 pushq $0x3 popq %rdx movq %r15, %rdi callq 0x31a0 xorl %r15d, %r15d negl %eax sbbl %r15d, %r15d orl $0x1, %r15d jmp 0x8d3d movq 0x10(%rbx), %r13 movq 0x18(%rbx), %rbp movq %rsp, %rax orq $-0x1, (%rax) leaq 0x20(%rsp), %rdi leaq 0x8(%rsp), %rsi leaq 0x30(%rsp), %rdx callq 0x8259 testl %eax, %eax js 0x8cf8 movq 0x20(%rsp), %r12 testq %r12, %r12 je 0x8bd7 movq %r12, %rdi leaq 0x7ee1(%rip), %rsi # 0x10a60 callq 0x3470 testl %eax, %eax je 0x8bdf movq %r12, %rdi leaq 0x7ebf(%rip), %rsi # 0x10a51 callq 0x3470 testl %eax, %eax je 0x8c78 movq %r12, %rdi leaq 0x7ec5(%rip), %rsi # 0x10a6e callq 0x3470 testl %eax, %eax jne 0x8cc7 movq 0x8(%rsp), %rdi callq 0x8541 testl %eax, %eax js 0x8cf8 je 0x8cc7 andl $0x0, 0x54(%rbx) jmp 0x8cc7 pushq $0x2 popq %rcx jmp 0x8cc9 cmpq $0x0, (%rsp) jns 0x8c6d movq 0x8(%rsp), %rcx leaq 0x10(%rsp), %rdi leaq 0x18(%rsp), %rsi movq %rsp, %rdx callq 0x83e1 testl %eax, %eax js 0x8d00 movq 0x10(%rsp), %rdx testq %rdx, %rdx js 0x8c6d movq 0x18(%rsp), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, %rax ja 0x8c6d leaq 0x1(%rax), %rcx movq %rcx, 0x18(%rsp) cmpq %r13, %rdx jne 0x8c6d testq %rbp, %rbp js 0x8c5f cmpq %rbp, %rcx jne 0x8c6d movb $0x1, %dl cmpq $0x0, (%rsp) jns 0x8c5a movq 0x260(%r14), %rsi cmpq %rsi, %rax cmovlq %rsi, %rcx movq %rcx, (%rsp) movq %rbp, %rcx jmp 0x8cbd movq (%rsp), %rax testq %rax, %rax js 0x8cb7 cmpq %rax, %rcx je 0x8cbb xorl %edx, %edx movq %rbp, %rcx pushq $-0x1 popq %r15 jmp 0x8cbd movq 0x8(%rsp), %rsi leaq 0x10(%rsp), %rdi callq 0x87e5 movq 0x10(%rsp), %rcx xorl %edx, %edx cmpb (%rcx), %dl movl $0x0, %ecx sbbq %rcx, %rcx orq %rax, %rcx js 0x8d0a testq %rbp, %rbp js 0x8cd2 movq %rbp, %rax subq %r13, %rax cmpq %rcx, %rax sete %al pushq $-0x1 popq %rcx cmovnel %ecx, %r15d jmp 0x8cef movq %rcx, (%rsp) movb $0x1, %dl movq %rcx, %rbp pushq $0x1 popq %rcx testb %dl, %dl je 0x8cc9 xorl %ecx, %ecx testl %ecx, %ecx jne 0x8d19 jmp 0x8b4f movabsq $0x7ffffffffffffffe, %rax # imm = 0x7FFFFFFFFFFFFFFE subq %rcx, %rax incq %rax cmpq %rax, %r13 jg 0x8d11 addq %r13, %rcx movb $0x1, %al movq %rcx, %rbp pushq $0x1 popq %rcx testb %al, %al jne 0x8cc7 jmp 0x8cc9 pushq $0x1 popq %rcx movl %eax, %r15d jmp 0x8cc9 xorl %edx, %edx movq %rbp, %rcx movl %eax, %r15d jmp 0x8cbd xorl %eax, %eax movl %ecx, %r15d jmp 0x8cef xorl %eax, %eax pushq $-0x1 popq %r15 jmp 0x8cef cmpl $0x2, %ecx jne 0x8d3d movq (%rsp), %rax testq %rax, %rax js 0x8d4f movq %rax, 0x260(%r14) movq %r13, (%rbx) movq %rbp, 0x8(%rbx) orq $-0x1, 0x10(%rbx) xorl %r15d, %r15d movl %r15d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $-0x1 popq %r15 jmp 0x8d3d cmpl $-0x80, %eax pushq $0x1 popq %r15 cmovnel %eax, %r15d jmp 0x8d3d
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x8d62
op_sb_append_nonnegative_int64
static int op_sb_append_nonnegative_int64(OpusStringBuf *_sb,opus_int64 _i){ char digit; int nbuf_start; int ret; OP_ASSERT(_i>=0); nbuf_start=_sb->nbuf; ret=0; do{ digit='0'+_i%10; ret|=op_sb_append(_sb,&digit,1); _i/=10; } while(_i>0); if(OP_LIKELY(ret>=0)){ char *buf; int nbuf_end; buf=_sb->buf; nbuf_end=_sb->nbuf-1; /*We've added the digits backwards. Reverse them.*/ while(nbuf_start<nbuf_end){ digit=buf[nbuf_start]; buf[nbuf_start]=buf[nbuf_end]; buf[nbuf_end]=digit; nbuf_start++; nbuf_end--; } } return ret; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r15 movq %rdi, %r14 movslq 0x8(%rdi), %r12 xorl %ebx, %ebx pushq $0x1 popq %rbp movq %r15, %rax cqto pushq $0xa popq %rcx idivq %rcx movq %rax, %r13 addb $0x30, %dl movb %dl, 0x7(%rsp) movq %r14, %rdi leaq 0x7(%rsp), %rsi movl %ebp, %edx callq 0x7b66 orl %eax, %ebx cmpq $0x9, %r15 movq %r13, %r15 jg 0x8d7c testl %ebx, %ebx js 0x8dec movslq 0x8(%r14), %rax leal -0x1(%rax), %ecx cmpl %ecx, %r12d jge 0x8de4 movq (%r14), %rcx addq $-0x2, %rax movb (%rcx,%r12), %dl movb 0x1(%rcx,%rax), %sil movb %sil, (%rcx,%r12) movb %dl, 0x1(%rcx,%rax) incq %r12 leaq -0x1(%rax), %rsi cmpq %rax, %r12 movq %rsi, %rax jl 0x8dc2 jmp 0x8de8 movb 0x7(%rsp), %dl movb %dl, 0x7(%rsp) movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
0x8dfd
op_http_conn_read_ahead
static int op_http_conn_read_ahead(OpusHTTPStream *_stream, OpusHTTPConn *_conn,int _just_read_ahead,opus_int64 _target){ opus_int64 pos; opus_int64 end_pos; opus_int64 next_pos; opus_int64 next_end; ptrdiff_t nread; int ret; pos=_conn->pos; end_pos=_conn->end_pos; next_pos=_conn->next_pos; next_end=_conn->next_end; if(!_just_read_ahead){ /*We need to issue a new pipelined request. This is the only case where we allow more than one outstanding request at a time, so we need to reset next_pos (we'll restore it below if we did have an outstanding request).*/ OP_ASSERT(_stream->pipeline); _conn->next_pos=-1; ret=op_http_conn_send_request(_stream,_conn,_target, OP_PIPELINE_CHUNK_SIZE,0); if(OP_UNLIKELY(ret<0))return ret; } /*We can reach the target position by reading forward in the current chunk.*/ if(_just_read_ahead&&(end_pos<0||_target<end_pos))end_pos=_target; else if(next_pos>=0){ opus_int64 next_next_pos; opus_int64 next_next_end; /*We already have a request outstanding. Finish off the current chunk.*/ while(pos<end_pos){ nread=op_http_conn_read(_conn,_stream->response.buf, (int)OP_MIN(end_pos-pos,_stream->response.cbuf),1); /*We failed to read ahead.*/ if(nread<=0)return OP_FALSE; pos+=nread; } OP_ASSERT(pos==end_pos); if(_just_read_ahead){ next_next_pos=next_next_end=-1; end_pos=_target; } else{ OP_ASSERT(_conn->next_pos==_target); next_next_pos=_target; next_next_end=_conn->next_end; _conn->next_pos=next_pos; _conn->next_end=next_end; end_pos=next_end; } ret=op_http_conn_handle_response(_stream,_conn); if(OP_UNLIKELY(ret!=0))return OP_FALSE; _conn->next_pos=next_next_pos; _conn->next_end=next_next_end; } while(pos<end_pos){ nread=op_http_conn_read(_conn,_stream->response.buf, (int)OP_MIN(end_pos-pos,_stream->response.cbuf),1); /*We failed to read ahead.*/ if(nread<=0)return OP_FALSE; pos+=nread; } OP_ASSERT(pos==end_pos); if(!_just_read_ahead){ ret=op_http_conn_handle_response(_stream,_conn); if(OP_UNLIKELY(ret!=0))return OP_FALSE; } else _conn->pos=end_pos; OP_ASSERT(_conn->pos==_target); return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq (%rsi), %r13 movq 0x8(%rsi), %r12 movq 0x10(%rsi), %rbp movq 0x18(%rsi), %rsi movl %edx, 0x14(%rsp) testl %edx, %edx je 0x8edd testq %r12, %r12 sets %al cmpq %rbx, %r12 setg %cl orb %al, %cl jne 0x8ebd testq %rbp, %rbp js 0x8e8d movq %rsi, 0x8(%rsp) cmpq %r12, %r13 jge 0x8f09 movq 0x250(%r15), %rsi movq %r12, %rdx subq %r13, %rdx movslq 0x25c(%r15), %rax cmpq %rax, %rdx cmovgel %eax, %edx movq %r14, %rdi callq 0xf3d5 testl %eax, %eax jle 0x8e7f movl %eax, %eax addq %rax, %r13 jmp 0x8e49 xorl %eax, %eax movq %r12, %rbx testb %al, %al jne 0x8ebd pushq $-0x1 popq %rax jmp 0x8ece movq %r12, %rbx jmp 0x8ebd movq 0x250(%r15), %rsi movq %rbx, %rdx subq %r13, %rdx movslq 0x25c(%r15), %rax cmpq %rax, %rdx cmovgel %eax, %edx movq %r14, %rdi callq 0xf3d5 testl %eax, %eax jle 0x8e88 movl %eax, %eax addq %rax, %r13 cmpq %rbx, %r13 jl 0x8e92 cmpl $0x0, 0x14(%rsp) je 0x8f23 movq %rbx, (%r14) xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq orq $-0x1, 0x10(%r14) movq %r15, %rdi movq %rsi, 0x8(%rsp) movq %r14, %rsi movq %rbx, %rdx movl $0x8000, %ecx # imm = 0x8000 callq 0x8991 movq 0x8(%rsp), %rsi testl %eax, %eax jns 0x8e3f jmp 0x8ece cmpl $0x0, 0x14(%rsp) jne 0x8f37 movq 0x18(%r14), %r12 movq %rbp, 0x10(%r14) movq 0x8(%rsp), %rax movq %rax, 0x18(%r14) jmp 0x8f43 movq %r15, %rdi movq %r14, %rsi callq 0x8ab7 testl %eax, %eax pushq $-0x1 popq %rax je 0x8ecc jmp 0x8ece pushq $-0x1 popq %r12 movq %rbx, 0x8(%rsp) movq %r12, %rbx movq %r15, %rdi movq %r14, %rsi callq 0x8ab7 testl %eax, %eax jne 0x8f66 movq %rbx, 0x10(%r14) movq %r12, 0x18(%r14) movb $0x1, %al movq 0x8(%rsp), %r12 jmp 0x8e81 xorl %eax, %eax jmp 0x8f5c
/xiph[P]opusfile/src/http.c
xiph[P]opusfile[P]build_O1[P]opusfile_example
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
7