LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/util.c
// Function: udp_listen
int udp_listen( char* ip, int port )
{
/* ip ��ʾ�������ĸ�ip �ϣ�����ΪNULL,��ʾ����������ip �ϣ�
������Ϊnull,��������ָ��ip��ַ��: 
�������óɹ����� socket fd, ���򷵻� -1  */

    int fd;
    struct sockaddr_in addr;

    fd = socket( AF_INET, SOCK_DGRAM, 0 );
    if( fd == -1 )
    {
        return -1;
    }

    int reuse=1;
    setsockopt( fd, SOL_SOCKET, SO_REUSEADDR, (char*)&reuse, sizeof(reuse) );
    
    addr.sin_family = AF_INET;
    addr.sin_port   = htons( port );

    if(ip == NULL || ip[0] == '*' )
    {
        addr.sin_addr.s_addr = INADDR_ANY;
        if( bind( fd, (struct sockaddr*)&addr, sizeof(addr) ) == -1 )
        {
            close( fd );
            return -1;
        }
    }
    else /*����ip  */
    {
        addr.sin_addr.s_addr = inet_addr(ip);
        if( bind( fd, (struct sockaddr*)&addr, sizeof(addr) ) == -1 )
        {
            close( fd );
            return -1;
        }
    }

    return fd;

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebp
movq %rdi, %r14
movl $0x2, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x22c0
cmpl $-0x1, %eax
je 0x5e49
movl %eax, %ebx
leaq 0xc(%rsp), %rcx
movl $0x1, (%rcx)
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x20b0
movw $0x2, 0x10(%rsp)
rolw $0x8, %bp
movw %bp, 0x12(%rsp)
testq %r14, %r14
je 0x5e13
cmpb $0x2a, (%r14)
jne 0x5e21
leaq 0x10(%rsp), %rsi
movl $0x0, 0x4(%rsi)
jmp 0x5e31
movq %r14, %rdi
callq 0x2160
leaq 0x10(%rsp), %rsi
movl %eax, 0x4(%rsi)
movl %ebx, %edi
movl $0x10, %edx
callq 0x2210
cmpl $-0x1, %eax
jne 0x5e4e
movl %ebx, %edi
callq 0x2140
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/util.c
// Function: udp_send
int udp_send( int fd, char* ip, int port, char* msg, int len )
{
    struct sockaddr_in addr;
    addr.sin_family = AF_INET;
    addr.sin_port   = htons( port );
    addr.sin_addr.s_addr = inet_addr(ip);
    
    return sendto( fd, msg, len, 0, (struct sockaddr*)&addr, sizeof(addr) );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebx
movq %rcx, %r14
movl %edi, %ebp
leaq 0x8(%rsp), %r15
movw $0x2, (%r15)
rolw $0x8, %dx
movw %dx, 0x2(%r15)
movq %rsi, %rdi
callq 0x2160
movl %eax, 0x4(%r15)
movslq %ebx, %rdx
movl %ebp, %edi
movq %r14, %rsi
xorl %ecx, %ecx
movq %r15, %r8
movl $0x10, %r9d
callq 0x2130
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/util.c
// Function: resolve_host_ip
int resolve_host_ip( const char* host, char* ip )
{
    struct hostent* ent;
    char* addr;
    unsigned char b1,b2,b3,b4;

     ent = gethostbyname( host );
    if( ent == NULL )
        return -1;
    addr = *ent->h_addr_list;
    if( !addr )
        return -1;
    b1 = addr[0];
    b2 = addr[1];
    b3 = addr[2];
    b4 = addr[3];

    sprintf( ip, "%d.%d.%d.%d", b1, b2, b3, b4 );
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
callq 0x2190
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x5f56
movq 0x18(%rax), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x5f56
movzbl (%rax), %edx
movzbl 0x1(%rax), %ecx
movzbl 0x2(%rax), %r8d
movzbl 0x3(%rax), %r9d
leaq 0x2482(%rip), %rsi      # 0x83cc
xorl %ebx, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2260
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/util.c
// Function: write_log
int write_log( const char* fmt, ... )
{
    FILE* f;
    time_t t;
    struct tm* tm;
    va_list  ap;
    //struct timeval tmv;

    f = fopen( log_file, "a" );
    if( f == NULL )
        return -1;
    
    t = time( 0 );
    //gettimeofday( &tmv, NULL );
    
    tm = localtime( &t );
    
    if( *fmt )
    {
        va_start( ap, fmt );
        //fprintf(f,"[%02d-%02d %02d:%02d:%02d.%03d]  ",tm->tm_mon+1,tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec,tmv.tv_usec / 1000 );
        fprintf( f, "[%02d-%02d %02d:%02d:%02d]  ", tm->tm_mon+1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec );
        vfprintf( f, fmt, ap);
        fprintf( f, "\n" );
        va_end( ap );
    }
    
    fclose( f );
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %rbx
movq %rsi, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x50(%rsp)
movq %r9, 0x58(%rsp)
testb %al, %al
je 0x5fc8
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movaps %xmm3, 0x90(%rsp)
movaps %xmm4, 0xa0(%rsp)
movaps %xmm5, 0xb0(%rsp)
movaps %xmm6, 0xc0(%rsp)
movaps %xmm7, 0xd0(%rsp)
leaq 0xa1f1(%rip), %rdi      # 0x101c0
leaq 0x2402(%rip), %rsi      # 0x83d8
callq 0x2230
testq %rax, %rax
je 0x6078
movq %rax, %r15
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x21c0
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
callq 0x2030
cmpb $0x0, (%rbx)
je 0x606e
leaq 0x30(%rsp), %rcx
leaq 0x10(%rsp), %r12
movq %rcx, 0x10(%r12)
leaq 0x110(%rsp), %rcx
movq %rcx, 0x8(%r12)
movabsq $0x3000000008, %rcx     # imm = 0x3000000008
movq %rcx, (%r12)
movl 0x10(%rax), %edx
incl %edx
movl 0xc(%rax), %ecx
movl 0x8(%rax), %r8d
movl (%rax), %esi
movl 0x4(%rax), %r9d
movl %esi, (%rsp)
leaq 0x2391(%rip), %rsi      # 0x83da
movq %r15, %rdi
xorl %eax, %eax
callq 0x21a0
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2240
movl $0xa, %edi
movq %r15, %rsi
callq 0x2150
movq %r15, %rdi
callq 0x20e0
jmp 0x607e
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/util.c
// Function: hex2asc
int hex2asc( char* hex, int len, char* buf, int buflen )
{
    char bits[] = "0123456789abcdef";
    
    unsigned char u;
    int i;

    if( buflen < len * 2 )
        return -1;
    buf[len*2]=0;
    
    for( i = 0; i < len; i++ )
    {
        u = hex[i];
        
        buf[i*2+0] = bits[ u >> 4 ];
        buf[i*2+1] = bits[ u & 0x0f ];
    }
    
    return 0;
    
}

// Assembly:
movslq %esi, %r8
addq %r8, %r8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %r8d
jg 0x6387
movb $0x0, (%rdx,%r8)
testl %esi, %esi
jle 0x6388
movl %esi, %ecx
xorl %eax, %eax
leaq 0x21c5(%rip), %rsi      # 0x8520
xorl %r8d, %r8d
movzbl (%rdi,%r8), %r9d
movl %r9d, %r10d
shrl $0x4, %r10d
movb (%r10,%rsi), %r10b
movb %r10b, (%rdx,%r8,2)
andl $0xf, %r9d
movb (%r9,%rsi), %r9b
movb %r9b, 0x1(%rdx,%r8,2)
incq %r8
cmpq %r8, %rcx
jne 0x635e
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/util.c
// Function: strlower
char *strlower( char *s )
{
    int i, len = strlen(s);
    for( i = 0; i < len; i++ ){
        s[i] = ( s[i] >= 'A' && s[i] <= 'Z' ? s[i] +32 : s[i] );
    }
    return s;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x20f0
testl %eax, %eax
jle 0x63c0
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
movzbl (%rbx,%rcx), %edx
leal -0x41(%rdx), %esi
leal 0x20(%rdx), %edi
cmpb $0x1a, %sil
movzbl %dil, %esi
cmovael %edx, %esi
movb %sil, (%rbx,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x639f
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/util.c
// Function: change_process_user
int change_process_user( char* user )
{
    struct passwd *pw;
    
    pw = getpwnam( user );
    if( !pw )
        return -1;
        
    if( setgid(pw->pw_gid ) )
        return -1;    
    
    if( setuid( pw->pw_uid ) )
        return -1;

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x2180
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x63f6
movq %rax, %r14
movl 0x14(%rax), %edi
callq 0x2220
testl %eax, %eax
jne 0x63f6
movl 0x10(%r14), %edi
callq 0x2280
xorl %ebx, %ebx
negl %eax
sbbl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/util.c
// Function: crypto_derive_key
int crypto_derive_key(const char *pass, unsigned char *key, int key_len)
{
    int datal;
    datal = strlen((const char *)pass);
    md5_context ctx;



    unsigned char md_buf[16];
    int addmd;
    unsigned int i, j, mds;

    mds = 16;


    for (j = 0, addmd = 0; j < key_len; addmd++) {
        md5_starts(&ctx);
        if (addmd) {
            md5_update(&ctx, md_buf, mds);
        }
        md5_update(&ctx, (unsigned char *)pass, datal);
        md5_finish(&ctx, &(md_buf[0]));

        for (i = 0; i < mds; i++, j++) {
            if (j >= key_len)
                break;
            key[j] = md_buf[i];
        }
    }


    return key_len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movl %edx, %ebx
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
callq 0x20f0
movl %ebx, %ecx
movq %rax, 0x18(%rsp)
testl %ebx, %ebx
je 0x64f8
movl %ecx, %r12d
xorl %r15d, %r15d
leaq 0x38(%rsp), %rbx
leaq 0x20(%rsp), %r13
xorl %ebp, %ebp
movq %r14, 0x8(%rsp)
movl %ecx, 0x4(%rsp)
movq %rbx, %rdi
callq 0x278c
testl %r15d, %r15d
je 0x6467
movq %rbx, %rdi
movq %r13, %rsi
movl $0x10, %edx
callq 0x27b7
movq %rbx, %rdi
movq %r14, %rsi
movq 0x18(%rsp), %rdx
callq 0x27b7
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3486
movl 0x4(%rsp), %ecx
cmpl %ecx, %ebp
jae 0x64e8
movl %ebp, %r14d
movq 0x10(%rsp), %rax
leaq (%rax,%r14), %rdi
notl %ebp
addl %ecx, %ebp
cmpl $0xf, %ebp
movl $0xf, %eax
cmovael %eax, %ebp
incl %ebp
movq %r13, %rsi
movq %rbp, %rdx
callq 0x21b0
xorl %ecx, %ecx
leaq 0x1(%rcx), %rax
cmpq $0xe, %rcx
ja 0x64cd
leaq (%rcx,%r14), %rdx
incq %rdx
movq %rax, %rcx
cmpq %r12, %rdx
jb 0x64b4
addl %eax, %r14d
movl %r14d, %ebp
movq 0x8(%rsp), %r14
leaq 0x20(%rsp), %r13
leaq 0x38(%rsp), %rbx
movl 0x4(%rsp), %ecx
jmp 0x64ed
leaq 0x38(%rsp), %rbx
incl %r15d
cmpl %ecx, %ebp
jb 0x644a
movl %ecx, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/util.c
// Function: pack_update_pkg
int pack_update_pkg( char* passwd, char* buf, char* msg, int msglen )
{
    aes_context ctx;
    
    upd_pack_hdr *hdr;
    char tmp[1024];
    unsigned char aes_key[32];
    unsigned char iv[16];
    unsigned int  checksum;
    unsigned int  timestamp;
    int offset = 0;
    int left = msglen + sizeof(upd_pack_hdr);
    int proc_len;
    
    int iv_off = 0;
    
    hdr = (upd_pack_hdr*)buf;
    
    crypto_derive_key( passwd, aes_key, 32 );
    md5( (unsigned char*)passwd, strlen( passwd ), iv );
    
    timestamp = time( NULL );
    hdr->time_stamp = htonl( timestamp );
    hdr->checksum   = 0;
    hdr->rnd        = rand();

    memcpy( buf + sizeof(upd_pack_hdr), msg, msglen );
    
    checksum = crc32( 0, buf, sizeof(upd_pack_hdr) + msglen );
    hdr->checksum = htonl( checksum );
    aes_setkey_enc( &ctx, aes_key, 256 );
    
    while( left )
    {
        proc_len = left > sizeof(tmp) ? sizeof(tmp) : left;
        
        aes_crypt_cfb128( &ctx, AES_ENCRYPT, proc_len, &iv_off, iv, (unsigned char*)buf + offset, (unsigned char*)tmp );
        memcpy( buf + offset, tmp, proc_len );
        
        left -= proc_len;
        offset += proc_len;
    }
    
    
    return 0;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x678, %rsp            # imm = 0x678
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
movslq %ecx, %r13
leaq 0xc(%r13), %r14
xorl %ebp, %ebp
movl %ebp, 0xc(%rsp)
leaq 0x20(%rsp), %rsi
movl $0x20, %edx
callq 0x6400
movq %r15, %rdi
callq 0x20f0
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
movl %eax, %esi
callq 0x3595
xorl %edi, %edi
callq 0x21c0
bswapl %eax
movl %eax, 0x8(%rbx)
movl %ebp, 0x4(%rbx)
callq 0x22a0
movl %eax, (%rbx)
leaq 0xc(%rbx), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x21b0
xorl %edi, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x755c
bswapl %eax
movl %eax, 0x4(%rbx)
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x6760
testl %r14d, %r14d
je 0x6602
leaq 0x270(%rsp), %r15
movl $0x400, %eax            # imm = 0x400
cmpl %eax, %r14d
movl $0x400, %r12d           # imm = 0x400
cmovbl %r14d, %r12d
movl %ebp, %r13d
addq %rbx, %r13
movq %r15, (%rsp)
leaq 0x40(%rsp), %rdi
movl $0x1, %esi
movl %r12d, %edx
leaq 0xc(%rsp), %rcx
leaq 0x10(%rsp), %r8
movq %r13, %r9
callq 0x748b
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21b0
addl %r12d, %ebp
subl %r12d, %r14d
jne 0x65b1
xorl %eax, %eax
addq $0x678, %rsp            # imm = 0x678
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/aes.c
// Function: aes_crypt_cbc
int aes_crypt_cbc( aes_context *ctx,
                    int mode,
                    int length,
                    unsigned char iv[16],
                    const unsigned char *input,
                    unsigned char *output )
{
    int i;
    unsigned char temp[16];

    if( length % 16 )
        return( ERR_AES_INVALID_INPUT_LENGTH );



    if( mode == AES_DECRYPT )
    {
        while( length > 0 )
        {
            memcpy( temp, input, 16 );
            aes_crypt_ecb( ctx, mode, input, output );

            for( i = 0; i < 16; i++ )
                output[i] = (unsigned char)( output[i] ^ iv[i] );

            memcpy( iv, temp, 16 );

            input  += 16;
            output += 16;
            length -= 16;
        }
    }
    else
    {
        while( length > 0 )
        {
            for( i = 0; i < 16; i++ )
                output[i] = (unsigned char)( input[i] ^ iv[i] );

            aes_crypt_ecb( ctx, mode, output, output );
            memcpy( iv, output, 16 );

            input  += 16;
            output += 16;
            length -= 16;
        }
    }

    return( 0 );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r13d
movl $0xfffff7f0, %eax       # imm = 0xFFFFF7F0
testb $0xf, %r13b
jne 0x747c
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movl %esi, %ebp
movq %rdi, %r12
testl %esi, %esi
je 0x742e
testl %r13d, %r13d
jle 0x747a
xorl %eax, %eax
movb (%r15,%rax), %cl
xorb (%r14,%rax), %cl
movb %cl, (%rbx,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x73ec
movq %r12, %rdi
movl %ebp, %esi
movq %rbx, %rdx
movq %rbx, %rcx
callq 0x6bd8
movups (%rbx), %xmm0
movups %xmm0, (%r15)
addq $0x10, %r14
addq $0x10, %rbx
leal -0x10(%r13), %eax
cmpl $0x10, %r13d
movl %eax, %r13d
jg 0x73ea
jmp 0x747a
testl %r13d, %r13d
jle 0x747a
movups (%r14), %xmm0
movaps %xmm0, (%rsp)
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x6bd8
xorl %eax, %eax
movb (%r15,%rax), %cl
xorb %cl, (%rbx,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x744d
movaps (%rsp), %xmm0
movups %xmm0, (%r15)
addq $0x10, %r14
addq $0x10, %rbx
leal -0x10(%r13), %eax
cmpl $0x10, %r13d
movl %eax, %r13d
jg 0x7433
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/aes.c
// Function: aes_crypt_cfb128
int aes_crypt_cfb128( aes_context *ctx,
                       int mode,
                       int length,
                       int *iv_off,
                       unsigned char iv[16],
                       const unsigned char *input,
                       unsigned char *output )
{
    int c, n = *iv_off;

    if( mode == AES_DECRYPT )
    {
        while( length-- )
        {
            if( n == 0 )
                aes_crypt_ecb( ctx, AES_ENCRYPT, iv, iv );

            c = *input++;
            *output++ = (unsigned char)( c ^ iv[n] );
            iv[n] = (unsigned char) c;

            n = (n + 1) & 0x0F;
        }
    }
    else
    {
        while( length-- )
        {
            if( n == 0 )
                aes_crypt_ecb( ctx, AES_ENCRYPT, iv, iv );

            iv[n] = *output++ = (unsigned char)( iv[n] ^ *input++ );

            n = (n + 1) & 0x0F;
        }
    }

    *iv_off = n;

    return( 0 );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rdi, 0x8(%rsp)
movq 0x50(%rsp), %r13
movq %rcx, 0x10(%rsp)
movl (%rcx), %ebp
testl %esi, %esi
je 0x74fd
testl %edx, %edx
je 0x7542
movl %edx, %ebx
xorl %r12d, %r12d
testl %ebp, %ebp
jne 0x74da
movq 0x8(%rsp), %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %r15, %rcx
callq 0x6bd8
movslq %ebp, %rax
movb (%r14,%r12), %cl
xorb (%r15,%rax), %cl
movb %cl, (%r13,%r12)
movb %cl, (%r15,%rax)
incl %ebp
andl $0xf, %ebp
incq %r12
cmpl %r12d, %ebx
jne 0x74c1
jmp 0x7542
testl %edx, %edx
je 0x7542
movl %edx, %ebx
xorl %r12d, %r12d
testl %ebp, %ebp
jne 0x751f
movq 0x8(%rsp), %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %r15, %rcx
callq 0x6bd8
movb (%r14,%r12), %al
movslq %ebp, %rcx
movb (%r15,%rcx), %dl
xorb %al, %dl
movb %dl, (%r13,%r12)
movb %al, (%r15,%rcx)
incl %ebp
andl $0xf, %ebp
incq %r12
cmpl %r12d, %ebx
jne 0x7506
movq 0x10(%rsp), %rax
movl %ebp, (%rax)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/crc32.c
// Function: crc32
uint32_t crc32(uint32_t crc, const void *buf, size_t size)
{
	const uint8_t *p;

	p = buf;
	crc = crc ^ ~0U;

	while (size--)
		crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8);

	return crc ^ ~0U;
}

// Assembly:
movl %edi, %eax
testq %rdx, %rdx
je 0x758a
notl %eax
xorl %ecx, %ecx
leaq 0x5242(%rip), %rdi      # 0xc7b0
movb (%rsi,%rcx), %r8b
xorb %al, %r8b
movzbl %r8b, %r8d
shrl $0x8, %eax
xorl (%rdi,%r8,4), %eax
incq %rcx
cmpq %rcx, %rdx
jne 0x756e
notl %eax
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/stream.c
// Function: subtilis_stream_from_file
void subtilis_stream_from_file(subtilis_stream_t *s, const char *path,
			       subtilis_error_t *err)
{
	FILE *f;

	f = fopen(path, "r");
	if (!f) {
		subtilis_error_set_file_open(err, path);
		goto on_err;
	}

	strncpy(s->name, path, SUBTILIS_CONFIG_PATH_MAX);
	s->name[SUBTILIS_CONFIG_PATH_MAX] = 0;

	s->handle = f;
	s->read = prv_file_read;
	s->close = prv_file_close;

on_err:
	return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x64eb0(%rip), %rsi     # 0x775ac
movq %r14, %rdi
callq 0x12240
testq %rax, %rax
je 0x12752
movq %rax, %r12
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12050
movb $0x0, 0x200(%rbx)
movq %r12, 0x208(%rbx)
leaq 0x49(%rip), %rax        # 0x1277a
movq %rax, 0x210(%rbx)
leaq 0x9b(%rip), %rax        # 0x127da
movq %rax, 0x218(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x5f8d1(%rip), %rcx     # 0x7202a
movq %r15, %rdi
movl $0x2, %esi
movq %r14, %rdx
movl $0x37, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x145ed
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/stream.c
// Function: prv_file_read
static size_t prv_file_read(void *ptr, size_t n, void *handle,
			    subtilis_error_t *err)
{
	size_t read = fread(ptr, 1, n, (FILE *)handle);

	if (ferror((FILE *)handle) && !feof((FILE *)handle))
		subtilis_error_set_file_read(err);

	return read;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %rdx
movl $0x1, %esi
movq %r15, %rcx
callq 0x120a0
movq %rax, %r14
movq %r15, %rdi
callq 0x12090
testl %eax, %eax
je 0x127d1
movq %r15, %rdi
callq 0x12190
testl %eax, %eax
jne 0x127d1
leaq 0x6165e(%rip), %rdx     # 0x73e15
leaq 0x5f86c(%rip), %rcx     # 0x7202a
movq %rbx, %rdi
movl $0x3, %esi
movl $0x25, %r8d
callq 0x145ed
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: subtilis_token_delete
void subtilis_token_delete(subtilis_token_t *t)
{
	if (!t)
		return;

	if (t->type == SUBTILIS_TOKEN_IDENTIFIER)
		subtilis_type_free(&t->tok.id_type);
	else if (t->type == SUBTILIS_TOKEN_KEYWORD)
		subtilis_type_free(&t->tok.keyword.id_type);

	subtilis_buffer_free(&t->buf);
	free(t);
}

// Assembly:
testq %rdi, %rdi
je 0x12a54
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0x6, %eax
je 0x12a55
cmpl $0x1, %eax
jne 0x12a62
movl $0x10, %edi
jmp 0x12a5a
retq
movl $0x8, %edi
addq %rbx, %rdi
callq 0x2f56e
leaq 0x158(%rbx), %rdi
callq 0x14d5c
movq %rbx, %rdi
popq %rbx
jmp 0x122c0
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: subtilis_lexer_set_ass_keywords
void subtilis_lexer_set_ass_keywords(subtilis_lexer_t *l, bool ass,
				     subtilis_error_t *err)
{
	if (!ass) {
		l->keywords = l->basic_keywords;
		l->num_keywords = l->num_basic_keywords;
		return;
	}

	if (!l->ass_keywords) {
		subtilis_error_set_not_supported(
		    err, "Assembly language on this target is", l->stream->name,
		    l->line);
		return;
	}

	l->keywords = l->ass_keywords;
	l->num_keywords = l->num_ass_keywords;
}

// Assembly:
testl %esi, %esi
je 0x12a90
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x12a98
movq %rax, (%rdi)
movq 0x28(%rdi), %rax
movq %rax, 0x8(%rdi)
retq
movups 0x10(%rdi), %xmm0
movups %xmm0, (%rdi)
retq
pushq %rax
movq 0x30(%rdi), %r8
movl 0x38(%rdi), %r9d
leaq 0x5f5ac(%rip), %r10     # 0x72054
leaq 0x5f5b4(%rip), %rax     # 0x72063
leaq 0x6135f(%rip), %rcx     # 0x73e15
movq %rdx, %rdi
movl $0x13, %esi
movq %rax, %rdx
pushq $0x6f
pushq %r10
callq 0x143da
addq $0x10, %rsp
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: subtilis_token_get_text
const char *subtilis_token_get_text(subtilis_token_t *t)
{
	const char *tbuf;
	subtilis_error_t err;

	subtilis_error_init(&err);
	subtilis_buffer_zero_terminate(&t->buf, &err);
	if (err.type == SUBTILIS_ERROR_OK)
		tbuf = subtilis_buffer_get_string(&t->buf);
	else
		tbuf = "<TOKEN TEXT UNAVAILABLE>";
	return tbuf;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xc18, %rsp            # imm = 0xC18
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
movq %r14, %rdi
callq 0x143b4
addq $0x158, %rbx            # imm = 0x158
movq %rbx, %rdi
movq %r14, %rsi
callq 0x14d01
cmpl $0x0, (%r14)
je 0x12b0b
leaq 0x5f57e(%rip), %rax     # 0x72087
jmp 0x12b13
movq %rbx, %rdi
callq 0x14db1
addq $0xc18, %rsp            # imm = 0xC18
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: subtilis_token_new
subtilis_token_t *subtilis_token_new(subtilis_error_t *err)
{
	subtilis_token_t *t;

	t = malloc(sizeof(*t));
	if (!t) {
		subtilis_error_set_oom(err);
		return NULL;
	}

	t->type = SUBTILIS_TOKEN_EOF;
	memset(&t->tok, 0, sizeof(t->tok));
	subtilis_buffer_init(&t->buf, SUBTILIS_MAX_TOKEN_SIZE + 1);
	subtilis_buffer_reserve(&t->buf, SUBTILIS_MAX_TOKEN_SIZE + 1, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		subtilis_buffer_free(&t->buf);
		free(t);
		t = NULL;
	}
	return t;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x168, %edi            # imm = 0x168
callq 0x121d0
testq %rax, %rax
je 0x12bc5
movq %rax, %rbx
movl $0x0, (%rax)
leaq 0x8(%rax), %rdi
movl $0x150, %edx            # imm = 0x150
xorl %esi, %esi
callq 0x12140
movq %rbx, %r15
addq $0x158, %r15            # imm = 0x158
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
callq 0x149f4
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movq %r14, %rdx
callq 0x14a00
cmpl $0x0, (%r14)
je 0x12be0
movq %r15, %rdi
callq 0x14d5c
movq %rbx, %rdi
callq 0x122c0
jmp 0x12bde
leaq 0x5f488(%rip), %rdx     # 0x72054
movq %r14, %rdi
movl $0x1, %esi
movl $0x3f6, %ecx            # imm = 0x3F6
callq 0x145a4
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: subtilis_token_claim
void subtilis_token_claim(subtilis_token_t *dest, subtilis_token_t *src)
{
	/*
	 * This is truly horrid.
	 */
	if (dest->type == SUBTILIS_TOKEN_IDENTIFIER)
		subtilis_type_free(&dest->tok.id_type);
	else if (dest->type == SUBTILIS_TOKEN_KEYWORD)
		subtilis_type_free(&dest->tok.keyword.id_type);
	subtilis_buffer_free(&dest->buf);
	*dest = *src;
	if (src->type == SUBTILIS_TOKEN_IDENTIFIER)
		src->tok.id_type.params.fn.ret_val = NULL;
	else if (dest->type == SUBTILIS_TOKEN_KEYWORD)
		src->tok.keyword.id_type.params.fn.ret_val = NULL;
	subtilis_buffer_init(&src->buf, 1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %eax
cmpl $0x6, %eax
je 0x12c06
cmpl $0x1, %eax
jne 0x12c13
movl $0x10, %edi
jmp 0x12c0b
movl $0x8, %edi
addq %r14, %rdi
callq 0x2f56e
leaq 0x158(%r14), %rdi
callq 0x14d5c
movl $0x168, %edx            # imm = 0x168
movq %r14, %rdi
movq %rbx, %rsi
callq 0x121b0
movl $0x10, %eax
cmpl $0x6, (%rbx)
je 0x12c44
movl $0x18, %eax
cmpl $0x1, (%r14)
jne 0x12c4c
movq $0x0, (%rbx,%rax)
addq $0x158, %rbx            # imm = 0x158
movl $0x1, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x149f4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: subtilis_token_dup
subtilis_token_t *subtilis_token_dup(const subtilis_token_t *src,
				     subtilis_error_t *err)
{
	size_t buf_size;
	subtilis_token_t *t;

	t = subtilis_token_new(err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;
	t->type = src->type;
	t->tok = src->tok;
	buf_size = subtilis_buffer_get_size(&src->buf);
	subtilis_buffer_append(&t->buf, subtilis_buffer_get_string(&src->buf),
			       buf_size, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		subtilis_token_delete(t);
		t = NULL;
	}

	return t;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x12b56
cmpl $0x0, (%r14)
jne 0x12ce0
movq %rax, %rbx
movl (%r15), %eax
movl %eax, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0x8(%r15), %rsi
movl $0x150, %edx            # imm = 0x150
callq 0x121b0
movl $0x158, %ebp            # imm = 0x158
addq %rbp, %r15
movq %r15, %rdi
callq 0x14b57
movq %rax, %r12
movq %rbx, %r13
addq %rbp, %r13
movq %r15, %rdi
callq 0x14db1
movq %r13, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x14ae8
cmpl $0x0, (%r14)
je 0x12ce2
movq %rbx, %rdi
callq 0x12a38
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: subtilis_lexer_set_block_start
void subtilis_lexer_set_block_start(subtilis_lexer_t *l, subtilis_error_t *err)
{
	if (l->num_blocks == 0) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	if (l->next) {
		subtilis_token_delete(l->next);
		l->next = NULL;
	}

	l->index = l->blocks[l->num_blocks - 1].index;
	l->line = l->blocks[l->num_blocks - 1].line;
	l->next = subtilis_token_dup(l->blocks[l->num_blocks - 1].t, err);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0x12e84
movq %rdi, %rbx
movq 0x350(%rdi), %rdi
testq %rdi, %rdi
je 0x12e54
callq 0x12a38
movq $0x0, 0x350(%rbx)
movq 0x48(%rbx), %rax
leaq (%rax,%rax,2), %rax
movq 0x38(%rbx,%rax,8), %rcx
movq %rcx, 0x40(%rbx)
movl 0x48(%rbx,%rax,8), %ecx
movl %ecx, 0x38(%rbx)
movq 0x40(%rbx,%rax,8), %rdi
movq %r14, %rsi
callq 0x12c67
movq %rax, 0x350(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x5f1c9(%rip), %rdx     # 0x72054
movq %r14, %rdi
movl $0xf, %esi
movl $0x475, %ecx            # imm = 0x475
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x145a4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: subtilis_lexer_pop_block
void subtilis_lexer_pop_block(subtilis_lexer_t *l, subtilis_error_t *err)
{
	if (l->num_blocks == 0) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	l->num_blocks--;
	subtilis_token_delete(l->blocks[l->num_blocks].t);
}

// Assembly:
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0x12ec3
leaq -0x1(%rax), %rcx
movq %rcx, 0x48(%rdi)
leaq (%rax,%rax,2), %rax
movq 0x40(%rdi,%rax,8), %rdi
jmp 0x12a38
leaq 0x5f18a(%rip), %rdx     # 0x72054
movq %rsi, %rdi
movl $0xf, %esi
movl $0x486, %ecx            # imm = 0x486
jmp 0x145a4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: prv_ensure_input
static void prv_ensure_input(subtilis_lexer_t *l, subtilis_error_t *err)
{
	size_t new_buf_size;
	char *new_buffer;

	if (l->index < l->buf_end)
		return;

	if (l->num_blocks == 0) {
		l->buf_end = l->stream->read(l->buffer, l->buf_size,
					     l->stream->handle, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		l->index = 0;
		return;
	}

	/* We can't overwrite the existing data in the buffer because we
	 * have stacked blocks.  So we're just going to have to make our
	 * buffer bigger and append to it.  This feature is currently only
	 * used by the assemblers.
	 */

	new_buf_size = l->buf_size + SUBTILIS_CONFIG_LEXER_BUF_SIZE_INC;
	new_buffer = realloc(l->buffer, new_buf_size);
	if (!new_buffer) {
		subtilis_error_set_oom(err);
		return;
	}

	l->buf_size = new_buf_size;
	l->buffer = new_buffer;
	l->buf_end += l->stream->read(&l->buffer[l->index],
				      SUBTILIS_CONFIG_LEXER_BUF_SIZE_INC,
				      l->stream->handle, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x40(%rdi), %rax
cmpq 0x360(%rdi), %rax
jb 0x13aac
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x48(%rdi)
je 0x13a75
movl $0x2000, %r15d          # imm = 0x2000
addq 0x358(%rbx), %r15
movq 0x368(%rbx), %rdi
movq %r15, %rsi
callq 0x12210
testq %rax, %rax
je 0x13ab2
movq %r15, 0x358(%rbx)
movq %rax, 0x368(%rbx)
movq 0x30(%rbx), %r8
addq 0x40(%rbx), %rax
movq 0x208(%r8), %rdx
movl $0x2000, %esi           # imm = 0x2000
movq %rax, %rdi
movq %r14, %rcx
callq *0x210(%r8)
addq %rax, 0x360(%rbx)
jmp 0x13aac
movq 0x30(%rbx), %rax
movq 0x368(%rbx), %rdi
movq 0x358(%rbx), %rsi
movq 0x208(%rax), %rdx
movq %r14, %rcx
callq *0x210(%rax)
movq %rax, 0x360(%rbx)
cmpl $0x0, (%r14)
jne 0x13aac
movq $0x0, 0x40(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x5e59b(%rip), %rdx     # 0x72054
movq %r14, %rdi
movl $0x1, %esi
movl $0xcf, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x145a4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: prv_process_unknown
static void prv_process_unknown(subtilis_lexer_t *l, char ch,
				subtilis_token_t *t, subtilis_error_t *err)
{
	const char *tbuf;

	prv_set_first(l, t, SUBTILIS_TOKEN_UNKNOWN);
	for (;;) {
		prv_ensure_input(l, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		if (l->index == l->buf_end)
			break;

		ch = l->buffer[l->index];
		if (prv_is_separator(ch))
			break;
		prv_set_next_with_err(l, t, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}

	tbuf = subtilis_token_get_text(t);
	subtilis_error_set_unknown_token(err, tbuf, l->stream->name, l->line);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc18, %rsp            # imm = 0xC18
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x7, (%rsi)
leaq 0xc(%rsp), %r12
movq %r12, %rdi
callq 0x143b4
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x13c66
movabsq $0x100002600, %r12      # imm = 0x100002600
movq %r14, %rdi
movq %rbx, %rsi
callq 0x139f9
cmpl $0x0, (%rbx)
jne 0x13c1d
movq 0x40(%r14), %rax
cmpq 0x360(%r14), %rax
je 0x13be4
movq 0x368(%r14), %rcx
movzbl (%rcx,%rax), %eax
cmpq $0x20, %rax
ja 0x13bc3
btq %rax, %r12
jb 0x13be4
movsbl %al, %edi
callq 0x13ad0
testb %al, %al
jne 0x13be4
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x13c66
cmpl $0x0, (%rbx)
je 0x13b8f
jmp 0x13c1d
movq %r15, %rdi
callq 0x12ad0
movq 0x30(%r14), %r8
movl 0x38(%r14), %r9d
leaq 0x5e459(%rip), %r10     # 0x72054
leaq 0x60213(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0xa, %esi
movq %rax, %rdx
pushq $0x394                  # imm = 0x394
pushq %r10
callq 0x143da
addq $0x10, %rsp
addq $0xc18, %rsp            # imm = 0xC18
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: prv_set_next_with_err
static void prv_set_next_with_err(subtilis_lexer_t *l, subtilis_token_t *t,
				  subtilis_error_t *err)
{
	char ch = l->buffer[l->index];

	subtilis_buffer_append(&t->buf, &ch, 1, err);
	if (err->type == SUBTILIS_ERROR_OK)
		l->index++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq 0x368(%rdi), %rax
movq 0x40(%rdi), %rcx
movb (%rax,%rcx), %cl
leaq 0x7(%rsp), %rax
movb %cl, (%rax)
leaq 0x158(%rsi), %rdi
movl $0x1, %edx
movq %rax, %rsi
movq %r14, %rcx
callq 0x14ae8
cmpl $0x0, (%r14)
jne 0x13ca6
incq 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: prv_process_float
static void prv_process_float(subtilis_lexer_t *l, subtilis_token_t *t,
			      subtilis_error_t *err)
{
	const char *tbuf;

	prv_set_first(l, t, SUBTILIS_TOKEN_REAL);
	if (!prv_extract_number(l, t, prv_float_end, err))
		return;

	tbuf = subtilis_token_get_text_with_err(t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	t->tok.real = atof(tbuf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc18, %rsp            # imm = 0xC18
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movl $0x5, (%rsi)
leaq 0xc(%rsp), %r12
movq %r12, %rdi
callq 0x143b4
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x13c66
leaq 0x24e(%rip), %rdx       # 0x13f3b
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x13d2c
testb %al, %al
je 0x13d1d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12b1e
cmpl $0x0, (%r14)
jne 0x13d1d
movq %rax, %rdi
callq 0x120c0
movsd %xmm0, 0x8(%rbx)
addq $0xc18, %rsp            # imm = 0xC18
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: prv_extract_number
static bool prv_extract_number(subtilis_lexer_t *l, subtilis_token_t *t,
			       token_end_t end_fn, subtilis_error_t *err)
{
	subtilis_token_end_t end;
	bool processed = false;

	for (;;) {
		prv_ensure_input(l, err);
		if (err->type != SUBTILIS_ERROR_OK)
			break;
		if (l->index == l->buf_end) {
			processed = true;
			break;
		}
		end = end_fn(l, t, l->buffer[l->index], err);
		if (end == SUBTILIS_TOKEN_END_RETURN) {
			break;
		} else if (end == SUBTILIS_TOKEN_END_NOT_TOKEN) {
			processed = true;
			break;
		}

		prv_set_next_with_err(l, t, err);
		if (err->type != SUBTILIS_ERROR_OK)
			break;
	}

	prv_check_token_buffer(l, t, err, SUBTILIS_ERROR_NUMBER_TOO_LONG);

	return processed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x139f9
cmpl $0x0, (%rbx)
jne 0x13d94
movq 0x40(%r15), %rax
movb $0x1, %bpl
cmpq 0x360(%r15), %rax
je 0x13d96
movq 0x368(%r15), %rcx
movsbl (%rcx,%rax), %edx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq *%r12
cmpl $0x1, %eax
je 0x13d96
cmpl $0x2, %eax
je 0x13d94
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x13c66
cmpl $0x0, (%rbx)
je 0x13d40
xorl %ebp, %ebp
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x8, %ecx
callq 0x13ed0
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: prv_parse_integer
static void prv_parse_integer(subtilis_lexer_t *l, subtilis_token_t *t,
			      int base, subtilis_error_t *err)
{
	char *end_ptr = 0;
	unsigned long num;
	const char *tbuf;

	tbuf = subtilis_token_get_text_with_err(t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	errno = 0;
	num = strtoul(tbuf, &end_ptr, base);
	if (*end_ptr != 0 || errno != 0) {
		subtilis_error_set_number_too_long(err, tbuf, l->stream->name,
						   l->line);
		return;
	}
	if ((base == 10 && num > 2147483647) || (num > 0xffffffff)) {
		subtilis_error_set_number_too_long(err, tbuf, l->stream->name,
						   l->line);
		return;
	}

	t->tok.integer = (int32_t)num;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r15
movq $0x0, (%rsp)
movq %rsi, %rdi
movq %rcx, %rsi
callq 0x12b1e
cmpl $0x0, (%rbx)
je 0x13e11
addq $0x8, %rsp
jmp 0x13e71
movq %rax, %r14
callq 0x12040
movq %rax, %r13
movl $0x0, (%rax)
movq %rsp, %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x12250
movq %rsp, %rcx
movq (%rcx), %rcx
cmpb $0x0, (%rcx)
jne 0x13e41
cmpl $0x0, (%r13)
je 0x13e7c
movq 0x30(%r15), %r8
movl 0x38(%r15), %r9d
leaq 0x5e204(%rip), %rax     # 0x72054
leaq 0x5ffbe(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0x8, %esi
movq %r14, %rdx
pushq $0x180                  # imm = 0x180
pushq %rax
callq 0x143da
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0xa, %ebp
sete %cl
cmpq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
seta %dl
andb %cl, %dl
movq %rax, %rcx
shrq $0x20, %rcx
setne %cl
orb %dl, %cl
cmpb $0x1, %cl
jne 0x13ec6
movq 0x30(%r15), %r8
movl 0x38(%r15), %r9d
leaq 0x5e1a7(%rip), %rax     # 0x72054
leaq 0x5ff61(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0x8, %esi
movq %r14, %rdx
pushq $0x185                  # imm = 0x185
jmp 0x13e67
movl %eax, 0x8(%r12)
jmp 0x13e0b
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: prv_process_rec
static void prv_process_rec(subtilis_lexer_t *l, subtilis_token_t *t,
			    const char *tbuf, char ch, subtilis_error_t *err)
{
	if (ch == '&' || ch == '%' || ch == '@' || ch == '$' ||
	    (strlen(tbuf) == 3)) {
		subtilis_error_set_bad_rec_name(err, tbuf, l->stream->name,
						l->line);
		return;
	}

	ch = prv_complete_identifier(l, t, ch, err);
	if (ch == '&' || ch == '%' || ch == '@' || ch == '$') {
		subtilis_error_set_bad_rec_name(err, tbuf, l->stream->name,
						l->line);
		return;
	}

	prv_check_token_buffer(l, t, err, SUBTILIS_ERROR_IDENTIFIER_TOO_LONG);

	t->type = SUBTILIS_TOKEN_KEYWORD;
	t->tok.keyword.type = SUBTILIS_KEYWORD_REC;
	t->tok.keyword.supported = true;
	t->tok.keyword.id_type.type = SUBTILIS_TYPE_VOID;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %r13d
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leal -0x24(%r13), %eax
cmpl $0x1c, %eax
ja 0x13fd4
movl $0x10000007, %ecx       # imm = 0x10000007
btl %eax, %ecx
jae 0x13fd4
movq 0x30(%r12), %r8
movl 0x38(%r12), %r9d
leaq 0x5e0ab(%rip), %rax     # 0x72054
leaq 0x5fe65(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0x6a, %esi
movq %r14, %rdx
pushq $0x2e4                  # imm = 0x2E4
pushq %rax
callq 0x143da
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x120f0
cmpq $0x3, %rax
je 0x13f98
movsbl %r13b, %edx
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x14171
movzbl %al, %eax
addl $-0x24, %eax
cmpl $0x1c, %eax
ja 0x14033
movl $0x10000007, %ecx       # imm = 0x10000007
btl %eax, %ecx
jae 0x14033
movq 0x30(%r12), %r8
movl 0x38(%r12), %r9d
leaq 0x5e03a(%rip), %rax     # 0x72054
leaq 0x5fdf4(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0x6a, %esi
movq %r14, %rdx
pushq $0x2eb                  # imm = 0x2EB
jmp 0x13fc0
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl $0x9, %ecx
callq 0x13ed0
movl $0x1, (%r15)
movl $0x2, 0x8(%r15)
movb $0x1, 0xc(%r15)
movl $0x8, 0x10(%r15)
jmp 0x13fca
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: prv_validate_identifier
static void prv_validate_identifier(subtilis_lexer_t *l, subtilis_token_t *t,
				    char ch, subtilis_error_t *err)
{
	if (ch == 0) {
		ch = prv_complete_identifier(l, t, ch, err);
		if (l->index == l->buf_end) {
			t->tok.id_type.type = SUBTILIS_TYPE_REAL;
		} else if (ch == '$') {
			t->tok.id_type.type = SUBTILIS_TYPE_STRING;
			prv_set_next_with_err(l, t, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
		} else if (ch == '%') {
			t->tok.id_type.type = SUBTILIS_TYPE_INTEGER;
			prv_set_next_with_err(l, t, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
		} else if (ch == '&') {
			t->tok.id_type.type = SUBTILIS_TYPE_BYTE;
			prv_set_next_with_err(l, t, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
		} else if (ch == '@') {
			prv_set_next_with_err(l, t, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
			prv_complete_custom_type(l, t, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
		} else {
			t->tok.id_type.type = SUBTILIS_TYPE_REAL;
		}
	} else {
		if (ch == '$') {
			t->tok.id_type.type = SUBTILIS_TYPE_STRING;
		} else if (ch == '%') {
			t->tok.id_type.type = SUBTILIS_TYPE_INTEGER;
		} else if (ch == '&') {
			t->tok.id_type.type = SUBTILIS_TYPE_BYTE;
		} else if (ch == '@') {
			prv_complete_custom_type(l, t, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
		} else {
			t->tok.id_type.type = SUBTILIS_TYPE_REAL;
		}
	}

	prv_check_token_buffer(l, t, err, SUBTILIS_ERROR_IDENTIFIER_TOO_LONG);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x24, %edx
jle 0x140a7
cmpl $0x25, %edx
je 0x140bc
cmpl $0x26, %edx
je 0x140c3
cmpl $0x40, %edx
jne 0x140b5
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x141f4
jmp 0x14166
testl %edx, %edx
je 0x140ca
movl $0x7, %ecx
cmpl $0x24, %edx
je 0x140ec
movl $0x4, %ecx
jmp 0x140ec
movl $0x5, %ecx
jmp 0x140ec
movl $0x6, %ecx
jmp 0x140ec
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x14171
movq 0x40(%r15), %rdx
movl $0x4, %ecx
cmpq 0x360(%r15), %rdx
jne 0x14108
movl %ecx, 0x8(%r14)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x9, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x13ed0
movzbl %al, %eax
cmpl $0x25, %eax
jg 0x14124
cmpl $0x24, %eax
je 0x14146
cmpl $0x25, %eax
jne 0x140ec
movl $0x5, 0x8(%r14)
jmp 0x14158
cmpl $0x26, %eax
je 0x14150
cmpl $0x40, %eax
jne 0x140ec
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x13c66
cmpl $0x0, (%rbx)
jne 0x1416b
jmp 0x14094
movl $0x7, 0x8(%r14)
jmp 0x14158
movl $0x6, 0x8(%r14)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x13c66
cmpl $0x0, (%rbx)
je 0x140f0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/lexer.c
// Function: prv_complete_identifier
static char prv_complete_identifier(subtilis_lexer_t *l, subtilis_token_t *t,
				    char ch, subtilis_error_t *err)
{
	for (;;) {
		prv_ensure_input(l, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return 0;
		if (l->index == l->buf_end)
			break;

		ch = l->buffer[l->index];
		if (!((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') ||
		      (ch >= '0' && ch <= '9') || (ch == '_')))
			break;
		prv_set_next_with_err(l, t, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return 0;
	}

	return ch;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r12
movq %rcx, %rsi
callq 0x139f9
cmpl $0x0, (%r14)
jne 0x141e4
movq 0x40(%r12), %rax
cmpq 0x360(%r12), %rax
je 0x141e6
movq 0x368(%r12), %rcx
movb (%rcx,%rax), %bl
movl %ebx, %eax
andb $-0x21, %al
addb $-0x41, %al
cmpb $0x1a, %al
jb 0x141c8
leal -0x30(%rbx), %eax
cmpb $0xa, %al
setae %al
cmpb $0x5f, %bl
setne %cl
testb %al, %cl
jne 0x141e6
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x13c66
cmpl $0x0, (%r14)
jne 0x141e4
movq %r12, %rdi
movq %r14, %rsi
jmp 0x14187
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/error.c
// Function: subtilis_error_fprintf
void subtilis_error_fprintf(FILE *f, subtilis_error_t *e, bool verbose)
{
	int args;

	if (e->type == SUBTILIS_ERROR_OK)
		return;
	if (strlen(e->file) > 0)
		fprintf(f, "%s: %d: ", e->file, e->line);

	args = prv_errors[e->type].args;
	if (args == 0)
		fprintf(f, "%s", prv_errors[e->type].msg);
	else if (args == 1)
		fprintf(f, prv_errors[e->type].msg, e->data1);
	else if (args == 2)
		fprintf(f, prv_errors[e->type].msg, e->data1, e->data2);
	if (verbose)
		fprintf(f, "  generated by %s:%d\n", e->subtilis_file,
			e->subtilis_line);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl (%rsi), %eax
testl %eax, %eax
je 0x14714
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, 0x804(%rsi)
je 0x1468f
leaq 0x804(%rbx), %rdx
movl 0xa04(%rbx), %ecx
leaq 0x5da5f(%rip), %rsi     # 0x720e2
movq %r14, %rdi
xorl %eax, %eax
callq 0x12170
movl (%rbx), %eax
movl %eax, %ecx
shlq $0x4, %rcx
leaq 0x86784(%rip), %rdx     # 0x9ae20
leaq (%rdx,%rcx), %rax
movl 0x8(%rcx,%rdx), %ecx
cmpl $0x2, %ecx
je 0x146d2
cmpl $0x1, %ecx
je 0x146bf
testl %ecx, %ecx
jne 0x146ea
movq (%rax), %rdi
movq %r14, %rsi
callq 0x12130
jmp 0x146ea
movq (%rax), %rsi
leaq 0x4(%rbx), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x12170
jmp 0x146ea
movq (%rax), %rsi
leaq 0x4(%rbx), %rdx
leaq 0x404(%rbx), %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x12170
testb %bpl, %bpl
je 0x14714
movl 0xc08(%rbx), %ecx
addq $0xa08, %rbx            # imm = 0xA08
leaq 0x5d9e8(%rip), %rsi     # 0x720eb
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x12170
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/utils.c
// Function: subtilis_utils_basename
const char *subtilis_utils_basename(const char *path)
{
	size_t len = strlen(path);
	int i;

	if (len == 0)
		return path;
	i = ((int)len) - 1;
	if (path[i] == SUBTILIS_CONFIG_PATH_SEPARATOR)
		i--;
	for (; i >= 0 && path[i] != SUBTILIS_CONFIG_PATH_SEPARATOR; i--)
		;
	if (i >= 0)
		return &path[i + 1];
	else
		return path;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x120f0
testq %rax, %rax
je 0x14846
cltq
leaq -0x1(%rax), %rcx
cmpb $0x2e, -0x1(%rbx,%rax)
leal -0x2(%rax), %eax
cmovnel %ecx, %eax
testl %eax, %eax
js 0x14846
movl %eax, %ecx
cmpb $0x2e, (%rbx,%rcx)
je 0x14840
leal -0x1(%rcx), %eax
testl %ecx, %ecx
jg 0x1482f
jmp 0x14846
addq %rcx, %rbx
incq %rbx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/utils.c
// Function: subtils_get_file_size
bool subtils_get_file_size(FILE *f, int32_t *size)
{
	long cur_pos = ftell(f);
	long fsize;

	if (cur_pos == -1)
		return false;

	if (fseek(f, 0L, SEEK_END))
		return false;

	fsize = (int32_t)ftell(f);
	if (fsize == -1)
		return false;

	if (fseek(f, 0L, cur_pos))
		return false;

	*size = fsize;

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x12180
cmpq $-0x1, %rax
je 0x148dc
movq %rax, %r12
xorl %r15d, %r15d
movq %r14, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x12200
testl %eax, %eax
jne 0x148df
movq %r14, %rdi
callq 0x12180
movq %rax, %r13
cmpl $-0x1, %r13d
jne 0x148ec
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
xorl %r15d, %r15d
movq %r14, %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x12200
testl %eax, %eax
jne 0x148df
movl %r13d, (%rbx)
movb $0x1, %r15b
jmp 0x148df