// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: GH_verbose
static void GH_verbose(int level, const char *fmt, ...)
{
	static int verbosity=-1;
	static FILE *output_stream=NULL;
	static int stream_initialized=0;
	va_list args;

	if (verbosity < 0) {
		verbosity=get_envi("GH_VERBOSE", GH_MSG_LEVEL_DEFAULT);
	}

	if (level > verbosity) {
		return;
	}

	if (!stream_initialized) {
		const char *file=getenv("GH_VERBOSE_FILE");
		if (file) {
			char buf[PATH_MAX];
			parse_name(buf, sizeof(buf), file, 0);
			output_stream=fopen(buf,"a+t");
		}
		if (!output_stream)
			output_stream=GH_DEFAULT_OUTPUT_STREAM;
		stream_initialized=1;
	}
	fprintf(output_stream,"GH: ");
	va_start(args, fmt);
	vfprintf(output_stream, fmt, args);
	va_end(args);
	fflush(output_stream);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10c8, %rsp           # imm = 0x10C8
movq %rsi, %rbx
movl %edi, %ebp
movq %rdx, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x30(%rsp)
movq %r9, 0x38(%rsp)
testb %al, %al
je 0x16d9
movaps %xmm0, 0x40(%rsp)
movaps %xmm1, 0x50(%rsp)
movaps %xmm2, 0x60(%rsp)
movaps %xmm3, 0x70(%rsp)
movaps %xmm4, 0x80(%rsp)
movaps %xmm5, 0x90(%rsp)
movaps %xmm6, 0xa0(%rsp)
movaps %xmm7, 0xb0(%rsp)
movl 0x29c9(%rip), %eax      # 0x40a8
testl %eax, %eax
jns 0x16f8
leaq 0xba3(%rip), %rdi       # 0x228d
pushq $0x2
popq %rsi
callq 0x1f1e
movl %eax, 0x29b0(%rip)      # 0x40a8
cmpl %ebp, %eax
jl 0x1921
cmpb $0x1, 0x2a29(%rip)      # 0x4130
jne 0x1715
movq 0x2a18(%rip), %rcx      # 0x4128
jmp 0x18ca
leaq 0xb7c(%rip), %rdi       # 0x2298
callq 0x1030
testq %rax, %rax
je 0x18a6
movq %rax, %r14
leaq 0xc0(%rsp), %rdx
movb $0x0, 0xfff(%rdx)
movq %rsp, %r12
leaq 0xb6e(%rip), %rbp       # 0x22b4
leaq 0xb64(%rip), %r15       # 0x22b1
leaq 0xb6b(%rip), %rsi       # 0x22bf
xorl %r13d, %r13d
incq %r14
movb $0x1, %al
movq %r14, %rcx
cmpq $0xffe, %r13            # imm = 0xFFE
ja 0x187d
movq %rcx, %r14
movsbl -0x1(%rcx), %r8d
testl %r8d, %r8d
je 0x187d
testb $0x1, %al
je 0x179a
leaq 0x1(%r14), %rcx
xorl %eax, %eax
cmpb $0x25, %r8b
je 0x175f
movb %r8b, 0xc0(%rsp,%r13)
incq %r13
jmp 0x1757
movzbl %r8b, %eax
cmpl $0x74, %eax
je 0x1810
cmpl $0x63, %eax
je 0x17c4
cmpl $0x70, %eax
je 0x17dd
cmpl $0x25, %eax
jne 0x184f
movb $0x25, 0xc0(%rsp,%r13)
incq %r13
jmp 0x1757
leaq 0xc0(%rsp), %rdi
movq %rsi, %r12
movq %r13, %rsi
movq %r15, %rcx
xorl %r8d, %r8d
jmp 0x1860
movq %r15, %r12
movq %rdx, %r15
movq %rsi, %rbp
callq 0x1070
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rcx
movl %eax, %r8d
xorl %eax, %eax
callq 0x1f3e
movq %rbp, %rsi
movq %r15, %rdx
movq %r12, %r15
leaq 0xaa6(%rip), %rbp       # 0x22b4
jmp 0x1872
movq %rdx, %r15
xorl %edi, %edi
movq %r12, %rsi
callq 0x1060
movq (%rsp), %r8
movq 0x8(%rsp), %r9
movq %r15, %rdi
movq %r13, %rsi
movq %rbp, %rcx
xorl %eax, %eax
callq 0x1f3e
leaq 0xa82(%rip), %rsi       # 0x22bf
movq %r15, %rdx
leaq 0xa6a(%rip), %r15       # 0x22b1
movq %rax, %r13
jmp 0x1757
leaq 0xc0(%rsp), %rdi
movq %rsi, %r12
movq %r13, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0x1f3e
movq %r12, %rsi
leaq 0xc0(%rsp), %rdx
movq %rsp, %r12
movq %rax, %r13
jmp 0x1757
movb $0x0, 0xc0(%rsp,%r13)
leaq 0xa1b(%rip), %rsi       # 0x22a8
leaq 0xc0(%rsp), %rdi
callq 0x10e0
movq %rax, %rcx
movq %rax, 0x2884(%rip)      # 0x4128
jmp 0x18ad
movq 0x287b(%rip), %rcx      # 0x4128
testq %rcx, %rcx
jne 0x18c3
movq 0x2737(%rip), %rax      # 0x3ff0
movq (%rax), %rcx
movq %rcx, 0x2865(%rip)      # 0x4128
movb $0x1, 0x2866(%rip)      # 0x4130
leaq 0x9db(%rip), %rdi       # 0x22ac
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
callq 0x1100
movabsq $0x3000000010, %rax     # imm = 0x3000000010
leaq 0xc0(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x1100(%rsp), %rax
movq %rax, 0x8(%rdx)
leaq 0x10(%rsp), %rax
movq %rax, 0x10(%rdx)
movq 0x281b(%rip), %rdi      # 0x4128
movq %rbx, %rsi
callq 0x10f0
movq 0x280c(%rip), %rdi      # 0x4128
callq 0x10d0
addq $0x10c8, %rsp           # imm = 0x10C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq