LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/connycommy[P]atCmdDevice/src/test/TestProductionCode.c
// Function: test_modem_SocketOpen
void test_modem_SocketOpen(){
    cmError_t retValue = CM_FAIL;
    cellModemConfig_t config =CELLMODEMCONFIG_INITIALIZER;
    socketData_t configSocket =SOCKETDATA_INITIALIZER;
    MockResponseExpected = CM_CMD_MOCK_QIOPEN_RESPONSE;
    configSocket.accessMode = 0;
    configSocket.contextId = config.contextId = 1;
    configSocket.connectId = config.connectId = 3;
    configSocket.serviceType = CELLMODEM_SOCKET_SRV_TYPE_UDP;
    strcpy(configSocket.remip , "127.0.0.1");
    strcpy(configSocket.remPort , "0");
    strcpy(configSocket.locPort , "2020" );
    retValue = cellModem_SocketOpen(&cmData,&configSocket);
    TEST_ASSERT_EQUAL_INT32(CM_OK,retValue);
    TEST_ASSERT_EQUAL_INT(0, cmIsAsyncEvent(&cmData));  
    
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x78, %rsp
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %rsi
movups %xmm0, 0x48(%rsi)
movups %xmm0, 0x18(%rsi)
movups %xmm0, 0x8(%rsi)
movups %xmm0, 0x58(%rsi)
movups %xmm0, 0x38(%rsi)
movups %xmm0, 0x28(%rsi)
andq $0x0, 0x68(%rsi)
leaq 0x41bb(%rip), %rax      # 0x7b9f
movq %rax, 0x97a5(%rip)      # 0xd190
movabsq $0x100000003, %rax      # imm = 0x100000003
movq %rax, 0x4c(%rsi)
leaq 0x41b6(%rip), %rax      # 0x7bb6
movq %rax, 0x20(%rsi)
movabsq $0x2e302e302e373231, %rax # imm = 0x2E302E302E373231
movq %rax, (%rsi)
movw $0x31, 0x8(%rsi)
movw $0x30, 0x10(%rsi)
movl $0x30323032, 0x18(%rsi) # imm = 0x30323032
movb $0x0, 0x1c(%rsi)
leaq 0x96f1(%rip), %rbx      # 0xd120
movq %rbx, %rdi
callq 0x21de
movslq %eax, %rsi
pushq $0x14
popq %rbp
movl $0x159, %ecx            # imm = 0x159
xorl %edi, %edi
xorl %edx, %edx
movl %ebp, %r8d
callq 0x507b
movq %rbx, %rdi
callq 0x1552
movzbl %al, %esi
movl $0x15a, %ecx            # imm = 0x15A
xorl %edi, %edi
xorl %edx, %edx
movl %ebp, %r8d
callq 0x507b
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/connycommy[P]atCmdDevice/src/test/TestProductionCode.c
// Function: test_modem_QIURC_incomingConnection
void test_modem_QIURC_incomingConnection(){
    cmError_t retValue = CM_FAIL; 
    asynEventIncomingConn_t getDataIncomingConn = ASYNCEVENT_INCOMING_CONN_INITIALIZER;

    TEST_ASSERT_EQUAL_INT32(1 ,cmIsAsyncEvent(&cmData));
    retValue = cellModem_UrcGetDataIncomingConnection(&cmData, &getDataIncomingConn);
    TEST_ASSERT_EQUAL_INT32(CM_OK,retValue);
    TEST_ASSERT_EQUAL_INT32(11, getDataIncomingConn.info.connectId);
    TEST_ASSERT_EQUAL_INT32(1, getDataIncomingConn.serverId);
    TEST_ASSERT_EQUAL_INT32(63713, getDataIncomingConn.remotePort);
    TEST_ASSERT_EQUAL_STRING("192.168.32.68", getDataIncomingConn.remoteIp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
leaq 0x8d2f(%rip), %r15      # 0xd120
movq %r15, %rdi
callq 0x1552
movzbl %al, %esi
pushq $0x1
popq %r14
pushq $0x14
popq %rbp
movl $0x215, %ecx            # imm = 0x215
movq %r14, %rdi
xorl %edx, %edx
movl %ebp, %r8d
callq 0x507b
movq %r15, %rdi
movq %rbx, %rsi
callq 0x27f8
movslq %eax, %rsi
movl $0x217, %ecx            # imm = 0x217
xorl %edi, %edi
xorl %edx, %edx
movl %ebp, %r8d
callq 0x507b
movslq 0x4(%rbx), %rsi
pushq $0xb
popq %rdi
movl $0x218, %ecx            # imm = 0x218
xorl %edx, %edx
movl %ebp, %r8d
callq 0x507b
movslq 0x8(%rbx), %rsi
movl $0x219, %ecx            # imm = 0x219
movq %r14, %rdi
xorl %edx, %edx
movl %ebp, %r8d
callq 0x507b
movzwl 0x1c(%rbx), %esi
movl $0xf8e1, %edi           # imm = 0xF8E1
movl $0x21a, %ecx            # imm = 0x21A
xorl %edx, %edx
movl %ebp, %r8d
callq 0x507b
leaq 0xc(%rsp), %rsi
leaq 0x37f3(%rip), %rdi      # 0x7c77
movl $0x21b, %ecx            # imm = 0x21B
xorl %edx, %edx
callq 0x5a58
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/connycommy[P]atCmdDevice/src/test/TestProductionCode.c
// Function: test_modem_QIURC_closedConnection
void test_modem_QIURC_closedConnection(){
    cmError_t retValue = CM_FAIL; 
    asynEventURC_t getDataClosedConn ;

    TEST_ASSERT_EQUAL_INT32(1 ,cmIsAsyncEvent(&cmData));
    retValue = cellModem_UrcGetClosedConnection(&cmData, &getDataClosedConn);
    TEST_ASSERT_EQUAL_INT32(CM_OK,retValue);
    TEST_ASSERT_EQUAL_INT32(10, getDataClosedConn.connectId);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x8c75(%rip), %r14      # 0xd120
movq %r14, %rdi
callq 0x1552
movzbl %al, %esi
pushq $0x1
popq %rdi
pushq $0x14
popq %rbx
movl $0x222, %ecx            # imm = 0x222
xorl %edx, %edx
movl %ebx, %r8d
callq 0x507b
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2991
movslq %eax, %rsi
movl $0x224, %ecx            # imm = 0x224
xorl %edi, %edi
xorl %edx, %edx
movl %ebx, %r8d
callq 0x507b
movslq 0x4(%r15), %rsi
pushq $0xa
popq %rdi
movl $0x225, %ecx            # imm = 0x225
xorl %edx, %edx
movl %ebx, %r8d
callq 0x507b
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/connycommy[P]atCmdDevice/src/test/TestProductionCode.c
// Function: test_modem_QIURC_RecvConnection
void test_modem_QIURC_RecvConnection(){
    cmError_t retValue = CM_FAIL; 
    asynEventURC_t getRecvConn ;

    TEST_ASSERT_EQUAL_INT32(1 ,cmIsAsyncEvent(&cmData));
    retValue = cellModem_UrcGetRecvConnection(&cmData, &getRecvConn);
    TEST_ASSERT_EQUAL_INT32(CM_OK,retValue);
    TEST_ASSERT_EQUAL_INT32(10, getRecvConn.connectId);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x8c01(%rip), %r14      # 0xd120
movq %r14, %rdi
callq 0x1552
movzbl %al, %esi
pushq $0x1
popq %rdi
pushq $0x14
popq %rbx
movl $0x22c, %ecx            # imm = 0x22C
xorl %edx, %edx
movl %ebx, %r8d
callq 0x507b
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2a44
movslq %eax, %rsi
movl $0x22e, %ecx            # imm = 0x22E
xorl %edi, %edi
xorl %edx, %edx
movl %ebx, %r8d
callq 0x507b
movslq 0x4(%r15), %rsi
pushq $0xa
popq %rdi
movl $0x22f, %ecx            # imm = 0x22F
xorl %edx, %edx
movl %ebx, %r8d
callq 0x507b
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/connycommy[P]atCmdDevice/src/test/TestProductionCode.c
// Function: test_modem_SocketClose
void test_modem_SocketClose(){
    cmError_t retValue = CM_FAIL;
    MockResponseExpected = CM_CMD_MOCK_GENERAL_RESPONSE;
    retValue = cellModem_SocketClose(&cmData,10);
    TEST_ASSERT_EQUAL_INT32(CM_OK,retValue);
}

// Assembly:
pushq %rax
leaq 0x37a7(%rip), %rax      # 0x7d32
movq %rax, 0x8bfe(%rip)      # 0xd190
leaq 0x8b87(%rip), %rdi      # 0xd120
pushq $0xa
popq %rsi
callq 0x2af7
movslq %eax, %rsi
pushq $0x14
popq %r8
movl $0x236, %ecx            # imm = 0x236
xorl %edi, %edi
xorl %edx, %edx
popq %rax
jmp 0x507b
// File: /workspace/github_c_makefile_star2_O2/connycommy[P]atCmdDevice/src/test/TestProductionCode.c
// Function: test_modem_SocketSendData
void test_modem_SocketSendData(){
    cmError_t retValue = CM_FAIL;
    socketData_t socketData = SOCKETDATA_INITIALIZER;
    char data[1024] = "hola lalala";
    MockResponseExpected = ">";//CM_CMD_MOCK_GENERAL_RESPONSE;
    socketData.connectId = 1;
    //socketData.serviceType = cellModem_SOCKET_SRV_TYPE_TCP;
    socketData.dataToSend = data;
    retValue = cellModem_SocketConfigSendData(&cmData,&socketData);
    TEST_ASSERT_EQUAL_INT32(CM_OK,retValue);

    retValue = CM_FAIL;
    MockResponseExpected = CM_CMD_MOCK_QISEND_OK_RESPONSE;
    retValue = cellModem_SocketSendData(&cmData,&socketData);
    TEST_ASSERT_EQUAL_INT32(CM_OK,retValue);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x470, %rsp            # imm = 0x470
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, 0x60(%rbx)
movaps %xmm0, 0x50(%rbx)
movaps %xmm0, 0x40(%rbx)
movaps %xmm0, 0x30(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
leaq 0x3c36(%rip), %rsi      # 0x8220
leaq 0x70(%rsp), %r14
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
callq 0x10c0
leaq 0x3bfa(%rip), %rax      # 0x81fd
movq %rax, 0x8b86(%rip)      # 0xd190
movl $0x1, 0x4c(%rbx)
movq %r14, 0x28(%rbx)
leaq 0x8b04(%rip), %r14      # 0xd120
movq %r14, %rdi
movq %rbx, %rsi
callq 0x26bb
movslq %eax, %rsi
pushq $0x14
popq %rbp
movl $0x242, %ecx            # imm = 0x242
xorl %edi, %edi
xorl %edx, %edx
movl %ebp, %r8d
callq 0x507b
leaq 0x2aa0(%rip), %rax      # 0x70e5
movq %rax, 0x8b44(%rip)      # 0xd190
movq %r14, %rdi
movq %rbx, %rsi
callq 0x275a
movslq %eax, %rsi
movl $0x247, %ecx            # imm = 0x247
xorl %edi, %edi
xorl %edx, %edx
movl %ebp, %r8d
callq 0x507b
addq $0x470, %rsp            # imm = 0x470
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/connycommy[P]atCmdDevice/src/test/unity.c
// Function: UnityPrint
void UnityPrint(const char* string)
{
    const char* pch = string;

    if (pch != NULL)
    {
        while (*pch)
        {
#ifdef UNITY_OUTPUT_COLOR
            /* print ANSI escape code */
            if ((*pch == 27) && (*(pch + 1) == '['))
            {
                pch += UnityPrintAnsiEscapeString(pch);
                continue;
            }
#endif
            UnityPrintChar(pch);
            pch++;
        }
    }
}

// Assembly:
testq %rdi, %rdi
je 0x49b5
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x5c
popq %rbp
pushq $0x72
popq %r15
pushq $0x78
popq %r12
pushq $0x2
popq %r13
movzbl (%rbx), %r14d
testl %r14d, %r14d
je 0x49a7
leal -0x20(%r14), %eax
cmpb $0x5e, %al
ja 0x496c
movl %r14d, %edi
jmp 0x4987
movl %ebp, %edi
callq 0x1030
cmpl $0xa, %r14d
je 0x4984
cmpl $0xd, %r14d
jne 0x4991
movl %r15d, %edi
jmp 0x4987
pushq $0x6e
popq %rdi
callq 0x1030
incq %rbx
jmp 0x4956
movl %r12d, %edi
callq 0x1030
movsbq (%rbx), %rdi
movl %r13d, %esi
callq 0x4a43
jmp 0x498c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/connycommy[P]atCmdDevice/src/test/unity.c
// Function: UnityPrintNumberHex
void UnityPrintNumberHex(const UNITY_UINT number, const char nibbles_to_print)
{
    int nibble;
    char nibbles = nibbles_to_print;

    if ((unsigned)nibbles > UNITY_MAX_NIBBLES)
    {
        nibbles = UNITY_MAX_NIBBLES;
    }

    while (nibbles > 0)
    {
        nibbles--;
        nibble = (int)(number >> (nibbles * 4)) & 0x0F;
        if (nibble <= 9)
        {
            UNITY_OUTPUT_CHAR((char)('0' + nibble));
        }
        else
        {
            UNITY_OUTPUT_CHAR((char)('A' - 10 + nibble));
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x10, %sil
pushq $0x10
popq %rax
cmovbl %esi, %eax
movzbl %al, %r15d
leaq -0x4(,%r15,4), %r14
testq %r15, %r15
jle 0x4a8c
movq %rbx, %rax
movl %r14d, %ecx
shrq %cl, %rax
decq %r15
andl $0xf, %eax
leal 0x37(%rax), %ecx
leal 0x30(%rax), %edi
cmpl $0xa, %eax
cmovael %ecx, %edi
callq 0x1030
addq $-0x4, %r14
jmp 0x4a61
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/connycommy[P]atCmdDevice/src/test/unity.c
// Function: UnityPrintNumberByStyle
void UnityPrintNumberByStyle(const UNITY_INT number, const UNITY_DISPLAY_STYLE_T style)
{
    if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
    {
        if (style == UNITY_DISPLAY_STYLE_CHAR)
        {
            /* printable characters plus CR & LF are printed */
            UNITY_OUTPUT_CHAR('\'');
            if ((number <= 126) && (number >= 32))
            {
                UNITY_OUTPUT_CHAR((int)number);
            }
            /* write escaped carriage returns */
            else if (number == 13)
            {
                UNITY_OUTPUT_CHAR('\\');
                UNITY_OUTPUT_CHAR('r');
            }
            /* write escaped line feeds */
            else if (number == 10)
            {
                UNITY_OUTPUT_CHAR('\\');
                UNITY_OUTPUT_CHAR('n');
            }
            /* unprintable characters are shown as codes */
            else
            {
                UNITY_OUTPUT_CHAR('\\');
                UNITY_OUTPUT_CHAR('x');
                UnityPrintNumberHex((UNITY_UINT)number, 2);
            }
            UNITY_OUTPUT_CHAR('\'');
        }
        else
        {
            UnityPrintNumber(number);
        }
    }
    else if ((style & UNITY_DISPLAY_RANGE_UINT) == UNITY_DISPLAY_RANGE_UINT)
    {
        UnityPrintNumberUnsigned((UNITY_UINT)number);
    }
    else
    {
        UNITY_OUTPUT_CHAR('0');
        UNITY_OUTPUT_CHAR('x');
        UnityPrintNumberHex((UNITY_UINT)number, (char)((style & 0xF) * 2));
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
testb $0x10, %bpl
jne 0x4acf
testb $0x20, %bpl
jne 0x4aed
pushq $0x30
popq %rdi
callq 0x1030
pushq $0x78
popq %rdi
callq 0x1030
addb %bpl, %bpl
andb $0x1e, %bpl
movzbl %bpl, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4a43
cmpl $0x91, %ebp
jne 0x4afb
pushq $0x27
popq %rdi
callq 0x1030
leaq -0x20(%rbx), %rax
cmpq $0x5e, %rax
ja 0x4b09
movl %ebx, %edi
jmp 0x4b24
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4b69
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4b4c
pushq $0x5c
popq %rdi
callq 0x1030
cmpq $0xa, %rbx
je 0x4b21
cmpq $0xd, %rbx
jne 0x4b37
pushq $0x72
jmp 0x4b23
pushq $0x6e
popq %rdi
callq 0x1030
pushq $0x27
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1030
pushq $0x78
popq %rdi
callq 0x1030
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x4a43
jmp 0x4b29
// File: /workspace/github_c_makefile_star2_O2/connycommy[P]atCmdDevice/src/test/unity.c
// Function: UnityPrintNumber
void UnityPrintNumber(const UNITY_INT number_to_print)
{
    UNITY_UINT number = (UNITY_UINT)number_to_print;

    if (number_to_print < 0)
    {
        /* A negative number, including MIN negative */
        UNITY_OUTPUT_CHAR('-');
        number = (~number) + 1;
    }
    UnityPrintNumberUnsigned(number);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
jns 0x4b60
pushq $0x2d
popq %rdi
callq 0x1030
negq %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x4b69
// File: /workspace/github_c_makefile_star2_O2/connycommy[P]atCmdDevice/src/test/unity.c
// Function: UnityAddMsgIfSpecified
static void UnityAddMsgIfSpecified(const char* msg)
{
    if (msg)
    {
        UnityPrint(UnityStrSpacer);

#ifdef UNITY_PRINT_TEST_CONTEXT
        UNITY_PRINT_TEST_CONTEXT();
#endif
#ifndef UNITY_EXCLUDE_DETAILS
        if (Unity.CurrentDetail1)
        {
            UnityPrint(UnityStrDetail1Name);
            UnityPrint(Unity.CurrentDetail1);
            if (Unity.CurrentDetail2)
            {
                UnityPrint(UnityStrDetail2Name);
                UnityPrint(Unity.CurrentDetail2);
            }
            UnityPrint(UnityStrSpacer);
        }
#endif
        UnityPrint(msg);
    }
}

// Assembly:
testq %rdi, %rdi
je 0x507a
pushq %rbx
movq %rdi, %rbx
leaq 0x3bd2(%rip), %rdi      # 0x8bee
callq 0x4934
cmpq $0x0, 0x89d7(%rip)      # 0xda00
je 0x5071
leaq 0x3ba7(%rip), %rdi      # 0x8bd9
callq 0x4934
movq 0x89c2(%rip), %rdi      # 0xda00
callq 0x4934
cmpq $0x0, 0x89bd(%rip)      # 0xda08
je 0x5065
leaq 0x3b8f(%rip), %rdi      # 0x8be3
callq 0x4934
movq 0x89a8(%rip), %rdi      # 0xda08
callq 0x4934
leaq 0x3b82(%rip), %rdi      # 0x8bee
callq 0x4934
movq %rbx, %rdi
popq %rbx
jmp 0x4934
retq
// File: /workspace/github_c_makefile_star2_O2/connycommy[P]atCmdDevice/src/test/unity.c
// Function: UnityFail
void UnityFail(const char* msg, const UNITY_LINE_TYPE line)
{
    RETURN_IF_FAIL_OR_IGNORE;

    UnityTestResultsBegin(Unity.TestFile, line);
    UnityPrint(UnityStrFail);
    if (msg != NULL)
    {
        UNITY_OUTPUT_CHAR(':');

#ifdef UNITY_PRINT_TEST_CONTEXT
        UNITY_PRINT_TEST_CONTEXT();
#endif
#ifndef UNITY_EXCLUDE_DETAILS
        if (Unity.CurrentDetail1)
        {
            UnityPrint(UnityStrDetail1Name);
            UnityPrint(Unity.CurrentDetail1);
            if (Unity.CurrentDetail2)
            {
                UnityPrint(UnityStrDetail2Name);
                UnityPrint(Unity.CurrentDetail2);
            }
            UnityPrint(UnityStrSpacer);
        }
#endif
        if (msg[0] != ' ')
        {
            UNITY_OUTPUT_CHAR(' ');
        }
        UnityPrint(msg);
    }

    UNITY_FAIL_AND_BAIL;
}

// Assembly:
pushq %rbx
movq 0x7a6f(%rip), %rax      # 0xda38
orq 0x7a60(%rip), %rax      # 0xda30
jne 0x606e
movq %rdi, %rbx
movq 0x7a10(%rip), %rdi      # 0xd9f0
callq 0x4f17
leaq 0x29fc(%rip), %rdi      # 0x89e8
callq 0x4934
testq %rbx, %rbx
je 0x6063
pushq $0x3a
popq %rdi
callq 0x1030
cmpq $0x0, 0x79fa(%rip)      # 0xda00
je 0x604e
leaq 0x2bca(%rip), %rdi      # 0x8bd9
callq 0x4934
movq 0x79e5(%rip), %rdi      # 0xda00
callq 0x4934
cmpq $0x0, 0x79e0(%rip)      # 0xda08
je 0x6042
leaq 0x2bb2(%rip), %rdi      # 0x8be3
callq 0x4934
movq 0x79cb(%rip), %rdi      # 0xda08
callq 0x4934
leaq 0x2ba5(%rip), %rdi      # 0x8bee
callq 0x4934
cmpb $0x20, (%rbx)
je 0x605b
pushq $0x20
popq %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x4934
movq $0x1, 0x79c2(%rip) # 0xda30
leaq 0x79cb(%rip), %rdi      # 0xda40
pushq $0x1
popq %rsi
callq 0x10d0
// File: /workspace/github_c_makefile_star2_O2/connycommy[P]atCmdDevice/src/test/unity.c
// Function: UnityMessage
void UnityMessage(const char* msg, const UNITY_LINE_TYPE line)
{
    UnityTestResultsBegin(Unity.TestFile, line);
    UnityPrint("INFO");
    if (msg != NULL)
    {
      UNITY_OUTPUT_CHAR(':');
      UNITY_OUTPUT_CHAR(' ');
      UnityPrint(msg);
    }
    UNITY_PRINT_EOL();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x7905(%rip), %rdi      # 0xd9f0
callq 0x4f17
leaq 0x2b8f(%rip), %rdi      # 0x8c86
callq 0x4934
testq %rbx, %rbx
je 0x6119
pushq $0x3a
popq %rdi
callq 0x1030
pushq $0x20
popq %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x4934
pushq $0xa
popq %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/connycommy[P]atCmdDevice/src/test/unity.c
// Function: UnityDefaultTestRun
void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum)
{
    Unity.CurrentTestName = FuncName;
    Unity.CurrentTestLineNumber = (UNITY_LINE_TYPE)FuncLineNum;
    Unity.NumberOfTests++;
    UNITY_CLR_DETAILS();
    UNITY_EXEC_TIME_START();
    if (TEST_PROTECT())
    {
        setUp();
        Func();
    }
    if (TEST_PROTECT())
    {
        tearDown();
    }
    UNITY_EXEC_TIME_STOP();
    UnityConcludeTest();
}

// Assembly:
pushq %rbx
movq %rsi, 0x78ce(%rip)      # 0xd9f8
movslq %edx, %rax
movq %rax, 0x78dc(%rip)      # 0xda10
incq 0x78dd(%rip)            # 0xda18
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x78b8(%rip)     # 0xda00
leaq 0x78f1(%rip), %rdi      # 0xda40
callq 0x10b0
testl %eax, %eax
jne 0x615f
callq 0x2b7c
callq *%rbx
leaq 0x78da(%rip), %rdi      # 0xda40
callq 0x10b0
testl %eax, %eax
jne 0x6174
callq 0x2b7d
callq 0x4ebb
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/lmcilroy[P]lzm/lzm.c
// Function: usage
static void
usage(void)
{
	printf("usage: lzm [options] <files...>\n");
	printf("	-0		no compression\n");
	printf("	-1		fast compression\n");
	printf("	-2 .. -6	high compression\n");
	printf("	-c		write output to stdout\n");
	printf("	-b <tests>	benchmark mode\n");
	printf("	-d		decompress file\n");
	printf("	-f		overwrite output file\n");
	printf("	-k		keep input file\n");
	printf("	-r		recurse into directories\n");
	printf("	-t		test compressed file\n");
	printf("	-v		be verbose\n");
	printf("	-h		this help message\n");
	printf("	-x <size>	chunk size for compression (KB)\n");
}

// Assembly:
pushq %rax
leaq 0x3ced(%rip), %rdi      # 0x55b3
callq 0x1080
leaq 0x3d01(%rip), %rdi      # 0x55d3
callq 0x1080
leaq 0x3d09(%rip), %rdi      # 0x55e7
callq 0x1080
leaq 0x3d13(%rip), %rdi      # 0x55fd
callq 0x1080
leaq 0x3d22(%rip), %rdi      # 0x5618
callq 0x1080
leaq 0x3d32(%rip), %rdi      # 0x5634
callq 0x1080
leaq 0x3d41(%rip), %rdi      # 0x564f
callq 0x1080
leaq 0x3d4a(%rip), %rdi      # 0x5664
callq 0x1080
leaq 0x3d59(%rip), %rdi      # 0x567f
callq 0x1080
leaq 0x3d62(%rip), %rdi      # 0x5694
callq 0x1080
leaq 0x3d74(%rip), %rdi      # 0x56b2
callq 0x1080
leaq 0x3d82(%rip), %rdi      # 0x56cc
callq 0x1080
leaq 0x3d86(%rip), %rdi      # 0x56dc
callq 0x1080
leaq 0x3d91(%rip), %rdi      # 0x56f3
popq %rax
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O2/lmcilroy[P]lzm/lzm.c
// Function: write_data
static inline unsigned int
write_data(int fd, const void *buffer, const size_t size)
{
	unsigned int resid;
	int ret;

	resid = size;
	while (resid > 0) {
		ret = write(fd, buffer, resid);
		if (ret < 0)
			return errno;
		resid -= ret;
		buffer = (char *)buffer + ret;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
testl %ebx, %ebx
je 0x2b84
movl %ebx, %edx
movl %ebp, %edi
movq %r14, %rsi
callq 0x10b0
testl %eax, %eax
js 0x2b88
subl %eax, %ebx
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addq %rax, %r14
jmp 0x2b64
xorl %eax, %eax
jmp 0x2b8f
callq 0x1050
movl (%rax), %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lmcilroy[P]lzm/lzm.c
// Function: read_data
static inline unsigned int
read_data(int fd, void *buffer, unsigned int *size)
{
	unsigned int resid;
	int ret;

	resid = *size;
	while (resid > 0) {
		ret = read(fd, buffer, resid);
		if (ret < 0)
			return errno;
		if (ret == 0)
			break;
		resid -= ret;
		buffer = (char *)buffer + ret;
	}

	*size -= resid;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movl (%rdx), %r15d
testl %r15d, %r15d
je 0x2bcb
movl %r15d, %edx
movl %ebp, %edi
movq %r14, %rsi
callq 0x1150
testl %eax, %eax
js 0x2bd2
je 0x2bcb
subl %eax, %r15d
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addq %rax, %r14
jmp 0x2ba6
subl %r15d, (%rbx)
xorl %eax, %eax
jmp 0x2bd9
callq 0x1050
movl (%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lmcilroy[P]lzm/lzmencode.c
// Function: lzm_encode_none
static unsigned int
lzm_encode_none(
    const struct lzm_state * const state,
    const unsigned char * const buffer_in,
    const unsigned int size_in,
    unsigned char * const buffer_out,
    unsigned int * const size_out)
{
	unsigned char *curr_out;

	(void)state;

	curr_out = output_literals(buffer_out, buffer_in, size_in,
	    buffer_out + *size_out);
	if (curr_out == NULL)
		return EOVERFLOW;

	*size_out = curr_out - buffer_out;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movl (%r8), %ecx
addq %r14, %rcx
movq %r14, %rdi
callq 0x390b
testq %rax, %rax
je 0x3147
subl %r14d, %eax
movl %eax, (%rbx)
xorl %eax, %eax
jmp 0x314a
pushq $0x4b
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/lmcilroy[P]lzm/lzmencode.c
// Function: lzm_encode_init
unsigned int
lzm_encode_init(struct lzm_state ** const state, const unsigned int format,
    const unsigned int level)
{
	struct lzm_state *statep;
	unsigned int ilevel = level;
	int error = 0;

	*state = NULL;

	/* Currently only support the one format */
	if (format != LZM_FORMAT_1)
		return EINVAL;

	if (ilevel == LZM_LEVEL_DEF)
		ilevel = LZM_LEVEL_FAST;

	if (ilevel >= LZM_LEVEL_COUNT)
		return EINVAL;

	error = lzm_malloc((void **)&statep, sizeof(*statep));
	if (error != 0)
		goto out;

	statep->level = ilevel;
	statep->format = format;
	statep->hash_order = lzm_encode_config[statep->level].hash_order;
	statep->hash_buckets = 1 << statep->hash_order;
	statep->chain_order = lzm_encode_config[statep->level].chain_order;
	statep->chain_mask = (1 << statep->chain_order) - 1;
	statep->last_ht = NULL;
	statep->chains = NULL;

	if (statep->hash_order > 0) {
		error = lzm_malloc((void **)&statep->last_ht,
		    sizeof(*statep->last_ht) << statep->hash_order);
		if (error != 0)
			goto out;
	}

	if (statep->chain_order > 0) {
		error = lzm_malloc((void **)&statep->chains,
		    sizeof(*statep->chains) << statep->chain_order);
		if (error != 0)
			goto out;
	}

	*state = statep;

 out:
	if (error != 0)
		lzm_encode_finish(statep);

	return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
andq $0x0, (%rdi)
pushq $0x16
popq %rbp
cmpl $0x1, %esi
jne 0x37b4
movl %edx, %r14d
cmpl $-0x1, %edx
pushq $0x1
popq %r15
cmovel %r15d, %r14d
cmpl $0x7, %r14d
ja 0x37b4
movq %rdi, %rbx
movq %rsp, %rdi
pushq $0x28
popq %rsi
callq 0x3853
testl %eax, %eax
je 0x37c1
movl %eax, %ebp
movq (%rsp), %rdi
callq 0x3868
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rax
movl %r14d, 0x20(%rax)
movl %r15d, 0x24(%rax)
movl %r14d, %edx
shlq $0x4, %rdx
leaq 0x49e5(%rip), %rsi      # 0x81c0
movl 0x8(%rdx,%rsi), %ecx
movl %ecx, 0x10(%rax)
shll %cl, %r15d
movl %r15d, 0x14(%rax)
movl 0xc(%rdx,%rsi), %ecx
movl %ecx, 0x18(%rax)
pushq $-0x1
popq %rdx
shll %cl, %edx
notl %edx
movl %edx, 0x1c(%rax)
andq $0x0, (%rax)
movq (%rsp), %rdi
andq $0x0, 0x8(%rdi)
movl 0x10(%rdi), %ecx
pushq $0x8
popq %r14
testq %rcx, %rcx
je 0x3826
movq %r14, %rsi
shlq %cl, %rsi
callq 0x3853
testl %eax, %eax
jne 0x37a9
movq (%rsp), %rdi
movl 0x18(%rdi), %ecx
testq %rcx, %rcx
je 0x3849
addq $0x8, %rdi
shlq %cl, %r14
movl %r14d, %esi
callq 0x3853
testl %eax, %eax
jne 0x37a9
movq (%rsp), %rdi
movq %rdi, (%rbx)
xorl %ebp, %ebp
jmp 0x37b4
// File: /workspace/github_c_makefile_star2_O2/lmcilroy[P]lzm/lzmencode.c
// Function: lzm_encode_finish
unsigned int
lzm_encode_finish(const struct lzm_state * const state)
{
	if (state != NULL) {
		if (state->last_ht != NULL)
			free(state->last_ht);
		if (state->chains != NULL)
			free(state->chains);
		free((void *)state);
	}

	return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x388b
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/lmcilroy[P]lzm/lzmencode.c
// Function: lzm_encode
unsigned int
lzm_encode(const struct lzm_state * const state,
    const unsigned char * const buffer_in,
    const unsigned int size_in, unsigned char * const buffer_out,
    unsigned int * const size_out)
{
	int error;

	if (buffer_in == NULL || buffer_out == NULL)
		return EINVAL;

	if (size_in <= 16) {
		error = lzm_encode_none(state, buffer_in, size_in,
		    buffer_out, size_out);
	} else {
		error = lzm_encode_config[state->level].codec(state,
		    buffer_in, size_in, buffer_out, size_out);

		if (error == EOVERFLOW && state->level != LZM_LEVEL_NONE)
			error = lzm_encode_none(state, buffer_in, size_in,
			    buffer_out, size_out);
	}

	return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
testq %rsi, %rsi
sete %al
testq %rcx, %rcx
sete %cl
orb %al, %cl
je 0x38b5
pushq $0x16
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r8, %rbx
movl %edx, %ebp
movq %rsi, %r15
cmpl $0x10, %edx
jbe 0x38ef
movq %rdi, %r12
movl 0x20(%rdi), %eax
shlq $0x4, %rax
leaq 0x48ed(%rip), %r9       # 0x81c0
movq %r15, %rsi
movl %ebp, %edx
movq %r14, %rcx
movq %rbx, %r8
callq *(%rax,%r9)
cmpl $0x4b, %eax
jne 0x38ac
cmpl $0x0, 0x20(%r12)
je 0x3907
movq %r15, %rsi
movl %ebp, %edx
movq %r14, %rcx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3121
pushq $0x4b
jmp 0x38ab
// File: /workspace/github_c_makefile_star2_O2/lmcilroy[P]lzm/lzmencode.c
// Function: output_data
static inline unsigned char *
output_data(unsigned char *out, const unsigned char * const start,
    const unsigned int literals, const unsigned int offset,
    const unsigned int length)
{
	unsigned char * const op = out++;

	*op = 0;
	out = output_offset(out, offset);
	out = output_literals_op(op, out, start, literals);
	out = output_match_op(op, out, length);

	return out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %eax
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
orl %eax, %ecx
bsrl %ecx, %r8d
xorl $0x1f, %r8d
leaq 0x1df7(%rip), %r9       # 0x5740
movl (%r9,%r8,8), %ecx
shll %cl, %eax
orl 0x4(%r9,%r8,8), %eax
movq %rdi, %r14
movl %eax, 0x1(%rdi)
leaq (%rdi,%rcx), %r15
incq %r15
testl %edx, %edx
je 0x3987
movl %edx, %r13d
movq %rsi, %r12
cmpl $0xe, %edx
ja 0x398b
movl %r13d, %eax
shlb $0x4, %al
movb %al, (%r14)
movups (%r12), %xmm0
movups %xmm0, (%r15)
movl %r13d, %r13d
jmp 0x39b2
xorl %eax, %eax
jmp 0x39b5
movb $-0x10, (%r14)
leal -0xf(%r13), %esi
movq %r15, %rdi
callq 0x39e4
movq %rax, %r15
movl %r13d, %r13d
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x11b0
movb (%r14), %al
addq %r13, %r15
cmpl $0xe, %ebx
ja 0x39cc
orb %bl, %al
movb %al, (%r14)
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
orb $0xf, %al
movb %al, (%r14)
addl $-0xf, %ebx
movq %r15, %rdi
movl %ebx, %esi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x39e4
// File: /workspace/github_c_makefile_star2_O2/lmcilroy[P]lzm/lzmencode.c
// Function: output_length
static inline unsigned char *
output_length(unsigned char *out, const unsigned int length)
{
	if (likely(length < 252)) {
		*out++ = length;
	} else if (likely(length < (256+252))) {
		*out++ = 252;
		*out++ = length - 252;
	} else if (likely(length < (65536+253))) {
		*out++ = 253;
		writemem16(out, length - 253);
		out += 2;
	} else if (likely(length < (16777216+254))) {
		*out++ = 254;
		writemem32(out, length - 254);
		out += 3;
	} else {
		*out++ = 255;
		writemem32(out, length - 255);
		out += 4;
	}

	return out;
}

// Assembly:
movq %rdi, %rax
cmpl $0xfb, %esi
ja 0x39f6
movb %sil, (%rax)
incq %rax
retq
cmpl $0x1fb, %esi            # imm = 0x1FB
ja 0x3a0e
movb $-0x4, (%rax)
addb $0x4, %sil
movb %sil, 0x1(%rax)
addq $0x2, %rax
retq
cmpl $0x100fc, %esi          # imm = 0x100FC
ja 0x3a28
movb $-0x3, (%rax)
addl $0xffffff03, %esi       # imm = 0xFFFFFF03
movw %si, 0x1(%rax)
addq $0x3, %rax
retq
cmpl $0x10000fd, %esi        # imm = 0x10000FD
ja 0x3a41
movb $-0x2, (%rax)
addl $0xffffff02, %esi       # imm = 0xFFFFFF02
movl %esi, 0x1(%rax)
addq $0x4, %rax
retq
movb $-0x1, (%rax)
addl $0xffffff01, %esi       # imm = 0xFFFFFF01
movl %esi, 0x1(%rax)
addq $0x5, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/lmcilroy[P]lzm/lzmencode.c
// Function: matchlen
static inline int
matchlen(const unsigned char * const start, const unsigned char * const match,
    const unsigned char * const end)
{
	const unsigned char *curr = start;
	const unsigned char *last = match;
	unsigned long currval, lastval;
	const unsigned int off = start - match;

	if (off <= 8)
		return matchlen_run(start, match, end, run[off]);

	if (likely(curr < (end - 7))) {
		lastval = readmem64(last);
		currval = readmem64(curr);
		if (likely(lastval != currval))
			return (__builtin_ctzl(lastval ^ currval) >> 3);
		last += 8;
		curr += 8;
	}
	while (curr < (end - 7)) {
		lastval = readmem64(last);
		currval = readmem64(curr);
		if (lastval != currval) {
			return (curr - start) +
			    (__builtin_ctzl(lastval ^ currval) >> 3);
		}
		last += 8;
		curr += 8;
	}
	if (curr < (end - 3)) {
		lastval = readmem32(last);
		currval = readmem32(curr);
		if (lastval != currval) {
			return (curr - start) +
			    (__builtin_ctz(lastval ^ currval) >> 3);
		}
		last += 4;
		curr += 4;
	}
	if (curr < (end - 1) && readmem16(last) == readmem16(curr)) {
		last += 2;
		curr += 2;
	}
	if (curr < end && *last == *curr)
		curr++;

	return curr - start;
}

// Assembly:
movq %rdi, %rcx
subq %rsi, %rcx
leaq -0x7(%rdx), %r8
cmpl $0x8, %ecx
ja 0x3ac8
cmpq %rsi, %r8
jbe 0x3ae9
andl $0xf, %ecx
leaq 0x46f3(%rip), %rax      # 0x8180
movzbl (%rcx,%rax), %r9d
movq (%rsi), %rsi
movq %rdi, %rax
cmpq %rdi, %r8
jbe 0x3aa9
movq (%rdi), %rax
cmpq %rax, %rsi
jne 0x3aee
leaq (%rdi,%r9), %rax
movl %eax, %r10d
subl %edi, %r10d
cmpq %r8, %rax
jae 0x3af9
movq (%rax), %r11
cmpq %r11, %rsi
jne 0x3b58
addq %r9, %rax
addl %r9d, %r10d
jmp 0x3aaf
cmpq %rdi, %r8
jbe 0x3b66
movq (%rsi), %rax
movq (%rdi), %rcx
cmpq %rcx, %rax
je 0x3b6b
xorq %rax, %rcx
bsfq %rcx, %rax
jmp 0x3af5
movq %rdi, %rax
jmp 0x3aff
xorq %rsi, %rax
bsfq %rax, %rax
shrl $0x3, %eax
retq
movq %rax, %rsi
subq %rcx, %rsi
leaq -0x3(%rdx), %rcx
cmpq %rcx, %rax
jae 0x3b1a
movl (%rsi), %ecx
movl (%rax), %r8d
cmpl %r8d, %ecx
jne 0x3b47
addq $0x4, %rsi
addq $0x4, %rax
leaq -0x1(%rdx), %rcx
cmpq %rcx, %rax
jae 0x3b33
movzwl (%rsi), %ecx
cmpw (%rax), %cx
jne 0x3b33
addq $0x2, %rsi
addq $0x2, %rax
cmpq %rdx, %rax
jae 0x3b44
movb (%rsi), %cl
xorl %edx, %edx
cmpb (%rax), %cl
sete %dl
addq %rdx, %rax
subl %edi, %eax
retq
subl %edi, %eax
xorl %ecx, %r8d
bsfl %r8d, %ecx
shrl $0x3, %ecx
addl %eax, %ecx
movl %ecx, %eax
retq
xorq %rsi, %r11
bsfq %r11, %rax
shrl $0x3, %eax
addl %r10d, %eax
retq
movq %rdi, %rax
jmp 0x3b73
addq $0x8, %rsi
leaq 0x8(%rdi), %rax
movl %eax, %ecx
subl %edi, %ecx
cmpq %r8, %rax
jae 0x3b94
movq (%rsi), %r9
movq (%rax), %r10
cmpq %r10, %r9
jne 0x3bb9
addq $0x8, %rsi
addq $0x8, %rax
addl $0x8, %ecx
jmp 0x3b77
leaq -0x3(%rdx), %r8
cmpq %r8, %rax
jae 0x3b1a
movl (%rsi), %r8d
movl (%rax), %r9d
cmpl %r9d, %r8d
je 0x3b12
xorl %r8d, %r9d
bsfl %r9d, %eax
jmp 0x3bc0
xorq %r9, %r10
bsfq %r10, %rax
shrl $0x3, %eax
addl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/lmcilroy[P]lzm/lzmencode.c
// Function: output_match_last
static inline unsigned char *
output_match_last(struct prev_match * const prev, unsigned char *out,
    const unsigned char * const out_limit)
{
	out = output_match(out, prev->lit_start,
	    prev->start - prev->lit_start, prev->start - prev->last,
	    prev->length, out_limit);
	prev->lit_start = prev->start + prev->length;

	return out;
}

// Assembly:
pushq %rbx
movq %rdx, %r9
movq %rsi, %rax
movq %rdi, %rbx
movq (%rdi), %rsi
movl 0x8(%rdi), %ecx
movl %ecx, %edx
subl %esi, %edx
subl 0x10(%rdi), %ecx
movl 0x18(%rdi), %r8d
movq %rax, %rdi
callq 0x3ce8
movl 0x18(%rbx), %ecx
addq 0x8(%rbx), %rcx
movq %rcx, (%rbx)
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/lmcilroy[P]lzm/lzmdecode.c
// Function: decode_length
static inline const unsigned char *
decode_length(const unsigned char *in, unsigned int * const length)
{
	unsigned int len;

	len = *in++;
	if (likely(len < 252)) {
		;
	} else if (likely(len == 252)) {
		len += *in;
		in += 1;
	} else if (likely(len == 253)) {
		len += readmem16(in);
		in += 2;
	} else if (likely(len == 254)) {
		len += readmem32(in) & 0xFFFFFF;
		in += 3;
	} else {
		len += readmem32(in);
		in += 4;
	}

	*length = len;
	return in;
}

// Assembly:
movq %rdi, %rax
movzbl (%rdi), %ecx
cmpl $0xfc, %ecx
jae 0x4147
incq %rax
movl %ecx, (%rsi)
retq
jne 0x4159
movzbl 0x1(%rax), %ecx
addl $0xfc, %ecx
addq $0x2, %rax
jmp 0x4144
cmpl $0xfd, %ecx
jne 0x4171
movzwl 0x1(%rax), %ecx
addl $0xfd, %ecx
addq $0x3, %rax
jmp 0x4144
cmpl $0xfe, %ecx
jne 0x418d
movl $0xffffff, %ecx         # imm = 0xFFFFFF
andl 0x1(%rax), %ecx
addl $0xfe, %ecx
addq $0x4, %rax
jmp 0x4144
movl $0xff, %ecx
addl 0x1(%rax), %ecx
addq $0x5, %rax
jmp 0x4144
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/kalloc.c
// Function: km_init2
void *km_init2(void *km_par, size_t min_core_size)
{
	kmem_t *km;
	km = (kmem_t*)kcalloc(km_par, 1, sizeof(kmem_t));
	km->par = km_par;
	if (km_par) km->min_core_size = min_core_size > 0? min_core_size : ((kmem_t*)km_par)->min_core_size - 2;
	else km->min_core_size = min_core_size > 0? min_core_size : 0x80000;
	return (void*)km;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rsi
pushq $0x30
popq %rdx
callq 0x24f0
movq %r14, (%rax)
testq %r14, %r14
je 0x24d8
testq %rbx, %rbx
jne 0x24e4
movq 0x8(%r14), %rbx
addq $-0x2, %rbx
jmp 0x24e4
testq %rbx, %rbx
movl $0x80000, %ecx          # imm = 0x80000
cmoveq %rcx, %rbx
movq %rbx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/kalloc.c
// Function: kcalloc
void *kcalloc(void *_km, size_t count, size_t size)
{
	kmem_t *km = (kmem_t*)_km;
	void *p;
	if (size == 0 || count == 0) return 0;
	if (km == NULL) return calloc(count, size);
	p = kmalloc(km, count * size);
	memset(p, 0, count * size);
	return p;
}

// Assembly:
pushq %rbx
testq %rdx, %rdx
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x2505
xorl %eax, %eax
popq %rbx
retq
movq %rdx, %rbx
testq %rdi, %rdi
je 0x2527
imulq %rsi, %rbx
movq %rbx, %rsi
callq 0x266c
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
jmp 0x2180
movq %rsi, %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x21e0
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/kalloc.c
// Function: km_destroy
void km_destroy(void *_km)
{
	kmem_t *km = (kmem_t*)_km;
	void *km_par;
	header_t *p, *q;
	if (km == NULL) return;
	km_par = km->par;
	for (p = km->core_head; p != NULL;) {
		q = p->ptr;
		kfree(km_par, p);
		p = q;
	}
	kfree(km_par, km);
}

// Assembly:
testq %rdi, %rdi
je 0x2576
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x28(%rdi), %rsi
testq %rsi, %rsi
je 0x2566
movq 0x8(%rsi), %r15
movq %r14, %rdi
callq 0x2577
movq %r15, %rsi
jmp 0x2550
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2577
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/kalloc.c
// Function: kmalloc
void *kmalloc(void *_km, size_t n_bytes)
{
	kmem_t *km = (kmem_t*)_km;
	size_t n_units;
	header_t *p, *q;

	if (n_bytes == 0) return 0;
	if (km == NULL) return malloc(n_bytes);
	n_units = (n_bytes + sizeof(size_t) + sizeof(header_t) - 1) / sizeof(header_t); /* header+n_bytes requires at least this number of units */

	if (!(q = km->loop_head)) /* the first time when kmalloc() is called, intialize it */
		q = km->loop_head = km->base.ptr = &km->base;
	for (p = q->ptr;; q = p, p = p->ptr) { /* search for a suitable block */
		if (p->size >= n_units) { /* p->size if the size of current block. This line means the current block is large enough. */
			if (p->size == n_units) q->ptr = p->ptr; /* no need to split the block */
			else { /* split the block. NB: memory is allocated at the end of the block! */
				p->size -= n_units; /* reduce the size of the free block */
				p += p->size; /* p points to the allocated block */
				*(size_t*)p = n_units; /* set the size */
			}
			km->loop_head = q; /* set the end of chain */
			return (size_t*)p + 1;
		}
		if (p == km->loop_head) { /* then ask for more "cores" */
			if ((p = morecore(km, n_units)) == 0) return 0;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x2728
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
je 0x272d
addq $0x17, %r14
movq 0x20(%rbx), %rax
testq %rax, %rax
jne 0x26a5
leaq 0x10(%rbx), %rax
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
shrq $0x4, %r14
xorl %r15d, %r15d
movq %rax, %rcx
movq 0x8(%rcx), %rdx
movq (%rdx), %rsi
subq %r14, %rsi
jae 0x271c
movq %rdx, %rcx
cmpq %rax, %rdx
jne 0x26af
movq (%rbx), %rdi
movq 0x8(%rbx), %rcx
movq %rcx, %r12
addq %r14, %r12
movq %r12, %rax
xorl %edx, %edx
divq %rcx
subq %rdx, %r12
movq %r12, %rsi
shlq $0x4, %rsi
callq 0x266c
testq %rax, %rax
je 0x2768
movq 0x28(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %r12, (%rax)
movq %rax, 0x28(%rbx)
decq %r12
movq %r12, 0x10(%rax)
addq $0x18, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2577
movq 0x20(%rbx), %rax
testq %rax, %rax
jne 0x26ac
jmp 0x2759
jne 0x2740
movq 0x8(%rdx), %rax
movq %rax, 0x8(%rcx)
jmp 0x274e
xorl %r15d, %r15d
jmp 0x2759
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2280
movq %rsi, (%rdx)
shlq $0x4, %rsi
movq %r14, (%rdx,%rsi)
addq %rsi, %rdx
movq %rcx, 0x20(%rbx)
addq $0x8, %rdx
movq %rdx, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2098e(%rip), %rdi     # 0x230fd
callq 0x264b
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/kalloc.c
// Function: krealloc
void *krealloc(void *_km, void *ap, size_t n_bytes) // TODO: this can be made more efficient in principle
{
	kmem_t *km = (kmem_t*)_km;
	size_t cap, *p, *q;

	if (n_bytes == 0) {
		kfree(km, ap); return 0;
	}
	if (km == NULL) return realloc(ap, n_bytes);
	if (ap == NULL) return kmalloc(km, n_bytes);
	p = (size_t*)ap - 1;
	cap = (*p) * sizeof(header_t) - sizeof(size_t);
	if (cap >= n_bytes) return ap; /* TODO: this prevents shrinking */
	q = (size_t*)kmalloc(km, n_bytes);
	memcpy(q, ap, cap);
	kfree(km, ap);
	return q;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x27ce
testq %r14, %r14
je 0x27ea
testq %rbx, %rbx
je 0x2800
movq -0x8(%rbx), %r15
shlq $0x4, %r15
addq $-0x8, %r15
cmpq %rdx, %r15
jae 0x27db
movq %r14, %rdi
movq %rdx, %rsi
callq 0x266c
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2230
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2577
movq %r12, %rbx
jmp 0x27db
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2577
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %rdx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x22b0
movq %r14, %rdi
movq %rdx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x266c
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/kalloc.c
// Function: krelocate
void *krelocate(void *km, void *ap, size_t n_bytes)
{
	void *p;
	if (km == 0 || ap == 0) return ap;
	p = kmalloc(km, n_bytes);
	memcpy(p, ap, n_bytes);
	kfree(km, ap);
	return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x285e
movq %rdx, %r15
movq %rdi, %r14
movq %rdx, %rsi
callq 0x266c
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2230
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2577
movq %r12, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/kalloc.c
// Function: km_stat
void km_stat(const void *_km, km_stat_t *s)
{
	kmem_t *km = (kmem_t*)_km;
	header_t *p;
	memset(s, 0, sizeof(km_stat_t));
	if (km == NULL || km->loop_head == NULL) return;
	for (p = km->loop_head;; p = p->ptr) {
		s->available += p->size * sizeof(header_t);
		if (p->size != 0) ++s->n_blocks; /* &kmem_t::base is always one of the cores. It is zero-sized. */
		if (p->ptr > p && p + p->size > p->ptr)
			panic("[km_stat] The end of a free block enters another free block.");
		if (p->ptr == km->loop_head) break;
	}
	for (p = km->core_head; p != NULL; p = p->ptr) {
		size_t size = p->size * sizeof(header_t);
		++s->n_cores;
		s->capacity += size;
		s->largest = s->largest > size? s->largest : size;
	}
}

// Assembly:
pushq %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsi)
movups %xmm0, (%rsi)
andq $0x0, 0x20(%rsi)
testq %rdi, %rdi
je 0x290e
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x290e
xorl %ecx, %ecx
xorl %edx, %edx
movq %rax, %r8
movq (%r8), %r9
testq %r9, %r9
je 0x28a5
incq %rcx
movq %rcx, 0x10(%rsi)
shlq $0x4, %r9
addq %r9, %rdx
movq 0x8(%r8), %r10
cmpq %r8, %r10
seta %r11b
addq %r8, %r9
cmpq %r10, %r9
seta %r8b
andb %r11b, %r8b
cmpb $0x1, %r8b
je 0x2910
movq %r10, %r8
cmpq %rax, %r10
jne 0x2896
movq %rdx, 0x8(%rsi)
addq $0x28, %rdi
pushq $0x1
popq %rax
xorl %ecx, %ecx
xorl %edx, %edx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x290e
movq (%rdi), %r8
shlq $0x4, %r8
movq %rax, 0x18(%rsi)
addq %r8, %rdx
cmpq %r8, %rcx
cmovbeq %r8, %rcx
movq %rdx, (%rsi)
movq %rcx, 0x20(%rsi)
addq $0x8, %rdi
incq %rax
jmp 0x28e1
popq %rax
retq
movq %rdx, 0x8(%rsi)
leaq 0x20761(%rip), %rdi     # 0x2307c
callq 0x264b
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/kalloc.c
// Function: km_stat_print
void km_stat_print(const void *km)
{
	km_stat_t st;
	km_stat(km, &st);
	fprintf(stderr, "[km_stat] cap=%ld, avail=%ld, largest=%ld, n_core=%ld, n_block=%ld\n",
			st.capacity, st.available, st.largest, st.n_blocks, st.n_cores);
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x286d
movq 0x2b6bf(%rip), %rax     # 0x2dff8
movq (%rax), %rdi
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movq 0x20(%rbx), %r8
movq 0x10(%rbx), %r9
movq 0x18(%rbx), %rax
movq %rax, (%rsp)
leaq 0x2075f(%rip), %rsi     # 0x230b9
xorl %eax, %eax
callq 0x2210
addq $0x30, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/kthread.c
// Function: kt_for
void kt_for(int n_threads, void (*func)(void*,long,int), void *data, long n)
{
	if (n_threads > 1) {
		int i;
		kt_for_t t;
		pthread_t *tid;
		t.func = func, t.data = data, t.n_threads = n_threads, t.n = n;
		t.w = (ktf_worker_t*)calloc(n_threads, sizeof(ktf_worker_t));
		tid = (pthread_t*)calloc(n_threads, sizeof(pthread_t));
		for (i = 0; i < n_threads; ++i)
			t.w[i].t = &t, t.w[i].i = i;
		for (i = 0; i < n_threads; ++i) pthread_create(&tid[i], 0, ktf_worker, &t.w[i]);
		for (i = 0; i < n_threads; ++i) pthread_join(tid[i], 0);
		free(tid); free(t.w);
	} else {
		long j;
		for (j = 0; j < n; ++j) func(data, j, 0);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
cmpl $0x1, %edi
jle 0x29d8
movq %rsp, %r12
movq %r15, 0x18(%r12)
movq %r14, 0x20(%r12)
movl %edi, (%r12)
movq %rbx, 0x8(%r12)
movl %edi, %ebx
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x21e0
movq %rax, %r15
movq %rax, 0x10(%r12)
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x21e0
movq %rax, %r14
addq $0x8, %r15
xorl %eax, %eax
cmpq %rax, %rbx
je 0x29f7
movq %r12, -0x8(%r15)
movq %rax, (%r15)
incq %rax
addq $0x10, %r15
jmp 0x29c3
xorl %r12d, %r12d
testq %rbx, %rbx
cmovleq %r12, %rbx
cmpq %r12, %rbx
je 0x2a58
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq *%r15
incq %r12
jmp 0x29e2
movq %rbx, %r13
shlq $0x4, %r13
xorl %ebp, %ebp
leaq 0x60(%rip), %r15        # 0x2a67
movq %r14, %r12
cmpq %rbp, %r13
je 0x2a2e
movq 0x10(%rsp), %rcx
addq %rbp, %rcx
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x22c0
addq $0x10, %rbp
addq $0x8, %r12
jmp 0x2a0a
xorl %r15d, %r15d
cmpq %r15, %rbx
je 0x2a46
movq (%r14,%r15,8), %rdi
xorl %esi, %esi
callq 0x2360
incq %r15
jmp 0x2a31
movq %r14, %rdi
callq 0x2040
movq 0x10(%rsp), %rdi
callq 0x2040
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/kthread.c
// Function: kt_pipeline
void kt_pipeline(int n_threads, void *(*func)(void*, int, void*), void *shared_data, int n_steps)
{
	ktp_t aux;
	pthread_t *tid;
	int i;

	if (n_threads < 1) n_threads = 1;
	aux.n_workers = n_threads;
	aux.n_steps = n_steps;
	aux.func = func;
	aux.shared = shared_data;
	aux.index = 0;
	pthread_mutex_init(&aux.mutex, 0);
	pthread_cond_init(&aux.cv, 0);

	aux.workers = (ktp_worker_t*)calloc(n_threads, sizeof(ktp_worker_t));
	for (i = 0; i < n_threads; ++i) {
		ktp_worker_t *w = &aux.workers[i];
		w->step = 0; w->pl = &aux; w->data = 0;
		w->index = aux.index++;
	}

	tid = (pthread_t*)calloc(n_threads, sizeof(pthread_t));
	for (i = 0; i < n_threads; ++i) pthread_create(&tid[i], 0, ktp_worker, &aux.workers[i]);
	for (i = 0; i < n_threads; ++i) pthread_join(tid[i], 0);
	free(tid); free(aux.workers);

	pthread_mutex_destroy(&aux.mutex);
	pthread_cond_destroy(&aux.cv);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
cmpl $0x2, %edi
pushq $0x1
popq %r15
cmovgel %edi, %r15d
leaq 0x30(%rsp), %rdi
movl %r15d, -0x10(%rdi)
movl %ecx, -0xc(%rdi)
movq %rsi, -0x20(%rdi)
movq %rdx, -0x28(%rdi)
andq $0x0, -0x18(%rdi)
xorl %r12d, %r12d
xorl %esi, %esi
callq 0x2370
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2240
pushq $0x20
popq %rsi
movq %r15, %rdi
callq 0x21e0
movq %rax, -0x30(%rbx)
movq -0x40(%rbx), %rcx
movq %r15, %r14
shlq $0x5, %r14
leaq 0x8(%rsp), %rdx
cmpq %r12, %r14
je 0x2bb1
andl $0x0, 0x10(%rax,%r12)
movq %rdx, (%rax,%r12)
andq $0x0, 0x18(%rax,%r12)
movq %rcx, 0x8(%rax,%r12)
incq %rcx
addq $0x20, %r12
jmp 0x2b8e
movq %rcx, 0x18(%rsp)
pushq $0x8
popq %rsi
movq %r15, %rdi
callq 0x21e0
movq %rax, %r12
xorl %ebx, %ebx
leaq 0x76(%rip), %r13        # 0x2c43
movq %rax, %rbp
cmpq %rbx, %r14
je 0x2bf4
movq 0x28(%rsp), %rcx
addq %rbx, %rcx
movq %rbp, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x22c0
addq $0x20, %rbx
addq $0x8, %rbp
jmp 0x2bd0
xorl %ebx, %ebx
cmpq %rbx, %r15
je 0x2c0b
movq (%r12,%rbx,8), %rdi
xorl %esi, %esi
callq 0x2360
incq %rbx
jmp 0x2bf6
movq %r12, %rdi
callq 0x2040
movq 0x28(%rsp), %rdi
callq 0x2040
leaq 0x30(%rsp), %rdi
callq 0x2130
leaq 0x58(%rsp), %rdi
callq 0x22f0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq