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
|
0x910c
|
main
|
int main(int _argc,const char **_argv){
OggOpusFile *of;
ogg_int64_t duration;
unsigned char wav_header[44];
int ret;
int is_ssl;
int output_seekable;
#if defined(_WIN32)
win32_utf8_setup(&_argc,&_argv);
#endif
if(_argc!=2){
fprintf(stderr,"Usage: %s <file.opus>\n",_argv[0]);
return EXIT_FAILURE;
}
is_ssl=0;
if(strcmp(_argv[1],"-")==0){
OpusFileCallbacks cb={NULL,NULL,NULL,NULL};
of=op_open_callbacks(op_fdopen(&cb,fileno(stdin),"rb"),&cb,NULL,0,&ret);
}
else{
OpusServerInfo info;
/*Try to treat the argument as a URL.*/
of=op_open_url(_argv[1],&ret,OP_GET_SERVER_INFO(&info),NULL);
#if 0
if(of==NULL){
OpusFileCallbacks cb={NULL,NULL,NULL,NULL};
void *fp;
/*For debugging: force a file to not be seekable.*/
fp=op_fopen(&cb,_argv[1],"rb");
cb.seek=NULL;
cb.tell=NULL;
of=op_open_callbacks(fp,&cb,NULL,0,NULL);
}
#else
if(of==NULL)of=op_open_file(_argv[1],&ret);
#endif
else{
if(info.name!=NULL){
fprintf(stderr,"Station name: %s\n",info.name);
}
if(info.description!=NULL){
fprintf(stderr,"Station description: %s\n",info.description);
}
if(info.genre!=NULL){
fprintf(stderr,"Station genre: %s\n",info.genre);
}
if(info.url!=NULL){
fprintf(stderr,"Station homepage: %s\n",info.url);
}
if(info.bitrate_kbps>=0){
fprintf(stderr,"Station bitrate: %u kbps\n",
(unsigned)info.bitrate_kbps);
}
if(info.is_public>=0){
fprintf(stderr,"%s\n",
info.is_public?"Station is public.":"Station is private.");
}
if(info.server!=NULL){
fprintf(stderr,"Server software: %s\n",info.server);
}
if(info.content_type!=NULL){
fprintf(stderr,"Content-Type: %s\n",info.content_type);
}
is_ssl=info.is_ssl;
opus_server_info_clear(&info);
}
}
if(of==NULL){
fprintf(stderr,"Failed to open file '%s': %i\n",_argv[1],ret);
return EXIT_FAILURE;
}
duration=0;
output_seekable=fseek(stdout,0,SEEK_CUR)!=-1;
if(op_seekable(of)){
opus_int64 size;
fprintf(stderr,"Total number of links: %i\n",op_link_count(of));
duration=op_pcm_total(of,-1);
fprintf(stderr,"Total duration: ");
print_duration(stderr,duration,3);
fprintf(stderr," (%li samples @ 48 kHz)\n",(long)duration);
size=op_raw_total(of,-1);
fprintf(stderr,"Total size: ");
print_size(stderr,size,0,"");
fprintf(stderr,"\n");
}
else if(!output_seekable){
fprintf(stderr,"WARNING: Neither input nor output are seekable.\n");
fprintf(stderr,
"Writing non-standard WAV header with invalid chunk sizes.\n");
}
make_wav_header(wav_header,duration);
if(!fwrite(wav_header,sizeof(wav_header),1,stdout)){
fprintf(stderr,"Error writing WAV header: %s\n",strerror(errno));
ret=EXIT_FAILURE;
}
else{
ogg_int64_t pcm_offset;
ogg_int64_t pcm_print_offset;
ogg_int64_t nsamples;
opus_int32 bitrate;
int prev_li;
prev_li=-1;
nsamples=0;
pcm_offset=op_pcm_tell(of);
if(pcm_offset!=0){
fprintf(stderr,"Non-zero starting PCM offset: %li\n",(long)pcm_offset);
}
pcm_print_offset=pcm_offset-48000;
bitrate=0;
for(;;){
ogg_int64_t next_pcm_offset;
opus_int16 pcm[120*48*2];
unsigned char out[120*48*2*2];
int li;
int si;
/*Although we would generally prefer to use the float interface, WAV
files with signed, 16-bit little-endian samples are far more
universally supported, so that's what we output.*/
ret=op_read_stereo(of,pcm,sizeof(pcm)/sizeof(*pcm));
if(ret==OP_HOLE){
fprintf(stderr,"\nHole detected! Corrupt file segment?\n");
continue;
}
else if(ret<0){
fprintf(stderr,"\nError decoding '%s': %i\n",_argv[1],ret);
if(is_ssl)fprintf(stderr,"Possible truncation attack?\n");
ret=EXIT_FAILURE;
break;
}
li=op_current_link(of);
if(li!=prev_li){
const OpusHead *head;
const OpusTags *tags;
int binary_suffix_len;
int ci;
/*We found a new link.
Print out some information.*/
fprintf(stderr,"Decoding link %i: \n",li);
head=op_head(of,li);
fprintf(stderr," Channels: %i\n",head->channel_count);
if(op_seekable(of)){
ogg_int64_t duration;
opus_int64 size;
duration=op_pcm_total(of,li);
fprintf(stderr," Duration: ");
print_duration(stderr,duration,3);
fprintf(stderr," (%li samples @ 48 kHz)\n",(long)duration);
size=op_raw_total(of,li);
fprintf(stderr," Size: ");
print_size(stderr,size,0,"");
fprintf(stderr,"\n");
}
if(head->input_sample_rate){
fprintf(stderr," Original sampling rate: %lu Hz\n",
(unsigned long)head->input_sample_rate);
}
tags=op_tags(of,li);
fprintf(stderr," Encoded by: %s\n",tags->vendor);
for(ci=0;ci<tags->comments;ci++){
const char *comment;
comment=tags->user_comments[ci];
if(opus_tagncompare("METADATA_BLOCK_PICTURE",22,comment)==0){
OpusPictureTag pic;
int err;
err=opus_picture_tag_parse(&pic,comment);
fprintf(stderr," %.23s",comment);
if(err>=0){
fprintf(stderr,"%u|%s|%s|%ux%ux%u",pic.type,pic.mime_type,
pic.description,pic.width,pic.height,pic.depth);
if(pic.colors!=0)fprintf(stderr,"/%u",pic.colors);
if(pic.format==OP_PIC_FORMAT_URL){
fprintf(stderr,"|%s\n",pic.data);
}
else{
fprintf(stderr,"|<%u bytes of image data>\n",pic.data_length);
}
opus_picture_tag_clear(&pic);
}
else fprintf(stderr,"<error parsing picture tag>\n");
}
else fprintf(stderr," %s\n",tags->user_comments[ci]);
}
if(opus_tags_get_binary_suffix(tags,&binary_suffix_len)!=NULL){
fprintf(stderr,"<%u bytes of unknown binary metadata>\n",
binary_suffix_len);
}
fprintf(stderr,"\n");
if(!op_seekable(of)){
pcm_offset=op_pcm_tell(of)-ret;
if(pcm_offset!=0){
fprintf(stderr,"Non-zero starting PCM offset in link %i: %li\n",
li,(long)pcm_offset);
}
}
}
if(li!=prev_li||pcm_offset>=pcm_print_offset+48000){
opus_int32 next_bitrate;
opus_int64 raw_offset;
next_bitrate=op_bitrate_instant(of);
if(next_bitrate>=0)bitrate=next_bitrate;
raw_offset=op_raw_tell(of);
fprintf(stderr,"\r ");
print_size(stderr,raw_offset,0,"");
fprintf(stderr," ");
print_duration(stderr,pcm_offset,0);
fprintf(stderr," (");
print_size(stderr,bitrate,1," ");
fprintf(stderr,"bps) \r");
pcm_print_offset=pcm_offset;
fflush(stderr);
}
next_pcm_offset=op_pcm_tell(of);
if(pcm_offset+ret!=next_pcm_offset){
fprintf(stderr,"\nPCM offset gap! %li+%i!=%li\n",
(long)pcm_offset,ret,(long)next_pcm_offset);
}
pcm_offset=next_pcm_offset;
if(ret<=0){
ret=EXIT_SUCCESS;
break;
}
/*Ensure the data is little-endian before writing it out.*/
for(si=0;si<2*ret;si++){
out[2*si+0]=(unsigned char)(pcm[si]&0xFF);
out[2*si+1]=(unsigned char)(pcm[si]>>8&0xFF);
}
if(!fwrite(out,sizeof(*out)*4*ret,1,stdout)){
fprintf(stderr,"\nError writing decoded audio data: %s\n",
strerror(errno));
ret=EXIT_FAILURE;
break;
}
nsamples+=ret;
prev_li=li;
}
if(ret==EXIT_SUCCESS){
fprintf(stderr,"\nDone: played ");
print_duration(stderr,nsamples,3);
fprintf(stderr," (%li samples @ 48 kHz).\n",(long)nsamples);
}
if(op_seekable(of)&&nsamples!=duration){
fprintf(stderr,"\nWARNING: "
"Number of output samples does not match declared file duration.\n");
if(!output_seekable)fprintf(stderr,"Output WAV file will be corrupt.\n");
}
if(output_seekable&&nsamples!=duration){
make_wav_header(wav_header,nsamples);
if(fseek(stdout,0,SEEK_SET)||
!fwrite(wav_header,sizeof(wav_header),1,stdout)){
fprintf(stderr,"Error rewriting WAV header: %s\n",strerror(errno));
ret=EXIT_FAILURE;
}
}
}
op_free(of);
return ret;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb478, %rsp # imm = 0xB478
movq %rsi, %r15
cmpl $0x2, %edi
jne 0x97b2
movq 0x8(%r15), %rbx
addq $0x8, %r15
leaq 0x6ee3(%rip), %rsi # 0x1001b
movq %rbx, %rdi
callq 0x3470
testl %eax, %eax
je 0x920c
movq %rsp, %rsi
leaq 0x5a70(%rsp), %rcx
movl $0x1a80, %edx # imm = 0x1A80
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xe57f
testq %rax, %rax
je 0x9252
movq %rax, %rbx
movq 0x5a70(%rsp), %rdx
testq %rdx, %rdx
jne 0x986a
movq 0x5a78(%rsp), %rdx
testq %rdx, %rdx
jne 0x9887
movq 0x5a80(%rsp), %rdx
testq %rdx, %rdx
jne 0x98a4
movq 0x5a88(%rsp), %rdx
testq %rdx, %rdx
jne 0x98c1
movl 0x5aa0(%rsp), %edx
testl %edx, %edx
jns 0x98de
movl 0x5aa4(%rsp), %edi
testl %edi, %edi
jns 0x98fb
movq 0x5a90(%rsp), %rdx
testq %rdx, %rdx
jne 0x9905
movq 0x5a98(%rsp), %rdx
testq %rdx, %rdx
jne 0x9922
leaq 0x5a70(%rsp), %rdi
cmpl $0x0, 0x38(%rdi)
sete %bpl
callq 0xe17a
jmp 0x9263
xorps %xmm0, %xmm0
leaq 0x5a70(%rsp), %rbx
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movq 0xbdb3(%rip), %rax # 0x14fd8
movq (%rax), %rdi
callq 0x3340
leaq 0x6de9(%rip), %rdx # 0x1001d
movq %rbx, %rdi
movl %eax, %esi
callq 0xdf77
movq %rsp, %r8
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x46ec
jmp 0x925d
movq (%r15), %rdi
movq %rsp, %rsi
callq 0xbf38
movq %rax, %rbx
movb $0x1, %bpl
testq %rbx, %rbx
je 0x97bc
movq 0xbd4d(%rip), %r13 # 0x14fc0
movq (%r13), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x33a0
movl %eax, %r12d
movq %rbx, %rdi
callq 0xc098
testl %eax, %eax
jne 0x97e1
cmpl $-0x1, %r12d
je 0x9826
xorl %esi, %esi
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq %rsi, 0x10(%rsp)
callq 0x9d8a
movq (%r13), %rcx
movl $0x2c, %esi
movl $0x1, %edx
movq %r14, %rdi
callq 0x3690
testq %rax, %rax
je 0x97fc
movl %r12d, 0x8(%rsp)
movq %r15, 0x38(%rsp)
movq %rbx, %rdi
callq 0x545f
movq %rax, %r15
testq %rax, %rax
jne 0x9830
movq %r15, %rax
addq $-0xbb80, %rax # imm = 0xFFFF4480
movq %rax, 0x28(%rsp)
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
movzbl %bpl, %eax
movl %eax, 0xc(%rsp)
movl $0x0, 0x4(%rsp)
movq $0x0, 0x20(%rsp)
movq %rbx, 0x30(%rsp)
movq %rbx, %rdi
leaq 0x5a70(%rsp), %rsi
movl $0x2d00, %edx # imm = 0x2D00
callq 0x5a6e
movl %eax, (%rsp)
cmpl $-0x3, %eax
je 0x9404
testl %eax, %eax
js 0x940d
movq %rbx, %rdi
callq 0x4860
movl %eax, %r14d
cmpl %r12d, %eax
jne 0x9422
movq %r15, %rbp
cmpl %r12d, %r14d
jne 0x96b6
movq 0x28(%rsp), %rax
addq $0xbb80, %rax # imm = 0xBB80
cmpq %rax, %rbp
jge 0x96b6
movq %rbx, %rdi
callq 0x545f
movq %rax, %r15
movslq (%rsp), %rcx
leaq (%rcx,%rbp), %rax
cmpq %r15, %rax
jne 0x9693
movl (%rsp), %esi
testl %esi, %esi
jle 0x93ee
leaq (%rsi,%rsi), %rax
xorl %ecx, %ecx
movzwl 0x5a70(%rsp,%rcx,2), %edx
movw %dx, 0x70(%rsp,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0x93a9
shlq $0x2, %rsi
movq (%r13), %rcx
movl $0x1, %edx
leaq 0x70(%rsp), %rdi
callq 0x3690
testq %rax, %rax
je 0x96dc
movslq (%rsp), %rax
addq %rax, 0x20(%rsp)
xorl %eax, %eax
movl %r14d, %r12d
jmp 0x93f7
movl $0x0, (%rsp)
movb $0x1, %al
testb %al, %al
je 0x9323
jmp 0x971b
callq 0x3aaf
xorl %eax, %eax
jmp 0x93f7
movq 0x38(%rsp), %rdi
movl %eax, %esi
movl 0xc(%rsp), %edx
movq %rsp, %rcx
callq 0x3a5e
jmp 0x93f5
movq 0xbbb7(%rip), %r13 # 0x14fe0
movq (%r13), %rdi
leaq 0x6e23(%rip), %rsi # 0x10257
movl %r14d, %edx
xorl %eax, %eax
callq 0x34c0
movq %rbx, %rdi
movl %r14d, %esi
callq 0xc0fe
movq %rax, %rbp
movq (%r13), %rdi
movl 0x4(%rax), %edx
leaq 0x6e2a(%rip), %rsi # 0x10284
xorl %eax, %eax
callq 0x34c0
movq %rbx, %rdi
callq 0xc098
testl %eax, %eax
je 0x9478
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3852
movl 0xc(%rbp), %edx
testq %rdx, %rdx
movq 0xbb3b(%rip), %r13 # 0x14fc0
je 0x949f
movq 0xbb52(%rip), %rax # 0x14fe0
movq (%rax), %rdi
leaq 0x6e12(%rip), %rsi # 0x102aa
xorl %eax, %eax
callq 0x34c0
movq %rbx, %rdi
movl %r14d, %esi
callq 0xc130
movq %rax, %rbx
movq 0xbb2c(%rip), %rax # 0x14fe0
movq (%rax), %rdi
movq 0x18(%rbx), %rdx
leaq 0x6e0a(%rip), %rsi # 0x102cc
xorl %eax, %eax
callq 0x34c0
cmpl $0x0, 0x10(%rbx)
jle 0x9638
xorl %ebp, %ebp
movq %rbx, 0x18(%rsp)
movq (%rbx), %rax
movq (%rax,%rbp,8), %r13
leaq 0x6df6(%rip), %rdi # 0x102de
movl $0x16, %esi
movq %r13, %rdx
callq 0xa093
testl %eax, %eax
jne 0x95ce
leaq 0x70(%rsp), %rdi
movq %r13, %rsi
callq 0xa1d6
movl %eax, %ebx
movq 0xbacd(%rip), %rax # 0x14fe0
movq (%rax), %rdi
leaq 0x6dd8(%rip), %rsi # 0x102f5
movq %r13, %rdx
xorl %eax, %eax
callq 0x34c0
movq 0xbab2(%rip), %rax # 0x14fe0
movq (%rax), %rdi
testl %ebx, %ebx
js 0x95f6
movl 0x70(%rsp), %edx
movq 0x78(%rsp), %rcx
movq 0x80(%rsp), %r8
movl 0x88(%rsp), %r9d
movl 0x8c(%rsp), %r10d
movl 0x90(%rsp), %r11d
leaq 0x6d94(%rip), %rsi # 0x102fd
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x34c0
addq $0x10, %rsp
movl 0x94(%rsp), %edx
testl %edx, %edx
movq 0xba38(%rip), %r13 # 0x14fc0
je 0x95a2
movq 0xba4f(%rip), %rax # 0x14fe0
movq (%rax), %rdi
leaq 0x6d74(%rip), %rsi # 0x1030f
xorl %eax, %eax
callq 0x34c0
cmpl $0x0, 0xa8(%rsp)
movq 0xba2f(%rip), %rax # 0x14fe0
movq (%rax), %rdi
jne 0x9604
movq 0xa0(%rsp), %rdx
leaq 0x6d4e(%rip), %rsi # 0x10313
xorl %eax, %eax
callq 0x34c0
jmp 0x9619
movq 0xba0b(%rip), %rax # 0x14fe0
movq (%rax), %rdi
movq (%rbx), %rax
movq (%rax,%rbp,8), %rdx
leaq 0x6d6a(%rip), %rsi # 0x10350
xorl %eax, %eax
callq 0x34c0
movq 0xb9cc(%rip), %r13 # 0x14fc0
jmp 0x9628
callq 0x38fb
movq 0xb9be(%rip), %r13 # 0x14fc0
jmp 0x9623
movl 0x98(%rsp), %edx
leaq 0x6d06(%rip), %rsi # 0x10318
xorl %eax, %eax
callq 0x34c0
leaq 0x70(%rsp), %rdi
callq 0xaa71
movq 0x18(%rsp), %rbx
incq %rbp
movslq 0x10(%rbx), %rax
cmpq %rax, %rbp
jl 0x94da
movq %rbx, %rdi
leaq 0x70(%rsp), %rsi
callq 0xa0be
testq %rax, %rax
jne 0x96e9
movq 0xb98b(%rip), %rax # 0x14fe0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x3430
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0xc098
testl %eax, %eax
jne 0x9360
movq %rbx, %rdi
callq 0x545f
movq %rax, %r15
movslq (%rsp), %rax
subq %rax, %r15
jne 0x96f8
xorl %r15d, %r15d
jmp 0x9360
movq 0xb946(%rip), %rax # 0x14fe0
movq (%rax), %rdi
leaq 0x6d2b(%rip), %rsi # 0x103cf
movq %rbp, %rdx
movq %r15, %r8
xorl %eax, %eax
callq 0x34c0
jmp 0x939c
movq %rbx, %rdi
movl 0x4(%rsp), %esi
movq %rbp, %rdx
leaq 0x70(%rsp), %rcx
callq 0x3939
movl 0x70(%rsp), %eax
movl %eax, 0x4(%rsp)
movq %rbp, 0x28(%rsp)
jmp 0x9380
movq %rsp, %rdi
callq 0x3a1f
jmp 0x93f5
leaq 0x70(%rsp), %rdi
callq 0x3916
jmp 0x964e
movq 0xb8e1(%rip), %rax # 0x14fe0
movq (%rax), %rdi
leaq 0x6c74(%rip), %rsi # 0x1037d
movl %r14d, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x34c0
jmp 0x9360
cmpl $0x0, (%rsp)
movq 0x20(%rsp), %r14
je 0x9850
movq %rbx, %rdi
callq 0xc098
testl %eax, %eax
movl 0x8(%rsp), %ebp
movq 0x10(%rsp), %rcx
je 0x9748
cmpq %rcx, %r14
jne 0x9806
cmpl $-0x1, %ebp
je 0x9795
cmpq %rcx, %r14
je 0x9795
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x9d8a
movq (%r13), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x33a0
testl %eax, %eax
jne 0x985d
movq (%r13), %rcx
leaq 0x40(%rsp), %rdi
movl $0x2c, %esi
movl $0x1, %edx
callq 0x3690
testq %rax, %rax
je 0x985d
movq %rbx, %rdi
callq 0x4765
movl (%rsp), %eax
addq $0xb478, %rsp # imm = 0xB478
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x36f0
jmp 0x97da
movq 0xb81d(%rip), %rax # 0x14fe0
movq (%rax), %rdi
movq (%r15), %rdx
movl (%rsp), %ecx
leaq 0x6909(%rip), %rsi # 0x100dc
xorl %eax, %eax
callq 0x34c0
movl $0x1, %eax
jmp 0x97a0
leaq 0x5a70(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3743
movq (%r14), %rsi
jmp 0x92a2
movq %rsp, %rdi
callq 0x3ba7
jmp 0x9795
xorl %edi, %edi
cmpl $-0x1, %ebp
sete %dil
callq 0x3b1e
movq 0x10(%rsp), %rcx
testb $0x1, %al
je 0x9748
jmp 0x9752
callq 0x3812
jmp 0x92a0
movq 0xb7a9(%rip), %rax # 0x14fe0
movq (%rax), %rdi
leaq 0x6995(%rip), %rsi # 0x101d6
movq %r15, %rdx
xorl %eax, %eax
callq 0x34c0
jmp 0x92f1
movq %r14, %rdi
callq 0x3ad1
jmp 0x972a
movq %rsp, %rdi
callq 0x3b68
jmp 0x9795
movq 0xb76f(%rip), %rax # 0x14fe0
movq (%rax), %rdi
leaq 0x67a5(%rip), %rsi # 0x10020
xorl %eax, %eax
callq 0x34c0
jmp 0x9182
movq 0xb752(%rip), %rax # 0x14fe0
movq (%rax), %rdi
leaq 0x679a(%rip), %rsi # 0x10032
xorl %eax, %eax
callq 0x34c0
jmp 0x9193
movq 0xb735(%rip), %rax # 0x14fe0
movq (%rax), %rdi
leaq 0x6796(%rip), %rsi # 0x1004b
xorl %eax, %eax
callq 0x34c0
jmp 0x91a4
movq 0xb718(%rip), %rax # 0x14fe0
movq (%rax), %rdi
leaq 0x678c(%rip), %rsi # 0x1005e
xorl %eax, %eax
callq 0x34c0
jmp 0x91b5
movq 0xb6fb(%rip), %rax # 0x14fe0
movq (%rax), %rdi
leaq 0x6785(%rip), %rsi # 0x10074
xorl %eax, %eax
callq 0x34c0
jmp 0x91c4
callq 0x370e
jmp 0x91d3
movq 0xb6d4(%rip), %rax # 0x14fe0
movq (%rax), %rdi
leaq 0x679f(%rip), %rsi # 0x100b5
xorl %eax, %eax
callq 0x34c0
jmp 0x91e4
movq 0xb6b7(%rip), %rax # 0x14fe0
movq (%rax), %rdi
leaq 0x6797(%rip), %rsi # 0x100ca
xorl %eax, %eax
callq 0x34c0
jmp 0x91f5
|
/xiph[P]opusfile/examples/opusfile_example.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0x993f
|
print_duration
|
static void print_duration(FILE *_fp,ogg_int64_t _nsamples,int _frac){
ogg_int64_t seconds;
ogg_int64_t minutes;
ogg_int64_t hours;
ogg_int64_t days;
ogg_int64_t weeks;
_nsamples+=_frac?24:24000;
seconds=_nsamples/48000;
_nsamples-=seconds*48000;
minutes=seconds/60;
seconds-=minutes*60;
hours=minutes/60;
minutes-=hours*60;
days=hours/24;
hours-=days*24;
weeks=days/7;
days-=weeks*7;
if(weeks)fprintf(_fp,"%liw",(long)weeks);
if(weeks||days)fprintf(_fp,"%id",(int)days);
if(weeks||days||hours){
if(weeks||days)fprintf(_fp,"%02ih",(int)hours);
else fprintf(_fp,"%ih",(int)hours);
}
if(weeks||days||hours||minutes){
if(weeks||days||hours)fprintf(_fp,"%02im",(int)minutes);
else fprintf(_fp,"%im",(int)minutes);
fprintf(_fp,"%02i",(int)seconds);
}
else fprintf(_fp,"%i",(int)seconds);
if(_frac)fprintf(_fp,".%03i",(int)(_nsamples/48));
fprintf(_fp,"s");
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbp
leaq 0x18(%rsi), %rax
addq $0x5dc0, %r14 # imm = 0x5DC0
movl %edx, 0x1c(%rsp)
testl %edx, %edx
cmovneq %rax, %r14
movabsq $-0x513cc1e098ead65b, %rcx # imm = 0xAEC33E1F671529A5
movq %r14, %rax
imulq %rcx
addq %r14, %rdx
movq %rdx, 0x10(%rsp)
movabsq $-0x45962422c53ec283, %rcx # imm = 0xBA69DBDD3AC13D7D
movq %r14, %rax
imulq %rcx
movq %rdx, %r13
addq %r14, %r13
movq %r13, %rsi
shrq $0x3f, %rsi
movabsq $0x636ba875fd33dc87, %rcx # imm = 0x636BA875FD33DC87
movq %r14, %rax
imulq %rcx
movq %rdx, %r12
sarq $0x15, %r13
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x1a, %r12
addq %rax, %r12
movabsq $-0x7b7074b803bad9f7, %rcx # imm = 0x848F8B47FC452609
movq %r14, %rax
imulq %rcx
movq %rdx, %rcx
addq %r14, %rcx
movq %rcx, %rax
shrq $0x3f, %rax
sarq $0x1f, %rcx
addq %rax, %rcx
leaq (,%rcx,8), %rax
leaq (%rax,%rax,2), %r8
movabsq $-0x68808564968c66d1, %rdx # imm = 0x977F7A9B6973992F
movq %r14, %rax
imulq %rdx
addq %r14, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x22, %rdx
addq %rax, %rdx
leaq (,%rdx,8), %rax
movq %rdx, %rbx
subq %rax, %rbx
addq %rcx, %rbx
movabsq $-0x6c258c000, %r15 # imm = 0xFFFFFFF93DA74000
addq %r14, %r15
movabsq $-0xd84b18000, %rax # imm = 0xFFFFFFF27B4E8000
cmpq %rax, %r15
ja 0x9a65
movq %rsi, 0x8(%rsp)
leaq 0x6a7e(%rip), %rsi # 0x104ca
movq %rbp, %rdi
xorl %eax, %eax
movq %r8, 0x20(%rsp)
callq 0x34c0
movq 0x20(%rsp), %r8
movq 0x8(%rsp), %rsi
movq %rbp, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, %rbp
shrq $0x3f, %rbp
sarq $0xf, %rax
movq %rax, 0x10(%rsp)
addq %rsi, %r13
movl $0xffffffc4, %edx # imm = 0xFFFFFFC4
imulq $-0x3c, %r12, %rcx
subq %r8, %r12
movabsq $-0xd84b17fff, %rax # imm = 0xFFFFFFF27B4E8001
cmpq %rax, %r15
setb %al
testq %rbx, %rbx
setne %r15b
orb %al, %r15b
cmpb $0x1, %r15b
jne 0x9ace
leaq 0x6a1a(%rip), %rsi # 0x104cf
movq 0x8(%rsp), %rdi
movl %ebx, %edx
xorl %eax, %eax
movq %rcx, %rbx
callq 0x34c0
movq %rbx, %rcx
movl $0xffffffc4, %edx # imm = 0xFFFFFFC4
movq 0x10(%rsp), %rax
addq %rbp, %rax
movq %rax, %rbp
imulq %r13, %rdx
addq %r13, %rcx
testq %r12, %r12
setne %bl
orb %r15b, %bl
cmpb $0x1, %bl
movq 0x8(%rsp), %r13
jne 0x9b21
leaq 0x69d9(%rip), %rax # 0x104d3
leaq 0x69d8(%rip), %rsi # 0x104d9
testb %r15b, %r15b
cmovneq %rax, %rsi
movq %r13, %rdi
movq %rdx, %r15
movl %r12d, %edx
xorl %eax, %eax
movq %rcx, %r12
callq 0x34c0
movq %r12, %rcx
movq %r15, %rdx
addq %rbp, %rdx
testq %rcx, %rcx
setne %al
orb %bl, %al
cmpb $0x1, %al
jne 0x9b5f
leaq 0x69a6(%rip), %rax # 0x104dd
leaq 0x69a5(%rip), %rsi # 0x104e3
testb %bl, %bl
cmovneq %rax, %rsi
movq %r13, %rdi
movq %rdx, %rbx
movl %ecx, %edx
xorl %eax, %eax
callq 0x34c0
movq %rbx, %rdx
leaq 0x698a(%rip), %rsi # 0x104e7
jmp 0x9b66
leaq 0x6986(%rip), %rsi # 0x104ec
movq %r13, %rdi
xorl %eax, %eax
callq 0x34c0
cmpl $0x0, 0x1c(%rsp)
je 0x9bac
imulq $-0xbb80, %rbp, %rax # imm = 0xFFFF4480
addq %r14, %rax
movabsq $0x2aaaaaaaaaaaaaab, %rcx # imm = 0x2AAAAAAAAAAAAAAB
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x3, %rdx
addl %eax, %edx
leaq 0x694d(%rip), %rsi # 0x104ef
movq %r13, %rdi
xorl %eax, %eax
callq 0x34c0
movl $0x73, %edi
movq %r13, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3430
|
/xiph[P]opusfile/examples/opusfile_example.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0x9bc7
|
print_size
|
static void print_size(FILE *_fp,opus_int64 _nbytes,int _metric,
const char *_spacer){
static const char SUFFIXES[7]={' ','k','M','G','T','P','E'};
opus_int64 val;
opus_int64 den;
opus_int64 round;
int base;
int shift;
base=_metric?1000:1024;
round=0;
den=1;
for(shift=0;shift<6;shift++){
if(_nbytes<den*base-round)break;
den*=base;
round=den>>1;
}
val=(_nbytes+round)/den;
if(den>1&&val<10){
if(den>=1000000000)val=(_nbytes+(round/100))/(den/100);
else val=(_nbytes*100+round)/den;
fprintf(_fp,"%li.%02i%s%c",(long)(val/100),(int)(val%100),
_spacer,SUFFIXES[shift]);
}
else if(den>1&&val<100){
if(den>=1000000000)val=(_nbytes+(round/10))/(den/10);
else val=(_nbytes*10+round)/den;
fprintf(_fp,"%li.%i%s%c",(long)(val/10),(int)(val%10),
_spacer,SUFFIXES[shift]);
}
else fprintf(_fp,"%li%s%c",(long)val,_spacer,SUFFIXES[shift]);
}
|
movq %rcx, %r10
testl %edx, %edx
movl $0x400, %ecx # imm = 0x400
movl $0x3e8, %eax # imm = 0x3E8
cmoveq %rcx, %rax
movl $0x1, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
movl $0x1, %ecx
imulq %rax, %rcx
movq %rcx, %r11
subq %r9, %r11
cmpq %rsi, %r11
jg 0x9c13
movq %rcx, %r9
shrq %r9
incl %r8d
movq %rcx, %rdx
cmpl $0x6, %r8d
jne 0x9bea
movl $0x6, %r8d
jmp 0x9c16
movq %rdx, %rcx
leaq (%r9,%rsi), %rax
cqto
idivq %rcx
cmpq $0x2, %rcx
setae %dl
cmpq $0xa, %rax
setl %r11b
andb %dl, %r11b
cmpb $0x1, %r11b
jne 0x9c75
cmpq $0x3b9aca00, %rcx # imm = 0x3B9ACA00
jb 0x9cc7
shrq $0x2, %r9
movabsq $0x28f5c28f5c28f5c3, %r11 # imm = 0x28F5C28F5C28F5C3
movq %r9, %rax
mulq %r11
shrq $0x2, %rdx
addq %rdx, %rsi
shrq $0x2, %rcx
movq %rcx, %rax
mulq %r11
movq %rdx, %rcx
shrq $0x2, %rcx
movq %rsi, %rax
jmp 0x9cd1
cmpq $0x2, %rcx
setae %dl
cmpq $0x64, %rax
setl %r11b
andb %dl, %r11b
cmpb $0x1, %r11b
jne 0x9d14
cmpq $0x3b9aca00, %rcx # imm = 0x3B9ACA00
jb 0x9d37
movabsq $-0x3333333333333333, %r11 # imm = 0xCCCCCCCCCCCCCCCD
movq %r9, %rax
mulq %r11
shrq $0x3, %rdx
addq %rdx, %rsi
movq %rcx, %rax
mulq %r11
movq %rdx, %rcx
shrq $0x3, %rcx
movq %rsi, %rax
jmp 0x9d3f
imulq $0x64, %rsi, %rax
addq %rax, %r9
movq %r9, %rax
cqto
idivq %rcx
movq %rax, %rcx
movabsq $-0x5c28f5c28f5c28f5, %rdx # imm = 0xA3D70A3D70A3D70B
imulq %rdx
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x6, %rdx
addq %rax, %rdx
imull $0x64, %edx, %eax
subl %eax, %ecx
movl %r8d, %eax
leaq 0x684a(%rip), %rsi # 0x10550
movsbl (%rax,%rsi), %r9d
leaq 0x67e3(%rip), %rsi # 0x104f5
jmp 0x9d80
movl %r8d, %ecx
leaq 0x6832(%rip), %rdx # 0x10550
movsbl (%rcx,%rdx), %r8d
leaq 0x67e3(%rip), %rsi # 0x1050d
movq %rax, %rdx
movq %r10, %rcx
xorl %eax, %eax
jmp 0x34c0
leaq (%rsi,%rsi,4), %rax
leaq (%r9,%rax,2), %rax
cqto
idivq %rcx
movq %rax, %rcx
movabsq $0x6666666666666667, %rdx # imm = 0x6666666666666667
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x2, %rdx
addq %rax, %rdx
leal (%rdx,%rdx), %eax
leal (%rax,%rax,4), %eax
subl %eax, %ecx
movl %r8d, %eax
leaq 0x67dc(%rip), %rsi # 0x10550
movsbl (%rax,%rsi), %r9d
leaq 0x6782(%rip), %rsi # 0x10502
movq %r10, %r8
xorl %eax, %eax
jmp 0x34c0
|
/xiph[P]opusfile/examples/opusfile_example.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0x9d8a
|
make_wav_header
|
static void make_wav_header(unsigned char _dst[44],ogg_int64_t _duration){
/*The chunk sizes are set to 0x7FFFFFFF by default.
Many, though not all, programs will interpret this to mean the duration is
"undefined", and continue to read from the file so long as there is actual
data.*/
static const unsigned char WAV_HEADER_TEMPLATE[44]={
'R','I','F','F',0xFF,0xFF,0xFF,0x7F,
'W','A','V','E','f','m','t',' ',
0x10,0x00,0x00,0x00,0x01,0x00,0x02,0x00,
0x80,0xBB,0x00,0x00,0x00,0xEE,0x02,0x00,
0x04,0x00,0x10,0x00,'d','a','t','a',
0xFF,0xFF,0xFF,0x7F
};
memcpy(_dst,WAV_HEADER_TEMPLATE,sizeof(WAV_HEADER_TEMPLATE));
if(_duration>0){
if(_duration>0x1FFFFFF6){
fprintf(stderr,"WARNING: WAV output would be larger than 2 GB.\n");
fprintf(stderr,
"Writing non-standard WAV header with invalid chunk sizes.\n");
}
else{
opus_uint32 audio_size;
audio_size=(opus_uint32)(_duration*4);
put_le32(_dst+4,audio_size+36);
put_le32(_dst+40,audio_size);
}
}
}
|
movups 0x67eb(%rip), %xmm0 # 0x1057c
movups %xmm0, 0x1c(%rdi)
movaps 0x67d4(%rip), %xmm0 # 0x10570
movups %xmm0, 0x10(%rdi)
movaps 0x67b9(%rip), %xmm0 # 0x10560
movups %xmm0, (%rdi)
testq %rsi, %rsi
jle 0x9df4
cmpq $0x1ffffff7, %rsi # imm = 0x1FFFFFF7
jge 0x9df5
leal (,%rsi,4), %ecx
leal 0x24(,%rsi,4), %eax
movb %al, 0x4(%rdi)
movb %ah, 0x5(%rdi)
movl %eax, %edx
shrl $0x10, %edx
movb %dl, 0x6(%rdi)
shrl $0x18, %eax
movb %al, 0x7(%rdi)
movb %cl, 0x28(%rdi)
movl %esi, %eax
shrl $0x6, %eax
movb %al, 0x29(%rdi)
movl %esi, %eax
shrl $0xe, %eax
movb %al, 0x2a(%rdi)
shrl $0x16, %esi
movb %sil, 0x2b(%rdi)
retq
pushq %rax
callq 0x3be6
addq $0x8, %rsp
retq
|
/xiph[P]opusfile/examples/opusfile_example.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0x9e00
|
opus_head_parse
|
int opus_head_parse(OpusHead *_head,const unsigned char *_data,size_t _len){
OpusHead head;
if(_len<8)return OP_ENOTFORMAT;
if(memcmp(_data,"OpusHead",8)!=0)return OP_ENOTFORMAT;
if(_len<9)return OP_EBADHEADER;
head.version=_data[8];
if(head.version>15)return OP_EVERSION;
if(_len<19)return OP_EBADHEADER;
head.channel_count=_data[9];
head.pre_skip=op_parse_uint16le(_data+10);
head.input_sample_rate=op_parse_uint32le(_data+12);
head.output_gain=op_parse_int16le(_data+16);
head.mapping_family=_data[18];
if(head.mapping_family==0){
if(head.channel_count<1||head.channel_count>2)return OP_EBADHEADER;
if(head.version<=1&&_len>19)return OP_EBADHEADER;
head.stream_count=1;
head.coupled_count=head.channel_count-1;
if(_head!=NULL){
_head->mapping[0]=0;
_head->mapping[1]=1;
}
}
else if(head.mapping_family==1){
size_t size;
int ci;
if(head.channel_count<1||head.channel_count>8)return OP_EBADHEADER;
size=21+head.channel_count;
if(_len<size||head.version<=1&&_len>size)return OP_EBADHEADER;
head.stream_count=_data[19];
if(head.stream_count<1)return OP_EBADHEADER;
head.coupled_count=_data[20];
if(head.coupled_count>head.stream_count)return OP_EBADHEADER;
for(ci=0;ci<head.channel_count;ci++){
if(_data[21+ci]>=head.stream_count+head.coupled_count
&&_data[21+ci]!=255){
return OP_EBADHEADER;
}
}
if(_head!=NULL)memcpy(_head->mapping,_data+21,head.channel_count);
}
/*General purpose players should not attempt to play back content with
channel mapping family 255.*/
else if(head.mapping_family==255)return OP_EIMPL;
/*No other channel mapping families are currently defined.*/
else return OP_EBADHEADER;
if(_head!=NULL)memcpy(_head,&head,head.mapping-(unsigned char *)&head);
return 0;
}
|
movl $0xffffff7c, %eax # imm = 0xFFFFFF7C
cmpq $0x8, %rdx
jb 0x9e1a
movabsq $0x646165487375704f, %rcx # imm = 0x646165487375704F
cmpq %rcx, (%rsi)
je 0x9e1b
retq
cmpq $0x8, %rdx
jne 0x9e27
movl $0xffffff7b, %eax # imm = 0xFFFFFF7B
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movzbl 0x8(%rsi), %ebp
movl $0xffffff7a, %eax # imm = 0xFFFFFF7A
cmpl $0xf, %ebp
ja 0x9e4e
cmpq $0x13, %rdx
jae 0x9e5d
movl $0xffffff7b, %eax # imm = 0xFFFFFF7B
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl 0x12(%rsi), %r15d
cmpl $0xff, %r15d
je 0x9fca
movq %rdi, %rbx
movzbl 0x9(%rsi), %r14d
movzwl 0xa(%rsi), %r9d
movl 0xc(%rsi), %r10d
movzbl 0x10(%rsi), %r12d
movzbl 0x11(%rsi), %r13d
cmpl $0x1, %r15d
je 0x9f08
testl %r15d, %r15d
jne 0x9e49
leal -0x3(%r14), %eax
cmpl $-0x2, %eax
jb 0x9e49
cmpb $0x2, %bpl
setb %cl
cmpq $0x13, %rdx
setne %dl
movl $0xffffff7b, %eax # imm = 0xFFFFFF7B
testb %cl, %dl
jne 0x9e4e
testq %rbx, %rbx
je 0x9fd4
leal -0x1(%r14), %edx
movw $0x100, 0x20(%rbx) # imm = 0x100
movl $0x1, %ecx
xorl %eax, %eax
testq %rbx, %rbx
je 0x9e4e
shll $0x18, %r13d
shll $0x10, %r12d
orl %r13d, %r12d
sarl $0x10, %r12d
movl %ebp, (%rbx)
movl %r14d, 0x4(%rbx)
movl %r9d, 0x8(%rbx)
movl %r10d, 0xc(%rbx)
movl %r12d, 0x10(%rbx)
movl %r15d, 0x14(%rbx)
movl %ecx, 0x18(%rbx)
movl %edx, 0x1c(%rbx)
jmp 0x9e4e
leal -0x9(%r14), %eax
cmpl $-0x8, %eax
jb 0x9e49
leaq 0x15(%r14), %rax
cmpq %rdx, %rax
ja 0x9e49
cmpb $0x2, %bpl
setb %cl
cmpq %rdx, %rax
setb %al
testb %al, %cl
jne 0x9e49
movzbl 0x13(%rsi), %r11d
testl %r11d, %r11d
je 0x9e49
movzbl 0x14(%rsi), %eax
cmpb %al, %r11b
jb 0x9e49
movq %rax, 0x8(%rsp)
testq %r14, %r14
je 0x9f8f
movq 0x8(%rsp), %rax
addl %r11d, %eax
movl %r14d, %ecx
xorl %edx, %edx
movzbl 0x15(%rsi,%rdx), %edi
cmpl $0xff, %edi
sete %r8b
cmpl %edi, %eax
seta %dil
orb %r8b, %dil
je 0x9e49
incq %rdx
cmpq %rdx, %rcx
jne 0x9f69
movq %r11, 0x10(%rsp)
movl %r10d, (%rsp)
movl %r9d, 0x4(%rsp)
testq %rbx, %rbx
je 0x9fd4
leaq 0x20(%rbx), %rdi
addq $0x15, %rsi
movq %r14, %rdx
callq 0x3260
movl 0x4(%rsp), %r9d
movl (%rsp), %r10d
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rdx
jmp 0x9ecd
movl $0xffffff7e, %eax # imm = 0xFFFFFF7E
jmp 0x9e4e
xorl %eax, %eax
jmp 0x9e4e
|
/xiph[P]opusfile/src/info.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0x9fdb
|
opus_tags_init
|
void opus_tags_init(OpusTags *_tags){
memset(_tags,0,sizeof(*_tags));
}
|
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
retq
|
/xiph[P]opusfile/src/info.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0x9fe6
|
opus_tags_clear
|
void opus_tags_clear(OpusTags *_tags){
int ncomments;
int ci;
ncomments=_tags->comments;
if(_tags->user_comments!=NULL)ncomments++;
else{
OP_ASSERT(ncomments==0);
}
for(ci=ncomments;ci-->0;)_ogg_free(_tags->user_comments[ci]);
_ogg_free(_tags->user_comments);
_ogg_free(_tags->comment_lengths);
_ogg_free(_tags->vendor);
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x10(%rdi), %r14
movq (%rdi), %rax
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
addl %r14d, %ecx
jle 0xa022
cmpq $0x1, %rax
sbbq $-0x1, %r14
incq %r14
movq (%rbx), %rax
movq -0x10(%rax,%r14,8), %rdi
callq 0x33f0
decq %r14
cmpq $0x1, %r14
jg 0xa00c
movq (%rbx), %rdi
callq 0x33f0
movq 0x8(%rbx), %rdi
callq 0x33f0
movq 0x18(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x33f0
|
/xiph[P]opusfile/src/info.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xa043
|
opus_tags_parse
|
int opus_tags_parse(OpusTags *_tags,const unsigned char *_data,size_t _len){
if(_tags!=NULL){
OpusTags tags;
int ret;
opus_tags_init(&tags);
ret=opus_tags_parse_impl(&tags,_data,_len);
if(ret<0)opus_tags_clear(&tags);
else *_tags=*&tags;
return ret;
}
else return opus_tags_parse_impl(NULL,_data,_len);
}
|
testq %rdi, %rdi
jne 0xa04f
xorl %edi, %edi
jmp 0x3c25
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0x3c25
movl %eax, %ebp
testl %eax, %eax
js 0xa082
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
jmp 0xa08a
movq %rsp, %rdi
callq 0x9fe6
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
|
/xiph[P]opusfile/src/info.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xa093
|
opus_tagncompare
|
int opus_tagncompare(const char *_tag_name,int _tag_len,const char *_comment){
int ret;
OP_ASSERT(_tag_len>=0);
ret=op_strncasecmp(_tag_name,_comment,_tag_len);
return ret?ret:'='-_comment[_tag_len];
}
|
pushq %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdx, %rsi
movl %ebp, %edx
callq 0xadac
testl %eax, %eax
jne 0xa0b7
movslq %ebp, %rax
movsbl (%rbx,%rax), %ecx
movl $0x3d, %eax
subl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
/xiph[P]opusfile/src/info.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xa0be
|
opus_tags_get_binary_suffix
|
const unsigned char *opus_tags_get_binary_suffix(const OpusTags *_tags,
int *_len){
int ncomments;
int len;
ncomments=_tags->comments;
len=_tags->comment_lengths==NULL?0:_tags->comment_lengths[ncomments];
*_len=len;
OP_ASSERT(len==0||_tags->user_comments!=NULL);
return len>0?(const unsigned char *)_tags->user_comments[ncomments]:NULL;
}
|
movslq 0x10(%rdi), %rax
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0xa0d0
movl (%rcx,%rax,4), %ecx
jmp 0xa0d2
xorl %ecx, %ecx
movl %ecx, (%rsi)
testl %ecx, %ecx
jle 0xa0e0
movq (%rdi), %rcx
movq (%rcx,%rax,8), %rax
retq
xorl %eax, %eax
retq
|
/xiph[P]opusfile/src/info.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xa0e3
|
opus_tags_get_album_gain
|
int opus_tags_get_album_gain(const OpusTags *_tags,int *_gain_q8){
return opus_tags_get_gain(_tags,_gain_q8,"R128_ALBUM_GAIN",15);
}
|
leaq 0x64f3(%rip), %rdx # 0x105dd
jmp 0xa0ec
|
/xiph[P]opusfile/src/info.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xa0ec
|
opus_tags_get_gain
|
static int opus_tags_get_gain(const OpusTags *_tags,int *_gain_q8,
const char *_tag_name,size_t _tag_len){
char **comments;
int ncomments;
int ci;
comments=_tags->user_comments;
ncomments=_tags->comments;
/*Look for the first valid tag with the name _tag_name and use that.*/
for(ci=0;ci<ncomments;ci++){
OP_ASSERT(_tag_len<=(size_t)INT_MAX);
if(opus_tagncompare(_tag_name,(int)_tag_len,comments[ci])==0){
char *p;
opus_int32 gain_q8;
int negative;
p=comments[ci]+_tag_len+1;
negative=0;
if(*p=='-'){
negative=-1;
p++;
}
else if(*p=='+')p++;
gain_q8=0;
while(*p>='0'&&*p<='9'){
gain_q8=10*gain_q8+*p-'0';
if(gain_q8>32767-negative)break;
p++;
}
/*This didn't look like a signed 16-bit decimal integer.
Not a valid gain tag.*/
if(*p!='\0')continue;
*_gain_q8=(int)(gain_q8+negative^negative);
return 0;
}
}
return OP_FALSE;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq 0x10(%rdi), %r13
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
testq %r13, %r13
jle 0xa1ab
movq %rdx, %r15
movq %rsi, (%rsp)
movq (%rdi), %rbp
xorl %r14d, %r14d
movq (%rbp,%r14,8), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xf, %edx
callq 0xadac
testl %eax, %eax
jne 0xa19f
cmpb $0x3d, 0xf(%r12)
jne 0xa19f
movq (%rbp,%r14,8), %rcx
movzbl 0x10(%rcx), %edx
xorl %eax, %eax
cmpl $0x2b, %edx
je 0xa157
cmpl $0x2d, %edx
jne 0xa15d
addq $0x11, %rcx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0xa161
addq $0x11, %rcx
jmp 0xa161
addq $0x10, %rcx
movb (%rcx), %dl
leal -0x30(%rdx), %edi
xorl %esi, %esi
cmpb $0x9, %dil
ja 0xa19b
movl $0x7fff, %edi # imm = 0x7FFF
subl %eax, %edi
incq %rcx
xorl %esi, %esi
movsbl %dl, %r8d
leal (%rsi,%rsi,4), %esi
leal (%r8,%rsi,2), %esi
addl $-0x30, %esi
cmpl %edi, %esi
jg 0xa19b
movb (%rcx), %dl
leal -0x30(%rdx), %r8d
incq %rcx
cmpb $0x9, %r8b
jbe 0xa17a
testb %dl, %dl
je 0xa1bc
incq %r14
cmpq %r13, %r14
jne 0xa116
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addl %eax, %esi
xorl %eax, %esi
movq (%rsp), %rax
movl %esi, (%rax)
xorl %ebx, %ebx
jmp 0xa1ab
|
/xiph[P]opusfile/src/info.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xa1ca
|
opus_tags_get_track_gain
|
int opus_tags_get_track_gain(const OpusTags *_tags,int *_gain_q8){
return opus_tags_get_gain(_tags,_gain_q8,"R128_TRACK_GAIN",15);
}
|
leaq 0x641c(%rip), %rdx # 0x105ed
jmp 0xa0ec
|
/xiph[P]opusfile/src/info.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xa1d6
|
opus_picture_tag_parse
|
int opus_picture_tag_parse(OpusPictureTag *_pic,const char *_tag){
OpusPictureTag pic;
unsigned char *buf;
size_t base64_sz;
size_t buf_sz;
size_t tag_length;
int ret;
if(opus_tagncompare("METADATA_BLOCK_PICTURE",22,_tag)==0)_tag+=23;
/*Figure out how much BASE64-encoded data we have.*/
tag_length=strlen(_tag);
if(tag_length&3)return OP_ENOTFORMAT;
base64_sz=tag_length>>2;
buf_sz=3*base64_sz;
if(buf_sz<32)return OP_ENOTFORMAT;
if(_tag[tag_length-1]=='=')buf_sz--;
if(_tag[tag_length-2]=='=')buf_sz--;
if(buf_sz<32)return OP_ENOTFORMAT;
/*Allocate an extra byte to allow appending a terminating NUL to URL data.*/
buf=(unsigned char *)_ogg_malloc(sizeof(*buf)*(buf_sz+1));
if(buf==NULL)return OP_EFAULT;
opus_picture_tag_init(&pic);
ret=opus_picture_tag_parse_impl(&pic,_tag,buf,buf_sz,base64_sz);
if(ret<0){
opus_picture_tag_clear(&pic);
_ogg_free(buf);
}
else *_pic=*&pic;
return ret;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x60ed(%rip), %rdi # 0x102de
movl $0x16, %edx
callq 0xadac
testl %eax, %eax
je 0xa203
xorl %eax, %eax
jmp 0xa213
xorl %ecx, %ecx
cmpb $0x3d, 0x16(%r15)
movl $0x17, %eax
cmovneq %rcx, %rax
addq %rax, %r15
movq %r15, %rdi
callq 0x3170
movq %rax, %r12
movl $0xffffff7c, %ebp # imm = 0xFFFFFF7C
testb $0x3, %r12b
jne 0xa41f
cmpq $0x2c, %r12
jb 0xa41f
movq %r12, %rax
shrq $0x2, %r12
leaq (%r12,%r12,2), %r14
xorl %ecx, %ecx
cmpb $0x3d, -0x1(%r15,%rax)
sete %cl
subq %rcx, %r14
xorl %ecx, %ecx
cmpb $0x3d, -0x2(%r15,%rax)
sete %cl
subq %rcx, %r14
cmpq $0x20, %r14
jb 0xa41f
leaq 0x1(%r14), %rdi
callq 0x3460
testq %rax, %rax
je 0xa39e
movq %rax, 0x18(%rsp)
movq %rbx, 0x70(%rsp)
xorl %eax, %eax
xorl %ecx, %ecx
leaq (%rcx,%rcx,2), %rsi
xorl %edi, %edi
xorl %edx, %edx
xorl %ebx, %ebx
movzbl (%r15,%rdi), %r8d
cmpl $0x2b, %r8d
je 0xa2ae
cmpl $0x2f, %r8d
jne 0xa2b6
movl $0x3f, %r9d
jmp 0xa2e7
movl $0x3e, %r9d
jmp 0xa2e7
leal -0x30(%r8), %r9d
cmpb $0x9, %r9b
ja 0xa2c6
addl $0x4, %r8d
jmp 0xa2e4
leal -0x61(%r8), %r9d
cmpb $0x19, %r9b
ja 0xa2d6
addl $-0x47, %r8d
jmp 0xa2e4
leal -0x41(%r8), %r9d
cmpb $0x19, %r9b
ja 0xa30b
addl $-0x41, %r8d
movl %r8d, %r9d
shll $0x6, %ebx
orl %r9d, %ebx
movb $0x1, %r9b
testb %r9b, %r9b
je 0xa348
cmpq $0x3, %rdi
leaq 0x1(%rdi), %r8
setae %dl
movq %r8, %rdi
cmpq $0x4, %r8
jne 0xa295
jmp 0xa31f
xorl %r9d, %r9d
cmpl $0x3d, %r8d
jne 0xa2f0
leaq (%rax,%rdi), %r8
cmpq %r14, %r8
ja 0xa2e7
jmp 0xa2f0
movl %ebx, %edi
shrl $0x10, %edi
movq 0x18(%rsp), %rbp
movb %dil, (%rbp,%rsi)
leaq 0x1(%rsi), %rdi
cmpq %r14, %rdi
jae 0xa348
movb %bh, 0x1(%rbp,%rsi)
addq $0x2, %rsi
cmpq %r14, %rsi
jae 0xa348
movb %bl, (%rbp,%rsi)
movl $0xffffff7c, %ebp # imm = 0xFFFFFF7C
movb $0x1, %r13b
testb $0x1, %dl
je 0xa3a5
incq %rcx
addq $0x3, %rax
addq $0x4, %r15
cmpq %r12, %rcx
jne 0xa28b
movq 0x18(%rsp), %r8
movl 0x4(%r8), %r15d
bswapl %r15d
leaq -0x20(%r14), %rbx
subq %r15, %rbx
jae 0xa430
xorl %edi, %edi
xorl %edx, %edx
xorl %esi, %esi
xorl %r9d, %r9d
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %r15d, %r15d
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %eax, %eax
jmp 0xa3c4
movl $0xffffff7f, %ebp # imm = 0xFFFFFF7F
jmp 0xa41f
xorl %edi, %edi
xorl %edx, %edx
xorl %esi, %esi
xorl %r9d, %r9d
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %r15d, %r15d
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %eax, %eax
movq 0x18(%rsp), %r8
testb %r13b, %r13b
je 0xa3eb
movq %r8, %rbx
callq 0x33f0
movq %r15, %rdi
callq 0x33f0
movq %r14, %rdi
callq 0x33f0
movq %rbx, %rdi
callq 0x33f0
jmp 0xa41f
movq 0x70(%rsp), %rcx
movl %eax, (%rcx)
xorl %eax, %eax
movl %eax, 0x4(%rcx)
movq %r15, 0x8(%rcx)
movq %rdi, 0x10(%rcx)
movl %edx, 0x18(%rcx)
movl %esi, 0x1c(%rcx)
movl %r9d, 0x20(%rcx)
movl %r10d, 0x24(%rcx)
movl %r11d, 0x28(%rcx)
movl %eax, 0x2c(%rcx)
movq %r14, 0x30(%rcx)
movl %r12d, 0x38(%rcx)
movl %eax, 0x3c(%rcx)
movl %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl (%r8), %eax
movl %eax, 0x14(%rsp)
leal 0x1(%r15), %edi
callq 0x3460
testq %rax, %rax
je 0xa499
movq %rax, %r12
movq 0x18(%rsp), %rax
leaq 0x8(%rax), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x3260
movq %r12, 0x20(%rsp)
movb $0x0, (%r12,%r15)
movq %r15, 0x60(%rsp)
movq 0x18(%rsp), %r8
movl 0x8(%r8,%r15), %r12d
bswapl %r12d
cmpq %r12, %rbx
jae 0xa4c2
xorl %edi, %edi
xorl %edx, %edx
xorl %esi, %esi
xorl %r9d, %r9d
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %eax, %eax
jmp 0xa586
xorl %edi, %edi
xorl %edx, %edx
xorl %esi, %esi
xorl %r9d, %r9d
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %eax, %eax
movl $0xffffff7f, %ebp # imm = 0xFFFFFF7F
movq 0x18(%rsp), %r8
xorl %r15d, %r15d
jmp 0xa3c4
leal 0x1(%r12), %edi
callq 0x3460
testq %rax, %rax
movq 0x20(%rsp), %r15
je 0xa590
movq 0x60(%rsp), %rcx
leaq 0xc(%rcx), %rbx
movq 0x18(%rsp), %rcx
leaq (%rcx,%rbx), %rsi
movq %rax, %rdi
movq %rax, %r15
movq %r12, %rdx
callq 0x3260
movq 0x18(%rsp), %r8
movq %r15, 0x58(%rsp)
movb $0x0, (%r15,%r12)
addq %r12, %rbx
movq %rbx, %r10
movl (%r8,%rbx), %r15d
movl 0x4(%r8,%rbx), %esi
bswapl %r15d
bswapl %esi
movl 0x8(%r8,%rbx), %edi
bswapl %edi
movl 0xc(%r8,%rbx), %r9d
bswapl %r9d
movl %r15d, %eax
orl %esi, %eax
setne %bl
orl %edi, %eax
orl %r9d, %eax
setne %al
testl %r15d, %r15d
sete %cl
testl %esi, %esi
sete %dl
orb %cl, %dl
testl %edi, %edi
sete %cl
orb %dl, %cl
cmpb $0x1, %cl
jne 0xa559
testb %al, %al
jne 0xa56c
movl 0x10(%r8,%r10), %ecx
bswapl %ecx
addq $0x14, %r10
subq %r10, %r14
cmpq %rcx, %r14
jae 0xa5b1
xorl %edx, %edx
xorl %esi, %esi
xorl %r9d, %r9d
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %eax, %eax
movq 0x58(%rsp), %rdi
movq 0x20(%rsp), %r15
jmp 0xa3c4
xorl %edi, %edi
xorl %edx, %edx
xorl %esi, %esi
xorl %r9d, %r9d
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %eax, %eax
movl $0xffffff7f, %ebp # imm = 0xFFFFFF7F
jmp 0xa3bf
movl 0x14(%rsp), %eax
bswapl %eax
movl %eax, 0x14(%rsp)
movq %r10, 0x50(%rsp)
leaq (%r10,%rcx), %r14
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
movb $0x1, %r13b
movq 0x60(%rsp), %rax
cmpl $0xa, %eax
movl %esi, 0x28(%rsp)
movl %edi, 0x30(%rsp)
movl %r9d, 0x2c(%rsp)
movq %rcx, 0x48(%rsp)
ja 0xa85f
movl %eax, %eax
leaq 0x5f96(%rip), %rcx # 0x1058c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, 0x68(%rsp)
leaq 0x5ffb(%rip), %rsi # 0x10606
movq 0x20(%rsp), %rdi
callq 0x3470
testl %eax, %eax
je 0xa63a
movq 0x60(%rsp), %rax
cmpl $0x8, %eax
jg 0xa67d
testl %eax, %eax
movq 0x18(%rsp), %r8
movq 0x68(%rsp), %r14
jne 0xa71e
jmp 0xa74a
cmpl $0x1, 0x14(%rsp)
sete %al
andb %bl, %al
cmpb $0x1, %al
jne 0xa663
xorl %r14d, %r14d
movb $0x1, %r13b
cmpl $0x20, %r15d
jne 0xaa38
cmpl $0x20, 0x28(%rsp)
jne 0xaa38
movq 0x18(%rsp), %r8
movq 0x68(%rsp), %r14
movb $0x0, (%r8,%r14)
incq %r14
xorl %r12d, %r12d
jmp 0xa9ac
cmpl $0x9, %eax
movq 0x18(%rsp), %r8
movq 0x68(%rsp), %r14
je 0xa6d3
cmpl $0xa, %eax
jne 0xa85f
leaq 0x5f6e(%rip), %rsi # 0x1060a
movq 0x20(%rsp), %rdi
movl $0xa, %edx
callq 0xadac
testl %eax, %eax
je 0xa7e3
movq 0x60(%rsp), %rax
testl %eax, %eax
movq 0x18(%rsp), %r8
je 0xa74a
cmpl $0x6, %eax
je 0xa727
cmpl $0x9, %eax
jne 0xa85f
leaq 0x5f3b(%rip), %rsi # 0x10615
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
movl $0x9, %edx
callq 0xadac
testl %eax, %eax
je 0xa7b0
leaq 0x5f24(%rip), %rsi # 0x1061f
movq %rbx, %rdi
movl $0x9, %edx
callq 0xadac
testl %eax, %eax
je 0xa837
movq 0x60(%rsp), %rax
testl %eax, %eax
movq 0x18(%rsp), %r8
je 0xa74a
cmpl $0x6, %eax
jne 0xa85f
leaq 0x5efb(%rip), %rsi # 0x10629
movq 0x20(%rsp), %rdi
movl $0x6, %edx
callq 0xadac
movq 0x18(%rsp), %r8
testl %eax, %eax
jne 0xa85f
movq 0x50(%rsp), %rax
leaq (%r8,%rax), %rdi
movq 0x48(%rsp), %rsi
cmpl $0x3, %esi
jb 0xa778
movzwl (%rdi), %eax
xorl $0xd8ff, %eax # imm = 0xD8FF
movzbl 0x2(%rdi), %ecx
xorl $0xff, %ecx
orw %ax, %cx
je 0xa81c
cmpl $0x8, %esi
movl 0x14(%rsp), %ebx
jb 0xa794
movabsq $0xa1a0a0d474e5089, %rax # imm = 0xA1A0A0D474E5089
cmpq %rax, (%rdi)
je 0xa829
callq 0xaa91
xorl %r12d, %r12d
cmpl $0x1, %eax
sbbl %r12d, %r12d
orl $0x3, %r12d
movq 0x18(%rsp), %r8
jmp 0xa863
movb $0x1, %r13b
cmpl $0x8, 0x48(%rsp)
jb 0xa7d6
movabsq $0xa1a0a0d474e5089, %rax # imm = 0xA1A0A0D474E5089
movq 0x18(%rsp), %rcx
movq 0x50(%rsp), %rdx
cmpq %rax, (%rcx,%rdx)
setne %r13b
movzbl %r13b, %r12d
negl %r12d
orl $0x2, %r12d
jmp 0xa822
cmpl $0x3, 0x48(%rsp)
jb 0xa822
movq 0x18(%rsp), %r8
movq 0x50(%rsp), %rcx
movzwl (%r8,%rcx), %eax
xorl $0xd8ff, %eax # imm = 0xD8FF
movzbl 0x2(%r8,%rcx), %ecx
xorl $0xff, %ecx
xorl %edx, %edx
orw %ax, %cx
sete %dl
leal -0x1(,%rdx,2), %r12d
jmp 0xa85f
movl $0x1, %r12d
movq 0x18(%rsp), %r8
jmp 0xa85f
movl $0x2, %r12d
xorl %r13d, %r13d
jmp 0xa7a6
movq 0x18(%rsp), %rbx
movq 0x50(%rsp), %rax
leaq (%rbx,%rax), %rdi
movq 0x48(%rsp), %rsi
callq 0xaa91
movq %rbx, %r8
xorl %r12d, %r12d
cmpl $0x1, %eax
sbbl %r12d, %r12d
orl $0x3, %r12d
movl 0x14(%rsp), %ebx
xorl %eax, %eax
movl %eax, 0x38(%rsp)
movl %eax, 0x3c(%rsp)
movl %eax, 0x40(%rsp)
movl %eax, 0x44(%rsp)
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
cmpl $0x3, %r12d
je 0xa901
cmpl $0x2, %r12d
je 0xa8ca
cmpl $0x1, %r12d
jne 0xa93b
movq 0x18(%rsp), %rax
movq 0x50(%rsp), %rcx
leaq (%rax,%rcx), %rdi
leaq 0x34(%rsp), %rax
movq %rax, (%rsp)
leaq 0x44(%rsp), %rdx
leaq 0x40(%rsp), %rcx
leaq 0x3c(%rsp), %r8
leaq 0x38(%rsp), %r9
movq 0x48(%rsp), %rsi
callq 0xaaca
jmp 0xa936
movq 0x18(%rsp), %rax
movq 0x50(%rsp), %rcx
leaq (%rax,%rcx), %rdi
leaq 0x34(%rsp), %rax
movq %rax, (%rsp)
leaq 0x44(%rsp), %rdx
leaq 0x40(%rsp), %rcx
leaq 0x3c(%rsp), %r8
leaq 0x38(%rsp), %r9
movq 0x48(%rsp), %rsi
callq 0xac09
jmp 0xa936
movq 0x18(%rsp), %rax
movq 0x50(%rsp), %rcx
leaq (%rax,%rcx), %rdi
leaq 0x34(%rsp), %rax
movq %rax, (%rsp)
leaq 0x44(%rsp), %rdx
leaq 0x40(%rsp), %rcx
leaq 0x3c(%rsp), %r8
leaq 0x38(%rsp), %r9
movq 0x48(%rsp), %rsi
callq 0xad37
movq 0x18(%rsp), %r8
cmpl $0x0, 0x34(%rsp)
movl 0x28(%rsp), %ecx
movl 0x30(%rsp), %esi
movl 0x2c(%rsp), %edi
js 0xa95f
movl 0x44(%rsp), %r15d
movl 0x40(%rsp), %ecx
movl 0x3c(%rsp), %esi
movl 0x38(%rsp), %edi
cmpl $0x1, %ebx
jne 0xa9a0
cmpl $0x20, %r15d
setne %al
xorl %edx, %edx
orb %al, %r13b
movb $0x1, %r13b
jne 0xa56e
cmpl $0x20, %ecx
jne 0xa56e
movl %edi, 0x2c(%rsp)
movl %esi, 0x30(%rsp)
movl $0x2, %r12d
movl $0x20, %r15d
movl $0x20, 0x28(%rsp)
jmp 0xa9ac
movl %edi, 0x2c(%rsp)
movl %esi, 0x30(%rsp)
movl %ecx, 0x28(%rsp)
movq %r8, %rsi
movq 0x50(%rsp), %r13
addq %r13, %rsi
movq %r14, %rbp
subq %r13, %r14
movq %r8, %rbx
movq %r8, %rdi
movq %r14, %rdx
callq 0x3570
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3580
movq %rax, %r14
cmpq %r13, %rbp
je 0xaa0a
testq %r14, %r14
jne 0xaa0a
xorl %edx, %edx
movb $0x1, %r13b
xorl %esi, %esi
xorl %r9d, %r9d
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %eax, %eax
movl $0xffffff7f, %ebp # imm = 0xFFFFFF7F
movq 0x18(%rsp), %r8
jmp 0xa581
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x18(%rsp), %r8
movq 0x58(%rsp), %rdi
movq %r15, %rdx
movl 0x28(%rsp), %esi
movl 0x30(%rsp), %r9d
movl 0x2c(%rsp), %r10d
movl 0x14(%rsp), %eax
movq 0x48(%rsp), %r11
jmp 0xa586
xorl %edx, %edx
xorl %esi, %esi
xorl %r9d, %r9d
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %r12d, %r12d
xorl %eax, %eax
movq 0x18(%rsp), %r8
movq 0x20(%rsp), %r15
movq 0x58(%rsp), %rdi
jmp 0xa3c4
|
/xiph[P]opusfile/src/info.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xaa5e
|
opus_picture_tag_init
|
void opus_picture_tag_init(OpusPictureTag *_pic){
memset(_pic,0,sizeof(*_pic));
}
|
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
retq
|
/xiph[P]opusfile/src/info.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xaa71
|
opus_picture_tag_clear
|
void opus_picture_tag_clear(OpusPictureTag *_pic){
_ogg_free(_pic->description);
_ogg_free(_pic->mime_type);
_ogg_free(_pic->data);
}
|
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x33f0
movq 0x8(%rbx), %rdi
callq 0x33f0
movq 0x30(%rbx), %rdi
popq %rbx
jmp 0x33f0
|
/xiph[P]opusfile/src/info.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xaa91
|
op_is_gif
|
static int op_is_gif(const unsigned char *_buf,size_t _buf_sz){
return _buf_sz>=6&&(memcmp(_buf,"GIF87a",6)==0||memcmp(_buf,"GIF89a",6)==0);
}
|
xorl %eax, %eax
cmpq $0x6, %rsi
jb 0xaac3
movl $0x38464947, %ecx # imm = 0x38464947
movl (%rdi), %eax
xorl %ecx, %eax
movzwl 0x4(%rdi), %edx
xorl $0x6137, %edx # imm = 0x6137
orl %eax, %edx
je 0xaac4
xorl (%rdi), %ecx
movzwl 0x4(%rdi), %edx
xorl $0x6139, %edx # imm = 0x6139
xorl %eax, %eax
orl %ecx, %edx
sete %al
retq
movl $0x1, %eax
retq
|
/xiph[P]opusfile/src/info.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xaaca
|
op_extract_jpeg_params
|
static void op_extract_jpeg_params(const unsigned char *_buf,size_t _buf_sz,
opus_uint32 *_width,opus_uint32 *_height,
opus_uint32 *_depth,opus_uint32 *_colors,int *_has_palette){
if(op_is_jpeg(_buf,_buf_sz)){
size_t offs;
offs=2;
for(;;){
size_t segment_len;
int marker;
while(offs<_buf_sz&&_buf[offs]!=0xFF)offs++;
while(offs<_buf_sz&&_buf[offs]==0xFF)offs++;
marker=_buf[offs];
offs++;
/*If we hit EOI* (end of image), or another SOI* (start of image),
or SOS (start of scan), then stop now.*/
if(offs>=_buf_sz||(marker>=0xD8&&marker<=0xDA))break;
/*RST* (restart markers): skip (no segment length).*/
else if(marker>=0xD0&&marker<=0xD7)continue;
/*Read the length of the marker segment.*/
if(_buf_sz-offs<2)break;
segment_len=_buf[offs]<<8|_buf[offs+1];
if(segment_len<2||_buf_sz-offs<segment_len)break;
if(marker==0xC0||(marker>0xC0&&marker<0xD0&&(marker&3)!=0)){
/*Found a SOFn (start of frame) marker segment:*/
if(segment_len>=8){
*_height=_buf[offs+3]<<8|_buf[offs+4];
*_width=_buf[offs+5]<<8|_buf[offs+6];
*_depth=_buf[offs+2]*_buf[offs+7];
*_colors=0;
*_has_palette=0;
}
break;
}
/*Other markers: skip the whole marker segment.*/
offs+=segment_len;
}
}
}
|
cmpq $0x3, %rsi
jb 0xaaea
movzwl (%rdi), %eax
xorl $0xd8ff, %eax # imm = 0xD8FF
movzbl 0x2(%rdi), %r10d
xorl $0xff, %r10d
orw %ax, %r10w
je 0xaaeb
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x30(%rsp), %rax
movl $0x2, %r11d
xorl %r10d, %r10d
cmpq %rsi, %r11
jae 0xab18
cmpb $-0x1, (%rdi,%r11)
je 0xab18
incq %r11
cmpq %r11, %rsi
jne 0xab06
movq %rsi, %r11
cmpq %rsi, %r11
jae 0xab2f
cmpb $-0x1, (%rdi,%r11)
jne 0xab2f
incq %r11
cmpq %r11, %rsi
jne 0xab1d
movq %rsi, %r11
movb (%rdi,%r11), %r14b
leaq 0x1(%r11), %rbx
movq %rsi, %r15
subq %rbx, %r15
setbe %bpl
leal 0x28(%r14), %r12d
cmpb $0x3, %r12b
setb %r12b
orb %bpl, %r12b
movb $0x1, %bpl
jne 0xab6c
movl %r14d, %r12d
andb $-0x8, %r12b
cmpb $-0x30, %r12b
jne 0xab66
xorl %ebp, %ebp
jmp 0xab6c
cmpq $0x2, %r15
jae 0xab79
movq %rbx, %r11
testb %bpl, %bpl
je 0xab01
jmp 0xac00
movzwl 0x1(%rdi,%r11), %r12d
rolw $0x8, %r12w
cmpw $0x2, %r12w
jb 0xab6c
movzwl %r12w, %r12d
cmpq %r12, %r15
jb 0xab6c
cmpb $-0x40, %r14b
je 0xabb8
leal 0x30(%r14), %r15d
cmpb $-0xf, %r15b
setb %r15b
testb $0x3, %r14b
sete %r14b
orb %r15b, %r14b
je 0xabb8
addq %r12, %rbx
jmp 0xab62
cmpl $0x8, %r12d
jb 0xab6c
movzwl 0x4(%rdi,%r11), %r14d
rolw $0x8, %r14w
movzwl %r14w, %r14d
movl %r14d, (%rcx)
movzwl 0x6(%rdi,%r11), %r14d
rolw $0x8, %r14w
movzwl %r14w, %r14d
movl %r14d, (%rdx)
movzbl 0x3(%rdi,%r11), %r14d
movzbl 0x8(%rdi,%r11), %r11d
imull %r14d, %r11d
movl %r11d, (%r8)
movl %r10d, (%r9)
movl %r10d, (%rax)
jmp 0xab6c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
/xiph[P]opusfile/src/info.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xac09
|
op_extract_png_params
|
static void op_extract_png_params(const unsigned char *_buf,size_t _buf_sz,
opus_uint32 *_width,opus_uint32 *_height,
opus_uint32 *_depth,opus_uint32 *_colors,int *_has_palette){
if(op_is_png(_buf,_buf_sz)){
size_t offs;
offs=8;
while(_buf_sz-offs>=12){
ogg_uint32_t chunk_len;
chunk_len=op_parse_uint32be(_buf+offs);
if(chunk_len>_buf_sz-(offs+12))break;
else if(chunk_len==13&&memcmp(_buf+offs+4,"IHDR",4)==0){
int color_type;
*_width=op_parse_uint32be(_buf+offs+8);
*_height=op_parse_uint32be(_buf+offs+12);
color_type=_buf[offs+17];
if(color_type==3){
*_depth=24;
*_has_palette=1;
}
else{
int sample_depth;
sample_depth=_buf[offs+16];
if(color_type==0)*_depth=sample_depth;
else if(color_type==2)*_depth=sample_depth*3;
else if(color_type==4)*_depth=sample_depth*2;
else if(color_type==6)*_depth=sample_depth*4;
*_colors=0;
*_has_palette=0;
break;
}
}
else if(*_has_palette>0&&memcmp(_buf+offs+4,"PLTE",4)==0){
*_colors=chunk_len/3;
break;
}
offs+=12+chunk_len;
}
}
}
|
cmpq $0x8, %rsi
jb 0xac1e
movabsq $0xa1a0a0d474e5089, %rax # imm = 0xA1A0A0D474E5089
cmpq %rax, (%rdi)
je 0xac1f
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x38(%rsp), %rax
leaq -0xc(%rsi), %r10
movl $0x8, %r11d
leaq 0x5979(%rip), %rbx # 0x105b8
movl $0xaaaaaaab, %r14d # imm = 0xAAAAAAAB
movq %rsi, %r15
subq %r11, %r15
cmpq $0xc, %r15
jb 0xad2c
movl (%rdi,%r11), %r15d
bswapl %r15d
movq %r10, %r12
subq %r11, %r12
movl $0x3, %ebp
cmpq %r15, %r12
jb 0xad24
cmpl $0xd, %r15d
jne 0xac81
cmpl $0x52444849, 0x4(%rdi,%r11) # imm = 0x52444849
je 0xaca9
cmpl $0x0, (%rax)
jle 0xad1b
cmpl $0x45544c50, 0x4(%rdi,%r11) # imm = 0x45544C50
jne 0xad1b
movl %r15d, %r15d
imulq %r14, %r15
shrq $0x21, %r15
movl %r15d, (%r9)
jmp 0xad24
movl 0x8(%rdi,%r11), %ebp
bswapl %ebp
movl %ebp, (%rdx)
movl 0xc(%rdi,%r11), %ebp
bswapl %ebp
movl %ebp, (%rcx)
movzbl 0x11(%rdi,%r11), %r12d
cmpl $0x3, %r12d
jne 0xacd8
movl $0x18, (%r8)
xorl %ebp, %ebp
movl $0x1, %r13d
jmp 0xad12
cmpl $0x6, %r12d
ja 0xad03
movzbl 0x10(%rdi,%r11), %r13d
movl %r12d, %ebp
movslq (%rbx,%rbp,4), %rbp
addq %rbx, %rbp
jmpq *%rbp
leal (%r13,%r13,2), %r13d
jmp 0xad00
addl %r13d, %r13d
jmp 0xad00
shll $0x2, %r13d
movl %r13d, (%r8)
movl $0x0, (%r9)
movl $0x3, %ebp
xorl %r13d, %r13d
movl %r13d, (%rax)
cmpl $0x3, %r12d
jne 0xad24
addl $0xc, %r15d
addq %r15, %r11
xorl %ebp, %ebp
testl %ebp, %ebp
je 0xac45
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
|
0xad37
|
op_extract_gif_params
|
static void op_extract_gif_params(const unsigned char *_buf,size_t _buf_sz,
opus_uint32 *_width,opus_uint32 *_height,
opus_uint32 *_depth,opus_uint32 *_colors,int *_has_palette){
if(op_is_gif(_buf,_buf_sz)&&_buf_sz>=14){
*_width=_buf[6]|_buf[7]<<8;
*_height=_buf[8]|_buf[9]<<8;
/*libFLAC hard-codes the depth to 24.*/
*_depth=24;
*_colors=1<<((_buf[10]&7)+1);
*_has_palette=1;
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r12
callq 0xaa91
cmpq $0xe, %rbp
jb 0xad9b
testl %eax, %eax
je 0xad9b
movzwl 0x6(%r12), %eax
movl %eax, (%r13)
movzwl 0x8(%r12), %eax
movl %eax, (%r15)
movl $0x18, (%r14)
movb 0xa(%r12), %cl
andb $0x7, %cl
incb %cl
movl $0x1, %eax
shll %cl, %eax
movq 0x40(%rsp), %rcx
movl %eax, (%rbx)
movl $0x1, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/xiph[P]opusfile/src/info.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xadac
|
op_strncasecmp
|
int op_strncasecmp(const char *_a,const char *_b,int _n){
int i;
for(i=0;i<_n;i++){
int a;
int b;
int d;
a=_a[i];
b=_b[i];
if(a>='a'&&a<='z')a-='a'-'A';
if(b>='a'&&b<='z')b-='a'-'A';
d=a-b;
if(d)return d;
}
return 0;
}
|
testl %edx, %edx
jle 0xadf2
movl %edx, %ecx
xorl %edx, %edx
movl %eax, %r8d
movsbl (%rdi,%rdx), %r9d
movsbl (%rsi,%rdx), %r10d
leal -0x61(%r9), %r11d
leal -0x20(%r9), %eax
cmpb $0x1a, %r11b
cmovael %r9d, %eax
leal -0x61(%r10), %r9d
leal -0x20(%r10), %r11d
cmpb $0x1a, %r9b
cmovael %r10d, %r11d
subl %r11d, %eax
cmovel %r8d, %eax
jne 0xadf4
incq %rdx
cmpq %rdx, %rcx
jne 0xadb4
xorl %eax, %eax
retq
nopl (%rax)
|
/xiph[P]opusfile/src/internal.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xadf8
|
opus_granule_sample
|
ogg_int64_t opus_granule_sample(const OpusHead *_head,ogg_int64_t _gp){
opus_int32 pre_skip;
pre_skip=_head->pre_skip;
if(_gp!=-1&&op_granpos_add(&_gp,_gp,-pre_skip))_gp=-1;
return _gp;
}
|
pushq %rax
movq %rsi, (%rsp)
cmpq $-0x1, %rsi
jne 0xae09
movq (%rsp), %rax
popq %rcx
retq
xorl %edx, %edx
subl 0x8(%rdi), %edx
movq %rsp, %rdi
callq 0x459b
testl %eax, %eax
je 0xae03
movq $-0x1, (%rsp)
jmp 0xae03
|
/xiph[P]opusfile/src/opusfile.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xae24
|
op_test_callbacks
|
OggOpusFile *op_test_callbacks(void *_stream,const OpusFileCallbacks *_cb,
const unsigned char *_initial_data,size_t _initial_bytes,int *_error){
OggOpusFile *of;
int ret;
of=(OggOpusFile *)_ogg_malloc(sizeof(*of));
ret=OP_EFAULT;
if(OP_LIKELY(of!=NULL)){
ret=op_open1(of,_stream,_cb,_initial_data,_initial_bytes);
if(OP_LIKELY(ret>=0)){
if(_error!=NULL)*_error=0;
return of;
}
/*Don't auto-close the stream on failure.*/
of->callbacks.close=NULL;
op_clear(of);
_ogg_free(of);
}
if(_error!=NULL)*_error=ret;
return NULL;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r13
movl $0x3390, %edi # imm = 0x3390
callq 0x3460
testq %rax, %rax
je 0xb07a
movq %r14, 0x20(%rsp)
movq %rax, 0x10(%rsp)
movq %rax, %r14
movl $0x3390, %edx # imm = 0x3390
movq %rax, %rdi
xorl %esi, %esi
callq 0x31d0
movl $0xffffff7f, %ebp # imm = 0xFFFFFF7F
testq %r12, %r12
movq %r15, 0x18(%rsp)
js 0xaf39
movq $-0x1, 0x50(%r14)
movq %r13, 0x20(%r14)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm0, (%r14)
movups %xmm1, 0x10(%r14)
cmpq $0x0, (%r14)
je 0xb096
movq 0x10(%rsp), %rax
leaq 0x58(%rax), %r15
movq %r15, %rdi
callq 0x3180
testq %r12, %r12
je 0xaeea
movq %r15, %rdi
movq %r12, %rsi
callq 0x3540
testq %rax, %rax
je 0xaf39
movq %rax, %rdi
movq 0x20(%rsp), %rsi
movq %r12, %rdx
callq 0x3260
movq %r15, %rdi
movq %r12, %rsi
callq 0x3420
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0xaf08
movq %r13, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq *%rax
cmpl $-0x1, %eax
setne %r15b
jmp 0xaf0b
xorl %r15d, %r15d
testb %r15b, %r15b
je 0xaf62
movq 0x10(%r14), %rax
testq %rax, %rax
je 0xb0a0
movq 0x20(%r14), %rdi
callq *%rax
xorl %ecx, %ecx
cmpq %r12, %rax
sete %cl
movl %ecx, %ebp
addl %ecx, %ebp
orl $0xffffff7d, %ebp # imm = 0xFFFFFF7D
testb %cl, %cl
jne 0xaf62
testl %ebp, %ebp
js 0xb081
xorl %ebp, %ebp
movq 0x18(%rsp), %r15
testq %r15, %r15
je 0xaf50
movl %ebp, (%r15)
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl %r15b, %eax
movl %eax, 0x28(%r14)
movl $0x178, %edi # imm = 0x178
callq 0x3460
movq %rax, 0x30(%r14)
movq 0x10(%rsp), %rbx
leaq 0xa8(%rbx), %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x3630
leaq 0x40(%rbx), %r12
leaq 0x38(%rbx), %r13
addq $0x3c, %rbx
movq 0x30(%r14), %rdx
leaq 0x34(%rdx), %rsi
addq $0x158, %rdx # imm = 0x158
movq $0x0, (%rsp)
movq %r14, %rdi
movq %r12, %rcx
movq %r13, %r8
movq %rbx, 0x10(%rsp)
movq %rbx, %r9
callq 0x5a93
testl %eax, %eax
js 0xb063
leaq 0x28(%rsp), %rbx
movl $0x1, 0x2c(%r14)
movq 0x30(%r14), %rsi
movq $0x0, (%rsi)
movq 0x48(%r14), %rax
movq %rax, 0x8(%rsi)
movq $-0x1, 0x20(%rsi)
movl 0x220(%r14), %eax
movl %eax, 0x30(%rsi)
movq %r14, %rdi
movq %rbx, %rdx
callq 0xd981
movl %eax, %ebp
testl %eax, %eax
setle %al
orb %r15b, %al
jne 0xb065
movq 0x30(%r14), %rdi
movl $0x158, %ebp # imm = 0x158
addq %rbp, %rdi
callq 0x9fe6
movl $0x0, 0x2c(%r14)
incl 0x7c(%r14)
movq 0x30(%r14), %rdx
leaq 0x34(%rdx), %rsi
addq %rbp, %rdx
movq %rbx, (%rsp)
movq %r14, %rdi
movq %r12, %rcx
movq %r13, %r8
movq 0x10(%rsp), %r9
callq 0x5a93
movl %eax, %ebp
testl %eax, %eax
jns 0xafd4
jmp 0xb065
movl %eax, %ebp
testl %ebp, %ebp
js 0xaf39
movl $0x1, 0x78(%r14)
jmp 0xaf39
movl $0xffffff7f, %ebp # imm = 0xFFFFFF7F
jmp 0xb08e
movq %r14, %rdi
callq 0x63c9
movq 0x18(%rsp), %r15
xorl %r14d, %r14d
jmp 0xaf48
movl $0xffffff80, %ebp # imm = 0xFFFFFF80
jmp 0xaf39
movl $0xffffff7d, %ebp # imm = 0xFFFFFF7D
xorl %ecx, %ecx
jmp 0xaf35
|
/xiph[P]opusfile/src/opusfile.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xb0ac
|
op_open2
|
static int op_open2(OggOpusFile *_of){
int ret;
OP_ASSERT(_of->ready_state==OP_PARTOPEN);
if(_of->seekable){
_of->ready_state=OP_OPENED;
ret=op_open_seekable2(_of);
}
else ret=0;
if(OP_LIKELY(ret>=0)){
/*We have buffered packets from op_find_initial_pcm_offset().
Move to OP_INITSET so we can use them.*/
_of->ready_state=OP_STREAMSET;
ret=op_make_decode_ready(_of);
if(OP_LIKELY(ret>=0))return 0;
}
/*Don't auto-close the stream on failure.*/
_of->callbacks.close=NULL;
op_clear(_of);
return ret;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb38, %rsp # imm = 0xB38
movq %rdi, %rbx
xorl %ebp, %ebp
cmpl $0x0, 0x28(%rdi)
je 0xbed6
movl $0x2, 0x78(%rbx)
movslq 0x3214(%rbx), %rax
movq %rax, 0x130(%rsp)
shlq $0x4, %rax
leaq (%rax,%rax,2), %r15
movq %r15, %rdi
callq 0x3460
movl $0xffffff7f, %ebp # imm = 0xFFFFFF7F
testq %rax, %rax
je 0xbed6
movq %rax, %r14
leaq 0x58(%rbx), %rbp
movups 0x58(%rbx), %xmm0
movups 0x68(%rbx), %xmm1
movaps %xmm1, 0x190(%rsp)
movaps %xmm0, 0x180(%rsp)
leaq 0xa8(%rbx), %r13
leaq 0x9a0(%rsp), %rdi
movl $0x198, %edx # imm = 0x198
movq %r13, %rsi
callq 0x3260
movq 0x48(%rbx), %r12
movq 0x90(%rbx), %rax
movq %rax, 0x120(%rsp)
leaq 0x240(%rbx), %rsi
movq %r14, %rdi
movq %rsi, 0x108(%rsp)
movq %r15, %rdx
callq 0x3260
movq %rbp, 0x110(%rsp)
movq %rbp, %rdi
callq 0x3180
movq %r13, 0x118(%rsp)
movq %r13, %rdi
movq %rbx, %r13
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x3630
movq 0x20(%rbx), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq *0x8(%rbx)
movq 0x20(%rbx), %rdi
callq *0x10(%rbx)
movq %rax, 0x50(%rbx)
movq %rax, 0x48(%rbx)
testq %rax, %rax
movq %r15, 0x128(%rsp)
js 0xbf17
movq 0x30(%r13), %rsi
movq 0x8(%rsi), %rcx
movl $0xffffff77, %ebp # imm = 0xFFFFFF77
cmpq %rcx, %rax
jl 0xbdfe
movq %rax, %rdx
movq %rcx, 0x18(%rsp)
movq %r12, 0x80(%rsp)
movq %r14, 0x88(%rsp)
movl 0x30(%rsi), %eax
movl %eax, 0xa8(%rsp)
leaq 0x40(%r13), %rax
movq %rax, 0xb8(%rsp)
movq 0x40(%r13), %r14
leaq 0x38(%r13), %rax
movq %rax, 0xc0(%rsp)
movl 0x38(%r13), %eax
testl %eax, %eax
setg 0x44(%rsp)
movq %rax, 0xa0(%rsp)
leaq -0x1(%rax), %r12
movq $0x0, 0x58(%rsp)
movq %r13, 0x70(%rsp)
movl $0x10000, %r13d # imm = 0x10000
movq %rdx, 0xb0(%rsp)
movq %rdx, 0x98(%rsp)
movslq %r13d, %rax
movq %rdx, %rbp
subq %rax, %rbp
xorl %ebx, %ebx
testq %rbp, %rbp
movl $0x0, %r15d
cmovgq %rbp, %r15
movq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0xc182
testl %eax, %eax
js 0xb437
movq %rbp, 0xc8(%rsp)
movl %r13d, 0x50(%rsp)
movq $-0x1, %rbp
movq %r15, 0x48(%rsp)
movq 0x70(%rsp), %rdi
movq 0xb0(%rsp), %rdx
cmpq %rdx, 0x48(%rdi)
jge 0xb3d8
leaq 0x160(%rsp), %rsi
callq 0xdc8c
movq %rax, %r13
cmpq $-0x2, %rax
jle 0xb3c5
cmpq $-0x1, %r13
je 0xb388
leaq 0x160(%rsp), %rbx
movq %rbx, %rdi
callq 0x3290
movl %eax, %ebp
movq %r15, 0x1a0(%rsp)
movq %r13, 0x1a8(%rsp)
movl %eax, 0x1b4(%rsp)
movq 0x70(%rsp), %rax
movl 0x48(%rax), %eax
subl %r13d, %eax
movl %eax, 0x1b0(%rsp)
movq %rbx, %rdi
callq 0x3550
movq %rax, 0x1b8(%rsp)
cmpl 0xa8(%rsp), %ebp
movq 0x58(%rsp), %rdx
jne 0xb35c
movaps 0x1a0(%rsp), %xmm0
movq 0x1b0(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0x1b8(%rsp), %rax
movq %rax, 0xf8(%rsp)
movaps %xmm0, 0xe0(%rsp)
movl $0x1, %edx
movb 0x44(%rsp), %cl
cmpl $0x0, 0xa0(%rsp)
jle 0xb3a4
movb $0x1, %cl
cmpl %ebp, (%r14)
je 0xb3a4
xorl %eax, %eax
cmpq %rax, %r12
je 0xb391
leaq 0x1(%rax), %rcx
cmpl %ebp, 0x4(%r14,%rax,4)
movq %rcx, %rax
jne 0xb373
jmp 0xb399
movl $0x5, %eax
xorl %ebx, %ebx
jmp 0xb3bb
movq 0xa0(%rsp), %rcx
cmpq 0xa0(%rsp), %rcx
setb %cl
xorl %eax, %eax
testb %cl, %cl
cmovel %eax, %edx
movq %rdx, 0x58(%rsp)
movq %r13, %r15
incq %r15
movb $0x1, %bl
movq %r13, %rbp
testl %eax, %eax
je 0xb293
jmp 0xb3d3
movl $0x1, %eax
xorl %ebx, %ebx
movl %r13d, 0xc(%rsp)
jmp 0xb3bb
cmpl $0x5, %eax
jne 0xb41e
movl 0x50(%rsp), %r13d
movq 0x48(%rsp), %rdx
cmpq $0x0, 0xc8(%rsp)
jle 0xb447
addl %r13d, %r13d
movl $0x100000, %eax # imm = 0x100000
cmpl %eax, %r13d
cmovgel %eax, %r13d
leaq 0xff1a(%rdx), %rcx
movq 0x98(%rsp), %rax
cmpq %rax, %rcx
cmovgeq %rax, %rcx
movq %rcx, 0xb0(%rsp)
movb $0x1, %bl
jmp 0xb428
movl 0x50(%rsp), %r13d
movq 0x48(%rsp), %rdx
testb %bl, %bl
je 0xb45f
testq %rbp, %rbp
js 0xb24d
jmp 0xb47a
movq $-0x1, %rbp
movl %eax, 0xc(%rsp)
movq %r15, %rdx
jmp 0xb428
testq %rbp, %rbp
jns 0xb3ed
movl $0xffffff77, 0xc(%rsp) # imm = 0xFFFFFF77
movq $-0x1, %rbp
xorl %ebx, %ebx
jmp 0xb428
movq 0x88(%rsp), %r14
movq 0x80(%rsp), %r12
movq 0x18(%rsp), %r10
movl 0xc(%rsp), %ebp
jmp 0xb4b8
xorl %ebp, %ebp
cmpl $0x0, 0x58(%rsp)
je 0xb4a3
movaps 0xe0(%rsp), %xmm0
movaps 0xf0(%rsp), %xmm1
movaps %xmm1, 0x1b0(%rsp)
movaps %xmm0, 0x1a0(%rsp)
movq 0x88(%rsp), %r14
movq 0x80(%rsp), %r12
movq 0x18(%rsp), %r10
movq 0x70(%rsp), %r13
testl %ebp, %ebp
js 0xbdfe
movslq 0x1b0(%rsp), %rax
addq 0x1a8(%rsp), %rax
movq %rax, 0x50(%r13)
movl $0xffffff77, %ebp # imm = 0xFFFFFF77
cmpq %r10, %rax
jl 0xbdfe
leaq 0x3c(%r13), %rax
movq %rax, 0x138(%rsp)
movq 0x30(%r13), %rax
movq %rax, 0x28(%rsp)
movl 0x2c(%r13), %eax
movq $0x0, 0x160(%rsp)
movl $0x1, %ebp
movq %rax, 0xd0(%rsp)
movl %eax, %ecx
movq 0xb8(%rsp), %rax
movq (%rax), %r14
movq 0xc0(%rsp), %rax
movl (%rax), %eax
movq %rax, 0x38(%rsp)
movq 0xd0(%rsp), %rax
cmpl %eax, %ecx
movq %r14, 0x98(%rsp)
movq %rcx, 0x10(%rsp)
jge 0xbc73
testl %ebp, %ebp
setg %al
jle 0xb5d0
movq 0x38(%rsp), %rax
testl %eax, %eax
setg %cl
movl %ebp, %edx
leaq -0x1(%rax), %rsi
movb $0x1, %al
xorl %r11d, %r11d
movl %ecx, %edi
cmpl $0x0, 0x38(%rsp)
jle 0xb5b0
movq %r11, %rdi
shlq $0x5, %rdi
movl 0x1b4(%rsp,%rdi), %edi
cmpl %edi, (%r14)
je 0xb5c9
xorl %r8d, %r8d
cmpq %r8, %rsi
je 0xb5a2
leaq 0x1(%r8), %r9
cmpl %edi, 0x4(%r14,%r8,4)
movq %r9, %r8
jne 0xb58d
jmp 0xb5a7
movq 0x38(%rsp), %r9
cmpq 0x38(%rsp), %r9
setb %dil
testb %dil, %dil
jne 0xb5c9
movq %r11, %rax
incq %rax
movq %rax, %r11
cmpq %rdx, %rax
setb %al
jne 0xb56e
movl %ebp, %r11d
movq 0x10(%rsp), %rcx
jmp 0xb5d3
xorl %r11d, %r11d
testl %r11d, %r11d
je 0xbaad
movq %r11, 0x30(%rsp)
movl %r11d, %ecx
shlq $0x5, %rcx
movq $-0x1, %r8
testb $0x1, %al
je 0xb637
leaq (%rsp,%rcx), %rax
addq $0x1a0, %rax # imm = 0x1A0
movq 0x8(%rax), %rdx
movslq 0x10(%rax), %r10
movq %rdx, 0x60(%rsp)
addq %rdx, %r10
movl 0x14(%rax), %edx
movq 0x10(%rsp), %rsi
decl %esi
movslq %esi, %rsi
imulq $0x178, %rsi, %rsi # imm = 0x178
movq 0x28(%rsp), %rdi
cmpl 0x30(%rdi,%rsi), %edx
jne 0xb637
movq 0x18(%rax), %rax
movq %rax, 0x78(%rsp)
jmp 0xb645
movq %r15, 0x60(%rsp)
movq $-0x1, 0x78(%rsp)
movq 0x180(%rsp,%rcx), %rdi
movq 0x188(%rsp,%rcx), %rax
movq %rax, 0x90(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x2, %eax
jl 0xb6b4
leal -0x1(%rax), %esi
imulq $0x178, %rsi, %rax # imm = 0x178
movq 0x28(%rsp), %rcx
movq (%rcx,%rax), %rcx
movq %rcx, %rax
cqto
idivq %rsi
movq %r10, %rdx
subq %rax, %rdx
cmpq %rdx, %rcx
jle 0xb6b4
movq %rdi, %rdx
subq %rax, %rdx
addq $-0x10000, %rdx # imm = 0xFFFF0000
cmpq %rdx, %rcx
jge 0xb6b4
addq %rax, %rcx
cmpq %rdx, %rcx
movl $0x0, %edx
cmovgeq %rdx, %rax
addq %rcx, %rax
movq %rax, %r8
movq 0x38(%rsp), %rcx
testl %ecx, %ecx
setg 0x27(%rsp)
movq 0x10(%rsp), %rax
decl %eax
cltq
imulq $0x178, %rax, %rdx # imm = 0x178
movq 0x28(%rsp), %rax
movq %rdx, 0x140(%rsp)
addq %rdx, %rax
addq $0x30, %rax
movq %rax, 0x148(%rsp)
leaq -0x1(%rcx), %rax
movq %rax, 0x150(%rsp)
movq $-0x1, 0x68(%rsp)
movq %rdi, %rax
movq %rax, %rbp
subq %r10, %rax
movq %r10, 0x18(%rsp)
jle 0xbab8
sarq %rax
addq %r10, %rax
cmpq $-0x1, %r8
cmoveq %rax, %r8
movq %r8, %rax
subq %r10, %rax
cmpq $0x10000, %rax # imm = 0x10000
movq %r8, %rsi
cmovlq %r10, %rsi
movq $-0x1, %rax
movq 0x78(%rsp), %rcx
cmovgeq %rax, %rcx
movq %rcx, 0x78(%rsp)
movq %r13, %rdi
movq %rsi, %r15
callq 0xc182
testl %eax, %eax
js 0xba81
movslq 0x30(%rsp), %rbx
shlq $0x5, %rbx
movq 0x188(%rsp,%rbx), %rax
movabsq $0x7fffffffffff00e5, %rdx # imm = 0x7FFFFFFFFFFF00E5
cmpq %rdx, %rbp
cmovlq %rbp, %rdx
addq $0xff1a, %rdx # imm = 0xFF1A
cmpq %rdx, %rax
cmovlq %rax, %rdx
movq %r13, %rdi
leaq 0xe0(%rsp), %rsi
callq 0xdc8c
cmpq $-0x2, %rax
movq %rax, 0x68(%rsp)
jle 0xba85
cmpq $-0x1, %rax
je 0xb81d
movq %r13, %r14
leaq 0xe0(%rsp), %r13
movq %r13, %rdi
callq 0x3290
movl %eax, %r12d
movq %r13, %rdi
movq %r14, %r13
callq 0x3550
movb 0x27(%rsp), %cl
cmpl $0x0, 0x38(%rsp)
movq 0x30(%rsp), %rdi
movq 0x60(%rsp), %r8
movq 0x150(%rsp), %r9
jle 0xb832
movq 0x98(%rsp), %rcx
cmpl %r12d, (%rcx)
je 0xb836
xorl %ecx, %ecx
cmpq %rcx, %r9
je 0xb825
leaq 0x1(%rcx), %rdx
movq 0x98(%rsp), %rsi
cmpl %r12d, 0x4(%rsi,%rcx,4)
movq %rdx, %rcx
jne 0xb800
jmp 0xb82a
movq %r15, %rax
jmp 0xb8b0
movq 0x38(%rsp), %rdx
cmpq 0x38(%rsp), %rdx
setb %cl
testb %cl, %cl
je 0xb86d
movq 0x148(%rsp), %rcx
cmpl (%rcx), %r12d
cmoveq 0x68(%rsp), %r8
movq %r8, 0x60(%rsp)
movq 0x48(%r13), %r10
movq 0x78(%rsp), %rcx
cmoveq %rax, %rcx
movq %rcx, 0x78(%rsp)
movl $0x10000, %eax # imm = 0x10000
movq %rax, 0x48(%rsp)
movq %rbp, %rax
jmp 0xb8be
cmpl $0x3f, %edi
jg 0xba98
leaq (%rsp,%rbx), %rcx
addq $0x1a0, %rcx # imm = 0x1A0
movq %r15, (%rcx)
movq 0x68(%rsp), %rsi
movq %rsi, 0x8(%rcx)
movl 0x48(%r13), %edx
subl %esi, %edx
movl %edx, 0x10(%rcx)
movl %r12d, 0x14(%rcx)
movq %rax, 0x18(%rcx)
incl %edi
movq %rdi, 0x30(%rsp)
movq %r15, %rax
movq %rsi, 0x90(%rsp)
movq $0x0, 0x48(%rsp)
movq 0x18(%rsp), %r10
leaq -0x10000(%rax), %rdx
movb $0x1, %cl
movq $-0x1, %r8
cmpq %r10, %rdx
jle 0xba74
movq %rax, 0x158(%rsp)
movq %rdx, 0xd8(%rsp)
movq %rdx, 0x50(%rsp)
cmpl $0x0, 0x30(%rsp)
jle 0xba4d
movl 0x30(%rsp), %eax
movq %rax, 0xc8(%rsp)
movl $0x1, %r15d
leaq 0x198(%rsp), %r14
xorl %ecx, %ecx
movq 0xd8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %rcx, 0xa0(%rsp)
movq %rcx, %rax
shlq $0x5, %rax
movq 0x1b8(%rsp,%rax), %r9
movabsq $0x7fffffffffff447f, %rcx # imm = 0x7FFFFFFFFFFF447F
cmpq %rcx, %r9
movq %r15, 0x58(%rsp)
movq %r14, 0xb0(%rsp)
ja 0xba20
addq %rsp, %rax
addq $0x1a0, %rax # imm = 0x1A0
leaq 0xbb80(%r9), %rbp
movq 0x8(%rax), %rcx
movq %rcx, 0x18(%rsp)
movl 0x14(%rax), %r11d
movq %r9, 0xa8(%rsp)
movl %r11d, 0x44(%rsp)
decq %r15
jle 0xba20
movq (%r14), %rax
movb $0x1, %r12b
cmpq %rbp, %rax
jl 0xba13
cmpl %r11d, -0x4(%r14)
jne 0xba13
movq -0x10(%r14), %r13
movq %rax, %rsi
subq %r9, %rsi
cqto
idivq %rsi
movq %rax, %r8
movq %rdx, %rdi
movq %r13, %rcx
subq 0x18(%rsp), %rcx
testq %rax, %rax
jle 0xb9cd
movq %r13, %rax
subq %r10, %rax
cqto
idivq %r8
cmpq %rcx, %rax
jl 0xba13
imulq %rcx, %r8
subq %r8, %r13
movq %rcx, %rdx
movq %r10, %rbx
callq 0xddd3
movq %rbx, %r10
movq 0x48(%rsp), %rcx
subq %rax, %rcx
addq %r13, %rcx
cmpq %rbx, %rcx
jl 0xba06
movq 0x50(%rsp), %rax
cmpq %rcx, %rax
cmovgeq %rcx, %rax
movq %rax, 0x50(%rsp)
xorl %r12d, %r12d
movq 0xa8(%rsp), %r9
movl 0x44(%rsp), %r11d
addq $-0x20, %r14
testb %r12b, %r12b
jne 0xb981
movq 0xa0(%rsp), %rcx
incq %rcx
movq 0x58(%rsp), %r15
incq %r15
movq 0xb0(%rsp), %r14
addq $0x20, %r14
cmpq 0xc8(%rsp), %rcx
jne 0xb920
movq 0x50(%rsp), %r8
cmpq 0xd8(%rsp), %r8
movq $-0x1, %rax
cmovgeq %rax, %r8
movq 0x70(%rsp), %r13
movq 0x158(%rsp), %rax
movb $0x1, %cl
testb %cl, %cl
jne 0xb704
jmp 0xbc4e
xorl %ecx, %ecx
jmp 0xba87
xorl %ecx, %ecx
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %r10
movq %rbp, %rax
movq %r15, %r8
jmp 0xba74
movq %r15, %rax
movq 0x68(%rsp), %rcx
movq %rcx, 0x90(%rsp)
jmp 0xb8b0
movl $0x2, %r12d
jmp 0xbc65
movq 0x28(%rsp), %r10
movq 0x140(%rsp), %rdx
cmpq $-0x1, 0x20(%r10,%rdx)
movslq 0x10(%rsp), %rbx
jne 0xbcc4
addq %r10, %rdx
movq 0x78(%rsp), %r11
cmpq $-0x1, %r11
movq 0x68(%rsp), %rax
cmoveq %r11, %rax
movq %rax, 0x68(%rsp)
movq 0x60(%rsp), %r14
cmoveq 0x90(%rsp), %r14
imulq $0x178, %rbx, %rax # imm = 0x178
leaq (%r10,%rax), %rcx
addq $-0x178, %rcx # imm = 0xFE88
movl 0x30(%rdx), %r9d
movq %r13, %rdi
movq 0x98(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %r14, %r8
leaq 0x160(%rsp), %rax
pushq %rax
pushq %r11
callq 0x6048
addq $0x10, %rsp
testl %eax, %eax
js 0xbcce
movq %r14, %r15
movq 0x28(%rsp), %r10
leaq 0xe0(%rsp), %rax
movq 0x68(%rsp), %rcx
cmpq 0x90(%rsp), %rcx
je 0xbb81
movq %r13, %rdi
movq 0x90(%rsp), %rsi
callq 0xc182
testl %eax, %eax
js 0xbcf1
xorl %eax, %eax
movq 0x28(%rsp), %r10
imulq $0x178, %rbx, %r14 # imm = 0x178
leaq (%r10,%r14), %rsi
addq $0x34, %rsi
leaq (%r10,%r14), %rdx
addq $0x158, %rdx # imm = 0x158
subq $0x8, %rsp
movq %r13, %rdi
movq 0xc0(%rsp), %rcx
movq 0xc8(%rsp), %r8
movq 0x140(%rsp), %r9
pushq %rax
movq %r10, %rbx
callq 0x5a93
addq $0x10, %rsp
movl $0x1, %r12d
testl %eax, %eax
js 0xbcf7
movq %r15, 0x58(%rsp)
addq %rbx, %r14
movq %r13, %r15
movq 0x10(%rsp), %r13
leal 0x1(%r13), %ebx
movl %ebx, 0x2c(%r15)
movq 0x90(%rsp), %rax
movq %rax, (%r14)
movq 0x48(%r15), %rax
movq %rax, 0x8(%r14)
movl 0x220(%r15), %eax
movl %eax, 0x30(%r14)
movq $-0x1, 0x20(%r14)
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xd981
testl %eax, %eax
js 0xbcd9
movq 0x160(%rsp), %rax
movq %rax, 0x18(%r14)
movq 0x48(%r15), %r10
xorl %r12d, %r12d
movq 0x30(%rsp), %rax
movl %eax, %ebp
movl %ebx, %ecx
movq %r15, %r13
movq 0x58(%rsp), %r15
jmp 0xbc65
movl $0x1, %r12d
movq 0x60(%rsp), %r15
movq 0x30(%rsp), %rax
movl %eax, %ebp
movq 0x10(%rsp), %rcx
testl %r12d, %r12d
je 0xb51b
jmp 0xbd25
movq %r10, %rbx
movl $0x1, %r12d
cmpl $0x3fffffff, %eax # imm = 0x3FFFFFFF
jg 0xbd15
leal 0x1(,%rax,2), %eax
movq %rax, 0xd0(%rsp)
cltq
imulq $0x178, %rax, %rsi # imm = 0x178
movq 0x28(%rsp), %rdi
callq 0x3580
testq %rax, %rax
je 0xbd0c
movq %rax, 0x28(%rsp)
movq %rax, 0x30(%r13)
movq %rbx, %r10
movq 0x10(%rsp), %rcx
jmp 0xb552
movq 0x60(%rsp), %r15
jmp 0xbb4b
movl $0x1, %r12d
movq %r14, %r15
jmp 0xbcf7
movq 0x30(%rsp), %rcx
movl %ecx, %ebp
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %r10
movq %r13, %rcx
jmp 0xbc44
movl $0x1, %r12d
movq 0x30(%rsp), %rcx
movl %ecx, %ebp
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %r10
jmp 0xbc60
movq $0x0, 0x28(%rsp)
movl $0xffffff7f, 0xc(%rsp) # imm = 0xFFFFFF7F
movq %rbx, %r10
jmp 0xbc60
cmpl $0x2, %r12d
movq 0x98(%rsp), %rsi
jne 0xbdea
leal -0x1(%rcx), %eax
cltq
imulq $0x178, %rax, %rax # imm = 0x178
movq 0x28(%rsp), %rdi
cmpq $-0x1, 0x20(%rdi,%rax)
movslq %ecx, %rbx
jne 0xbda3
imulq $0x178, %rbx, %rax # imm = 0x178
leaq (%rdi,%rax), %rcx
addq $-0x178, %rcx # imm = 0xFE88
movq 0x1a8(%rsp), %r8
movl 0x1b4(%rsp), %r9d
movq %r13, %rdi
movq 0x38(%rsp), %rdx
leaq 0x160(%rsp), %rax
pushq %rax
pushq 0x1c0(%rsp)
callq 0x6048
movq 0x38(%rsp), %rdi
addq $0x10, %rsp
testl %eax, %eax
js 0xbf21
imulq $0x178, %rbx, %rsi # imm = 0x178
callq 0x3580
testq %rax, %rax
movq 0x88(%rsp), %r14
movq 0x80(%rsp), %r12
je 0xbdc8
movq %rax, 0x30(%r13)
movq 0xb8(%rsp), %rax
movq (%rax), %rdi
callq 0x33f0
xorps %xmm0, %xmm0
movq 0xc0(%rsp), %rax
movups %xmm0, (%rax)
xorl %ebp, %ebp
jmp 0xbdfe
movq 0x88(%rsp), %r14
movq 0x80(%rsp), %r12
movl 0xc(%rsp), %ebp
movq %r13, %r15
movq 0x118(%rsp), %r13
movq %r13, %rdi
callq 0x35e0
movl %ebp, %ebx
movq 0x110(%rsp), %rbp
movq %rbp, %rdi
callq 0x36d0
movaps 0x180(%rsp), %xmm0
movaps 0x190(%rsp), %xmm1
movups %xmm0, (%rbp)
movups %xmm1, 0x10(%rbp)
movl %ebx, %ebp
leaq 0x9a0(%rsp), %rsi
movl $0x198, %edx # imm = 0x198
movq %r13, %rdi
movq %r15, %rbx
callq 0x3260
movq %r12, 0x48(%r15)
movq 0x130(%rsp), %rax
movl %eax, 0x3214(%r15)
movq 0x108(%rsp), %rdi
movq %r14, %rsi
movq 0x128(%rsp), %rdx
callq 0x3260
movq %r14, %rdi
callq 0x33f0
movq 0x30(%r15), %rax
movq 0x28(%rax), %rcx
movq %rcx, 0x88(%r15)
movq 0x120(%rsp), %rcx
movq %rcx, 0x90(%r15)
movl 0x3c(%rax), %eax
movl %eax, 0x80(%r15)
testl %ebp, %ebp
js 0xbed6
movq 0x20(%rbx), %rdi
movslq 0x64(%rbx), %rax
addq %rax, %r12
movslq 0x68(%rbx), %rax
subq %rax, %r12
movq %r12, %rsi
xorl %edx, %edx
callq *0x8(%rbx)
movl %eax, %ebp
sarl $0x1f, %ebp
andl $-0x80, %ebp
testl %ebp, %ebp
js 0xbf05
movl $0x3, 0x78(%rbx)
movq %rbx, %rdi
callq 0x5ee3
xorl %ebp, %ebp
testl %eax, %eax
js 0xbf03
movl %ebp, %eax
addq $0xb38, %rsp # imm = 0xB38
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ebp
movq $0x0, 0x18(%rbx)
movq %rbx, %rdi
callq 0x4624
jmp 0xbeef
movl $0xffffff80, %ebp # imm = 0xFFFFFF80
jmp 0xbdfe
movl %eax, %ebp
movq 0x88(%rsp), %r14
movq 0x80(%rsp), %r12
jmp 0xbdfe
|
/xiph[P]opusfile/src/opusfile.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xbf38
|
op_open_file
|
OggOpusFile *op_open_file(const char *_path,int *_error){
OpusFileCallbacks cb;
return op_open_close_on_failure(op_fopen(&cb,_path,"rb"),&cb,_error);
}
|
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x40d1(%rip), %rdx # 0x1001d
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xdf4c
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xbf6f
addq $0x28, %rsp
popq %rbx
popq %r14
retq
|
/xiph[P]opusfile/src/opusfile.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xbf6f
|
op_open_close_on_failure
|
static OggOpusFile *op_open_close_on_failure(void *_stream,
const OpusFileCallbacks *_cb,int *_error){
OggOpusFile *of;
if(OP_UNLIKELY(_stream==NULL)){
if(_error!=NULL)*_error=OP_EFAULT;
return NULL;
}
of=op_open_callbacks(_stream,_cb,NULL,0,_error);
if(OP_UNLIKELY(of==NULL))(*_cb->close)(_stream);
return of;
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r8
testq %rdi, %rdi
je 0xbf9c
movq %rsi, %rbx
movq %rdi, %r15
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x46ec
movq %rax, %r14
testq %rax, %rax
je 0xbfad
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
testq %r8, %r8
je 0xbfa8
movl $0xffffff7f, (%r8) # imm = 0xFFFFFF7F
xorl %r14d, %r14d
jmp 0xbf93
movq %r15, %rdi
callq *0x18(%rbx)
jmp 0xbf93
|
/xiph[P]opusfile/src/opusfile.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xbfb5
|
op_open_memory
|
OggOpusFile *op_open_memory(const unsigned char *_data,size_t _size,
int *_error){
OpusFileCallbacks cb;
return op_open_close_on_failure(op_mem_stream_create(&cb,_data,_size),&cb,
_error);
}
|
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xdfcf
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xbf6f
addq $0x28, %rsp
popq %rbx
popq %r14
retq
|
/xiph[P]opusfile/src/opusfile.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xbfe8
|
op_test_file
|
OggOpusFile *op_test_file(const char *_path,int *_error){
OpusFileCallbacks cb;
return op_test_close_on_failure(op_fopen(&cb,_path,"rb"),&cb,_error);
}
|
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x4021(%rip), %rdx # 0x1001d
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xdf4c
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xc01f
addq $0x28, %rsp
popq %rbx
popq %r14
retq
|
/xiph[P]opusfile/src/opusfile.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xc01f
|
op_test_close_on_failure
|
static OggOpusFile *op_test_close_on_failure(void *_stream,
const OpusFileCallbacks *_cb,int *_error){
OggOpusFile *of;
if(OP_UNLIKELY(_stream==NULL)){
if(_error!=NULL)*_error=OP_EFAULT;
return NULL;
}
of=op_test_callbacks(_stream,_cb,NULL,0,_error);
if(OP_UNLIKELY(of==NULL))(*_cb->close)(_stream);
return of;
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r8
testq %rdi, %rdi
je 0xc04c
movq %rsi, %rbx
movq %rdi, %r15
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xae24
movq %rax, %r14
testq %rax, %rax
je 0xc05d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
testq %r8, %r8
je 0xc058
movl $0xffffff7f, (%r8) # imm = 0xFFFFFF7F
xorl %r14d, %r14d
jmp 0xc043
movq %r15, %rdi
callq *0x18(%rbx)
jmp 0xc043
|
/xiph[P]opusfile/src/opusfile.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xc065
|
op_test_memory
|
OggOpusFile *op_test_memory(const unsigned char *_data,size_t _size,
int *_error){
OpusFileCallbacks cb;
return op_test_close_on_failure(op_mem_stream_create(&cb,_data,_size),&cb,
_error);
}
|
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xdfcf
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xc01f
addq $0x28, %rsp
popq %rbx
popq %r14
retq
|
/xiph[P]opusfile/src/opusfile.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xc098
|
op_seekable
|
int op_seekable(const OggOpusFile *_of){
return _of->seekable;
}
|
movl 0x28(%rdi), %eax
retq
|
/xiph[P]opusfile/src/opusfile.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xc09c
|
op_link_count
|
int op_link_count(const OggOpusFile *_of){
return _of->nlinks;
}
|
movl 0x2c(%rdi), %eax
retq
|
/xiph[P]opusfile/src/opusfile.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xc0a0
|
op_serialno
|
opus_uint32 op_serialno(const OggOpusFile *_of,int _li){
if(OP_UNLIKELY(_li>=_of->nlinks))_li=_of->nlinks-1;
if(!_of->seekable)_li=0;
return _of->links[_li<0?_of->cur_link:_li].serialno;
}
|
movl 0x2c(%rdi), %eax
cmpl %esi, %eax
jle 0xc0c9
movl 0x28(%rdi), %eax
testl %eax, %eax
cmovel %eax, %esi
movq 0x30(%rdi), %rax
testl %esi, %esi
jns 0xc0ba
movl 0x7c(%rdi), %esi
movslq %esi, %rcx
imulq $0x178, %rcx, %rcx # imm = 0x178
movl 0x30(%rax,%rcx), %eax
retq
decl %eax
movl %eax, %esi
jmp 0xc0a7
|
/xiph[P]opusfile/src/opusfile.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
0xc0cf
|
op_channel_count
|
const OpusHead *op_head(const OggOpusFile *_of,int _li){
if(OP_UNLIKELY(_li>=_of->nlinks))_li=_of->nlinks-1;
if(!_of->seekable)_li=0;
return &_of->links[_li<0?_of->cur_link:_li].head;
}
|
movl 0x2c(%rdi), %eax
cmpl %esi, %eax
jle 0xc0f8
movl 0x28(%rdi), %eax
testl %eax, %eax
cmovel %eax, %esi
movq 0x30(%rdi), %rax
testl %esi, %esi
jns 0xc0e9
movl 0x7c(%rdi), %esi
movslq %esi, %rcx
imulq $0x178, %rcx, %rcx # imm = 0x178
movl 0x38(%rax,%rcx), %eax
retq
decl %eax
movl %eax, %esi
jmp 0xc0d6
|
/xiph[P]opusfile/src/opusfile.c
|
xiph[P]opusfile[P]build_O1[P]opusfile_example
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.