LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/plvhx[P]dummy-vm/src/ast.c
// Function: vm_ast_process_unary_print_regs_instruction
static void vm_ast_process_unary_print_regs_instruction(
    vm_ast_t *ast, FILE *file, void (*visitor)(FILE *file, int opcode)) {
  if (VM_AST_GET_NUM_CHILDS(ast) != 2) {
    return;
  }

  if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]), "r0")) {
    visitor(file, VM_INSN_PRINT_R0);
  } else if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]),
                         "r1")) {
    visitor(file, VM_INSN_PRINT_R1);
  } else if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]),
                         "r2")) {
    visitor(file, VM_INSN_PRINT_R2);
  } else if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]),
                         "r3")) {
    visitor(file, VM_INSN_PRINT_R3);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x2, 0x20(%rax)
je 0x3d44
jmp 0x3e03
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x3344(%rip), %rsi      # 0x709b
callq 0x1040
cmpl $0x0, %eax
jne 0x3d75
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x21, %esi
callq *%rax
jmp 0x3e03
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x3316(%rip), %rsi      # 0x709e
callq 0x1040
cmpl $0x0, %eax
jne 0x3da3
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x22, %esi
callq *%rax
jmp 0x3e01
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x32eb(%rip), %rsi      # 0x70a1
callq 0x1040
cmpl $0x0, %eax
jne 0x3dd1
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x23, %esi
callq *%rax
jmp 0x3dff
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x32c0(%rip), %rsi      # 0x70a4
callq 0x1040
cmpl $0x0, %eax
jne 0x3dfd
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x24, %esi
callq *%rax
jmp 0x3dff
jmp 0x3e01
jmp 0x3e03
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/plvhx[P]dummy-vm/src/vm_langspec_lexer.c
// Function: yy_try_NUL_trans
static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
{
	int yy_is_jam;
    	char *yy_cp = (yy_c_buf_p);

	YY_CHAR yy_c = 1;
	if ( yy_accept[yy_current_state] )
		{
		(yy_last_accepting_state) = yy_current_state;
		(yy_last_accepting_cpos) = yy_cp;
		}
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 16 )
			yy_c = yy_meta[yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
	yy_is_jam = (yy_current_state == 15);

		return yy_is_jam ? 0 : yy_current_state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq 0x5922(%rip), %rax      # 0xa130
movq %rax, -0x10(%rbp)
movb $0x1, -0x11(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x29bf(%rip), %rax      # 0x71e0
cmpw $0x0, (%rax,%rcx,2)
je 0x483c
movl -0x4(%rbp), %eax
movl %eax, 0x590b(%rip)      # 0xa13c
movq -0x10(%rbp), %rax
movq %rax, 0x5904(%rip)      # 0xa140
jmp 0x483e
movslq -0x4(%rbp), %rcx
leaq 0x29f7(%rip), %rax      # 0x7240
movswl (%rax,%rcx,2), %eax
movzbl -0x11(%rbp), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x29a3(%rip), %rax      # 0x7200
movswl (%rax,%rcx,2), %eax
cmpl -0x4(%rbp), %eax
je 0x4893
movslq -0x4(%rbp), %rcx
leaq 0x29ff(%rip), %rax      # 0x7270
movswl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
cmpl $0x10, -0x4(%rbp)
jl 0x4891
movzbl -0x11(%rbp), %eax
movl %eax, %ecx
leaq 0x2a07(%rip), %rax      # 0x7292
movb (%rax,%rcx), %al
movb %al, -0x11(%rbp)
jmp 0x483e
movslq -0x4(%rbp), %rcx
leaq 0x29a2(%rip), %rax      # 0x7240
movswl (%rax,%rcx,2), %eax
movzbl -0x11(%rbp), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x29ee(%rip), %rax      # 0x72a0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
cmpl $0xf, -0x4(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
je 0x48d5
xorl %eax, %eax
movl %eax, -0x18(%rbp)
jmp 0x48db
movl -0x4(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: ControlXonXoffSerialPort
void ControlXonXoffSerialPort(ISP_ENVIRONMENT *IspEnvironment, unsigned char XonXoff)
{
    if(tcgetattr(IspEnvironment->fdCom, &IspEnvironment->newtio))
    {
       DebugPrintf(1, "Could not get serial port behaviour\n");
       exit(3);
    }

    if(XonXoff)
    {
      IspEnvironment->newtio.c_iflag |= IXON;
      IspEnvironment->newtio.c_iflag |= IXOFF;
    }
    else
    {
      IspEnvironment->newtio.c_iflag &= ~IXON;
      IspEnvironment->newtio.c_iflag &= ~IXOFF;
    }

    if(tcsetattr(IspEnvironment->fdCom, TCSANOW, &IspEnvironment->newtio))
    {
       DebugPrintf(1, "Could not set serial port behaviour\n");
       exit(3);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movl 0x80(%rax), %edi
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
callq 0x41e0
cmpl $0x0, %eax
je 0x442e
movl $0x1, %edi
leaq 0x6be7(%rip), %rsi      # 0xb004
movb $0x0, %al
callq 0x44e0
movl $0x3, %edi
callq 0x4250
cmpb $0x0, -0x9(%rbp)
je 0x4462
movq -0x8(%rbp), %rax
movl 0xc0(%rax), %ecx
orl $0x400, %ecx            # imm = 0x400
movl %ecx, 0xc0(%rax)
movq -0x8(%rbp), %rax
movl 0xc0(%rax), %ecx
orl $0x1000, %ecx           # imm = 0x1000
movl %ecx, 0xc0(%rax)
jmp 0x448e
movq -0x8(%rbp), %rax
movl 0xc0(%rax), %ecx
andl $0xfffffbff, %ecx       # imm = 0xFFFFFBFF
movl %ecx, 0xc0(%rax)
movq -0x8(%rbp), %rax
movl 0xc0(%rax), %ecx
andl $0xffffefff, %ecx       # imm = 0xFFFFEFFF
movl %ecx, 0xc0(%rax)
movq -0x8(%rbp), %rax
movl 0x80(%rax), %edi
movq -0x8(%rbp), %rdx
addq $0xc0, %rdx
xorl %esi, %esi
callq 0x41f0
cmpl $0x0, %eax
je 0x44cc
movl $0x1, %edi
leaq 0x6b6e(%rip), %rsi      # 0xb029
movb $0x0, %al
callq 0x44e0
movl $0x3, %edi
callq 0x4250
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: DebugPrintf
void DebugPrintf(int level, const char *fmt, ...)
{
    va_list ap;

    if (level <= debug_level)
    {
        char pTemp[2000];
        va_start(ap, fmt);
        //vprintf(fmt, ap);
        vsprintf(pTemp, fmt, ap);
        TRACE(pTemp);
        va_end(ap);
        fflush(stdout);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x8b0, %rsp            # imm = 0x8B0
testb %al, %al
je 0x4527
movaps %xmm0, -0x880(%rbp)
movaps %xmm1, -0x870(%rbp)
movaps %xmm2, -0x860(%rbp)
movaps %xmm3, -0x850(%rbp)
movaps %xmm4, -0x840(%rbp)
movaps %xmm5, -0x830(%rbp)
movaps %xmm6, -0x820(%rbp)
movaps %xmm7, -0x810(%rbp)
movq %r9, -0x888(%rbp)
movq %r8, -0x890(%rbp)
movq %rcx, -0x898(%rbp)
movq %rdx, -0x8a0(%rbp)
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x4(%rbp), %eax
cmpl 0xbbfd(%rip), %eax      # 0x10150
jg 0x45b5
leaq -0x30(%rbp), %rax
leaq -0x8b0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x800(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x41d0
leaq -0x800(%rbp), %rsi
leaq 0x845a(%rip), %rdi      # 0xc9f5
movb $0x0, %al
callq 0x40c0
leaq -0x30(%rbp), %rax
movq 0xba2b(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x41a0
addq $0x8b0, %rsp            # imm = 0x8B0
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: DumpString
void DumpString(int level, const void *b, size_t size, const char *prefix_string)
{
    size_t i;
    const char * s = (const char*) b;
    unsigned char c;

    DebugPrintf(level, prefix_string);

    DebugPrintf(level, "'");
    for (i = 0; i < size; i++)
    {
        c = s[i];
        if (c >= 0x20 && c <= 0x7e) /*isprint?*/
        {
            DebugPrintf(level, "%c", c);
        }
        else
        {
            DebugPrintf(level, "(%02X)", c);
        }
    }
    DebugPrintf(level, "'\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x4(%rbp), %edi
movq -0x20(%rbp), %rsi
movb $0x0, %al
callq 0x44e0
movl -0x4(%rbp), %edi
leaq 0x6a1c(%rip), %rsi      # 0xb083
movb $0x0, %al
callq 0x44e0
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x46dc
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x31(%rbp)
movzbl -0x31(%rbp), %eax
cmpl $0x20, %eax
jl 0x46b7
movzbl -0x31(%rbp), %eax
cmpl $0x7e, %eax
jg 0x46b7
movl -0x4(%rbp), %edi
movzbl -0x31(%rbp), %edx
leaq 0x69d7(%rip), %rsi      # 0xb085
movb $0x0, %al
callq 0x44e0
jmp 0x46cc
movl -0x4(%rbp), %edi
movzbl -0x31(%rbp), %edx
leaq 0x69c3(%rip), %rsi      # 0xb088
movb $0x0, %al
callq 0x44e0
jmp 0x46ce
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x4676
movl -0x4(%rbp), %edi
leaq 0x7b60(%rip), %rsi      # 0xc246
movb $0x0, %al
callq 0x44e0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: kbhit
int kbhit(void)
{
    /* return 0 for no key pressed, 1 for key pressed */
    int return_value = 0;

    /* time struct for the select() function, to only wait a little while */
    struct timeval select_time;
    /* file descriptor variable for the select() call */
    fd_set readset;

    /* we're only interested in STDIN */
    FD_ZERO(&readset);
    FD_SET(STDIN_FILENO, &readset);

    /* how long to block for - this must be > 0.0, but could be changed
    to some other setting. 10-18msec seems to work well and only
    minimally load the system (0% CPU loading) */
    select_time.tv_sec = 0;
    select_time.tv_usec = 10;

    /* is there a keystroke there? */
    if (select(1, &readset, NULL, NULL, &select_time))
    {
        /* yes, remember it */
        return_value = 1;
    }


    /* return with what we found out */
    return return_value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movl $0x0, -0x4(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
movl $0x0, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
cmpq $0x10, %rax
jae 0x47fc
movq -0xa8(%rbp), %rax
movl -0x9c(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x47ca
jmp 0x47fe
movq -0x98(%rbp), %rax
orq $0x1, %rax
movq %rax, -0x98(%rbp)
movq $0x0, -0x18(%rbp)
movq $0xa, -0x10(%rbp)
movl $0x1, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x18(%rbp), %r8
movq %rcx, %rdx
callq 0x4170
cmpl $0x0, %eax
je 0x4848
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: PrepareKeyboardTtySettings
void PrepareKeyboardTtySettings(void)
{
#if defined COMPILE_FOR_LINUX || defined COMPILE_FOR_CYGWIN
    /* store the current tty settings */
    if (!tcgetattr(0, &keyboard_origtty))
    {
        struct termios tty;
        /* start with the current settings */
        tty = keyboard_origtty;
        /* make modifications to put it in raw mode, turn off echo */
        tty.c_lflag &= ~ICANON;
        tty.c_lflag &= ~ECHO;
        tty.c_lflag &= ~ISIG;
        tty.c_cc[VMIN] = 1;
        tty.c_cc[VTIME] = 0;

        /* put the settings into effect */
        tcsetattr(0, TCSADRAIN, &tty);
    }
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
xorl %edi, %edi
leaq 0xe88f(%rip), %rsi      # 0x13100
callq 0x41e0
cmpl $0x0, %eax
jne 0x48c3
leaq -0x3c(%rbp), %rdi
leaq 0xe87a(%rip), %rsi      # 0x13100
movl $0x3c, %edx
callq 0x4150
movl -0x30(%rbp), %eax
andl $-0x3, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
andl $-0x9, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
andl $-0x2, %eax
movl %eax, -0x30(%rbp)
movb $0x1, -0x25(%rbp)
movb $0x0, -0x26(%rbp)
xorl %edi, %edi
movl $0x1, %esi
leaq -0x3c(%rbp), %rdx
callq 0x41f0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: ClearSerialPortBuffers
void ClearSerialPortBuffers(ISP_ENVIRONMENT *IspEnvironment)
{
#if defined COMPILE_FOR_LINUX
    /* variables to store the current tty state, create a new one */
    struct termios origtty, tty;

    /* store the current tty settings */
    tcgetattr(IspEnvironment->fdCom, &origtty);

    // Flush input and output buffers
    tty=origtty;
    tcsetattr(IspEnvironment->fdCom, TCSAFLUSH, &tty);

    /* reset the tty to its original settings */
    tcsetattr(IspEnvironment->fdCom, TCSADRAIN, &origtty);
#endif // defined COMPILE_FOR_LINUX
#if defined COMPILE_FOR_WINDOWS || defined COMPILE_FOR_CYGWIN
    PurgeComm(IspEnvironment->hCom, PURGE_TXABORT | PURGE_RXABORT | PURGE_TXCLEAR | PURGE_RXCLEAR);
#endif // defined COMPILE_FOR_WINDOWS || defined COMPILE_FOR_CYGWIN
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x80(%rax), %edi
leaq -0x44(%rbp), %rsi
callq 0x41e0
leaq -0x80(%rbp), %rdi
leaq -0x44(%rbp), %rsi
movl $0x3c, %edx
callq 0x4150
movq -0x8(%rbp), %rax
movl 0x80(%rax), %edi
movl $0x2, %esi
leaq -0x80(%rbp), %rdx
callq 0x41f0
movq -0x8(%rbp), %rax
movl 0x80(%rax), %edi
movl $0x1, %esi
leaq -0x44(%rbp), %rdx
callq 0x41f0
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: ReceiveComPortBlockComplete
int ReceiveComPortBlockComplete(ISP_ENVIRONMENT *IspEnvironment,
                                                    void *block, size_t size, unsigned timeout)
{
    unsigned long realsize = 0, read;
    char *result;
    char tmp_string[32];

    result = (char*) block;

    SerialTimeoutSet(IspEnvironment, timeout);

    do
    {
        ReceiveComPortBlock(IspEnvironment, result + realsize, size - realsize, &read);

        realsize += read;

    } while ((realsize < size) && (SerialTimeoutCheck(IspEnvironment) == 0));

    sprintf(tmp_string, "Answer(Length=%ld): ", realsize);
    DumpString(3, result, realsize, tmp_string);

    if (realsize != size)
    {
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x4c40
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
addq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
subq -0x30(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0x4c70
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x61(%rbp)
jae 0x4e8d
movq -0x10(%rbp), %rdi
callq 0x4de0
cmpl $0x0, %eax
sete %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x4e43
leaq -0x60(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq 0x61b4(%rip), %rsi      # 0xb057
movb $0x0, %al
callq 0x4240
movq -0x40(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq -0x60(%rbp), %rcx
movl $0x3, %edi
callq 0x4630
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x4ed3
movl $0x1, -0x4(%rbp)
jmp 0x4eda
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: LoadFiles
static int LoadFiles(ISP_ENVIRONMENT *IspEnvironment)
{
  int ret_val;

    ret_val = LoadFiles1(IspEnvironment, IspEnvironment->f_list);
    if( ret_val != 0)
    {
    exit(1); // return ret_val;
    }

  DebugPrintf( 2, "Image size : %ld\n", IspEnvironment->BinaryLength);

    // check length to flash for correct alignment, can happen with broken ld-scripts
    if (IspEnvironment->BinaryLength % 4 != 0)
    {
        unsigned long NewBinaryLength = ((IspEnvironment->BinaryLength + 3)/4) * 4;

        DebugPrintf( 2, "Warning:  data not aligned to 32 bits, padded (length was %lX, now %lX)\n", IspEnvironment->BinaryLength, NewBinaryLength);

        IspEnvironment->BinaryLength = NewBinaryLength;
    }

  // When debugging is switched on, output result of conversion to file debugout.bin
    if(debug_level >= 4)
    {
         int fdout;
     DebugPrintf( 1, "Dumping image file.\n");
         fdout = open("debugout.bin", O_RDWR | O_BINARY | O_CREAT | O_TRUNC, 0777);
         write(fdout, IspEnvironment->BinaryContent, IspEnvironment->BinaryLength);
         close(fdout);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x5ff0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x52b0
movl $0x1, %edi
callq 0x4250
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdx
movl $0x2, %edi
leaq 0x5e4c(%rip), %rsi      # 0xb110
movb $0x0, %al
callq 0x44e0
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
andq $0x3, %rax
cmpq $0x0, %rax
je 0x5320
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
addq $0x3, %rax
shrq $0x2, %rax
shlq $0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdx
movq -0x18(%rbp), %rcx
movl $0x2, %edi
leaq 0x5e15(%rip), %rsi      # 0xb122
movb $0x0, %al
callq 0x44e0
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x60(%rax)
cmpl $0x4, 0xae29(%rip)      # 0x10150
jl 0x5377
movl $0x1, %edi
leaq 0x5e36(%rip), %rsi      # 0xb16b
movb $0x0, %al
callq 0x44e0
leaq 0x5e3d(%rip), %rdi      # 0xb180
movl $0x242, %esi            # imm = 0x242
movl $0x1ff, %edx            # imm = 0x1FF
movb $0x0, %al
callq 0x4210
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdx
callq 0x4090
movl -0x1c(%rbp), %edi
callq 0x4100
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: CloseSerialPort
static void CloseSerialPort(ISP_ENVIRONMENT *IspEnvironment)
{
    tcflush(IspEnvironment->fdCom, TCOFLUSH);
    tcflush(IspEnvironment->fdCom, TCIFLUSH);
    tcsetattr(IspEnvironment->fdCom, TCSANOW, &IspEnvironment->oldtio);

    close(IspEnvironment->fdCom);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x80(%rax), %edi
movl $0x1, %esi
callq 0x40b0
movq -0x8(%rbp), %rax
movl 0x80(%rax), %edi
xorl %esi, %esi
callq 0x40b0
movq -0x8(%rbp), %rax
movl 0x80(%rax), %edi
movq -0x8(%rbp), %rdx
addq $0x84, %rdx
xorl %esi, %esi
callq 0x41f0
movq -0x8(%rbp), %rax
movl 0x80(%rax), %edi
callq 0x4100
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: LoadFiles1
static int LoadFiles1(ISP_ENVIRONMENT *IspEnvironment, const FILE_LIST *file)
{
    int ret_val;

    if( file->prev != 0)
    {
        DebugPrintf( 3, "Follow file list %s\n", file->name);

        ret_val = LoadFiles1( IspEnvironment, file->prev);
    if( ret_val != 0)
    {
      return ret_val;
    }
    }

    DebugPrintf( 3, "Attempt to read File %s\n", file->name);
    if(file->hex_flag != 0)
    {
        ret_val = LoadFile(IspEnvironment, file->name, FORMAT_HEX);
    }
    else
    {
    ret_val = LoadFile(IspEnvironment, file->name, FORMAT_BINARY);
    }
    if( ret_val != 0)
    {
    return ret_val;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x6049
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movl $0x3, %edi
leaq 0x516f(%rip), %rsi      # 0xb18d
movb $0x0, %al
callq 0x44e0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x5ff0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x6047
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x60b4
jmp 0x6049
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movl $0x3, %edi
leaq 0x5146(%rip), %rsi      # 0xb1a2
movb $0x0, %al
callq 0x44e0
movq -0x18(%rbp), %rax
movsbl 0x10(%rax), %eax
cmpl $0x0, %eax
je 0x608a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movl $0x1, %edx
callq 0x60c0
movl %eax, -0x1c(%rbp)
jmp 0x609f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
xorl %edx, %edx
callq 0x60c0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x60ad
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x60b4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: Ascii2Hex
static unsigned char Ascii2Hex(unsigned char c)
{
    if (c >= '0' && c <= '9')
    {
        return (unsigned char)(c - '0');
    }

    if (c >= 'A' && c <= 'F')
    {
        return (unsigned char)(c - 'A' + 10);
    }

    if (c >= 'a' && c <= 'f')
    {
        return (unsigned char)(c - 'a' + 10);
    }

    DebugPrintf(1, "Wrong Hex-Nibble %c (%02X)\n", c, c);
    exit(1);

    return 0;  // this "return" will never be reached, but some compilers give a warning if it is not present
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x2(%rbp)
movzbl -0x2(%rbp), %eax
cmpl $0x30, %eax
jl 0x6a6c
movzbl -0x2(%rbp), %eax
cmpl $0x39, %eax
jg 0x6a6c
movzbl -0x2(%rbp), %eax
subl $0x30, %eax
movb %al, -0x1(%rbp)
jmp 0x6ad3
movzbl -0x2(%rbp), %eax
cmpl $0x41, %eax
jl 0x6a8d
movzbl -0x2(%rbp), %eax
cmpl $0x46, %eax
jg 0x6a8d
movzbl -0x2(%rbp), %eax
subl $0x41, %eax
addl $0xa, %eax
movb %al, -0x1(%rbp)
jmp 0x6ad3
movzbl -0x2(%rbp), %eax
cmpl $0x61, %eax
jl 0x6aae
movzbl -0x2(%rbp), %eax
cmpl $0x66, %eax
jg 0x6aae
movzbl -0x2(%rbp), %eax
subl $0x61, %eax
addl $0xa, %eax
movb %al, -0x1(%rbp)
jmp 0x6ad3
movzbl -0x2(%rbp), %edx
movzbl -0x2(%rbp), %ecx
movl $0x1, %edi
leaq 0x4917(%rip), %rsi      # 0xb3d9
movb $0x0, %al
callq 0x44e0
movl $0x1, %edi
callq 0x4250
movb -0x1(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: AddFileHex
static int AddFileHex(ISP_ENVIRONMENT *IspEnvironment, const char *arg)
{
    FILE_LIST *entry;

    // Add file to list.  If cannot allocate storage for node return an error.
    entry = malloc(sizeof(FILE_LIST));
    if( entry == 0)
    {
        DebugPrintf(1, "Error %d Could not allocated memory for file node %s\n", ERR_ALLOC_FILE_LIST, arg);
        return  ERR_ALLOC_FILE_LIST;
    }

    // Build up entry and insert it at the start of the list.
    entry->name = arg;
    entry->prev = IspEnvironment->f_list;
    entry->hex_flag = 1;
    IspEnvironment->f_list = entry;

    return 0;       // Success.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x18, %edi
callq 0x4180
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x6b2a
movq -0x18(%rbp), %rcx
movl $0x1, %edi
leaq 0x54a8(%rip), %rsi      # 0xbfbd
movl $0x3c, %edx
movb $0x0, %al
callq 0x44e0
movl $0x3c, -0x4(%rbp)
jmp 0x6b60
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movb $0x1, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: AddFileBinary
static int AddFileBinary(ISP_ENVIRONMENT *IspEnvironment, const char *arg)
{
    FILE_LIST *entry;

    // Add file to list. If cannot allocate storage for node return an error.
    entry = malloc(sizeof(FILE_LIST));
    if( entry == 0)
    {
        DebugPrintf( 1, "Error %d Could not allocated memory for file node %s\n", ERR_ALLOC_FILE_LIST, arg);
        return  ERR_ALLOC_FILE_LIST;
    }

    // Build up entry and insert it at the start of the list.
    entry->name = arg;
    entry->prev = IspEnvironment->f_list;
    entry->hex_flag = 0;
    IspEnvironment->f_list = entry;

    return 0;       // Success.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x18, %edi
callq 0x4180
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x6bba
movq -0x18(%rbp), %rcx
movl $0x1, %edi
leaq 0x5418(%rip), %rsi      # 0xbfbd
movl $0x3c, %edx
movb $0x0, %al
callq 0x44e0
movl $0x3c, -0x4(%rbp)
jmp 0x6bf0
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movb $0x0, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/adprog.c
// Function: AnalogDevicesDownload
int AnalogDevicesDownload(ISP_ENVIRONMENT *IspEnvironment)
{
    AnalogDevicesSync(IspEnvironment);
    AnalogDevicesErase(IspEnvironment);
    if (IspEnvironment->BinaryLength > 0x80000)
    {
        DebugPrintf(2, "Note:  Flash remapped 0x80000 to 0.\n");
        AnalogDevicesWrite(IspEnvironment, IspEnvironment->BinaryContent + 0x80000, 0, IspEnvironment->BinaryLength-0x80000);
    }
    else
    {
        AnalogDevicesWrite(IspEnvironment, IspEnvironment->BinaryContent, 0, IspEnvironment->BinaryLength);
    }
    return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6ca0
movq -0x8(%rbp), %rdi
callq 0x6d90
movq -0x8(%rbp), %rax
cmpq $0x80000, 0x60(%rax)    # imm = 0x80000
jbe 0x6c6c
movl $0x2, %edi
leaq 0x53bb(%rip), %rsi      # 0xbff3
movb $0x0, %al
callq 0x44e0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rsi
addq $0x80000, %rsi          # imm = 0x80000
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rcx
subq $0x80000, %rcx          # imm = 0x80000
xorl %eax, %eax
movl %eax, %edx
callq 0x6e10
jmp 0x6c89
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x6e10
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/adprog.c
// Function: AnalogDevicesErase
static void AnalogDevicesErase(ISP_ENVIRONMENT *IspEnvironment)
{
    BINARY pages;
    AD_PACKET packet;

    pages = 0;
    DebugPrintf(2, "Erasing .. ");
    AnalogDevicesFormPacket(IspEnvironment, 'E', 1, 0, &pages, &packet);
    AnalogDevicesSendPacket(IspEnvironment, &packet);
    DebugPrintf(2, "Erased\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
movl $0x2, %edi
leaq 0x52fa(%rip), %rsi      # 0xc0a9
movb $0x0, %al
callq 0x44e0
movq -0x8(%rbp), %rdi
movl $0x45, %esi
movl $0x1, %edx
xorl %ecx, %ecx
leaq -0x9(%rbp), %r8
leaq -0x10c(%rbp), %r9
callq 0x6f40
movq -0x8(%rbp), %rdi
leaq -0x10c(%rbp), %rsi
callq 0x7130
movl $0x2, %edi
leaq 0x52c3(%rip), %rsi      # 0xc0b5
movb $0x0, %al
callq 0x44e0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/adprog.c
// Function: AnalogDevicesWrite
static void AnalogDevicesWrite(ISP_ENVIRONMENT *IspEnvironment,
                                         const void *data, long address, size_t bytes)
{
    AD_PACKET packet;
    const BINARY *prog_data;

    DebugPrintf(2, "Writing %d bytes ", bytes);
    prog_data = (const BINARY*) data;
    while (bytes > AD_PACKET_SIZE)
    {
        AnalogDevicesFormPacket(IspEnvironment, 'W', AD_PACKET_SIZE, address, prog_data, &packet);
        AnalogDevicesSendPacket(IspEnvironment, &packet);
        address += AD_PACKET_SIZE;
        prog_data += AD_PACKET_SIZE;
        bytes -= AD_PACKET_SIZE;
        DebugPrintf(2, ".");
    }
    if (bytes > 0)
    {
        AnalogDevicesFormPacket(IspEnvironment, 'W', bytes, address, prog_data, &packet);
        AnalogDevicesSendPacket(IspEnvironment, &packet);
        DebugPrintf(2, ".");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rdx
movl $0x2, %edi
leaq 0x537a(%rip), %rsi      # 0xc1b5
movb $0x0, %al
callq 0x44e0
movq -0x10(%rbp), %rax
movq %rax, -0x130(%rbp)
cmpq $0xfa, -0x20(%rbp)
jbe 0x6ed6
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x130(%rbp), %r8
movl $0x57, %esi
movl $0xfa, %edx
leaq -0x123(%rbp), %r9
callq 0x6f40
movq -0x8(%rbp), %rdi
leaq -0x123(%rbp), %rsi
callq 0x7130
movq -0x18(%rbp), %rax
addq $0xfa, %rax
movq %rax, -0x18(%rbp)
movq -0x130(%rbp), %rax
addq $0xfa, %rax
movq %rax, -0x130(%rbp)
movq -0x20(%rbp), %rax
subq $0xfa, %rax
movq %rax, -0x20(%rbp)
movl $0x2, %edi
leaq 0x5848(%rip), %rsi      # 0xc712
movb $0x0, %al
callq 0x44e0
jmp 0x6e4d
cmpq $0x0, -0x20(%rbp)
jbe 0x6f28
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x130(%rbp), %r8
movl $0x57, %esi
leaq -0x123(%rbp), %r9
callq 0x6f40
movq -0x8(%rbp), %rdi
leaq -0x123(%rbp), %rsi
callq 0x7130
movl $0x2, %edi
leaq 0x57f1(%rip), %rsi      # 0xc712
movb $0x0, %al
callq 0x44e0
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/adprog.c
// Function: AnalogDevicesSendPacket
static void AnalogDevicesSendPacket(ISP_ENVIRONMENT *IspEnvironment,
                                                const AD_PACKET * packet)
{
    BINARY response;
    int retry = 0;

    do {
        retry++;

        /*  Make sure we don't read garbage later instead of    */
        /* the response we expect from the micro.               */
        ClearSerialPortBuffers(IspEnvironment);

        /*  Send the packet, the size is the number of data     */
        /* bytes in the packet plus 3 bytes worth of header     */
        /* plus checksum.                                       */
        SendComPortBlock(IspEnvironment, packet, packet->bytes + 4);

        /*  Receive the response and check, return to caller    */
        /* if successful.                                       */
        if (ReceiveComPortBlockComplete(IspEnvironment, &response, 1, 5000) == 0)
        {
            if (response == ANALOG_DEVICES_ACK)
            {
                DebugPrintf(3, "Packet Sent\n");
                return;
            }
            if (response != ANALOG_DEVICES_NAK)
            {
                DebugPrintf(3, "Unexpected response to packet (%x)\n", (int)response);
            }
            DebugPrintf(2, "*");
        }
    } while (retry < 3);

    DebugPrintf(1, "Send packet failed\n");
    exit(-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x48f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
addl $0x4, %eax
movslq %eax, %rdx
callq 0x45c0
movq -0x8(%rbp), %rdi
leaq -0x11(%rbp), %rsi
movl $0x1, %edx
movl $0x1388, %ecx           # imm = 0x1388
callq 0x4e10
cmpl $0x0, %eax
jne 0x71e5
movzbl -0x11(%rbp), %eax
cmpl $0x6, %eax
jne 0x71b2
movl $0x3, %edi
leaq 0x4fc9(%rip), %rsi      # 0xc16e
movb $0x0, %al
callq 0x44e0
addq $0x20, %rsp
popq %rbp
retq
movzbl -0x11(%rbp), %eax
cmpl $0x7, %eax
je 0x71d2
movzbl -0x11(%rbp), %edx
movl $0x3, %edi
leaq 0x4fb0(%rip), %rsi      # 0xc17b
movb $0x0, %al
callq 0x44e0
movl $0x2, %edi
leaq 0x4fc1(%rip), %rsi      # 0xc19f
movb $0x0, %al
callq 0x44e0
jmp 0x71e7
cmpl $0x3, -0x18(%rbp)
jl 0x7147
movl $0x1, %edi
leaq 0x4fa4(%rip), %rsi      # 0xc1a1
movb $0x0, %al
callq 0x44e0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x4250
nop
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpcprog.c
// Function: FormatCommand
static void FormatCommand(const char *In, char *Out)
{
  size_t i, j;
  for (i = 0, j = 0; In[j] != '\0'; i++, j++)
  {
    if ((In[j] == '\r') || (In[j] == '\n'))
    {
      if (i > 0) // Ignore leading line breaks (they must be leftovers from a previous answer)
      {
        Out[i] = '\n';
      }
      else
      {
        i--;
      }
      while ((In[j+1] == '\r') || (In[j+1] == '\n'))
      {
        j++;
      }
    }
    else
    {
      Out[i] = In[j];
    }
  }
  Out[i] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0xa371
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xd, %eax
je 0xa2d3
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0xa33c
cmpq $0x0, -0x18(%rbp)
jbe 0xa2e8
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0xa, (%rax,%rcx)
jmp 0xa2f4
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xa2f6
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl 0x1(%rax,%rcx), %ecx
movb $0x1, %al
cmpl $0xd, %ecx
movb %al, -0x21(%rbp)
je 0xa323
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl 0x1(%rax,%rcx), %eax
cmpl $0xa, %eax
sete %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0xa32c
jmp 0xa33a
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xa2f6
jmp 0xa352
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0xa354
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xa29c
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpcprog.c
// Function: SendAndVerify
static int SendAndVerify(ISP_ENVIRONMENT *IspEnvironment, const char *Command,
                                 char *AnswerBuffer, int AnswerLength)
{
    unsigned long realsize;
    int cmdlen;
    char *FormattedCommand;

    SendComPort(IspEnvironment, Command);
    ReceiveComPort(IspEnvironment, AnswerBuffer, AnswerLength - 1, &realsize, 2, 5000);

    cmdlen = strlen(Command);
    FormattedCommand = (char *)alloca(cmdlen+1);
    FormatCommand(Command, FormattedCommand);
    FormatCommand(AnswerBuffer, AnswerBuffer);
    cmdlen = strlen(FormattedCommand);
    return (strncmp(AnswerBuffer, FormattedCommand, cmdlen) == 0
        && strcmp(AnswerBuffer + cmdlen, "0\n") == 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4730
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %eax
decl %eax
movslq %eax, %rdx
leaq -0x28(%rbp), %rcx
movl $0x2, %r8d
movl $0x1388, %r9d           # imm = 0x1388
callq 0x4960
movq -0x10(%rbp), %rdi
callq 0x40a0
movl %eax, -0x2c(%rbp)
movslq -0x2c(%rbp), %rcx
addq $0x10, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0xa280
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa280
movq -0x38(%rbp), %rdi
callq 0x40a0
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
movslq -0x2c(%rbp), %rdx
callq 0x4060
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
jne 0xa451
movq -0x18(%rbp), %rdi
movslq -0x2c(%rbp), %rax
addq %rax, %rdi
leaq 0x1f36(%rip), %rsi      # 0xc379
callq 0x4130
cmpl $0x0, %eax
sete %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movq %rbp, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpcprog.c
// Function: GetAndReportErrorNumber
static unsigned char GetAndReportErrorNumber(const char *Answer)
{
    unsigned char Result = 0xFF;                            // Error !!!
    unsigned int i = 0;

    while (1)
    {
        if (Answer[i] == 0x00)
        {
            break;
        }

        if (Answer[i] == 0x0a)
        {
            i++;

            if (Answer[i] < '0' || Answer[i] > '9')
            {
                DebugPrintf(1, "ErrorString: %s", &Answer[i]);
                break;
            }

            Result = (unsigned char) (atoi(&Answer[i]));
            break;
        }

        i++;
    }

    NxpOutputErrorMessage(Result);

    return Result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movb $-0x1, -0x9(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0xa489
jmp 0xa503
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0xa4f5
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jl 0xa4c2
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x39, %eax
jle 0xa4e1
movq -0x8(%rbp), %rdx
movl -0x10(%rbp), %eax
addq %rax, %rdx
movl $0x1, %edi
leaq 0x2510(%rip), %rsi      # 0xc9e8
movb $0x0, %al
callq 0x44e0
jmp 0xa503
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %eax
addq %rax, %rdi
callq 0x4230
movb %al, -0x9(%rbp)
jmp 0xa503
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xa477
movzbl -0x9(%rbp), %edi
callq 0xa820
movb -0x9(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpcprog.c
// Function: ReturnValueLpcRamBase
unsigned long ReturnValueLpcRamBase(ISP_ENVIRONMENT *IspEnvironment)
{
  if(LPCtypes[IspEnvironment->DetectedDevice].ChipVariant == CHIP_VARIANT_LPC43XX)
  {
    return LPC_RAMBASE_LPC43XX;
  }
  else if(LPCtypes[IspEnvironment->DetectedDevice].ChipVariant == CHIP_VARIANT_LPC2XXX)
  {
    return LPC_RAMBASE_LPC2XXX;
  }
  else if(LPCtypes[IspEnvironment->DetectedDevice].ChipVariant == CHIP_VARIANT_LPC18XX)
  {
    return LPC_RAMBASE_LPC18XX;
  }
  else if(LPCtypes[IspEnvironment->DetectedDevice].ChipVariant == CHIP_VARIANT_LPC17XX)
  {
    return LPC_RAMBASE_LPC17XX;
  }
  else if(LPCtypes[IspEnvironment->DetectedDevice].ChipVariant == CHIP_VARIANT_LPC13XX)
  {
    return LPC_RAMBASE_LPC13XX;
  }
  else if(LPCtypes[IspEnvironment->DetectedDevice].ChipVariant == CHIP_VARIANT_LPC11XX)
  {
    return LPC_RAMBASE_LPC11XX;
  }
  else if(LPCtypes[IspEnvironment->DetectedDevice].ChipVariant == CHIP_VARIANT_LPC8XX)
  {
    return LPC_RAMBASE_LPC8XX;
  }
  DebugPrintf(1, "Error in ReturnValueLpcRamBase (%d)\n", LPCtypes[IspEnvironment->DetectedDevice].ChipVariant);
  exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movslq 0x38(%rax), %rcx
leaq 0x5aa5(%rip), %rax      # 0x10160
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x1, 0x38(%rax)
jne 0xa6d5
movq $0x10000200, -0x8(%rbp) # imm = 0x10000200
jmp 0xa807
movq -0x10(%rbp), %rax
movslq 0x38(%rax), %rcx
leaq 0x5a7c(%rip), %rax      # 0x10160
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x2, 0x38(%rax)
jne 0xa6fe
movq $0x40000200, -0x8(%rbp) # imm = 0x40000200
jmp 0xa807
movq -0x10(%rbp), %rax
movslq 0x38(%rax), %rcx
leaq 0x5a53(%rip), %rax      # 0x10160
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x3, 0x38(%rax)
jne 0xa727
movq $0x10000200, -0x8(%rbp) # imm = 0x10000200
jmp 0xa807
movq -0x10(%rbp), %rax
movslq 0x38(%rax), %rcx
leaq 0x5a2a(%rip), %rax      # 0x10160
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x4, 0x38(%rax)
jne 0xa750
movq $0x10000200, -0x8(%rbp) # imm = 0x10000200
jmp 0xa807
movq -0x10(%rbp), %rax
movslq 0x38(%rax), %rcx
leaq 0x5a01(%rip), %rax      # 0x10160
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x5, 0x38(%rax)
jne 0xa779
movq $0x10000300, -0x8(%rbp) # imm = 0x10000300
jmp 0xa807
movq -0x10(%rbp), %rax
movslq 0x38(%rax), %rcx
leaq 0x59d8(%rip), %rax      # 0x10160
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x6, 0x38(%rax)
jne 0xa79f
movq $0x10000300, -0x8(%rbp) # imm = 0x10000300
jmp 0xa807
movq -0x10(%rbp), %rax
movslq 0x38(%rax), %rcx
leaq 0x59b2(%rip), %rax      # 0x10160
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x7, 0x38(%rax)
jne 0xa7c5
movq $0x10000270, -0x8(%rbp) # imm = 0x10000270
jmp 0xa807
jmp 0xa7c7
jmp 0xa7c9
jmp 0xa7cb
jmp 0xa7cd
jmp 0xa7cf
jmp 0xa7d1
movq -0x10(%rbp), %rax
movslq 0x38(%rax), %rcx
leaq 0x5980(%rip), %rax      # 0x10160
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x38(%rax), %edx
movl $0x1, %edi
leaq 0x21cd(%rip), %rsi      # 0xc9c3
movb $0x0, %al
callq 0x44e0
movl $0x1, %edi
callq 0x4250
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/lpc21isp/lpcterm.c
// Function: CheckTerminalParameters
BOOL CheckTerminalParameters(ISP_ENVIRONMENT *IspEnvironment, char* pstr)
{
    if (stricmp(pstr, "-localecho") == 0)
    {
        IspEnvironment->LocalEcho = 1;
        DebugPrintf(3, "Local echo in terminal mode.\n");
        return TRUE;
    }

    if (stricmp(pstr, "-term") == 0)
    {
        IspEnvironment->TerminalAfterUpload = 1;
        DebugPrintf(3, "Invoke terminal after upload.\n");
        return TRUE;
    }

    if (stricmp(pstr, "-termonly") == 0)
    {
        IspEnvironment->TerminalOnly    = 1;
        IspEnvironment->ProgramChip    = 0;
        DebugPrintf(3, "Only provide terminal.\n");
        return TRUE;
    }

    return FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x2d01(%rip), %rsi      # 0xd86c
callq 0x4380
cmpl $0x0, %eax
jne 0xab9c
movq -0x10(%rbp), %rax
movb $0x1, 0x32(%rax)
movl $0x3, %edi
leaq 0x2cee(%rip), %rsi      # 0xd877
movb $0x0, %al
callq 0x44e0
movl $0x1, -0x4(%rbp)
jmp 0xac1d
movq -0x18(%rbp), %rdi
leaq 0x2cee(%rip), %rsi      # 0xd895
callq 0x4380
cmpl $0x0, %eax
jne 0xabd5
movq -0x10(%rbp), %rax
movb $0x1, 0x31(%rax)
movl $0x3, %edi
leaq 0x2cd6(%rip), %rsi      # 0xd89b
movb $0x0, %al
callq 0x44e0
movl $0x1, -0x4(%rbp)
jmp 0xac1d
movq -0x18(%rbp), %rdi
leaq 0x2cda(%rip), %rsi      # 0xd8ba
callq 0x4380
cmpl $0x0, %eax
jne 0xac16
movq -0x10(%rbp), %rax
movb $0x1, 0x30(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x8(%rax)
movl $0x3, %edi
leaq 0x2cbe(%rip), %rsi      # 0xd8c4
movb $0x0, %al
callq 0x44e0
movl $0x1, -0x4(%rbp)
jmp 0xac1d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/oridb[P]mc/muse/muse.c
// Function: usage
static void
usage(char *prog)
{
	printf("%s [-hIdos] [-o outfile] [-p pkgname] [-m] inputs\n", prog);
	printf("\t-h\tprint this help\n");
	printf("\t\tThe outfile must be the same name as each package merged.\n");
	printf("\t-d\tPrint debug dumps\n");
	printf("\t-o out\tOutput to outfile\n");
	printf("\t-s\tShow the contents of usefiles `inputs`\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x1eb21(%rip), %rdi     # 0x21098
movb $0x0, %al
callq 0x20b0
leaq 0x1eb46(%rip), %rdi     # 0x210cb
movb $0x0, %al
callq 0x20b0
leaq 0x1eb4d(%rip), %rdi     # 0x210e0
movb $0x0, %al
callq 0x20b0
leaq 0x1eb7c(%rip), %rdi     # 0x2111d
movb $0x0, %al
callq 0x20b0
leaq 0x1eb85(%rip), %rdi     # 0x21134
movb $0x0, %al
callq 0x20b0
leaq 0x1eb92(%rip), %rdi     # 0x2114f
movb $0x0, %al
callq 0x20b0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/oridb[P]mc/muse/muse.c
// Function: mergeuse
static void
mergeuse(char *path)
{
	FILE *f;
	Stab *st;

	st = file.globls;
	f = fopen(path, "r");
	if (!f) {
		fprintf(stderr, "couldn't open %s\n", path);
		exit(1);
	}
	loaduse(path, f, st, Visexport);
	fclose(f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq 0x27765(%rip), %rax     # 0x29d48
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x20095(%rip), %rsi     # 0x22687
callq 0x21b0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x2628
movq 0x269ef(%rip), %rax     # 0x28ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x1eb64(%rip), %rsi     # 0x2117b
movb $0x0, %al
callq 0x2150
movl $0x1, %edi
callq 0x21d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x1, %ecx
callq 0x19770
movq -0x10(%rbp), %rdi
callq 0x2090
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/twine80n6t4clocv2/ref/cloc.c
// Function: ae_init
int ae_init(ae_cxt* cxt, const byte* userkey, int keylen)
{
	if(keylen/8 != CRYPTO_KEYBYTES){
		return KEY_ERROR;
	}
	cxt->userkey = (byte*)userkey;
	Keyschedule(keylen, userkey);
	cxt->klen = keylen;

	return SUCCESS;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl $0xa, %eax
je 0x124d
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x127d
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movl 0xc(%rsp), %edi
movq 0x10(%rsp), %rsi
callq 0x10a0
movl 0xc(%rsp), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x18(%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/twine80n6t4clocv2/ref/encrypt.c
// Function: crypto_aead_encrypt
int crypto_aead_encrypt(
		unsigned char *c, unsigned long long *clen,
		const unsigned char *m, unsigned long long mlen,
		const unsigned char *ad, unsigned long long adlen,
		const unsigned char *nsec,                          //not relavent to CLOC
		const unsigned char *npub,
		const unsigned char *k
		)
{
    /* set ciphertext length */
    *clen = mlen + CRYPTO_ABYTES;
    
    unsigned char tag[CRYPTO_ABYTES];
    ae_cxt cxt;
    
    /* set key and compute round keys */
    ae_init(&cxt, k, CRYPTO_KEYBYTES * 8);
    
    /* process the associated data */
    process_ad(&cxt, ad, adlen, npub, CRYPTO_NPUBBYTES);
    
    /* encrypt message */
    ae_encrypt(&cxt, (unsigned char*)m, mlen, c, tag, CRYPTO_ABYTES, ENC);
    
    /* copy the tag to the end of ciphertext */
    memcpy(c+mlen, tag, CRYPTO_ABYTES);
	return RETURN_SUCCESS;
}

// Assembly:
subq $0xb8, %rsp
movq 0xd0(%rsp), %rax
movq 0xc8(%rsp), %rax
movq 0xc0(%rsp), %rax
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x98(%rsp)
movq %r8, 0x90(%rsp)
movq %r9, 0x88(%rsp)
movq 0x98(%rsp), %rcx
addq $0x4, %rcx
movq 0xa8(%rsp), %rax
movq %rcx, (%rax)
movq 0xd0(%rsp), %rsi
leaq 0x10(%rsp), %rdi
movl $0x50, %edx
callq 0x10b0
movq 0x90(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq 0xc8(%rsp), %rcx
leaq 0x10(%rsp), %rdi
movl $0x6, %r8d
callq 0x1050
movq 0xa0(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq 0xb0(%rsp), %rcx
leaq 0x84(%rsp), %r8
leaq 0x10(%rsp), %rdi
movl $0x4, %r9d
movl $0x1, (%rsp)
callq 0x10f0
movq 0xb0(%rsp), %rax
movq 0x98(%rsp), %rcx
movl 0x84(%rsp), %edx
movl %edx, (%rax,%rcx)
xorl %eax, %eax
addq $0xb8, %rsp
retq