LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cmsgpack.c
// Function: mp_encode_lua_table
void mp_encode_lua_table(lua_State *L, mp_buf *buf, int level) {
    if (table_is_an_array(L))
        mp_encode_lua_table_as_array(L,buf,level);
    else
        mp_encode_lua_table_as_map(L,buf,level);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0x9cfa8
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
testl %eax, %eax
je 0x9d112
popq %rbx
popq %r14
popq %r15
jmp 0x9cd93
popq %rbx
popq %r14
popq %r15
jmp 0x9cef6
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cmsgpack.c
// Function: mp_pack
int mp_pack(lua_State *L) {
    int nargs = lua_gettop(L);
    int i;
    mp_buf *buf;

    if (nargs == 0)
        return luaL_argerror(L, 0, "MessagePack pack needs input.");

    buf = mp_buf_new(L);
    for(i = 1; i <= nargs; i++) {
        /* Copy argument i to top of stack for _encode processing;
         * the encode function pops it from the stack when complete. */
        lua_pushvalue(L, i);

        mp_encode_lua_type(L,buf,0);

        lua_pushlstring(L,(char*)buf->b,buf->len);

        /* Reuse the buffer for the next operation by
         * setting its free count to the total buffer size
         * and the current position to zero. */
        buf->free += buf->len;
        buf->len = 0;
    }
    mp_buf_free(L, buf);

    /* Concatenate all nargs buffers together */
    lua_concat(L, nargs);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x89969
testl %eax, %eax
je 0x9d1ff
movl %eax, %ebp
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8a9e0
movq (%r14), %rdi
movl $0x18, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq *%rax
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
testl %ebp, %ebp
jle 0x9d1d8
movl %ebp, %r12d
negl %r12d
movl $0x1, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x89ba4
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x9ce21
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x89fd4
movq 0x8(%r14), %rax
addq %rax, 0x10(%r14)
movq $0x0, 0x8(%r14)
leal (%r12,%r15), %eax
incl %eax
movl %r15d, %ecx
incl %ecx
movl %ecx, %r15d
cmpl $0x1, %eax
jne 0x9d18e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9c8e4
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8a963
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x37b5a(%rip), %rdx     # 0xd4d60
movq %rbx, %rdi
xorl %esi, %esi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x94600
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_cmsgpack.c
// Function: luaopen_cmsgpack_safe
LUALIB_API int luaopen_cmsgpack_safe(lua_State *L) {
    int i;

    luaopen_cmsgpack(L);

    /* Wrap all functions in the safe handler */
    for (i = 0; i < (sizeof(cmds)/sizeof(*cmds) - 1); i++) {
        lua_getfield(L, -1, cmds[i].name);
        lua_pushcclosure(L, mp_safe, 1);
        lua_setfield(L, -2, cmds[i].name);
    }

#if LUA_VERSION_NUM < 502
    /* Register name globally for 5.1 */
    lua_pushvalue(L, -1);
    lua_setglobal(L, LUACMSGPACK_SAFE_NAME);
#endif

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x9da4d
xorl %r12d, %r12d
leaq 0x62537(%rip), %r13     # 0xfffd0
leaq -0x1b6(%rip), %r14      # 0x9d8ea
movq (%r12,%r13), %r15
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x8a262
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x8a159
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x8a43e
addq $0x10, %r12
cmpq $0x40, %r12
jne 0x9daa0
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x89ba4
leaq 0x37496(%rip), %rdx     # 0xd4f88
movq %rbx, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x8a43e
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua_bit.c
// Function: bit_tohex
static int bit_tohex(lua_State *L)
{
  UBits b = barg(L, 1);
  SBits n = lua_isnone(L, 2) ? 8 : (SBits)barg(L, 2);
  const char *hexdigits = "0123456789abcdef";
  char buf[8];
  int i;
  if (n < 0) { n = -n; hexdigits = "0123456789ABCDEF"; }
  if (n > 8) n = 8;
  for (i = (int)n; --i >= 0; ) { buf[i] = hexdigits[b & 15]; b >>= 4; }
  lua_pushlstring(L, buf, (size_t)n);
  return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x9db7a
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x89bc4
cmpl $-0x1, %eax
je 0x9de7d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x9db7a
jmp 0x9de82
movl $0x8, %eax
leaq 0x371bf(%rip), %rdx     # 0xd5048
leaq 0x25bbb(%rip), %rcx     # 0xc3a4b
testl %eax, %eax
cmovsq %rdx, %rcx
je 0x9decb
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
cmpl $0x8, %edx
movl $0x8, %esi
cmovll %edx, %esi
leal 0x1(%rsi), %edx
decl %esi
addq %rsp, %rsi
movl %ebp, %edi
andl $0xf, %edi
movb (%rcx,%rdi), %dil
movb %dil, (%rsi)
shrl $0x4, %ebp
decl %edx
decq %rsi
cmpl $0x1, %edx
jg 0x9deb2
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpl $0x8, %ecx
movl $0x8, %edx
cmovll %ecx, %edx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x89fd4
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/fpconv.c
// Function: fpconv_strtod
double fpconv_strtod(const char *nptr, char **endptr)
{
    char localbuf[FPCONV_G_FMT_BUFSIZE];
    char *buf, *endbuf, *dp;
    int buflen;
    double value;

    /* System strtod() is fine when decimal point is '.' */
    if (locale_decimal_point == '.')
        return strtod(nptr, endptr);

    buflen = strtod_buffer_size(nptr);
    if (!buflen) {
        /* No valid characters found, standard strtod() return */
        *endptr = (char *)nptr;
        return 0;
    }

    /* Duplicate number into buffer */
    if (buflen >= FPCONV_G_FMT_BUFSIZE) {
        /* Handle unusually large numbers */
        buf = malloc(buflen + 1);
        if (!buf) {
            fprintf(stderr, "Out of memory");
            abort();
        }
    } else {
        /* This is the common case.. */
        buf = localbuf;
    }
    memcpy(buf, nptr, buflen);
    buf[buflen] = 0;

    /* Update decimal point character if found */
    dp = strchr(buf, '.');
    if (dp)
        *dp = locale_decimal_point;

    value = strtod(buf, &endbuf);
    *endptr = (char *)&nptr[endbuf - buf];
    if (buflen >= FPCONV_G_FMT_BUFSIZE)
        free(buf);

    return value;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb 0x65e59(%rip), %bpl     # 0x106760
cmpb $0x2e, %bpl
jne 0xa0926
movq %r14, %rdi
movq %rbx, %rsi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x26cd0
xorl %r13d, %r13d
movabsq $0x100000000, %rax      # imm = 0x100000000
movabsq $0x680000000000, %rcx   # imm = 0x680000000000
xorl %r15d, %r15d
movzbl (%r14,%r13), %edx
leal -0x30(%rdx), %esi
cmpb $0xa, %sil
jb 0xa0966
cmpl $0x2e, %edx
ja 0xa095b
movl %edx, %esi
btq %rsi, %rcx
jb 0xa0966
orb $0x20, %dl
addb $-0x7a, %dl
cmpb $-0x19, %dl
jb 0xa096e
addq %rax, %r15
incq %r13
jmp 0xa0940
testl %r13d, %r13d
je 0xa0990
cmpl $0x20, %r13d
jl 0xa0998
movl %r13d, %edi
incl %edi
callq 0x26370
movq %rax, %r12
testq %rax, %rax
jne 0xa099d
callq 0x272f8
movq %r14, (%rbx)
xorps %xmm0, %xmm0
jmp 0xa09fd
leaq 0x10(%rsp), %r12
sarq $0x20, %r15
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x26c60
movb $0x0, (%r12,%r15)
movq %r12, %rdi
movl $0x2e, %esi
callq 0x26800
testq %rax, %rax
je 0xa09c9
movb %bpl, (%rax)
leaq 0x8(%rsp), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x26cd0
movq (%r15), %rax
subq %r12, %rax
addq %rax, %r14
movq %r14, (%rbx)
cmpl $0x20, %r13d
jl 0xa09fd
movq %r12, %rdi
movsd %xmm0, (%rsp)
callq 0x264e0
movsd (%rsp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/fpconv.c
// Function: fpconv_g_fmt
int fpconv_g_fmt(char *str, double num, int precision)
{
    char buf[FPCONV_G_FMT_BUFSIZE];
    char fmt[6];
    int len;
    char *b;

    set_number_format(fmt, precision);

    /* Pass through when decimal point character is dot. */
    if (locale_decimal_point == '.')
        return snprintf(str, FPCONV_G_FMT_BUFSIZE, fmt, num);

    /* snprintf() to a buffer then translate for other decimal point characters */
    len = snprintf(buf, FPCONV_G_FMT_BUFSIZE, fmt, num);

    /* Copy into target location. Translate decimal point if required */
    b = buf;
    do {
        *str++ = (*b == locale_decimal_point ? '.' : *b);
    } while(*b++);

    return len;
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
leal -0x1(%rsi), %eax
cmpl $0xe, %eax
jae 0xa0ac2
movq %rdi, %rbx
movw $0x2e25, 0xa(%rsp)      # imm = 0x2E25
cmpl $0xa, %esi
jae 0xa0a33
leaq 0xc(%rsp), %rax
jmp 0xa0a3c
leaq 0xd(%rsp), %rax
movb $0x31, -0x1(%rax)
movl %esi, %ecx
movl $0xcccccccd, %edx       # imm = 0xCCCCCCCD
imulq %rcx, %rdx
shrq $0x23, %rdx
addl %edx, %edx
leal (%rdx,%rdx,4), %ecx
subl %ecx, %esi
orb $0x30, %sil
movb %sil, (%rax)
movw $0x67, 0x1(%rax)
cmpb $0x2e, 0x65cfa(%rip)    # 0x106760
jne 0xa0a7e
leaq 0xa(%rsp), %rdx
movl $0x20, %esi
movq %rbx, %rdi
movb $0x1, %al
callq 0x26120
jmp 0xa0abc
leaq 0x10(%rsp), %rdi
leaq 0xa(%rsp), %rdx
movl $0x20, %esi
movb $0x1, %al
callq 0x26120
xorl %ecx, %ecx
movb 0x65cc4(%rip), %dl      # 0x106760
movl $0x2e, %esi
movzbl 0x10(%rsp,%rcx), %edi
cmpb %dl, %dil
movl %edi, %r8d
cmovel %esi, %r8d
movb %r8b, (%rbx,%rcx)
incq %rcx
testb %dil, %dil
jne 0xa0aa1
addq $0x30, %rsp
popq %rbx
retq
leaq 0x34977(%rip), %rdi     # 0xd5440
leaq 0x34992(%rip), %rsi     # 0xd5462
leaq 0x34994(%rip), %rcx     # 0xd546b
movl $0x9d, %edx
callq 0x262e0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/fpconv.c
// Function: fpconv_init
static void fpconv_update_locale()
{
    char buf[8];

    snprintf(buf, sizeof(buf), "%g", 0.5);

    /* Failing this test might imply the platform has a buggy dtoa
     * implementation or wide characters */
    if (buf[0] != '0' || buf[2] != '5' || buf[3] != 0) {
        fprintf(stderr, "Error: wide characters found or printf() bug.");
        abort();
    }

    locale_decimal_point = buf[1];
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x2cc16(%rip), %rdx     # 0xcd703
leaq 0x8(%rsp), %rbx
movsd 0x3493e(%rip), %xmm0    # 0xd5438
movl $0x8, %esi
movq %rbx, %rdi
movb $0x1, %al
callq 0x26120
cmpb $0x30, (%rbx)
jne 0xa0b2c
cmpb $0x35, 0xa(%rsp)
jne 0xa0b2c
cmpb $0x0, 0xb(%rsp)
jne 0xa0b2c
movb 0x9(%rsp), %al
movb %al, 0x65c3a(%rip)      # 0x106760
addq $0x10, %rsp
popq %rbx
retq
callq 0x2731a
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/geohash-int/geohash.c
// Function: geohashGetCoordRange
void geohashGetCoordRange(GeoHashRange *long_range, GeoHashRange *lat_range) {
    /* These are constraints from EPSG:900913 / EPSG:3785 / OSGEO:41001 */
    /* We can't geocode at the north/south pole. */
    long_range->max = GEO_LONG_MAX;
    long_range->min = GEO_LONG_MIN;
    lat_range->max = GEO_LAT_MAX;
    lat_range->min = GEO_LAT_MIN;
}

// Assembly:
movabsq $0x4066800000000000, %rax # imm = 0x4066800000000000
movq %rax, 0x8(%rdi)
movabsq $-0x3f99800000000000, %rax # imm = 0xC066800000000000
movq %rax, (%rdi)
movabsq $0x40554345b1a57f00, %rax # imm = 0x40554345B1A57F00
movq %rax, 0x8(%rsi)
movabsq $-0x3faabcba4e5a8100, %rax # imm = 0xC0554345B1A57F00
movq %rax, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/geohash-int/geohash.c
// Function: geohashEncode
int geohashEncode(const GeoHashRange *long_range, const GeoHashRange *lat_range,
                  double longitude, double latitude, uint8_t step,
                  GeoHashBits *hash) {
    /* Check basic arguments sanity. */
    if (hash == NULL || step > 32 || step == 0 ||
        RANGEPISZERO(lat_range) || RANGEPISZERO(long_range)) return 0;

    /* Return an error when trying to index outside the supported
     * constraints. */
    if (longitude > 180 || longitude < -180 ||
        latitude > 85.05112878 || latitude < -85.05112878) return 0;

    hash->bits = 0;
    hash->step = step;

    if (latitude < lat_range->min || latitude > lat_range->max ||
        longitude < long_range->min || longitude > long_range->max) {
        return 0;
    }

    double lat_offset =
        (latitude - lat_range->min) / (lat_range->max - lat_range->min);
    double long_offset =
        (longitude - long_range->min) / (long_range->max - long_range->min);

    /* convert to fixed point based on the step size */
    lat_offset *= (1 << step);
    long_offset *= (1 << step);
    hash->bits = interleave64(lat_offset, long_offset);
    return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testq %rsi, %rsi
je 0xa0c8e
movq %rcx, %r14
testq %rcx, %rcx
je 0xa0c8e
leal -0x21(%rdx), %eax
cmpb $-0x20, %al
jb 0xa0c8e
movsd 0x8(%rsi), %xmm2
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm2
jne 0xa0ba2
jnp 0xa0bac
testq %rdi, %rdi
jne 0xa0bc9
jmp 0xa0c8e
testq %rdi, %rdi
je 0xa0c8e
movsd (%rsi), %xmm3
xorpd %xmm4, %xmm4
ucomisd %xmm4, %xmm3
jne 0xa0bc9
jnp 0xa0c8e
movsd 0x8(%rdi), %xmm3
xorpd %xmm4, %xmm4
ucomisd %xmm4, %xmm3
jne 0xa0bea
jp 0xa0bea
movsd (%rdi), %xmm5
ucomisd %xmm4, %xmm5
jne 0xa0bea
jnp 0xa0c8e
movsd 0x348ce(%rip), %xmm4    # 0xd54c0
ucomisd %xmm1, %xmm4
ja 0xa0c8e
movapd 0x318ac(%rip), %xmm4    # 0xd24b0
andpd %xmm0, %xmm4
ucomisd 0x31860(%rip), %xmm4    # 0xd2470
ja 0xa0c8e
ucomisd 0x3185e(%rip), %xmm1    # 0xd2478
ja 0xa0c8e
movq $0x0, (%r14)
movb %dl, 0x8(%r14)
ucomisd %xmm2, %xmm1
ja 0xa0c8e
movsd (%rsi), %xmm4
ucomisd %xmm1, %xmm4
ja 0xa0c8e
ucomisd %xmm3, %xmm0
ja 0xa0c8e
movsd (%rdi), %xmm5
ucomisd %xmm0, %xmm5
ja 0xa0c8e
subsd %xmm4, %xmm1
subsd %xmm4, %xmm2
divsd %xmm2, %xmm1
subsd %xmm5, %xmm0
subsd %xmm5, %xmm3
divsd %xmm3, %xmm0
movl $0x1, %ebx
movl $0x1, %eax
movl %edx, %ecx
shll %cl, %eax
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm0
cvttsd2si %xmm1, %rdi
cvttsd2si %xmm0, %rsi
callq 0xa0c98
movq %rax, (%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/geohash-int/geohash.c
// Function: interleave64
static inline uint64_t interleave64(uint32_t xlo, uint32_t ylo) {
    static const uint64_t B[] = {0x5555555555555555ULL, 0x3333333333333333ULL,
                                 0x0F0F0F0F0F0F0F0FULL, 0x00FF00FF00FF00FFULL,
                                 0x0000FFFF0000FFFFULL};
    static const unsigned int S[] = {1, 2, 4, 8, 16};

    uint64_t x = xlo;
    uint64_t y = ylo;

    x = (x | (x << S[4])) & B[4];
    y = (y | (y << S[4])) & B[4];

    x = (x | (x << S[3])) & B[3];
    y = (y | (y << S[3])) & B[3];

    x = (x | (x << S[2])) & B[2];
    y = (y | (y << S[2])) & B[2];

    x = (x | (x << S[1])) & B[1];
    y = (y | (y << S[1])) & B[1];

    x = (x | (x << S[0])) & B[0];
    y = (y | (y << S[0])) & B[0];

    return x | (y << 1);
}

// Assembly:
movl %edi, %eax
movl %esi, %ecx
movq %rax, %rdx
shlq $0x10, %rdx
orq %rax, %rdx
movabsq $0xffff0000ffff, %rax   # imm = 0xFFFF0000FFFF
andq %rax, %rdx
movq %rcx, %rsi
shlq $0x10, %rsi
orq %rcx, %rsi
andq %rax, %rsi
movq %rdx, %rax
shlq $0x8, %rax
orq %rdx, %rax
movabsq $0xff00ff00ff00ff, %rcx # imm = 0xFF00FF00FF00FF
andq %rcx, %rax
movq %rsi, %rdx
shlq $0x8, %rdx
orq %rsi, %rdx
andq %rcx, %rdx
movq %rax, %rcx
shlq $0x4, %rcx
orq %rax, %rcx
movabsq $0xf0f0f0f0f0f0f0f, %rax # imm = 0xF0F0F0F0F0F0F0F
andq %rax, %rcx
movq %rdx, %rsi
shlq $0x4, %rsi
orq %rdx, %rsi
andq %rax, %rsi
leaq (,%rcx,4), %rax
orq %rcx, %rax
movabsq $0x3333333333333333, %rcx # imm = 0x3333333333333333
andq %rcx, %rax
leaq (,%rsi,4), %rdx
orq %rsi, %rdx
andq %rcx, %rdx
leaq (%rax,%rax), %rcx
orq %rax, %rcx
movabsq $0x5555555555555555, %rsi # imm = 0x5555555555555555
andq %rcx, %rsi
leaq (,%rdx,4), %rax
addq %rdx, %rdx
orq %rax, %rdx
movabsq $-0x5555555555555556, %rax # imm = 0xAAAAAAAAAAAAAAAA
andq %rdx, %rax
orq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/geohash-int/geohash.c
// Function: geohashDecodeToLongLatType
int geohashDecodeToLongLatType(const GeoHashBits hash, double *xy) {
    GeoHashArea area = { { 0 } };
    if (!xy || !geohashDecodeType(hash, &area))
        return 0;
    return geohashDecodeAreaToLongLat(&area, xy);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movapd %xmm0, 0x10(%rsp)
movapd %xmm0, (%rsp)
xorl %ebp, %ebp
testq %rdx, %rdx
je 0xa10e5
movq %rdx, %rbx
movzbl %sil, %esi
movsd 0x3443d(%rip), %xmm0    # 0xd54c8
movsd 0x313dd(%rip), %xmm1    # 0xd2470
movsd 0x34425(%rip), %xmm2    # 0xd54c0
movsd 0x313d5(%rip), %xmm3    # 0xd2478
movq %rsp, %rdx
callq 0xa0e19
testl %eax, %eax
je 0xa10e5
movsd 0x10(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
movsd 0x34375(%rip), %xmm1    # 0xd5438
mulsd %xmm1, %xmm0
movsd %xmm0, (%rbx)
movsd 0x20(%rsp), %xmm0
addsd 0x28(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/geohash-int/geohash_helper.c
// Function: geohashEstimateStepsByRadius
uint8_t geohashEstimateStepsByRadius(double range_meters, double lat) {
    if (range_meters == 0) return 26;
    int step = 1;
    while (range_meters < MERCATOR_MAX) {
        range_meters *= 2;
        step++;
    }
    step -= 2; /* Make sure range is included in most of the base cases. */

    /* Wider range torwards the poles... Note: it is possible to do better
     * than this approximation by computing the distance between meridians
     * at this latitude, but this does the trick for now. */
    if (lat > 66 || lat < -66) {
        step--;
        if (lat > 80 || lat < -80) step--;
    }

    /* Frame to valid range. */
    if (step < 1) step = 1;
    if (step > 26) step = 26;
    return step;
}

// Assembly:
movb $0x1a, %al
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jne 0xa12ff
jp 0xa12ff
retq
movl $0x1, %eax
movsd 0x341c4(%rip), %xmm2    # 0xd54d0
ucomisd %xmm0, %xmm2
jbe 0xa131a
addsd %xmm0, %xmm0
incl %eax
jmp 0xa130c
andpd 0x3118e(%rip), %xmm1    # 0xd24b0
ucomisd 0x341ae(%rip), %xmm1    # 0xd54d8
jbe 0xa133b
ucomisd 0x341ac(%rip), %xmm1    # 0xd54e0
jbe 0xa1340
addl $-0x4, %eax
jmp 0xa1343
addl $-0x2, %eax
jmp 0xa1343
addl $-0x3, %eax
cmpl $0x2, %eax
movl $0x1, %ecx
cmovgel %eax, %ecx
cmpl $0x1a, %ecx
movl $0x1a, %eax
cmovll %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/geohash-int/geohash_helper.c
// Function: geohashBoundingBox
int geohashBoundingBox(double longitude, double latitude, double radius_meters,
                       double *bounds) {
    if (!bounds) return 0;

    bounds[0] = longitude - rad_deg(radius_meters/EARTH_RADIUS_IN_METERS/cos(deg_rad(latitude)));
    bounds[2] = longitude + rad_deg(radius_meters/EARTH_RADIUS_IN_METERS/cos(deg_rad(latitude)));
    bounds[1] = latitude - rad_deg(radius_meters/EARTH_RADIUS_IN_METERS);
    bounds[3] = latitude + rad_deg(radius_meters/EARTH_RADIUS_IN_METERS);
    return 1;
}

// Assembly:
testq %rdi, %rdi
je 0xa141c
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
divsd 0x34175(%rip), %xmm2    # 0xd54e8
movsd %xmm2, (%rsp)
movapd %xmm1, %xmm2
mulsd 0x32e44(%rip), %xmm2    # 0xd41c8
movsd %xmm2, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movapd %xmm2, %xmm0
movsd %xmm1, 0x18(%rsp)
callq 0x263e0
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
divsd 0x32e18(%rip), %xmm1    # 0xd41c8
movsd 0x8(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rbx)
movsd 0x10(%rsp), %xmm0
callq 0x263e0
movsd (%rsp), %xmm2
movapd %xmm2, %xmm1
divsd %xmm0, %xmm1
movsd 0x32dea(%rip), %xmm0    # 0xd41c8
divsd %xmm0, %xmm1
addsd 0x8(%rsp), %xmm1
movsd %xmm1, 0x10(%rbx)
movapd %xmm2, %xmm1
divsd %xmm0, %xmm1
movsd 0x18(%rsp), %xmm2
movapd %xmm2, %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rbx)
addsd %xmm2, %xmm1
movsd %xmm1, 0x18(%rbx)
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/geohash-int/geohash_helper.c
// Function: geohashGetDistance
double geohashGetDistance(double lon1d, double lat1d, double lon2d, double lat2d) {
    double lat1r, lon1r, lat2r, lon2r, u, v;
    lat1r = deg_rad(lat1d);
    lon1r = deg_rad(lon1d);
    lat2r = deg_rad(lat2d);
    lon2r = deg_rad(lon2d);
    u = sin((lat2r - lat1r) / 2);
    v = sin((lon2r - lon1r) / 2);
    return 2.0 * EARTH_RADIUS_IN_METERS *
           asin(sqrt(u * u + cos(lat1r) * cos(lat2r) * v * v));
}

// Assembly:
subq $0x28, %rsp
movsd 0x328f4(%rip), %xmm4    # 0xd41c8
mulsd %xmm4, %xmm1
movsd %xmm1, 0x10(%rsp)
mulsd %xmm4, %xmm0
mulsd %xmm4, %xmm3
movsd %xmm3, 0x18(%rsp)
mulsd %xmm2, %xmm4
subsd %xmm0, %xmm4
movsd %xmm4, 0x8(%rsp)
movapd %xmm3, %xmm0
subsd %xmm1, %xmm0
mulsd 0x33b2e(%rip), %xmm0    # 0xd5438
callq 0x26ca0
movsd %xmm0, 0x20(%rsp)
movsd 0x8(%rsp), %xmm0
mulsd 0x33b15(%rip), %xmm0    # 0xd5438
callq 0x26ca0
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x263e0
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x263e0
mulsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movsd 0x20(%rsp), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
movapd %xmm1, %xmm0
jb 0xa1980
sqrtsd %xmm0, %xmm0
jmp 0xa1985
callq 0x26c20
callq 0x265b0
mulsd 0x33b5e(%rip), %xmm0    # 0xd54f0
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/trumabrat[P]GrandProjet/hachageMain.c
// Function: main
int main()
{
    // Q4.2
    float k;
    for (int i = 0; i < 11; i++)
    {
        for (int j = 0; j < 11; j++)
        {
            k = fonctionCle(i, j);
            printf("x = %d, y = %d, k = %.2f\n", i, j, k);
        }
    }

    // lecture et creation d'une instance de Chaines et de Reseau
    FILE* f = NULL;
    f = fopen("00014_burma.cha", "r");
    Chaines *c = lectureChaines(f);
    fclose(f);
    Reseau *R = reconstitueReseauHachage(c, 5);
    FILE* f2 = NULL;

    // // l'enregistrement dans un fichier
    f2 = fopen("resHachage.txt", "w");
    ecrireReseau(R, f2);
    fclose(f2);

    // affichage
    afficheReseauSVG(R, "resoHachage");

    // liberation de memoire
    liberer_chaines(c);
    liberation_reseau(R);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
xorl %ebx, %ebx
xorpd %xmm0, %xmm0
leaq 0xcbd(%rip), %r14       # 0x33ec
xorps %xmm2, %xmm2
xorl %ebp, %ebp
movsd %xmm0, 0x8(%rsp)
movsd %xmm2, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
movaps %xmm2, %xmm1
callq 0x122c
fstps 0x4(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rsp), %xmm0
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
movb $0x1, %al
callq 0x1080
movsd 0x10(%rsp), %xmm2
movsd 0x891(%rip), %xmm1      # 0x3008
movsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm2
incl %ebp
cmpl $0xb, %ebp
jne 0x273a
addsd %xmm1, %xmm0
incl %ebx
cmpl $0xb, %ebx
jne 0x272f
leaq 0xc6c(%rip), %rdi       # 0x3406
leaq 0xc75(%rip), %rsi       # 0x3416
callq 0x10e0
movq %rax, %r14
movq %rax, %rdi
callq 0x20a8
movq %rax, %rbx
movq %r14, %rdi
callq 0x1060
movq %rbx, %rdi
movl $0x5, %esi
callq 0x14cb
movq %rax, %r14
leaq 0xc45(%rip), %rdi       # 0x3418
leaq 0xa6c(%rip), %rsi       # 0x3246
callq 0x10e0
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x1a23
movq %r15, %rdi
callq 0x1060
leaq 0xc2b(%rip), %rsi       # 0x3427
movq %r14, %rdi
callq 0x1c15
movq %rbx, %rdi
callq 0x2702
movq %r14, %rdi
callq 0x1e89
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/6-Memory/data_vs_bss.c
// Function: main
int main(void) {
	static int static_data = 10;
	static int static_bss;

	printf("global  bss = %p\n", &global_bss);
	printf("static  bss = %p\n", &static_bss);
	printf("global data = %p\n", &global_data);
	printf("static data = %p\n", &static_data);

	return 0;
}

// Assembly:
pushq %rax
leaq 0xec0(%rip), %rdi       # 0x2004
leaq 0x2ef5(%rip), %rsi      # 0x4040
xorl %eax, %eax
callq 0x1030
leaq 0xebd(%rip), %rdi       # 0x2016
leaq 0x2edc(%rip), %rsi      # 0x403c
xorl %eax, %eax
callq 0x1030
leaq 0xeba(%rip), %rdi       # 0x2028
leaq 0x2ebb(%rip), %rsi      # 0x4030
xorl %eax, %eax
callq 0x1030
leaq 0xeb7(%rip), %rdi       # 0x203a
leaq 0x2eaa(%rip), %rsi      # 0x4034
xorl %eax, %eax
callq 0x1030
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/alloc.c
// Function: alloc_homes
void alloc_homes(program_t *prog) {
    pair_t *pair;
    map_for_each(prog->fn_defs, pair) {
        fn_def_t *curr_fn = pair->value;
        debug("allocating for function %s\n", string_get(curr_fn->name));
        curr_fn->sp_offset = alloc_scoped_env(curr_fn->env, 0);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq (%rax), %rax
movq (%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq (%rdi), %rax
movq (%rax), %rdi
addq $0x10, %rdi
leaq 0x8(%rsp), %rsi
callq 0x30f8
testb %al, %al
je 0x12c6
leaq 0x8(%rsp), %r14
movq 0x8(%rsp), %rax
movq 0x8(%rax), %r15
movq 0x20(%r15), %rdi
xorl %esi, %esi
callq 0x12d0
cltq
movq %rax, 0x28(%r15)
movq (%rbx), %rax
movq (%rax), %rdi
addq $0x10, %rdi
movq %r14, %rsi
callq 0x30f8
testb %al, %al
jne 0x1296
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/alloc.c
// Function: alloc_scoped_env
static int alloc_scoped_env(env_t *env, int offset) {
    pair_t *pair;

    // Allocate homes for each variable at the current level
    map_for_each(env->homes, pair) {
        var_info_t *v = pair->value;
        string_t *name = pair->key;

        offset -= 8;
        debug("Found variable %s\n", string_get(name));
        v->home.reg = REG_RBP;
        v->home.offset = offset;
    }

    // Recursively allocate vars for all child envs
    env_t *child_env;
    list_for_each(env->children, child_env) {
        int child_offset = alloc_scoped_env(child_env, offset); 
        if (child_offset < offset)
            offset = child_offset;
    }

    return offset;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rax
movq (%rax), %rax
movq (%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq (%rdi), %rax
movq (%rax), %rdi
addq $0x10, %rdi
leaq 0x10(%rsp), %rsi
callq 0x30f8
testb %al, %al
je 0x1346
movslq %ebx, %r12
addq $-0x8, %r12
leaq 0x10(%rsp), %r15
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movl $0x5, 0x8(%rax)
movq %r12, 0x10(%rax)
movq (%r14), %rax
movq (%rax), %rdi
addq $0x10, %rdi
movq %r15, %rsi
callq 0x30f8
addl $-0x8, %ebx
addq $-0x8, %r12
testb %al, %al
jne 0x1315
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rdi)
addq $0x10, %rdi
leaq 0x8(%rsp), %rsi
callq 0x30f8
testb %al, %al
je 0x1391
leaq 0x8(%rsp), %r15
movq 0x8(%rsp), %rdi
movl %ebx, %esi
callq 0x12d0
cmpl %ebx, %eax
cmovll %eax, %ebx
movq 0x8(%r14), %rdi
addq $0x10, %rdi
movq %r15, %rsi
callq 0x30f8
testb %al, %al
jne 0x136c
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/asm.c
// Function: unique_label
static string_t *unique_label(char *seed) {
    static int count = 0;
    char buf[32];

    string_t *name = string_new();
    string_append(name, seed, strnlen(seed, 100));

    snprintf(buf, 32, "%d", count++);
    string_append(name, buf, strnlen(buf, 32));
    return name;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
callq 0x4e20
movq %rax, %rbx
movl $0x64, %esi
movq %r14, %rdi
callq 0x10b0
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x4e5c
movl 0x892b(%rip), %ecx      # 0xa0ac
leal 0x1(%rcx), %eax
movl %eax, 0x8922(%rip)      # 0xa0ac
leaq 0x4aed(%rip), %rdx      # 0x627e
movq %rsp, %r14
movl $0x20, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1090
movl $0x20, %esi
movq %r14, %rdi
callq 0x10b0
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x4e5c
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/asm.c
// Function: instr_noarg
static output_t *instr_noarg(opcode_t op) {
    output_t *out = malloc(sizeof(output_t));
    if (!out) {
        UNREACHABLE("instr: malloc failed");
    }

    out->instr.num_args = op_to_num_args(op);
    if (out->instr.num_args != 0) {
        UNREACHABLE("instr: opcode has nonzero number of args\n");
    }

    out->type = OUTPUT_INSTR;
    out->instr.op = op;

    return out;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl $0x40, %edi
callq 0x10e0
testq %rax, %rax
je 0x1e8e
leal -0x1(%rbx), %ecx
cmpl $0x17, %ecx
jae 0x1e82
movl $0x7fdffb, %edx         # imm = 0x7FDFFB
btl %ecx, %edx
jb 0x1eaa
xorl %ecx, %ecx
movl %ecx, 0xc(%rax)
movl %ecx, (%rax)
movl %ebx, 0x8(%rax)
popq %rbx
retq
leaq 0x429f(%rip), %rdi      # 0x6134
leaq 0x42d2(%rip), %rsi      # 0x616e
leaq 0x47d4(%rip), %rcx      # 0x6677
movl $0xcc, %edx
jmp 0x1ed3
movl %ecx, %ecx
leaq 0x4225(%rip), %rdx      # 0x60d8
movl (%rdx,%rcx,4), %ecx
movl %ecx, 0xc(%rax)
leaq 0x4274(%rip), %rdi      # 0x6134
leaq 0x42a7(%rip), %rsi      # 0x616e
leaq 0x47be(%rip), %rcx      # 0x668c
movl $0xd1, %edx
xorl %eax, %eax
callq 0x1080
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/asm.c
// Function: instr_r
static output_t *instr_r(opcode_t op, reg_t src) {
    output_t *out = malloc(sizeof(output_t));
    if (!out) {
        UNREACHABLE("instr_r: malloc failed\n");
    }

    out->instr.num_args = op_to_num_args(op);
    if (out->instr.num_args != 1) {
        UNREACHABLE("instr_r: num args != 1 for this opcode\n");
    }

    out->type = OUTPUT_INSTR;
    out->instr.op = op;

    out->instr.src.type = OPERAND_REG;
    out->instr.src.reg = src;
    return out;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movl %edi, %ebx
movl $0x40, %edi
callq 0x10e0
testq %rax, %rax
je 0x1f24
cmpl $0x17, %ebx
ja 0x1f7d
movl $0xff93e0, %ecx         # imm = 0xFF93E0
btl %ebx, %ecx
jae 0x1f40
movq $0x1, 0xc(%rax)
movl $0x0, (%rax)
movl %ebx, 0x8(%rax)
movl %ebp, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x4209(%rip), %rdi      # 0x6134
leaq 0x423c(%rip), %rsi      # 0x616e
leaq 0x429d(%rip), %rcx      # 0x61d6
movl $0xa2, %edx
jmp 0x1f6c
movl $0x2, %ecx
movl $0x2c16, %edx           # imm = 0x2C16
btl %ebx, %edx
jae 0x1f7d
movl %ecx, 0xc(%rax)
leaq 0x41db(%rip), %rdi      # 0x6134
leaq 0x420e(%rip), %rsi      # 0x616e
leaq 0x4287(%rip), %rcx      # 0x61ee
movl $0xa7, %edx
xorl %eax, %eax
callq 0x1080
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
xorl %ecx, %ecx
jmp 0x1f4f
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/asm.c
// Function: instr_r2r
static output_t *instr_r2r(opcode_t op, reg_t src, reg_t dst) {
    output_t *out = malloc(sizeof(output_t));
    if (!out) {
        UNREACHABLE("instr_r2r: malloc failed\n");
    }

    out->instr.num_args = op_to_num_args(op);
    if (out->instr.num_args != 2) {
        UNREACHABLE("instr_r2r: num args != 2\n");
    }

    out->type = OUTPUT_INSTR;
    out->instr.op = op;
    out->instr.src.type = OPERAND_REG;
    out->instr.src.reg = src;

    out->instr.dst.type = OPERAND_REG;
    out->instr.dst.reg = dst;
    return out;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %r14d
movl %edi, %ebp
movl $0x40, %edi
callq 0x10e0
testq %rax, %rax
je 0x1ffa
cmpl $0x17, %ebp
ja 0x2025
movl $0x2c16, %ecx           # imm = 0x2C16
btl %ebp, %ecx
jae 0x1fcc
movq $0x2, 0xc(%rax)
xorl %ecx, %ecx
movl %ecx, (%rax)
movl %ebp, 0x8(%rax)
movl %r14d, 0x18(%rax)
movl %ecx, 0x28(%rax)
movl %ebx, 0x30(%rax)
popq %rbx
popq %r14
popq %rbp
retq
movl $0x1, %ecx
movl $0xff93e0, %edx         # imm = 0xFF93E0
btl %ebp, %edx
jae 0x2025
movl %ecx, 0xc(%rax)
leaq 0x414f(%rip), %rdi      # 0x6134
leaq 0x4182(%rip), %rsi      # 0x616e
leaq 0x423d(%rip), %rcx      # 0x6230
movl $0x42, %edx
jmp 0x2014
leaq 0x4133(%rip), %rdi      # 0x6134
leaq 0x4166(%rip), %rsi      # 0x616e
leaq 0x4207(%rip), %rcx      # 0x6216
movl $0x3d, %edx
xorl %eax, %eax
callq 0x1080
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
xorl %ecx, %ecx
jmp 0x1fdb
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/asm.c
// Function: instr_i2r
static output_t *instr_i2r(opcode_t op, imm_t src, reg_t dst) {
    output_t *out = malloc(sizeof(output_t));
    if (!out) {
        UNREACHABLE("instr_i2r: malloc failed\n");
    }

    out->instr.num_args = op_to_num_args(op);
    if (out->instr.num_args != 2) {
        UNREACHABLE("instr_i2r: num args != 2\n");
    }

    out->type = OUTPUT_INSTR;
    out->instr.op = op;

    out->instr.src.type = OPERAND_IMM;
    out->instr.src.imm = src;

    out->instr.dst.type = OPERAND_REG;
    out->instr.dst.reg = dst;
    return out;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %ebp
movl $0x40, %edi
callq 0x10e0
testq %rax, %rax
je 0x20a8
cmpl $0x17, %ebp
ja 0x20d3
movl $0x2c16, %ecx           # imm = 0x2C16
btl %ebp, %ecx
jae 0x207a
movabsq $0x300000002, %rcx      # imm = 0x300000002
movq %rcx, 0xc(%rax)
xorl %ecx, %ecx
movl %ecx, (%rax)
movl %ebp, 0x8(%rax)
movq %r14, 0x18(%rax)
movl %ecx, 0x28(%rax)
movl %ebx, 0x30(%rax)
popq %rbx
popq %r14
popq %rbp
retq
movl $0x1, %ecx
movl $0xff93e0, %edx         # imm = 0xFF93E0
btl %ebp, %edx
jae 0x20d3
movl %ecx, 0xc(%rax)
leaq 0x40a1(%rip), %rdi      # 0x6134
leaq 0x40d4(%rip), %rsi      # 0x616e
leaq 0x41c3(%rip), %rcx      # 0x6264
movl $0x57, %edx
jmp 0x20c2
leaq 0x4085(%rip), %rdi      # 0x6134
leaq 0x40b8(%rip), %rsi      # 0x616e
leaq 0x418d(%rip), %rcx      # 0x624a
movl $0x52, %edx
xorl %eax, %eax
callq 0x1080
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
xorl %ecx, %ecx
jmp 0x2089
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/asm.c
// Function: instr_label
static output_t *instr_label(opcode_t op, string_t *label) {
    if (op != OP_JMP && op != OP_JE && op != OP_JNE && op != OP_CALL) {
        UNREACHABLE("intsr_label: not a jmp or call opcode\n");
    }

    if (!label) {
        UNREACHABLE("intsr_label: null label\n");
    }

    output_t *out = malloc(sizeof(output_t));
    out->type = OUTPUT_INSTR;
 
    out->instr.num_args = op_to_num_args(op);
    if (out->instr.num_args != 1) {
        UNREACHABLE("instr_label: opcode has wrong number of args, not even sure how this happens\n");
    }

    out->instr.op = op;
    out->instr.src.type = OPERAND_LABEL;
    out->instr.src.label = label;
    return out;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leal -0x18(%rbx), %eax
cmpl $-0x5, %eax
jbe 0x2cb0
movq %rsi, %r14
testq %rsi, %rsi
je 0x2ccc
movl $0x40, %edi
callq 0x10e0
movl $0x0, (%rax)
cmpl $0x17, %ebx
ja 0x2d25
movl $0xff93e0, %ecx         # imm = 0xFF93E0
btl %ebx, %ecx
jae 0x2ce8
movabsq $0x400000001, %rcx      # imm = 0x400000001
movq %rcx, 0xc(%rax)
movl %ebx, 0x8(%rax)
movq %r14, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x347d(%rip), %rdi      # 0x6134
leaq 0x34b0(%rip), %rsi      # 0x616e
leaq 0x3924(%rip), %rcx      # 0x65e9
movl $0xb4, %edx
jmp 0x2d14
leaq 0x3461(%rip), %rdi      # 0x6134
leaq 0x3494(%rip), %rsi      # 0x616e
leaq 0x392f(%rip), %rcx      # 0x6610
movl $0xb8, %edx
jmp 0x2d14
movl $0x2, %ecx
movl $0x2c16, %edx           # imm = 0x2C16
btl %ebx, %edx
jae 0x2d25
movl %ecx, 0xc(%rax)
leaq 0x3433(%rip), %rdi      # 0x6134
leaq 0x3466(%rip), %rsi      # 0x616e
leaq 0x391a(%rip), %rcx      # 0x6629
movl $0xc0, %edx
xorl %eax, %eax
callq 0x1080
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
xorl %ecx, %ecx
jmp 0x2cf7
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/asm.c
// Function: block_or_single_to_instrs
static list_t *block_or_single_to_instrs(block_or_single_t *block_or_single, context_t context) {
    list_t *ret = list_new();
    if (block_or_single->type == SINGLE) {
        list_concat(ret, stmt_to_instrs(block_or_single->single, context));
    } else {
        list_concat(ret, block_to_instrs(block_or_single->block, context));
    }
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
leaq 0x40(%rsp), %r15
callq 0x2efc
movq %rax, %rbx
cmpl $0x1, (%r14)
movq 0x8(%r14), %rdi
jne 0x2d65
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x17c8
jmp 0x2d7c
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x2d94
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2fad
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/asm.c
// Function: block_to_instrs
static list_t *block_to_instrs(block_t *block, context_t context) {
    list_t *ret = list_new();
    stmt_t *curr_stmt = list_pop(block->stmts);
    context.env = block->env;
    for (; curr_stmt; curr_stmt = list_pop(block->stmts)) {
        list_concat(ret, stmt_to_instrs(curr_stmt, context));
    }
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0x2efc
movq %rax, %r14
movq (%rbx), %rdi
callq 0x2ffb
movq 0x8(%rbx), %rcx
movq %rcx, 0x58(%rsp)
testq %rax, %rax
je 0x2df5
leaq 0x40(%rsp), %r15
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rax, %rdi
callq 0x17c8
movq %r14, %rdi
movq %rax, %rsi
callq 0x2fad
movq (%rbx), %rdi
callq 0x2ffb
testq %rax, %rax
jne 0x2dc3
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/env.c
// Function: env_new
env_t *env_new(env_t *parent) {
    env_t *new_env = malloc(sizeof(env_t));
    if (!new_env)
        return NULL;

    new_env->parent = parent;
    new_env->children = list_new();
    new_env->homes = map_new();

    if (parent)
        list_push(parent->children, new_env);

    return new_env;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x18, %edi
callq 0x10e0
testq %rax, %rax
je 0x2e45
movq %rax, %rbx
movq %r14, 0x10(%rax)
callq 0x2efc
movq %rax, 0x8(%rbx)
callq 0x31b4
movq %rax, (%rbx)
testq %r14, %r14
je 0x2e47
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x2f67
jmp 0x2e47
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/env.c
// Function: env_get
var_info_t *env_get(env_t *env, string_t *var) {
    var_info_t *ret = NULL;
    while (env) {
        if ((ret = map_get(env->homes, var)))
            return ret;
        env = env->parent;
    }
    return NULL;
}

// Assembly:
testq %rdi, %rdi
je 0x2e84
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x31df
testq %rax, %rax
jne 0x2e7c
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x2e61
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/env.c
// Function: env_get_declared
var_info_t *env_get_declared(env_t *env, string_t *var) {
    var_info_t *ret = NULL;
    while (env) {
        if ((ret = map_get(env->homes, var)) && ret->declared)
            return ret;
        env = env->parent;
    }
    return NULL;
}

// Assembly:
testq %rdi, %rdi
je 0x2ebf
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x31df
testq %rax, %rax
je 0x2eac
cmpb $0x0, 0x18(%rax)
jne 0x2eb7
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x2e96
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/env.c
// Function: env_add
void env_add(env_t *env, string_t *name, builtin_type_t type, bool declared) {
    var_info_t *info = malloc(sizeof(var_info_t)); 
    info->type = type;
    info->declared = declared;
    map_set(env->homes, name, info);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl $0x20, %edi
callq 0x10e0
movl %ebp, (%rax)
movb %bl, 0x18(%rax)
movq (%r15), %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3259
nop
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/list.c
// Function: list_new
list_t *list_new(void) {
    list_t *list = malloc(sizeof(list_t));
    if (list_init(list) < 0)
        return NULL;
    return list;
}

// Assembly:
pushq %rbx
movl $0x20, %edi
callq 0x10e0
movq %rax, %rbx
testq %rax, %rax
je 0x2f2f
movl $0x0, 0x18(%rbx)
movl $0x10, %edi
callq 0x10e0
movq %rax, 0x8(%rbx)
movq %rax, (%rbx)
movq $0x0, 0x8(%rax)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/list.c
// Function: list_init
int list_init(list_t *list) {
    if (!list)
        return -1;
    list->len = 0;
    list->head = list->tail = malloc(sizeof(list_node_t));
    list->head->next = NULL;
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x2f61
pushq %rbx
movq %rdi, %rbx
movl $0x0, 0x18(%rdi)
movl $0x10, %edi
callq 0x10e0
movq %rax, 0x8(%rbx)
movq %rax, (%rbx)
movq $0x0, 0x8(%rax)
xorl %eax, %eax
popq %rbx
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/list.c
// Function: list_push
int list_push(list_t *list, void *data) {
    if (!data)
        return -1;

    list_node_t *new_node = malloc(sizeof(list_node_t));
    if (!new_node)
        return -1;

    new_node->data = data;
    new_node->next = NULL;
    list->tail->next = new_node;
    list->tail = list->tail->next;
    list->len++;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rsi, %rsi
je 0x2fa6
movq %rsi, %r14
movq %rdi, %rbx
movl $0x10, %edi
callq 0x10e0
testq %rax, %rax
je 0x2fa6
movq %r14, (%rax)
movq $0x0, 0x8(%rax)
movq 0x8(%rbx), %rcx
movq %rax, 0x8(%rcx)
movq %rax, 0x8(%rbx)
incl 0x18(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/list.c
// Function: list_concat
int list_concat(list_t *l1, list_t *l2) {
    if (!l1 || !l2)
        return -1;

    l1->tail->next = l2->head->next;
    if (l2->len)
        l1->tail = l2->tail;
    l1->len += l2->len;
    free(l2->head);
    free(l2);
    return 0;
}

// Assembly:
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
orb %cl, %dl
jne 0x2ffa
pushq %rbx
movq %rsi, %rbx
movq (%rsi), %rax
movq 0x8(%rax), %rcx
movq 0x8(%rdi), %rdx
movq %rcx, 0x8(%rdx)
movl 0x18(%rsi), %ecx
testl %ecx, %ecx
je 0x2fe4
movq 0x8(%rbx), %rdx
movq %rdx, 0x8(%rdi)
addl %ecx, 0x18(%rdi)
movq %rax, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/list.c
// Function: list_pop
void *list_pop(list_t *list) {
    if (!list)
        return NULL;
    if (list->len == 0)
        return NULL;
    assert(list->head->next);
    list_node_t *removed = list->head->next;
    void *ret_data = removed->data;
    list->head->next = removed->next;
    list->len--;
    if (list->len == 0)
        list->tail = NULL;

    free(removed);
    return ret_data;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x3038
movl 0x18(%rdi), %ecx
testl %ecx, %ecx
je 0x3038
movq (%rdi), %rdx
movq 0x8(%rdx), %rax
testq %rax, %rax
je 0x303f
movq (%rax), %rbx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rdx)
decl %ecx
movl %ecx, 0x18(%rdi)
jne 0x302e
movq $0x0, 0x8(%rdi)
movq %rax, %rdi
callq 0x1030
jmp 0x303a
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
leaq 0x3670(%rip), %rdi      # 0x66b6
leaq 0x367a(%rip), %rsi      # 0x66c7
leaq 0x367a(%rip), %rcx      # 0x66ce
movl $0x39, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/list.c
// Function: list_peek
void *list_peek(list_t *list) {
    if (!list)
        return NULL;
    if (!list->len)
        return NULL;
    assert(list->head->next);
    return list->head->next->data;
}

// Assembly:
testq %rdi, %rdi
je 0x3079
cmpl $0x0, 0x18(%rdi)
je 0x3079
movq (%rdi), %rax
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x307c
movq (%rax), %rax
retq
xorl %eax, %eax
retq
pushq %rax
leaq 0x3632(%rip), %rdi      # 0x66b6
leaq 0x363c(%rip), %rsi      # 0x66c7
leaq 0x3655(%rip), %rcx      # 0x66e7
movl $0x4a, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/list.c
// Function: list_free
void list_free(list_t *list) {
    if (!list)
        return;
    void *data;
    while ((data = list_pop(list))) {
        // assume it's heap allocated
        free(data);
    }
    assert(list->head->next == list->tail);
    free(list->head);
    free(list);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x30d7
movq %rdi, %rbx
movq %rbx, %rdi
callq 0x2ffb
testq %rax, %rax
je 0x30bc
movq %rax, %rdi
callq 0x1030
jmp 0x30a5
movq (%rbx), %rdi
movq 0x8(%rdi), %rax
cmpq 0x8(%rbx), %rax
jne 0x30d9
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
popq %rbx
retq
leaq 0x3621(%rip), %rdi      # 0x6701
leaq 0x35e0(%rip), %rsi      # 0x66c7
leaq 0x3632(%rip), %rcx      # 0x6720
movl $0x57, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/list.c
// Function: _list_iterate
inline bool __list_iterate(list_node_t **node, void **data) {
    if (*node == NULL)
        return false;

    *data = (*node)->data;
    *node = (*node)->next;
    return true;
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x3110
movq (%rax), %rcx
movq %rcx, (%rsi)
movq (%rdi), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, (%rdi)
testq %rax, %rax
setne %al
retq
nop
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/main.c
// Function: main
int main(int argc, char **argv) {
    if (argc != 2) {
        usage();
        return -1;
    }
   
    char *filename = argv[1];
    string_t *input = file_to_string(filename);
    if (!input || !input->len)
        return -1;

    debug("Tokenizing...\n");
    list_t *tokens = tokenize(input);
    if (!tokens || !tokens->len)
        return -1;

    debug("Parsing...\n");
    program_t *prog = parse(tokens);
    if (!prog || !prog->fn_defs)
        return -1;

    /*
     * TODO - do variable allocation here.
     */
    debug("Allocating variable homes...\n");
    alloc_homes(prog);

    debug("Generating asm...\n");
    list_t *instrs = gen_asm(prog);
    if (!instrs || !instrs->len)
        return -1;

    debug("Outputting asm...\n");
    print_asm(instrs);
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jne 0x3196
movq 0x8(%rsi), %rdi
callq 0x4d58
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x31a7
cmpl $0x0, 0x8(%rax)
je 0x31a7
movq %rax, %rdi
callq 0x4fc8
testq %rax, %rax
je 0x31a7
cmpl $0x0, 0x18(%rax)
je 0x31a7
movq %rax, %rdi
callq 0x366c
testq %rax, %rax
je 0x31a7
movq %rax, %r14
cmpq $0x0, (%rax)
je 0x31a7
movq %r14, %rdi
callq 0x125c
movq %r14, %rdi
callq 0x13a0
testq %rax, %rax
je 0x31a7
cmpl $0x0, 0x18(%rax)
je 0x31a7
movq %rax, %rdi
callq 0x32c4
xorl %ebx, %ebx
jmp 0x31a7
leaq 0x359c(%rip), %rdi      # 0x6739
callq 0x1050
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/johnvtan[P]ccccc/map.c
// Function: map_new
map_t *map_new(void) {
    map_t *ret = malloc(sizeof(map_t)); 
    if (!ret)
        return NULL;
    ret->pairs = list_new();
    if (!ret->pairs)
        return NULL;
    return ret;
}

// Assembly:
pushq %rbx
movl $0x8, %edi
callq 0x10e0
testq %rax, %rax
je 0x31d8
movq %rax, %rbx
callq 0x2efc
movq %rax, (%rbx)
testq %rax, %rax
cmoveq %rax, %rbx
jmp 0x31da
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq