LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/iniconf.c
// Function: ini_insert_val
int ini_insert_val(ini_sec_t* sec, const char* key, const char* val)
{
    if (!sec || !key || !val)
        return -1 ;

    int klen = strlen(key);
    char* k = (char*)malloc(klen + 1);
    strcpy(k, key);

    int vlen = strlen(val);
    char* v = (char*)malloc(vlen + 1);
    strcpy(v, val);

    if(dict_add(sec, k, klen, v, vlen) == DICT_OK) {
        return 0;
    }

    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4a49
cmpq $0x0, -0x18(%rbp)
je 0x4a49
cmpq $0x0, -0x20(%rbp)
jne 0x4a55
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ad8
movq -0x18(%rbp), %rdi
callq 0x2120
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x22b0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2090
movq -0x20(%rbp), %rdi
callq 0x2120
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x22b0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2090
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x24(%rbp), %edx
movq -0x40(%rbp), %rcx
movl -0x34(%rbp), %r8d
callq 0x2ac0
cmpl $0x0, %eax
jne 0x4ad1
movl $0x0, -0x4(%rbp)
jmp 0x4ad8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/iniconf.c
// Function: ini_save
int ini_save(ini_conf_t* ini, const char* file)
{
    if (!ini || !file)
        return -1;

    int fd = open(file, O_RDWR | O_CREAT,
            S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
    if (fd == -1)
        return -1;

    dict_iterator* it = dict_get_iterator(ini);
    dict_entry* de = NULL;
    while((de = dict_next(it)) != NULL) {
        const char* k = (const char*)dict_get_entry_key(de);
        ini_sec_t* v = (ini_sec_t*)dict_get_entry_val(de);


        write(fd, "[", 1);
        write(fd, k, strlen(k));
        write(fd, "]", 1);
        write(fd, "\n", 1);

        int ret = ini_save_sec(v, fd);
        if(ret < 0){
            close(fd);
            return -1;
        }
    }
    dict_release_iterator(it);
    close(fd);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4b0e
cmpq $0x0, -0x18(%rbp)
jne 0x4b1a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c2d
movq -0x18(%rbp), %rdi
movl $0x42, %esi
movl $0x1b4, %edx            # imm = 0x1B4
movb $0x0, %al
callq 0x22f0
movl %eax, -0x1c(%rbp)
cmpl $-0x1, -0x1c(%rbp)
jne 0x4b44
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c2d
movq -0x10(%rbp), %rdi
callq 0x3280
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3320
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x4c15
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
movl -0x1c(%rbp), %edi
leaq 0x55ac(%rip), %rsi      # 0xa13e
movl $0x1, %edx
callq 0x20e0
movl -0x1c(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rdi
callq 0x2120
movl -0x54(%rbp), %edi
movq -0x50(%rbp), %rsi
movq %rax, %rdx
callq 0x20e0
movl -0x1c(%rbp), %edi
leaq 0x560d(%rip), %rsi      # 0xa1d9
movl $0x1, %edx
callq 0x20e0
movl -0x1c(%rbp), %edi
leaq 0x59da(%rip), %rsi      # 0xa5ba
movl $0x1, %edx
callq 0x20e0
movq -0x40(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x4c40
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jge 0x4c10
movl -0x1c(%rbp), %edi
callq 0x21b0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c2d
jmp 0x4b59
movq -0x28(%rbp), %rdi
callq 0x3460
movl -0x1c(%rbp), %edi
callq 0x21b0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/iniconf.c
// Function: ini_save_sec
static int ini_save_sec(ini_sec_t* sec, int fd)
{
    if (!sec || fd < 0)
        return -1;

    dict_iterator* it = dict_get_iterator(sec);
    dict_entry* de = NULL;
    while((de = dict_next(it)) != NULL) {
        const char* k = (const char*)dict_get_entry_key(de);
        const char* v = (const char*)dict_get_entry_val(de);


        write(fd, k, strlen(k));
        write(fd, "=", 1);
        write(fd, v, strlen(v));
        write(fd, "\n", 1);
    }
    dict_release_iterator(it);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4c5c
cmpl $0x0, -0x14(%rbp)
jge 0x4c68
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4d35
movq -0x10(%rbp), %rdi
callq 0x3280
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3320
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x4d25
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rdi
callq 0x2120
movl -0x54(%rbp), %edi
movq -0x50(%rbp), %rsi
movq %rax, %rdx
callq 0x20e0
movl -0x14(%rbp), %edi
leaq 0x546a(%rip), %rsi      # 0xa146
movl $0x1, %edx
callq 0x20e0
movl -0x14(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x2120
movl -0x44(%rbp), %edi
movq -0x40(%rbp), %rsi
movq %rax, %rdx
callq 0x20e0
movl -0x14(%rbp), %edi
leaq 0x58a4(%rip), %rsi      # 0xa5ba
movl $0x1, %edx
callq 0x20e0
jmp 0x4c7d
movq -0x20(%rbp), %rdi
callq 0x3460
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/iniconf.c
// Function: ini_dump
int ini_dump(ini_conf_t* ini, char* buf, size_t len)
{
    if (!ini || !buf || !ini)
        return -1;
    size_t wlen = 0;
    dict_iterator* it = dict_get_iterator(ini);
    dict_entry* de = NULL;
    while((de = dict_next(it)) != NULL) {
        const char* k = (const char*)dict_get_entry_key(de);
        ini_sec_t* v = (ini_sec_t*)dict_get_entry_val(de);

        if(wlen >= len) return -1;

        wlen += snprintf(buf + wlen, len - wlen, "[%s]\n", k);
        if(wlen >= len) return -1;

        int ret = ini_save_sec_buf(v, buf + wlen, len - wlen);
        if(ret <= 0) return -1;
        wlen += ret;
    }
    dict_release_iterator(it);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4d69
cmpq $0x0, -0x18(%rbp)
je 0x4d69
cmpq $0x0, -0x10(%rbp)
jne 0x4d75
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4e62
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3280
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x3320
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x4e52
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x4dd7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4e62
movq -0x18(%rbp), %rdi
addq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
subq -0x28(%rbp), %rsi
movq -0x40(%rbp), %rcx
leaq 0x534e(%rip), %rdx      # 0xa140
movb $0x0, %al
callq 0x2160
cltq
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x4e16
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4e62
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
subq -0x28(%rbp), %rdx
callq 0x4e70
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
jg 0x4e41
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4e62
movslq -0x4c(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x4d92
movq -0x30(%rbp), %rdi
callq 0x3460
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/iniconf.c
// Function: ini_save_sec_buf
static int ini_save_sec_buf(ini_sec_t* sec, char* buf, size_t len)
{
    if (!sec || !buf || len <= 0)
        return -1;

    size_t wlen = 0;
    dict_iterator* it = dict_get_iterator(sec);
    dict_entry* de = NULL;
    while((de = dict_next(it)) != NULL) {
        const char* k = (const char*)dict_get_entry_key(de);
        const char* v = (const char*)dict_get_entry_val(de);

        wlen += snprintf(buf + wlen, len - wlen, "%s", k);
        if(wlen >= len) return -1;
        wlen += snprintf(buf + wlen, len - wlen, "=");
        if(wlen >= len) return -1;
        wlen += snprintf(buf + wlen, len - wlen, "%s", v);
        if(wlen >= len) return -1;
        wlen += snprintf(buf + wlen, len - wlen, "\n");
        if(wlen >= len) return -1;
    }
    dict_release_iterator(it);
    return wlen;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4e99
cmpq $0x0, -0x18(%rbp)
je 0x4e99
cmpq $0x0, -0x20(%rbp)
ja 0x4ea5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5000
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3280
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x3320
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x4ff0
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
addq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
subq -0x28(%rbp), %rsi
movq -0x40(%rbp), %rcx
leaq 0x52b2(%rip), %rdx      # 0xa1be
movb $0x0, %al
callq 0x2160
cltq
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x4f33
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5000
movq -0x18(%rbp), %rdi
addq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
subq -0x28(%rbp), %rsi
leaq 0x51fc(%rip), %rdx      # 0xa146
movb $0x0, %al
callq 0x2160
cltq
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x4f71
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5000
movq -0x18(%rbp), %rdi
addq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
subq -0x28(%rbp), %rsi
movq -0x48(%rbp), %rcx
leaq 0x5232(%rip), %rdx      # 0xa1be
movb $0x0, %al
callq 0x2160
cltq
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x4fb0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5000
movq -0x18(%rbp), %rdi
addq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
subq -0x28(%rbp), %rsi
leaq 0x55f3(%rip), %rdx      # 0xa5ba
movb $0x0, %al
callq 0x2160
cltq
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x4feb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5000
jmp 0x4ec2
movq -0x30(%rbp), %rdi
callq 0x3460
movq -0x28(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/iniconf.c
// Function: ini_delete_sec
int ini_delete_sec(ini_conf_t* ini, const char* key)
{
    if (!ini || !key)
        return -1 ;

    int len = strlen(key);

    dict* v = (dict*)dict_fetch_value(ini, key, len);

    if(!v) {
        return -1;
    }

    dict_release(v);
    dict_delete(ini, key, len);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x502e
cmpq $0x0, -0x18(%rbp)
jne 0x5037
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5087
movq -0x18(%rbp), %rdi
callq 0x2120
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x3230
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x5067
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5087
movq -0x28(%rbp), %rdi
callq 0x31e0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x2ed0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/iniconf.c
// Function: ini_get_sec
ini_sec_t* ini_get_sec(ini_conf_t* ini, const char* key)
{
    if (!ini || !key)
        return NULL ;

    int len = strlen(key);

    dict* v = (dict*)dict_fetch_value(ini, key, len);

    return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x50ae
cmpq $0x0, -0x18(%rbp)
jne 0x50b8
movq $0x0, -0x8(%rbp)
jmp 0x50e0
movq -0x18(%rbp), %rdi
callq 0x2120
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x3230
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/iniconf.c
// Function: ini_delete_val
int ini_delete_val(ini_sec_t* sec, const char* key)
{
    if (!sec || !key)
        return -1 ;

    int klen = strlen(key);


    if(dict_delete(sec, key, klen) == DICT_OK) {
        return 0;
    }

    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x510e
cmpq $0x0, -0x18(%rbp)
jne 0x5117
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5148
movq -0x18(%rbp), %rdi
callq 0x2120
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x2ed0
cmpl $0x0, %eax
jne 0x5141
movl $0x0, -0x4(%rbp)
jmp 0x5148
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/iniconf.c
// Function: ini_get_val
const char* ini_get_val(ini_sec_t* sec, const char* key)
{
    if (!sec || !key)
        return NULL ;

    int klen = strlen(key);

    char* v = (char*)dict_fetch_value(sec, key, klen);

    return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x517e
cmpq $0x0, -0x18(%rbp)
jne 0x5188
movq $0x0, -0x8(%rbp)
jmp 0x51b0
movq -0x18(%rbp), %rdi
callq 0x2120
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x3230
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_get_level
int log_get_level(const char* lvl)
{
    if (lvl) {
        if (strcasecmp(lvl, "all") == 0) {
            return LOG_ALL;
        } else if (strcasecmp(lvl, "debug") == 0) {
            return LOG_DEBUG;
        } else if (strcasecmp(lvl, "info") == 0) {
            return LOG_INFO;
        } else if (strcasecmp(lvl, "warn") == 0) {
            return LOG_WARN;
        } else if (strcasecmp(lvl, "error") == 0) {
            return LOG_ERROR;
        } else if (strcasecmp(lvl, "fatal") == 0) {
            return LOG_FATAL;
        } else if (strcasecmp(lvl, "off") == 0) {
            return LOG_OFF;
        }
    }

    return LOG_ALL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x52c0
movq -0x10(%rbp), %rdi
leaq 0x4f66(%rip), %rsi      # 0xa148
callq 0x2040
cmpl $0x0, %eax
jne 0x51f8
movl $0x0, -0x4(%rbp)
jmp 0x52c7
movq -0x10(%rbp), %rdi
leaq 0x4f49(%rip), %rsi      # 0xa14c
callq 0x2040
cmpl $0x0, %eax
jne 0x5219
movl $0x64, -0x4(%rbp)
jmp 0x52c7
movq -0x10(%rbp), %rdi
leaq 0x4f2e(%rip), %rsi      # 0xa152
callq 0x2040
cmpl $0x0, %eax
jne 0x523a
movl $0xc8, -0x4(%rbp)
jmp 0x52c7
movq -0x10(%rbp), %rdi
leaq 0x4f12(%rip), %rsi      # 0xa157
callq 0x2040
cmpl $0x0, %eax
jne 0x5258
movl $0x12c, -0x4(%rbp)      # imm = 0x12C
jmp 0x52c7
movq -0x10(%rbp), %rdi
leaq 0x4ef9(%rip), %rsi      # 0xa15c
callq 0x2040
cmpl $0x0, %eax
jne 0x5276
movl $0x190, -0x4(%rbp)      # imm = 0x190
jmp 0x52c7
movq -0x10(%rbp), %rdi
leaq 0x4ee1(%rip), %rsi      # 0xa162
callq 0x2040
cmpl $0x0, %eax
jne 0x5294
movl $0x1f4, -0x4(%rbp)      # imm = 0x1F4
jmp 0x52c7
movq -0x10(%rbp), %rdi
leaq 0x4ec9(%rip), %rsi      # 0xa168
callq 0x2040
cmpl $0x0, %eax
jne 0x52b2
movl $0x258, -0x4(%rbp)      # imm = 0x258
jmp 0x52c7
jmp 0x52b4
jmp 0x52b6
jmp 0x52b8
jmp 0x52ba
jmp 0x52bc
jmp 0x52be
jmp 0x52c0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_reg_callback
int log_reg_callback(int lvl,
        log_callback_int_t init_cb,
        log_callback_log_t log_cb,
        log_callback_uninit_t uninit_cb,
        log_callback_flush_t flush_cb,
        void* args)
{
    pthread_mutex_lock(&_ctx_mutex);

    struct call_back* cb = (struct call_back*)malloc(sizeof(struct call_back));
    if(cb){

        memset(cb, 0, sizeof(*cb));

        cb->level = lvl;//log_get_level(lvl);
        cb->init_cb_fun = init_cb;
        cb->log_cb_fun = log_cb;
        cb->uninit_cb_fun = uninit_cb;
        cb->flush_cb_fun = flush_cb;
        cb->args = args;
        cb->next = 0;

        if(_context.cb == 0){
            _context.cb = cb;
        }else{
            struct call_back* iter_cb = _context.cb;
            while(iter_cb->next){
                iter_cb = iter_cb->next;
            }
            iter_cb->next = cb;
        }
    }
    pthread_mutex_unlock(&_ctx_mutex);

    return LOG_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x8f0a(%rip), %rdi      # 0xe200
callq 0x23b0
movl $0x38, %edi
callq 0x22b0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x53be
movq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x2190
movl -0x4(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x30(%rax)
cmpq $0x0, 0x8eab(%rip)      # 0xe228
jne 0x538c
movq -0x38(%rbp), %rax
movq %rax, 0x8e9e(%rip)      # 0xe228
jmp 0x53bc
movq 0x8e95(%rip), %rax      # 0xe228
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x53b0
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x5397
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x30(%rax)
jmp 0x53be
leaq 0x8e3b(%rip), %rdi      # 0xe200
callq 0x22a0
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_start
int log_start()
{
    struct call_back* cb = _context.cb;
    while(cb){
        if (cb->init_cb_fun) {
            if (cb->init_cb_fun(cb->args) == LOG_FAIL) {
                fprintf(stderr, "fail to init call back!\n");
                return LOG_FAIL;
            }
        }
        cb = cb->next;
    }
    return LOG_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x8e39(%rip), %rax      # 0xe228
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x544d
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x543f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
cmpl $-0x1, %eax
jne 0x543d
movq 0x8bd5(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x4d3f(%rip), %rsi      # 0xa16c
movb $0x0, %al
callq 0x2220
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5454
jmp 0x543f
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x53f3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_flush
void log_flush()
{

    pthread_mutex_lock(&_ctx_mutex);
    struct call_back* cb = _context.cb;
    while (cb) {
        if (cb->flush_cb_fun) {
            if (cb->flush_cb_fun(cb->args) == LOG_FAIL) {
                fprintf(stderr, "fail to flush log message!\n");
            }
        }
        cb = cb->next;
    }
    pthread_mutex_unlock(&_ctx_mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x8d61(%rip), %rdi      # 0xe200
callq 0x23b0
movq 0x8d7d(%rip), %rax      # 0xe228
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x5500
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x54f2
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
cmpl $-0x1, %eax
jne 0x54f0
movq 0x8b19(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x4c9c(%rip), %rsi      # 0xa185
movb $0x0, %al
callq 0x2220
jmp 0x54f2
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x54af
leaq 0x8cf9(%rip), %rdi      # 0xe200
callq 0x22a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_debug
void log_debug(const char* format, ...)
{
    va_list ap;

    pthread_mutex_lock(&_ctx_mutex);
    va_start(ap, format);
    log_message(LOG_DEBUG, format, ap);
    va_end(ap);
    pthread_mutex_unlock(&_ctx_mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x5555
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq 0x8c7d(%rip), %rdi      # 0xe200
movq %rdi, -0xd8(%rbp)
callq 0x23b0
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq -0x8(%rbp), %rsi
movl $0x64, %edi
leaq -0x20(%rbp), %rdx
callq 0x55e0
movq -0xd8(%rbp), %rdi
callq 0x22a0
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_message
static void log_message(int lvl, const char* format, va_list ap)
{
    struct call_back* cb = _context.cb;

    int len = 0;
    char msg[LOG_DEFAULT_BUFFER_SIZE] = {0};

    while(cb){
        if (cb->log_cb_fun) {
            if (lvl >= cb->level) {
                if (!len) {
                    char head[LOG_DEFAULT_HEAD_SIZE] = { 0 };
                    log_get_header(lvl, head, LOG_DEFAULT_HEAD_SIZE);

                    char log[LOG_DEFAULT_BUFFER_SIZE] = { 0 };
                    vsnprintf(log, LOG_DEFAULT_BUFFER_SIZE, format, ap);

                    len = snprintf(msg, LOG_DEFAULT_BUFFER_SIZE, "%s%s", head, log);

                }

                if (cb->log_cb_fun(msg, len, cb->args) == LOG_FAIL) {
                    fprintf(stderr, "fail to log message!\n");
                }
            }
        }
        cb = cb->next;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20b0, %rsp           # imm = 0x20B0
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0x8c2b(%rip), %rax      # 0xe228
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
leaq -0x1030(%rbp), %rdi
xorl %esi, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x2190
cmpq $0x0, -0x20(%rbp)
je 0x5716
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x5705
movl -0x4(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jl 0x5703
cmpl $0x0, -0x24(%rbp)
jne 0x56c8
leaq -0x10b0(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x2190
movl -0x4(%rbp), %edi
leaq -0x10b0(%rbp), %rsi
movl $0x80, %edx
callq 0x63a0
leaq -0x20b0(%rbp), %rdi
xorl %esi, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x2190
leaq -0x20b0(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x1000, %esi           # imm = 0x1000
callq 0x20c0
leaq -0x1030(%rbp), %rdi
leaq -0x10b0(%rbp), %rcx
leaq -0x20b0(%rbp), %r8
movl $0x1000, %esi           # imm = 0x1000
leaq 0x4afe(%rip), %rdx      # 0xa1bc
movb $0x0, %al
callq 0x2160
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
leaq -0x1030(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x20(%rbp), %rcx
movq 0x28(%rcx), %rdx
callq *%rax
cmpl $-0x1, %eax
jne 0x5701
movq 0x8908(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x4ac7(%rip), %rsi      # 0xa1c1
movb $0x0, %al
callq 0x2220
jmp 0x5703
jmp 0x5705
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x561b
addq $0x20b0, %rsp           # imm = 0x20B0
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_info
void log_info (const char* format, ...)
{
    va_list ap;

    pthread_mutex_lock(&_ctx_mutex);
    va_start(ap, format);
    log_message(LOG_INFO, format, ap);
    va_end(ap);
    pthread_mutex_unlock(&_ctx_mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x5755
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq 0x8a7d(%rip), %rdi      # 0xe200
movq %rdi, -0xd8(%rbp)
callq 0x23b0
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq -0x8(%rbp), %rsi
movl $0xc8, %edi
leaq -0x20(%rbp), %rdx
callq 0x55e0
movq -0xd8(%rbp), %rdi
callq 0x22a0
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_warn
void log_warn (const char* format, ...)
{
    va_list ap;

    pthread_mutex_lock(&_ctx_mutex);
    va_start(ap, format);
    log_message(LOG_WARN, format, ap);
    va_end(ap);
    pthread_mutex_unlock(&_ctx_mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x5815
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq 0x89bd(%rip), %rdi      # 0xe200
movq %rdi, -0xd8(%rbp)
callq 0x23b0
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq -0x8(%rbp), %rsi
movl $0x12c, %edi            # imm = 0x12C
leaq -0x20(%rbp), %rdx
callq 0x55e0
movq -0xd8(%rbp), %rdi
callq 0x22a0
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_error
void log_error(const char* format, ...)
{
    va_list ap;

    pthread_mutex_lock(&_ctx_mutex);
    va_start(ap, format);
    log_message(LOG_ERROR, format, ap);
    va_end(ap);
    pthread_mutex_unlock(&_ctx_mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x58d5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq 0x88fd(%rip), %rdi      # 0xe200
movq %rdi, -0xd8(%rbp)
callq 0x23b0
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq -0x8(%rbp), %rsi
movl $0x190, %edi            # imm = 0x190
leaq -0x20(%rbp), %rdx
callq 0x55e0
movq -0xd8(%rbp), %rdi
callq 0x22a0
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_fatal
void log_fatal(const char* format, ...)
{
    va_list ap;

    pthread_mutex_lock(&_ctx_mutex);
    va_start(ap, format);
    log_message(LOG_FATAL, format, ap);
    va_end(ap);
    pthread_mutex_unlock(&_ctx_mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x5995
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq 0x883d(%rip), %rdi      # 0xe200
movq %rdi, -0xd8(%rbp)
callq 0x23b0
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq -0x8(%rbp), %rsi
movl $0x1f4, %edi            # imm = 0x1F4
leaq -0x20(%rbp), %rdx
callq 0x55e0
movq -0xd8(%rbp), %rdi
callq 0x22a0
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_finish
int log_finish()
{
    log_flush();

    pthread_mutex_lock(&_ctx_mutex);

    struct call_back* cb = _context.cb;
    while(cb){
        struct call_back* tmp_cb = cb;
        if (cb->uninit_cb_fun) {
            if (cb->uninit_cb_fun(cb->args) == LOG_FAIL) {
                fprintf(stderr, "fail to uninit call back!\n");
            }
        }
        cb = cb->next;
        free(tmp_cb);
    }

    pthread_mutex_unlock(&_ctx_mutex);

    return LOG_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x5490
leaq 0x87cc(%rip), %rdi      # 0xe200
callq 0x23b0
movq 0x87e8(%rip), %rax      # 0xe228
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x5aa6
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x5a8f
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
cmpl $-0x1, %eax
jne 0x5a8d
movq 0x857c(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x471b(%rip), %rsi      # 0xa1a1
movb $0x0, %al
callq 0x2220
jmp 0x5a8f
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2030
jmp 0x5a44
leaq 0x8753(%rip), %rdi      # 0xe200
callq 0x22a0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_initialize_default
int log_initialize_default(int con_lvl, int file_lvl,
        char* file_path, char* prefix, int buf_size,
        int sw_time, int sw_size)
{
    log_clearup();

    if (log_initialize_console(con_lvl) == LOG_FAIL) {
        return LOG_FAIL;
    }

    if (log_initialize_file(file_lvl, file_path,
            prefix, buf_size, sw_time, sw_size) == LOG_FAIL) {
        return LOG_FAIL;
    }

    return log_start();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl 0x10(%rbp), %eax
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
callq 0x5460
movl -0x8(%rbp), %edi
callq 0x5b40
cmpl $-0x1, %eax
jne 0x5afc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5b2d
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %r8d
movl 0x10(%rbp), %r9d
callq 0x5b70
cmpl $-0x1, %eax
jne 0x5b25
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5b2d
callq 0x53e0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_initialize_file
int log_initialize_file(int file_lvl,
        char* file_path, char* prefix, int buf_size,
        int sw_time, int sw_size)
{
    if(!file_path || !prefix || buf_size <= 0) {
        return LOG_FAIL;
    }

    memset(&_file_log_ctx, 0, sizeof(_file_log_ctx));

    strncpy(_file_log_ctx.path, file_path, sizeof(_file_log_ctx.path) - 1);
    if(_file_log_ctx.path[strlen(_file_log_ctx.path) - 1] == '/') {
        _file_log_ctx.path[strlen(_file_log_ctx.path) - 1] = 0;
    }
    strncpy(_file_log_ctx.prefix, prefix, sizeof(_file_log_ctx.prefix) - 1);
    _file_log_ctx.buf_size = buf_size;
    _file_log_ctx.switch_size = sw_size;
    _file_log_ctx.switch_time = sw_time;
    _file_log_ctx.buf = malloc(sizeof(char)*buf_size);
    if(!_file_log_ctx.buf) {
        return LOG_FAIL;
    }
    memset(_file_log_ctx.buf, 0, sizeof(char)*buf_size);

    return log_reg_callback(file_lvl,
            log_file_init_callback_fun,
            log_file_log_callback_fun,
            log_file_uninit_callback_fun,
            log_file_flush_callback_fun,
            0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x5ba2
cmpq $0x0, -0x18(%rbp)
je 0x5ba2
cmpl $0x0, -0x1c(%rbp)
jg 0x5bae
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5cb7
leaq 0x867b(%rip), %rdi      # 0xe230
xorl %esi, %esi
movl $0x338, %edx            # imm = 0x338
callq 0x2190
movq -0x10(%rbp), %rsi
leaq 0x8664(%rip), %rdi      # 0xe230
movl $0xff, %edx
callq 0x2070
leaq 0x8653(%rip), %rdi      # 0xe230
callq 0x2120
movq %rax, %rcx
subq $0x1, %rcx
leaq 0x8640(%rip), %rax      # 0xe230
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
jne 0x5c17
leaq 0x8630(%rip), %rdi      # 0xe230
callq 0x2120
movq %rax, %rcx
subq $0x1, %rcx
leaq 0x861d(%rip), %rax      # 0xe230
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rsi
leaq 0x860e(%rip), %rdi      # 0xe230
addq $0x100, %rdi            # imm = 0x100
movl $0xff, %edx
callq 0x2070
movl -0x1c(%rbp), %eax
movl %eax, 0x891c(%rip)      # 0xe558
movl -0x24(%rbp), %eax
movl %eax, 0x8903(%rip)      # 0xe548
movl -0x20(%rbp), %eax
movl %eax, 0x88f6(%rip)      # 0xe544
movslq -0x1c(%rbp), %rdi
shlq $0x0, %rdi
callq 0x22b0
movq %rax, 0x88ee(%rip)      # 0xe550
cmpq $0x0, 0x88e6(%rip)      # 0xe550
jne 0x5c75
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5cb7
movq 0x88d4(%rip), %rdi      # 0xe550
movslq -0x1c(%rbp), %rdx
shlq $0x0, %rdx
xorl %esi, %esi
callq 0x2190
movl -0x8(%rbp), %edi
leaq 0x5b(%rip), %rsi        # 0x5cf0
leaq 0x384(%rip), %rdx       # 0x6020
leaq 0x4ad(%rip), %rcx       # 0x6150
leaq 0x656(%rip), %r8        # 0x6300
xorl %eax, %eax
movl %eax, %r9d
callq 0x52d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_file_log_callback_fun
int log_file_log_callback_fun(const char* log, int len, void* args)
{
    FILE* fp = _file_log_ctx.fp;
    if (fp == NULL ) {
        return LOG_FAIL;
    }

    if(log_file_switch(args) != LOG_SUCCESS) {
        return LOG_FAIL;
    }

    int m_size = len;

    if (m_size > (_file_log_ctx.buf_size - _file_log_ctx.w_pos)) {
        if (_file_log_ctx.w_pos > 0) {
            _file_log_ctx.w_size += fwrite(_file_log_ctx.buf, 1,
                    _file_log_ctx.w_pos, _file_log_ctx.fp);
            _file_log_ctx.w_pos = 0;
        }
        _file_log_ctx.w_size += fwrite(log, 1, m_size, _file_log_ctx.fp);
    } else {
        memcpy(_file_log_ctx.buf + _file_log_ctx.w_pos, log, m_size);
        _file_log_ctx.w_pos += m_size;
        _file_log_ctx.w_size += m_size;
    }
    return LOG_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq 0x84fe(%rip), %rax      # 0xe538
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x6051
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x613a
movq -0x20(%rbp), %rdi
callq 0x64f0
cmpl $0x0, %eax
je 0x606b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x613a
movl -0x14(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl 0x84de(%rip), %ecx      # 0xe558
subl 0x84e0(%rip), %ecx      # 0xe560
cmpl %ecx, %eax
jle 0x60f7
cmpl $0x0, 0x84d5(%rip)      # 0xe560
jle 0x60c9
movq 0x84bc(%rip), %rdi      # 0xe550
movslq 0x84c5(%rip), %rdx      # 0xe560
movq 0x8496(%rip), %rcx      # 0xe538
movl $0x1, %esi
callq 0x2350
movq %rax, %rcx
movslq 0x84a6(%rip), %rax      # 0xe55c
addq %rcx, %rax
movl %eax, 0x849d(%rip)      # 0xe55c
movl $0x0, 0x8497(%rip)      # 0xe560
movq -0x10(%rbp), %rdi
movslq -0x2c(%rbp), %rdx
movq 0x8460(%rip), %rcx      # 0xe538
movl $0x1, %esi
callq 0x2350
movq %rax, %rcx
movslq 0x8470(%rip), %rax      # 0xe55c
addq %rcx, %rax
movl %eax, 0x8467(%rip)      # 0xe55c
jmp 0x6133
movq 0x8452(%rip), %rdi      # 0xe550
movslq 0x845b(%rip), %rax      # 0xe560
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movslq -0x2c(%rbp), %rdx
callq 0x2250
movl -0x2c(%rbp), %eax
addl 0x8442(%rip), %eax      # 0xe560
movl %eax, 0x843c(%rip)      # 0xe560
movl -0x2c(%rbp), %eax
addl 0x842f(%rip), %eax      # 0xe55c
movl %eax, 0x8429(%rip)      # 0xe55c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_file_uninit_callback_fun
int log_file_uninit_callback_fun(void* args)
{
    FILE* fp = _file_log_ctx.fp;
    char* buf = _file_log_ctx.buf;
    if(fp) {
        if(log_file_switch(args) != LOG_SUCCESS) {
            return LOG_FAIL;
        }

        if(_file_log_ctx.buf && _file_log_ctx.w_pos > 0) {
            fwrite(_file_log_ctx.buf, 1,
                    _file_log_ctx.w_pos, _file_log_ctx.fp);
        }

        fclose(fp);

        char old_path[LOG_DEFAULT_MAX_PATH] = {0};
        char new_path[LOG_DEFAULT_MAX_PATH] = {0};

        snprintf(old_path, LOG_DEFAULT_MAX_PATH, "%s/%s.tmp",
                _file_log_ctx.path, _file_log_ctx.name);

        snprintf(new_path, LOG_DEFAULT_MAX_PATH, "%s/%s.log",
                        _file_log_ctx.path, _file_log_ctx.name);

        if(rename(old_path, new_path) != 0) {
            fprintf(stderr, "rename %s - > %s failed: %s\n", old_path, new_path, strerror(errno));
        }
    }
    if(buf) {
        free(buf);
    }
    memset(&_file_log_ctx, 0, sizeof(_file_log_ctx.buf));

    return LOG_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x10(%rbp)
movq 0x83d2(%rip), %rax      # 0xe538
movq %rax, -0x18(%rbp)
movq 0x83df(%rip), %rax      # 0xe550
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x62ca
movq -0x10(%rbp), %rdi
callq 0x64f0
cmpl $0x0, %eax
je 0x619a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x62f4
cmpq $0x0, 0x83ae(%rip)      # 0xe550
je 0x61cc
cmpl $0x0, 0x83b5(%rip)      # 0xe560
jle 0x61cc
movq 0x839c(%rip), %rdi      # 0xe550
movslq 0x83a5(%rip), %rdx      # 0xe560
movq 0x8376(%rip), %rcx      # 0xe538
movl $0x1, %esi
callq 0x2350
movq -0x18(%rbp), %rdi
callq 0x2100
leaq -0x120(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x2190
leaq -0x220(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x2190
leaq -0x120(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
leaq 0x3ffe(%rip), %rdx      # 0xa20c
leaq 0x801b(%rip), %rcx      # 0xe230
movq %rcx, %r8
addq $0x200, %r8             # imm = 0x200
movb $0x0, %al
callq 0x2160
leaq -0x220(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
leaq 0x3fdd(%rip), %rdx      # 0xa216
leaq 0x7ff0(%rip), %rcx      # 0xe230
movq %rcx, %r8
addq $0x200, %r8             # imm = 0x200
movb $0x0, %al
callq 0x2160
leaq -0x120(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x2310
cmpl $0x0, %eax
je 0x62c8
movq 0x7d88(%rip), %rax      # 0xdff8
movq (%rax), %rax
movq %rax, -0x238(%rbp)
leaq -0x120(%rbp), %rax
movq %rax, -0x230(%rbp)
leaq -0x220(%rbp), %rax
movq %rax, -0x228(%rbp)
callq 0x2060
movl (%rax), %edi
callq 0x2370
movq -0x238(%rbp), %rdi
movq -0x230(%rbp), %rdx
movq -0x228(%rbp), %rcx
movq %rax, %r8
leaq 0x3f5f(%rip), %rsi      # 0xa220
movb $0x0, %al
callq 0x2220
jmp 0x62ca
cmpq $0x0, -0x20(%rbp)
je 0x62da
movq -0x20(%rbp), %rdi
callq 0x2030
leaq 0x7f4f(%rip), %rdi      # 0xe230
xorl %esi, %esi
movl $0x8, %edx
callq 0x2190
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_file_flush_callback_fun
int log_file_flush_callback_fun(void* args)
{
    FILE* fp = _file_log_ctx.fp;
    if(fp) {
        if(log_file_switch(args) != LOG_SUCCESS) {
            return LOG_FAIL;
        }
        if(_file_log_ctx.buf && _file_log_ctx.w_pos > 0) {
            _file_log_ctx.w_size += fwrite(_file_log_ctx.buf, 1,
                    _file_log_ctx.w_pos, _file_log_ctx.fp);
            _file_log_ctx.w_pos = 0;

            fflush(fp);
        }
    }
    return LOG_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq 0x8225(%rip), %rax      # 0xe538
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x638f
movq -0x10(%rbp), %rdi
callq 0x64f0
cmpl $0x0, %eax
je 0x6335
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6396
cmpq $0x0, 0x8213(%rip)      # 0xe550
je 0x638d
cmpl $0x0, 0x821a(%rip)      # 0xe560
jle 0x638d
movq 0x8201(%rip), %rdi      # 0xe550
movslq 0x820a(%rip), %rdx      # 0xe560
movq 0x81db(%rip), %rcx      # 0xe538
movl $0x1, %esi
callq 0x2350
movq %rax, %rcx
movslq 0x81eb(%rip), %rax      # 0xe55c
addq %rcx, %rax
movl %eax, 0x81e2(%rip)      # 0xe55c
movl $0x0, 0x81dc(%rip)      # 0xe560
movq -0x18(%rbp), %rdi
callq 0x22c0
jmp 0x638f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_get_header
static int log_get_header(int lvl, char* buf, int size)
{
    const char* head = 0;
    switch(lvl)
    {
    case LOG_DEBUG:
        head = "[D]";
        break;
    case LOG_INFO:
        head = "[I]";
        break;
    case LOG_WARN:
        head = "[W]";
        break;
    case LOG_ERROR:
        head = "[E]";
        break;
    case LOG_FATAL:
        head = "[F]";
        break;
    default:
        break;
    }
    struct timeval tv = {0};
    gettimeofday(&tv, NULL);
    struct tm* tm = localtime(&tv.tv_sec);
    int ret = snprintf(buf, size, "%s[%04d%02d%02d%02d%02d%02d:%ld]", head,
            tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
            tm->tm_hour, tm->tm_min, tm->tm_sec, (long)tv.tv_usec);

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movl %edi, -0x14(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x50(%rbp)
subl $0x64, %eax
je 0x63fa
jmp 0x63ca
movl -0x50(%rbp), %eax
subl $0xc8, %eax
je 0x6407
jmp 0x63d6
movl -0x50(%rbp), %eax
subl $0x12c, %eax            # imm = 0x12C
je 0x6414
jmp 0x63e2
movl -0x50(%rbp), %eax
subl $0x190, %eax            # imm = 0x190
je 0x6421
jmp 0x63ee
movl -0x50(%rbp), %eax
subl $0x1f4, %eax            # imm = 0x1F4
je 0x642e
jmp 0x643b
leaq 0x3dd6(%rip), %rax      # 0xa1d7
movq %rax, -0x30(%rbp)
jmp 0x643d
leaq 0x3dcd(%rip), %rax      # 0xa1db
movq %rax, -0x30(%rbp)
jmp 0x643d
leaq 0x3dc4(%rip), %rax      # 0xa1df
movq %rax, -0x30(%rbp)
jmp 0x643d
leaq 0x3dbb(%rip), %rax      # 0xa1e3
movq %rax, -0x30(%rbp)
jmp 0x643d
leaq 0x3db2(%rip), %rax      # 0xa1e7
movq %rax, -0x30(%rbp)
jmp 0x643d
jmp 0x643d
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x2190
leaq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2180
leaq -0x40(%rbp), %rdi
callq 0x2050
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
movslq -0x24(%rbp), %rsi
movq -0x30(%rbp), %rcx
movq -0x48(%rbp), %rax
movl 0x14(%rax), %r8d
addl $0x76c, %r8d            # imm = 0x76C
movq -0x48(%rbp), %rax
movl 0x10(%rax), %r9d
addl $0x1, %r9d
movq -0x48(%rbp), %rax
movl 0xc(%rax), %r14d
movq -0x48(%rbp), %rax
movl 0x8(%rax), %ebx
movq -0x48(%rbp), %rax
movl 0x4(%rax), %r11d
movq -0x48(%rbp), %rax
movl (%rax), %r10d
movq -0x38(%rbp), %rax
leaq 0x3d34(%rip), %rdx      # 0xa1eb
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movb $0x0, %al
callq 0x2160
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/log.c
// Function: log_file_switch
static int log_file_switch(void* args)
{
    int sw_log = 0;

    if (_file_log_ctx.switch_time > 0) {
        struct timeval tv = { 0 };
        gettimeofday(&tv, NULL );
        struct tm* tm = localtime(&tv.tv_sec);

        if(tm->tm_mday != _file_log_ctx.sw_day) {
            int seconds = tm->tm_hour * 3600 + tm->tm_min * 60 + tm->tm_sec;
            if (seconds >= _file_log_ctx.switch_time) {
                sw_log = 1;
                _file_log_ctx.sw_day = tm->tm_mday;
            }
        }
    }
    if (!sw_log) {
        if (_file_log_ctx.switch_size > 0
                && _file_log_ctx.w_size >= _file_log_ctx.switch_size) {
            sw_log = 1;
        }
    }
    if (sw_log) {

        if (log_file_init_callback_fun(&_file_log_ctx) != LOG_SUCCESS) {
            return LOG_FAIL;
        }
    }

    return LOG_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x0, 0x803a(%rip)      # 0xe544
jle 0x6586
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x2190
leaq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2180
leaq -0x28(%rbp), %rdi
callq 0x2050
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0xc(%rax), %eax
cmpl 0x7fed(%rip), %eax      # 0xe530
je 0x6584
movq -0x30(%rbp), %rax
imull $0xe10, 0x8(%rax), %eax # imm = 0xE10
movq -0x30(%rbp), %rcx
imull $0x3c, 0x4(%rcx), %ecx
addl %ecx, %eax
movq -0x30(%rbp), %rcx
addl (%rcx), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl 0x7fd8(%rip), %eax      # 0xe544
jl 0x6582
movl $0x1, -0x14(%rbp)
movq -0x30(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, 0x7fae(%rip)      # 0xe530
jmp 0x6584
jmp 0x6586
cmpl $0x0, -0x14(%rbp)
jne 0x65ac
cmpl $0x0, 0x7fb5(%rip)      # 0xe548
jle 0x65aa
movl 0x7fc1(%rip), %eax      # 0xe55c
cmpl 0x7fa7(%rip), %eax      # 0xe548
jl 0x65aa
movl $0x1, -0x14(%rbp)
jmp 0x65ac
cmpl $0x0, -0x14(%rbp)
je 0x65ce
leaq 0x7c77(%rip), %rdi      # 0xe230
callq 0x5cf0
cmpl $0x0, %eax
je 0x65cc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x65d5
jmp 0x65ce
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/util.c
// Function: set_signal
sigfunc* set_signal(int signo, sigfunc* func, int interupt)
{
    struct sigaction act, oact;
    act.sa_handler = func;
    sigemptyset(&act.sa_mask);
    act.sa_flags = 0;

    if (!interupt){
        act.sa_flags |= SA_RESTART;
    }
    if (sigaction(signo, &act, &oact) < 0) {
        return SIG_ERR ;
    }
    return oact.sa_handler;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0xb8(%rbp), %rdi
addq $0x8, %rdi
callq 0x2230
movl $0x0, -0x30(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x6628
movl -0x30(%rbp), %eax
orl $0x10000000, %eax       # imm = 0x10000000
movl %eax, -0x30(%rbp)
movl -0xc(%rbp), %edi
leaq -0xb8(%rbp), %rsi
leaq -0x150(%rbp), %rdx
callq 0x20b0
cmpl $0x0, %eax
jge 0x6650
movq $-0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x665b
movq -0x150(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/util.c
// Function: make_daemon
int make_daemon()
{
    if (fork() > 0) {
        exit(0);
    }
    setsid();
    if (fork() > 0) {
        exit(0);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x23a0
cmpl $0x0, %eax
jle 0x6685
xorl %edi, %edi
callq 0x2340
callq 0x21c0
callq 0x23a0
cmpl $0x0, %eax
jle 0x669b
xorl %edi, %edi
callq 0x2340
xorl %eax, %eax
popq %rbp
retq
nop