LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/parse.c
// Function: parse_if_stmt
static struct ast *parse_if_stmt(struct parse *parse)
{
    if (!expect(parse, IF_TOK))
        goto err0;

    struct loc *line = get_linenr(parse);

    struct ast *expr = NULL;
    if (peek_tok(parse)->type != '{') {
        expr = parse_expr(parse);
        if (expr == NULL)
            goto err0;
    }

    struct ast *then_block = parse_block(parse);
    if (then_block == NULL)
        goto err1;

    struct ast *else_block = NULL;
    if (peek_tok(parse)->type == ELSE_TOK) {
	parse->pos++;

        else_block = peek_tok(parse)->type == IF_TOK ?
                parse_if_stmt(parse) : parse_block(parse);

        if (else_block == NULL)
            goto err2;
    }

    return ast_new_ast(line, IF_STMT, 3, expr, then_block, else_block);

err2:
    ast_unref(then_block);
err1:
    ast_unref(expr);
err0:
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rax
movslq 0x14(%rdi), %rcx
movq %rcx, %rdx
shlq $0x5, %rdx
cmpl $0x102, (%rax,%rdx)     # imm = 0x102
jne 0xb01c
movq %rdi, %r15
incq %rcx
movl %ecx, 0x14(%rdi)
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %rbx
cmpl $0x7b, (%rax,%rcx)
jne 0xaf45
xorl %r14d, %r14d
jmp 0xaf5b
movq %r15, %rdi
xorl %esi, %esi
callq 0xa102
movq %rax, %r14
testq %rax, %rax
je 0xb01c
leaq -0x5cf(%rip), %rdx      # 0xa993
movq %r15, %rdi
movl $0x7b, %esi
movl $0x7d, %ecx
movl $0x1, %r8d
callq 0x9efe
testq %rax, %rax
je 0xb014
movq %rax, %r12
movq (%r15), %rax
movslq 0x14(%r15), %rcx
movq %rcx, %rdx
shlq $0x5, %rdx
cmpl $0x121, (%rax,%rdx)     # imm = 0x121
jne 0xafbb
incq %rcx
movl %ecx, 0x14(%r15)
shlq $0x5, %rcx
cmpl $0x102, (%rax,%rcx)     # imm = 0x102
jne 0xafc0
movq %r15, %rdi
callq 0xaf05
jmp 0xafdf
xorl %r9d, %r9d
jmp 0xafe7
leaq -0x634(%rip), %rdx      # 0xa993
movq %r15, %rdi
movl $0x7b, %esi
movl $0x7d, %ecx
movl $0x1, %r8d
callq 0x9efe
movq %rax, %r9
testq %rax, %rax
je 0xb00c
movl $0x3, %edx
movq %rbx, %rdi
movl $0x4101, %esi           # imm = 0x4101
movq %r14, %rcx
movq %r12, %r8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2532
movq %r12, %rdi
callq 0x26cf
movq %r14, %rdi
callq 0x26cf
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/rope.c
// Function: rope_indent
struct rope *rope_indent(void)
{
    struct rope *rope = malloc(sizeof *rope);
    rope->leaf = true;
    rope->val.s = rope_buf.data + rope_buf.n;
    
    size_t i = 0;
    while (i < zc_indent_level) {
        for (size_t j = 0; j < 4; ++j) {
            rope->val.s[i++] = ' ';
            rope_buf.n += 4;
        }
    }
    rope->val.s[i] = '\0';
    rope_buf.n++;

    return rope;
}

// Assembly:
pushq %rax
movl $0x18, %edi
callq 0x2160
movb $0x1, (%rax)
leaq 0x8db3(%rip), %rcx      # 0x13e28
addq 0x108dac(%rip), %rcx    # 0x113e28
movq %rcx, 0x8(%rax)
leaq 0x8d4d(%rip), %rdx      # 0x13dd4
movslq (%rdx), %rsi
testq %rsi, %rsi
je 0xb0c3
xorl %r8d, %r8d
movq %r8, %rdx
movq %rcx, %r8
xorl %edi, %edi
movb $0x20, (%r8,%rdx)
addq $0x4, 0x108d81(%rip)    # 0x113e28
decq %rdi
incq %r8
cmpq $-0x4, %rdi
jne 0xb09a
movq %rdx, %r8
subq %rdi, %r8
cmpq %rsi, %r8
jb 0xb092
subq %rdi, %rdx
jmp 0xb0c5
xorl %edx, %edx
movb $0x0, (%rcx,%rdx)
incq 0x108d58(%rip)          # 0x113e28
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/rope.c
// Function: rope_new_tree
struct rope *rope_new_tree(struct rope *left, struct rope *right)
{
    struct rope *rope = malloc(sizeof *rope);
    rope->leaf = false;
    rope->val.childs[0] = left;
    rope->val.childs[1] = right;

    return rope;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x18, %edi
callq 0x2160
movb $0x0, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/rope.c
// Function: rope_new_fmt
struct rope *rope_new_fmt(const char *fmt, ...)
{
    struct rope *rope = malloc(sizeof *rope);
    rope->leaf = true;
    rope->val.s = rope_buf.data + rope_buf.n;

    va_list va;
    va_start(va, fmt);

    char *data = rope_buf.data + rope_buf.n;
    size_t n_left = sizeof rope_buf.data - rope_buf.n;

    size_t n_written = vsnprintf(data, n_left, fmt, va) + 1;
    if (n_written > n_left)
        fatal(NULL, "not enough space in rope buffer");

    rope_buf.n += n_written;

    va_end(va);

