LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/sh.c
// Function: hashmap_init
hashmap_t *hashmap_init(size_t size){
    hashmap_t *hm = calloc(1, sizeof(hashmap_t));
    hm->map = calloc(size, sizeof(hashmap_vector_t));
    hm->size = size;
    for(size_t i = 0; i < hm->size; i++){
        hm->map[i].len = 3;
        hm->map[i].cursor = 0;
        hm->map[i].list = calloc(1, sizeof(struct sh_alias));
    }
    return hm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %r14
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x10e0
movq %rax, %r15
pushq $0x18
popq %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x10e0
movq %rax, %r13
movq %rax, 0x8(%r15)
movq %rbx, (%r15)
addq $0x10, %r13
subq $0x1, %rbx
jb 0x1365
movq $0x3, -0x10(%r13)
andq $0x0, -0x8(%r13)
movq %r14, %rdi
movq %r12, %rsi
callq 0x10e0
movq %rax, (%r13)
addq $0x18, %r13
jmp 0x133d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/sh.c
// Function: hashmap_free
int hashmap_free(hashmap_t *hm){
    for(int i = 0; i < hm->size; i++){
        free(hm->map[i].list);
    }
    free(hm->map);
    free(hm);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x10
popq %r14
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
cmpq %r15, (%rbx)
jbe 0x13a6
movq (%rdi,%r14), %rdi
callq 0x1040
incq %r15
addq $0x18, %r14
jmp 0x138b
callq 0x1040
movq %rbx, %rdi
callq 0x1040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/sh.c
// Function: hashmap_set
int hashmap_set(hashmap_t *hm, char *name, char *command){
    size_t c = hashmap_standalone_hash(name);
    size_t n = hashmap_hash(hm, name);
    hm->map[n].list[hm->map[n].cursor].id = c;
    hm->map[n].list[hm->map[n].cursor].name = name;
    hm->map[n].list[hm->map[n].cursor++].command = command;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x128c
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x12be
movq 0x8(%r15), %rcx
imulq $0x18, %rax, %rax
movq 0x8(%rcx,%rax), %rdx
movq 0x10(%rcx,%rax), %rsi
imulq $0x18, %rdx, %rdi
movq %r12, (%rsi,%rdi)
movq %r14, 0x8(%rsi,%rdi)
incq %rdx
movq %rdx, 0x8(%rcx,%rax)
movq %rbx, 0x10(%rsi,%rdi)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/sh.c
// Function: hashmap_item_exists
ssize_t hashmap_item_exists(hashmap_t *hm, char *inp){
    size_t c = hashmap_standalone_hash(inp);
    size_t n = hashmap_hash(hm, inp);
    hashmap_vector_t a = hm->map[n];
    for(size_t i = 0; i < a.len; i++){
        if(a.list[i].id == c){
            return i;
        }
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x128c
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x12be
movq 0x8(%r15), %rdx
imulq $0x18, %rax, %rax
movq (%rdx,%rax), %rcx
movq 0x10(%rdx,%rax), %rsi
xorl %edx, %edx
pushq $-0x1
popq %rax
cmpq %rdx, %rcx
je 0x1473
cmpq %rbx, (%rsi)
je 0x1470
incq %rdx
addq $0x18, %rsi
jmp 0x145d
movq %rdx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/sh.c
// Function: hashmap_get
struct sh_alias *hashmap_get(hashmap_t *hm, char *name){
    if(hashmap_item_exists(hm, name) != -1){
        size_t id = hashmap_standalone_hash(name);
        hashmap_vector_t v = hm->map[hashmap_hash(hm, name)];
        for(size_t i = 0; i < v.len; i++){
            if(v.list[i].id == id){
                return &v.list[i];
            }
        }
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x1421
cmpq $-0x1, %rax
je 0x14dc
movq %r14, %rdi
callq 0x128c
movq %rax, %rbx
movq 0x8(%r15), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x12be
imulq $0x18, %rax, %rax
movq (%r12,%rax), %rcx
movq 0x10(%r12,%rax), %rdx
incq %rcx
addq $-0x18, %rdx
decq %rcx
je 0x14dc
leaq 0x18(%rdx), %rax
cmpq %rbx, 0x18(%rdx)
movq %rax, %rdx
jne 0x14c8
jmp 0x14de
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/sh.c
// Function: parse_arg
struct sh_args *parse_arg(struct sh_args *args, int argc, char **argv){
    for(int i = 1; i < argc; i++){
        if(argv[i][0] == '-'){
            if(!strcmp(argv[i], "-c")){
                args->has_command = true;
                if(i + 1 < argc){
                    args->command = argv[++i];
                }
                else {
                    fprintf(stderr, "%s: -c option requires an argument\n", argv[i]);
                }
            }
            else if(!strcmp(argv[i], "-s")){
                args->standard_input = true;
            }
            else if(!strcmp(argv[i], "-i")){
                args->interactive = true;
            }
        }
        else {
            fprintf(stderr, "%s: invalid argument %s\n", argv[0], argv[i]);
        }
    }
    return args;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
pushq $0x1
popq %r13
movq 0x2aa3(%rip), %r12      # 0x3ff8
cmpl %r15d, %r13d
jge 0x15ec
movslq %r13d, %rax
movq (%rbx,%rax,8), %rcx
cmpb $0x2d, (%rcx)
jne 0x15b6
cmpb $0x63, 0x1(%rcx)
jne 0x1576
cmpb $0x0, 0x2(%rcx)
je 0x1594
cmpb $0x73, 0x1(%rcx)
jne 0x1582
cmpb $0x0, 0x2(%rcx)
je 0x15af
cmpb $0x69, 0x1(%rcx)
jne 0x15cb
cmpb $0x0, 0x2(%rcx)
jne 0x15cb
movb $0x1, (%r14)
jmp 0x15cb
movb $0x1, 0x2(%r14)
leal 0x1(%r13), %eax
cmpl %r15d, %eax
jge 0x15d5
movslq %eax, %rcx
movq (%rbx,%rcx,8), %rcx
movq %rcx, 0x8(%r14)
jmp 0x15ce
movb $0x1, 0x1(%r14)
jmp 0x15cb
movq (%r12), %rdi
movq (%rbx), %rdx
leaq 0xa75(%rip), %rsi       # 0x2039
xorl %eax, %eax
callq 0x1110
movl %r13d, %eax
incl %eax
movl %eax, %r13d
jmp 0x1555
movq (%r12), %rdi
leaq 0xa35(%rip), %rsi       # 0x2015
movq %rcx, %rdx
xorl %eax, %eax
callq 0x1110
jmp 0x15cb
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/sh.c
// Function: command_get_argc
int command_get_argc(char *buffer){
    int n = 0;
    char *p;
    while(p = strchr(buffer, ' ')){
        n++;
        buffer = p + 1;
    }
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rax
xorl %ebx, %ebx
pushq $0x20
popq %r14
movq %rax, %rdi
movl %r14d, %esi
callq 0x10b0
testq %rax, %rax
je 0x1625
incl %ebx
incq %rax
jmp 0x160e
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/sh.c
// Function: parse_command
struct sh_command *parse_command(char *buffer, size_t len){
    struct sh_command *command = calloc(1, sizeof(struct sh_command));
    command->argc = command_get_argc(buffer) + 1;
    command->argv = calloc(command->argc + 1, sizeof(char*));
    char *token = calloc(len + 2, sizeof(char));
    for(int i = 0, n = 0; i < command->argc && n < len; i++ && n++){
        int x = 0;
        while(buffer[n] != ' ' && buffer[n] != EOF && buffer[n] != '\0'){
            token[x++] = buffer[n++];
        }
        if(i < 1){
            n++;
        }
        token[x++] = '\0';
        command->argv[i] = calloc(x, sizeof(char));
        memcpy(command->argv[i], token, x);
    }
    command->argv[command->argc] = NULL;
    free(token);
    return command;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %r12
pushq $0x18
popq %rsi
movq %r12, %rdi
callq 0x10e0
movq %rax, %r15
movq %r14, -0x48(%rbp)
movq %r14, %rdi
callq 0x15fe
movl %eax, %r14d
leal 0x1(%r14), %eax
movl %eax, -0x2c(%rbp)
movl %eax, 0x10(%r15)
leal 0x2(%r14), %eax
movslq %eax, %rdi
pushq $0x8
popq %rsi
callq 0x10e0
movq %r15, -0x40(%rbp)
movq %rax, -0x38(%rbp)
movq %rax, 0x8(%r15)
movq %rbx, -0x50(%rbp)
leaq 0x2(%rbx), %rdi
movq %r12, %rsi
callq 0x10e0
movq %rax, %r15
movslq %r14d, %rax
movq %rax, -0x58(%rbp)
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpq -0x58(%rbp), %r12
jg 0x1738
movslq %r13d, %r13
cmpq -0x50(%rbp), %r13
jae 0x1738
movq -0x48(%rbp), %rax
addq %r13, %rax
xorl %r14d, %r14d
movzbl (%rax,%r14), %ecx
testl %ecx, %ecx
je 0x16e6
cmpl $0x20, %ecx
je 0x16e6
cmpl $0xff, %ecx
je 0x16e6
movb %cl, (%r15,%r14)
incq %r14
jmp 0x16c7
xorl %ebx, %ebx
xorl %eax, %eax
testq %r12, %r12
setne %bl
sete %al
movq %rax, -0x68(%rbp)
movl %r14d, %eax
leal 0x1(%r14), %edi
movq %rdi, -0x60(%rbp)
movb $0x0, (%r15,%rax)
pushq $0x1
popq %rsi
callq 0x10e0
movq -0x38(%rbp), %rcx
movq %rax, (%rcx,%r12,8)
movq %rax, %rdi
movq %r15, %rsi
movq -0x60(%rbp), %rdx
callq 0x1130
incq %r12
addq -0x68(%rbp), %rbx
addq %r14, %r13
addq %rbx, %r13
jmp 0x16aa
movslq -0x2c(%rbp), %rax
movq -0x38(%rbp), %rcx
andq $0x0, (%rcx,%rax,8)
movq %r15, %rdi
callq 0x1040
movq -0x40(%rbp), %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/sh.c
// Function: sh_is_builtin
int sh_is_builtin(char *command){
    if(!strcmp(command, "exit")){
        return shb_exit;
    }
    else if(!strcmp(command, "cd")){
        return shb_cd;
    }
    else if(!strcmp(command, "alias")){
        puts("alias");
        return shb_alias;
    }
    else if(!strcmp(command, "unalias")){
        return shb_unalias;
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8a0(%rip), %rsi       # 0x2010
callq 0x10f0
testl %eax, %eax
je 0x17b9
cmpb $0x63, (%rbx)
jne 0x178a
cmpb $0x64, 0x1(%rbx)
jne 0x178a
cmpb $0x0, 0x2(%rbx)
je 0x17cd
leaq 0x8c3(%rip), %rsi       # 0x2054
movq %rbx, %rdi
callq 0x10f0
testl %eax, %eax
je 0x17bd
leaq 0x8ae(%rip), %rsi       # 0x2052
movq %rbx, %rdi
callq 0x10f0
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
orl $0x2, %eax
jmp 0x17d0
xorl %eax, %eax
jmp 0x17d0
leaq 0x890(%rip), %rdi       # 0x2054
callq 0x1070
pushq $0x1
jmp 0x17cf
pushq $0x3
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/sh.c
// Function: sh_cd
int sh_cd(char *path){
    if(!path){
        char *res = getenv("HOME");
        if(res){
            path = res;
        }
        else {
            return 0;
        }
    }
    int cd_res = chdir(path);
    if(cd_res == -1){
        fprintf(stderr, "cd: %s: %s\n", strerror(errno), path);
        return errno;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x19b8
leaq 0x6e7(%rip), %rdi       # 0x2092
callq 0x1030
movq %rax, %rbx
testq %rax, %rax
je 0x19c5
movq %rbx, %rdi
callq 0x10a0
cmpl $-0x1, %eax
je 0x19d2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x261f(%rip), %rax      # 0x3ff8
movq (%rax), %r14
callq 0x1050
movq %rax, %r15
movl (%rax), %edi
callq 0x1170
leaq 0x6a5(%rip), %rsi       # 0x2097
movq %r14, %rdi
movq %rax, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1110
movl (%r15), %eax
jmp 0x19c7
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/sh.c
// Function: run_builtin
int run_builtin(enum sh_builtins code, struct sh_command *command){
    if(code == shb_exit){
        if(command->argc == 2){
            char **end;
            int ret = (int)strtol(command->argv[1], end, 10);
            if(end[0][0] == command->argv[1][0]){
                fprintf(stderr, "sh: exit: %s: numeric argument required\n", command->argv[1]);
                sh_exit(2);
            }
            sh_exit(ret);
        }
        sh_exit(0);
    }
    else if(code == shb_cd){
        return sh_cd(command->argv[1]);
    }
    else if(code == shb_alias){
        if(command->argc == 2){
            return sh_add_alias(command->argv[1]);
        }
        else {
            puts("else");
            return 1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
xorl %r14d, %r14d
cmpl $0x1, %edi
je 0x1a76
cmpl $0x3, %edi
je 0x1a65
testl %edi, %edi
jne 0x1a9b
cmpl $0x2, 0x10(%rbx)
jne 0x1aa3
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
pushq $0xa
popq %rdx
callq 0x1120
movq 0x8(%rbx), %rcx
movq 0x8(%rcx), %rdx
cmpb $0x0, (%rdx)
jne 0x1aaa
movq 0x25ac(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x64d(%rip), %rsi       # 0x20a3
xorl %eax, %eax
callq 0x1110
pushq $0x2
popq %rdi
callq 0x1518
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1992
cmpl $0x2, 0x10(%rbx)
jne 0x1a8b
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x17d7
jmp 0x1a9b
leaq 0x63a(%rip), %rdi       # 0x20cc
callq 0x1070
pushq $0x1
popq %r14
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
xorl %edi, %edi
callq 0x1518
movl %eax, %edi
callq 0x1518
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/sh.c
// Function: call_command
int call_command(struct sh_command *command){
    int status = 0;
    int builtin = sh_is_builtin(command->argv[0]);
    if(builtin != -1){
        status = run_builtin(builtin, command);
        return status;
    }
    pid_t pid = fork();
    if(pid == -1){
        fprintf(stderr, "sh: %s\n", strerror(errno));
        return 1;
    }
    else if(pid){
        waitpid(pid, &status, 0);
        if(WIFEXITED(status)){
            status = WEXITSTATUS(status);
        }
    }
    else {
        if(execvp(command->argv[0], command->argv) == -1){
            fprintf(stderr, "sh: %s: %s\n", command->argv[0], strerror(errno));
            for(int i = -1; command->argv[++i] != NULL; free(command->argv[i]));
            free(command->argv);
            free(command);
            exit(1);
        }
    }
    return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
andl $0x0, -0x24(%rbp)
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq (%rax), %rdi
callq 0x1760
cmpl $-0x1, %eax
je 0x1aee
movl %eax, %edi
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1a07
callq 0x1180
testl %eax, %eax
je 0x1b17
cmpl $-0x1, %eax
je 0x1b39
leaq -0x24(%rbp), %rbx
movl %eax, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1140
movl (%rbx), %eax
testb $0x7f, %al
jne 0x1b2c
movzbl %ah, %eax
jmp 0x1b2c
movq 0x8(%rbx), %rsi
movq (%rsi), %rdi
callq 0x1150
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
je 0x1b68
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x24b8(%rip), %rax      # 0x3ff8
movq (%rax), %rbx
callq 0x1050
movl (%rax), %edi
callq 0x1170
leaq 0x57b(%rip), %rsi       # 0x20d1
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1110
pushq $0x1
popq %rax
jmp 0x1b2c
movq 0x2489(%rip), %rax      # 0x3ff8
movq (%rax), %r14
movq 0x8(%rbx), %rax
movq (%rax), %r15
callq 0x1050
movl (%rax), %edi
callq 0x1170
leaq 0x54d(%rip), %rsi       # 0x20d9
xorl %r12d, %r12d
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1110
movq 0x8(%rbx), %rdi
movq (%rdi,%r12), %rax
testq %rax, %rax
je 0x1bba
movq %rax, %rdi
callq 0x1040
addq $0x8, %r12
jmp 0x1b9f
callq 0x1040
movq %rbx, %rdi
callq 0x1040
pushq $0x1
popq %rdi
callq 0x1160
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/sh.c
// Function: main
int main(int argc, char **argv){
    signal(SIGINT, sigint_handler);
    alias_hashmap = hashmap_init(100);
    struct sh_command *command = NULL;
    if(argc > 1){
        struct sh_args *args = calloc(1, sizeof(struct sh_args));
        if(args == NULL){
            fprintf(stderr, "%s: %s\n", argv[0], strerror(errno));
        }
        args = parse_arg(args, argc, argv);
        if(args->command){
            command = parse_command(args->command, strlen(args->command));
            call_command(command);
            free(command);
            return 0;
        }
    }
    char *buffer = calloc(4096, sizeof(char));
    while(1){
        write(STDOUT_FILENO, SH_PROMPT, strlen(SH_PROMPT));
        ssize_t n = 0;
        n += read(STDIN_FILENO, buffer, 4096);
        if(n == 0){
            sh_exit(0);
        }
        else if(n == 1){
            continue;
        }
        buffer[n-1] = '\0';
        command = parse_command(buffer, n);
        call_command(command);
        free(command);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
leaq -0x703(%rip), %rsi      # 0x14e7
pushq $0x2
popq %rdi
callq 0x1100
pushq $0x64
popq %rdi
callq 0x12fd
movq %rax, 0x24df(%rip)      # 0x40e0
cmpl $0x2, %r14d
jl 0x1c9e
pushq $0x1
popq %rdi
pushq $0x10
popq %rsi
callq 0x10e0
movq %rax, %r15
testq %rax, %rax
je 0x1c6c
movq %r15, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0x1533
movq 0x8(%r15), %rbx
testq %rbx, %rbx
je 0x1c9e
movq %rbx, %rdi
callq 0x1090
movq %rbx, %rdi
movq %rax, %rsi
callq 0x162c
movq %rax, %rbx
movq %rax, %rdi
callq 0x1ab1
movq %rbx, %rdi
callq 0x1040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2385(%rip), %rax      # 0x3ff8
movq (%rax), %r12
movq (%rbx), %r13
callq 0x1050
movl (%rax), %edi
callq 0x1170
leaq 0x40f(%rip), %rsi       # 0x209b
movq %r12, %rdi
movq %r13, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1110
jmp 0x1c1e
pushq $0x1
popq %rsi
movl $0x1000, %edi           # imm = 0x1000
callq 0x10e0
movq %rax, %rbx
leaq 0x34f(%rip), %r14       # 0x2004
pushq $0x1
popq %r15
pushq $0xb
popq %r12
movl %r15d, %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1080
movl $0x1000, %edx           # imm = 0x1000
xorl %edi, %edi
movq %rbx, %rsi
callq 0x10d0
cmpq $0x1, %rax
je 0x1cbd
testq %rax, %rax
je 0x1d0a
movb $0x0, -0x1(%rbx,%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x162c
movq %rax, %r13
movq %rax, %rdi
callq 0x1ab1
movq %r13, %rdi
callq 0x1040
jmp 0x1cbd
xorl %edi, %edi
callq 0x1518
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml_cat.c
// Function: main
int main(int argc, const char *argv[]) {
  int i;
  if (argc == 1) {
    cat(stdin);
  } else {
    for (i = 1; i < argc; i++) {

      FILE *fp = fopen(argv[i], "r");
      if (!fp) {
        fprintf(stderr, "ERROR: cannot open %s: %s\n", argv[i],
                strerror(errno));
        exit(1);
      }
      cat(fp);
      fclose(fp);
    }
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x1, %edi
jne 0x1325
movq 0x6cc7(%rip), %rax      # 0x7fd8
movq (%rax), %rdi
callq 0x139d
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rsi, %rbx
movslq %edi, %r13
pushq $0x1
popq %r12
leaq 0x3db1(%rip), %r14      # 0x50e7
cmpq %r13, %r12
jge 0x1319
movq (%rbx,%r12,8), %rdi
movq %r14, %rsi
callq 0x11a0
testq %rax, %rax
je 0x1364
movq %rax, %r15
movq %rax, %rdi
callq 0x139d
movq %r15, %rdi
callq 0x10a0
incq %r12
jmp 0x1336
movq 0x6c8d(%rip), %rax      # 0x7ff8
movq (%rax), %r14
movq (%rbx,%r12,8), %rbx
callq 0x1050
movl (%rax), %edi
callq 0x11d0
leaq 0x3c97(%rip), %rsi      # 0x501c
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1160
pushq $0x1
popq %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml_cat.c
// Function: cat
static void cat(FILE *fp) {
  char errbuf[200];

  toml_table_t *tab = toml_parse_file(fp, errbuf, sizeof(errbuf));
  if (!tab) {
    fprintf(stderr, "ERROR: %s\n", errbuf);
    return;
  }

  stack[stacktop].tab = tab;
  stack[stacktop].key = "";
  stacktop++;
  printf("{\n");
  indent++;
  print_table(tab);
  indent--;
  printf("}\n");
  stacktop--;

  toml_free(tab);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rsp, %rsi
movl $0xc8, %edx
callq 0x2e48
testq %rax, %rax
je 0x1428
movq %rax, %rbx
movslq 0x6d6f(%rip), %rax      # 0x8130
leal 0x1(%rax), %ecx
shlq $0x4, %rax
leaq 0x6d71(%rip), %rdx      # 0x8140
movq %rbx, 0x8(%rax,%rdx)
leaq 0x42cf(%rip), %rsi      # 0x56aa
movq %rsi, (%rax,%rdx)
movl %ecx, 0x6d4b(%rip)      # 0x8130
leaq 0x3d33(%rip), %rdi      # 0x511f
callq 0x1060
incl 0x6d3d(%rip)            # 0x8134
movq %rbx, %rdi
callq 0x1445
decl 0x6d2f(%rip)            # 0x8134
leaq 0x3d11(%rip), %rdi      # 0x511d
callq 0x1060
decl 0x6d19(%rip)            # 0x8130
movq %rbx, %rdi
callq 0x2e43
addq $0xd0, %rsp
popq %rbx
retq
movq 0x6bc9(%rip), %rax      # 0x7ff8
movq (%rax), %rdi
leaq 0x3bfe(%rip), %rsi      # 0x5037
movq %rsp, %rdx
xorl %eax, %eax
callq 0x1160
jmp 0x141f
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml_cat.c
// Function: print_string
static void print_string(const char *s) {
  int ok = 1;
  for (const char *p = s; *p && ok; p++) {
    int ch = *p;
    ok = isprint(ch) && ch != '"' && ch != '\\';
  }

  if (ok) {
    printf("\"%s\"", s);
    return;
  }

  int len = strlen(s);

  printf("\"");
  for (; len; len--, s++) {
    int ch = *s;
    if (isprint(ch) && ch != '"' && ch != '\\') {
      putchar(ch);
      continue;
    }

    switch (ch) {
    case 0x8:
      printf("\\b");
      continue;
    case 0x9:
      printf("\\t");
      continue;
    case 0xa:
      printf("\\n");
      continue;
    case 0xc:
      printf("\\f");
      continue;
    case 0xd:
      printf("\\r");
      continue;
    case '"':
      printf("\\\"");
      continue;
    case '\\':
      printf("\\\\");
      continue;
    default:
      printf("\\0x%02x", ch & 0xff);
      continue;
    }
  }
  printf("\"");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x1, %al
movq %rdi, %r14
testb $0x1, %al
je 0x18da
movb (%r14), %bpl
testb %bpl, %bpl
je 0x18da
movsbq %bpl, %r15
callq 0x11f0
movq (%rax), %rax
movb 0x1(%rax,%r15,2), %cl
andb $0x40, %cl
shrb $0x6, %cl
cmpb $0x22, %bpl
setne %dl
cmpb $0x5c, %bpl
setne %al
andb %dl, %al
andb %cl, %al
incq %r14
jmp 0x18a0
testb $0x1, %al
je 0x18fd
leaq 0x37f0(%rip), %rdi      # 0x50d5
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10d0
movq %rbx, %rdi
callq 0x10b0
movq %rax, %r14
pushq $0x22
popq %rdi
callq 0x1040
leaq 0x36ed(%rip), %r15      # 0x5004
leaq 0x37ce(%rip), %r12      # 0x50ec
xorl %ebp, %ebp
cmpl %ebp, %r14d
je 0x19d5
movsbq (%rbx,%rbp), %r13
callq 0x11f0
movq (%rax), %rax
movzwl (%rax,%r13,2), %eax
btl $0xe, %eax
jb 0x195f
movzbl %r13b, %eax
leal -0x8(%rax), %ecx
cmpl $0x5, %ecx
ja 0x1978
movslq (%r15,%rcx,4), %rax
addq %r15, %rax
jmpq *%rax
leaq 0x377d(%rip), %rdi      # 0x50da
jmp 0x19c6
cmpb $0x22, %r13b
je 0x1987
movzbl %r13b, %eax
cmpl $0x5c, %eax
je 0x1982
movl %r13d, %edi
callq 0x1040
jmp 0x19cd
cmpl $0x22, %eax
je 0x1987
cmpl $0x5c, %eax
jne 0x1990
movq %r12, %rdi
jmp 0x19c6
leaq 0x375b(%rip), %rdi      # 0x50e9
jmp 0x19c6
movzbl %r13b, %esi
leaq 0x3754(%rip), %rdi      # 0x50ef
xorl %eax, %eax
callq 0x10d0
jmp 0x19cd
leaq 0x3732(%rip), %rdi      # 0x50dd
jmp 0x19c6
leaq 0x372c(%rip), %rdi      # 0x50e0
jmp 0x19c6
leaq 0x3726(%rip), %rdi      # 0x50e3
jmp 0x19c6
leaq 0x3720(%rip), %rdi      # 0x50e6
xorl %eax, %eax
callq 0x10d0
incq %rbp
jmp 0x1920
pushq $0x22
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml_cat.c
// Function: print_timestamp
static void print_timestamp(toml_datum_t d) {
  if (d.u.ts->year) {
    printf("%04d-%02d-%02d%s", *d.u.ts->year, *d.u.ts->month, *d.u.ts->day,
           d.u.ts->hour ? "T" : "");
  }
  if (d.u.ts->hour) {
    printf("%02d:%02d:%02d", *d.u.ts->hour, *d.u.ts->minute, *d.u.ts->second);
    if (d.u.ts->millisec) {
      printf(".%03d", *d.u.ts->millisec);
    }
    if (d.u.ts->z) {
      printf("%s", d.u.ts->z);
    }
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x1a2b
movl (%rax), %esi
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rcx
movl (%rax), %edx
movl (%rcx), %ecx
cmpq $0x0, 0x40(%rbx)
leaq 0x3c98(%rip), %rax      # 0x56aa
leaq 0x3a07(%rip), %r8       # 0x5420
cmoveq %rax, %r8
leaq 0x36d3(%rip), %rdi      # 0x50f7
xorl %eax, %eax
callq 0x10d0
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x1a81
movl (%rax), %esi
movq 0x48(%rbx), %rax
movq 0x50(%rbx), %rcx
movl (%rax), %edx
movl (%rcx), %ecx
leaq 0x36bf(%rip), %rdi      # 0x5108
xorl %eax, %eax
callq 0x10d0
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1a69
movl (%rax), %esi
leaq 0x36b5(%rip), %rdi      # 0x5117
xorl %eax, %eax
callq 0x10d0
movq 0x60(%rbx), %rsi
testq %rsi, %rsi
je 0x1a81
leaq 0x3828(%rip), %rdi      # 0x52a1
xorl %eax, %eax
popq %rbx
jmp 0x10d0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: toml_set_memutil
void toml_set_memutil(void *(*xxmalloc)(size_t), void (*xxfree)(void *)) {
  if (xxmalloc)
    ppmalloc = xxmalloc;
  if (xxfree)
    ppfree = xxfree;
}

// Assembly:
testq %rdi, %rdi
je 0x1ab8
movq %rdi, 0x6658(%rip)      # 0x8110
testq %rsi, %rsi
je 0x1ac4
movq %rsi, 0x6654(%rip)      # 0x8118
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: eat_token
static inline int eat_token(context_t *ctx, tokentype_t typ, int isdotspecial,
                            const char *fline) {
  if (ctx->tok.tok != typ)
    return e_internal(ctx, fline);

  if (next_token(ctx, isdotspecial))
    return -1;

  return 0;
}

// Assembly:
pushq %rax
cmpl %esi, 0x20(%rdi)
jne 0x2e36
movl %edx, %esi
callq 0x2583
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
jmp 0x2e41
movq %rcx, %rsi
callq 0x4bd4
pushq $-0x1
popq %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: toml_parse_file
toml_table_t *toml_parse_file(FILE *fp, char *errbuf, int errbufsz) {
  int bufsz = 0;
  char *buf = 0;
  int off = 0;

  /* read from fp into buf */
  while (!feof(fp)) {

    if (off == bufsz) {
      int xsz = bufsz + 1000;
      char *x = expand(buf, bufsz, xsz);
      if (!x) {
        snprintf(errbuf, errbufsz, "out of memory");
        xfree(buf);
        return 0;
      }
      buf = x;
      bufsz = xsz;
    }

    errno = 0;
    int n = fread(buf + off, 1, bufsz - off, fp);
    if (ferror(fp)) {
      snprintf(errbuf, errbufsz, "%s",
               errno ? strerror(errno) : "Error reading file");
      xfree(buf);
      return 0;
    }
    off += n;
  }

  /* tag on a NUL to cap the string */
  if (off == bufsz) {
    int xsz = bufsz + 1;
    char *x = expand(buf, bufsz, xsz);
    if (!x) {
      snprintf(errbuf, errbufsz, "out of memory");
      xfree(buf);
      return 0;
    }
    buf = x;
    bufsz = xsz;
  }
  buf[off] = 0;

  /* parse it, cleanup and finish */
  toml_table_t *ret = toml_parse(buf, errbuf, errbufsz);
  xfree(buf);
  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
xorl %r12d, %r12d
xorl %r14d, %r14d
movl $0x0, 0xc(%rsp)
movq %rdi, %r15
callq 0x1170
movslq %r12d, %rbx
testl %eax, %eax
jne 0x2f0d
movl 0xc(%rsp), %ebp
cmpl %ebp, %r12d
jne 0x2eab
leal 0x3e8(%r12), %ebp
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x2fae
movq %rax, %r13
testq %rax, %rax
jne 0x2eae
jmp 0x2f2c
movq %r14, %r13
callq 0x1050
movl %ebp, %ecx
movq %rax, %rbp
andl $0x0, (%rax)
addq %r13, %rbx
movl %ecx, 0xc(%rsp)
movl %ecx, %eax
subl %r12d, %eax
movslq %eax, %rdx
movq %rbx, %rdi
pushq $0x1
popq %rsi
movq %r15, %rcx
callq 0x1080
movq %rax, %rbx
movq %r15, %rdi
callq 0x1070
movq %r15, %rdi
addl %r12d, %ebx
movl %ebx, %r12d
movq %r13, %r14
testl %eax, %eax
je 0x2e6d
movslq 0x8(%rsp), %r15
movl (%rbp), %edi
testl %edi, %edi
je 0x2f6f
callq 0x11d0
movq %rax, %rcx
jmp 0x2f76
cmpl 0xc(%rsp), %r12d
jne 0x2f50
leal 0x1(%r12), %edx
movq %r14, %rdi
movl %r12d, %esi
callq 0x2fae
movq %rax, %r13
testq %rax, %rax
jne 0x2f53
movslq 0x8(%rsp), %rsi
leaq 0x228d(%rip), %rdx      # 0x51c5
xorl %ebx, %ebx
movq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x10e0
movq %r14, %r13
testq %r14, %r14
jne 0x2f93
jmp 0x2f9c
movq %r14, %r13
movb $0x0, (%r13,%rbx)
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movl 0x8(%rsp), %edx
callq 0x1df4
movq %rax, %rbx
jmp 0x2f93
leaq 0x225d(%rip), %rcx      # 0x51d3
movq 0x10(%rsp), %rdi
leaq 0x231f(%rip), %rdx      # 0x52a1
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x10e0
testq %r13, %r13
je 0x2f9c
movq %r13, %rdi
callq *0x517c(%rip)           # 0x8118
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: expand
static void *expand(void *p, int sz, int newsz) {
  void *s = MALLOC(newsz);
  if (!s)
    return 0;

  if (p) {
    memcpy(s, p, sz);
    FREE(p);
  }
  return s;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movslq %edx, %rdi
callq *0x5150(%rip)           # 0x8110
movq %rax, %r14
testq %rax, %rax
sete %al
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x2fea
movslq %ebp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1180
movq %rbx, %rdi
callq *0x512e(%rip)           # 0x8118
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: xfree_tab
static void xfree_tab(toml_table_t *p) {
  int i;

  if (!p)
    return;

  xfree(p->key);

  for (i = 0; i < p->nkval; i++)
    xfree_kval(p->kval[i]);
  xfree(p->kval);

  for (i = 0; i < p->narr; i++)
    xfree_arr(p->arr[i]);
  xfree(p->arr);

  for (i = 0; i < p->ntab; i++)
    xfree_tab(p->tab[i]);
  xfree(p->tab);

  xfree(p);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x30c0
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3011
callq *0x5107(%rip)           # 0x8118
xorl %r15d, %r15d
movslq 0xc(%rbx), %rax
movq 0x10(%rbx), %rdi
cmpq %rax, %r15
jge 0x3055
movq (%rdi,%r15,8), %r14
testq %r14, %r14
je 0x3050
movq (%r14), %rdi
testq %rdi, %rdi
je 0x3038
callq *0x50e0(%rip)           # 0x8118
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x3047
callq *0x50d1(%rip)           # 0x8118
movq %r14, %rdi
callq *0x50c8(%rip)           # 0x8118
incq %r15
jmp 0x3014
testq %rdi, %rdi
je 0x3060
callq *0x50b8(%rip)           # 0x8118
xorl %r14d, %r14d
movslq 0x18(%rbx), %rax
movq 0x20(%rbx), %rdi
cmpq %rax, %r14
jge 0x307e
movq (%rdi,%r14,8), %rdi
callq 0x4c43
incq %r14
jmp 0x3063
testq %rdi, %rdi
je 0x3089
callq *0x508f(%rip)           # 0x8118
xorl %r14d, %r14d
movslq 0x28(%rbx), %rax
movq 0x30(%rbx), %rdi
cmpq %rax, %r14
jge 0x30a7
movq (%rdi,%r14,8), %rdi
callq 0x2ff2
incq %r14
jmp 0x308c
testq %rdi, %rdi
je 0x30b2
callq *0x5066(%rip)           # 0x8118
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x5058(%rip)           # 0x8118
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: toml_key_exists
int toml_key_exists(const toml_table_t *tab, const char *key) {
  int i;
  for (i = 0; i < tab->nkval; i++) {
    if (0 == strcmp(key, tab->kval[i]->key))
      return 1;
  }
  for (i = 0; i < tab->narr; i++) {
    if (0 == strcmp(key, tab->arr[i]->key))
      return 1;
  }
  for (i = 0; i < tab->ntab; i++) {
    if (0 == strcmp(key, tab->tab[i]->key))
      return 1;
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl 0xc(%rdi), %r12d
xorl %r13d, %r13d
testl %r12d, %r12d
cmovlel %r13d, %r12d
pushq $0x1
popq %rbx
cmpq %r13, %r12
je 0x313a
movq 0x10(%r15), %rax
movq (%rax,%r13,8), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x1140
incq %r13
testl %eax, %eax
jne 0x3119
jmp 0x319a
movl 0x18(%r15), %r12d
xorl %r13d, %r13d
testl %r12d, %r12d
cmovlel %r13d, %r12d
cmpq %r13, %r12
je 0x3169
movq 0x20(%r15), %rax
movq (%rax,%r13,8), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x1140
incq %r13
testl %eax, %eax
jne 0x3148
jmp 0x319a
movl 0x28(%r15), %r12d
xorl %r13d, %r13d
testl %r12d, %r12d
cmovlel %r13d, %r12d
cmpq %r13, %r12
je 0x3198
movq 0x30(%r15), %rax
movq (%rax,%r13,8), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x1140
incq %r13
testl %eax, %eax
jne 0x3177
jmp 0x319a
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: toml_raw_in
toml_raw_t toml_raw_in(const toml_table_t *tab, const char *key) {
  int i;
  for (i = 0; i < tab->nkval; i++) {
    if (0 == strcmp(key, tab->kval[i]->key))
      return tab->kval[i]->val;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl 0xc(%rdi), %r12d
xorl %ebx, %ebx
testl %r12d, %r12d
cmovlel %ebx, %r12d
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x31eb
movq 0x10(%r15), %rax
movq (%rax,%r13,8), %rbp
movq (%rbp), %rsi
movq %r14, %rdi
callq 0x1140
incq %r13
testl %eax, %eax
jne 0x31c7
movq 0x8(%rbp), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: toml_array_in
toml_array_t *toml_array_in(const toml_table_t *tab, const char *key) {
  int i;
  for (i = 0; i < tab->narr; i++) {
    if (0 == strcmp(key, tab->arr[i]->key))
      return tab->arr[i];
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x18(%rdi), %r12d
xorl %r13d, %r13d
testl %r12d, %r12d
cmovlel %r13d, %r12d
cmpq %r13, %r12
je 0x323b
movq 0x20(%r14), %rax
movq (%rax,%r13,8), %r15
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x1140
incq %r13
testl %eax, %eax
jne 0x321a
jmp 0x323e
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: toml_table_in
toml_table_t *toml_table_in(const toml_table_t *tab, const char *key) {
  int i;
  for (i = 0; i < tab->ntab; i++) {
    if (0 == strcmp(key, tab->tab[i]->key))
      return tab->tab[i];
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x28(%rdi), %r12d
xorl %r13d, %r13d
testl %r12d, %r12d
cmovlel %r13d, %r12d
cmpq %r13, %r12
je 0x3289
movq 0x30(%r14), %rax
movq (%rax,%r13,8), %r15
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x1140
incq %r13
testl %eax, %eax
jne 0x3268
jmp 0x328c
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: scan_date
static int scan_date(const char *p, int *YY, int *MM, int *DD) {
  int year, month, day;
  year = scan_digits(p, 4);
  month = (year >= 0 && p[4] == '-') ? scan_digits(p + 5, 2) : -1;
  day = (month >= 0 && p[7] == '-') ? scan_digits(p + 8, 2) : -1;
  if (YY)
    *YY = year;
  if (MM)
    *MM = month;
  if (DD)
    *DD = day;
  return (year >= 0 && month >= 0 && day >= 0) ? 0 : -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x4
popq %rsi
callq 0x4cda
movl %eax, %ebp
pushq $-0x1
popq %r15
testl %eax, %eax
js 0x357a
cmpb $0x2d, 0x4(%rbx)
jne 0x357a
leaq 0x5(%rbx), %rdi
pushq $0x2
popq %rsi
callq 0x4cda
movl %eax, %r13d
testl %eax, %eax
js 0x357d
cmpb $0x2d, 0x7(%rbx)
jne 0x357d
addq $0x8, %rbx
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x4cda
movl %eax, %r15d
jmp 0x357d
movl %r15d, %r13d
movq (%rsp), %rax
testq %r12, %r12
je 0x358a
movl %ebp, (%r12)
testq %r14, %r14
je 0x3592
movl %r13d, (%r14)
testq %rax, %rax
je 0x359a
movl %r15d, (%rax)
sarl $0x1f, %r15d
orl %ebp, %r13d
pushq $-0x1
popq %rax
cmovnsl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: scan_time
static int scan_time(const char *p, int *hh, int *mm, int *ss) {
  int hour, minute, second;
  hour = scan_digits(p, 2);
  minute = (hour >= 0 && p[2] == ':') ? scan_digits(p + 3, 2) : -1;
  second = (minute >= 0 && p[5] == ':') ? scan_digits(p + 6, 2) : -1;
  if (hh)
    *hh = hour;
  if (mm)
    *mm = minute;
  if (ss)
    *ss = second;
  return (hour >= 0 && minute >= 0 && second >= 0) ? 0 : -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x2
popq %rsi
callq 0x4cda
movl %eax, %ebp
pushq $-0x1
popq %r15
testl %eax, %eax
js 0x3614
cmpb $0x3a, 0x2(%rbx)
jne 0x3614
leaq 0x3(%rbx), %rdi
pushq $0x2
popq %rsi
callq 0x4cda
movl %eax, %r13d
testl %eax, %eax
js 0x3617
cmpb $0x3a, 0x5(%rbx)
jne 0x3617
addq $0x6, %rbx
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x4cda
movl %eax, %r15d
jmp 0x3617
movl %r15d, %r13d
movq (%rsp), %rax
testq %r12, %r12
je 0x3624
movl %ebp, (%r12)
testq %r14, %r14
je 0x362c
movl %r13d, (%r14)
testq %rax, %rax
je 0x3634
movl %r15d, (%rax)
sarl $0x1f, %r15d
orl %ebp, %r13d
pushq $-0x1
popq %rax
cmovnsl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: toml_rtob
int toml_rtob(toml_raw_t src, int *ret_) {
  if (!src)
    return -1;
  int dummy;
  int *ret = ret_ ? ret_ : &dummy;

  if (0 == strcmp(src, "true")) {
    *ret = 1;
    return 0;
  }
  if (0 == strcmp(src, "false")) {
    *ret = 0;
    return 0;
  }
  return -1;
}

// Assembly:
testq %rdi, %rdi
je 0x369c
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x19fb(%rip), %rsi      # 0x5062
callq 0x1140
testl %eax, %eax
je 0x36a0
testq %rbx, %rbx
sete %bpl
leaq 0x19e9(%rip), %rsi      # 0x5067
movq %r14, %rdi
callq 0x1140
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %dl
xorl %ecx, %ecx
orb %dl, %bpl
je 0x36a8
movb %dl, %al
negl %eax
jmp 0x36ac
pushq $-0x1
popq %rax
retq
testq %rbx, %rbx
je 0x36aa
pushq $0x1
popq %rcx
movl %ecx, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: toml_rtoi
int toml_rtoi(toml_raw_t src, int64_t *ret_) {
  if (!src)
    return -1;

  char buf[100];
  char *p = buf;
  char *q = p + sizeof(buf);
  const char *s = src;
  int base = 0;
  int64_t dummy;
  int64_t *ret = ret_ ? ret_ : &dummy;

  /* allow +/- */
  if (s[0] == '+' || s[0] == '-')
    *p++ = *s++;

  /* disallow +_100 */
  if (s[0] == '_')
    return -1;

  /* if 0* ... */
  if ('0' == s[0]) {
    switch (s[1]) {
    case 'x':
      base = 16;
      s += 2;
      break;
    case 'o':
      base = 8;
      s += 2;
      break;
    case 'b':
      base = 2;
      s += 2;
      break;
    case '\0':
      return *ret = 0, 0;
    default:
      /* ensure no other digits after it */
      if (s[1])
        return -1;
    }
  }

  /* just strip underscores and pass to strtoll */
  while (*s && p < q) {
    int ch = *s++;
    if (ch == '_') {
      // disallow '__'
      if (s[0] == '_')
        return -1;
      // numbers cannot end with '_'
      if (s[0] == '\0')
        return -1;
      continue; /* skip _ */
    }
    *p++ = ch;
  }

  // if not at end-of-string or we ran out of buffer ...
  if (*s || p == q)
    return -1;

  /* cap with NUL */
  *p = 0;

  /* Run strtoll on buf to get the integer */
  char *endp;
  errno = 0;
  *ret = strtoll(buf, &endp, base);
  return (errno || *endp) ? -1 : 0;
}

// Assembly:
testq %rdi, %rdi
je 0x36e0
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %rbx
movzbl (%rdi), %edx
cmpl $0x2d, %edx
je 0x36d1
cmpl $0x2b, %edx
jne 0x36e4
movb %dl, 0x10(%rsp)
movb 0x1(%rdi), %dl
incq %rdi
pushq $0x1
popq %rcx
jmp 0x36e6
pushq $-0x1
popq %rax
retq
xorl %ecx, %ecx
pushq $-0x1
popq %rax
cmpb $0x5f, %dl
je 0x37c1
movzbl %dl, %edx
xorl %ebp, %ebp
cmpl $0x30, %edx
jne 0x3734
movzbl 0x1(%rdi), %edx
testl %edx, %edx
je 0x37a9
cmpl $0x62, %edx
je 0x3724
cmpl $0x6f, %edx
je 0x372d
cmpl $0x78, %edx
jne 0x37c1
addq $0x2, %rdi
pushq $0x10
popq %rbp
jmp 0x3734
addq $0x2, %rdi
pushq $0x2
popq %rbp
jmp 0x3734
addq $0x2, %rdi
pushq $0x8
popq %rbp
incq %rdi
movb -0x1(%rdi), %dl
testb %dl, %dl
je 0x3763
cmpq $0x63, %rcx
ja 0x3763
cmpb $0x5f, %dl
jne 0x375a
movzbl (%rdi), %edx
testl %edx, %edx
je 0x37c1
incq %rdi
cmpl $0x5f, %edx
jne 0x3737
jmp 0x37c1
movb %dl, 0x10(%rsp,%rcx)
incq %rcx
jmp 0x3734
testb %dl, %dl
setne %dl
cmpq $0x64, %rcx
sete %sil
orb %dl, %sil
jne 0x37c1
movb $0x0, 0x10(%rsp,%rcx)
callq 0x1050
movq %rax, %r14
andl $0x0, (%rax)
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl %ebp, %edx
callq 0x1150
testq %rbx, %rbx
je 0x379e
movq %rax, (%rbx)
cmpl $0x0, (%r14)
je 0x37b6
pushq $-0x1
popq %rax
jmp 0x37c1
xorl %eax, %eax
testq %rbx, %rbx
je 0x37c1
andq $0x0, (%rbx)
jmp 0x37c1
movq 0x8(%rsp), %rcx
xorl %eax, %eax
cmpb (%rcx), %al
sbbl %eax, %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: toml_rtod_ex
int toml_rtod_ex(toml_raw_t src, double *ret_, char *buf, int buflen) {
  if (!src)
    return -1;

  char *p = buf;
  char *q = p + buflen;
  const char *s = src;
  double dummy;
  double *ret = ret_ ? ret_ : &dummy;

  /* allow +/- */
  if (s[0] == '+' || s[0] == '-')
    *p++ = *s++;

  /* disallow +_1.00 */
  if (s[0] == '_')
    return -1;

  /* decimal point, if used, must be surrounded by at least one digit on each
   * side */
  {
    char *dot = strchr(s, '.');
    if (dot) {
      if (dot == s || !isdigit(dot[-1]) || !isdigit(dot[1]))
        return -1;
    }
  }

  /* zero must be followed by . or 'e', or NUL */
  if (s[0] == '0' && s[1] && !strchr("eE.", s[1]))
    return -1;

  /* just strip underscores and pass to strtod */
  while (*s && p < q) {
    int ch = *s++;
    if (ch == '_') {
      // disallow '__'
      if (s[0] == '_')
        return -1;
      // disallow last char '_'
      if (s[0] == 0)
        return -1;
      continue; /* skip _ */
    }
    *p++ = ch;
  }
  if (*s || p == q)
    return -1; /* reached end of string or buffer is full? */

  /* cap with NUL */
  *p = 0;

  /* Run strtod on buf to get the value */
  char *endp;
  errno = 0;
  *ret = strtod(buf, &endp);
  return (errno || *endp) ? -1 : 0;
}

// Assembly:
pushq $-0x1
popq %rax
testq %rdi, %rdi
je 0x390d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %r12
movzbl (%rdi), %ebx
cmpl $0x2d, %ebx
je 0x37fc
cmpl $0x2b, %ebx
jne 0x380d
leaq 0x1(%r14), %r15
movb %bl, (%r14)
movb 0x1(%r12), %bl
incq %r12
jmp 0x3810
movq %r14, %r15
cmpb $0x5f, %bl
je 0x38ff
movq %rsi, 0x8(%rsp)
pushq $0x2e
popq %rsi
movq %r12, %rdi
callq 0x10c0
testq %rax, %rax
je 0x3862
movq %rax, %r13
cmpq %r12, %rax
je 0x38fc
callq 0x11f0
movq (%rax), %rax
movsbq -0x1(%r13), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x38fc
movsbq 0x1(%r13), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x38fc
cmpb $0x30, %bl
jne 0x3885
movsbl 0x1(%r12), %esi
testl %esi, %esi
je 0x3885
leaq 0x196e(%rip), %rdi      # 0x51e6
pushq $0x4
popq %rdx
callq 0x1130
testq %rax, %rax
je 0x38fc
movslq %ebp, %rdx
addq %r14, %rdx
pushq $-0x1
popq %rax
incq %r12
testb %bl, %bl
je 0x38be
cmpq %rdx, %r15
jae 0x38be
cmpb $0x5f, %bl
jne 0x38b2
movzbl (%r12), %ebx
testl %ebx, %ebx
je 0x38ff
incq %r12
cmpl $0x5f, %ebx
jne 0x3891
jmp 0x38ff
movb %bl, (%r15)
incq %r15
movb (%r12), %bl
jmp 0x388e
testb %bl, %bl
setne %cl
cmpq %rdx, %r15
sete %dl
orb %cl, %dl
jne 0x38ff
movb $0x0, (%r15)
callq 0x1050
movq %rax, %rbx
andl $0x0, (%rax)
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x1090
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x38f7
movsd %xmm0, (%rax)
cmpl $0x0, (%rbx)
je 0x390e
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rcx
xorl %eax, %eax
cmpb (%rcx), %al
sbbl %eax, %eax
jmp 0x38ff
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: toml_string_at
toml_datum_t toml_string_at(const toml_array_t *arr, int idx) {
  toml_datum_t ret;
  memset(&ret, 0, sizeof(ret));
  ret.ok = (0 == toml_rtos(toml_raw_at(arr, idx), &ret.u.s));
  return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
testl %esi, %esi
js 0x3e7c
cmpl %esi, 0x10(%rdi)
jle 0x3e7c
movq 0x18(%rdi), %rax
movl %esi, %ecx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %rdi
jmp 0x3e7e
xorl %edi, %edi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x392f
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movq (%rbx), %rdx
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: toml_bool_at
toml_datum_t toml_bool_at(const toml_array_t *arr, int idx) {
  toml_datum_t ret;
  memset(&ret, 0, sizeof(ret));
  ret.ok = (0 == toml_rtob(toml_raw_at(arr, idx), &ret.u.b));
  return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
testl %esi, %esi
js 0x3ec3
cmpl %esi, 0x10(%rdi)
jle 0x3ec3
movq 0x18(%rdi), %rax
movl %esi, %ecx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %rdi
jmp 0x3ec5
xorl %edi, %edi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x3651
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movq (%rbx), %rdx
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: toml_int_at
toml_datum_t toml_int_at(const toml_array_t *arr, int idx) {
  toml_datum_t ret;
  memset(&ret, 0, sizeof(ret));
  ret.ok = (0 == toml_rtoi(toml_raw_at(arr, idx), &ret.u.i));
  return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
testl %esi, %esi
js 0x3f0a
cmpl %esi, 0x10(%rdi)
jle 0x3f0a
movq 0x18(%rdi), %rax
movl %esi, %ecx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %rdi
jmp 0x3f0c
xorl %edi, %edi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x36b1
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movq (%rbx), %rdx
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml.c
// Function: toml_double_at
toml_datum_t toml_double_at(const toml_array_t *arr, int idx) {
  toml_datum_t ret;
  memset(&ret, 0, sizeof(ret));
  ret.ok = (0 == toml_rtod(toml_raw_at(arr, idx), &ret.u.d));
  return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
testl %esi, %esi
js 0x3f51
cmpl %esi, 0x10(%rdi)
jle 0x3f51
movq 0x18(%rdi), %rax
movl %esi, %ecx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %rdi
jmp 0x3f53
xorl %edi, %edi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x391b
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movq (%rbx), %rdx
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
retq