LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/calmopyrin[P]tedplay/tedplay.cpp
// Function: parsePsid(unsigned char*, PsidHeader&)
unsigned int parsePsid(unsigned char *buf, PsidHeader &psidHdr_)
{
	char *buffer = (char *) buf;

	if (buf) {
		memset(psidHdr_.title, 0, sizeof(psidHdr_.title));
		strncpy(psidHdr_.title, trimTrailingSpace(buffer + PSID_NAME, 32), 32);
		psidHdr_.title[PSID_NAME + 32] = 0;
		strncpy(psidHdr_.author, trimTrailingSpace(buffer + PSID_AUTHOR, 32), 32);
		psidHdr_.author[PSID_AUTHOR + 32] = 0;
		strncpy(psidHdr_.copyright, trimTrailingSpace(buffer + PSID_COPYRIGHT, 32), 32);
		psidHdr_.copyright[PSID_COPYRIGHT + 32] = 0;
	} else {
		memset(psidHdr_.title, 0, sizeof(psidHdr_.title));
		memset(psidHdr_.author, 0, 32);
		memset(psidHdr_.copyright, 0, 32);
		memset(psidHdr_.copyright, 0, 32);
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x34(%rsi), %r12
testq %rdi, %rdi
je 0xc4f3
movq %rdi, %r14
movl $0x200, %edx            # imm = 0x200
movq %r12, %rdi
xorl %esi, %esi
callq 0x3130
leaq 0x16(%r14), %r13
pushq $0x20
popq %rbp
movq %r13, %rdi
movl %ebp, %esi
callq 0xc402
pushq $0x20
popq %r15
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x3120
xorl %eax, %eax
movb %al, 0x6a(%rbx)
leaq 0x234(%rbx), %r12
leaq 0x36(%r14), %r13
movq %r13, %rdi
movl %ebp, %esi
callq 0xc402
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x3120
xorl %r13d, %r13d
movb %r13b, 0x28a(%rbx)
leaq 0x434(%rbx), %r12
addq $0x56, %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0xc402
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3120
movb %r13b, 0x4aa(%rbx)
jmp 0xc513
movl $0x220, %edx            # imm = 0x220
movq %r12, %rdi
xorl %esi, %esi
callq 0x3130
xorps %xmm0, %xmm0
movups %xmm0, 0x434(%rbx)
movups %xmm0, 0x444(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/calmopyrin[P]tedplay/tedplay.cpp
// Function: readFile(char*, unsigned char**, unsigned long*)
unsigned int readFile(char *fName, unsigned char **bufferPtr, size_t *bLen)
{
	std::FILE *file = (std::FILE *) 0;

	if (!fName)
		return 2;

	try {
		size_t flen;
		file = std::fopen(fName, "rb");
		if (!file)
			return 3;
		std::fseek(file, 0, SEEK_END);
		flen = std::ftell(file);
		if (flen > MAX_BUFFER_SIZE) flen = MAX_BUFFER_SIZE;
		std::fseek(file, 0, SEEK_SET);
		*bufferPtr = inputBuffer;
		size_t r = std::fread(*bufferPtr, flen, 1, file);
		*bLen = flen;
		fclose(file);
	} catch(char *str) {
		std::cerr << "Error opening " << fName << std::endl;
		std::cerr << "    exception: " << str << std::endl;
		return 1;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0xc83d
movq %rdx, %rbx
movq %rsi, %r15
leaq 0x1932(%rip), %rsi      # 0xe10c
callq 0x3260
testq %rax, %rax
je 0xc841
movq %rax, %r12
xorl %r14d, %r14d
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x3250
movq %r12, %rdi
callq 0x3030
movl $0x10000, %r13d         # imm = 0x10000
cmpq %r13, %rax
cmovbq %rax, %r13
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3250
leaq 0x195f1(%rip), %rdi     # 0x25e10
movq %rdi, (%r15)
pushq $0x1
popq %rdx
movq %r13, %rsi
movq %r12, %rcx
callq 0x32d0
movq %r13, (%rbx)
movq %r12, %rdi
callq 0x3210
jmp 0xc845
pushq $0x2
jmp 0xc843
pushq $0x3
popq %r14
movl %r14d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/calmopyrin[P]tedplay/tedplay.cpp
// Function: psidChangeTrack(int)
bool psidChangeTrack(int direction)
{
#ifdef NEWPLAYER
	unsigned int tuneOffset = 0x22;
#else
	unsigned int tuneOffset = 1;
#endif
	// SID
	if (direction > 0) {
		if (psidHdr.tracks > psidHdr.current) {
			psidPlayer[tuneOffset] += direction;
			rsidPlayer[tuneOffset] += direction;
			tmfPlayer[tuneOffset] += direction;
			psidHdr.current += direction;
		}
		else {
			std::cerr << "No more tracks." << std::endl;
			return false;
		}
	}
	else {
		if (1 < psidHdr.current) {
			psidPlayer[tuneOffset] += direction;
			rsidPlayer[tuneOffset] += direction;
			psidHdr.current += direction;
			tmfPlayer[tuneOffset] += direction;
		}
		else {
			std::cerr << "No more tracks." << std::endl;
			return false;
		}
	}
	if (psidHdr.type == 1 || (psidHdr.type == 2 && !psidHdr.replayAddress)) {
		ted->writeProtectedPlayerMemory(playerStartAddress, rsidPlayer, sizeof(rsidPlayer));
	}
	else if (psidHdr.type == 3) {
		ted->writeProtectedPlayerMemory(playerStartAddress, tmfPlayer, sizeof(tmfPlayer));
	}
	else {
		//ted->writeProtectedPlayerMemory(playerStartAddress, psidPlayer, sizeof(psidPlayer));
		unsigned short timer = (TED_SOUND_CLOCK * 4) / (psidHdr.speed & (1 << (psidHdr.current - 1)) ? 60 : 50);
		tmfPlayer[11] = timer & 0xFF;
		tmfPlayer[16] = timer >> 8;
		ted->writeProtectedPlayerMemory(playerStartAddress, tmfPlayer, sizeof(tmfPlayer));
	}
	cpu->setPC(playerStartAddress);
	return true;
}

// Assembly:
pushq %rax
testl %edi, %edi
jle 0xc884
movl 0x19587(%rip), %eax     # 0x25de4
cmpl %eax, 0x18f25(%rip)     # 0x25788
jbe 0xc8d7
addb %dil, 0x179a5(%rip)     # 0x24211
addb %dil, 0x179be(%rip)     # 0x24231
addb %dil, 0x179c7(%rip)     # 0x24241
addl %edi, %eax
movl %eax, 0x19562(%rip)     # 0x25de4
jmp 0xc8ac
movl 0x1955a(%rip), %eax     # 0x25de4
cmpl $0x2, %eax
jb 0xc8d7
addb %dil, 0x1797b(%rip)     # 0x24211
addb %dil, 0x17994(%rip)     # 0x24231
addl %edi, %eax
movl %eax, 0x1953f(%rip)     # 0x25de4
addb %dil, 0x17995(%rip)     # 0x24241
movl 0x1950a(%rip), %ecx     # 0x25dbc
cmpl $0x1, %ecx
je 0xc8c5
cmpl $0x2, %ecx
jne 0xc8f6
cmpl $0x0, 0x18ecd(%rip)     # 0x25790
jne 0xc8f6
movq 0x19534(%rip), %rdi     # 0x25e00
leaq 0x1795d(%rip), %rdx     # 0x24230
pushq $0x8
jmp 0xc942
movq 0x7712(%rip), %rdi      # 0x13ff0
leaq 0x3183(%rip), %rsi      # 0xfa68
callq 0x3200
movq %rax, %rdi
callq 0x3110
xorl %eax, %eax
jmp 0xc960
cmpl $0x3, %ecx
jne 0xc90b
movq 0x194fe(%rip), %rdi     # 0x25e00
leaq 0x17937(%rip), %rdx     # 0x24240
jmp 0xc940
movl 0x194e7(%rip), %ecx     # 0x25df8
decb %al
movzbl %al, %eax
btl %eax, %ecx
movl $0x4546, %eax           # imm = 0x4546
movl $0x39ba, %ecx           # imm = 0x39BA
cmovael %eax, %ecx
movb %cl, 0x1791f(%rip)      # 0x2424b
leaq 0x1790d(%rip), %rdx     # 0x24240
movb %ch, 0x17917(%rip)      # 0x24250
movq 0x194c0(%rip), %rdi     # 0x25e00
pushq $0x25
popq %rcx
movl $0xfe00, %esi           # imm = 0xFE00
callq 0xd8c2
movq 0x294bc(%rip), %rdi     # 0x35e10
movl $0xfe00, %esi           # imm = 0xFE00
callq 0x4352
movb $0x1, %al
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/calmopyrin[P]tedplay/tedplay.cpp
// Function: machineInit(unsigned int, unsigned int)
TED *machineInit(unsigned int sampleRate, unsigned int filterOrder)
{
	ted = new TED;
	ted->initFilter(sampleRate, filterOrder);
	cpu = new CPU(ted, ted->Ram + 0xff09, ted->Ram + 0x100);
	ted->cpuptr = cpu;
	ted->loadroms();
	machineReset();
	return ted;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
movl $0xb71e0, %edi          # imm = 0xB71E0
callq 0x3220
movq %rax, %r15
movq %rax, %rdi
callq 0x9640
movq %r15, 0x1945d(%rip)     # 0x25e00
movq %r15, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0xbdea
movl $0xa8, %edi
callq 0x3220
movq %rax, %rbx
movq 0x1943d(%rip), %rsi     # 0x25e00
leaq 0x55ec9(%rsi), %rdx
leaq 0x460c0(%rsi), %rcx
movq %rax, %rdi
callq 0x40e4
movq %rbx, 0x29430(%rip)     # 0x35e10
movq 0x19419(%rip), %rdi     # 0x25e00
movq %rbx, 0x45fb8(%rdi)
callq 0x9b2a
callq 0xc962
movq 0x19401(%rip), %rax     # 0x25e00
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0xa8, %esi
movq %rbx, %rdi
jmp 0xca22
movq %rax, %r14
movl $0xb71e0, %esi          # imm = 0xB71E0
movq %r15, %rdi
callq 0x3230
movq %r14, %rdi
callq 0x3340
// File: /workspace/github_c_makefile_star2_O2/calmopyrin[P]tedplay/tedplay.cpp
// Function: machineShutDown()
void machineShutDown()
{
	if(ted) {
		delete ted;
		ted = 0;
	}
	if (cpu) {
		delete cpu;
		cpu = 0;
	}
}

// Assembly:
pushq %rbx
movq 0x19344(%rip), %rdi     # 0x25e00
testq %rdi, %rdi
je 0xcacf
movq (%rdi), %rax
callq *0x20(%rax)
andq $0x0, 0x19331(%rip)     # 0x25e00
movq 0x2933a(%rip), %rbx     # 0x35e10
testq %rbx, %rbx
je 0xcaf8
movq %rbx, %rdi
callq 0x7e76
movl $0xa8, %esi
movq %rbx, %rdi
callq 0x3230
andq $0x0, 0x29318(%rip)     # 0x35e10
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/calmopyrin[P]tedplay/tedplay.cpp
// Function: tedplayPause()
void tedplayPause()
{
	if (player && playState == 1) {
		player->pause();
		player->lock();
		playState = 2;
	}
}

// Assembly:
movq 0x29317(%rip), %rdi     # 0x35e18
testq %rdi, %rdi
je 0xcb31
cmpl $0x1, 0x29313(%rip)     # 0x35e20
jne 0xcb31
pushq %rax
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x292fb(%rip), %rdi     # 0x35e18
movq (%rdi), %rax
callq *0x38(%rax)
movl $0x2, 0x292f3(%rip)     # 0x35e20
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/calmopyrin[P]tedplay/tedplay.cpp
// Function: tedplayPlay()
void tedplayPlay()
{
	if (player && !(playState == 1)) {
		player->unlock();
		if (!playState)
			ted->oscillatorReset();
		player->play();
		playState = 1;
	}
}

// Assembly:
movq 0x292df(%rip), %rdi     # 0x35e18
testq %rdi, %rdi
je 0xcb7e
cmpl $0x1, 0x292db(%rip)     # 0x35e20
je 0xcb7e
pushq %rax
movq (%rdi), %rax
callq *0x40(%rax)
cmpl $0x0, 0x292cb(%rip)     # 0x35e20
jne 0xcb63
movq 0x192a2(%rip), %rdi     # 0x25e00
callq 0xb758
movq 0x292ae(%rip), %rdi     # 0x35e18
movq (%rdi), %rax
callq *0x10(%rax)
movl $0x1, 0x292a6(%rip)     # 0x35e20
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/calmopyrin[P]tedplay/tedplay.cpp
// Function: tedplayStop()
void tedplayStop()
{
	if (player && playState) {
		player->stop();
		player->lock();
	}
	cpu->setPC(playerStartAddress);
	playState = 0;
}

// Assembly:
pushq %rax
movq 0x29291(%rip), %rdi     # 0x35e18
testq %rdi, %rdi
je 0xcba8
cmpl $0x0, 0x2928d(%rip)     # 0x35e20
je 0xcba8
movq (%rdi), %rax
callq *0x20(%rax)
movq 0x29276(%rip), %rdi     # 0x35e18
movq (%rdi), %rax
callq *0x38(%rax)
movq 0x29261(%rip), %rdi     # 0x35e10
movl $0xfe00, %esi           # imm = 0xFE00
callq 0x4352
andl $0x0, 0x29260(%rip)     # 0x35e20
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/calmopyrin[P]tedplay/tedplay.cpp
// Function: tedPlaySetWaveform(unsigned int, unsigned int)
void tedPlaySetWaveform(unsigned int channel, unsigned int wave)
{
	bool wasPlaying = (playState == 1);
	
	if (wasPlaying)
		tedplayPause();
	if (ted) {
		ted->selectWaveForm(channel, wave);
	}
	if (wasPlaying)
		tedplayPlay();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
movl 0x291d4(%rip), %r14d    # 0x35e20
cmpl $0x1, %r14d
jne 0xcc57
callq 0xcafa
movq 0x191a2(%rip), %rdi     # 0x25e00
testq %rdi, %rdi
je 0xcc6c
movl %ebp, %esi
movl %ebx, %edx
callq 0xbd8c
cmpl $0x1, %r14d
jne 0xcc7b
popq %rbx
popq %r14
popq %rbp
jmp 0xcb32
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/calmopyrin[P]tedplay/tedplay.cpp
// Function: tedplayClose()
void tedplayClose()
{
	if (player) {
		player->stop();
		delete player;
		player = 0;
	}
	machineShutDown();
}

// Assembly:
movq 0x29191(%rip), %rdi     # 0x35e18
testq %rdi, %rdi
je 0xcab4
pushq %rax
movq (%rdi), %rax
callq *0x20(%rax)
movq 0x2917a(%rip), %rdi     # 0x35e18
testq %rdi, %rdi
je 0xcca9
movq (%rdi), %rax
callq *0x8(%rax)
andq $0x0, 0x29167(%rip)     # 0x35e18
addq $0x8, %rsp
jmp 0xcab4
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/example/example.c
// Function: report_error
int report_error(void) {
    char message[SIR_MAXERROR] = {0};
    (void)sir_geterror(message);
    (void)fprintf(stderr, SIR_BREDB("libsir error: ") SIR_RED("%s%s"), message, SIR_EOL);
    return EXIT_FAILURE;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsp, %rbx
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x21b0
movq %rbx, %rdi
callq 0x28a4
movq 0xc7f8(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x6c32(%rip), %rdx      # 0x943c
leaq 0x7099(%rip), %r8       # 0x98aa
pushq $0x1
popq %rbp
movl %ebp, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23e0
movl %ebp, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/include/sir/helpers.h
// Function: _sir_validstr
static inline
bool __sir_validstr(const char* restrict str, bool fail, const char* func,
    const char* file, uint32_t line) {
    bool valid = str && *str != '\0';
    if (fail && !valid) {
        SIR_ASSERT(!valid && fail);
        (void)__sir_seterror(_SIR_E_STRING, func, file, line);
    }
    return valid;
}

// Assembly:
movl %edx, %ecx
testq %rdi, %rdi
je 0x4a97
movb $0x1, %al
cmpb $0x0, (%rdi)
je 0x4a97
retq
pushq %rax
leaq 0x4f53(%rip), %rdx      # 0x99f2
movl $0x800a0000, %edi       # imm = 0x800A0000
callq 0x3138
xorl %eax, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sir.c
// Function: sir_debug
bool sir_debug(PRINTF_FORMAT const char* format, ...) {
    _SIR_L_START(format);
    ret = _sir_logv(SIRL_DEBUG, format, args);
    _SIR_L_END();
    return ret;
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2918
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0x6b97(%rip), %rsi      # 0x94b6
pushq $0x46
popq %rdx
callq 0x296a
testb %al, %al
je 0x295f
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movl $0x80, %edi
movq %rbx, %rsi
callq 0x64fb
jmp 0x2961
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/include/sir/helpers.h
// Function: sirfile_validate
static inline
bool __sir_validptr(const void* restrict p, bool fail, const char* func,
    const char* file, uint32_t line) {
    bool valid = NULL != p;
    if (fail && !valid) {
        (void)__sir_seterror(_SIR_E_NULLPTR, func, file, line);
        SIR_ASSERT(!valid && fail);
    }
    return valid;
}

// Assembly:
testq %rdi, %rdi
je 0x3c87
cmpq $0x0, 0x10(%rdi)
je 0x3c87
movq (%rdi), %rax
testq %rax, %rax
je 0x3c87
cmpb $0x0, (%rax)
je 0x3c87
cmpl $0x0, 0x18(%rdi)
setne %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sir.c
// Function: sir_info
bool sir_info(PRINTF_FORMAT const char* format, ...) {
    _SIR_L_START(format);
    ret = _sir_logv(SIRL_INFO, format, args);
    _SIR_L_END();
    return ret;
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x29ed
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0x6ad2(%rip), %rsi      # 0x94c6
pushq $0x4e
popq %rdx
callq 0x296a
testb %al, %al
je 0x2a32
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
pushq $0x40
popq %rdi
movq %rbx, %rsi
callq 0x64fb
jmp 0x2a34
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sir.c
// Function: sir_notice
bool sir_notice(PRINTF_FORMAT const char* format, ...) {
    _SIR_L_START(format);
    ret = _sir_logv(SIRL_NOTICE, format, args);
    _SIR_L_END();
    return ret;
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2a9c
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0x6a2c(%rip), %rsi      # 0x94cf
pushq $0x56
popq %rdx
callq 0x296a
testb %al, %al
je 0x2ae1
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
pushq $0x20
popq %rdi
movq %rbx, %rsi
callq 0x64fb
jmp 0x2ae3
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sir.c
// Function: sir_warn
bool sir_warn(PRINTF_FORMAT const char* format, ...) {
    _SIR_L_START(format);
    ret = _sir_logv(SIRL_WARN, format, args);
    _SIR_L_END();
    return ret;
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2b4b
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0x6988(%rip), %rsi      # 0x94da
pushq $0x5e
popq %rdx
callq 0x296a
testb %al, %al
je 0x2b90
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
pushq $0x10
popq %rdi
movq %rbx, %rsi
callq 0x64fb
jmp 0x2b92
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sir.c
// Function: sir_error
bool sir_error(PRINTF_FORMAT const char* format, ...) {
    _SIR_L_START(format);
    ret = _sir_logv(SIRL_ERROR, format, args);
    _SIR_L_END();
    return ret;
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2bfa
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0x68e2(%rip), %rsi      # 0x94e3
pushq $0x66
popq %rdx
callq 0x296a
testb %al, %al
je 0x2c3f
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
pushq $0x8
popq %rdi
movq %rbx, %rsi
callq 0x64fb
jmp 0x2c41
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sir.c
// Function: sir_crit
bool sir_crit(PRINTF_FORMAT const char* format, ...) {
    _SIR_L_START(format);
    ret = _sir_logv(SIRL_CRIT, format, args);
    _SIR_L_END();
    return ret;
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2ca9
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0x683d(%rip), %rsi      # 0x94ed
pushq $0x6e
popq %rdx
callq 0x296a
testb %al, %al
je 0x2cee
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
pushq $0x4
popq %rdi
movq %rbx, %rsi
callq 0x64fb
jmp 0x2cf0
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sir.c
// Function: sir_alert
bool sir_alert(PRINTF_FORMAT const char* format, ...) {
    _SIR_L_START(format);
    ret = _sir_logv(SIRL_ALERT, format, args);
    _SIR_L_END();
    return ret;
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2d58
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0x6797(%rip), %rsi      # 0x94f6
pushq $0x76
popq %rdx
callq 0x296a
testb %al, %al
je 0x2d9d
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
pushq $0x2
popq %rdi
movq %rbx, %rsi
callq 0x64fb
jmp 0x2d9f
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sir.c
// Function: sir_emerg
bool sir_emerg(PRINTF_FORMAT const char* format, ...) {
    _SIR_L_START(format);
    ret = _sir_logv(SIRL_EMERG, format, args);
    _SIR_L_END();
    return ret;
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2e07
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0x66f2(%rip), %rsi      # 0x9500
pushq $0x7e
popq %rdx
callq 0x296a
testb %al, %al
je 0x2e4c
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
pushq $0x1
popq %rdi
movq %rbx, %rsi
callq 0x64fb
jmp 0x2e4e
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sir.c
// Function: sir_sysloglevels
bool sir_sysloglevels(sir_levels levels) {
#if !defined(SIR_NO_SYSTEM_LOGGERS)
    _sir_defaultlevels(&levels, sir_syslog_def_lvls);
    sir_update_config_data data = {SIRU_LEVELS, &levels, NULL, NULL, NULL};
    return _sir_writeinit(&data, _sir_sysloglevels);
#else
    SIR_UNUSED(levels);
    return _sir_seterror(_SIR_E_UNAVAIL);
#endif
}

// Assembly:
subq $0x38, %rsp
cmpl $0x100, %edi            # imm = 0x100
pushq $0x3f
popq %rax
cmovnel %edi, %eax
leaq 0xe(%rsp), %rcx
movw %ax, (%rcx)
leaq 0x10(%rsp), %rdi
movl $0x1, (%rdi)
movq %rcx, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
andq $0x0, 0x20(%rdi)
leaq 0x3084(%rip), %rsi      # 0x60f9
callq 0x638e
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sir.c
// Function: sir_syslogopts
bool sir_syslogopts(sir_options opts) {
#if !defined(SIR_NO_SYSTEM_LOGGERS)
    _sir_defaultopts(&opts, sir_syslog_def_opts);
    sir_update_config_data data = {SIRU_OPTIONS, NULL, &opts, NULL, NULL};
    return _sir_writeinit(&data, _sir_syslogopts);
#else
    SIR_UNUSED(opts);
    return _sir_seterror(_SIR_E_UNAVAIL);
#endif
}

// Assembly:
subq $0x38, %rsp
cmpl $0x100000, %edi         # imm = 0x100000
movl $0x7f00, %eax           # imm = 0x7F00
cmovnel %edi, %eax
leaq 0xc(%rsp), %rcx
leaq 0x10(%rsp), %rdi
movl $0x2, (%rdi)
andq $0x0, 0x8(%rdi)
movl %eax, (%rcx)
movq %rcx, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
leaq 0x3105(%rip), %rsi      # 0x61bf
callq 0x638e
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirerrors.c
// Function: _sir_seterror
bool __sir_seterror(uint32_t err, const char* func, const char* file, uint32_t line) {
    if (_sir_validerror(err)) {
        _sir_te.lasterror = err;
        _sir_te.loc.func  = func;
        _sir_te.loc.file  = file;
        _sir_te.loc.line  = line;

        if (_SIR_E_PLATFORM != err) {
            _sir_te.os_code = 0;
            _sir_resetstr(_sir_te.os_msg);
        }
    }
#if defined(DEBUG) && defined(SIR_SELFLOG)
    if (_SIR_E_NOERROR != err) {
        char errmsg[SIR_MAXERROR] = {0};
        _sir_geterror(errmsg);
        __sir_selflog(func, file, line, "%s", errmsg);
    }
#endif
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edi, %eax
andl $0x8fffffff, %eax       # imm = 0x8FFFFFFF
testl %edi, %edi
setns %cl
cmpl $0x8fff0001, %eax       # imm = 0x8FFF0001
setae %al
orb %cl, %al
jne 0x319e
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
movq %fs:0x0, %rax
movl %ebp, -0x150(%rax)
movq %r15, -0x48(%rax)
movq %r14, -0x40(%rax)
movl %ebx, -0x38(%rax)
cmpl $0x80170000, %ebp       # imm = 0x80170000
je 0x319e
leaq -0x150(%rax), %rax
andl $0x0, 0x4(%rax)
movb $0x0, 0x8(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirerrors.c
// Function: sir_geterrorinfo
void __sir_setoserror(int code, const char* msg, const char* func, const char* file, uint32_t line) {
    _sir_te.os_code = code;
    _sir_resetstr(_sir_te.os_msg);

    if (_sir_validstrnofail(msg))
        (void)_sir_strncpy(_sir_te.os_msg, SIR_MAXERROR, msg, SIR_MAXERROR);

    (void)__sir_seterror(_SIR_E_PLATFORM, func, file, line);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x3548
movq %rdi, %rbx
xorl %r14d, %r14d
movl $0x220, %edx            # imm = 0x220
xorl %esi, %esi
callq 0x21b0
movq %fs:0x0, %rax
leaq -0x148(%rax), %r15
movups 0x100(%r15), %xmm0
movups %xmm0, (%rbx)
movl 0x110(%r15), %eax
movl %eax, 0x10(%rbx)
movl -0x4(%r15), %eax
movl %eax, 0x14(%rbx)
cmpb $0x0, (%r15)
leaq 0x18(%rbx), %rdi
leaq 0x5eb9(%rip), %rdx      # 0x9387
cmovneq %r15, %rdx
movl $0x100, %esi            # imm = 0x100
movl $0x100, %ecx            # imm = 0x100
callq 0x5401
andw $0x0, 0x118(%rbx)
movl -0x8(%r15), %ecx
pushq $0xb
popq %rdx
pushq $0x17
popq %rsi
leaq 0xb756(%rip), %rax      # 0xec50
movq %rdx, %rdi
shlq $0x4, %rdi
movl (%rdi,%rax), %r8d
cmpl %ecx, %r8d
je 0x3593
cmpq %rsi, %r14
je 0x358d
cmpl %ecx, %r8d
setb %r8b
leaq -0x1(%rdx), %rdi
cmpq %r14, %rdi
setb %r9b
orb %r8b, %r9b
cmpb $0x1, %r9b
jne 0x353c
cmpq %rsi, %rdx
jae 0x358d
incq %rdx
movq %rdx, %r14
movq %rsi, %rdi
leaq (%rdi,%r14), %rdx
shrq %rdx
movq %rdi, %rsi
jmp 0x34fa
movq %fs:0x0, %rax
movl $0x800b0000, %ecx       # imm = 0x800B0000
movq %rcx, -0x150(%rax)
leaq 0x5fee(%rip), %rcx      # 0x9555
movq %rcx, -0x48(%rax)
leaq 0x5f9f(%rip), %rcx      # 0x9514
movq %rcx, -0x40(%rax)
movl $0xec, -0x38(%rax)
movb $0x0, -0x148(%rax)
popq %rbx
popq %r14
popq %r15
retq
movl %ecx, %edx
shrl $0x10, %edx
andl $0x7fff, %edx           # imm = 0x7FFF
movw %dx, 0x118(%rbx)
addq $0x11a, %rbx            # imm = 0x11A
cmpl $0x80170000, %ecx       # imm = 0x80170000
jne 0x35bd
leaq 0x5fac(%rip), %rdx      # 0x9567
jmp 0x35c4
addq %rdi, %rax
movq 0x8(%rax), %rdx
movl $0x100, %esi            # imm = 0x100
movl $0x100, %ecx            # imm = 0x100
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x5401
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirerrors.c
// Function: _sir_handleerr
bool __sir_handleerr(int code, const char* func, const char* file, uint32_t line) {
    if (SIR_E_NOERROR != code) {
        char message[SIR_MAXERROR] = {0};
        int finderr                = 0;
        errno                      = SIR_E_NOERROR;

#if defined(__HAVE_XSI_STRERROR_R__)
        _sir_selflog("using XSI strerror_r");
        finderr = strerror_r(code, message, SIR_MAXERROR);
# if defined(__HAVE_XSI_STRERROR_R_ERRNO__)
        _sir_selflog("using XSI strerror_r for glibc < 2.13");
        if (finderr == -1)
            finderr = errno;
# endif
#elif defined(__HAVE_GNU_STRERROR_R__)
        _sir_selflog("using GNU strerror_r");
        const char* tmp = strerror_r(code, message, SIR_MAXERROR);
        if (tmp != message)
            (void)_sir_strncpy(message, SIR_MAXERROR, tmp, SIR_MAXERROR);
#elif defined(__HAVE_STRERROR_S__)
        _sir_selflog("using strerror_s");
        finderr = (int)strerror_s(message, SIR_MAXERROR, code);
#else
        _sir_selflog("using strerror");
        const char* tmp = strerror(code);
        (void)_sir_strncpy(message, SIR_MAXERROR, tmp, strnlen(tmp, SIR_MAXERROR));
#endif
        if (0 == finderr) { //-V547
            __sir_setoserror(code, message, func, file, line);
#if defined(__HAVE_XSI_STRERROR_R__) || defined(__HAVE_STRERROR_S__)
        } else {
            /* Per my reading of the man pages, GNU strerror_r and normal strerror "can't fail";
             * they simply return a string such as "Unknown nnn error" if unable to look up an
             * error code.
             */
# if defined(__HAVE_XSI_STRERROR_R__)
            _sir_selflog("strerror_r failed! error: %d", finderr);
# elif defined(__HAVE_STRERROR_S__)
            _sir_selflog("strerror_s failed! error: %d", finderr);
# endif
#endif
        }
    }
    return false;
}

// Assembly:
cmpl $0x1, %edi
je 0x32bb
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
movq %rsp, %r12
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
xorl %esi, %esi
callq 0x21b0
callq 0x2080
movl $0x1, (%rax)
movl $0x100, %edx            # imm = 0x100
movl %ebp, %edi
movq %r12, %rsi
callq 0x22d0
cmpq %r12, %rax
je 0x3299
movq %rsp, %rdi
movl $0x100, %esi            # imm = 0x100
movl $0x100, %ecx            # imm = 0x100
movq %rax, %rdx
callq 0x5401
movq %rsp, %rsi
movl %ebp, %edi
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x31ab
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirerrors.c
// Function: sir_reset_tls_error
void _sir_reset_tls_error(void) {
    _sir_te.lasterror = _SIR_E_NOERROR;
    _sir_te.os_code   = 0;
    _sir_resetstr(_sir_te.os_msg);
    _sir_te.loc.func = SIR_UNKNOWN;
    _sir_te.loc.file = SIR_UNKNOWN;
    _sir_te.loc.line = 0U;
}

// Assembly:
pushq %rax
movq %fs:0x0, %rax
movl $0x80010000, %ecx       # imm = 0x80010000
movq %rcx, -0x150(%rax)
movb $0x0, -0x148(%rax)
leaq 0x5d85(%rip), %rcx      # 0x9387
movq %rcx, -0x48(%rax)
movq %rcx, -0x40(%rax)
andl $0x0, -0x38(%rax)
popq %rax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirfilecache.c
// Function: sir_addfile
sirfileid _sir_addfile(const char* path, sir_levels levels, sir_options opts) {
    (void)_sir_seterror(_SIR_E_NOERROR);

    if (!_sir_sanity())
        return 0U;

    _SIR_LOCK_SECTION(sirfcache, sfc, SIRMI_FILECACHE, 0U);

    _sir_defaultlevels(&levels, sir_file_def_lvls);
    _sir_defaultopts(&opts, sir_file_def_opts);

    sirfileid retval = _sir_fcache_add(sfc, path, levels, opts);
    _SIR_UNLOCK_SECTION(SIRMI_FILECACHE);

    return retval;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x61d2(%rip), %rsi      # 0x9801
leaq 0x61d8(%rip), %rdx      # 0x980e
pushq $0x28
popq %rcx
movl $0x80010000, %edi       # imm = 0x80010000
callq 0x3138
callq 0x5f4b
testb %al, %al
je 0x36ad
pushq $0x1
popq %rdi
callq 0x5c53
testq %rax, %rax
je 0x3692
cmpw $0x100, %r14w           # imm = 0x100
movl $0xff, %edx
cmovnel %r14d, %edx
cmpl $0x100000, %ebp         # imm = 0x100000
movl $0x400, %ecx            # imm = 0x400
cmovnel %ebp, %ecx
movzwl %dx, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x36b4
movl %eax, %ebx
pushq $0x1
popq %rdi
callq 0x5df7
movl %ebx, %eax
jmp 0x36af
leaq 0x6168(%rip), %rsi      # 0x9801
leaq 0x616e(%rip), %rdx      # 0x980e
pushq $0x2d
popq %rcx
movl $0x800f0000, %edi       # imm = 0x800F0000
callq 0x3138
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirfilecache.c
// Function: sir_fcache_add
sirfileid _sir_fcache_add(sirfcache* sfc, const char* path, sir_levels levels,
    sir_options opts) {
    if (!_sir_validptr(sfc) || !_sir_validstr(path) || !_sir_validlevels(levels) ||
        !_sir_validopts(opts))
        return 0U;

    if (sfc->count >= SIR_MAXFILES)
        return _sir_seterror(_SIR_E_NOROOM);

    const sirfile* existing = _sir_fcache_find(sfc, (const void*)path, _sir_fcache_pred_path);
    if (NULL != existing) {
        _sir_selflog("error: already have file (path: '%s', id: %"PRIx32")",
            path, existing->id);
        return _sir_seterror(_SIR_E_DUPITEM);
    }

    sirfile* sf = _sirfile_create(path, levels, opts);
    if (_sirfile_validate(sf)) {
        _sir_selflog("adding file (path: '%s', id: %"PRIx32"); count = %zu", //-V522
            sf->path, sf->id, sfc->count + 1);

        sfc->files[sfc->count++] = sf;

        if (!_sir_bittest(sf->opts, SIRO_NOHDR) && !_sirfile_writeheader(sf, SIR_FHBEGIN))
            _sir_selflog("warning: failed to write file header (path: '%s', id: %"PRIx32")",
                sf->path, sf->id);

        return sf->id;
    }

    _sir_safefree(&sf);

    return 0U;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebp
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x625b(%rip), %rdx      # 0x992d
pushq $0x1
popq %rsi
movl $0x19a, %ecx            # imm = 0x19A
callq 0x3cb7
xorl %r15d, %r15d
testb %al, %al
je 0x37a6
leaq 0x623c(%rip), %rdx      # 0x992d
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x19a, %ecx            # imm = 0x19A
callq 0x3b76
testb %al, %al
je 0x37a6
movzwl %r12w, %r12d
leaq 0x6219(%rip), %rsi      # 0x992d
leaq 0x60f3(%rip), %rdx      # 0x980e
movl %r12d, %edi
movl $0x19a, %ecx            # imm = 0x19A
callq 0x528f
testb %al, %al
je 0x37a6
leaq 0x61fa(%rip), %rsi      # 0x992d
leaq 0x60d4(%rip), %rdx      # 0x980e
movl %ebp, %edi
movl $0x19b, %ecx            # imm = 0x19B
callq 0x52c2
testb %al, %al
je 0x37a6
cmpq $0x10, 0x80(%rbx)
jb 0x376e
leaq 0x61d2(%rip), %rsi      # 0x992d
leaq 0x60ac(%rip), %rdx      # 0x980e
movl $0x80060000, %edi       # imm = 0x80060000
movl $0x19f, %ecx            # imm = 0x19F
jmp 0x379d
leaq 0xe5e(%rip), %rdx       # 0x45d3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4557
testq %rax, %rax
je 0x37b6
leaq 0x61a1(%rip), %rsi      # 0x992d
leaq 0x607b(%rip), %rdx      # 0x980e
movl $0x80040000, %edi       # imm = 0x80040000
movl $0x1a5, %ecx            # imm = 0x1A5
callq 0x3138
movzbl %al, %r15d
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x3a56
movq %rax, %r14
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0x3c66
testb %al, %al
je 0x3809
movq 0x80(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x80(%rbx)
movq %r14, (%rbx,%rax,8)
testb $0x1, 0xe(%r14)
jne 0x3803
leaq 0x6142(%rip), %rsi      # 0x993d
movq %r14, %rdi
callq 0x3e64
movl 0x18(%r14), %r15d
jmp 0x37a6
leaq 0x8(%rsp), %rdi
callq 0x5098
xorl %r15d, %r15d
jmp 0x37a6
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirfilecache.c
// Function: sir_updatefile
bool _sir_updatefile(sirfileid id, const sir_update_config_data* data) {
    (void)_sir_seterror(_SIR_E_NOERROR);

    if (!_sir_sanity() || !_sir_validfileid(id) || !_sir_validupdatedata(data))
        return false;

    _SIR_LOCK_SECTION(const sirfcache, sfc, SIRMI_FILECACHE, false);
    bool retval = _sir_fcache_update(sfc, id, data);
    _SIR_UNLOCK_SECTION(SIRMI_FILECACHE);

    return retval;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x5ff6(%rip), %rsi      # 0x981d
leaq 0x5fe0(%rip), %rdx      # 0x980e
pushq $0x39
popq %rcx
movl $0x80010000, %edi       # imm = 0x80010000
callq 0x3138
callq 0x5f4b
xorb $0x1, %al
testl %ebp, %ebp
sete %cl
orb %al, %cl
jne 0x38ab
leaq 0x5fcb(%rip), %rsi      # 0x981d
leaq 0x5fb5(%rip), %rdx      # 0x980e
pushq $0x3b
popq %rcx
movq %rbx, %rdi
callq 0x516d
testb %al, %al
je 0x38ab
pushq $0x1
popq %rdi
callq 0x5c53
testq %rax, %rax
je 0x3890
movq %rax, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x38b4
movl %eax, %ebx
pushq $0x1
popq %rdi
callq 0x5df7
movl %ebx, %eax
jmp 0x38ad
leaq 0x5f86(%rip), %rsi      # 0x981d
leaq 0x5f70(%rip), %rdx      # 0x980e
pushq $0x3e
popq %rcx
movl $0x800f0000, %edi       # imm = 0x800F0000
callq 0x3138
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirfilecache.c
// Function: sir_fcache_update
bool _sir_fcache_update(const sirfcache* sfc, sirfileid id, const sir_update_config_data* data) {
    bool retval = _sir_validptr(sfc) && _sir_validfileid(id) && _sir_validupdatedata(data);

    if (retval) {
        sirfile* found = _sir_fcache_find(sfc, (const void*)&id, _sir_fcache_pred_id);
        retval = found ? _sirfile_update(found, data) : _sir_seterror(_SIR_E_NOITEM);
    }

    return retval;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, 0xc(%rsp)
leaq 0x607e(%rip), %rdx      # 0x994d
pushq $0x1
popq %rsi
movl $0x1bc, %ecx            # imm = 0x1BC
callq 0x3cb7
xorb $0x1, %al
testl %ebp, %ebp
sete %cl
orb %al, %cl
jne 0x392c
leaq 0x605f(%rip), %rsi      # 0x994d
leaq 0x5f19(%rip), %rdx      # 0x980e
movq %rbx, %rdi
movl $0x1bc, %ecx            # imm = 0x1BC
callq 0x516d
testb %al, %al
je 0x392c
leaq 0xdda(%rip), %rdx       # 0x46e7
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x4557
testq %rax, %rax
je 0x3930
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4508
jmp 0x394d
xorl %eax, %eax
jmp 0x394d
leaq 0x6016(%rip), %rsi      # 0x994d
leaq 0x5ed0(%rip), %rdx      # 0x980e
movl $0x80050000, %edi       # imm = 0x80050000
movl $0x1c0, %ecx            # imm = 0x1C0
callq 0x3138
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirfilecache.c
// Function: sir_remfile
bool _sir_remfile(sirfileid id) {
    (void)_sir_seterror(_SIR_E_NOERROR);

    if (!_sir_sanity() || !_sir_validfileid(id))
        return false;

    _SIR_LOCK_SECTION(sirfcache, sfc, SIRMI_FILECACHE, false);
    bool retval = _sir_fcache_rem(sfc, id);
    _SIR_UNLOCK_SECTION(SIRMI_FILECACHE);

    return retval;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x5ecd(%rip), %rsi      # 0x982d
leaq 0x5ea7(%rip), %rdx      # 0x980e
pushq $0x46
popq %rcx
movl $0x80010000, %edi       # imm = 0x80010000
callq 0x3138
callq 0x5f4b
xorb $0x1, %al
testl %ebx, %ebx
sete %cl
orb %al, %cl
jne 0x39c4
pushq $0x1
popq %rdi
callq 0x5c53
testq %rax, %rax
je 0x39a9
movq %rax, %rdi
movl %ebx, %esi
callq 0x39c8
movl %eax, %ebx
pushq $0x1
popq %rdi
callq 0x5df7
movl %ebx, %eax
jmp 0x39c6
leaq 0x5e7d(%rip), %rsi      # 0x982d
leaq 0x5e57(%rip), %rdx      # 0x980e
pushq $0x4b
popq %rcx
movl $0x800f0000, %edi       # imm = 0x800F0000
callq 0x3138
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirfilecache.c
// Function: sir_fcache_rem
bool _sir_fcache_rem(sirfcache* sfc, sirfileid id) {
    bool retval = _sir_validptr(sfc) && _sir_validfileid(id);

    if (retval) {
        bool found = false;
        for (size_t n = 0; n < sfc->count; n++) {
            SIR_ASSERT(_sirfile_validate(sfc->files[n]));

            if (sfc->files[n]->id == id) {
                _sir_selflog("removing file (path: '%s', id: %"PRIx32"); count = %zu",
                    sfc->files[n]->path, sfc->files[n]->id, sfc->count - 1);

                _sirfile_destroy(&sfc->files[n]);
                _sir_fcache_shift(sfc, n);

                sfc->count--;
                found = true;
                break;
            }
        }

        if (!found)
            retval = _sir_seterror(_SIR_E_NOITEM);
    }

    return retval;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x5f88(%rip), %rdx      # 0x9960
pushq $0x1
popq %rsi
movl $0x1c7, %ecx            # imm = 0x1C7
callq 0x3cb7
xorb $0x1, %al
testl %ebp, %ebp
sete %cl
orb %al, %cl
jne 0x3a13
movq 0x80(%rbx), %rax
xorl %r14d, %r14d
movq %rbx, %rdi
cmpq %r14, %rax
je 0x3a17
movq (%rdi), %rcx
cmpl %ebp, 0x18(%rcx)
je 0x3a38
incq %r14
addq $0x8, %rdi
jmp 0x39fd
xorl %eax, %eax
jmp 0x3a51
leaq 0x5f42(%rip), %rsi      # 0x9960
leaq 0x5de9(%rip), %rdx      # 0x980e
movl $0x80050000, %edi       # imm = 0x80050000
movl $0x1dc, %ecx            # imm = 0x1DC
popq %rbx
popq %r14
popq %rbp
jmp 0x3138
callq 0x3c8a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x46f0
decq 0x80(%rbx)
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirfilecache.c
// Function: sirfile_create
sirfile* _sirfile_create(const char* path, sir_levels levels, sir_options opts) {
    if (!_sir_validstr(path) || !_sir_validlevels(levels) || !_sir_validopts(opts))
        return NULL;

    sirfile* sf = (sirfile*)calloc(1, sizeof(sirfile));
    if (!sf) {
        (void)_sir_handleerr(errno);
        return NULL;
    }

    sf->path = strndup(path, strnlen(path, SIR_MAXPATH));
    if (!sf->path) {
        (void)_sir_handleerr(errno);
        _sir_safefree(&sf);
        return NULL;
    }

    sf->levels = levels;
    sf->opts   = opts;

    if (!_sirfile_open(sf) || !_sirfile_validate(sf)) {
        _sirfile_destroy(&sf);
        return NULL;
    }

    return sf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r15
leaq 0x5dcf(%rip), %rdx      # 0x983a
pushq $0x1
popq %rsi
pushq $0x53
popq %rcx
callq 0x3b76
testb %al, %al
je 0x3b65
movzwl %bp, %edi
leaq 0x5db2(%rip), %rsi      # 0x983a
leaq 0x5d7f(%rip), %rdx      # 0x980e
pushq $0x53
popq %rcx
callq 0x528f
testb %al, %al
je 0x3b65
leaq 0x5d94(%rip), %rsi      # 0x983a
leaq 0x5d61(%rip), %rdx      # 0x980e
pushq $0x53
popq %rcx
movl %ebx, %edi
callq 0x52c2
testb %al, %al
je 0x3b65
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x2220
movq %rax, (%rsp)
testq %rax, %rax
je 0x3b21
movq %rax, %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r15, %rdi
callq 0x21c0
movq %r15, %rdi
movq %rax, %rsi
callq 0x2200
movq %rax, (%r14)
testq %rax, %rax
je 0x3b40
movw %bp, 0x8(%r14)
movl %ebx, 0xc(%r14)
movq %r14, %rdi
callq 0x3bad
testb %al, %al
je 0x3b17
movq %r14, %rdi
callq 0x3c66
testb %al, %al
jne 0x3b68
movq %rsp, %rdi
callq 0x3c8a
jmp 0x3b65
callq 0x2080
movl (%rax), %edi
leaq 0x5d0b(%rip), %rsi      # 0x983a
leaq 0x5cd8(%rip), %rdx      # 0x980e
pushq $0x58
popq %rcx
callq 0x3231
jmp 0x3b65
callq 0x2080
movl (%rax), %edi
leaq 0x5cec(%rip), %rsi      # 0x983a
leaq 0x5cb9(%rip), %rdx      # 0x980e
pushq $0x5e
popq %rcx
callq 0x3231
movq %rsp, %rdi
callq 0x5098
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirfilecache.c
// Function: sirfile_open
bool _sirfile_open(sirfile* sf) {
    bool retval = _sir_validptr(sf) && _sir_validstr(sf->path);

    if (retval) {
        FILE* f  = NULL;
        retval = _sir_openfile(&f, sf->path, SIR_FOPENMODE, SIR_PATH_REL_TO_CWD);
        if (retval && NULL != f) {
            _sirfile_close(sf);

            sf->f  = f;
            sf->id = FNV32_1a((const uint8_t*)sf->path, strnlen(sf->path, SIR_MAXPATH));
        }
    }

    return retval;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x5c8b(%rip), %rdx      # 0x984a
pushq $0x1
popq %rsi
pushq $0x6f
popq %rcx
callq 0x3cb7
testb %al, %al
je 0x3c54
movq (%rbx), %rdi
leaq 0x5c6e(%rip), %rdx      # 0x984a
pushq $0x1
popq %rsi
pushq $0x6f
popq %rcx
callq 0x3b76
testb %al, %al
je 0x3c54
leaq 0x8(%rsp), %rdi
andq $0x0, (%rdi)
movq (%rbx), %rsi
leaq 0x5f20(%rip), %rdx      # 0x9b1e
pushq $0x1
popq %rcx
callq 0x4c34
movl %eax, %ebp
testb %al, %al
je 0x3c56
cmpq $0x0, 0x8(%rsp)
je 0x3c56
leaq 0x10(%rbx), %rdi
callq 0x50ef
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rbx)
movq (%rbx), %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
callq 0x21c0
movl $0x811c9dc5, %ecx       # imm = 0x811C9DC5
xorl %edx, %edx
cmpq %rdx, %rax
je 0x3c61
movzbl (%r14,%rdx), %esi
xorl %esi, %ecx
imull $0x1000193, %ecx, %ecx  # imm = 0x1000193
incq %rdx
jmp 0x3c3d
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %ecx, 0x18(%rbx)
jmp 0x3c56
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirfilecache.c
// Function: sirfile_destroy
void _sirfile_destroy(sirfile** sf) {
    if (sf && *sf) {
        _sirfile_close(*sf);
        _sir_safefree(&(*sf)->path);
        _sir_safefree(sf);
    }
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x3cb5
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3cb5
addq $0x10, %rdi
callq 0x50ef
movq (%rbx), %rdi
callq 0x5098
movq %rbx, %rdi
popq %rbx
jmp 0x5098
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirfilecache.c
// Function: sirfile_write
bool _sirfile_write(sirfile* sf, const char* output) {
    bool retval = _sirfile_validate(sf) && _sir_validstr(output);

    if (retval) {
        if (sf->writes_since_size_chk++ > SIR_FILE_CHK_SIZE_WRITES) {
            sf->writes_since_size_chk = 0;
            _sirfile_rollifneeded(sf);
        }

        size_t writeLen = strnlen(output, SIR_MAXOUTPUT);
        size_t wrote    = fwrite(output, sizeof(char), writeLen, sf->f);

        SIR_ASSERT(wrote == writeLen);

        if (wrote < writeLen) {
            (void)_sir_handleerr(errno);
            clearerr(sf->f);
        }

        retval = wrote == writeLen;
    }

    return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3c66
testb %al, %al
je 0x3d9f
leaq 0x5b41(%rip), %rdx      # 0x9858
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x85, %ecx
callq 0x3b76
testb %al, %al
je 0x3d9f
movl 0x1c(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x1c(%rbx)
cmpl $0xb, %eax
jl 0x3d45
andl $0x0, 0x1c(%rbx)
movq %rbx, %rdi
callq 0x3da7
movl $0x10e7, %esi           # imm = 0x10E7
movq %r14, %rdi
callq 0x21c0
movq %rax, %r15
movq 0x10(%rbx), %rcx
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x23d0
movq %rax, %r14
cmpq %r15, %rax
jae 0x3d97
callq 0x2080
movl (%rax), %edi
leaq 0x5adb(%rip), %rsi      # 0x9858
leaq 0x5a8a(%rip), %rdx      # 0x980e
movl $0x93, %ecx
callq 0x3231
movq 0x10(%rbx), %rdi
callq 0x2260
cmpq %r15, %r14
sete %al
jmp 0x3da1
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/src/sirfilecache.c
// Function: sirfile_rollifneeded
void _sirfile_rollifneeded(sirfile* sf) {
    if (_sirfile_validate(sf) && _sirfile_needsroll(sf)) {
        bool rolled   = false;
        char* newpath = NULL;

        _sir_selflog("file (path: '%s', id: %"PRIx32") reached ~%d bytes in size;"
            " rolling...", sf->path, sf->id, SIR_FROLLSIZE);

        _sir_fflush(sf->f);

        if (_sirfile_roll(sf, &newpath)) {
            char header[SIR_MAXFHEADER] = {0};
            (void)snprintf(header, SIR_MAXFHEADER, SIR_FHROLLED, newpath);
            rolled = _sirfile_writeheader(sf, header);
        }

        _sir_safefree(&newpath);
        if (!rolled) /* write anyway; don't want to lose data. */
            _sir_selflog("error: failed to roll file (path: '%s', id: %"PRIx32")!",
                sf->path, sf->id);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
callq 0x3c66
testb %al, %al
je 0x3e59
movq %rbx, %rdi
callq 0x3fe6
testb %al, %al
je 0x3e59
leaq 0x8(%rsp), %r14
andq $0x0, (%r14)
movq 0x10(%rbx), %rdi
callq 0x44be
movq %rbx, %rdi
movq %r14, %rsi
callq 0x407c
testb %al, %al
je 0x3e4f
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, 0x70(%r14)
movaps %xmm0, 0x60(%r14)
movaps %xmm0, 0x50(%r14)
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movq 0x8(%rsp), %r9
leaq 0x5abf(%rip), %r8       # 0x98ec
pushq $0x1
popq %rdx
movl $0x80, %esi
movl $0x80, %ecx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2040
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3e64
leaq 0x8(%rsp), %rdi
callq 0x5098
addq $0x98, %rsp
popq %rbx
popq %r14
retq