    return rope;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %r14
leaq 0x20(%rsp), %r15
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0xb1d1
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movl $0x18, %edi
callq 0x2160
movq %rax, %rbx
movb $0x1, (%rax)
leaq 0x8c40(%rip), %rdi      # 0x13e28
movq 0x108c39(%rip), %rax    # 0x113e28
addq %rdi, %rax
movq %rax, 0x8(%rbx)
movq %rsp, %rcx
movq %r15, 0x10(%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
movq 0x108c0b(%rip), %rax    # 0x113e28
addq %rax, %rdi
movl $0x100000, %r15d        # imm = 0x100000
subq %rax, %r15
movq %r15, %rsi
movq %r14, %rdx
callq 0x2080
incl %eax
cltq
cmpq %rax, %r15
jb 0xb254
addq %rax, 0x108be4(%rip)    # 0x113e28
movq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3682(%rip), %rsi      # 0xe8dd
xorl %edi, %edi
xorl %eax, %eax
callq 0x5011
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/rope.c
// Function: rope_print_to_file
void rope_print_to_file(struct rope *rope, FILE *fp)
{
    if (!rope)
        return;

    if (rope->leaf) {
        fputs(rope->val.s, fp);
        return;
    }

    rope_print_to_file(rope->val.childs[0], fp);
    rope_print_to_file(rope->val.childs[1], fp);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %r14, %r14
je 0xb28b
movq 0x8(%r14), %rdi
cmpb $0x1, (%r14)
je 0xb293
movq %rbx, %rsi
callq 0xb264
movq 0x10(%r14), %r14
jmp 0xb26e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20e0
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/scope.c
// Function: scope_new
struct scope *scope_new(struct scope *parent, size_t n_syms, size_t n_types)
{
    struct scope *scope = malloc(sizeof *scope);
    scope->symtbl = strmap_new(n_syms);
    scope->typetbl = strmap_new(n_types);
    scope->parent = parent;
    return scope;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x18, %edi
callq 0x2160
movq %rax, %r12
movq %r14, %rdi
callq 0xb3cc
movq %rax, (%r12)
movq %rbx, %rdi
callq 0xb3cc
movq %rax, 0x8(%r12)
movq %r15, 0x10(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/scope.c
// Function: scope_get_sym
struct sym *scope_get_sym(struct scope *scope, const char *name)
{
    struct sym *sym = strmap_get(scope->symtbl, name);
    if (sym == NULL) {
        if (scope->parent == NULL)
            return NULL;
        return scope_get_sym(scope->parent, name);
    }
    return sym_res(sym);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%r14), %rdi
movq %rbx, %rsi
callq 0xb3ff
testq %rax, %rax
jne 0xb33d
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0xb31a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb5c8
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/scope.c
// Function: sym_type
struct type *sym_type(struct sym * sym)
{
    if (sym == NULL)
        return NULL;

    assert(sym->tag == TYPE_SYM);
    return ((struct type_sym *)sym)->type;
}

// Assembly:
testq %rdi, %rdi
je 0xb35b
cmpl $0x3, (%rdi)
jne 0xb35e
movq 0x10(%rdi), %rax
retq
xorl %eax, %eax
retq
pushq %rax
leaq 0x1e46(%rip), %rdi      # 0xd1ac
leaq 0x3590(%rip), %rsi      # 0xe8fd
leaq 0x3591(%rip), %rcx      # 0xe905
leaq 0x359f(%rip), %r8       # 0xe91a
movl $0x26, %edx
xorl %eax, %eax
callq 0x4f1c
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/scope.c
// Function: scope_get_type
struct type *scope_get_type(struct scope *scope, const char *name)
{
    struct sym *sym = strmap_get(scope->typetbl, name);
    if (sym == NULL) {
        if (scope->parent == NULL)
            return NULL;
        return scope_get_type(scope->parent, name);
    }
    return sym_type(sym_res(sym));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0xb3ff
testq %rax, %rax
jne 0xb3b5
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0xb391
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0xb5c8
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb34c
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/strmap.c
// Function: strmap_new
struct strmap *strmap_new(size_t n)
{
    struct strmap *map = malloc(sizeof *map);
    map->n = n;
    map->map = calloc(n, sizeof *map->map);

    return map;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, %edi
callq 0x2160
movq %rax, %r14
movq %rbx, (%rax)
movl $0x8, %esi
movq %rbx, %rdi
callq 0x20f0
movq %rax, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/strmap.c
// Function: strmap_get
void *strmap_get(struct strmap *map, const char *key)
{
    size_t h = strhash64(key) % map->n;
    for (struct strmap_e *e = map->map[h]; e != NULL; e = e->next) {
        if (strcmp(key, e->key) == 0)
            return e->val;
    }
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movabsq $-0x340d631b7bdddcdb, %r8 # imm = 0xCBF29CE484222325
movb (%rsi), %sil
testb %sil, %sil
je 0xb442
leaq 0x1(%rbx), %rcx
movabsq $0x100000001b3, %rdx    # imm = 0x100000001B3
movsbq %sil, %rax
xorq %r8, %rax
imulq %rdx, %rax
movb (%rcx), %sil
incq %rcx
movq %rax, %r8
testb %sil, %sil
jne 0xb427
jmp 0xb445
movq %r8, %rax
xorl %r14d, %r14d
xorl %edx, %edx
divq (%rdi)
movq 0x8(%rdi), %rax
movq (%rax,%rdx,8), %r15
testq %r15, %r15
je 0xb47b
xorl %r14d, %r14d
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x2100
testl %eax, %eax
je 0xb477
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0xb45d
jmp 0xb47b
movq 0x8(%r15), %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/strmap.c
// Function: strmap_add
void strmap_add(struct strmap *map, const char *key, void *val)
{
    int n = strhash64(key) % map->n;
    struct strmap_e *e = malloc(sizeof *e);

    e->key = strdup(key);
    e->val = val;
    e->next = map->map[n];

    map->map[n] = e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movabsq $-0x340d631b7bdddcdb, %rdi # imm = 0xCBF29CE484222325
movb (%rsi), %sil
testb %sil, %sil
je 0xb4d1
leaq 0x1(%r15), %rcx
movabsq $0x100000001b3, %rdx    # imm = 0x100000001B3
movsbq %sil, %rax
xorq %rdi, %rax
imulq %rdx, %rax
movb (%rcx), %sil
incq %rcx
movq %rax, %rdi
testb %sil, %sil
jne 0xb4b6
jmp 0xb4d4
movq %rdi, %rax
xorl %edx, %edx
divq (%r14)
movq %rdx, %r12
movl $0x18, %edi
callq 0x2160
movq %rax, %r13
movq %r15, %rdi
callq 0x2220
movq %rax, (%r13)
movq %rbx, 0x8(%r13)
movq 0x8(%r14), %rax
movslq %r12d, %rcx
movq (%rax,%rcx,8), %rdx
movq %rdx, 0x10(%r13)
movq %r13, (%rax,%rcx,8)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/strmap.c
// Function: del_strmap_e
void del_strmap_e(struct strmap_e *e, void (*val_free)(void *))
{
    if (e == NULL)
        return;

    del_strmap_e(e->next, val_free);
    free(e->key);

    if (val_free != NULL)
        val_free(e->val);

    free(e);
}

// Assembly:
testq %rdi, %rdi
je 0xb551
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0xb516
movq (%rbx), %rdi
callq 0x2030
testq %r14, %r14
je 0xb542
movq 0x8(%rbx), %rdi
callq *%r14
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2030
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/sym.c
// Function: sym_new
struct sym *sym_new(struct ast *ast)
{
    struct sym *sym = malloc(sizeof (struct decl_sym));

    sym->loc = ast;
    sym->tag = UNRES_SYM;

    return sym;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x28, %edi
callq 0x2160
movq %rbx, 0x8(%rax)
movl $0x0, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/sym.c
// Function: sym_new_type
struct sym *sym_new_type(struct type *type)
{
    struct type_sym *sym = malloc(sizeof *sym);

    sym->sym.loc = NULL;
    sym->sym.tag = TYPE_SYM;
    sym->type = type;

    return (struct sym *)sym;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x18, %edi
callq 0x2160
movq $0x0, 0x8(%rax)
movl $0x3, (%rax)
movq %rbx, 0x10(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/sym.c
// Function: sym_res
struct sym *sym_res(struct sym *sym)
{
    if (sym == NULL)
        return NULL;

    if (sym->tag != UNRES_SYM)
        return sym;

    switch (sym->loc->tag) {
        case DECL: {
            sym->tag = DECL_SYM;
            struct decl_sym *decl_sym = (struct decl_sym *)sym;
            decl_sym->type = NULL;
            decl_sym->type = type_from_ast(ast_ast(sym->loc, 1));
            decl_sym->c_name = strdup(ast_s(ast_ast(sym->loc, 0)));

            add_global_decl(decl_sym);
            return sym;
        }
        case TYPE_DEF: {
            sym->tag = TYPE_SYM;
            struct type_sym *type_sym = (struct type_sym *)sym;
            type_sym->type = new_selfref_type(type_sym);

            struct ast *ast = ast_ast(sym->loc, 1);

            if (ast == NULL) {
                type_sym->type = new_extern_type();
            } else {
                type_sym->type = type_from_ast(ast);
                if (!resolve_selfref(&type_sym->type, false))
                    fatal(sym->loc->loc, "type cannot reference itself in "
                            "this context");
                add_type_decl(type_sym->type);
            }

            return sym;
        }
        case ALIAS_DEF: {
            sym->tag = ALIAS_SYM;
            struct alias_sym *alias_sym = (struct alias_sym *)sym;
            alias_sym->ast = ast_ast(sym->loc, 1);
            return sym;
        }
        default:
            unreachable();
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xb649
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jne 0xb64b
movq 0x8(%rbx), %rdi
movl (%rdi), %eax
cmpl $0x4003, %eax           # imm = 0x4003
je 0xb6a2
cmpl $0x4002, %eax           # imm = 0x4002
je 0xb656
cmpl $0x4000, %eax           # imm = 0x4000
jne 0xb6c2
movl $0x1, (%rbx)
movq $0x0, 0x18(%rbx)
movl $0x1, %esi
callq 0x27c8
movq %rax, %rdi
callq 0xbc78
movq %rax, 0x18(%rbx)
movq 0x8(%rbx), %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x26d0
movq %rax, %rdi
callq 0x2220
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x41ef
jmp 0xb64b
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x3, (%rbx)
movq %rbx, %rdi
callq 0xba5c
leaq 0x10(%rbx), %r14
movq %rax, 0x10(%rbx)
movq 0x8(%rbx), %rdi
movl $0x1, %esi
callq 0x27c8
testq %rax, %rax
je 0xb6b8
movq %rax, %rdi
callq 0xbc78
movq %rax, (%r14)
movq %r14, %rdi
xorl %esi, %esi
callq 0xc3f2
testb %al, %al
je 0xb6e3
movq (%r14), %rdi
callq 0x4279
jmp 0xb64b
movl $0x2, (%rbx)
movl $0x1, %esi
callq 0x27c8
movq %rax, 0x10(%rbx)
jmp 0xb64b
callq 0xbb83
movq %rax, (%r14)
jmp 0xb64b
leaq 0x27f7(%rip), %rdi      # 0xdec0
leaq 0x3280(%rip), %rsi      # 0xe950
leaq 0x327f(%rip), %rcx      # 0xe956
movl $0x45, %edx
xorl %eax, %eax
callq 0x4f1c
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
leaq 0x3231(%rip), %rsi      # 0xe923
xorl %eax, %eax
callq 0x5011
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/sym.c
// Function: sym_from_ast
struct sym *sym_from_ast(struct ast *ast)
{
    if (ast->tag == DECL) {
        struct decl_sym *decl_sym = (struct decl_sym *)sym_new(ast);
        decl_sym->sym.loc = ast;
        decl_sym->sym.tag = DECL_SYM;
        decl_sym->type = type_from_ast(ast_ast(decl_sym->sym.loc, 1));
	decl_sym->type->tag |= LVAL_TYPE_FLAG;
        decl_sym->c_name = gen_c_ident();

        return (struct sym *)decl_sym;
    }
    abort();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x4000, (%rdi)         # imm = 0x4000
jne 0xb750
movq %rdi, %rbx
movl $0x28, %edi
callq 0x2160
movq %rax, %r14
movq %rbx, 0x8(%rax)
movl $0x1, (%rax)
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27c8
movq %rax, %rdi
callq 0xbc78
movq %rax, 0x18(%r14)
orb $0x4, 0x1(%rax)
callq 0x325f
movq %rax, 0x10(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x2040
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/type.c
// Function: sizeof_basic_type
size_t sizeof_basic_type(struct type *type)
{
    switch (type->tag & ~LVAL_TYPE_FLAG) {
        case INT8_TYPE:
        case UINT8_TYPE:
        case CHAR_TYPE:
        case BOOL_TYPE:
            return 1;

        case INT16_TYPE:
        case UINT16_TYPE:
            return 2;

        case UINT_TYPE:
        case INT_TYPE:
            return sizeof (int);

        case UINT32_TYPE:
        case INT32_TYPE:
            return 4;

        case SSIZE_TYPE:
        case SIZE_TYPE:
            return sizeof (size_t);

        case INT64_TYPE:
        case UINT64_TYPE:
            return 8;

        case INTPTR_TYPE:
        case UINTPTR_TYPE:
            return sizeof (intptr_t);

        case FLOAT_TYPE:
            return sizeof (float);

        case DOUBLE_TYPE:
            return sizeof (double);

        default:
            bug("Invalid argument to sizeof_basic_type: %x", type->tag);
    }
}

// Assembly:
movl (%rdi), %esi
movl %esi, %ecx
andl $0xfffffbff, %ecx       # imm = 0xFFFFFBFF
movl $0x1, %eax
cmpl $0x6001, %ecx           # imm = 0x6001
jg 0xb7ac
cmpl $0x2001, %ecx           # imm = 0x2001
jle 0xb7e2
cmpl $0x3001, %ecx           # imm = 0x3001
jle 0xb838
cmpl $0x3002, %ecx           # imm = 0x3002
je 0xb86d
cmpl $0x4002, %ecx           # imm = 0x4002
je 0xb867
cmpl $0x5002, %ecx           # imm = 0x5002
je 0xb867
jmp 0xb848
cmpl $0xa001, %ecx           # imm = 0xA001
jle 0xb7f9
cmpl $0xc001, %ecx           # imm = 0xC001
jle 0xb857
cmpl $0xc002, %ecx           # imm = 0xC002
je 0xb867
cmpl $0xd002, %ecx           # imm = 0xD002
je 0xb867
cmpl $0xe002, %ecx           # imm = 0xE002
je 0xb837
jmp 0xb848
cmpl $0x1001, %ecx           # imm = 0x1001
jg 0xb813
cmpl $0x2, %ecx
je 0xb86d
cmpl $0x80, %ecx
je 0xb837
jmp 0xb848
cmpl $0x8001, %ecx           # imm = 0x8001
jg 0xb825
cmpl $0x6002, %ecx           # imm = 0x6002
je 0xb867
cmpl $0x7002, %ecx           # imm = 0x7002
je 0xb86d
jmp 0xb848
cmpl $0x1002, %ecx           # imm = 0x1002
je 0xb837
cmpl $0x1004, %ecx           # imm = 0x1004
je 0xb86d
jmp 0xb848
cmpl $0x8002, %ecx           # imm = 0x8002
je 0xb837
cmpl $0x9002, %ecx           # imm = 0x9002
je 0xb873
jmp 0xb848
retq
cmpl $0x2002, %ecx           # imm = 0x2002
je 0xb873
cmpl $0x2004, %ecx           # imm = 0x2004
je 0xb867
pushq %rax
leaq 0x3120(%rip), %rdi      # 0xe970
xorl %eax, %eax
callq 0x4f1c
cmpl $0xa002, %ecx           # imm = 0xA002
je 0xb86d
cmpl $0xb002, %ecx           # imm = 0xB002
jne 0xb848
movl $0x8, %eax
retq
movl $0x4, %eax
retq
movl $0x2, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/type.c
// Function: basic_type_c_name
const char *basic_type_c_name(struct type *type)
{
    switch (type->tag & ~LVAL_TYPE_FLAG) {
        case EXTERN_TYPE:
        case VOID_TYPE:
            return "void";

        case CHAR_TYPE:
            return "char";

        case BOOL_TYPE:
            return "_Bool";

        case UINT_TYPE:
        case UINT8_TYPE:
        case UINT16_TYPE:
        case UINT32_TYPE:
        case UINT64_TYPE:
        case SIZE_TYPE:
        case UINTPTR_TYPE:
            return int_to_c_type(false, sizeof_basic_type(type));

        case INT_TYPE:
        case INT8_TYPE:
        case INT16_TYPE:
        case INT32_TYPE:
        case INT64_TYPE:
        case SSIZE_TYPE:
        case INTPTR_TYPE:
            return int_to_c_type(true, sizeof_basic_type(type));

        case FLOAT_TYPE:
            return "float";

        case DOUBLE_TYPE:
            return "double";

        default:
            bug("Invalid argument to basic_type_c_name: %x", type->tag);
    }
}

// Assembly:
pushq %rax
movl (%rdi), %esi
movl %esi, %ecx
andl $0xfffffbff, %ecx       # imm = 0xFFFFFBFF
cmpl $0x5001, %ecx           # imm = 0x5001
jg 0xb94a
cmpl $0x1003, %ecx           # imm = 0x1003
jg 0xb987
leaq 0x26cc(%rip), %rax      # 0xdfe4
cmpl $0x7f, %ecx
jle 0xb9d9
cmpl $0x80, %ecx
je 0xba3c
cmpl $0x200, %ecx            # imm = 0x200
je 0xba4c
cmpl $0x1002, %ecx           # imm = 0x1002
je 0xba07
jmp 0xba4e
cmpl $0xa001, %ecx           # imm = 0xA001
jg 0xb9b0
cmpl $0x7001, %ecx           # imm = 0x7001
jle 0xb9e5
cmpl $0x7002, %ecx           # imm = 0x7002
je 0xba23
cmpl $0x8002, %ecx           # imm = 0x8002
je 0xba23
cmpl $0x9002, %ecx           # imm = 0x9002
je 0xba23
jmp 0xba4e
cmpl $0x2003, %ecx           # imm = 0x2003
jle 0xb9f7
cmpl $0x2004, %ecx           # imm = 0x2004
je 0xba45
cmpl $0x3002, %ecx           # imm = 0x3002
je 0xba07
cmpl $0x4002, %ecx           # imm = 0x4002
je 0xba07
jmp 0xba4e
cmpl $0xc001, %ecx           # imm = 0xC001
jle 0xba13
cmpl $0xc002, %ecx           # imm = 0xC002
je 0xba23
cmpl $0xd002, %ecx           # imm = 0xD002
je 0xba23
cmpl $0xe002, %ecx           # imm = 0xE002
jne 0xba4e
leaq 0x2fe1(%rip), %rax      # 0xe9b8
jmp 0xba4c
cmpl $0x1, %ecx
je 0xba4c
cmpl $0x2, %ecx
je 0xba07
jmp 0xba4e
cmpl $0x5002, %ecx           # imm = 0x5002
je 0xba07
cmpl $0x6002, %ecx           # imm = 0x6002
je 0xba07
jmp 0xba4e
cmpl $0x1004, %ecx           # imm = 0x1004
je 0xba33
cmpl $0x2002, %ecx           # imm = 0x2002
jne 0xba4e
callq 0xb758
movl $0x1, %edi
jmp 0xba2a
cmpl $0xa002, %ecx           # imm = 0xA002
je 0xba23
cmpl $0xb002, %ecx           # imm = 0xB002
jne 0xba4e
callq 0xb758
xorl %edi, %edi
movq %rax, %rsi
popq %rax
jmp 0xb879
leaq 0x1ebb(%rip), %rax      # 0xd8f5
jmp 0xba4c
leaq 0x2fa9(%rip), %rax      # 0xe9ec
jmp 0xba4c
leaq 0x1eaf(%rip), %rax      # 0xd8fb
popq %rcx
retq
leaq 0x2f9d(%rip), %rdi      # 0xe9f2
xorl %eax, %eax
callq 0x4f1c
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/type.c
// Function: new_selfref_type
struct type *new_selfref_type(struct type_sym *sym)
{
    struct selfref_type *type = malloc(sizeof *type);
    type->type.tag = SELFREF_TYPE_FLAG;
    type->sym = sym;

    return (struct type *)type;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x10, %edi
callq 0x2160
movl $0x100, (%rax)          # imm = 0x100
movq %rbx, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/type.c
// Function: new_ptr_type
struct type *new_ptr_type(struct type *to)
{
    struct ptr_type *type = malloc(sizeof *type);
    type->type.tag = PTR_TYPE;
    type->to = to;

    return (struct type *)type;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x10, %edi
callq 0x2160
movl $0x1008, (%rax)         # imm = 0x1008
movq %rbx, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/type.c
// Function: new_array_type
struct type *new_array_type(struct type *of, size_t len)
{
    struct array_type *type = malloc(sizeof *type);
    type->type.tag = ARRAY_TYPE_FLAG;
    type->of = of;
    type->len = len;

    return (struct type *)type;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x18, %edi
callq 0x2160
movl $0x10, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/type.c
// Function: new_func_type
struct type *new_func_type(struct type *ret, size_t n_params,
        struct type *params[], bool has_vararg)
{
    struct func_type *type = malloc(sizeof *type +
            n_params * sizeof *type->params);
    type->type.tag = FUNC_TYPE_FLAG;
    type->ret = ret;
    type->n_params = n_params;
    type->has_vararg = has_vararg;
    
    for (size_t i = 0; i < n_params; i++) {
        type->params[i] = params[i];
    }

    return (struct type *)type;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
leaq 0x20(,%rsi,8), %rdi
callq 0x2160
movq %rax, %r15
movl $0x20, (%rax)
movq %r12, 0x8(%rax)
movq %r14, 0x10(%rax)
movb %bpl, 0x18(%rax)
testq %r14, %r14
je 0xbb0a
movq %r15, %rdi
addq $0x20, %rdi
shlq $0x3, %r14
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2150
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/type.c
// Function: new_struct_type
struct type *new_struct_type(size_t n_fields, struct field fields[],
        char *cname)
{
    struct struct_type *type = malloc(sizeof *type +
            n_fields * sizeof *type->fields);

    type->type.tag = STRUCT_TYPE_FLAG;
    type->cname = cname;
    type->n_fields = n_fields;
    type->is_defined = false;
    type->id = zc_n_struct_types++;
    for (size_t i = 0; i < n_fields; i++)
        type->fields[i] = fields[i];

    return (struct type *)type;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r13
movq %rdi, %r14
shlq $0x4, %r14
leaq 0x20(%r14), %rdi
callq 0x2160
movq %rax, %r15
movl $0x40, (%rax)
movq %r12, 0x8(%rax)
movq %r13, 0x10(%rax)
movb $0x0, 0x18(%rax)
leaq 0x8284(%rip), %rax      # 0x13dd8
movl (%rax), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%rax)
movl %ecx, 0x1c(%r15)
testq %r13, %r13
je 0xbb76
movq %r15, %rdi
addq $0x20, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2150
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/type.c
// Function: new_extern_type
struct type *new_extern_type(void)
{
    struct extern_type *type = malloc(sizeof *type);
    type->type.tag = EXTERN_TYPE_FLAG;
    type->id = zc_n_struct_types++;
    return (struct type *)type;
}

// Assembly:
pushq %rax
movl $0x8, %edi
callq 0x2160
movl $0x200, (%rax)          # imm = 0x200
leaq 0x823d(%rip), %rcx      # 0x13dd8
movl (%rcx), %edx
leal 0x1(%rdx), %esi
movl %esi, (%rcx)
movl %edx, 0x4(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/type.c
// Function: type_dup
struct type *type_dup(struct type *t, enum type_tag flags)
{
    struct type *t2;
    switch (type_type(t->tag)) {
        case VOID_TYPE_FLAG:
        case BOOL_TYPE_FLAG:
        case INT_TYPE_FLAG:
        case FLOAT_TYPE_FLAG:
            t2 = malloc(sizeof *t2);
            memcpy(t2, t, sizeof *t2);
            break;
        case PTR_TYPE_FLAG:
            t2 = malloc(sizeof (struct ptr_type));
            memcpy(t2, t, sizeof (struct ptr_type));
            break;
        case ARRAY_TYPE_FLAG:
            t2 = malloc(sizeof (struct array_type));
            memcpy(t2, t, sizeof (struct array_type));
            break;
        case FUNC_TYPE_FLAG: {
            struct func_type *t_ = (struct func_type *)t;
            size_t n = sizeof *t_ + t_->n_params * sizeof *t_->params;
            struct func_type *t2_ = malloc(n);
            t2 = (struct type *)memcpy(t2_, t, n);
            break;
        }
        case STRUCT_TYPE_FLAG: {
            struct struct_type *t_ = (struct struct_type *)t;
            size_t n = sizeof *t_ + t_->n_fields * sizeof *t_->fields;
            struct struct_type *t2_ = malloc(n);
            t2 = (struct type *)memcpy(t2_, t, n);
            break;
        }
        default:
            unreachable();
    }
    t2->tag = (t2->tag & ~LVAL_TYPE_FLAG) | flags;
    return t2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl (%rdi), %ebp
movl %ebp, %eax
andl $0x3ff, %eax            # imm = 0x3FF
cmpl $0xf, %eax
jg 0xc2c5
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0xc2f2
cmpl $0x4, %eax
je 0xc2f2
cmpl $0x8, %eax
jne 0xc35f
movl $0x10, %edi
callq 0x2160
movq %rax, %r15
movups (%r14), %xmm0
movups %xmm0, (%rax)
jmp 0xc346
cmpl $0x3f, %eax
jg 0xc2e6
cmpl $0x10, %eax
je 0xc303
cmpl $0x20, %eax
jne 0xc35f
movq 0x10(%r14), %rax
leaq 0x20(,%rax,8), %r12
jmp 0xc32d
cmpl $0x40, %eax
je 0xc321
cmpl $0x80, %eax
jne 0xc35f
movl $0x4, %edi
callq 0x2160
movq %rax, %r15
movl %ebp, (%rax)
jmp 0xc346
movl $0x18, %edi
callq 0x2160
movq %rax, %r15
movups (%r14), %xmm0
movups %xmm0, (%rax)
movq 0x10(%r14), %rax
movq %rax, 0x10(%r15)
jmp 0xc346
movq 0x10(%r14), %r12
shlq $0x4, %r12
addq $0x20, %r12
movq %r12, %rdi
callq 0x2160
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2150
movl $0xfffffbff, %eax       # imm = 0xFFFFFBFF
andl (%r15), %eax
orl %ebx, %eax
movl %eax, (%r15)
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b5a(%rip), %rdi      # 0xdec0
leaq 0x262d(%rip), %rsi      # 0xe99a
leaq 0x2722(%rip), %rcx      # 0xea96
movl $0x1e6, %edx            # imm = 0x1E6
xorl %eax, %eax
callq 0x4f1c
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/type.c
// Function: resolve_selfref_struct
bool resolve_selfref_struct(struct struct_type *type, bool selfref_ok)
{
    size_t n_fields = type->n_fields;
    struct field *fields = type->fields;

    for (size_t i = 0; i < n_fields; i++) {
        struct field *field = &fields[i];

        if (is_ptr_type(field->type)) {
            if (!resolve_selfref(&ptr_type(field->type)->to, true))
                return false;
        } else {
            if (!resolve_selfref(&field->type, false))
                return false;
        }
    }
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x10(%rdi), %r15
testq %r15, %r15
sete %bl
je 0xc3e3
movq %rdi, %r14
movq %r15, %r12
negq %r12
addq $0x28, %r14
movl $0x1, %r13d
movq (%r14), %rdi
testb $0x8, (%rdi)
jne 0xc3b7
movq %r14, %rdi
xorl %esi, %esi
jmp 0xc3c0
addq $0x8, %rdi
movl $0x1, %esi
callq 0xc3f2
testb %al, %al
je 0xc3e3
cmpq %r15, %r13
setae %bl
leaq (%r12,%r13), %rax
incq %rax
incq %r13
addq $0x10, %r14
cmpq $0x1, %rax
jne 0xc3a8
andb $0x1, %bl
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/type.c
// Function: resolve_selfref
bool resolve_selfref(struct type **type, bool selfref_ok)
{
    switch (type_type((*type)->tag)) {
        case SELFREF_TYPE_FLAG:
            if (selfref_ok) {
                *type = selfref_type(*type)->sym->type;
            }
            return selfref_ok;
        case PTR_TYPE_FLAG:
            return resolve_selfref(&ptr_type(*type)->to, selfref_ok);
        case ARRAY_TYPE_FLAG:
            return resolve_selfref(&array_type(*type)->of, selfref_ok);
        case FUNC_TYPE_FLAG:
            for (size_t i = 0; i < func_type(*type)->n_params; i++)
                if (!resolve_selfref(&func_type(*type)->params[i], selfref_ok))
                    return false;
            return resolve_selfref(&func_type(*type)->ret, selfref_ok);
        case STRUCT_TYPE_FLAG:
            return resolve_selfref_struct(struct_type(*type), selfref_ok);
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movzbl %bl, %ebp
movq (%r14), %rdi
movl (%rdi), %ecx
movl %ecx, %edx
andl $0x3ff, %edx            # imm = 0x3FF
movb $0x1, %al
cmpl $0x1f, %edx
jg 0xc431
cmpl $0x8, %edx
je 0xc477
cmpl $0x10, %edx
jne 0xc4e4
testb $0x10, %cl
jne 0xc480
jmp 0xc51b
cmpl $0x20, %edx
jne 0xc4a3
movq (%r14), %rdi
testb $0x20, (%rdi)
je 0xc4f3
movq $-0x1, %r15
movl $0x20, %r12d
movq 0x10(%rdi), %r13
incq %r15
cmpq %r13, %r15
jae 0xc491
addq %r12, %rdi
movl %ebp, %esi
callq 0xc3f2
testb %al, %al
je 0xc48c
addq $0x8, %r12
movq (%r14), %rdi
testb $0x20, (%rdi)
jne 0xc44f
jmp 0xc4f3
testb $0x8, %cl
je 0xc53e
addq $0x8, %rdi
movq %rdi, %r14
jmp 0xc405
cmpq %r13, %r15
jb 0xc4e2
movq (%r14), %r14
testb $0x20, (%r14)
je 0xc4f3
addq $0x8, %r14
jmp 0xc405
cmpl $0x40, %edx
je 0xc4cd
cmpl $0x100, %edx            # imm = 0x100
jne 0xc4e4
testb %bl, %bl
je 0xc4c9
btl $0x8, %ecx
jae 0xc561
movq 0x8(%rdi), %rax
movq 0x10(%rax), %rax
movq %rax, (%r14)
movl %ebx, %eax
jmp 0xc4e4
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc380
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcb2(%rip), %rdi       # 0xd1ac
leaq 0x2499(%rip), %rsi      # 0xe99a
leaq 0x2548(%rip), %rcx      # 0xea50
leaq 0x2551(%rip), %r8       # 0xea60
movl $0xec, %edx
xorl %eax, %eax
callq 0x4f1c
leaq 0xc8a(%rip), %rdi       # 0xd1ac
leaq 0x2471(%rip), %rsi      # 0xe99a
leaq 0x2504(%rip), %rcx      # 0xea34
leaq 0x250e(%rip), %r8       # 0xea45
movl $0xe6, %edx
jmp 0xc514
leaq 0xc67(%rip), %rdi       # 0xd1ac
leaq 0x244e(%rip), %rsi      # 0xe99a
leaq 0x24c9(%rip), %rcx      # 0xea1c
leaq 0x24d1(%rip), %r8       # 0xea2b
movl $0xe0, %edx
jmp 0xc514
leaq 0xc44(%rip), %rdi       # 0xd1ac
leaq 0x242b(%rip), %rsi      # 0xe99a
leaq 0x24f4(%rip), %rcx      # 0xea6a
leaq 0x2500(%rip), %r8       # 0xea7d
movl $0xfc, %edx
jmp 0xc514
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/client.c
// Function: strlwr
void strlwr(char *s) {
	while(*s) {
		if('A' <= *s && *s <= 'Z')
			*s = *s - 'A' + 'a';
		s ++;
	}
}

// Assembly:
movb (%rdi), %al
testb %al, %al
je 0x24c0
pushq %rbp
movq %rsp, %rbp
incq %rdi
leal -0x41(%rax), %ecx
cmpb $0x19, %cl
ja 0x24b6
orb $0x20, %al
movb %al, -0x1(%rdi)
movb (%rdi), %al
incq %rdi
testb %al, %al
jne 0x24a9
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/client.c
// Function: connect_to_server
int connect_to_server() {
	int sockfd = socket(AF_INET, SOCK_STREAM, 0);

	if(sockfd < 0) {
		eprintf("Create Socket Failed!\n");
	}

	struct sockaddr_in servaddr;
	memset(&servaddr, 0, sizeof(servaddr));

	servaddr.sin_family = AF_INET;
	servaddr.sin_port = htons(PORT);
	servaddr.sin_addr.s_addr = inet_addr(server_addr);

	if(connect(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) == -1) {
		eprintf("Can Not Connect To Server %s!\n", server_addr);
	}

	return sockfd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2210
testl %eax, %eax
js 0x2524
movl %eax, %ebx
xorps %xmm0, %xmm0
leaq -0x20(%rbp), %r14
movaps %xmm0, (%r14)
movl $0x50c30002, (%r14)     # imm = 0x50C30002
leaq 0x4e46(%rip), %rdi      # 0x7342
callq 0x2110
movl %eax, 0x4(%r14)
movl %ebx, %edi
movq %r14, %rsi
movl $0x10, %edx
callq 0x21e0
cmpl $-0x1, %eax
je 0x2529
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x2264
callq 0x2230
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/client.c
// Function: wrap_send
void wrap_send(client_message_t *pcm) {
	size_t total_len = 0;
	while(total_len < sizeof(client_message_t)) {
		size_t len = send(client_fd, pcm + total_len, sizeof(client_message_t) - total_len, 0);
		if(len < 0) {
			loge("broken pipe\n");
		}

		total_len += len;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movl 0x7c17(%rip), %edi      # 0xa158
leaq (%r14,%r14,2), %rsi
shlq $0x4, %rsi
addq %rbx, %rsi
movl $0x30, %edx
subq %r14, %rdx
xorl %ecx, %ecx
callq 0x20a0
addq %rax, %r14
cmpq $0x30, %r14
jb 0x253b
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/client.c
// Function: wrap_recv
void wrap_recv(server_message_t *psm) {
	size_t total_len = 0;
	while(total_len < sizeof(server_message_t)) {
		size_t len = recv(client_fd, psm + total_len, sizeof(server_message_t) - total_len, 0);
		if(len < 0) {
			loge("broken pipe\n");
		}

		total_len += len;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movl $0x1a3, %r15d           # imm = 0x1A3
movl 0x7bd3(%rip), %edi      # 0xa158
imulq $0x1a3, %r14, %rsi      # imm = 0x1A3
addq %rbx, %rsi
movl $0x1a3, %edx            # imm = 0x1A3
subq %r14, %rdx
xorl %ecx, %ecx
callq 0x2030
addq %rax, %r14
cmpq %r15, %r14
jb 0x257f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/client.c
// Function: write_log
void write_log(const char *format, ...) {
	FILE *fp = fopen("log.txt", "a+");

	va_list ap;
	va_start(ap, format);
	vfprintf(fp, format, ap);
	va_end(ap);

	fclose(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq -0xe0(%rbp), %r15
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0x280e
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
leaq 0x3cd0(%rip), %rdi      # 0x64e5
leaq 0x3cd1(%rip), %rsi      # 0x64ed
callq 0x2190
movq %rax, %r14
leaq -0x30(%rbp), %rdx
movq %r15, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x2070
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/client.c
// Function: accept_input
char *accept_input(const char *prompt) {
	char *line;
	show_cursor();
	do
	{
		bottom_bar_output(0, prompt);
		line = readline();
	}while(strncmp(line,"",1)==0);
	hide_cursor();
	return line;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x3bc7(%rip), %rdi      # 0x643a
xorl %eax, %eax
callq 0x20b0
xorl %edi, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x28a9
callq 0x2fa4
cmpb $0x0, (%rax)
je 0x287a
movq %rax, %r14
leaq 0x3b99(%rip), %rdi      # 0x6433
xorl %eax, %eax
callq 0x20b0
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/client.c
// Function: bottom_bar_output
void bottom_bar_output(int line, const char *format, ...) {
	assert(line <= 0);
	lock_cursor();
	set_cursor(0, SCR_H - 1 + line);
	for(int i = 0; i < scr_actual_w; i++)
		printf(" ");
	set_cursor(0, SCR_H - 1 + line);

	va_list ap;
	va_start(ap, format);
	vfprintf(stdout, format, ap);
	va_end(ap);

	fflush(stdout);

	unlock_cursor();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdx, -0xd0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %r8, -0xc0(%rbp)
movq %r9, -0xb8(%rbp)
testb %al, %al
je 0x2902
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
testl %edi, %edi
jg 0x29c6
movq %rsi, %rbx
movl %edi, %r14d
leaq 0x7919(%rip), %rdi      # 0xa230
callq 0x2200
addl $0x12, %r14d
leaq 0x3b03(%rip), %rdi      # 0x642a
xorl %r15d, %r15d
movl %r14d, %esi
movl $0x1, %edx
xorl %eax, %eax
callq 0x20b0
cmpl $0x0, 0x792c(%rip)      # 0xa26c
jle 0x2958
movl $0x20, %edi
callq 0x2040
incl %r15d
cmpl 0x7916(%rip), %r15d     # 0xa26c
jl 0x2942
leaq 0x3acb(%rip), %rdi      # 0x642a
movl %r14d, %esi
movl $0x1, %edx
xorl %eax, %eax
callq 0x20b0
leaq -0xe0(%rbp), %rax
leaq -0x30(%rbp), %rdx
movq %rax, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq 0x762f(%rip), %r14      # 0x9fc8
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x21b0
movq (%r14), %rdi
callq 0x2160
leaq 0x787d(%rip), %rdi      # 0xa230
callq 0x2150
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3adf(%rip), %rdi      # 0x64ac
leaq 0x3a8b(%rip), %rsi      # 0x645f
leaq 0x3adb(%rip), %rcx      # 0x64b6
movl $0x1d8, %edx            # imm = 0x1D8
callq 0x20c0
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/client.c
// Function: button_register
int button_register() {
	wlog("call button handler %s\n", __func__);
	wlogi("require name\n");
	char *name = accept_input("your name: ");
	wlogi("input name '%s'\n", name);

	char *password = accept_input("password: ");
	wlogi("input password '%s'\n", password);

	bottom_bar_output(0, "register your name '%s' to server...", name);

	client_message_t cm;
	memset(&cm, 0, sizeof(client_message_t));
	cm.command = CLIENT_COMMAND_USER_REGISTER;
	strncpy(cm.user_name, name, USERNAME_SIZE - 1);
	strncpy(cm.password, password, PASSWORD_SIZE - 1);
	wlogi("send register message to server\n");
	wrap_send(&cm);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq 0x7767(%rip), %rsi      # 0xa160
leaq 0x3698(%rip), %rdi      # 0x6098
leaq 0x37b2(%rip), %rcx      # 0x61b9
xorl %r15d, %r15d
movl $0xd9, %edx
xorl %eax, %eax
callq 0x27b3
movq 0x7743(%rip), %rsi      # 0xa160
leaq 0x36a0(%rip), %rdi      # 0x60c4
movl $0xda, %edx
xorl %eax, %eax
callq 0x27b3
leaq 0x36a6(%rip), %rdi      # 0x60dd
callq 0x2862
movq %rax, %rbx
movq 0x771a(%rip), %rsi      # 0xa160
leaq 0x369c(%rip), %rdi      # 0x60e9
movl $0xdc, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x27b3
leaq 0x36a2(%rip), %rdi      # 0x6105
callq 0x2862
movq %rax, %r14
movq 0x76ee(%rip), %rsi      # 0xa160
leaq 0x3697(%rip), %rdi      # 0x6110
movl $0xdf, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x27b3
leaq 0x373a(%rip), %rsi      # 0x61c9
xorl %edi, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x28a9
xorps %xmm0, %xmm0
leaq -0x4f(%rbp), %rdi
movaps %xmm0, -0x1(%rdi)
movaps %xmm0, 0x1f(%rdi)
movaps %xmm0, 0xf(%rdi)
movb $0x1, -0x1(%rdi)
movl $0x6, %edx
movq %rbx, %rsi
callq 0x2050
leaq -0x48(%rbp), %rdi
movl $0x6, %edx
movq %r14, %rsi
callq 0x2050
movq 0x7689(%rip), %rsi      # 0xa160
leaq 0x3710(%rip), %rdi      # 0x61ee
movl $0xe8, %edx
xorl %eax, %eax
callq 0x27b3
movl 0x7668(%rip), %edi      # 0xa158
leaq (%r15,%r15,2), %rax
shlq $0x4, %rax
leaq (%rax,%rbp), %rsi
addq $-0x50, %rsi
movl $0x30, %edx
subq %r15, %rdx
xorl %ecx, %ecx
callq 0x20a0
addq %rax, %r15
cmpq $0x30, %r15
jb 0x2aea
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/client.c
// Function: resume_and_exit
void resume_and_exit(int status) {
	send_command(CLIENT_COMMAND_USER_QUIT);
	wrap_set_term_attr(&raw_termio);
	set_cursor(0, SCR_H);
	show_cursor();
	close(client_fd);
	wlog("====================EXIT====================\n\n\n");
	exit(status);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %edi, %edi
callq 0x25b1
leaq 0x76f1(%rip), %rdi      # 0xa258
callq 0x2e1c
xorl %edi, %edi
movl $0x12, %esi
callq 0x2eea
callq 0x2f15
movl 0x75d5(%rip), %edi      # 0xa158
callq 0x20f0
movq 0x75d1(%rip), %rsi      # 0xa160
leaq 0x39cf(%rip), %rdi      # 0x6565
movl $0x225, %edx            # imm = 0x225
xorl %eax, %eax
callq 0x27b3
movl %ebx, %edi
callq 0x21d0
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/client.c
// Function: button_launch_battle
int button_launch_battle() {
	wlog("call button handler %s\n", __func__);
	wlogi("send `launch battle` message to server\n");
	global_serv_message=-1;
	send_command(CLIENT_COMMAND_LAUNCH_BATTLE);
	/* wait for server reply */
	do {
		if(global_serv_message == SERVER_RESPONSE_LAUNCH_BATTLE_SUCCESS
		|| global_serv_message == SERVER_RESPONSE_LAUNCH_BATTLE_FAIL)
			break;
	} while(1);
	wlog("wait until message=%s\n", server_message_s[global_serv_message]);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x75ac(%rip), %rsi      # 0xa160
leaq 0x34dd(%rip), %rdi      # 0x6098
leaq 0x3669(%rip), %rcx      # 0x622b
movl $0xf5, %edx
xorl %eax, %eax
callq 0x27b3
movq 0x758b(%rip), %rsi      # 0xa160
leaq 0x3664(%rip), %rdi      # 0x6240
movl $0xf6, %edx
xorl %eax, %eax
callq 0x27b3
movl $0xffffffff, 0x7576(%rip) # imm = 0xFFFFFFFF
movl $0x6, %edi
callq 0x25b1
movl 0x7566(%rip), %eax      # 0xa168
leal -0xd(%rax), %ecx
cmpl $0x2, %ecx
jae 0x2c33
movq 0x754f(%rip), %rsi      # 0xa160
leaq 0x6ee8(%rip), %rcx      # 0x9b00
movq (%rcx,%rax,8), %rcx
leaq 0x3556(%rip), %rdi      # 0x6179
movl $0xff, %edx
xorl %eax, %eax
callq 0x27b3
xorl %eax, %eax
popq %rbp
retq
jmp 0x2c33
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/client.c
// Function: button_invite_user
int button_invite_user() {
	wlog("call button handler %s\n", __func__);
	/* send invitation */
	wlogi("ask friend's name\n");
	char *name = accept_input("invite who to your battle: ");
	wlogi("friend name '%s'\n", name);
	client_message_t cm;
	memset(&cm, 0, sizeof(client_message_t));
	cm.command = CLIENT_COMMAND_LAUNCH_BATTLE;
	strncpy(cm.user_name, name, USERNAME_SIZE - 1);
	wlogi("send `launch battle` and invitation to server\n");
	global_serv_message=-1;
	wrap_send(&cm);
	/* wait for server reply */
	do {
		if(global_serv_message == SERVER_RESPONSE_LAUNCH_BATTLE_SUCCESS
		|| global_serv_message == SERVER_RESPONSE_LAUNCH_BATTLE_FAIL)
			break;
	} while(1);
	wlog("wait until message=%s\n", server_message_s[global_serv_message]);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq 0x7519(%rip), %rsi      # 0xa160
leaq 0x344a(%rip), %rdi      # 0x6098
leaq 0x361e(%rip), %rcx      # 0x6273
xorl %r14d, %r14d
movl $0x104, %edx            # imm = 0x104
xorl %eax, %eax
callq 0x27b3
movq 0x74f5(%rip), %rsi      # 0xa160
leaq 0x3614(%rip), %rdi      # 0x6286
movl $0x106, %edx            # imm = 0x106
xorl %eax, %eax
callq 0x27b3
leaq 0x361f(%rip), %rdi      # 0x62a4
callq 0x2862
movq %rax, %rbx
movq 0x74cc(%rip), %rsi      # 0xa160
leaq 0x3625(%rip), %rdi      # 0x62c0
movl $0x108, %edx            # imm = 0x108
movq %rax, %rcx
xorl %eax, %eax
callq 0x27b3
xorps %xmm0, %xmm0
leaq -0x3f(%rbp), %rdi
movaps %xmm0, -0x1(%rdi)
movaps %xmm0, 0x1f(%rdi)
movaps %xmm0, 0xf(%rdi)
movb $0x6, -0x1(%rdi)
movl $0x6, %edx
movq %rbx, %rsi
callq 0x2050
movq 0x748b(%rip), %rsi      # 0xa160
leaq 0x3601(%rip), %rdi      # 0x62dd
movl $0x10d, %edx            # imm = 0x10D
xorl %eax, %eax
callq 0x27b3
movl $0xffffffff, 0x7476(%rip) # imm = 0xFFFFFFFF
movl 0x7460(%rip), %edi      # 0xa158
leaq (%r14,%r14,2), %rax
shlq $0x4, %rax
leaq (%rax,%rbp), %rsi
addq $-0x40, %rsi
movl $0x30, %edx
subq %r14, %rdx
xorl %ecx, %ecx
callq 0x20a0
addq %rax, %r14
cmpq $0x30, %r14
jb 0x2cf2
movl 0x7442(%rip), %eax      # 0xa168
leal -0xd(%rax), %ecx
cmpl $0x2, %ecx
jae 0x2d5e
movq 0x742b(%rip), %rsi      # 0xa160
leaq 0x6dc4(%rip), %rcx      # 0x9b00
movq (%rcx,%rax,8), %rcx
leaq 0x3432(%rip), %rdi      # 0x6179
movl $0x116, %edx            # imm = 0x116
xorl %eax, %eax
callq 0x27b3
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x2d5e
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/client.c
// Function: button_join_battle
int button_join_battle() {
	wlog("call button handler %s\n", __func__);
	send_command(CLIENT_COMMAND_ACCEPT_BATTLE);
	user_state = USER_STATE_BATTLE;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x73f5(%rip), %rsi      # 0xa160
leaq 0x3326(%rip), %rdi      # 0x6098
leaq 0x359e(%rip), %rcx      # 0x6317
movl $0x11b, %edx            # imm = 0x11B
xorl %eax, %eax
callq 0x27b3
movl $0x8, %edi
callq 0x25b1
movl $0x3, 0x73d3(%rip)      # 0xa16c
xorl %eax, %eax
popq %rbp
retq