LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/parser.c
// Function: create_logical_and_expr_node
static LogicalAndExprNode* create_logical_and_expr_node(const Vector* vec, int* index) {
    LogicalAndExprNode* logical_and_expr_node = calloc(1, sizeof(LogicalAndExprNode));

    logical_and_expr_node->inclusive_or_expr_node = create_inclusive_or_expr_node(vec, index);
    if (logical_and_expr_node->inclusive_or_expr_node == NULL) {
        error("Failed to create inclusive-or-expression node.\n");
        return NULL;
    }

    const Token* token = vec->elements[*index];
    LogicalAndExprNode* current = logical_and_expr_node;
    while (token->type == TK_LOGAND) {
        ++(*index);

        LogicalAndExprNode* p_logical_and_expr_node = calloc(1, sizeof(LogicalAndExprNode));

        p_logical_and_expr_node->logical_and_expr_node  = current;
        p_logical_and_expr_node->inclusive_or_expr_node = create_inclusive_or_expr_node(vec, index);
        if (p_logical_and_expr_node->inclusive_or_expr_node == NULL) {
            error("Failed to create inclusive-or-expression node.\n");
            return NULL;
        }

        token = vec->elements[*index];
        current = p_logical_and_expr_node;
    }

    return current;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x624e
movq %rax, (%rbx)
testq %rax, %rax
je 0x622c
movq (%r15), %rax
movslq (%r14), %rcx
movq (%rax,%rcx,8), %r12
cmpl $0x38, (%r12)
jne 0x623c
incl (%r14)
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, %rbp
movq %rbx, 0x8(%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x624e
movq %rax, %r13
movq %rax, (%rbp)
testq %rax, %rax
je 0x6215
movq (%r15), %rax
movslq (%r14), %rcx
movq (%rax,%rcx,8), %r12
movq %rbp, %rbx
jmp 0x6223
leaq 0x4f13(%rip), %rdi      # 0xb12f
xorl %eax, %eax
callq 0x8a7c
testq %r13, %r13
jne 0x61cf
xorl %ebx, %ebx
jmp 0x623c
leaq 0x4efc(%rip), %rdi      # 0xb12f
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x8a7c
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_O1/chgzm[P]minic/parser.c
// Function: create_inclusive_or_expr_node
static InclusiveOrExprNode* create_inclusive_or_expr_node(const Vector* vec, int* index) {
    InclusiveOrExprNode* inclusive_or_expr_node = malloc(sizeof(InclusiveOrExprNode));

    inclusive_or_expr_node->inclusive_or_expr_node = NULL;
    inclusive_or_expr_node->exclusive_or_expr_node = create_exclusive_or_expr_node(vec, index);
    if (inclusive_or_expr_node->exclusive_or_expr_node  == NULL) {
        error("Failed to create exclusive-or-expression node.\n");
        return NULL;
    }

    return inclusive_or_expr_node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r12
movq %rdi, %r13
movl $0x10, %edi
callq 0x1100
movq %rax, %rbx
movq $0x0, 0x8(%rax)
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, %r14
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, %r15
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, %rbp
movl $0x0, (%rax)
movq %r13, %rdi
movq %r12, %rsi
callq 0x63ef
movq %rax, 0x8(%rbp)
testq %rax, %rax
je 0x6383
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq (%r13), %rax
movslq (%r12), %rcx
movq (%rax,%rcx,8), %r15
movq %rbp, 0x20(%rsp)
movl (%r15), %eax
addl $-0x33, %eax
cmpl $0x1, %eax
ja 0x6372
incl (%r12)
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, %rbx
movq %rbp, 0x10(%rax)
movq %r13, %rdi
movq %r12, %rsi
callq 0x63ef
movq %rax, 0x8(%rbx)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %r14
testq %r14, %r14
je 0x6341
movl (%r15), %eax
cmpl $0x33, %eax
je 0x6351
cmpl $0x34, %eax
jne 0x6358
movl $0x4, %eax
jmp 0x6356
leaq 0x4e9a(%rip), %rdi      # 0xb1e2
xorl %eax, %eax
callq 0x8a7c
jmp 0x6367
movl $0x3, %eax
movl %eax, (%rbx)
movq (%r13), %rax
movslq (%r12), %rcx
movq (%rax,%rcx,8), %r15
movq %rbx, %rbp
testq %r14, %r14
jne 0x62eb
xorl %ebp, %ebp
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %r14
movq 0x8(%rsp), %r15
jmp 0x6393
leaq 0x4e58(%rip), %rdi      # 0xb1e2
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x8a7c
movq %rbp, (%r15)
testq %rbp, %rbp
jne 0x63ac
leaq 0x4e14(%rip), %rdi      # 0xb1b6
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x8a7c
movq %r15, (%r14)
testq %r15, %r15
jne 0x63c5
leaq 0x4dd4(%rip), %rdi      # 0xb18f
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x8a7c
movq %r14, (%rbx)
testq %r14, %r14
jne 0x63dd
leaq 0x4d8b(%rip), %rdi      # 0xb15f
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x8a7c
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/parser.c
// Function: create_relational_expr_node
static RelationalExprNode* create_relational_expr_node(const Vector* vec, int* index) {
    RelationalExprNode* relational_expr_node = calloc(1, sizeof(RelationalExprNode));

    relational_expr_node->cmp_type             = CMP_NONE;
    relational_expr_node->shift_expr_node      = create_shift_expr(vec, index);
    if (relational_expr_node->shift_expr_node == NULL) {
        error("Failed to create shift-expression node.\n");
        return NULL;
    }
    
    RelationalExprNode* current = relational_expr_node;
    const Token* token = vec->elements[*index];
    while (token->type == TK_LANGLE || token->type == TK_RANGLE || token->type == TK_LE || token->type == TK_GE) {
        ++(*index);
    
        RelationalExprNode* parent = calloc(1, sizeof(EqualityExprNode));

        parent->relational_expr_node = current;
        parent->shift_expr_node      = create_shift_expr(vec, index);
        if (parent->shift_expr_node == NULL) {
            error("Failed to create shif-texpression node.\n");
            return NULL;
        }

        if      (token->type == TK_LANGLE) { parent->cmp_type = CMP_LT; }
        else if (token->type == TK_RANGLE) { parent->cmp_type = CMP_GT; }
        else if (token->type == TK_LE)     { parent->cmp_type = CMP_LE; }
        else if (token->type == TK_GE)     { parent->cmp_type = CMP_GE; }
     
        token = vec->elements[*index];
        current = parent;
    }

    return current;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, %r12
movl $0x0, (%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6512
movq %rax, 0x8(%r12)
testq %rax, %rax
je 0x64ef
movq (%r14), %rax
movslq (%rbx), %rcx
movq (%rax,%rcx,8), %r15
movl (%r15), %eax
cmpq $0x36, %rax
ja 0x6500
movabsq $0x60018000000000, %rcx # imm = 0x60018000000000
btq %rax, %rcx
jae 0x6500
incl (%rbx)
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, %rbp
movq %r12, 0x10(%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6512
movq %rax, %r13
movq %rax, 0x8(%rbp)
testq %rax, %rax
je 0x64a4
movl (%r15), %eax
cmpl $0x34, %eax
jg 0x64b4
cmpl $0x27, %eax
je 0x64c5
cmpl $0x28, %eax
jne 0x64d4
movl $0x2, %eax
jmp 0x64d1
leaq 0x4d8e(%rip), %rdi      # 0xb239
xorl %eax, %eax
callq 0x8a7c
jmp 0x64e1
cmpl $0x35, %eax
je 0x64cc
cmpl $0x36, %eax
jne 0x64d4
movl $0x6, %eax
jmp 0x64d1
movl $0x1, %eax
jmp 0x64d1
movl $0x5, %eax
movl %eax, (%rbp)
movq (%r14), %rax
movslq (%rbx), %rcx
movq (%rax,%rcx,8), %r15
movq %rbp, %r12
testq %r13, %r13
jne 0x643b
xorl %r12d, %r12d
jmp 0x6500
leaq 0x4d1a(%rip), %rdi      # 0xb210
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x8a7c
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/parser.c
// Function: create_shift_expr
static ShiftExprNode* create_shift_expr(const Vector* vec, int* index) {
    ShiftExprNode* shift_expr_node = calloc(1, sizeof(ShiftExprNode));

    shift_expr_node->additive_expr_node = create_additive_expr_node(vec, index);
    if (shift_expr_node->additive_expr_node == NULL) {
        error("Failed to additive-expression node.\n");
        return NULL;
    }

    return shift_expr_node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, %r12
movl $0x0, (%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x6621
movq %rax, 0x8(%r12)
testq %rax, %rax
je 0x65e6
movq %rbx, (%rsp)
movq (%r15), %rax
movslq (%r14), %rcx
movq (%rax,%rcx,8), %r13
movl (%r13), %eax
andl $-0x2, %eax
cmpl $0x18, %eax
jne 0x65e0
incl (%r14)
movl $0x18, %edi
callq 0x1100
movq %rax, %rbp
xorl %eax, %eax
cmpl $0x18, (%r13)
setne %al
addl $0xb, %eax
movl %eax, (%rbp)
movq %r12, 0x10(%rbp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x6621
movq %rax, %rbx
movq %rax, 0x8(%rbp)
testq %rax, %rax
je 0x65ca
movq (%r15), %rax
movslq (%r14), %rcx
movq (%rax,%rcx,8), %r13
movq %rbp, %r12
jmp 0x65d8
leaq 0x4cb6(%rip), %rdi      # 0xb287
xorl %eax, %eax
callq 0x8a7c
testq %rbx, %rbx
jne 0x6574
xorl %r12d, %r12d
movq (%rsp), %rbx
jmp 0x65f7
leaq 0x4c9a(%rip), %rdi      # 0xb287
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x8a7c
movq %r12, (%rbx)
testq %r12, %r12
jne 0x660f
leaq 0x4c5c(%rip), %rdi      # 0xb262
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x8a7c
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_O1/chgzm[P]minic/parser.c
// Function: create_multiplicative_expr_node
static MultiPlicativeExprNode* create_multiplicative_expr_node(const Vector* vec, int* index) {
    MultiPlicativeExprNode* multiplicative_expr_node = calloc(1, sizeof(MultiPlicativeExprNode));

    multiplicative_expr_node->operator_type  = OP_NONE;
    multiplicative_expr_node->cast_expr_node = create_cast_expr_node(vec, index);
    if (multiplicative_expr_node->cast_expr_node == NULL) {
        error("Failed to create cast-expression node.\n");
        return NULL;
    }

    MultiPlicativeExprNode* current = multiplicative_expr_node;
    const Token* token = vec->elements[*index];
    while (token->type == TK_ASTER || token->type == TK_SLASH || token->type == TK_PER) {
        ++(*index);

        MultiPlicativeExprNode* p_multiplicative_expr_node = malloc(sizeof(MultiPlicativeExprNode));
        p_multiplicative_expr_node->multiplicative_expr_node = current;
        p_multiplicative_expr_node->cast_expr_node           = create_cast_expr_node(vec, index);
        if (p_multiplicative_expr_node->cast_expr_node == NULL) {
            error("Failed to create cast-expression node.\n");
            return NULL;
        }

        if      (token->type == TK_ASTER) { p_multiplicative_expr_node->operator_type = OP_MUL; }
        else if (token->type == TK_SLASH) { p_multiplicative_expr_node->operator_type = OP_DIV; }
        else if (token->type == TK_PER)   { p_multiplicative_expr_node->operator_type = OP_MOD; }

        token = vec->elements[*index];
        current = p_multiplicative_expr_node;
    }

    return current;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, %r15
movl $0x0, (%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6728
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0x6705
movq (%r14), %rax
movslq (%rbx), %rcx
movq (%rax,%rcx,8), %r12
movl (%r12), %eax
cmpl $0x1d, %eax
ja 0x6716
movl $0x2c000000, %ecx       # imm = 0x2C000000
btl %eax, %ecx
jae 0x6716
incl (%rbx)
movl $0x18, %edi
callq 0x1100
movq %rax, %rbp
movq %r15, 0x10(%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6728
movq %rax, %r13
movq %rax, 0x8(%rbp)
testq %rax, %rax
je 0x66cb
movl (%r12), %eax
cmpl $0x1a, %eax
je 0x66e2
cmpl $0x1d, %eax
je 0x66db
cmpl $0x1b, %eax
jne 0x66ea
movl $0xe, %eax
jmp 0x66e7
leaq 0x4be7(%rip), %rdi      # 0xb2b9
xorl %eax, %eax
callq 0x8a7c
jmp 0x66f7
movl $0xf, %eax
jmp 0x66e7
movl $0xd, %eax
movl %eax, (%rbp)
movq (%r14), %rax
movslq (%rbx), %rcx
movq (%rax,%rcx,8), %r12
movq %rbp, %r15
testq %r13, %r13
jne 0x666c
xorl %r15d, %r15d
jmp 0x6716
leaq 0x4bad(%rip), %rdi      # 0xb2b9
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x8a7c
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_O1/chgzm[P]minic/parser.c
// Function: create_cast_expr_node
static CastExprNode* create_cast_expr_node(const Vector* vec, int* index) {
    CastExprNode* cast_expr_node = calloc(1, sizeof(CastExprNode));

    cast_expr_node->unary_expr_node = create_unary_expr_node(vec, index);
    if (cast_expr_node->unary_expr_node == NULL) {
        error("Failed to create unary-expression node.\n");
        return NULL;
    }

    return cast_expr_node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x6771
movq %rax, (%rbx)
testq %rax, %rax
jne 0x6768
leaq 0x4b82(%rip), %rdi      # 0xb2e1
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x8a7c
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/parser.c
// Function: create_param_declaration_node
static ParamDeclarationNode* create_param_declaration_node(const Vector* vec, int* index) {
    ParamDeclarationNode* param_declaration_node = calloc(1, sizeof(ParamDeclarationNode));

    param_declaration_node->decl_spec_nodes          = create_vector();

    while (is_declaration_specifier(vec, *index)) {
        DeclSpecifierNode* decl_spec_node = create_decl_specifier_node(vec, index);
        if (decl_spec_node == NULL) {
            error("Failed to create declaration-specifier node.\n");
            return NULL;
        }

        vector_push_back(param_declaration_node->decl_spec_nodes, decl_spec_node);
    }

    if (is_declarator(vec, *index)) {
        param_declaration_node->declarator_node = create_declarator_node(vec, index); 
    } 

    return param_declaration_node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, %rbx
xorl %eax, %eax
callq 0x8b08
movq %rax, %r12
movq %rax, (%rbx)
leaq 0x3ed1(%rip), %r13      # 0xaeb3
movslq (%r14), %rsi
movq (%r15), %rax
movq (%rax,%rsi,8), %rax
movl (%rax), %ebp
movq %r15, %rdi
callq 0x5ac1
testb %al, %al
jne 0x7002
andl $-0x9, %ebp
cmpl $0x4, %ebp
jne 0x7035
movq %r15, %rdi
movq %r14, %rsi
callq 0x5537
movq %rax, %rbp
testq %rax, %rax
je 0x7022
movq %r12, %rdi
movq %rbp, %rsi
callq 0x8b3b
jmp 0x702c
movq %r13, %rdi
xorl %eax, %eax
callq 0x8a7c
testq %rbp, %rbp
jne 0x6fe2
xorl %ebx, %ebx
jmp 0x705a
movslq (%r14), %rax
movq (%r15), %rcx
movq (%rcx,%rax,8), %rax
movl (%rax), %eax
cmpl $0x1a, %eax
je 0x704b
cmpl $0x3, %eax
jne 0x705a
movq %r15, %rdi
movq %r14, %rsi
callq 0x55b4
movq %rax, 0x8(%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_O1/chgzm[P]minic/parser.c
// Function: create_initializer_node
static InitializerNode* create_initializer_node(const Vector* vec, int* index) {
    InitializerNode* initializer_node = calloc(1, sizeof(InitializerNode));

    const Token* token = vec->elements[*index];
    if (token->type == TK_LBRCKT) {
        ++(*index); 

        initializer_node->initializer_list_node = create_initializer_list_node(vec, index);
        if (initializer_node->initializer_list_node == NULL) {
            error("Failed to create initializer-list node.\n");
            return NULL;
        }

        token = vec->elements[*index];
        if (token->type != TK_RBRCKT) {
            error("Invalid token[%d]=\"%s\".\n", *index, decode_token_type(token->type));
            return NULL;
        }
        ++(*index); 
    }
    else {
        initializer_node->assign_expr_node = create_assign_expr_node(vec, index);
        if (initializer_node->assign_expr_node == NULL) {
            error("Failed to create assignment-expression node.\n");
            return NULL;
        }
    }

    return initializer_node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, %rbx
movq (%r15), %rcx
movslq (%r14), %rax
movq (%rcx,%rax,8), %rcx
cmpl $0x23, (%rcx)
jne 0x79b4
incl %eax
movl %eax, (%r14)
movl $0x8, %edi
callq 0x1100
movq %rax, %r12
xorl %eax, %eax
callq 0x8b08
movq %rax, (%r12)
movq %r15, %rdi
movq %r14, %rsi
callq 0x78f5
testq %rax, %rax
jne 0x7976
leaq 0x3da0(%rip), %rdi      # 0xb6fc
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x8a7c
jmp 0x7991
incl (%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x78f5
movq (%r12), %rdi
movq %rax, %rsi
callq 0x8b3b
movq (%r15), %rax
movslq (%r14), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x30, (%rax)
je 0x7968
movq %r12, 0x8(%rbx)
testq %r12, %r12
je 0x79d0
movq (%r15), %rax
movslq (%r14), %r15
movq (%rax,%r15,8), %rax
movl (%rax), %edi
cmpl $0x24, %edi
jne 0x79e2
leal 0x1(%r15), %eax
movl %eax, (%r14)
jmp 0x79fd
movq %r15, %rdi
movq %r14, %rsi
callq 0x6e9d
movq %rax, (%rbx)
testq %rax, %rax
jne 0x79fd
leaq 0x39e0(%rip), %rdi      # 0xb3ae
jmp 0x79d7
leaq 0x3d49(%rip), %rdi      # 0xb720
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x8a7c
jmp 0x79fd
callq 0x8a51
leaq 0x3402(%rip), %rdi      # 0xadf0
xorl %ebx, %ebx
movl %r15d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8a7c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/util.c
// Function: read_file
char* read_file(const char* file_path) {
    FILE* fp = fopen(file_path, "r");
    if (fp == NULL) {
        return NULL;
    }

    fseek(fp, 0, SEEK_END);
    int fsize = ftell(fp);
    fseek(fp, 0, SEEK_SET);

    char* addr = calloc(fsize, sizeof(char) + 1);
    fread(addr, sizeof(char), fsize, fp);
    fclose(fp);

    return addr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x3240(%rip), %rsi      # 0xbcd9
callq 0x1140
testq %rax, %rax
je 0x8afc
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1120
movq %rbx, %rdi
callq 0x10f0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1120
movslq %r14d, %r15
movl $0x2, %esi
movq %r15, %rdi
callq 0x10c0
movq %rax, %r14
movl $0x1, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1080
movq %rbx, %rdi
callq 0x1090
jmp 0x8aff
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/util.c
// Function: create_vector
Vector* create_vector() {
    Vector* vec   = malloc(sizeof(Vector));
    vec->elements = calloc(16, sizeof(void*));
    vec->capacity = 16;
    vec->size     = 0;

    return vec;
}

// Assembly:
pushq %rbx
movl $0x10, %edi
callq 0x1100
movq %rax, %rbx
movl $0x10, %edi
movl $0x8, %esi
callq 0x10c0
movq %rax, (%rbx)
movabsq $0x1000000000, %rax     # imm = 0x1000000000
movq %rax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/util.c
// Function: vector_push_back
void vector_push_back(Vector* vec, void* e) {
    if (vec->size == vec->capacity) {
        vec->capacity *= 2;
        vec->elements = realloc(vec->elements, sizeof(void*) * vec->capacity);
    }

    vec->elements[vec->size] = e;
    ++(vec->size);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq 0xc(%rdi), %rsi
cmpl %esi, 0x8(%rdi)
jne 0x8b63
leal (%rsi,%rsi), %eax
movl %eax, 0xc(%rbx)
movq (%rbx), %rdi
shlq $0x4, %rsi
callq 0x1130
movq %rax, (%rbx)
movq (%rbx), %rax
movslq 0x8(%rbx), %rcx
movq %r14, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/util.c
// Function: create_stack
Stack* create_stack() {
    Stack* stack    = malloc(sizeof(Stack));
    stack->elements = calloc(16, sizeof(void*));
    stack->capacity = 16;
    stack->top      = -1;

    return stack;
}

// Assembly:
pushq %rbx
movl $0x10, %edi
callq 0x1100
movq %rax, %rbx
movl $0x10, %edi
movl $0x8, %esi
callq 0x10c0
movq %rax, (%rbx)
movabsq $0x10ffffffff, %rax     # imm = 0x10FFFFFFFF
movq %rax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/util.c
// Function: stack_push
void stack_push(Stack* stack, void* e) {
    ++(stack->top);
    if (stack->top == stack->capacity) {
        stack->capacity *= 2;
        stack->elements = realloc(stack->elements, sizeof(void*) * stack->capacity);
    }

    stack->elements[stack->top] = e;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rdi), %eax
incl %eax
movl %eax, 0x8(%rdi)
movslq 0xc(%rdi), %rsi
cmpl %esi, %eax
jne 0x8bdf
leal (%rsi,%rsi), %eax
movl %eax, 0xc(%r14)
movq (%r14), %rdi
shlq $0x4, %rsi
callq 0x1130
movq %rax, (%r14)
movq (%r14), %rax
movslq 0x8(%r14), %rcx
movq %rbx, (%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/util.c
// Function: create_intstack
IntStack* create_intstack() {
    IntStack* stack = malloc(sizeof(Stack));
    stack->elements = malloc(sizeof(int) * 16);
    stack->capacity = 16;
    stack->top      = -1;

    return stack;
}

// Assembly:
pushq %rbx
movl $0x10, %edi
callq 0x1100
movq %rax, %rbx
movl $0x40, %edi
callq 0x1100
movq %rax, (%rbx)
movabsq $0x10ffffffff, %rax     # imm = 0x10FFFFFFFF
movq %rax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/util.c
// Function: intstack_push
void intstack_push(IntStack* stack, int e) {
    ++(stack->top);
    if (stack->top == stack->capacity) {
        stack->capacity *= 2;
        stack->elements = realloc(stack->elements, sizeof(int) * stack->capacity);
    }

    stack->elements[stack->top] = e;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0x8(%rdi), %eax
incl %eax
movl %eax, 0x8(%rdi)
movslq 0xc(%rdi), %rsi
cmpl %esi, %eax
jne 0x8c67
leal (%rsi,%rsi), %eax
movl %eax, 0xc(%r14)
movq (%r14), %rdi
shlq $0x3, %rsi
callq 0x1130
movq %rax, (%r14)
movq (%r14), %rax
movslq 0x8(%r14), %rcx
movl %ebx, (%rax,%rcx,4)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/util.c
// Function: create_strptrmap
StrPtrMap* create_strptrmap(int capacity) {
    StrPtrMap* map = malloc(sizeof(StrPtrMap));
    map->size      = 0;
    map->capacity  = capacity;
    map->entries   = calloc(capacity, sizeof(StrPtrMapEntry*));

    return map;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x10, %edi
callq 0x1100
movq %rax, %r14
movl $0x0, 0x8(%rax)
movl %ebx, 0xc(%rax)
movslq %ebx, %rdi
movl $0x8, %esi
callq 0x10c0
movq %rax, (%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/util.c
// Function: strptrmap_put
void strptrmap_put(StrPtrMap* map, const char* key, void* val) {
    const int hash  = calc_hash(key);
    const int index = hash % map->capacity;
    if (map->entries[index] == NULL) {
        map->entries[index]       = calloc(1, sizeof(StrPtrMapEntry));
        map->entries[index]->key  = strdup(key);
        map->entries[index]->val  = val;
        map->entries[index]->next = NULL;
    }
    else {
        StrPtrMapEntry* current = map->entries[index];
        while (current->next != NULL) {
            current = current->next;
        }
        current->next       = calloc(1, sizeof(StrPtrMapEntry));
        current->next->key  = strdup(key);
        current->next->val  = val;
        current->next->next = NULL;
    }

    ++(map->size);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movb (%rsi), %cl
testb %cl, %cl
je 0x8cf9
leaq 0x1(%r15), %rdx
xorl %eax, %eax
movsbl %cl, %ecx
addl %ecx, %eax
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x8ce9
jmp 0x8cfb
xorl %eax, %eax
cltd
idivl 0xc(%rbx)
movq (%rbx), %r13
movslq %edx, %r12
movq (%r13,%r12,8), %rax
testq %rax, %rax
je 0x8d44
movq %rax, %r13
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x8d0f
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, %r12
movq %rax, 0x10(%r13)
movq %r15, %rdi
callq 0x1190
movq %rax, (%r12)
movq %r14, 0x8(%r12)
jmp 0x8d76
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, (%r13,%r12,8)
movq %r15, %rdi
callq 0x1190
movq (%rbx), %rcx
movq (%rcx,%r12,8), %rdx
movq %rax, (%rdx)
movq (%rcx,%r12,8), %rax
movq %r14, 0x8(%rax)
movq (%rcx,%r12,8), %r12
movq $0x0, 0x10(%r12)
incl 0x8(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/util.c
// Function: strptrmap_contains
bool strptrmap_contains(StrPtrMap* map, const char* key) {
    const int hash  = calc_hash(key);
    const int index = hash % map->capacity;

    if (map->entries[index] == NULL) {
        return false;
    }
    else {
        StrPtrMapEntry* current = map->entries[index];
        while (current != NULL) {
            if (strcmp(current->key, key) == 0) {
                return true;
            }
            current = current->next;
        }

        return false;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb (%rsi), %cl
testb %cl, %cl
je 0x8daf
leaq 0x1(%rbx), %rdx
xorl %eax, %eax
movsbl %cl, %ecx
addl %ecx, %eax
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x8d9f
jmp 0x8db1
xorl %eax, %eax
cltd
idivl 0xc(%rdi)
movq (%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0x8de1
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x10d0
testl %eax, %eax
je 0x8de5
movq 0x10(%r14), %r14
testq %r14, %r14
setne %al
jne 0x8dc4
jmp 0x8de7
xorl %eax, %eax
jmp 0x8de7
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/util.c
// Function: strptrmap_get
void* strptrmap_get(StrPtrMap* map, const char* key) {
    const int hash  = calc_hash(key);
    const int index = hash % map->capacity;
    if (map->entries[index] == NULL) {
        return NULL;
    }
    else {
        StrPtrMapEntry* current = map->entries[index];
        while (current != NULL) {
            if (strcmp(current->key, key) == 0) {
                return current->val;
            }

            current = current->next;
        }

        return NULL;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movb (%rsi), %cl
testb %cl, %cl
je 0x8e13
leaq 0x1(%rbx), %rdx
xorl %eax, %eax
movsbl %cl, %ecx
addl %ecx, %eax
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x8e03
jmp 0x8e15
xorl %eax, %eax
cltd
idivl 0xc(%rdi)
movq (%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %r15
xorl %r14d, %r14d
testq %r15, %r15
je 0x8e44
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x10d0
testl %eax, %eax
je 0x8e40
movq 0x10(%r15), %r15
jmp 0x8e26
movq 0x8(%r15), %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/util.c
// Function: strintmap_put
void strintmap_put(StrIntMap* map, const char* key, int val) {
    const int hash  = calc_hash(key);
    const int index = hash % map->capacity;
    if (map->entries[index] == NULL) {
        map->entries[index]       = calloc(1, sizeof(StrIntMapEntry));
        map->entries[index]->key  = strdup(key);
        map->entries[index]->val  = val;
        map->entries[index]->next = NULL;
    }
    else {
        StrIntMapEntry* current = map->entries[index];
        while (current->next != NULL) {
            current = current->next;
        }
        current->next       = calloc(1, sizeof(StrIntMapEntry));
        current->next->key  = strdup(key);
        current->next->val  = val;
        current->next->next = NULL;
    }

    ++(map->size);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movb (%rsi), %cl
testb %cl, %cl
je 0x8eb1
leaq 0x1(%r14), %rdx
xorl %eax, %eax
movsbl %cl, %ecx
addl %ecx, %eax
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x8ea1
jmp 0x8eb3
xorl %eax, %eax
cltd
idivl 0xc(%rbx)
movq (%rbx), %r12
movslq %edx, %r15
movq (%r12,%r15,8), %rax
testq %rax, %rax
je 0x8ef6
movq %rax, %r12
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x8ec6
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, %r15
movq %rax, 0x10(%r12)
movq %r14, %rdi
callq 0x1190
movq %rax, (%r15)
jmp 0x8f1f
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, (%r12,%r15,8)
movq %r14, %rdi
callq 0x1190
movq (%rbx), %rcx
movq (%rcx,%r15,8), %rdx
movq %rax, (%rdx)
movq (%rcx,%r15,8), %r15
movl %ebp, 0x8(%r15)
movq $0x0, 0x10(%r15)
incl 0x8(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/util.c
// Function: strintmap_contains
bool strintmap_contains(StrIntMap* map, const char* key) {
    const int hash  = calc_hash(key);
    const int index = hash % map->capacity;

    if (map->entries[index] == NULL) {
        return false;
    }
    else {
        StrIntMapEntry* current = map->entries[index];
        while (current != NULL) {
            if (strcmp(current->key, key) == 0) {
                return true;
            }
            current = current->next;
        }
        return false;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb (%rsi), %cl
testb %cl, %cl
je 0x8f5a
leaq 0x1(%rbx), %rdx
xorl %eax, %eax
movsbl %cl, %ecx
addl %ecx, %eax
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x8f4a
jmp 0x8f5c
xorl %eax, %eax
cltd
idivl 0xc(%rdi)
movq (%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0x8f8c
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x10d0
testl %eax, %eax
je 0x8f90
movq 0x10(%r14), %r14
testq %r14, %r14
setne %al
jne 0x8f6f
jmp 0x8f92
xorl %eax, %eax
jmp 0x8f92
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/util.c
// Function: strintmap_get
int strintmap_get(StrIntMap* map, const char* key) {
    const int hash  = calc_hash(key);
    const int index = hash % map->capacity;
    if (map->entries[index] == NULL) {
        fprintf(stderr, "no key=\"%s\"\n", key);
        exit(-1);
    }
    else {
        StrIntMapEntry* current = map->entries[index];
        while (current != NULL) {
            if (strcmp(current->key, key) == 0) {
                return current->val;
            }

            current = current->next;
        }

        fprintf(stderr, "no key=\"%s\"\n", key);
        exit(-1);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb (%rsi), %cl
testb %cl, %cl
je 0x8fbd
leaq 0x1(%rbx), %rdx
xorl %eax, %eax
movsbl %cl, %ecx
addl %ecx, %eax
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x8fad
jmp 0x8fbf
xorl %eax, %eax
cltd
idivl 0xc(%rdi)
movq (%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0x8ffe
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x10d0
testl %eax, %eax
je 0x8ff2
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x8fd2
movq %rbx, %rdi
callq 0x11e5
movl 0x8(%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x1209
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/list_ports_linux.cc
// Function: dirname(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string
dirname(const string& path)
{
    size_t pos = path.rfind("/");

    if(pos == std::string::npos)
        return path;
    else if(pos == 0)
        return "/";

    return string(path, 0, pos);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x17a63(%rip), %rsi     # 0x21089
movl $0x1, %ecx
movq %r14, %rdi
movq $-0x1, %rdx
callq 0x8460
testq %rax, %rax
je 0x9660
cmpq $-0x1, %rax
jne 0x967f
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xa26a
jmp 0x968f
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x17a1b(%rip), %rsi     # 0x21089
leaq 0x17a15(%rip), %rdx     # 0x2108a
movq %rbx, %rdi
callq 0x9f82
jmp 0x968f
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x80a0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/list_ports_linux.cc
// Function: realpath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string
realpath(const string& path)
{
    char* real_path = realpath(path.c_str(), NULL);

    string result;

    if(real_path != NULL)
    {
        result = real_path;

        free(real_path);
    }

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rdi
xorl %esi, %esi
callq 0x8120
leaq 0x10(%rbx), %r15
movq %r15, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
testq %rax, %rax
je 0x96eb
movq %rax, %r14
movq %rax, %rdi
callq 0x8170
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
movq %rax, %r8
callq 0x8520
movq %r14, %rdi
callq 0x83f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x970f
movq (%r15), %rsi
incq %rsi
callq 0x8320
movq %r14, %rdi
callq 0x8600
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/list_ports_linux.cc
// Function: read_line(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string
read_line(const string& file)
{
    ifstream ifs(file.c_str(), ifstream::in);

    string line;

    if(ifs)
    {
        getline(ifs, line);
    }

    return line;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
movq (%rsi), %rsi
leaq -0x220(%rbp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x8640
leaq 0x10(%rbx), %r15
movq %r15, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x200(%rbp,%rax)
jne 0x9d64
leaq (%rax,%rbp), %rdi
addq $-0x220, %rdi           # imm = 0xFDE0
movl $0xa, %esi
callq 0x82e0
movsbl %al, %edx
leaq -0x220(%rbp), %rdi
movq %rbx, %rsi
callq 0x8660
leaq -0x220(%rbp), %rdi
callq 0x80c0
movq %rbx, %rax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x9d97
movq (%r15), %rsi
incq %rsi
callq 0x8320
leaq -0x220(%rbp), %rdi
callq 0x80c0
movq %r14, %rdi
callq 0x8600
nop
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/serial.cc
// Function: serial::Serial::read(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned long)
size_t
Serial::read (std::vector<uint8_t> &buffer, size_t size)
{
  ScopedReadLock lock(this->pimpl_);
  uint8_t *buffer_ = new uint8_t[size];
  size_t bytes_read = this->pimpl_->read (buffer_, size);
  buffer.insert (buffer.end (), buffer_, buffer_+bytes_read);
  delete[] buffer_;
  return bytes_read;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
movq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0xdf1e
movq %r12, %rdi
callq 0x8040
movq %rax, %r15
movq 0x8(%r13), %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0xc840
movq %rax, %r12
movq 0x8(%r14), %rsi
movq %r15, %rcx
addq %rax, %rcx
movq %r14, %rdi
movq %r15, %rdx
callq 0xb52e
movq %r15, %rdi
callq 0x8420
movq %rbx, %rdi
callq 0xdfdc
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xabc4
jmp 0xabb1
jmp 0xabb1
movq %rax, %r14
movq %rbx, %rdi
callq 0xdfdc
movq %r14, %rdi
callq 0x8600
movq %rax, %rdi
callq 0x9f28
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/serial.cc
// Function: serial::Serial::read(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long)
size_t
Serial::read (std::string &buffer, size_t size)
{
  ScopedReadLock lock(this->pimpl_);
  uint8_t *buffer_ = new uint8_t[size];
  size_t bytes_read = this->pimpl_->read (buffer_, size);
  buffer.append (reinterpret_cast<const char*>(buffer_), bytes_read);
  delete[] buffer_;
  return bytes_read;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
movq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0xdf1e
movq %r12, %rdi
callq 0x8040
movq %rax, %r15
movq 0x8(%r13), %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0xc840
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x8070
movq %r15, %rdi
callq 0x8420
movq %rbx, %rdi
callq 0xdfdc
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xac53
jmp 0xac40
movq %rax, %r14
movq %rbx, %rdi
callq 0xdfdc
movq %r14, %rdi
callq 0x8600
movq %rax, %rdi
callq 0x9f28
nop
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/serial.cc
// Function: serial::Serial::readline(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
size_t
Serial::readline (string &buffer, size_t size, string eol)
{
  ScopedReadLock lock(this->pimpl_);
  size_t eol_len = eol.length ();
  uint8_t *buffer_ = static_cast<uint8_t*>
                              (alloca (size * sizeof (uint8_t)));
  size_t read_so_far = 0;
  while (true)
  {
    size_t bytes_read = this->read_ (buffer_ + read_so_far, 1);
    read_so_far += bytes_read;
    if (bytes_read == 0) {
      break; // Timeout occured on reading 1 byte
    }
    if (string (reinterpret_cast<const char*>
         (buffer_ + read_so_far - eol_len), eol_len) == eol) {
      break; // EOL found
    }
    if (read_so_far == size) {
      break; // Reached the maximum read length
    }
  }
  buffer.append(reinterpret_cast<const char*> (buffer_), read_so_far);
  return read_so_far;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, -0x38(%rbp)
movq %rdi, -0x48(%rbp)
movq 0x8(%rdi), %rdi
movq %rdi, -0x30(%rbp)
callq 0xdf1e
xorl %r14d, %r14d
xorl %r13d, %r13d
subq 0x8(%r12), %r13
movq %rsp, %rbx
movq %r15, -0x40(%rbp)
leaq 0xf(%r15), %rax
andq $-0x10, %rax
subq %rax, %rbx
movq %rbx, %rsp
leaq (%rbx,%r14), %rsi
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1, %edx
callq 0xc840
addq %rax, %r14
testq %rax, %rax
je 0xad8b
leaq (%rbx,%r14), %rdx
leaq (%rdx,%r13), %rsi
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x9f82
movq -0x60(%rbp), %rdx
movb $0x1, %r15b
cmpq 0x8(%r12), %rdx
jne 0xad62
testq %rdx, %rdx
je 0xad5f
movq (%r12), %rsi
movq -0x68(%rbp), %rdi
callq 0x8330
testl %eax, %eax
setne %r15b
jmp 0xad62
xorl %r15d, %r15d
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xad7b
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x8320
cmpq -0x40(%rbp), %r14
setne %al
testb %al, %r15b
jne 0xad00
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x8070
movq -0x30(%rbp), %rdi
callq 0xdfdc
movq %r14, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xadcf
jmp 0xadbb
jmp 0xadbb
movq %rax, %rbx
movq -0x30(%rbp), %rdi
callq 0xdfdc
movq %rbx, %rdi
callq 0x8600
movq %rax, %rdi
callq 0x9f28
nop
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/serial.cc
// Function: serial::Serial::setPort(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void
Serial::setPort (const string &port)
{
  ScopedReadLock rlock(this->pimpl_);
  ScopedWriteLock wlock(this->pimpl_);
  bool was_open = pimpl_->isOpen ();
  if (was_open) close();
  pimpl_->setPort (port);
  if (was_open) open ();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %r15
movq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0xdf1e
movq 0x8(%r15), %r14
movq %r14, %rdi
callq 0xe09a
movq 0x8(%r15), %rdi
callq 0xc50a
movl %eax, %r13d
testb %al, %al
je 0xb269
movq 0x8(%r15), %rdi
callq 0xbbae
movq 0x8(%r15), %rdi
movq %r12, %rsi
callq 0xce26
testb %r13b, %r13b
je 0xb283
movq 0x8(%r15), %rdi
callq 0xb970
movq %r14, %rdi
callq 0xe15c
movq %rbx, %rdi
callq 0xdfdc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb2c8
jmp 0xb2c8
movq %rax, %r15
jmp 0xb2b6
movq %rax, %r15
movq %r14, %rdi
callq 0xe15c
movq %rbx, %rdi
callq 0xdfdc
movq %r15, %rdi
callq 0x8600
jmp 0xb2c8
movq %rax, %rdi
callq 0x9f28
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::MillisecondTimer::MillisecondTimer(unsigned int)
MillisecondTimer::MillisecondTimer (const uint32_t millis)
  : expiry(timespec_now())
{
  int64_t tv_nsec = expiry.tv_nsec + (millis * 1e6);
  if (tv_nsec >= 1e9) {
    int64_t sec_diff = tv_nsec / static_cast<int> (1e9);
    expiry.tv_nsec = tv_nsec - static_cast<int> (1e9 * sec_diff);
    expiry.tv_sec += sec_diff;
  } else {
    expiry.tv_nsec = tv_nsec;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leaq -0x28(%rbp), %r15
xorl %edi, %edi
movq %r15, %rsi
callq 0x82d0
movq (%r15), %rcx
movq 0x8(%r15), %rax
movq %rcx, (%rbx)
movq %rax, 0x8(%rbx)
cvtsi2sd %rax, %xmm0
movl %r14d, %eax
cvtsi2sd %rax, %xmm1
mulsd 0x159fc(%rip), %xmm1    # 0x21160
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rsi
cmpq $0x3b9aca00, %rsi       # imm = 0x3B9ACA00
jl 0xb7af
movq %rsi, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
mulq %rdx
shrq $0xb, %rdx
movabsq $0x3b9aca0000000000, %rax # imm = 0x3B9ACA0000000000
imulq %rdx, %rax
sarq $0x20, %rax
subq %rax, %rsi
movq %rsi, 0x8(%rbx)
addq %rcx, %rdx
movq %rdx, (%rbx)
jmp 0xb7b3
movq %rsi, 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::MillisecondTimer::remaining()
int64_t
MillisecondTimer::remaining ()
{
  timespec now(timespec_now());
  int64_t millis = (expiry.tv_sec - now.tv_sec) * 1e3;
  millis += (expiry.tv_nsec - now.tv_nsec) / 1e6;
  return millis;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x20(%rbp), %r14
xorl %edi, %edi
movq %r14, %rsi
callq 0x82d0
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq (%r14), %rax
cvtsi2sd %rax, %xmm0
mulsd 0x15951(%rip), %xmm0    # 0x21168
cvttsd2si %xmm0, %rax
subq 0x8(%r14), %rcx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
divsd 0x15930(%rip), %xmm0    # 0x21160
cvtsi2sd %rax, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::Serial::SerialImpl::SerialImpl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, serial::bytesize_t, serial::parity_t, serial::stopbits_t, serial::flowcontrol_t)
Serial::SerialImpl::SerialImpl (const string &port, unsigned long baudrate,
                                bytesize_t bytesize,
                                parity_t parity, stopbits_t stopbits,
                                flowcontrol_t flowcontrol)
  : port_ (port), fd_ (-1), is_open_ (false), xonxoff_ (false), rtscts_ (false),
    baudrate_ (baudrate), parity_ (parity),
    bytesize_ (bytesize), stopbits_ (stopbits), flowcontrol_ (flowcontrol)
{
  pthread_mutex_init(&this->read_mutex, NULL);
  pthread_mutex_init(&this->write_mutex, NULL);
  if (port_.empty () == false)
    open ();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r15d
movl %r8d, %r12d
movl %ecx, %r13d
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x1c3d3(%rip), %rax     # 0x27c80
movq %rax, (%rdi)
addq $0x8, %rdi
leaq 0x18(%r14), %rax
movq %rax, -0x30(%rbp)
movq %rax, 0x8(%r14)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rdi, -0x38(%rbp)
movq %rax, %rsi
callq 0xa26a
movl $0xffffffff, 0x28(%r14) # imm = 0xFFFFFFFF
movw $0x0, 0x2c(%r14)
movb $0x0, 0x2e(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
movl $0x0, 0x40(%r14)
movq %rbx, 0x48(%r14)
movl %r12d, 0x54(%r14)
movl %r13d, 0x58(%r14)
movl %r15d, 0x5c(%r14)
movl 0x10(%rbp), %eax
movl %eax, 0x60(%r14)
leaq 0x68(%r14), %rdi
xorl %esi, %esi
callq 0x84e0
leaq 0x90(%r14), %rdi
xorl %esi, %esi
callq 0x84e0
cmpq $0x0, 0x10(%r14)
je 0xb939
movq %r14, %rdi
callq 0xb970
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x38(%rbp), %rax
movq (%rax), %rdi
cmpq -0x30(%rbp), %rdi
je 0xb967
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x8320
movq %r14, %rdi
callq 0x8600
nop
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::Serial::SerialImpl::open()
void
Serial::SerialImpl::open ()
{
  if (port_.empty ()) {
    throw invalid_argument ("Empty port is invalid.");
  }
  if (is_open_ == true) {
    throw SerialException ("Serial port already open.");
  }

  fd_ = ::open (port_.c_str(), O_RDWR | O_NOCTTY | O_NONBLOCK);

  if (fd_ == -1) {
    switch (errno) {
    case EINTR:
      // Recurse because this is a recoverable error.
      open ();
      return;
    case ENFILE:
    case EMFILE:
      THROW (IOException, "Too many file handles open.");
    default:
      THROW (IOException, errno);
    }
  }

  reconfigurePort();
  is_open_ = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x10(%rbx)
je 0xba4d
cmpb $0x1, 0x2c(%rbx)
je 0xba79
movq 0x8(%rbx), %rdi
movl $0x902, %esi            # imm = 0x902
xorl %eax, %eax
callq 0x8260
movl %eax, 0x28(%rbx)
cmpl $-0x1, %eax
jne 0xba34
callq 0x8060
movq %rax, %r14
movl (%rax), %eax
cmpl $0x4, %eax
je 0xb982
addl $-0x17, %eax
movl $0x58, %edi
cmpl $0x1, %eax
ja 0xbaab
callq 0x81a0
movq %rax, %rbx
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x15827(%rip), %rsi     # 0x21212
leaq 0x15836(%rip), %rdx     # 0x21228
leaq -0x60(%rbp), %rdi
callq 0x9f82
movb $0x1, %r15b
leaq 0x15824(%rip), %rcx     # 0x21229
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
movl $0x96, %edx
callq 0xe3c0
xorl %r15d, %r15d
leaq 0x1c298(%rip), %rsi     # 0x27cb8
leaq 0x2b9b(%rip), %rdx      # 0xe5c2
movq %rbx, %rdi
callq 0x85c0
jmp 0xbb03
movq %rbx, %rdi
callq 0xbca8
movb $0x1, 0x2c(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x81a0
movq %rax, %rbx
leaq 0x15780(%rip), %rsi     # 0x211e1
movq %rax, %rdi
callq 0x8670
movq 0x1c568(%rip), %rsi     # 0x27fd8
movq 0x1c551(%rip), %rdx     # 0x27fc8
jmp 0xbaa3
movl $0x28, %edi
callq 0x81a0
movq %rax, %rbx
leaq 0x1576b(%rip), %rsi     # 0x211f8
movq %rax, %rdi
callq 0xe21e
leaq 0x1c204(%rip), %rsi     # 0x27ca0
leaq 0x28e3(%rip), %rdx      # 0xe386
movq %rbx, %rdi
callq 0x85c0
callq 0x81a0
movq %rax, %rbx
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x1574f(%rip), %rsi     # 0x21212
leaq 0x1575e(%rip), %rdx     # 0x21228
leaq -0x40(%rbp), %rdi
callq 0x9f82
movl (%r14), %ecx
movb $0x1, %r15b
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
movl $0x98, %edx
callq 0xe614
xorl %r15d, %r15d
leaq 0x1c1c4(%rip), %rsi     # 0x27cb8
leaq 0x2ac7(%rip), %rdx      # 0xe5c2
movq %rbx, %rdi
callq 0x85c0
movq %rax, %r14
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0xbb3e
movq -0x30(%rbp), %rsi
jmp 0xbb2e
jmp 0xbb38
jmp 0xbb19
movq %rax, %r14
jmp 0xbb43
movq %rax, %r14
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0xbb3e
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0xbb3e
movq %rax, %r14
movb $0x1, %r15b
testb %r15b, %r15b
je 0xbb4b
movq %rbx, %rdi
callq 0x8250
movq %r14, %rdi
callq 0x8600
nop