// File: /workspace/github_c_makefile_star2_O0/albinoloverats[P]hide/common/src/error.c
// Function: die
extern void die(const char * const restrict s, ...)
{
	int ex = errno;
	char *d = NULL;
	va_list ap;
	va_start(ap, s);
#ifndef _WIN32
	vasprintf(&d, s, ap);
#else
	uint8_t l = 0xFF;
	if ((d = calloc(l, sizeof l)))
		vsnprintf(d, l - 1, s, ap);
#endif
	fprintf(stderr, "%s", d);
	va_end(ap);
	fprintf(stderr, "\n");
#ifdef BUILD_GUI
	error_gui_alert(d);
#endif
	free(d);
	if (ex)
	{
		char * const restrict e = strdup(strerror(ex));
		for (uint32_t i = 0; e && i < strlen(e); i++)
			e[i] = tolower((unsigned char)e[i]);
		fprintf(stderr, "%s\n", e);
		free(e);
#if !defined _WIN32 && !defined __CYGWIN__ && !defined __FreeBSD__
		void *bt[BACKTRACE_BUFFER_LIMIT];
		int c = backtrace(bt, BACKTRACE_BUFFER_LIMIT);
		char **sym = backtrace_symbols(bt, c);
		if (sym)
		{
			for (int i = 0; i < c; i++)
				fprintf(stderr, "%s\n", sym[i]);
			free(sym);
		}
#endif
	}
	exit(ex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2120, %rsp           # imm = 0x2120
testb %al, %al
je 0x3f17
movaps %xmm0, -0x20e0(%rbp)
movaps %xmm1, -0x20d0(%rbp)
movaps %xmm2, -0x20c0(%rbp)
movaps %xmm3, -0x20b0(%rbp)
movaps %xmm4, -0x20a0(%rbp)
movaps %xmm5, -0x2090(%rbp)
movaps %xmm6, -0x2080(%rbp)
movaps %xmm7, -0x2070(%rbp)
movq %r9, -0x20e8(%rbp)
movq %r8, -0x20f0(%rbp)
movq %rcx, -0x20f8(%rbp)
movq %rdx, -0x2100(%rbp)
movq %rsi, -0x2108(%rbp)
movq %rdi, -0x8(%rbp)
callq 0x2060
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
leaq -0x30(%rbp), %rax
leaq -0x2110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq -0x8(%rbp), %rsi
leaq -0x30(%rbp), %rdx
leaq -0x18(%rbp), %rdi
callq 0x20f0
movq 0x406c(%rip), %rax      # 0x7ff8
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x222a(%rip), %rsi      # 0x61c4
movb $0x0, %al
callq 0x2200
leaq -0x30(%rbp), %rax
movq 0x404c(%rip), %rax      # 0x7ff8
movq (%rax), %rdi
leaq 0x22ef(%rip), %rsi      # 0x62a5
movb $0x0, %al
callq 0x2200
movq -0x18(%rbp), %rdi
callq 0x2050
cmpl $0x0, -0xc(%rbp)
je 0x4116
movl -0xc(%rbp), %edi
callq 0x2370
movq %rax, %rdi
callq 0x2360
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x38(%rbp)
movb %al, -0x2111(%rbp)
je 0x4023
movl -0x3c(%rbp), %eax
movq %rax, -0x2120(%rbp)
movq -0x38(%rbp), %rdi
callq 0x2100
movq %rax, %rcx
movq -0x2120(%rbp), %rax
cmpq %rcx, %rax
setb %al
movb %al, -0x2111(%rbp)
movb -0x2111(%rbp), %al
testb $0x1, %al
jne 0x402f
jmp 0x4056
movq -0x38(%rbp), %rax
movl -0x3c(%rbp), %ecx
movzbl (%rax,%rcx), %edi
callq 0x2230
movb %al, %dl
movq -0x38(%rbp), %rax
movl -0x3c(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3feb
movq 0x3f9b(%rip), %rax      # 0x7ff8
movq (%rax), %rdi
movq -0x38(%rbp), %rdx
leaq 0x2306(%rip), %rsi      # 0x6371
movb $0x0, %al
callq 0x2200
movq -0x38(%rbp), %rdi
callq 0x2050
leaq -0x2040(%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x2110
movl %eax, -0x2044(%rbp)
leaq -0x2040(%rbp), %rdi
movl -0x2044(%rbp), %esi
callq 0x20d0
movq %rax, -0x2050(%rbp)
cmpq $0x0, -0x2050(%rbp)
je 0x4114
movl $0x0, -0x2054(%rbp)
movl -0x2054(%rbp), %eax
cmpl -0x2044(%rbp), %eax
jge 0x4108
movq 0x3f24(%rip), %rax      # 0x7ff8
movq (%rax), %rdi
movq -0x2050(%rbp), %rax
movslq -0x2054(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x2281(%rip), %rsi      # 0x6371
movb $0x0, %al
callq 0x2200
movl -0x2054(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2054(%rbp)
jmp 0x40bf
movq -0x2050(%rbp), %rdi
callq 0x2050
jmp 0x4116
movl -0xc(%rbp), %edi
callq 0x2340
nop