LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/lib/rra.c
// Function: setAttributeRRA
void *
setAttributeRRA(RRA *h,char *attribute,void *value)
    {
    RRA_TAG *t;

    t  = h->items;
    while (t != 0)
        {
        if (strcmp(attribute,t->attribute) == 0) 
            {
            void *temp = t->value;
            t->value = value;
            return temp;
            }
        t = t->next;
        }

    return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x27cc
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rsi
callq 0x10f0
cmpl $0x0, %eax
jne 0x27be
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x27d4
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x2780
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/lib/rra.c
// Function: findPreviousRRAAmplitudeFD
int
findPreviousRRAAmplitudeFD(int fd)
    {
    char ch;
    int comment;
    off_t offset;

    //find beginning of the line
    comment = 0;
    read(fd,&ch,1);
    while (ch != '\n')
        {
        //printf("ch is <%c>\n",ch);
        if (ch == '!') comment = 1;
        offset = lseek(fd,-2,SEEK_CUR);
        read(fd,&ch,1);
        }

    if (comment)
        {
        lseek(fd,-1,SEEK_CUR);
        return findPreviousRRAAmplitudeFD(fd);
        }

    //find beginning of token
    read(fd,&ch,1);
    while (isspace(ch))
        {
        read(fd,&ch,1);
        }

    offset = lseek(fd,-1,SEEK_CUR);

    return offset;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x8(%rbp), %edi
leaq -0x9(%rbp), %rsi
movl $0x1, %edx
callq 0x10e0
movsbl -0x9(%rbp), %eax
cmpl $0xa, %eax
je 0x2e37
movsbl -0x9(%rbp), %eax
cmpl $0x21, %eax
jne 0x2e0c
movl $0x1, -0x10(%rbp)
movl -0x8(%rbp), %edi
movq $-0x2, %rsi
movl $0x1, %edx
callq 0x10a0
movq %rax, -0x18(%rbp)
movl -0x8(%rbp), %edi
leaq -0x9(%rbp), %rsi
movl $0x1, %edx
callq 0x10e0
jmp 0x2df3
cmpl $0x0, -0x10(%rbp)
je 0x2e5e
movl -0x8(%rbp), %edi
movq $-0x1, %rsi
movl $0x1, %edx
callq 0x10a0
movl -0x8(%rbp), %edi
callq 0x2dd0
movl %eax, -0x4(%rbp)
jmp 0x2ebe
movl -0x8(%rbp), %edi
leaq -0x9(%rbp), %rsi
movl $0x1, %edx
callq 0x10e0
callq 0x1200
movq (%rax), %rax
movsbl -0x9(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x2e9f
movl -0x8(%rbp), %edi
leaq -0x9(%rbp), %rsi
movl $0x1, %edx
callq 0x10e0
jmp 0x2e6f
movl -0x8(%rbp), %edi
movq $-0x1, %rsi
movl $0x1, %edx
callq 0x10a0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/lib/rra.c
// Function: shrinkRRA
void
shrinkRRA(RRA *w,int size)
    {
    int i;

    w->samples = size;
    for (i = 0; i < w->channels; ++i)
        w->data[i] = (int *) ReNew(w->data[i],sizeof(int) * size);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x2f68
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0xc(%rbp), %rax
shlq $0x2, %rax
movl %eax, %esi
callq 0x1970
movq %rax, %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x10(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2f20
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/lib/rra.c
// Function: writeRRA
void
writeRRA(FILE *out,RRA *w,char *tag, void (*handler)(FILE *,RRA *), int offset)
    {
    int i,j;
    int samples;
    
    
    /* save the original samples because we need to reduce then */
    /* number written by 'skip' */

    samples = w->samples;

    w->samples -= w->skip;

    if (w->samples < 0) w->samples = 0;

    writeRRAHeader(out,w,tag,handler);

    for (i = 0; i < samples; ++i)
        for (j = 0; j < w->channels; ++j)
            if (i >= w->skip)
                fprintf(out,"%d\n",w->data[j][i] + offset);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jge 0x2fbe
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x3050
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x3046
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x3039
movl -0x28(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jl 0x302c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl -0x24(%rbp), %edx
leaq 0x1158(%rip), %rsi      # 0x417d
movb $0x0, %al
callq 0x1110
jmp 0x302e
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2fe9
jmp 0x303b
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2fda
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/lib/rra.c
// Function: defaultTagWriter
static void
defaultTagWriter(FILE *out,RRA *w)
    {
    RRA_TAG *t;
    char *value;

    t = w->items;
    while (t != 0)
        {
        int i;
        int spaces;

        value = (char *) t->value;

        spaces = 0;
        for (i = 0; i < strlen(value); ++i)
            if (isspace(value[i]))
                {
                spaces = 1;
                break;
                }

        fprintf(out,"%s: %s%s%s\n",
            t->attribute,
            spaces? "\"" : "",
            value,
            spaces? "\"" : ""
            );
        t = t->next;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3357
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1080
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0x32f9
callq 0x1200
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movslq -0x24(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x32ec
movl $0x1, -0x28(%rbp)
jmp 0x32f9
jmp 0x32ee
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x32a1
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movl -0x28(%rbp), %esi
leaq 0x111f(%rip), %rcx      # 0x442d
leaq 0x1235(%rip), %rax      # 0x454a
cmpl $0x0, %esi
cmovneq %rax, %rcx
movq -0x20(%rbp), %r8
movl -0x28(%rbp), %esi
leaq 0x1103(%rip), %r9       # 0x442d
leaq 0x1219(%rip), %rax      # 0x454a
cmpl $0x0, %esi
cmovneq %rax, %r9
leaq 0x11ff(%rip), %rsi      # 0x453e
movb $0x0, %al
callq 0x1110
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x327c
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/lib/rra.c
// Function: skipRRAHeaderFD
off_t
skipRRAHeaderFD(int fd)
    {
    off_t index;
    char buffer[10];
    //find start
    lseek(fd,0,SEEK_SET);
    read(fd,buffer,sizeof(buffer));
    buffer[7] = '\0';
    if (strcmp(buffer,"RRAUDIO") != 0) return -1;

    index = 0;
    lseek(fd,0,SEEK_SET);
    read(fd,buffer,2);
    while (buffer[0] != '%' || buffer[1] != '%')
        {
        ++index;
        lseek(fd,index,SEEK_SET);
        read(fd,buffer,2);
        }

    return index + 2;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x10a0
movl -0xc(%rbp), %edi
leaq -0x22(%rbp), %rsi
movl $0xa, %edx
callq 0x10e0
movb $0x0, -0x1b(%rbp)
leaq -0x22(%rbp), %rdi
leaq 0xdef(%rip), %rsi       # 0x41d8
callq 0x10f0
cmpl $0x0, %eax
je 0x3400
movq $-0x1, -0x8(%rbp)
jmp 0x3484
movq $0x0, -0x18(%rbp)
movl -0xc(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x10a0
movl -0xc(%rbp), %edi
leaq -0x22(%rbp), %rsi
movl $0x2, %edx
callq 0x10e0
movsbl -0x22(%rbp), %ecx
movb $0x1, %al
cmpl $0x25, %ecx
movb %al, -0x23(%rbp)
jne 0x3442
movsbl -0x21(%rbp), %eax
cmpl $0x25, %eax
setne %al
movb %al, -0x23(%rbp)
movb -0x23(%rbp), %al
testb $0x1, %al
jne 0x344b
jmp 0x3478
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x10a0
movl -0xc(%rbp), %edi
leaq -0x22(%rbp), %rsi
movl $0x2, %edx
callq 0x10e0
jmp 0x3427
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/lib/rra.c
// Function: outputComment
void
outputComment(FILE *in, FILE *out)
    {
    int ch;

    fprintf(out,"!");

    while ((ch = fgetc(in)) && ch != EOF && ch != '\n')
        {
        fprintf(out,"%c",ch);
        continue;
        }
    fprintf(out,"\n");
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xf73(%rip), %rsi       # 0x441e
movb $0x0, %al
callq 0x1110
movq -0x8(%rbp), %rdi
callq 0x10c0
movl %eax, %ecx
movl %ecx, -0x14(%rbp)
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x15(%rbp)
je 0x34df
xorl %eax, %eax
cmpl $-0x1, -0x14(%rbp)
movb %al, -0x15(%rbp)
je 0x34df
cmpl $0xa, -0x14(%rbp)
setne %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0x34e8
jmp 0x34ff
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0xf2a(%rip), %rsi       # 0x4420
movb $0x0, %al
callq 0x1110
jmp 0x34b2
movq -0x10(%rbp), %rdi
leaq 0xf22(%rip), %rsi       # 0x442c
movb $0x0, %al
callq 0x1110
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/lib/rra.c
// Function: fft2rra
void
fft2rra(RRA *h,int channel,double *data,int length)
    {
    int i;
    double max;

    /* call the inverse fft */

    fft(data,length,-1);

    /* normalize the result */

    for(i = 0; i < length; ++i)
        {
        data[2*i+1] /= length;
        data[2*i+2] /= length;
        }

    /* now place back into RRA object */

    max = pow(2,h->bitsPerSample - 1);

    for (i = 0; i < length; i += 2)
        {
        h->data[channel][i / 2] = (int) (max * data[i + 1]);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x38c0
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x3cb5
cvtsi2sdl -0x1c(%rbp), %xmm1
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
cvtsi2sdl -0x1c(%rbp), %xmm1
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
shll %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x3c5e
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
movsd 0x46d(%rip), %xmm0      # 0x4138
callq 0x1060
movsd %xmm0, -0x28(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x3d3b
movsd -0x28(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movl -0x20(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl -0x34(%rbp), %edx
movl %eax, %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x20(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x20(%rbp)
jmp 0x3cdc
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/lib/rra.c
// Function: readToken
static char *
readToken(FILE *in,int ch)
    {
    int index;
    char buffer[1024];

    buffer[0] = ch;

    ch = fgetc(in);

    index = 1;
    while (ch != EOF && !isspace(ch) && ch != '\"' && ch != ':')
        {
        if (index == sizeof(buffer) - 1)
            {
            buffer[sizeof(buffer)-1] = '\0';
            Fatal("file %s,line %s, token too long: %s\n",buffer);
            }
        buffer[index++] = ch;
        ch = fgetc(in);
        }

    buffer[index] = '\0';

    ungetc(ch,in);

    return StringDup(buffer);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x420, %rsp            # imm = 0x420
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movb %al, -0x410(%rbp)
movq -0x8(%rbp), %rdi
callq 0x10c0
movl %eax, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
xorl %eax, %eax
cmpl $-0x1, -0xc(%rbp)
movb %al, -0x411(%rbp)
je 0x3dca
callq 0x1200
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x411(%rbp)
jne 0x3dca
xorl %eax, %eax
cmpl $0x22, -0xc(%rbp)
movb %al, -0x411(%rbp)
je 0x3dca
cmpl $0x3a, -0xc(%rbp)
setne %al
movb %al, -0x411(%rbp)
movb -0x411(%rbp), %al
testb $0x1, %al
jne 0x3dd6
jmp 0x3e25
movslq -0x10(%rbp), %rax
cmpq $0x3ff, %rax            # imm = 0x3FF
jne 0x3dfb
movb $0x0, -0x11(%rbp)
leaq -0x410(%rbp), %rsi
leaq 0x6ab(%rip), %rdi       # 0x449f
movb $0x0, %al
callq 0x1580
movl -0xc(%rbp), %eax
movb %al, %cl
movl -0x10(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x10(%rbp)
cltq
movb %cl, -0x410(%rbp,%rax)
movq -0x8(%rbp), %rdi
callq 0x10c0
movl %eax, -0xc(%rbp)
jmp 0x3d7e
movslq -0x10(%rbp), %rax
movb $0x0, -0x410(%rbp,%rax)
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x1160
leaq -0x410(%rbp), %rdi
callq 0x1790
addq $0x420, %rsp            # imm = 0x420
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/lib/rra.c
// Function: readString
static char *
readString(FILE *in)
    {
    int ch;
    int index;
    char buffer[4096];
    int backslashed;

    index = 0;

    backslashed = 0;
    while ((ch = fgetc(in)) && ch != EOF)
        {
        if (!backslashed && ch == '\"')
            break;

        if (!backslashed && ch == '\\')
            backslashed = 1;
        else
            backslashed = 0;

        if (ch == '\n') ++LineNumber;

        if (index == sizeof(buffer) - 1)
            {
            buffer[sizeof(buffer)-1] = '\0';
            Fatal("line %d, string too long: %s\n",
                    LineNumber,buffer);
            }
        buffer[index++] = ch;
        }

    buffer[index] = '\0';

    if (ch != '\"')
        {
        buffer[sizeof(buffer)-1] = '\0';
        Fatal("line %d,unterminated string: %s\n",LineNumber,buffer);
        }

    return StringDup(buffer);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1020, %rsp           # imm = 0x1020
movq %rdi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0x1014(%rbp)
movq -0x8(%rbp), %rdi
callq 0x10c0
movl %eax, %ecx
movl %ecx, -0xc(%rbp)
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x1015(%rbp)
je 0x3ea8
cmpl $-0x1, -0xc(%rbp)
setne %al
movb %al, -0x1015(%rbp)
movb -0x1015(%rbp), %al
testb $0x1, %al
jne 0x3eb7
jmp 0x3f4e
cmpl $0x0, -0x1014(%rbp)
jne 0x3ecb
cmpl $0x22, -0xc(%rbp)
jne 0x3ecb
jmp 0x3f4e
cmpl $0x0, -0x1014(%rbp)
jne 0x3ee6
cmpl $0x5c, -0xc(%rbp)
jne 0x3ee6
movl $0x1, -0x1014(%rbp)
jmp 0x3ef0
movl $0x0, -0x1014(%rbp)
cmpl $0xa, -0xc(%rbp)
jne 0x3f05
movl 0x322c(%rip), %eax      # 0x7128
addl $0x1, %eax
movl %eax, 0x3223(%rip)      # 0x7128
movslq -0x10(%rbp), %rax
cmpq $0xfff, %rax            # imm = 0xFFF
jne 0x3f30
movb $0x0, -0x11(%rbp)
movl 0x320d(%rip), %esi      # 0x7128
leaq -0x1010(%rbp), %rdx
leaq 0x5c1(%rip), %rdi       # 0x44ea
movb $0x0, %al
callq 0x1580
movl -0xc(%rbp), %eax
movb %al, %cl
movl -0x10(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x10(%rbp)
cltq
movb %cl, -0x1010(%rbp,%rax)
jmp 0x3e80
movslq -0x10(%rbp), %rax
movb $0x0, -0x1010(%rbp,%rax)
cmpl $0x22, -0xc(%rbp)
je 0x3f7f
movb $0x0, -0x11(%rbp)
movl 0x31be(%rip), %esi      # 0x7128
leaq -0x1010(%rbp), %rdx
leaq 0x590(%rip), %rdi       # 0x4508
movb $0x0, %al
callq 0x1580
leaq -0x1010(%rbp), %rdi
callq 0x1790
addq $0x1020, %rsp           # imm = 0x1020
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_7/exercise_7_04/minscanf.c
// Function: main
int main(int argc, char *argv[])
{
  int decimal;
  int integer;
  int octal;
  int unsigned_decimal;
  int hexadecimal_integer;
  char character;
  char str[100];
  float float_point_number;

  minscanf("%d", &decimal);
  minscanf("%i", &integer);
  minscanf("%o", &octal);
  minscanf("%u", &unsigned_decimal);
  minscanf("%x", &hexadecimal_integer);
  minscanf("%c", &character);
  minscanf("%s", str);
  minscanf("%f", &float_point_number);

  printf("decimal: %d\n", decimal);
  printf("integer: %i\n", integer);
  printf("octal: %o\n", octal);
  printf("unsigned_decimal: %u\n", unsigned_decimal);
  printf("hexadecimal_integer: %x\n", hexadecimal_integer);
  printf("character: %c\n", character);
  printf("str: %s\n", str);
  printf("float_point_number: %f\n", float_point_number);

  return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0xeec(%rip), %rdi       # 0x205c
leaq -0x14(%rbp), %rsi
movb $0x0, %al
callq 0x12a0
leaq 0xedd(%rip), %rdi       # 0x205f
leaq -0x18(%rbp), %rsi
movb $0x0, %al
callq 0x12a0
leaq 0xece(%rip), %rdi       # 0x2062
leaq -0x1c(%rbp), %rsi
movb $0x0, %al
callq 0x12a0
leaq 0xebf(%rip), %rdi       # 0x2065
leaq -0x20(%rbp), %rsi
movb $0x0, %al
callq 0x12a0
leaq 0xeb0(%rip), %rdi       # 0x2068
leaq -0x24(%rbp), %rsi
movb $0x0, %al
callq 0x12a0
leaq 0xea1(%rip), %rdi       # 0x206b
leaq -0x25(%rbp), %rsi
movb $0x0, %al
callq 0x12a0
leaq -0x90(%rbp), %rsi
leaq 0xe8b(%rip), %rdi       # 0x206e
movb $0x0, %al
callq 0x12a0
leaq 0xe80(%rip), %rdi       # 0x2071
leaq -0x94(%rbp), %rsi
movb $0x0, %al
callq 0x12a0
movl -0x14(%rbp), %esi
leaq 0xe6b(%rip), %rdi       # 0x2074
movb $0x0, %al
callq 0x1030
movl -0x18(%rbp), %esi
leaq 0xe67(%rip), %rdi       # 0x2081
movb $0x0, %al
callq 0x1030
movl -0x1c(%rbp), %esi
leaq 0xe63(%rip), %rdi       # 0x208e
movb $0x0, %al
callq 0x1030
movl -0x20(%rbp), %esi
leaq 0xe5d(%rip), %rdi       # 0x2099
movb $0x0, %al
callq 0x1030
movl -0x24(%rbp), %esi
leaq 0xe62(%rip), %rdi       # 0x20af
movb $0x0, %al
callq 0x1030
movsbl -0x25(%rbp), %esi
leaq 0xe69(%rip), %rdi       # 0x20c8
movb $0x0, %al
callq 0x1030
leaq -0x90(%rbp), %rsi
leaq 0xe63(%rip), %rdi       # 0x20d7
movb $0x0, %al
callq 0x1030
movss -0x94(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0xe52(%rip), %rdi       # 0x20e0
movb $0x1, %al
callq 0x1030
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/test_pdf.c
// Function: write_string
static inline void write_string(FILE *f,EMB_PARAMS *emb,const char *str) // {{{
{
  assert(f);
  assert(emb);
  int iA;

  if (emb->plan&EMB_A_MULTIBYTE) {
    putc('<',f);
    for (iA=0;str[iA];iA++) {
      const unsigned short gid=emb_get(emb,(unsigned char)str[iA]);
      fprintf(f,"%04x",gid);
    }
    putc('>',f);
  } else {
    putc('(',f);
    for (iA=0;str[iA];iA++) {
      emb_get(emb,(unsigned char)str[iA]);
    }
    fprintf(f,"%s",str); // TODO
    putc(')',f);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x2c1d
jmp 0x2c3c
leaq 0xb441(%rip), %rdi      # 0xe065
leaq 0xb411(%rip), %rsi      # 0xe03c
movl $0x35, %edx
leaq 0xb667(%rip), %rcx      # 0xe29e
callq 0x2100
cmpq $0x0, -0x10(%rbp)
je 0x2c45
jmp 0x2c64
leaq 0xb688(%rip), %rdi      # 0xe2d4
leaq 0xb3e9(%rip), %rsi      # 0xe03c
movl $0x36, %edx
leaq 0xb63f(%rip), %rcx      # 0xe29e
callq 0x2100
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2ce0
movq -0x8(%rbp), %rsi
movl $0x3c, %edi
callq 0x2260
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x2cd0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movzbl (%rax,%rcx), %esi
callq 0x2d50
movw %ax, -0x1e(%rbp)
movq -0x8(%rbp), %rdi
movzwl -0x1e(%rbp), %edx
leaq 0xb61a(%rip), %rsi      # 0xe2d8
movb $0x0, %al
callq 0x21e0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x2c88
movq -0x8(%rbp), %rsi
movl $0x3e, %edi
callq 0x2260
jmp 0x2d47
movq -0x8(%rbp), %rsi
movl $0x28, %edi
callq 0x2260
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x2d23
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movzbl (%rax,%rcx), %esi
callq 0x2d50
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x2cf5
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0xb5ab(%rip), %rsi      # 0xe2dd
movb $0x0, %al
callq 0x21e0
movq -0x8(%rbp), %rsi
movl $0x29, %edi
callq 0x2260
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/test_pdf.c
// Function: example_outfn
static void example_outfn(const char *buf,int len,void *context) // {{{
{
  FILE *f=(FILE *)context;
  if (fwrite(buf,1,len,f)!=len) {
    fprintf(stderr,"Short write: %m\n");
    assert(0);
    return;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl $0x1, %esi
callq 0x2270
movslq -0xc(%rbp), %rcx
cmpq %rcx, %rax
je 0x2e01
movq 0x1020f(%rip), %rax     # 0x12fe0
movq (%rax), %rdi
leaq 0xb505(%rip), %rsi      # 0xe2e0
movb $0x0, %al
callq 0x21e0
leaq 0xbf17(%rip), %rdi      # 0xed00
leaq 0xb24c(%rip), %rsi      # 0xe03c
movl $0x10, %edx
leaq 0xb4f5(%rip), %rcx      # 0xe2f1
callq 0x2100
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/./embed.h
// Function: emb_set
static inline void emb_set(EMB_PARAMS *emb,int unicode,unsigned short gid) // {{{
{
  if (emb->subset) {
    if (emb->plan&EMB_A_MULTIBYTE) {
      bit_set(emb->subset,gid);
      // ToUnicode.add(gid,unicode);
    } else {
      // TODO ... encoding
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movw %ax, -0xe(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x2e57
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2e53
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movzwl -0xe(%rbp), %esi
callq 0x2e60
jmp 0x2e55
jmp 0x2e55
jmp 0x2e57
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_read_compressed_raw
static int otf_read_compressed_raw(FILE *f,char *buf,long pos,unsigned long length,int compLength) // {{{
{
#ifdef WOFF_SUPPORT
  char *tmp=malloc(sizeof(char)*compLength);
  if (!tmp) {
    fprintf(stderr,"Bad alloc: %s\n", strerror(errno));
    return -1;
  }
  const int res=otf_read_raw(f,tmp,pos,compLength);
  if (res!=compLength) {
    fprintf(stderr,"Short read\n");
    free(tmp);
    return -1;
  }
  if (uncompress((unsigned char *)buf,&length,(const unsigned char *)tmp,compLength)!=Z_OK) {
    fprintf(stderr,"Decompression failed\n");
    free(tmp);
    return -1;
  }
  free(tmp);
  return length;
#else
  fprintf(stderr,"Cannot read compressed table, WOFF_SUPPORT has not been compiled in\n");
  return -1;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movslq -0x2c(%rbp), %rdi
shlq $0x0, %rdi
callq 0x21d0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x30df
movq 0xff35(%rip), %rax      # 0x12fe0
movq (%rax), %rax
movq %rax, -0x48(%rbp)
callq 0x2040
movl (%rax), %edi
callq 0x2070
movq -0x48(%rbp), %rdi
movq %rax, %rdx
leaq 0xb290(%rip), %rsi      # 0xe35c
movb $0x0, %al
callq 0x21e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x317c
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x3190
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x2c(%rbp), %eax
je 0x3128
movq 0xfedb(%rip), %rax      # 0x12fe0
movq (%rax), %rdi
leaq 0xb25c(%rip), %rsi      # 0xe36b
movb $0x0, %al
callq 0x21e0
movq -0x38(%rbp), %rdi
callq 0x21b0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x317c
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rdx
movslq -0x2c(%rbp), %rcx
leaq -0x28(%rbp), %rsi
callq 0x2090
cmpl $0x0, %eax
je 0x316c
movq 0xfe97(%rip), %rax      # 0x12fe0
movq (%rax), %rdi
leaq 0xb5dc(%rip), %rsi      # 0xe72f
movb $0x0, %al
callq 0x21e0
movq -0x38(%rbp), %rdi
callq 0x21b0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x317c
movq -0x38(%rbp), %rdi
callq 0x21b0
movq -0x28(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_read_raw
static int otf_read_raw(FILE *f,char *buf,long pos,int length) // {{{
{
  const int res=fseek(f,pos,SEEK_SET);
  if (res==-1) {
    fprintf(stderr,"Seek failed: %s\n", strerror(errno));
    return -1;
  }
  return fread(buf,1,length,f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
callq 0x2180
movl %eax, -0x28(%rbp)
cmpl $-0x1, -0x28(%rbp)
jne 0x31f7
movq 0xfe1a(%rip), %rax      # 0x12fe0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
callq 0x2040
movl (%rax), %edi
callq 0x2070
movq -0x30(%rbp), %rdi
movq %rax, %rdx
leaq 0xb55e(%rip), %rsi      # 0xe745
movb $0x0, %al
callq 0x21e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3210
movq -0x18(%rbp), %rdi
movslq -0x24(%rbp), %rdx
movq -0x10(%rbp), %rcx
movl $0x1, %esi
callq 0x21f0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_load2
OTF_FILE *otf_load2(FILE *f,int use_ttc) // {{{  takes f
{
  OTF_FILE *otf=otf_new(f);
  if (!otf) {
    fprintf(stderr,"Bad alloc: %s\n", strerror(errno));
    fclose(f);
    return NULL;
  }

  char buf[4];
  if (!otf_read(otf,buf,0,4)) {
    fprintf(stderr,"Not a ttf font / too short\n");
    otf_close(otf);
    return NULL;
  }
  const unsigned int version=get_ULONG(buf);

  int pos;
  if (version==OTF_TAG('w','O','F','F')) { // WOFF does not currently support TTC
    pos=otf_load_woff_header(otf);
  } else if (version==OTF_TAG('t','t','c','f')) { // TTC
    pos=otf_load_ttc(otf,use_ttc);
  } else {
    pos=otf_load_header(otf,0);
  }

  if (pos!=-1) {
    pos=otf_do_load(otf,pos);
  }

  if (pos==-1) {
    otf_close(otf);
    return NULL;
  }
  return otf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3360
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x3288
movq 0xfd96(%rip), %rax      # 0x12fe0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
callq 0x2040
movl (%rax), %edi
callq 0x2070
movq -0x38(%rbp), %rdi
movq %rax, %rdx
leaq 0xb0f1(%rip), %rsi      # 0xe35c
movb $0x0, %al
callq 0x21e0
movq -0x10(%rbp), %rdi
callq 0x2150
movq $0x0, -0x8(%rbp)
jmp 0x3355
movq -0x20(%rbp), %rdi
leaq -0x24(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x4, %ecx
callq 0x33d0
cmpq $0x0, %rax
jne 0x32d2
movq 0xfd35(%rip), %rax      # 0x12fe0
movq (%rax), %rdi
leaq 0xb0c2(%rip), %rsi      # 0xe377
movb $0x0, %al
callq 0x21e0
movq -0x20(%rbp), %rdi
callq 0x3470
movq $0x0, -0x8(%rbp)
jmp 0x3355
leaq -0x24(%rbp), %rdi
callq 0x3540
movl %eax, -0x28(%rbp)
cmpl $0x774f4646, -0x28(%rbp) # imm = 0x774F4646
jne 0x32f5
movq -0x20(%rbp), %rdi
callq 0x3580
movl %eax, -0x2c(%rbp)
jmp 0x331f
cmpl $0x74746366, -0x28(%rbp) # imm = 0x74746366
jne 0x330f
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3730
movl %eax, -0x2c(%rbp)
jmp 0x331d
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x3820
movl %eax, -0x2c(%rbp)
jmp 0x331f
cmpl $-0x1, -0x2c(%rbp)
je 0x3334
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x38b0
movl %eax, -0x2c(%rbp)
cmpl $-0x1, -0x2c(%rbp)
jne 0x334d
movq -0x20(%rbp), %rdi
callq 0x3470
movq $0x0, -0x8(%rbp)
jmp 0x3355
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_new
static OTF_FILE *otf_new(FILE *f) // {{{
{
  assert(f);

  OTF_FILE *ret;
  ret=calloc(1,sizeof(OTF_FILE));
  if (ret) {
    ret->f=f;
    ret->version=0x00010000;
  }

  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3375
jmp 0x3394
leaq 0xace9(%rip), %rdi      # 0xe065
leaq 0xb70c(%rip), %rsi      # 0xea8f
movl $0x36, %edx
leaq 0xb3c7(%rip), %rcx      # 0xe756
callq 0x2100
movl $0x1, %edi
movl $0x98, %esi
callq 0x2110
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x33c4
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl $0x10000, 0x14(%rax)    # imm = 0x10000
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_read
static char *otf_read(OTF_FILE *otf,char *buf,long pos,int length) // {{{
{
  assert(length>0);
  const int res=otf_read_raw(otf->f,buf,pos,length);
  if (res!=length) {
    fprintf(stderr,"Short read\n");
    return NULL;
  }
  return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0x33ef
jmp 0x340e
leaq 0xb37a(%rip), %rdi      # 0xe770
leaq 0xb692(%rip), %rsi      # 0xea8f
movl $0x6d, %edx
leaq 0xb370(%rip), %rcx      # 0xe779
callq 0x2100
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
callq 0x3190
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0x3452
movq 0xfba9(%rip), %rax      # 0x12fe0
movq (%rax), %rdi
leaq 0xaf2a(%rip), %rsi      # 0xe36b
movb $0x0, %al
callq 0x21e0
movq $0x0, -0x8(%rbp)
jmp 0x345a
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_close
void otf_close(OTF_FILE *otf) // {{{
{
  assert(otf);
  if (otf) {
    if (otf->flags&OTF_F_CACHE_GLYF) {
      free(otf->glyf);
    } else {
      free(otf->gly);
    }
    free(otf->cmap);
    free(otf->name);
    free(otf->hmtx);
    free(otf->glyphOffsets);
    fclose(otf->f);
    free(otf->tables);
    free(otf);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3485
jmp 0x34a4
leaq 0xabac(%rip), %rdi      # 0xe038
leaq 0xb5fc(%rip), %rsi      # 0xea8f
movl $0x1d6, %edx            # imm = 0x1D6
leaq 0xaf10(%rip), %rcx      # 0xe3af
callq 0x2100
cmpq $0x0, -0x8(%rbp)
je 0x3536
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x34d0
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rdi
callq 0x21b0
jmp 0x34e0
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0x21b0
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x21b0
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x21b0
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x21b0
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x21b0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2150
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x21b0
movq -0x8(%rbp), %rdi
callq 0x21b0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/./sfnt_int.h
// Function: get_ULONG
static inline unsigned int get_ULONG(const char *buf) // {{{
{
  return ((unsigned char)buf[0]<<24)|
         ((unsigned char)buf[1]<<16)|
         ((unsigned char)buf[2]<<8)|
         ((unsigned char)buf[3]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
shll $0x18, %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x8(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x8(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
orl %ecx, %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_load_woff_header
static int otf_load_woff_header(OTF_FILE *otf) // {{{  returns file position  or -1
{
  char buf[44];
  if (!otf_read(otf,buf,0,44)) {
    fprintf(stderr,"Not a wOFF font\n");
    return -1;
  }
  if (get_USHORT(buf+14)!=0) {
    fprintf(stderr,"Unsupported wOFF font\n");
    return -1;
  }
  // buf[0] alread processed: wOFF
  otf->version=get_ULONG(buf+4);
  otf->woff.length=get_ULONG(buf+8);
  otf->numTables=get_USHORT(buf+12);
  otf->woff.origLength=get_ULONG(buf+16);
  otf->woff.majorVersion=get_USHORT(buf+20);
  otf->woff.minorVersion=get_USHORT(buf+22);
  otf->woff.metaOffset=get_ULONG(buf+24);
  otf->woff.metaLength=get_ULONG(buf+28);
  otf->woff.metaOrigLength=get_ULONG(buf+32);
  otf->woff.privOffset=get_ULONG(buf+36);
  otf->woff.privLength=get_ULONG(buf+40);
  otf->flags|=OTF_F_WOFF;
  otf->flags|=OTF_F_CACHE_GLYF;
  return 44;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x2c, %ecx
callq 0x33d0
cmpq $0x0, %rax
jne 0x35cc
movq 0xfa31(%rip), %rax      # 0x12fe0
movq (%rax), %rdi
leaq 0xb1ee(%rip), %rsi      # 0xe7a7
movb $0x0, %al
callq 0x21e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3721
leaq -0x40(%rbp), %rdi
addq $0xe, %rdi
callq 0x46f0
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x3605
movq 0xf9f8(%rip), %rax      # 0x12fe0
movq (%rax), %rdi
leaq 0xb1c6(%rip), %rsi      # 0xe7b8
movb $0x0, %al
callq 0x21e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3721
leaq -0x40(%rbp), %rdi
addq $0x4, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
leaq -0x40(%rbp), %rdi
addq $0x8, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
leaq -0x40(%rbp), %rdi
addq $0xc, %rdi
callq 0x46f0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x38(%rax)
leaq -0x40(%rbp), %rdi
addq $0x10, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
leaq -0x40(%rbp), %rdi
addq $0x14, %rdi
callq 0x46f0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x20(%rax)
leaq -0x40(%rbp), %rdi
addq $0x16, %rdi
callq 0x46f0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x22(%rax)
leaq -0x40(%rbp), %rdi
addq $0x18, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
leaq -0x40(%rbp), %rdi
addq $0x1c, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
leaq -0x40(%rbp), %rdi
addq $0x20, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2c(%rax)
leaq -0x40(%rbp), %rdi
addq $0x24, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
leaq -0x40(%rbp), %rdi
addq $0x28, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x34(%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
orl $0x8000, %ecx           # imm = 0x8000
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x8(%rax)
movl $0x2c, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_load_ttc
static int otf_load_ttc(OTF_FILE *otf,int use_ttc) // {{{
{
  char buf[12];
  if (!otf_read(otf,buf,0,12)) {
    fprintf(stderr,"Not a TTC font\n");
    return -1;
  }

  const unsigned int ttc_version=get_ULONG(buf+4);
  if ( (ttc_version!=0x00010000)&&(ttc_version!=0x00020000) ) {
    fprintf(stderr,"Unsupported TTC version\n");
    return -1;
  }
  otf->numTTC=get_ULONG(buf+8);
  otf->useTTC=use_ttc;

  const int pos=otf_get_ttc_start(otf,use_ttc);
  if (pos<0) {
    return -1;
  }
  return otf_load_header(otf,pos);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0xc, %ecx
callq 0x33d0
cmpq $0x0, %rax
jne 0x377f
movq 0xf87e(%rip), %rax      # 0x12fe0
movq (%rax), %rdi
leaq 0xb063(%rip), %rsi      # 0xe7cf
movb $0x0, %al
callq 0x21e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x380f
leaq -0x20(%rbp), %rdi
addq $0x4, %rdi
callq 0x3540
movl %eax, -0x24(%rbp)
cmpl $0x10000, -0x24(%rbp)   # imm = 0x10000
je 0x37c2
cmpl $0x20000, -0x24(%rbp)   # imm = 0x20000
je 0x37c2
movq 0xf838(%rip), %rax      # 0x12fe0
movq (%rax), %rdi
leaq 0xb02d(%rip), %rsi      # 0xe7df
movb $0x0, %al
callq 0x21e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x380f
leaq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5600
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jge 0x3800
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x380f
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %esi
callq 0x3820
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_load_header
static int otf_load_header(OTF_FILE *otf,int pos) // {{{
{
  char buf[12];
  if (!otf_read(otf,buf,pos,12)) {
    fprintf(stderr,"Not a ttf font\n");
    return -1;
  }
  otf->version=get_ULONG(buf);
  otf->numTables=get_USHORT(buf+4);
  // don't need the other fields...
  pos+=12;
  return pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movslq -0x14(%rbp), %rdx
movl $0xc, %ecx
callq 0x33d0
cmpq $0x0, %rax
jne 0x386c
movq 0xf78e(%rip), %rax      # 0x12fe0
movq (%rax), %rdi
leaq 0xafb4(%rip), %rsi      # 0xe810
movb $0x0, %al
callq 0x21e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x38a5
leaq -0x20(%rbp), %rdi
callq 0x3540
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
leaq -0x20(%rbp), %rdi
addq $0x4, %rdi
callq 0x46f0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x38(%rax)
movl -0x14(%rbp), %eax
addl $0xc, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_load
OTF_FILE *otf_load(const char *file) // {{{
{
  FILE *f;
  int use_ttc=-1;

  if ((f=fopen(file,"rb"))==NULL) {
    // check for TTC
    char *tmp=strrchr(file,'/'),*end;
    if (tmp) {
      use_ttc=strtoul(tmp+1,&end,10);
      if (!*end) {
        end=malloc((tmp-file+1)*sizeof(char));
        if (!end) {
          fprintf(stderr,"Bad alloc: %s\n", strerror(errno));
          return NULL;
        }
        strncpy(end,file,tmp-file);
        end[tmp-file]=0;
        f=fopen(end,"rb");
        free(end);
      }
    }
    if (!f) {
      fprintf(stderr,"Could not open \"%s\": %s\n", file, strerror(errno));
      return NULL;
    }
  }
  return otf_load2(f,use_ttc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rdi
leaq 0xa5e5(%rip), %rsi      # 0xe393
callq 0x21a0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3efb
movq -0x10(%rbp), %rdi
movl $0x2f, %esi
callq 0x2170
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x3ead
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x30(%rbp), %rsi
movl $0xa, %edx
callq 0x2060
movl %eax, -0x1c(%rbp)
movq -0x30(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x3eab
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
subq %rax, %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq 0x21d0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x3e63
movq 0xf1b2(%rip), %rax      # 0x12fe0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
callq 0x2040
movl (%rax), %edi
callq 0x2070
movq -0x38(%rbp), %rdi
movq %rax, %rdx
leaq 0xa50d(%rip), %rsi      # 0xe35c
movb $0x0, %al
callq 0x21e0
movq $0x0, -0x8(%rbp)
jmp 0x3f0b
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
subq %rax, %rdx
callq 0x20c0
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rdx
subq %rdx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rdi
leaq 0xa4fa(%rip), %rsi      # 0xe393
callq 0x21a0
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rdi
callq 0x21b0
jmp 0x3ead
cmpq $0x0, -0x18(%rbp)
jne 0x3ef9
movq 0xf125(%rip), %rax      # 0x12fe0
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x2040
movl (%rax), %edi
callq 0x2070
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
movq %rax, %rcx
leaq 0xa4ae(%rip), %rsi      # 0xe396
movb $0x0, %al
callq 0x21e0
movq $0x0, -0x8(%rbp)
jmp 0x3f0b
jmp 0x3efb
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x3220
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_dirent_tag_compare
static int otf_dirent_tag_compare(const void *a,const void *b) // {{{
{
  const unsigned int aa=((const OTF_DIRENT *)a)->tag;
  const unsigned int bb=((const OTF_DIRENT *)b)->tag;
  if (aa<bb) {
    return -1;
  } else if (aa>bb) {
    return 1;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0x3fdf
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3ff9
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jbe 0x3ff0
movl $0x1, -0x4(%rbp)
jmp 0x3ff9
jmp 0x3ff2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/sfnt.c
// Function: otf_get_table
char *otf_get_table(OTF_FILE *otf,unsigned int tag,int *ret_len) // {{{
{
  assert(otf);
  assert(ret_len);

  const int idx=otf_find_table(otf,tag);
  if (idx==-1) {
    return NULL;
  }
  const OTF_DIRENT *table=otf->tables+idx;

  char *ret=otf_read_table(otf,NULL,table);
  if (!ret) {
    return NULL;
  }
  if (otf->flags&OTF_F_DO_CHECKSUM) {
    unsigned int csum=otf_checksum(ret,table->length);
    if (tag==OTF_TAG('h','e','a','d')) { // special case
      csum-=get_ULONG(ret+8);
    }
    if (csum!=table->checkSum) {
      fprintf(stderr,"Wrong checksum for %c%c%c%c\n",OTF_UNTAG(tag));
      free(ret);
      return NULL;
    }
  }
  *ret_len=table->length;
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x401c
jmp 0x403b
leaq 0xa015(%rip), %rdi      # 0xe038
leaq 0xaa65(%rip), %rsi      # 0xea8f
movl $0x226, %edx            # imm = 0x226
leaq 0xa394(%rip), %rcx      # 0xe3ca
callq 0x2100
cmpq $0x0, -0x20(%rbp)
je 0x4044
jmp 0x4063
leaq 0xa3b4(%rip), %rdi      # 0xe3ff
leaq 0xaa3d(%rip), %rsi      # 0xea8f
movl $0x227, %edx            # imm = 0x227
leaq 0xa36c(%rip), %rcx      # 0xe3ca
callq 0x2100
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3f20
movl %eax, -0x24(%rbp)
cmpl $-0x1, -0x24(%rbp)
jne 0x4085
movq $0x0, -0x8(%rbp)
jmp 0x418d
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x2e90
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x40c5
movq $0x0, -0x8(%rbp)
jmp 0x418d
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x40000, %eax          # imm = 0x40000
cmpl $0x0, %eax
je 0x4178
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x41a0
movl %eax, -0x3c(%rbp)
cmpl $0x68656164, -0x14(%rbp) # imm = 0x68656164
jne 0x410d
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
callq 0x3540
movl %eax, %ecx
movl -0x3c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x4(%rcx), %eax
je 0x4176
movq 0xeec0(%rip), %rax      # 0x12fe0
movq (%rax), %rdi
movl -0x14(%rbp), %edx
shrl $0x18, %edx
andl $0xff, %edx
movl -0x14(%rbp), %ecx
shrl $0x10, %ecx
andl $0xff, %ecx
movl -0x14(%rbp), %r8d
shrl $0x8, %r8d
andl $0xff, %r8d
movl -0x14(%rbp), %r9d
andl $0xff, %r9d
leaq 0xa2ab(%rip), %rsi      # 0xe407
movb $0x0, %al
callq 0x21e0
movq -0x38(%rbp), %rdi
callq 0x21b0
movq $0x0, -0x8(%rbp)
jmp 0x418d
jmp 0x4178
movq -0x30(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/./sfnt_int.h
// Function: otf_checksum
static inline unsigned int otf_checksum(const char *buf, unsigned int len) // {{{
{
  unsigned int ret=0;
  for (len=(len+3)/4;len>0;len--,buf+=4) {
    ret+=get_ULONG(buf);
  }
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl $0x3, %eax
shrl $0x2, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jbe 0x41ee
movq -0x8(%rbp), %rdi
callq 0x3540
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
jmp 0x41c2
movl -0x10(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)