LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/tests/tests.c
// Function: sirtest_failfilebadpermission
bool sirtest_failfilebadpermission(void) {
    INIT(si, SIRL_ALL, 0, 0, 0);
    bool pass = si_init;

#if !defined(__WIN__)
    static const char* path = "/noperms";
#else /* __WIN__ */
# if defined(__CYGWIN__)
    static const char* path = "/cygdrive/c/Windows/System32/noperms";
# else
    static const char* path;
    if (get_wineversion()) {
        path = "Z:\\noperms";
    } else {
        path = "C:\\Windows\\System32\\noperms";
    }
# endif
#endif

    _sir_eqland(pass, 0U == sir_addfile(path, SIRL_ALL, SIRO_MSGONLY));

    if (pass)
        PRINT_EXPECTED_ERROR();

    _sir_eqland(pass, sir_cleanup());
    return PRINT_RESULT_RETURN(pass);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsp, %rbx
movl $0x108, %edx            # imm = 0x108
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x100000, %eax         # imm = 0x100000
movl %eax, 0x4(%rbx)
movw $0xff, (%rbx)
movl %eax, 0xc(%rbx)
movq %rbx, %rdi
callq 0x9a21
movl %eax, %ebx
leaq 0xcaee(%rip), %rdi      # 0x11a9b
movl $0xff, %esi
movl $0x7f00, %edx           # imm = 0x7F00
callq 0xa035
testl %eax, %eax
sete %bpl
andb %bl, %bpl
cmpb $0x1, %bpl
jne 0x4fda
movl $0x1, %edi
movl $0x1, %esi
callq 0x3b6d
callq 0x9a26
andb %al, %bpl
movzbl %bpl, %edi
xorl %esi, %esi
callq 0x3b6d
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/tests/tests.c
// Function: sirtest_failremovebadfile
bool sirtest_failremovebadfile(void) {
    INIT(si, SIRL_ALL, 0, 0, 0);
    bool pass = si_init;

    sirfileid invalidid = 9999999;
    _sir_eqland(pass, !sir_remfile(invalidid));

    if (pass)
        PRINT_EXPECTED_ERROR();

    _sir_eqland(pass, sir_cleanup());
    return PRINT_RESULT_RETURN(pass);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsp, %rbx
movl $0x108, %edx            # imm = 0x108
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x100000, %eax         # imm = 0x100000
movl %eax, 0x4(%rbx)
movw $0xff, (%rbx)
movl %eax, 0xc(%rbx)
movq %rbx, %rdi
callq 0x9a21
movl %eax, %ebp
movl $0x98967f, %edi         # imm = 0x98967F
callq 0xa03a
movl %eax, %ebx
xorb $0x1, %bl
andb %bpl, %bl
cmpb $0x1, %bl
jne 0x526e
movl $0x1, %edi
movl $0x1, %esi
callq 0x3b6d
callq 0x9a26
andb %al, %bl
movzbl %bl, %edi
xorl %esi, %esi
callq 0x3b6d
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/tests/tests.c
// Function: sirtest_rollandarchivefile
bool sirtest_rollandarchivefile(void) {
    bool pass = true;

    _sir_eqland(pass, roll_and_archive("rollandarchive1", ".log"));
    _sir_eqland(pass, roll_and_archive("rollandarchive2", ""));

    return pass;
}

// Assembly:
pushq %rbx
leaq 0xc8b1(%rip), %rdi      # 0x11b42
leaq 0xc81f(%rip), %rsi      # 0x11ab7
callq 0x52b6
movl %eax, %ebx
leaq 0xc8ac(%rip), %rdi      # 0x11b52
leaq 0xc01a(%rip), %rsi      # 0x112c7
callq 0x52b6
andb %bl, %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/tests/tests.c
// Function: sirtest_failwithoutinit
bool sirtest_failwithoutinit(void) {
    bool pass = !sir_info("sir isn't initialized; this needs to fail");

    if (pass)
        PRINT_EXPECTED_ERROR();

    return PRINT_RESULT_RETURN(pass);
}

// Assembly:
pushq %rbx
leaq 0xc485(%rip), %rdi      # 0x11b62
xorl %eax, %eax
callq 0x9b03
movl %eax, %ebx
testb %al, %al
jne 0x56f9
movl $0x1, %edi
movl $0x1, %esi
callq 0x3b6d
xorb $0x1, %bl
movzbl %bl, %edi
xorl %esi, %esi
popq %rbx
jmp 0x3b6d
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/tests/tests.c
// Function: sirtest_isinitialized
bool sirtest_isinitialized(void) {

    bool pass = true;

    TEST_MSG_0("checking sir_isinitialized before initialization...");
    _sir_eqland(pass, !sir_isinitialized());

    INIT(si, SIRL_ALL, 0, 0, 0);
    _sir_eqland(pass, si_init);

    TEST_MSG_0("checking sir_isinitialized after initialization...");
    _sir_eqland(pass, sir_isinitialized());

    _sir_eqland(pass, sir_cleanup());

    TEST_MSG_0("checking sir_isinitialized after cleanup...");
    _sir_eqland(pass, !sir_isinitialized());

    return PRINT_RESULT_RETURN(pass);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
leaq 0xc471(%rip), %rsi      # 0x11b8c
movl $0x1, %edi
xorl %eax, %eax
callq 0x3400
callq 0x9a2b
movl %eax, %ebx
movq %rsp, %r14
movl $0x108, %edx            # imm = 0x108
movq %r14, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x100000, %eax         # imm = 0x100000
movl %eax, 0x4(%r14)
movw $0xff, (%r14)
movl %eax, 0xc(%r14)
xorb $0x1, %bl
movq %r14, %rdi
callq 0x9a21
movl %eax, %ebp
leaq 0xc45b(%rip), %rsi      # 0x11bc2
movl $0x1, %edi
xorl %eax, %eax
callq 0x3400
callq 0x9a2b
movl %eax, %r14d
callq 0x9a26
movl %eax, %r15d
leaq 0xc46d(%rip), %rsi      # 0x11bf7
movl $0x1, %edi
xorl %eax, %eax
callq 0x3400
callq 0x9a2b
xorb $0x1, %al
andb %r14b, %r15b
andb %al, %r15b
andb %bl, %bpl
andb %r15b, %bpl
movzbl %bpl, %edi
xorl %esi, %esi
callq 0x3b6d
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/tests/tests.c
// Function: sirtest_failinittwice
bool sirtest_failinittwice(void) {
    INIT(si, SIRL_ALL, 0, 0, 0);
    bool pass = si_init;

    INIT(si2, SIRL_ALL, 0, 0, 0);
    _sir_eqland(pass, !si2_init);

    if (pass)
        PRINT_EXPECTED_ERROR();

    _sir_eqland(pass, sir_cleanup());
    return PRINT_RESULT_RETURN(pass);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
leaq 0x110(%rsp), %rbx
movl $0x108, %edx            # imm = 0x108
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x100000, %r14d        # imm = 0x100000
movl %r14d, 0x4(%rbx)
movw $0xff, %r15w
movw %r15w, (%rbx)
movl %r14d, 0xc(%rbx)
movq %rbx, %rdi
callq 0x9a21
movl %eax, %ebp
leaq 0x8(%rsp), %rbx
movl $0x108, %edx            # imm = 0x108
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31f0
movl %r14d, 0x4(%rbx)
movw %r15w, (%rbx)
movl %r14d, 0xc(%rbx)
movq %rbx, %rdi
callq 0x9a21
movl %eax, %ebx
xorb $0x1, %bl
andb %bpl, %bl
cmpb $0x1, %bl
jne 0x584b
movl $0x1, %edi
movl $0x1, %esi
callq 0x3b6d
callq 0x9a26
andb %al, %bl
movzbl %bl, %edi
xorl %esi, %esi
callq 0x3b6d
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/tests/tests.c
// Function: sirtest_failinvalidinitdata
bool sirtest_failinvalidinitdata(void) {
    sirinit si;

    /* fill with bad data. */
    (void)memset(&si, 0xab, sizeof(sirinit));

    TEST_MSG_0("calling sir_init with invalid data...");
    bool pass = !sir_init(&si);

    if (pass)
        PRINT_EXPECTED_ERROR();

    (void)sir_cleanup();
    return PRINT_RESULT_RETURN(pass);
}

// Assembly:
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
leaq 0x8(%rsp), %rbx
movl $0x108, %edx            # imm = 0x108
movq %rbx, %rdi
movl $0xab, %esi
callq 0x31f0
leaq 0xc395(%rip), %rsi      # 0x11c25
movl $0x1, %edi
xorl %eax, %eax
callq 0x3400
movq %rbx, %rdi
callq 0x9a21
movl %eax, %ebx
testb %al, %al
jne 0x58b9
movl $0x1, %edi
movl $0x1, %esi
callq 0x3b6d
xorb $0x1, %bl
callq 0x9a26
movzbl %bl, %edi
xorl %esi, %esi
callq 0x3b6d
addq $0x110, %rsp            # imm = 0x110
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/tests/tests.c
// Function: sirtest_initcleanupinit
bool sirtest_initcleanupinit(void) {
    INIT(si1, SIRL_ALL, 0, 0, 0);
    bool pass = si1_init;

    _sir_eqland(pass, sir_info("init called once; testing output..."));
    _sir_eqland(pass, sir_cleanup());

    INIT(si2, SIRL_ALL, 0, 0, 0);
    _sir_eqland(pass, si2_init);

    _sir_eqland(pass, sir_info("init called again after re-init; testing output..."));
    _sir_eqland(pass, sir_cleanup());

    return PRINT_RESULT_RETURN(pass);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
leaq 0x110(%rsp), %rbx
movl $0x108, %edx            # imm = 0x108
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x100000, %r12d        # imm = 0x100000
movl %r12d, 0x4(%rbx)
movw $0xff, %r13w
movw %r13w, (%rbx)
movl %r12d, 0xc(%rbx)
movq %rbx, %rdi
callq 0x9a21
movl %eax, %ebx
leaq 0xc329(%rip), %rdi      # 0x11c4d
xorl %eax, %eax
callq 0x9b03
movl %eax, %ebp
callq 0x9a26
movl %eax, %r14d
leaq 0x8(%rsp), %r15
movl $0x108, %edx            # imm = 0x108
movq %r15, %rdi
xorl %esi, %esi
callq 0x31f0
movl %r12d, 0x4(%r15)
movw %r13w, (%r15)
movl %r12d, 0xc(%r15)
movq %r15, %rdi
callq 0x9a21
movl %eax, %r15d
leaq 0xc30a(%rip), %rdi      # 0x11c71
xorl %eax, %eax
callq 0x9b03
movl %eax, %r12d
callq 0x9a26
andb %r12b, %al
andb %r14b, %r15b
andb %al, %r15b
andb %bl, %bpl
andb %r15b, %bpl
movzbl %bpl, %edi
xorl %esi, %esi
callq 0x3b6d
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/tests/tests.c
// Function: sirtest_initmakeinit
bool sirtest_initmakeinit(void) {
    bool pass = true;

    sirinit si;
    _sir_eqland(pass, sir_makeinit(&si));
    _sir_eqland(pass, sir_init(&si));
    _sir_eqland(pass, sir_info("initialized with sir_makeinit"));
    _sir_eqland(pass, sir_cleanup());

    return PRINT_RESULT_RETURN(pass);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x9a1c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x9a21
movl %eax, %ebx
leaq 0xc2d7(%rip), %rdi      # 0x11ca4
xorl %eax, %eax
callq 0x9b03
movl %eax, %r14d
callq 0x9a26
andb %r14b, %al
andb %bpl, %bl
andb %al, %bl
movzbl %bl, %edi
xorl %esi, %esi
callq 0x3b6d
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/tests/tests.c
// Function: sirtest_failaftercleanup
bool sirtest_failaftercleanup(void) {
    INIT(si, SIRL_ALL, 0, 0, 0);
    bool pass = si_init;

    _sir_eqland(pass, sir_cleanup());
    _sir_eqland(pass, !sir_info("already cleaned up; this needs to fail"));

    if (pass)
        PRINT_EXPECTED_ERROR();

    return PRINT_RESULT_RETURN(pass);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsp, %rbx
movl $0x108, %edx            # imm = 0x108
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x100000, %eax         # imm = 0x100000
movl %eax, 0x4(%rbx)
movw $0xff, (%rbx)
movl %eax, 0xc(%rbx)
movq %rbx, %rdi
callq 0x9a21
movl %eax, %ebp
callq 0x9a26
movl %eax, %ebx
leaq 0xc285(%rip), %rdi      # 0x11cc2
xorl %eax, %eax
callq 0x9b03
xorb $0x1, %al
andb %bpl, %bl
andb %al, %bl
cmpb $0x1, %bl
jne 0x5a5f
movl $0x1, %edi
movl $0x1, %esi
callq 0x3b6d
movzbl %bl, %edi
xorl %esi, %esi
callq 0x3b6d
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/tests/tests.c
// Function: filter_error
bool filter_error(bool pass, uint16_t err) {
    if (!pass) {
        char msg[SIR_MAXERROR] = {0};
        if (sir_geterror(msg) != err)
            return false;
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
testl %edi, %edi
jne 0x7c44
movl %esi, %ebx
movq %rsp, %r14
xorl %ebp, %ebp
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
xorl %esi, %esi
callq 0x31f0
movq %r14, %rdi
callq 0x9a30
cmpw %bx, %ax
jne 0x7c47
movb $0x1, %bpl
movl %ebp, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/tests/tests.c
// Function: sirtest_getcpucount
bool sirtest_getcpucount(void) {
    INIT(si, SIRL_ALL, 0, 0, 0);
    bool pass = si_init;

    TEST_MSG_0("checking processor counting function...");

    const long cpus = _sir_nprocs_test();
    _sir_eqland(pass, 0 < cpus);

    TEST_MSG("processor(s) detected: %ld", cpus);

    _sir_eqland(pass, sir_cleanup());
    return PRINT_RESULT_RETURN(pass);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsp, %rbx
movl $0x108, %edx            # imm = 0x108
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x100000, %eax         # imm = 0x100000
movl %eax, 0x4(%rbx)
movw $0xff, (%rbx)
movl %eax, 0xc(%rbx)
movq %rbx, %rdi
callq 0x9a21
movl %eax, %ebx
leaq 0xb06c(%rip), %rsi      # 0x14276
movl $0x1, %edi
xorl %eax, %eax
callq 0x3400
movl $0x1, %edi
callq 0xe7fa
testq %rax, %rax
setg %bpl
leaq 0xb072(%rip), %rsi      # 0x142a0
movl $0x1, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3400
callq 0x9a26
andb %bl, %al
andb %bpl, %al
movzbl %al, %edi
xorl %esi, %esi
callq 0x3b6d
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/tests/tests.c
// Function: sirtest_getversioninfo
bool sirtest_getversioninfo(void) {
    INIT(si, SIRL_ALL, 0, 0, 0);
    bool pass = si_init;

    TEST_MSG_0("checking version retrieval functions...");

    const char* str = sir_getversionstring();
    _sir_eqland(pass, _sir_validstrnofail(str));

    TEST_MSG("version as string: '%s'", _SIR_PRNSTR(str));

    uint32_t hex = sir_getversionhex();
    _sir_eqland(pass, 0 != hex);

    TEST_MSG("version as hex: 0x%08"PRIx32"", hex);

    bool prerel = sir_isprerelease();
    TEST_MSG("prerelease: %s", prerel ? "true" : "false");

    _sir_eqland(pass, sir_cleanup());
    return PRINT_RESULT_RETURN(pass);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
leaq 0x8(%rsp), %rbx
xorl %ebp, %ebp
movl $0x108, %edx            # imm = 0x108
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x100000, %eax         # imm = 0x100000
movl %eax, 0x4(%rbx)
movw $0xff, (%rbx)
movl %eax, 0xc(%rbx)
movq %rbx, %rdi
callq 0x9a21
movl %eax, %ebx
leaq 0xb020(%rip), %rsi      # 0x142bd
movl $0x1, %edi
xorl %eax, %eax
callq 0x3400
callq 0xa326
testq %rax, %rax
je 0x92bc
cmpb $0x0, (%rax)
setne %bpl
jmp 0x92c3
leaq 0xb03e(%rip), %rax      # 0x14301
leaq 0xb01d(%rip), %rsi      # 0x142e7
movl $0x1, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3400
callq 0xa32e
testl %eax, %eax
setne %r14b
leaq 0xb01d(%rip), %rsi      # 0x14308
movl $0x1, %edi
movl %eax, %edx
xorl %eax, %eax
callq 0x3400
callq 0xa334
leaq 0xa448(%rip), %rcx      # 0x1374d
leaq 0xa446(%rip), %rdx      # 0x13752
testb %al, %al
cmovneq %rcx, %rdx
leaq 0xb008(%rip), %rsi      # 0x14321
movl $0x1, %edi
xorl %eax, %eax
callq 0x3400
callq 0x9a26
andb %bpl, %al
andb %bl, %al
andb %r14b, %al
movzbl %al, %edi
xorl %esi, %esi
callq 0x3b6d
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/tests/tests.c
// Function: sirtest_threadpool
bool sirtest_threadpool(void) {
    INIT(si, SIRL_ALL, SIRO_NOTIME | SIRO_NOHOST | SIRO_NONAME, 0, 0);
    bool pass = si_init;

    static const size_t num_jobs = 30;
    sir_threadpool* pool         = NULL;

    _sir_eqland(pass, _sir_threadpool_create(&pool, NUM_THREADS));
    if (pass) {
        /* dispatch a whole bunch of jobs. */
        for (size_t n = 0; n < num_jobs; n++) {
            sir_threadpool_job* job = calloc(1, sizeof(sir_threadpool_job));
            _sir_eqland(pass, NULL != job);
            if (job) {
                job->fn = &threadpool_pseudojob;
                job->data = (void*)(n + 1);
                _sir_eqland(pass, _sir_threadpool_add_job(pool, job));
                _sir_eqland(pass, sir_info("dispatched job (fn: %"PRIxPTR", data: %p)",
                    (uintptr_t)job->fn, job->data));
            }
        }

        sir_sleep_msec(1000);

        _sir_eqland(pass, sir_info("destroying thread pool..."));
        _sir_eqland(pass, _sir_threadpool_destroy(&pool));
    }

    _sir_eqland(pass, sir_cleanup());
    return PRINT_RESULT_RETURN(pass);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
leaq 0x10(%rsp), %r14
xorl %ebx, %ebx
movl $0x108, %edx            # imm = 0x108
movq %r14, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x1500, 0x4(%r14)      # imm = 0x1500
movw $0xff, (%r14)
movl $0x100000, 0xc(%r14)    # imm = 0x100000
movq %r14, %rdi
callq 0x9a21
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
movq $0x0, (%rdi)
movl $0x4, %esi
callq 0xfa98
andb %bpl, %al
cmpb $0x1, %al
jne 0x9448
movb $0x1, %r15b
leaq 0xb1(%rip), %r12        # 0x946b
leaq 0xaf71(%rip), %rbx      # 0x14332
xorl %r13d, %r13d
movl $0x1, %edi
movl $0x10, %esi
callq 0x32b0
testq %rax, %rax
je 0x9410
movq %rax, %r14
movq %r12, (%rax)
incq %r13
movq %r13, 0x8(%rax)
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0xfe41
movl %eax, %ebp
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9b03
andb %r15b, %bpl
andb %al, %bpl
movl %ebp, %r15d
jmp 0x9416
incq %r13
xorl %r15d, %r15d
cmpq $0x1e, %r13
jne 0x93c4
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x3fdd
leaq 0xaf28(%rip), %rdi      # 0x14355
xorl %eax, %eax
callq 0x9b03
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0xfc98
movl %eax, %ebx
andb %bpl, %bl
andb %r15b, %bl
callq 0x9a26
andb %bl, %al
movzbl %al, %edi
xorl %esi, %esi
callq 0x3b6d
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/tests/tests.c
// Function: threadpool_pseudojob
static bool threadpool_pseudojob(void* arg) {
    char thread_name[SIR_MAXPID] = {0};

    _sir_snprintf_trunc(thread_name, SIR_MAXPID, "pool.%p", arg);
    (void)_sir_setthreadname(thread_name);

    (void)sir_debug("start of pseudo job that does nothing (arg: %p)", arg);
    sir_sleep_msec(1000);
    (void)sir_debug("end of pseudo job that does nothing (arg: %p)", arg);

    return true;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x10, 0x8(%rsp)
movq 0x8(%rsp), %rsi
leaq 0xb895(%rip), %r8       # 0x14d28
movl $0x10, %ecx
movl $0x1, %edx
movq %rbx, %r9
xorl %eax, %eax
callq 0x3040
testl %eax, %eax
jne 0x94b0
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
callq 0xe79d
leaq 0xb86f(%rip), %rdi      # 0x14d30
movq %rbx, %rsi
xorl %eax, %eax
callq 0x9a45
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x3fdd
leaq 0xb884(%rip), %rdi      # 0x14d60
movq %rbx, %rsi
xorl %eax, %eax
callq 0x9a45
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/src/sirthreadpool.c
// Function: sir_threadpool_destroy
bool _sir_threadpool_destroy(sir_threadpool** pool) {
    if (!pool || !*pool)
        return _sir_seterror(_SIR_E_INVALID);

    bool locked = _sir_mutexlock(&(*pool)->mutex);
    SIR_ASSERT(locked);

    if (locked) {
        _sir_selflog("broadcasting signal to condition var...");
        (*pool)->cancel = true;

        bool bcast = _sir_condbroadcast(&(*pool)->cond);
        SIR_ASSERT_UNUSED(bcast, bcast);

        bool unlock = _sir_mutexunlock(&(*pool)->mutex);
        SIR_ASSERT_UNUSED(unlock, unlock);
    }

    bool destroy = true;
    for (size_t n = 0; n < (*pool)->num_threads; n++) {
        SIR_ASSERT(0 != (*pool)->threads[n]);
        if (0 == (*pool)->threads[n])
            continue;
        _sir_selflog("joining thread %zu of %zu...", n + 1, (*pool)->num_threads);
#if !defined(__WIN__)
        int join = pthread_join((*pool)->threads[n], NULL);
        SIR_ASSERT(0 == join);
        _sir_eqland(destroy, 0 == join);
#else /* __WIN__ */
        DWORD join = WaitForSingleObject((*pool)->threads[n], INFINITE);
        SIR_ASSERT(WAIT_OBJECT_0 == join);
        _sir_eqland(destroy, WAIT_OBJECT_0 == join);
#endif
    }

    _sir_eqland(destroy, _sir_queue_destroy(&(*pool)->jobs));
    SIR_ASSERT(destroy);

    _sir_eqland(destroy, _sir_conddestroy(&(*pool)->cond));
    SIR_ASSERT(destroy);

    _sir_eqland(destroy, _sir_mutexdestroy(&(*pool)->mutex));
    SIR_ASSERT(destroy);

    _sir_safefree(&(*pool)->threads);
    _sir_safefree(pool);

    return destroy;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0xfd15
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xfd15
addq $0x48, %rdi
callq 0xe908
testb %al, %al
je 0xfcd9
movq (%rbx), %rdi
movb $0x1, 0x70(%rdi)
addq $0x18, %rdi
callq 0xff15
movq (%rbx), %rdi
addq $0x48, %rdi
callq 0xe9a6
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0xfd3a
movb $0x1, %r12b
xorl %r14d, %r14d
movq (%rdi), %rax
movq (%rax,%r14,8), %rax
testq %rax, %rax
je 0xfd0a
movq %rax, %rdi
xorl %esi, %esi
callq 0x3540
testl %eax, %eax
sete %al
andb %al, %r12b
movq (%rbx), %rdi
incq %r14
cmpq 0x8(%rdi), %r14
jb 0xfce9
jmp 0xfd3d
leaq 0x5d44(%rip), %rsi      # 0x15a60
leaq 0x5d2d(%rip), %rdx      # 0x15a50
movl $0x800c0000, %edi       # imm = 0x800C0000
movl $0x8a, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xa338
movb $0x1, %r12b
addq $0x10, %rdi
callq 0x1014c
movl %eax, %ebp
movq (%rbx), %rdi
addq $0x18, %rdi
callq 0xff64
movl %eax, %r14d
movq (%rbx), %rdi
addq $0x48, %rdi
callq 0xe9f5
movl %eax, %r15d
andb %r14b, %r15b
andb %r12b, %bpl
andb %bpl, %r15b
movq (%rbx), %rdi
callq 0xc558
movq %rbx, %rdi
callq 0xc558
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/src/sirthreadpool.c
// Function: sir_threadpool_add_job
bool _sir_threadpool_add_job(sir_threadpool* pool, sir_threadpool_job* job) {
    bool retval = false;

    if (pool && pool->jobs && job && job->fn && job->data) {
        bool locked = _sir_mutexlock(&pool->mutex);
        SIR_ASSERT(locked);

        if (locked) {
            if (_sir_queue_push(pool->jobs, job)) {
                retval = _sir_condbroadcast(&pool->cond);
                _sir_selflog("added job; new size: %zu", _sir_queue_size(pool->jobs));
            }

            bool unlocked = _sir_mutexunlock(&pool->mutex);
            SIR_ASSERT_UNUSED(unlocked, unlocked);
        }
    }

    return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xfea7
movq %rsi, %r12
xorl %ebx, %ebx
testq %rsi, %rsi
je 0xfea9
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
je 0xfea9
cmpq $0x0, (%r12)
je 0xfea7
cmpq $0x0, 0x8(%r12)
je 0xfea7
leaq 0x48(%r14), %r15
movq %r15, %rdi
callq 0xe908
testb %al, %al
je 0xfea7
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0x1020c
testb %al, %al
je 0xfeb7
leaq 0x18(%r14), %rdi
callq 0xff15
movl %eax, %ebx
movq 0x10(%r14), %rdi
callq 0x101de
jmp 0xfeb9
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %ebx, %ebx
movq %r15, %rdi
callq 0xe9a6
jmp 0xfea9
nop
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/src/sircondition.c
// Function: sir_condcreate
bool _sir_condcreate(sir_condition* cond) {
    bool valid = _sir_validptr(cond);

    if (valid) {
#if !defined(__WIN__)
        int op = pthread_cond_init(cond, NULL);
        valid = 0 == op ? true : _sir_handleerr(op);
#else
        InitializeConditionVariable(cond);
#endif
    }

    return valid;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0xfef0
xorl %esi, %esi
callq 0x3360
testl %eax, %eax
je 0xff11
leaq 0x5b9c(%rip), %rsi      # 0x15a78
leaq 0x5ba5(%rip), %rdx      # 0x15a88
movl %eax, %edi
movl $0x2a, %ecx
popq %rax
jmp 0xa434
leaq 0x5b81(%rip), %rsi      # 0x15a78
leaq 0x5b8a(%rip), %rdx      # 0x15a88
movl $0x800b0000, %edi       # imm = 0x800B0000
movl $0x25, %ecx
callq 0xa338
xorl %eax, %eax
jmp 0xff13
movb $0x1, %al
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/src/sircondition.c
// Function: sir_condbroadcast
bool _sir_condbroadcast(sir_condition* cond) {
    bool valid = _sir_validptr(cond);

    if (valid) {
#if !defined(__WIN__)
        int op = pthread_cond_broadcast(cond);
        valid = 0 == op ? true : _sir_handleerr(op);
#else
        WakeAllConditionVariable(cond);
#endif
    }

    return valid;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0xff3f
callq 0x30c0
testl %eax, %eax
je 0xff60
leaq 0x5b6c(%rip), %rsi      # 0x15a97
leaq 0x5b56(%rip), %rdx      # 0x15a88
movl %eax, %edi
movl $0x4a, %ecx
popq %rax
jmp 0xa434
leaq 0x5b51(%rip), %rsi      # 0x15a97
leaq 0x5b3b(%rip), %rdx      # 0x15a88
movl $0x800b0000, %edi       # imm = 0x800B0000
movl $0x45, %ecx
callq 0xa338
xorl %eax, %eax
jmp 0xff62
movb $0x1, %al
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/src/sircondition.c
// Function: sir_conddestroy
bool _sir_conddestroy(sir_condition* cond) {
    bool valid = _sir_validptr(cond);

    if (valid) {
#if !defined(__WIN__)
        int op = pthread_cond_destroy(cond);
        valid = 0 == op ? true : _sir_handleerr(op);
#else
        SIR_UNUSED(cond);
#endif
    }

    return valid;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0xff8e
callq 0x3480
testl %eax, %eax
je 0xffaf
leaq 0x5b30(%rip), %rsi      # 0x15aaa
leaq 0x5b07(%rip), %rdx      # 0x15a88
movl %eax, %edi
movl $0x59, %ecx
popq %rax
jmp 0xa434
leaq 0x5b15(%rip), %rsi      # 0x15aaa
leaq 0x5aec(%rip), %rdx      # 0x15a88
movl $0x800b0000, %edi       # imm = 0x800B0000
movl $0x54, %ecx
callq 0xa338
xorl %eax, %eax
jmp 0xffb1
movb $0x1, %al
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/src/sircondition.c
// Function: sir_condwait_timeout
bool _sir_condwait_timeout(sir_condition* cond, sir_mutex* mutex,
    const sir_wait* howlong) {
    bool valid = _sir_validptr(cond) && _sir_validptr(mutex) && _sir_validptr(howlong);

    if (valid) {
#if !defined(__WIN__)
        int op = pthread_cond_timedwait(cond, mutex, howlong);
        valid = 0 == op ? true : ETIMEDOUT == op ? false : _sir_handleerr(op);
#else
        valid = (FALSE != SleepConditionVariableCS(cond, mutex, *howlong))
            ? true : _sir_handlewin32err(GetLastError());
#endif
    }

    return valid;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0xffec
testq %rsi, %rsi
je 0xffec
testq %rdx, %rdx
je 0xffec
callq 0x3450
testl %eax, %eax
je 0x1000d
cmpl $0x6e, %eax
je 0x10009
leaq 0x5ae3(%rip), %rsi      # 0x15abb
leaq 0x5aa9(%rip), %rdx      # 0x15a88
movl %eax, %edi
movl $0x7b, %ecx
popq %rax
jmp 0xa434
leaq 0x5ac8(%rip), %rsi      # 0x15abb
leaq 0x5a8e(%rip), %rdx      # 0x15a88
movl $0x800b0000, %edi       # imm = 0x800B0000
movl $0x76, %ecx
callq 0xa338
xorl %eax, %eax
popq %rcx
retq
movb $0x1, %al
jmp 0x1000b
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/src/sirqueue.c
// Function: sir_queue_node_create
sir_queue_node* _sir_queue_node_create(void* data) {
    sir_queue_node* retval = calloc(1, sizeof(sir_queue_node));
    if (!retval)
        (void)_sir_handleerr(errno);
    else
        retval->data = data;

    return retval;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %edi
movl $0x10, %esi
callq 0x32b0
movq %rax, %rbx
testq %rax, %rax
je 0x10070
movq %r14, 0x8(%rbx)
jmp 0x1008f
callq 0x3080
movl (%rax), %edi
leaq 0x5a71(%rip), %rsi      # 0x15aef
leaq 0x5a81(%rip), %rdx      # 0x15b06
movl $0x27, %ecx
callq 0xa434
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/src/sirqueue.c
// Function: sir_queue_node_destroy
bool _sir_queue_node_destroy(sir_queue_node** node, void** data) {
    bool valid = _sir_validptrptr(node) && _sir_validptr(*node);

    if (valid) {
        if (data)
            *data = (*node)->data;

        _sir_safefree(node);
    }

    return valid;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x100bd
movq (%rdi), %rax
testq %rax, %rax
je 0x100bd
testq %rsi, %rsi
je 0x100b4
movq 0x8(%rax), %rax
movq %rax, (%rsi)
callq 0xc558
movb $0x1, %al
jmp 0x100dc
leaq 0x5a4d(%rip), %rsi      # 0x15b11
leaq 0x5a3b(%rip), %rdx      # 0x15b06
movl $0x800b0000, %edi       # imm = 0x800B0000
movl $0x2f, %ecx
callq 0xa338
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/aremmell[P]libsir/src/sirqueue.c
// Function: sir_queue_push
bool _sir_queue_push(sir_queue* q, void* data) {
    bool retval = false;

    if (_sir_validptr(q)) {
        if (!q->head) {
            q->head = _sir_queue_node_create(data);
            retval = NULL != q->head;
        } else {
            sir_queue_node* next = q->head;
            while (next) {
                if (!next->next) {
                    next->next = _sir_queue_node_create(data);
                    if (next->next) {
                        retval = true;
                        break;
                    }
                }
                next = next->next;
            }
        }
    }

    return retval;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x10238
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x10225
movq %rax, %rbx
movq (%rax), %rax
jmp 0x10218
movq %rsi, %rdi
callq 0x1004c
movq %rax, (%rbx)
testq %rax, %rax
setne %al
jmp 0x10257
leaq 0x590f(%rip), %rsi      # 0x15b4e
leaq 0x58c0(%rip), %rdx      # 0x15b06
movl $0x800b0000, %edi       # imm = 0x800B0000
movl $0x70, %ecx
callq 0xa338
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/giometti[P]mastering_UNIX_programming/chapter_09/scdu.c
// Function: crypt_std
void crypt_std(char *text, size_t n)
{
	int i, c;
	char base;

	for (i = 0; i < n; i++) {
		if ((text[i] >= 'a') && (text[i] <= 'z'))
			base = 'a';
		else if ((text[i] >= 'A') && (text[i] <= 'Z'))
			base = 'A';
		else
			continue;
		
		c = text[i] - base;
		c = (c + 1) % 26;
		text[i] = c + base;
	}
}

// Assembly:
testq %rsi, %rsi
je 0x1347
xorl %eax, %eax
movb (%rdi,%rax), %dl
leal -0x61(%rdx), %r8d
movb $0x61, %cl
cmpb $0x1a, %r8b
jb 0x130e
leal -0x41(%rdx), %r8d
movb $0x41, %cl
cmpb $0x19, %r8b
ja 0x133f
subb %cl, %dl
incb %dl
movsbl %dl, %edx
imull $0x4f, %edx, %r8d
movzwl %r8w, %r9d
shrl $0xb, %r8d
shrl $0xf, %r9d
addb %r8b, %r9b
movzbl %r9b, %r8d
leal (%r8,%r8,4), %r9d
leal (%r9,%r9,4), %r9d
addl %r8d, %r9d
subb %r9b, %dl
addb %cl, %dl
movb %dl, (%rdi,%rax)
incq %rax
cmpq %rax, %rsi
jne 0x12f3
retq
// File: /workspace/github_c_makefile_star2_O3/giometti[P]mastering_UNIX_programming/chapter_09/scdu.c
// Function: load_funcs
void load_funcs(char *module, func_t *crypt, func_t *decrypt)
{
	void *handler;

	if (module == NULL) {
		/* Use standard functions */
		*crypt = crypt_std;
		*decrypt = decrypt_std;

		return;
	}

	/* Try to load external functions */
	handler = dlopen(module, RTLD_NOW | RTLD_GLOBAL);
	if (!handler) {
		fprintf(stderr,
			"cannot load module %s\n", module);
		exit(EXIT_FAILURE);
	}

	*crypt = (func_t) dlsym(handler, "mod_crypt");
	if (!*crypt) {
		fprintf(stderr,
			"cannot find crypt() function: %s\n", dlerror());
		exit(EXIT_FAILURE);
	}

	*decrypt = (func_t) dlsym(handler, "mod_decrypt");
	if (!*crypt) {
		fprintf(stderr,
			"cannot find decrypt() function: %s\n", dlerror());
		exit(EXIT_FAILURE);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
testq %rdi, %rdi
je 0x1405
movq %rdi, %r12
movl $0x102, %esi            # imm = 0x102
callq 0x1060
testq %rax, %rax
je 0x1425
movq %rax, %r15
leaq 0xc43(%rip), %rsi       # 0x201b
movq %rax, %rdi
callq 0x1090
movq %rax, (%r14)
testq %rax, %rax
je 0x142d
leaq 0xc58(%rip), %rsi       # 0x2047
movq %r15, %rdi
callq 0x1090
movq %rax, (%rbx)
cmpq $0x0, (%r14)
jne 0x1419
callq 0x10d0
leaq -0x120(%rip), %rax      # 0x12ec
movq %rax, (%r14)
leaq -0xce(%rip), %rax       # 0x1348
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r12, %rdi
callq 0x1128
callq 0x10fc
// File: /workspace/github_c_makefile_star2_O3/giometti[P]mastering_UNIX_programming/chapter_09/scdu.c
// Function: main
int main(int argc, char *argv[ ])
{
	bool do_decrypt = false;
	int errflg = 0;
	char *module = NULL, *text;
	func_t crypt, decrypt;
	int c, n;

	/* Parse the command line */
	while ((c = getopt(argc, argv, ":hdf:")) != -1) {
		switch(c) {
		case 'h':
			usage(argv[0], EXIT_SUCCESS);

		case 'd':
			do_decrypt = true;
			break;

		case 'f':
			module = optarg;
			break;

		case ':':       /* missing operand? */
			fprintf(stderr,
				"option -%c requires an operand\n",
				optopt);
			errflg++;
			break;

		case '?':	/* invalid option? */
			fprintf(stderr,
				"unrecognized option: '-%c'\n",

				optopt);
			errflg++;
		}
	}
	if (errflg)
		usage(argv[0], EXIT_FAILURE);
	if (optind == argc) {
		fprintf(stderr, "no input text\n");
		exit(EXIT_FAILURE);
	}
	text = argv[optind];

	/* Load standard or external function within a module */
	load_funcs(module, &crypt, &decrypt);

	/* Do the job */
	n = strlen(text);
	if (do_decrypt)
		decrypt(text, n);
	else
		crypt(text, n);

	/* Print the result */
	printf("%*s\n", n, text);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl %edi, %ebp
xorl %r14d, %r14d
leaq 0xc2e(%rip), %r15       # 0x20a2
xorl %r12d, %r12d
xorl %r13d, %r13d
movl %ebp, %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1080
cmpl $0x63, %eax
jle 0x14a0
cmpl $0x64, %eax
je 0x14c2
cmpl $0x66, %eax
je 0x14b6
cmpl $0x68, %eax
jne 0x147a
jmp 0x1541
cmpl $-0x1, %eax
je 0x14d1
cmpl $0x3a, %eax
je 0x14c7
cmpl $0x3f, %eax
jne 0x147a
callq 0x114c
jmp 0x14cc
movq 0x2b13(%rip), %rax      # 0x3fd0
movq (%rax), %r14
jmp 0x147a
movb $0x1, %r13b
jmp 0x147a
callq 0x116d
incl %r12d
jmp 0x147a
testl %r12d, %r12d
jne 0x1549
movq 0x2aeb(%rip), %rax      # 0x3fc8
movslq (%rax), %rax
cmpl %ebp, %eax
je 0x1551
movq (%rbx,%rax,8), %rbx
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x13a9
movq %rbx, %rdi
callq 0x1040
movslq %eax, %r14
testb $0x1, %r13b
cmovneq %r12, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq *(%r15)
leaq 0xbd0(%rip), %rdi       # 0x20f3
movl %r14d, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1050
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x118e
movq %rbx, %rdi
callq 0x11b1
callq 0x11d5
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: read_minidump_header
int read_minidump_header(struct minidump_header_t *minidump_header, FILE *in)
{
  read_chars(in, minidump_header->magic1, 4);
  read_chars_bin(in, minidump_header->magic2, 2);
  minidump_header->version = read_uint16(in);
  minidump_header->num_streams = read_uint32(in);
  minidump_header->ofs_streams = read_uint32(in);
  minidump_header->checksum = read_uint32(in);
  minidump_header->timestamp = read_uint32(in);
  minidump_header->flags = read_uint64(in);

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rbx, %rsi
movl $0x4, %edx
callq 0x17ea
leaq 0x4(%rbx), %rsi
movq %r14, %rdi
movl $0x2, %edx
callq 0x182e
movq %r14, %rdi
callq 0x17c4
movw %ax, 0x6(%rbx)
movq %r14, %rdi
callq 0x1782
movl %eax, 0x8(%rbx)
movq %r14, %rdi
callq 0x1782
movl %eax, 0xc(%rbx)
movq %r14, %rdi
callq 0x1782
movl %eax, 0x10(%rbx)
movq %r14, %rdi
callq 0x1782
movl %eax, 0x14(%rbx)
movq %r14, %rdi
callq 0x16e8
movq %rax, 0x18(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: read_minidump_dir
int read_minidump_dir(struct minidump_dir_t *minidump_dir, FILE *in)
{
  minidump_dir->stream_type = read_uint32(in);
  minidump_dir->len_data = read_uint32(in);
  minidump_dir->ofs_data = read_uint32(in);

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x1782
movl %eax, (%r14)
movq %rbx, %rdi
callq 0x1782
movl %eax, 0x4(%r14)
movq %rbx, %rdi
callq 0x1782
movl %eax, 0x8(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_header
void print_minidump_header(struct minidump_header_t *minidump_header)
{
  printf(" -------- MiniDump header -------\n");
  printf("     magic1: %.4s\n", minidump_header->magic1);
  printf("     magic2: 0x%02x 0x%02x\n", minidump_header->magic2[0],
                                         minidump_header->magic2[1]);
  printf("    version: %d\n", minidump_header->version);
  printf("num_streams: %d\n", minidump_header->num_streams);
  printf("ofs_streams: %d\n", minidump_header->ofs_streams);
  printf("   checksum: %d\n", minidump_header->checksum);
  printf("  timestamp: %d\n", minidump_header->timestamp);
  printf("      flags: 0x%lx\n", minidump_header->flags);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x3a94(%rip), %rdi      # 0x55aa
callq 0x1040
leaq 0x27f6(%rip), %rdi      # 0x4318
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1060
movzbl 0x4(%rbx), %esi
movzbl 0x5(%rbx), %edx
leaq 0x27f0(%rip), %rdi      # 0x432b
xorl %eax, %eax
callq 0x1060
movzwl 0x6(%rbx), %esi
leaq 0x27fa(%rip), %rdi      # 0x4347
xorl %eax, %eax
callq 0x1060
movl 0x8(%rbx), %esi
leaq 0x27fa(%rip), %rdi      # 0x4358
xorl %eax, %eax
callq 0x1060
movl 0xc(%rbx), %esi
leaq 0x27fa(%rip), %rdi      # 0x4369
xorl %eax, %eax
callq 0x1060
movl 0x10(%rbx), %esi
leaq 0x27fa(%rip), %rdi      # 0x437a
xorl %eax, %eax
callq 0x1060
movl 0x14(%rbx), %esi
leaq 0x27fa(%rip), %rdi      # 0x438b
xorl %eax, %eax
callq 0x1060
movq 0x18(%rbx), %rsi
leaq 0x27f9(%rip), %rdi      # 0x439c
xorl %eax, %eax
popq %rbx
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_dir
void print_minidump_dir(struct minidump_dir_t *minidump_dir, int index)
{
  printf(" -------- MiniDump dir %d -------\n", index);
  printf("stream_type: %d (%s)\n",
    minidump_dir->stream_type,
    get_minidump_stream_type(minidump_dir->stream_type));
  printf("   len_data: %u\n", minidump_dir->len_data);
  printf("   ofs_data: %u\n", minidump_dir->ofs_data);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x27f8(%rip), %rdi      # 0x43b0
xorl %eax, %eax
callq 0x1060
movl (%rbx), %ebp
movl %ebp, %edi
callq 0x3384
leaq 0x2804(%rip), %rdi      # 0x43d3
movl %ebp, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1060
movl 0x4(%rbx), %esi
leaq 0x2804(%rip), %rdi      # 0x43e9
xorl %eax, %eax
callq 0x1060
movl 0x8(%rbx), %esi
leaq 0x2804(%rip), %rdi      # 0x43fa
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_string
static void print_minidump_string(FILE *in, uint32_t offset)
{
  uint32_t n;

  if (offset == 0)
  {
    printf("length=0\n");
    return;
  }

  long marker = ftell(in);
  fseek(in, offset, SEEK_SET);

  uint32_t length = read_uint32(in);

  printf(",length=%d\n", length);

  for (n = 0; n < length; n += 2)
  {
    uint16_t c = read_uint16(in);

    putchar(c);
  }

  fseek(in, marker, SEEK_SET);

  printf("\n");
}

// Assembly:
testl %esi, %esi
je 0x2a3e
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x1090
movq %rax, %r14
movl %ebp, %esi
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x10b0
movq %rbx, %rdi
callq 0x1782
movl %eax, %ebp
leaq 0x2a53(%rip), %rdi      # 0x544a
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
testl %ebp, %ebp
je 0x2a1d
movq %rbx, %rdi
callq 0x17c4
movzwl %ax, %edi
callq 0x1030
addl $0x2, %r15d
cmpl %ebp, %r15d
jb 0x2a04
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x10b0
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1030
leaq 0x2bee(%rip), %rdi      # 0x5633
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_memory_list
void print_minidump_memory_list(FILE *in)
{
  uint32_t number_of_memory_ranges = read_uint32(in);
  uint64_t start_of_memory_range = read_uint64(in);
  uint32_t data_size = read_uint32(in);
  uint64_t relative_virtual_address = read_uint64(in);

  printf("   number_of_memory_ranges: %u\n", number_of_memory_ranges);
  printf("     start_of_memory_range: 0x%lx\n", start_of_memory_range);
  printf("                 data_size: %d\n", data_size);
  printf("  relative_virtual_address: 0x%lx\n", relative_virtual_address);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1782
movl %eax, %ebp
movq %rbx, %rdi
callq 0x16e8
movq %rax, %r14
movq %rbx, %rdi
callq 0x1782
movl %eax, %r15d
movq %rbx, %rdi
callq 0x16e8
movq %rax, %rbx
leaq 0x1b26(%rip), %rdi      # 0x45a9
movl %ebp, %esi
xorl %eax, %eax
callq 0x1060
leaq 0x1b36(%rip), %rdi      # 0x45c9
movq %r14, %rsi
xorl %eax, %eax
callq 0x1060
leaq 0x1b48(%rip), %rdi      # 0x45ec
movl %r15d, %esi
xorl %eax, %eax
callq 0x1060
leaq 0x1b57(%rip), %rdi      # 0x460c
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_exception
void print_minidump_exception(FILE *in)
{
  uint32_t n;

  printf("         thread_id: %d\n", read_uint32(in));
  printf("            unused: %d\n", read_uint32(in));
  printf("    exception_code: 0x%08x\n", read_uint32(in));
  printf("   exception_flags: 0x%08x\n", read_uint32(in));
  printf("  exception_record: 0x%" PRIx64 "\n", read_uint64(in));
  printf(" exception_address: 0x%" PRIx64 "\n", read_uint64(in));

  uint32_t number_parameters = read_uint32(in);
  printf("  number_paramters: %d\n", number_parameters);
  printf("            unused: %d\n", read_uint32(in));
  printf("       information:\n");

  for (n = 0; n < number_parameters; n++)
  {
    printf("      ---- %d ----\n", n);
    printf("            thread_id: %d\n", read_uint32(in));
    printf("    excpetion_pointer: %d\n", read_uint32(in));
    printf("      client_pointers: %d\n", read_uint32(in));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1782
leaq 0x1b5e(%rip), %rdi      # 0x480f
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x1a91(%rip), %r14      # 0x475a
movq %r14, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x1a8e(%rip), %rdi      # 0x4772
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x1a92(%rip), %rdi      # 0x478e
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x16e8
leaq 0x1a96(%rip), %rdi      # 0x47aa
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x16e8
leaq 0x1a98(%rip), %rdi      # 0x47c5
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
movl %eax, %ebp
leaq 0x1a98(%rip), %rdi      # 0x47e0
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
movq %r14, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
leaq 0x28ee(%rip), %rdi      # 0x565a
callq 0x1040
testl %ebp, %ebp
je 0x2de2
leaq 0x1a90(%rip), %r15      # 0x480c
leaq 0x1aa4(%rip), %r12      # 0x4827
leaq 0x1ab8(%rip), %r13      # 0x4842
xorl %r14d, %r14d
leaq 0x1a64(%rip), %rdi      # 0x47f8
movl %r14d, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
movq %r15, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
movq %r12, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
movq %r13, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
incl %r14d
cmpl %r14d, %ebp
jne 0x2d8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_system_info
void print_minidump_system_info(FILE *in)
{
  uint16_t cpu_arch = read_uint16(in);
  const char *cpu_arch_str = "???";

  switch (cpu_arch)
  {
    case 9: cpu_arch_str = "x64"; break;
    case 5: cpu_arch_str = "ARM"; break;
    case 6: cpu_arch_str = "Itanium"; break;
    case 0: cpu_arch_str = "x86"; break;
    case 0xffff: cpu_arch_str = "Unknown"; break;
  }

  printf("\n");
  printf("         cpu_arch: %u (%s)\n", cpu_arch, cpu_arch_str);
  printf("        cpu_level: %u\n", read_uint16(in));
  printf("     cpu_revision: %u\n", read_uint16(in));
  printf("         num_cpus: %u\n", read_uint8(in));
  printf("          os_type: %u\n", read_uint8(in));
  printf("     os_ver_major: %u\n", read_uint32(in));
  printf("     os_ver_minor: %u\n", read_uint32(in));
  printf("         os_build: %u\n", read_uint32(in));
  printf("      os_platform: %u\n", read_uint32(in));

  uint32_t ofs_service_pack = read_uint32(in);

  printf(" ofs_service_pack: %u", ofs_service_pack);
  print_minidump_string(in, ofs_service_pack);

  printf("    os_suite_mask: %u\n", read_uint16(in));
  printf("        reserved2: %u\n", read_uint16(in));
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x17c4
movl %eax, %ecx
incl %ecx
cmpw $0xa, %cx
ja 0x2e1a
movzwl %cx, %ecx
leaq 0x285f(%rip), %rdx      # 0x5670
movslq (%rdx,%rcx,4), %r14
addq %rdx, %r14
jmp 0x2e21
leaq 0x1a3c(%rip), %r14      # 0x485d
movzwl %ax, %ebp
movl $0xa, %edi
callq 0x1030
leaq 0x1a48(%rip), %rdi      # 0x487d
movl %ebp, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x17c4
leaq 0x1a49(%rip), %rdi      # 0x4899
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x17c4
leaq 0x1a48(%rip), %rdi      # 0x48b0
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x17e5
leaq 0x1a47(%rip), %rdi      # 0x48c7
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x17e5
leaq 0x1a46(%rip), %rdi      # 0x48de
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x1a45(%rip), %rdi      # 0x48f5
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x1a44(%rip), %rdi      # 0x490c
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x1a43(%rip), %rdi      # 0x4923
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x1a42(%rip), %rdi      # 0x493a
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
movl %eax, %ebp
leaq 0x1a3f(%rip), %rdi      # 0x4951
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
movl %ebp, %esi
callq 0x29bf
movq %rbx, %rdi
callq 0x17c4
leaq 0x1a33(%rip), %rdi      # 0x4967
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x17c4
leaq 0x1a32(%rip), %rdi      # 0x497e
movl %eax, %esi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_memory64_list
void print_minidump_memory64_list(FILE *in, struct memory_print_t *memory_print)
{
  uint64_t number_of_memory_ranges = read_uint64(in);
  uint64_t offset = read_uint64(in);
  uint64_t n;

  printf("\n");
  printf("  num_memory_ranges: %" PRId64 "\n", number_of_memory_ranges);
  printf("             offset: 0x%" PRIx64 "\n", offset);

  for (n = 0; n < number_of_memory_ranges; n++)
  {
    uint64_t start = read_uint64(in);
    uint64_t size = read_uint64(in);
    char mark = ' ';

    if (memory_print->start >= start &&
        memory_print->start < start + size)
    {
      memory_print->file_offset = offset + (memory_print->start - start);
      memory_print->region_start = start;
      memory_print->region_end = start + size - 1;
      mark = '*';
    }

    printf("         %c  0x%08" PRIx64 ": size=%" PRId64 "\n", mark, start, size);

    offset += size;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x16e8
movq %rax, %r15
movq %r14, %rdi
callq 0x16e8
movq %rax, %r12
movl $0xa, %edi
callq 0x1030
leaq 0x1a07(%rip), %rdi      # 0x4995
movq %r15, %rsi
xorl %eax, %eax
callq 0x1060
leaq 0x1a10(%rip), %rdi      # 0x49af
movq %r12, %rsi
xorl %eax, %eax
callq 0x1060
testq %r15, %r15
je 0x3015
movq %r14, %rdi
callq 0x16e8
movq %rax, %r13
movq %r14, %rdi
callq 0x16e8
movq %rax, %rbp
movq 0x8(%rbx), %rax
movl $0x20, %esi
cmpq %r13, %rax
jb 0x2ff9
movq %rbp, %rcx
addq %r13, %rcx
cmpq %rcx, %rax
jae 0x2ff9
movq %r12, %rdx
subq %r13, %rdx
addq %rax, %rdx
movq %rdx, (%rbx)
movq %r13, 0x20(%rbx)
decq %rcx
movq %rcx, 0x28(%rbx)
movl $0x2a, %esi
leaq 0x19cb(%rip), %rdi      # 0x49cb
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x1060
addq %rbp, %r12
decq %r15
jne 0x2fae
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq