LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/build-lua/.out/LuaToC/test/cfl.c
// Function: pmain
static int pmain(lua_State *L)
{
   int argc = lua_tointeger(L, 1);
   char **argv = (char **) lua_touserdata(L, 2);
   int n;

   lua_gc(L, LUA_GCSTOP, 0);
   luaL_openlibs(L);
   lua_gc(L, LUA_GCRESTART, 0);

   if (luaL_loadbuffer(L, mods[0].pc, mods[0].cb, mods[0].pszSource)) {
      return lua_error(L);
   }

   lua_createtable(L, argc-1, 1);        // argv
   for (n = 0; n < argc; ++n) {
      lua_pushstring(L, argv[n]);
      lua_rawseti(L, -2, n);
   }

   lua_pushcfunction(L, &getModInfo);    // getModInfo
   lua_pushcfunction(L, &getModFunc);    // getModFunc
   lua_pushliteral(L, "pre");      // preloads

   lua_call(L, 4, 1);

   return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x88f0
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rdi
movl $0x2, %esi
callq 0x8cb0
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0xa630
movq 0x18(%rsp), %rdi
callq 0x14d10
movq 0x18(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0xa630
movq 0x18(%rsp), %rdi
movq 0x37507(%rip), %rsi     # 0x3ee50
movq 0x374f8(%rip), %rcx     # 0x3ee48
movl $0x1f7, %edx            # imm = 0x1F7
xorl %eax, %eax
movl %eax, %r8d
callq 0xc9f0
cmpl $0x0, %eax
je 0x7977
movq 0x18(%rsp), %rdi
callq 0xa840
movl %eax, 0x24(%rsp)
jmp 0x7a36
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
subl $0x1, %esi
movl $0x1, %edx
callq 0x97d0
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0x14(%rsp), %eax
jge 0x79d7
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x9030
movq 0x18(%rsp), %rdi
movl 0x4(%rsp), %edx
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x9cd0
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x7995
movq 0x18(%rsp), %rdi
leaq 0x5d(%rip), %rsi        # 0x7a40
xorl %edx, %edx
callq 0x9230
movq 0x18(%rsp), %rdi
leaq 0xaa(%rip), %rsi        # 0x7aa0
xorl %edx, %edx
callq 0x9230
movq 0x18(%rsp), %rdi
leaq 0x2c661(%rip), %rsi     # 0x3406a
movl $0x3, %edx
callq 0x8f90
movq 0x18(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0xa130
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/build-lua/.out/LuaToC/test/cfl.c
// Function: getModInfo
static int getModInfo(lua_State *L)
{
   size_t ndx = lua_tointeger(L, 1);
   if (ndx >= ARRAYLENGTH(mods)) {
      return 0;
   }

   lua_pushstring(L, mods[ndx].pszName);
   return 1;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x88f0
movq %rax, (%rsp)
cmpq $0x5, (%rsp)
jb 0x7a71
movl $0x0, 0x14(%rsp)
jmp 0x7a95
movq 0x8(%rsp), %rdi
leaq 0x373c3(%rip), %rax     # 0x3ee40
imulq $0x28, (%rsp), %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x9030
movl $0x1, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/build-lua/.out/LuaToC/test/cfl.c
// Function: getModFunc
static int getModFunc(lua_State *L)
{
   size_t ndx = lua_tointeger(L, 1);
   if (ndx >= ARRAYLENGTH(mods)) {
      return 0;
   }

   if (mods[ndx].fn) {
      lua_pushcfunction(L, mods[ndx].fn);
   } else if (!mods[ndx].pszSource) {
      return 0;
   } else if (luaL_loadbuffer(L, mods[ndx].pc, mods[ndx].cb, mods[ndx].pszSource)) {
      return lua_error(L);
   }
   return 1;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x88f0
movq %rax, (%rsp)
cmpq $0x5, (%rsp)
jb 0x7ad4
movl $0x0, 0x14(%rsp)
jmp 0x7b97
leaq 0x37365(%rip), %rax     # 0x3ee40
imulq $0x28, (%rsp), %rcx
addq %rcx, %rax
cmpq $0x0, 0x20(%rax)
je 0x7b0e
movq 0x8(%rsp), %rdi
leaq 0x3734a(%rip), %rax     # 0x3ee40
imulq $0x28, (%rsp), %rcx
addq %rcx, %rax
movq 0x20(%rax), %rsi
xorl %edx, %edx
callq 0x9230
jmp 0x7b8f
leaq 0x3732b(%rip), %rax     # 0x3ee40
imulq $0x28, (%rsp), %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0x7b2e
movl $0x0, 0x14(%rsp)
jmp 0x7b97
movq 0x8(%rsp), %rdi
leaq 0x37306(%rip), %rax     # 0x3ee40
imulq $0x28, (%rsp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rsi
leaq 0x372f3(%rip), %rax     # 0x3ee40
imulq $0x28, (%rsp), %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdx
leaq 0x372e0(%rip), %rax     # 0x3ee40
imulq $0x28, (%rsp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0xc9f0
cmpl $0x0, %eax
je 0x7b8b
movq 0x8(%rsp), %rdi
callq 0xa840
movl %eax, 0x14(%rsp)
jmp 0x7b97
jmp 0x7b8d
jmp 0x7b8f
movl $0x1, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/darwin-on-arm[P]darwin-sdk/image3maker/image3maker.c
// Function: main
int main(int argc, char* argv[])
{
    process_options(argc, argv);
    create_image_preprocess();
    create_image();
    output_image();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x12b0
callq 0x14b0
callq 0x1960
callq 0x1cd0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/darwin-on-arm[P]darwin-sdk/image3maker/image3maker.c
// Function: map_file
static void* map_file(char *path, int *size)
{
	FILE *f;
    long sz;
    void *p;
    
    assert((f = fopen(path, "rb")));
    
    fseek(f, 0, SEEK_END);
    sz = ftell(f);
    fseek(f, 0, SEEK_SET);
    assert(sz);
    
    assert((p = malloc(sz)) != NULL);
    assert((sz != (fread(p, sz, 1, f))));
    
    assert(size);
    *size = (int)sz;
    
	return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x1a75(%rip), %rsi      # 0x3860
callq 0x1130
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1dfc
jmp 0x1e1b
leaq 0x1a60(%rip), %rdi      # 0x3863
leaq 0x18fe(%rip), %rsi      # 0x3708
movl $0xb4, %edx
leaq 0x1a65(%rip), %rcx      # 0x387b
callq 0x10a0
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x1110
movq -0x18(%rbp), %rdi
callq 0x10d0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x1110
cmpq $0x0, -0x20(%rbp)
je 0x1e52
jmp 0x1e71
leaq 0x1a40(%rip), %rdi      # 0x3899
leaq 0x18a8(%rip), %rsi      # 0x3708
movl $0xb9, %edx
leaq 0x1a0f(%rip), %rcx      # 0x387b
callq 0x10a0
movq -0x20(%rbp), %rdi
callq 0x10f0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1e86
jmp 0x1ea5
leaq 0x1a0f(%rip), %rdi      # 0x389c
leaq 0x1874(%rip), %rsi      # 0x3708
movl $0xbb, %edx
leaq 0x19db(%rip), %rcx      # 0x387b
callq 0x10a0
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
callq 0x1050
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
je 0x1ed1
jmp 0x1ef0
leaq 0x19dd(%rip), %rdi      # 0x38b5
leaq 0x1829(%rip), %rsi      # 0x3708
movl $0xbc, %edx
leaq 0x1990(%rip), %rcx      # 0x387b
callq 0x10a0
cmpq $0x0, -0x10(%rbp)
je 0x1ef9
jmp 0x1f18
leaq 0x19d2(%rip), %rdi      # 0x38d2
leaq 0x1801(%rip), %rsi      # 0x3708
movl $0xbe, %edx
leaq 0x1968(%rip), %rcx      # 0x387b
callq 0x10a0
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/darwin-on-arm[P]darwin-sdk/image3maker/image3maker.c
// Function: hex_to_bytes
static inline void hex_to_bytes(const char* hex, uint8_t** buffer, size_t* bytes) {
	*bytes = strlen(hex) / 2;
	*buffer = (uint8_t*) malloc(*bytes);
	size_t i;
	for(i = 0; i < *bytes; i++) {
		uint32_t byte;
		sscanf(hex, "%2x", &byte);
		(*buffer)[i] = byte;
		hex += 2;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1070
movq %rax, %rcx
shrq %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x10f0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x2018
movq -0x8(%rbp), %rdi
leaq 0x1928(%rip), %rsi      # 0x3908
leaq -0x24(%rbp), %rdx
movb $0x0, %al
callq 0x1100
movl -0x24(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1fc8
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/darwin-on-arm[P]darwin-sdk/image3maker/image3maker.c
// Function: image3_reserve_type
static void *image3_reserve_type(uint32_t tag, uint32_t length)
{
    uint32_t size, len;
    Image3Header* header;
    
    len = length + 28;
    size = image3core.rootHeader->header.size + len;
    
    assert((image3core.rootHeader = realloc(image3core.rootHeader, size)));
    
    header = (Image3Header*)add_ptr2(image3core.rootHeader, image3core.rootHeader->header.size);
    header->dataSize = length;
    header->size = len;
    header->magic = tag;
    
    image3core.rootHeader->header.size = size;
    image3core.rootHeader->header.dataSize += len;
    
    return (void*)(header + 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x8(%rbp), %eax
addl $0x1c, %eax
movl %eax, -0x10(%rbp)
movq 0x427a(%rip), %rax      # 0x62b8
movl 0x4(%rax), %eax
addl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movq 0x426a(%rip), %rdi      # 0x62b8
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x1120
movq %rax, 0x4259(%rip)      # 0x62b8
cmpq $0x0, %rax
je 0x2067
jmp 0x2086
leaq 0x1a22(%rip), %rdi      # 0x3a90
leaq 0x1693(%rip), %rsi      # 0x3708
movl $0x164, %edx            # imm = 0x164
leaq 0x1a4e(%rip), %rcx      # 0x3acf
callq 0x10a0
movq 0x422b(%rip), %rax      # 0x62b8
movq 0x4224(%rip), %rcx      # 0x62b8
movl 0x4(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x8(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0xc(%rbp), %ecx
movq 0x41f3(%rip), %rax      # 0x62b8
movl %ecx, 0x4(%rax)
movl -0x10(%rbp), %ecx
movq 0x41e6(%rip), %rax      # 0x62b8
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0xc, %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/darwin-on-arm[P]darwin-sdk/image3maker/image3maker.c
// Function: image3_reserve_data
static void *image3_reserve_data(uint32_t tag, uint32_t length)
{
    uint32_t size, len;
    Image3Header* header;
    
    /* Make it even */
    len = (uint32_t)round_up(length + sizeof(Image3Header), 2);
    size = (uint32_t)round_up(image3core.rootHeader->header.size + len, 16);
    
    /* Padding */
    len += ((uint32_t)round_up(image3core.rootHeader->header.size + len, 16) -
            (uint32_t)round_up(image3core.rootHeader->header.size + len, 2));
    
    assert((image3core.rootHeader = realloc(image3core.rootHeader, size)));
    
    header = (Image3Header*)add_ptr2(image3core.rootHeader, image3core.rootHeader->header.size);
    bzero((void*)(header), len);

    header->dataSize = length;
    header->size = len;
    header->magic = tag;
    
    image3core.rootHeader->header.size = size;
    image3core.rootHeader->header.dataSize += len;
    
    return (void*)(header + 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x8(%rbp), %eax
addq $0xc, %rax
movl %eax, %edi
movl $0x2, %esi
callq 0x2520
movl %eax, -0x10(%rbp)
movq 0x419d(%rip), %rax      # 0x62b8
movl 0x4(%rax), %edi
addl -0x10(%rbp), %edi
movl $0x10, %esi
callq 0x2520
movl %eax, -0xc(%rbp)
movq 0x4183(%rip), %rax      # 0x62b8
movl 0x4(%rax), %edi
addl -0x10(%rbp), %edi
movl $0x10, %esi
callq 0x2520
movl %eax, -0x1c(%rbp)
movq 0x4169(%rip), %rax      # 0x62b8
movl 0x4(%rax), %edi
addl -0x10(%rbp), %edi
movl $0x2, %esi
callq 0x2520
movl %eax, %ecx
movl -0x1c(%rbp), %eax
subl %ecx, %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq 0x4145(%rip), %rdi      # 0x62b8
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x1120
movq %rax, 0x4134(%rip)      # 0x62b8
cmpq $0x0, %rax
je 0x218c
jmp 0x21ab
leaq 0x18fd(%rip), %rdi      # 0x3a90
leaq 0x156e(%rip), %rsi      # 0x3708
movl $0x11b, %edx            # imm = 0x11B
leaq 0x1957(%rip), %rcx      # 0x3afd
callq 0x10a0
movq 0x4106(%rip), %rax      # 0x62b8
movq 0x40ff(%rip), %rcx      # 0x62b8
movl 0x4(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x10b0
movl -0x8(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0xc(%rbp), %ecx
movq 0x40be(%rip), %rax      # 0x62b8
movl %ecx, 0x4(%rax)
movl -0x10(%rbp), %ecx
movq 0x40b1(%rip), %rax      # 0x62b8
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0xc, %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/darwin-on-arm[P]darwin-sdk/image3maker/image3maker.c
// Function: image3_reserve_version
static void *image3_reserve_version(uint32_t tag, uint32_t length)
{
    uint32_t size, len;
    Image3Header* header;

    /* Make it even */
    len = (uint32_t)round_up(length + sizeof(Image3Header), 2);
    size = (uint32_t)round_up(image3core.rootHeader->header.size + len, 16);
    
    /* Padding */
    len += ((uint32_t)round_up(image3core.rootHeader->header.size + len, 16) -
            (uint32_t)round_up(image3core.rootHeader->header.size + len, 2));
    
    /* APPLE.. */
    len -= 4;
    size -= 4;
    
    assert((image3core.rootHeader = realloc(image3core.rootHeader, size)));
    
    header = (Image3Header*)add_ptr2(image3core.rootHeader, image3core.rootHeader->header.size);
    bzero((void*)(header), len);

    header->dataSize = length;
    header->size = len;
    header->magic = tag;
    
    image3core.rootHeader->header.size = size;
    image3core.rootHeader->header.dataSize += len;
    
    return (void*)(header + 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x8(%rbp), %eax
addq $0xc, %rax
movl %eax, %edi
movl $0x2, %esi
callq 0x2520
movl %eax, -0x10(%rbp)
movq 0x406d(%rip), %rax      # 0x62b8
movl 0x4(%rax), %edi
addl -0x10(%rbp), %edi
movl $0x10, %esi
callq 0x2520
movl %eax, -0xc(%rbp)
movq 0x4053(%rip), %rax      # 0x62b8
movl 0x4(%rax), %edi
addl -0x10(%rbp), %edi
movl $0x10, %esi
callq 0x2520
movl %eax, -0x1c(%rbp)
movq 0x4039(%rip), %rax      # 0x62b8
movl 0x4(%rax), %edi
addl -0x10(%rbp), %edi
movl $0x2, %esi
callq 0x2520
movl %eax, %ecx
movl -0x1c(%rbp), %eax
subl %ecx, %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
subl $0x4, %eax
movl %eax, -0xc(%rbp)
movq 0x4003(%rip), %rdi      # 0x62b8
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x1120
movq %rax, 0x3ff2(%rip)      # 0x62b8
cmpq $0x0, %rax
je 0x22ce
jmp 0x22ed
leaq 0x17bb(%rip), %rdi      # 0x3a90
leaq 0x142c(%rip), %rsi      # 0x3708
movl $0xff, %edx
leaq 0x1843(%rip), %rcx      # 0x3b2b
callq 0x10a0
movq 0x3fc4(%rip), %rax      # 0x62b8
movq 0x3fbd(%rip), %rcx      # 0x62b8
movl 0x4(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x10b0
movl -0x8(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0xc(%rbp), %ecx
movq 0x3f7c(%rip), %rax      # 0x62b8
movl %ecx, 0x4(%rax)
movl -0x10(%rbp), %ecx
movq 0x3f6f(%rip), %rax      # 0x62b8
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0xc, %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/darwin-on-arm[P]darwin-sdk/image3maker/image3maker.c
// Function: image3_reserve_tag
static void *image3_reserve_tag(uint32_t tag, uint32_t length)
{
    uint32_t size, len;
    Image3Header* header;
    
    len = length + 24;
    size = image3core.rootHeader->header.size + len;
    
    assert((image3core.rootHeader = realloc(image3core.rootHeader, size)));
    
    header = (Image3Header*)add_ptr2(image3core.rootHeader, image3core.rootHeader->header.size);
    bzero((void*)(header), len);

    header->dataSize = length;
    header->size = len;
    header->magic = tag;
    
    image3core.rootHeader->header.size = size;
    image3core.rootHeader->header.dataSize += len;
    
    
    return (void*)(header + 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x8(%rbp), %eax
addl $0x18, %eax
movl %eax, -0x10(%rbp)
movq 0x3f3a(%rip), %rax      # 0x62b8
movl 0x4(%rax), %eax
addl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movq 0x3f2a(%rip), %rdi      # 0x62b8
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x1120
movq %rax, 0x3f19(%rip)      # 0x62b8
cmpq $0x0, %rax
je 0x23a7
jmp 0x23c6
leaq 0x16e2(%rip), %rdi      # 0x3a90
leaq 0x1353(%rip), %rsi      # 0x3708
movl $0x133, %edx            # imm = 0x133
leaq 0x179b(%rip), %rcx      # 0x3b5c
callq 0x10a0
movq 0x3eeb(%rip), %rax      # 0x62b8
movq 0x3ee4(%rip), %rcx      # 0x62b8
movl 0x4(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x10b0
movl -0x8(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0xc(%rbp), %ecx
movq 0x3ea3(%rip), %rax      # 0x62b8
movl %ecx, 0x4(%rax)
movl -0x10(%rbp), %ecx
movq 0x3e96(%rip), %rax      # 0x62b8
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0xc, %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/darwin-on-arm[P]darwin-sdk/image3maker/image3maker.c
// Function: image3_reserve_ecid
static void *image3_reserve_ecid(uint32_t tag, uint32_t length)
{
    uint32_t size, len;
    Image3Header* header;
    
    len = length + 20;
    size = image3core.rootHeader->header.size + len;
    
    assert((image3core.rootHeader = realloc(image3core.rootHeader, size)));
    
    header = (Image3Header*)add_ptr2(image3core.rootHeader, image3core.rootHeader->header.size);
    bzero((void*)(header), len);

    header->dataSize = length;
    header->size = len;
    header->magic = tag;
    
    image3core.rootHeader->header.size = size;
    image3core.rootHeader->header.dataSize += len;
    
    return (void*)(header + 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x8(%rbp), %eax
addl $0x14, %eax
movl %eax, -0x10(%rbp)
movq 0x3e5a(%rip), %rax      # 0x62b8
movl 0x4(%rax), %eax
addl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movq 0x3e4a(%rip), %rdi      # 0x62b8
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x1120
movq %rax, 0x3e39(%rip)      # 0x62b8
cmpq $0x0, %rax
je 0x2487
jmp 0x24a6
leaq 0x1602(%rip), %rdi      # 0x3a90
leaq 0x1273(%rip), %rsi      # 0x3708
movl $0x14c, %edx            # imm = 0x14C
leaq 0x16e8(%rip), %rcx      # 0x3b89
callq 0x10a0
movq 0x3e0b(%rip), %rax      # 0x62b8
movq 0x3e04(%rip), %rcx      # 0x62b8
movl 0x4(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x10b0
movl -0x8(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0xc(%rbp), %ecx
movq 0x3dc3(%rip), %rax      # 0x62b8
movl %ecx, 0x4(%rax)
movl -0x10(%rbp), %ecx
movq 0x3db6(%rip), %rax      # 0x62b8
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0xc, %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justinmeiners[P]text2image/text2image.c
// Function: read_font_file
unsigned char* read_font_file(const char* path)
{
    FILE* font_file = fopen("font/cmunrm.ttf", "rb");

    if (!font_file)
    {
        fprintf(stderr, "cannot find font: %s\n", path);
        exit(1);
    }

    /* get length of file */
    fseek(font_file, 0, SEEK_END);
    size_t file_size = ftell(font_file);
    fseek(font_file, 0, SEEK_SET);
    
    /* allocate buffer*/
    unsigned char* font_buffer = malloc(file_size);

    if (!font_buffer)
    {
        fprintf(stderr, "allocation failed. out of memory?");
        exit(2);
    }
   
    /* read into buffer */ 
    fread(font_buffer, file_size, 1, font_file);
    fclose(font_file);
    return font_buffer;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
leaq 0xadb5(%rip), %rdi      # 0x19935
leaq 0xadbe(%rip), %rsi      # 0x19945
callq 0x1190
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0xebc0
movq 0xe458(%rip), %rax      # 0x1cff8
movq (%rax), %rdi
movq 0x20(%rsp), %rdx
leaq 0xad99(%rip), %rsi      # 0x19948
movb $0x0, %al
callq 0x1110
movl $0x1, %edi
callq 0x11d0
movq 0x18(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x1160
movq 0x18(%rsp), %rdi
callq 0x1120
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x1160
movq 0x10(%rsp), %rdi
callq 0x1150
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0xec2b
movq 0xe3e8(%rip), %rax      # 0x1cff8
movq (%rax), %rdi
leaq 0xad44(%rip), %rsi      # 0x1995e
movb $0x0, %al
callq 0x1110
movl $0x2, %edi
callq 0x11d0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rcx
movl $0x1, %edx
callq 0x1040
movq 0x18(%rsp), %rdi
callq 0x1060
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justinmeiners[P]text2image/text2image.c
// Function: show_usage
void show_usage(int help)
{
    const char* usage = "tex2image --out OUTPUT --height HEIGHT --font TTF --invert\n";

    if (help)
    {
        fputs(usage, stdout);
        fputs("--out\tspecify an output file instead of stdout.\n", stdout);
        fputs("--height\tspecify height of text in pixels.\n", stdout);
        fputs("--font\tprovide an alternative font file in TrueType format. (.ttf)\n", stdout);
        fputs("--invert\tdraw white text on black background.\n", stdout);
        fputs("--help\tshow the help text.\n", stdout);
        exit(0);
    }
    else
    {
        fputs(usage, stderr);
        exit(1);
    }
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
leaq 0xad11(%rip), %rax      # 0x19980
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x14(%rsp)
je 0xed08
movq 0x8(%rsp), %rdi
movq 0xe345(%rip), %rax      # 0x1cfd0
movq (%rax), %rsi
callq 0x1090
movq 0xe336(%rip), %rax      # 0x1cfd0
movq (%rax), %rsi
leaq 0xad18(%rip), %rdi      # 0x199bc
callq 0x1090
movq 0xe320(%rip), %rax      # 0x1cfd0
movq (%rax), %rsi
leaq 0xad33(%rip), %rdi      # 0x199ed
callq 0x1090
movq 0xe30a(%rip), %rax      # 0x1cfd0
movq (%rax), %rsi
leaq 0xad49(%rip), %rdi      # 0x19a19
callq 0x1090
movq 0xe2f4(%rip), %rax      # 0x1cfd0
movq (%rax), %rsi
leaq 0xad77(%rip), %rdi      # 0x19a5d
callq 0x1090
movq 0xe2de(%rip), %rax      # 0x1cfd0
movq (%rax), %rsi
leaq 0xad90(%rip), %rdi      # 0x19a8c
callq 0x1090
xorl %edi, %edi
callq 0x11d0
movq 0x8(%rsp), %rdi
movq 0xe2e4(%rip), %rax      # 0x1cff8
movq (%rax), %rsi
callq 0x1090
movl $0x1, %edi
callq 0x11d0
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/eric-lo[P]3150/5-Signal/suicide.c
// Function: main
int main(void) {
	int i, sum, count = 0;;
	srand(time(NULL));
	while(1) {
		sum = 0;
		for(i = 0; i < 3; i++)
			sum += (rand() % 6) + 1;
		if(sum == 18) {
			printf("count = %d\n", count);
			kill(getpid(), SIGTERM);
		}
		else
			count++;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl $0x0, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x1070
movl %eax, %edi
callq 0x1050
movl $0x0, -0xc(%rbp)
movl $0x0, -0x8(%rbp)
cmpl $0x3, -0x8(%rbp)
jge 0x11ed
callq 0x1080
movl $0x6, %ecx
cltd
idivl %ecx
movl %edx, %eax
addl $0x1, %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x11c4
cmpl $0x12, -0xc(%rbp)
jne 0x1217
movl -0x10(%rbp), %esi
leaq 0xe07(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1040
callq 0x1030
movl %eax, %edi
movl $0xf, %esi
callq 0x1060
jmp 0x1220
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x11b6
// File: /workspace/github_c_makefile_star2_O0/zpole[P]IICV/src/generic-driver.h
// Function: vl_file_meta_parse
static int
vl_file_meta_parse (VlFileMeta * self, char const * optarg)
{
  vl_size q ;
  self->active = 1 ;

  if (optarg) {
    int protocol ;
    char const * arg = vl_string_parse_protocol (optarg, &protocol) ;

    /* parse the (optional) protocol part */
    switch (protocol) {
    case VL_PROT_UNKNOWN :
      return VL_ERR_BAD_ARG  ;

    case VL_PROT_ASCII  :
    case VL_PROT_BINARY :
      self->protocol = protocol ;
      break ;

    case VL_PROT_NONE :
      break ;
    }

    if (vl_string_length (arg) > 0) {
      q = vl_string_copy
        (self->pattern, sizeof (self->pattern), arg) ;

      if (q >= sizeof(self->pattern)) {
        return VL_ERR_OVERFLOW ;
      }
    }

  }
  return VL_ERR_OK ;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movl $0x1, (%rax)
cmpq $0x0, 0x20(%rsp)
je 0x2b12
movq 0x20(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0x1180
movq %rax, 0x8(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x4(%rsp)
subl $-0x1, %eax
je 0x2aaf
jmp 0x2a98
movl 0x4(%rsp), %eax
testl %eax, %eax
je 0x2aca
jmp 0x2aa2
movl 0x4(%rsp), %eax
decl %eax
subl $0x2, %eax
jb 0x2ab9
jmp 0x2acc
movl $0x3, 0x34(%rsp)
jmp 0x2b1a
movl 0x14(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x404(%rax)
jmp 0x2acc
jmp 0x2acc
movq 0x8(%rsp), %rdi
callq 0x10d0
cmpq $0x0, %rax
jbe 0x2b10
movq 0x28(%rsp), %rdi
addq $0x4, %rdi
movq 0x8(%rsp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x11d0
movq %rax, 0x18(%rsp)
cmpq $0x400, 0x18(%rsp)      # imm = 0x400
jb 0x2b0e
movl $0x1, 0x34(%rsp)
jmp 0x2b1a
jmp 0x2b10
jmp 0x2b12
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zpole[P]IICV/src/generic-driver.h
// Function: vl_file_meta_open
static int
vl_file_meta_open (VlFileMeta * self, char const * basename, char const * mode)
{
  vl_size q ;

  if (! self->active) {
    return VL_ERR_OK ;
  }

  q = vl_string_replace_wildcard (self->name,
                                  sizeof(self->name),
                                  self -> pattern,
                                  '%', '\0',
                                  basename) ;

  if (q >= sizeof(self->name)) {
    return vl_set_last_error (VL_ERR_OVERFLOW, NULL) ;
  }

  if (self->active) {
    self->file = fopen (self->name, mode) ;
    if (! self->file) {
      return vl_set_last_error(VL_ERR_IO, NULL) ;
    }
  }
  return 0 ;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x2b5a
movl $0x0, 0x24(%rsp)
jmp 0x2c08
movq 0x18(%rsp), %rdi
addq $0x408, %rdi            # imm = 0x408
movq 0x18(%rsp), %rdx
addq $0x4, %rdx
movq 0x10(%rsp), %r9
movl $0x400, %esi            # imm = 0x400
movl $0x25, %ecx
xorl %r8d, %r8d
callq 0x1170
movq %rax, (%rsp)
cmpq $0x400, (%rsp)          # imm = 0x400
jb 0x2baa
movl $0x1, %edi
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0x1050
movl %eax, 0x24(%rsp)
jmp 0x2c08
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
je 0x2c00
movq 0x18(%rsp), %rdi
addq $0x408, %rdi            # imm = 0x408
movq 0x8(%rsp), %rsi
callq 0x11a0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x808(%rax)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x808(%rax)
jne 0x2bfe
movl $0x4, %edi
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0x1050
movl %eax, 0x24(%rsp)
jmp 0x2c08
jmp 0x2c00
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/liuhaotian[P]xmppsh/xmppsh.c
// Function: ping_handler
int ping_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * const userdata)
{
	//printf("get the ping\n");
	xmpp_stanza_t *reply;
	xmpp_ctx_t *ctx = (xmpp_ctx_t*)userdata;

	reply = xmpp_stanza_new(ctx);
	xmpp_stanza_set_name(reply, "iq");
	xmpp_stanza_set_type(reply, "result");
	xmpp_stanza_set_id(reply, xmpp_stanza_get_id(stanza));
	xmpp_stanza_set_attribute(reply, "to", xmpp_stanza_get_attribute(stanza, "from"));

	xmpp_send(conn, reply);
	xmpp_stanza_release(reply);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x11cb0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x118d2(%rip), %rsi     # 0x14026
callq 0x12550
movq -0x20(%rbp), %rdi
leaq 0x118c5(%rip), %rsi     # 0x14029
callq 0x12e20
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x12a20
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x12df0
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x11ba2(%rip), %rsi     # 0x1433b
callq 0x12e50
movq -0x30(%rbp), %rdi
movq %rax, %rdx
leaq 0x11884(%rip), %rsi     # 0x14030
callq 0x12760
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x6290
movq -0x20(%rbp), %rdi
callq 0x11f80
movl $0x1, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/liuhaotian[P]xmppsh/xmppsh.c
// Function: conn_handler
void conn_handler(xmpp_conn_t * const conn, const xmpp_conn_event_t status, 
		  const int error, xmpp_stream_error_t * const stream_error,
		  void * const userdata)
{
    xmpp_ctx_t *ctx = (xmpp_ctx_t *)userdata;

    if (status == XMPP_CONN_CONNECT) {
	xmpp_stanza_t* pres;
	fprintf(stderr, "DEBUG: connected\n");
	xmpp_handler_add(conn,version_handler, "jabber:iq:version", "iq", NULL, ctx);
	xmpp_handler_add(conn,message_handler, NULL, "message", NULL, ctx);
	xmpp_handler_add(conn,ping_handler, "urn:xmpp:ping", "iq", NULL, ctx);
	
	/* Send initial <presence/> so that we appear online to contacts */
	pres = xmpp_stanza_new(ctx);
	xmpp_stanza_set_name(pres, "presence");
	xmpp_send(conn, pres);
	xmpp_stanza_release(pres);
    }
    else {
	fprintf(stderr, "DEBUG: disconnected\n");
	xmpp_stop(ctx);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x2dfa
movq 0x162a5(%rip), %rax     # 0x18fe8
movq (%rax), %rdi
leaq 0x113aa(%rip), %rsi     # 0x140f7
movb $0x0, %al
callq 0x20d0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %r9
leaq -0x813(%rip), %rsi      # 0x2550
leaq 0x1139f(%rip), %rdx     # 0x14109
leaq 0x112b5(%rip), %rcx     # 0x14026
xorl %eax, %eax
movl %eax, %r8d
callq 0x82e0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %r9
leaq -0x5aa(%rip), %rsi      # 0x27e0
xorl %eax, %eax
movl %eax, %r8d
leaq 0x11303(%rip), %rcx     # 0x14099
movq %r8, %rdx
callq 0x82e0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %r9
leaq -0x68d(%rip), %rsi      # 0x2720
leaq 0x11367(%rip), %rdx     # 0x1411b
leaq 0x1126b(%rip), %rcx     # 0x14026
xorl %eax, %eax
movl %eax, %r8d
callq 0x82e0
movq -0x28(%rbp), %rdi
callq 0x11cb0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq 0x1134c(%rip), %rsi     # 0x14129
callq 0x12550
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x6290
movq -0x30(%rbp), %rdi
callq 0x11f80
jmp 0x2e1b
movq 0x161e7(%rip), %rax     # 0x18fe8
movq (%rax), %rdi
leaq 0x11327(%rip), %rsi     # 0x14132
movb $0x0, %al
callq 0x20d0
movq -0x28(%rbp), %rdi
callq 0x7670
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: auth_handle_open
void auth_handle_open(xmpp_conn_t * const conn)
{
    /* reset all timed handlers */
    handler_reset_timed(conn, 0);

    /* setup handler for stream:error */
    handler_add(conn, _handle_error,
		NULL, "stream:error", NULL, NULL);

    /* setup handlers for incoming <stream:features> */
    handler_add(conn, _handle_features,
		NULL, "stream:features", NULL, NULL);
    handler_add_timed(conn, _handle_missing_features,
		      FEATURES_TIMEOUT, NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x7ce0
movq -0x8(%rbp), %rdi
leaq 0x5e(%rip), %rsi        # 0x3200
xorl %eax, %eax
movl %eax, %r9d
leaq 0x110c2(%rip), %rcx     # 0x14270
movq %r9, %rdx
movq %r9, %r8
callq 0x85a0
movq -0x8(%rbp), %rdi
leaq 0x5cc(%rip), %rsi       # 0x3790
xorl %eax, %eax
movl %eax, %r9d
leaq 0x110ad(%rip), %rcx     # 0x1427d
movq %r9, %rdx
movq %r9, %r8
callq 0x85a0
movq -0x8(%rbp), %rdi
leaq 0x74a(%rip), %rsi       # 0x3930
movl $0x3a98, %edx           # imm = 0x3A98
xorl %eax, %eax
movl %eax, %ecx
callq 0x80c0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: make_starttls
static xmpp_stanza_t *_make_starttls(xmpp_conn_t * const conn)
{
    xmpp_stanza_t *starttls;

    /* build start stanza */
    starttls = xmpp_stanza_new(conn->ctx);
    if (starttls) {
	xmpp_stanza_set_name(starttls, "starttls");
	xmpp_stanza_set_ns(starttls, XMPP_NS_TLS);
    }
    
    return starttls;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x11cb0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x40f4
movq -0x10(%rbp), %rdi
leaq 0x1036e(%rip), %rsi     # 0x1444d
callq 0x12550
movq -0x10(%rbp), %rdi
leaq 0x10367(%rip), %rsi     # 0x14456
callq 0x12820
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: handle_proceedtls_default
static int _handle_proceedtls_default(xmpp_conn_t * const conn,
			      xmpp_stanza_t * const stanza,
			      void * const userdata)
{
    char *name;
    name = xmpp_stanza_get_name(stanza);
    xmpp_debug(conn->ctx, "xmpp", 
	"handle proceedtls called for %s", name);

    if (strcmp(name, "proceed") == 0) {
        xmpp_debug(conn->ctx, "xmpp", "proceeding with TLS");

	conn->tls = tls_new(conn->ctx, conn->sock);

	if (!tls_start(conn->tls))
	{
	    xmpp_debug(conn->ctx, "xmpp", "Couldn't start TLS! error %d", tls_error(conn->tls));
	    tls_free(conn->tls);
	    conn->tls = NULL;
	    conn->tls_failed = 1;
	
	    /* failed tls spoils the connection, so disconnect */
	    xmpp_disconnect(conn);
	}
	else
	{
            conn->secured = 1;
            conn_prepare_reset(conn, auth_handle_open);

	    conn_open_stream(conn);
	}
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x125d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rcx
leaq 0xff15(%rip), %rsi      # 0x14049
leaq 0x1040e(%rip), %rdx     # 0x14549
movb $0x0, %al
callq 0x6a80
movq -0x20(%rbp), %rdi
leaq 0x1041c(%rip), %rsi     # 0x14569
callq 0x22e0
cmpl $0x0, %eax
jne 0x4232
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xfedf(%rip), %rsi      # 0x14049
leaq 0x10400(%rip), %rdx     # 0x14571
movb $0x0, %al
callq 0x6a80
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x30(%rax), %esi
callq 0x13100
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x13280
cmpl $0x0, %eax
jne 0x420c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x130e0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
leaq 0xfe7a(%rip), %rsi      # 0x14049
leaq 0x103af(%rip), %rdx     # 0x14585
movb $0x0, %al
callq 0x6a80
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x13220
movq -0x8(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x44(%rax)
movq -0x8(%rbp), %rdi
callq 0x5f10
jmp 0x4230
movq -0x8(%rbp), %rax
movl $0x1, 0x4c(%rax)
movq -0x8(%rbp), %rdi
leaq -0x10a2(%rip), %rsi     # 0x3180
callq 0x5600
movq -0x8(%rbp), %rdi
callq 0x6310
jmp 0x4232
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: make_sasl_auth
static xmpp_stanza_t *_make_sasl_auth(xmpp_conn_t * const conn,
				 const char * const mechanism)
{
    xmpp_stanza_t *auth;

    /* build auth stanza */
    auth = xmpp_stanza_new(conn->ctx);
    if (auth) {
	xmpp_stanza_set_name(auth, "auth");
	xmpp_stanza_set_ns(auth, XMPP_NS_SASL);
	xmpp_stanza_set_attribute(auth, "mechanism", mechanism);
    }
    
    return auth;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x11cb0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x429c
movq -0x18(%rbp), %rdi
leaq 0x1029a(%rip), %rsi     # 0x1450d
callq 0x12550
movq -0x18(%rbp), %rdi
leaq 0x101fe(%rip), %rsi     # 0x14481
callq 0x12820
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x1020b(%rip), %rsi     # 0x144a2
callq 0x12760
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: handle_sasl_result
static int _handle_sasl_result(xmpp_conn_t * const conn,
			       xmpp_stanza_t * const stanza,
			       void * const userdata)
{
    char *name;

    name = xmpp_stanza_get_name(stanza);

    /* the server should send a <success> or <failure> stanza */
    if (strcmp(name, "failure") == 0) {
	xmpp_debug(conn->ctx, "xmpp", "SASL %s auth failed", 
		   (char *)userdata);
	
	/* fall back to next auth method */
	_auth(conn);
    } else if (strcmp(name, "success") == 0) {
	/* SASL PLAIN auth successful, we need to restart the stream */
	xmpp_debug(conn->ctx, "xmpp", "SASL %s auth successful", 
		   (char *)userdata);

	/* reset parser */
	conn_prepare_reset(conn, _handle_open_sasl);

	/* send stream tag */
	conn_open_stream(conn);
    } else {
	/* got unexpected reply */
	xmpp_error(conn->ctx, "xmpp", "Got unexpected reply to SASL %s"\
		   "authentication.", (char *)userdata);
	xmpp_disconnect(conn);
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x125d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x102c6(%rip), %rsi     # 0x145a2
callq 0x22e0
cmpl $0x0, %eax
jne 0x4312
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rcx
leaq 0xfd50(%rip), %rsi      # 0x14049
leaq 0x102aa(%rip), %rdx     # 0x145aa
movb $0x0, %al
callq 0x6a80
movq -0x8(%rbp), %rdi
callq 0x3970
jmp 0x438f
movq -0x20(%rbp), %rdi
leaq 0x102a1(%rip), %rsi     # 0x145be
callq 0x22e0
cmpl $0x0, %eax
jne 0x4363
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rcx
leaq 0xfd0f(%rip), %rsi      # 0x14049
leaq 0x10285(%rip), %rdx     # 0x145c6
movb $0x0, %al
callq 0x6a80
movq -0x8(%rbp), %rdi
leaq 0x41d(%rip), %rsi       # 0x4770
callq 0x5600
movq -0x8(%rbp), %rdi
callq 0x6310
jmp 0x438d
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rcx
leaq 0xfcd3(%rip), %rsi      # 0x14049
leaq 0x10261(%rip), %rdx     # 0x145de
movb $0x0, %al
callq 0x68a0
movq -0x8(%rbp), %rdi
callq 0x5f10
jmp 0x438f
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: get_authid
static char *_get_authid(xmpp_conn_t * const conn)
{
    char *authid = NULL;

    if (conn->type == XMPP_CLIENT) {
	/* authid is the node portion of jid */
	if (!conn->jid) return NULL;
	authid = xmpp_jid_node(conn->ctx, conn->jid);
    }

    return authid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jne 0x45bc
movq -0x10(%rbp), %rax
cmpq $0x0, 0x78(%rax)
jne 0x45a3
movq $0x0, -0x8(%rbp)
jmp 0x45c4
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rsi
callq 0x8ed0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: handle_legacy
static int _handle_legacy(xmpp_conn_t * const conn,
			  xmpp_stanza_t * const stanza,
			  void * const userdata)
{
    char *type, *name;

    /* delete missing handler */
    xmpp_timed_handler_delete(conn, _handle_missing_legacy);

    /* server responded to legacy auth request */
    type = xmpp_stanza_get_type(stanza);
    name = xmpp_stanza_get_name(stanza);
    if (!type || strcmp(name, "iq") != 0) {
	xmpp_error(conn->ctx, "xmpp", "Server sent us an unexpected response "\
		   "to legacy authentication request.");
	xmpp_disconnect(conn);
    } else if (strcmp(type, "error") == 0) {
	/* legacy client auth failed, no more fallbacks */
	xmpp_error(conn->ctx, "xmpp", "Legacy client authentication failed.");
	xmpp_disconnect(conn);
    } else if (strcmp(type, "result") == 0) {
	/* auth succeeded */
	xmpp_debug(conn->ctx, "xmpp", "Legacy auth succeeded.");

	conn->authenticated = 1;
	conn->conn_handler(conn, XMPP_CONN_CONNECT, 0, NULL, conn->userdata);
    } else {
	xmpp_error(conn->ctx, "xmpp", "Server sent us a legacy authentication "\
		   "response with a bad type.");
	xmpp_disconnect(conn);
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x141(%rip), %rsi       # 0x4730
callq 0x7c20
movq -0x10(%rbp), %rdi
callq 0x12ae0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x125d0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x462a
movq -0x28(%rbp), %rdi
leaq 0xfa06(%rip), %rsi      # 0x14026
callq 0x22e0
cmpl $0x0, %eax
je 0x4655
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xfa10(%rip), %rsi      # 0x14049
leaq 0x1020e(%rip), %rdx     # 0x1484e
movb $0x0, %al
callq 0x68a0
movq -0x8(%rbp), %rdi
callq 0x5f10
jmp 0x4723
movq -0x20(%rbp), %rdi
leaq 0x105c5(%rip), %rsi     # 0x14c25
callq 0x22e0
cmpl $0x0, %eax
jne 0x4695
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xf9d0(%rip), %rsi      # 0x14049
leaq 0x10216(%rip), %rdx     # 0x14896
movb $0x0, %al
callq 0x68a0
movq -0x8(%rbp), %rdi
callq 0x5f10
jmp 0x4721
movq -0x20(%rbp), %rdi
leaq 0xf989(%rip), %rsi      # 0x14029
callq 0x22e0
cmpl $0x0, %eax
jne 0x46f9
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xf990(%rip), %rsi      # 0x14049
leaq 0x101fb(%rip), %rdx     # 0x148bb
movb $0x0, %al
callq 0x6a80
movq -0x8(%rbp), %rax
movl $0x1, 0xd8(%rax)
movq -0x8(%rbp), %rax
movq 0xe0(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0xe8(%rcx), %r8
xorl %edx, %edx
xorl %ecx, %ecx
movl %edx, %esi
callq *%rax
jmp 0x471f
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xf941(%rip), %rsi      # 0x14049
leaq 0x101c3(%rip), %rdx     # 0x148d2
movb $0x0, %al
callq 0x68a0
movq -0x8(%rbp), %rdi
callq 0x5f10
jmp 0x4721
jmp 0x4723
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: handle_session
static int _handle_session(xmpp_conn_t * const conn,
			   xmpp_stanza_t * const stanza,
			   void * const userdata)
{
    char *type;

    /* delete missing session handler */
    xmpp_timed_handler_delete(conn, _handle_missing_session);

    /* server has replied to the session request */
    type = xmpp_stanza_get_type(stanza);
    if (type && strcmp(type, "error") == 0) {
	xmpp_error(conn->ctx, "xmpp", "Session establishment failed.");
	xmpp_disconnect(conn);
    } else if (type && strcmp(type, "result") == 0) {
	xmpp_debug(conn->ctx, "xmpp", "Session establishment successful.");

	conn->authenticated = 1;
	
	/* call connection handler */
	conn->conn_handler(conn, XMPP_CONN_CONNECT, 0, NULL, conn->userdata);
    } else {
	xmpp_error(conn->ctx, "xmpp", "Server sent malformed session reply.");
	xmpp_disconnect(conn);
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x101(%rip), %rsi       # 0x4f30
callq 0x7c20
movq -0x10(%rbp), %rdi
callq 0x12ae0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x4e88
movq -0x20(%rbp), %rdi
leaq 0xfdd2(%rip), %rsi      # 0x14c25
callq 0x22e0
cmpl $0x0, %eax
jne 0x4e88
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xf1dd(%rip), %rsi      # 0x14049
leaq 0xf88d(%rip), %rdx      # 0x14700
movb $0x0, %al
callq 0x68a0
movq -0x8(%rbp), %rdi
callq 0x5f10
jmp 0x4f1b
cmpq $0x0, -0x20(%rbp)
je 0x4ef3
movq -0x20(%rbp), %rdi
leaq 0xf18f(%rip), %rsi      # 0x14029
callq 0x22e0
cmpl $0x0, %eax
jne 0x4ef3
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xf196(%rip), %rsi      # 0x14049
leaq 0xf864(%rip), %rdx      # 0x1471e
movb $0x0, %al
callq 0x6a80
movq -0x8(%rbp), %rax
movl $0x1, 0xd8(%rax)
movq -0x8(%rbp), %rax
movq 0xe0(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0xe8(%rcx), %r8
xorl %edx, %edx
xorl %ecx, %ecx
movl %edx, %esi
callq *%rax
jmp 0x4f19
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xf147(%rip), %rsi      # 0x14049
leaq 0xf837(%rip), %rdx      # 0x14740
movb $0x0, %al
callq 0x68a0
movq -0x8(%rbp), %rdi
callq 0x5f10
jmp 0x4f1b
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: handle_digestmd5_rspauth
static int _handle_digestmd5_rspauth(xmpp_conn_t * const conn,
			      xmpp_stanza_t * const stanza,
			      void * const userdata)
{
    xmpp_stanza_t *auth;
    char *name;

    name = xmpp_stanza_get_name(stanza);
    xmpp_debug(conn->ctx, "xmpp",
	"handle digest-md5 (rspauth) called for %s", name);


    if (strcmp(name, "challenge") == 0) {
	/* assume it's an rspauth response */
	auth = xmpp_stanza_new(conn->ctx);
	if (!auth) {
	    disconnect_mem_error(conn);
	    return 0;
	}	
	xmpp_stanza_set_name(auth, "response");
	xmpp_stanza_set_ns(auth, XMPP_NS_SASL);
	xmpp_send(conn, auth);
	xmpp_stanza_release(auth);
    } else {
	return _handle_sasl_result(conn, stanza, "DIGEST-MD5");
    }

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x125d0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x30(%rbp), %rcx
leaq 0xf0a5(%rip), %rsi      # 0x14049
leaq 0xf879(%rip), %rdx      # 0x14824
movb $0x0, %al
callq 0x6a80
movq -0x30(%rbp), %rdi
leaq 0xfdf4(%rip), %rsi      # 0x14db1
callq 0x22e0
cmpl $0x0, %eax
jne 0x5029
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x11cb0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x4ff1
movq -0x10(%rbp), %rdi
callq 0x13650
movl $0x0, -0x4(%rbp)
jmp 0x5049
movq -0x28(%rbp), %rdi
leaq 0xf81f(%rip), %rsi      # 0x1481b
callq 0x12550
movq -0x28(%rbp), %rdi
leaq 0xf475(%rip), %rsi      # 0x14481
callq 0x12820
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x6290
movq -0x28(%rbp), %rdi
callq 0x11f80
jmp 0x5042
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq 0xf47a(%rip), %rdx      # 0x144b2
callq 0x42b0
movl %eax, -0x4(%rbp)
jmp 0x5049
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)