// File: /workspace/github_c_makefile_star2_O3/derhass[P]glx_hook/glx_hook.c
// Function: override_create_context
static GLXContext override_create_context(Display *dpy, XVisualInfo *vis, const GLXFBConfig *fbconfig, GLXContext shareList, Bool direct, const int *attribs)
{
	GLXFBConfig internal_fbconfig;

	pthread_mutex_lock(&ctx_creation_opts.mutex);
	if (!(ctx_creation_opts.flags & GH_GLCTX_CREATE_INITIALIZED)) {
		context_creation_opts_init(&ctx_creation_opts);
		ctx_creation_opts.flags |= GH_GLCTX_CREATE_INITIALIZED;
	}
	pthread_mutex_unlock(&ctx_creation_opts.mutex);

	if (need_creation_override(&ctx_creation_opts)) {
		GLXContext ctx = NULL;
		int *attribs_override = get_override_attributes(&ctx_creation_opts, attribs);
		if (!attribs_override) {
			GH_verbose(GH_MSG_WARNING, "failed to generate context creation override attributes!\n");
			return NULL;
		}
		if (!fbconfig) {
			if (!vis) {
				GH_verbose(GH_MSG_WARNING, "create context attempt without Visual and FBConfig!\n");
				free(attribs_override);
				return NULL;	
			}
			/* find FBConfig vor Visual ... */
			fbconfig=get_fbconfig_for_visual(dpy, vis, &internal_fbconfig);
			if (!fbconfig) {
				GH_verbose(GH_MSG_WARNING, "create context: failed to get fbconfig for visual!\n");
				free(attribs_override);
				return NULL;	
			}
		}
		GH_GET_GL_PROC(glXCreateContextAttribsARB);
		if (GH_glXCreateContextAttribsARB) {
			ctx=GH_glXCreateContextAttribsARB(dpy, *fbconfig, shareList, direct, attribs_override);
		} else {
			GH_verbose(GH_MSG_WARNING, "failed to get glXCreateContextAttribsARB\n");
		}
		if (ctx == NULL) {
			GH_verbose(GH_MSG_WARNING, "overridden context creation failed!\n");
		} else {
			GH_verbose(GH_MSG_INFO, "created context %p with overriden attributes!\n", ctx);
		}
		free(attribs_override);
		return ctx;

	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %rbp
movl %r8d, 0x34(%rsp)
movq %rcx, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdi, 0x28(%rsp)
leaq 0x8090(%rip), %rdi      # 0xb100
callq 0x21a0
testb $0x1, 0x80ac(%rip)      # 0xb128
jne 0x3308
xorps %xmm0, %xmm0
movups %xmm0, 0x80b8(%rip)     # 0xb144
movl $0xffffffff, 0x80be(%rip) # imm = 0xFFFFFFFF
leaq 0x4593(%rip), %rdi      # 0x7630
xorl %esi, %esi
callq 0x5e3e
testl %eax, %eax
je 0x30b9
movabsq $0x200000001, %rax      # imm = 0x200000001
movq %rax, 0x8093(%rip)      # 0xb14c
leaq 0x4591(%rip), %rdi      # 0x7651
xorl %esi, %esi
callq 0x5e3e
cmpl $0x2, %eax
je 0x30e4
cmpl $0x1, %eax
jne 0x30eb
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x806a(%rip)      # 0xb14c
jmp 0x30eb
orb $0x2, 0x803d(%rip)      # 0xb128
leaq 0x4582(%rip), %rdi      # 0x7674
xorl %esi, %esi
callq 0x5e3e
testl %eax, %eax
je 0x310b
andb $-0x3, 0x8040(%rip)     # 0xb144
orb $0x2, 0x803d(%rip)      # 0xb148
leaq 0x458e(%rip), %rdi      # 0x76a0
xorl %esi, %esi
callq 0x5e3e
testl %eax, %eax
je 0x312b
andb $-0x2, 0x8020(%rip)     # 0xb144
orb $0x1, 0x801d(%rip)      # 0xb148
leaq 0x4591(%rip), %rdi      # 0x76c3
xorl %esi, %esi
callq 0x5e3e
testl %eax, %eax
je 0x314b
orb $0x2, 0x8000(%rip)      # 0xb144
andb $-0x3, 0x7ffd(%rip)     # 0xb148
leaq 0x459a(%rip), %rdi      # 0x76ec
xorl %esi, %esi
callq 0x5e3e
testl %eax, %eax
je 0x316b
orb $0x1, 0x7fe0(%rip)      # 0xb144
andb $-0x2, 0x7fdd(%rip)     # 0xb148
leaq 0x459a(%rip), %rdi      # 0x770c
xorl %esi, %esi
callq 0x5e3e
testl %eax, %eax
je 0x3187
movl $0x1, 0x7fcd(%rip)      # 0xb154
leaq 0x45a1(%rip), %rdi      # 0x772f
xorl %esi, %esi
callq 0x5e3e
testl %eax, %eax
je 0x31a3
movl $0x0, 0x7fb1(%rip)      # 0xb154
movl 0x7f83(%rip), %esi      # 0xb12c
leaq 0x459f(%rip), %rdi      # 0x774f
callq 0x5e3e
movl %eax, 0x7f71(%rip)      # 0xb12c
movl 0x7f6f(%rip), %esi      # 0xb130
leaq 0x45a1(%rip), %rdi      # 0x7769
callq 0x5e3e
movl %eax, 0x7f5d(%rip)      # 0xb130
movl 0x7f5b(%rip), %esi      # 0xb134
leaq 0x45a3(%rip), %rdi      # 0x7783
callq 0x5e3e
movl %eax, 0x7f49(%rip)      # 0xb134
movl 0x7f47(%rip), %esi      # 0xb138
leaq 0x45a9(%rip), %rdi      # 0x77a1
callq 0x5e3e
movl %eax, 0x7f35(%rip)      # 0xb138
movl 0x7f33(%rip), %esi      # 0xb13c
leaq 0x45af(%rip), %rdi      # 0x77bf
callq 0x5e3e
movl %eax, 0x7f21(%rip)      # 0xb13c
movl 0x7f1f(%rip), %esi      # 0xb140
leaq 0x45b5(%rip), %rdi      # 0x77dd
callq 0x5e3e
movl %eax, 0x7f0d(%rip)      # 0xb140
movl 0x7f0b(%rip), %esi      # 0xb144
leaq 0x45bb(%rip), %rdi      # 0x77fb
callq 0x5e3e
movl %eax, 0x7ef9(%rip)      # 0xb144
movl 0x7ef7(%rip), %esi      # 0xb148
leaq 0x45c0(%rip), %rdi      # 0x7818
callq 0x5e3e
movl %eax, 0x7ee5(%rip)      # 0xb148
movl 0x7ee3(%rip), %esi      # 0xb14c
leaq 0x45c6(%rip), %rdi      # 0x7836
callq 0x5e3e
movl %eax, 0x7ed1(%rip)      # 0xb14c
movl 0x7ecf(%rip), %esi      # 0xb150
leaq 0x45d2(%rip), %rdi      # 0x785a
callq 0x5e3e
movl %eax, %r10d
movl %eax, 0x7eba(%rip)      # 0xb150
movl 0x7e90(%rip), %edx      # 0xb12c
movl 0x7e8e(%rip), %ecx      # 0xb130
movl 0x7e8b(%rip), %r8d      # 0xb134
movl 0x7e88(%rip), %r9d      # 0xb138
movl 0x7e85(%rip), %r11d     # 0xb13c
movl 0x7e83(%rip), %ebx      # 0xb140
movl 0x7e80(%rip), %r14d     # 0xb144
movl 0x7e7d(%rip), %r15d     # 0xb148
movl 0x7e7a(%rip), %r12d     # 0xb14c
movl 0x7e7b(%rip), %r13d     # 0xb154
subq $0x8, %rsp
leaq 0x459b(%rip), %rsi      # 0x787f
movl $0x4, %edi
xorl %eax, %eax
pushq %r13
pushq %r10
pushq %r12
pushq %r15
pushq %r14
pushq %rbx
pushq %r11
callq 0x2cac
addq $0x40, %rsp
orb $0x1, 0x7e20(%rip)      # 0xb128
leaq 0x7df1(%rip), %rdi      # 0xb100
callq 0x2120
cmpl $0x0, 0x7e11(%rip)      # 0xb12c
jns 0x337a
cmpl $0x0, 0x7e0c(%rip)      # 0xb130
jns 0x337a
cmpl $0x0, 0x7e07(%rip)      # 0xb134
jns 0x337a
cmpl $0x0, 0x7e02(%rip)      # 0xb138
jns 0x337a
cmpl $0x0, 0x7dfd(%rip)      # 0xb13c
jns 0x337a
cmpl $0x0, 0x7df8(%rip)      # 0xb140
jns 0x337a
movl 0x7df8(%rip), %eax      # 0xb148
orl 0x7dee(%rip), %eax      # 0xb144
jne 0x337a
cmpl $0x0, 0x7ded(%rip)      # 0xb14c
jne 0x337a
cmpl $0x0, 0x7de8(%rip)      # 0xb150
jne 0x337a
cmpl $0x0, 0x7de3(%rip)      # 0xb154
jns 0x337a
xorl %ebx, %ebx
jmp 0x3adc
leaq 0x457f(%rip), %rsi      # 0x7900
xorl %r14d, %r14d
movl $0x3, %edi
xorl %eax, %eax
callq 0x2cac
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
movl $0x1, %ebx
testq %rbp, %rbp
je 0x34b3
movl (%rbp), %r12d
movl $0x0, %eax
movq %rax, 0x10(%rsp)
movl $0x0, %r15d
movl $0x1, %r13d
movl $0x0, 0x8(%rsp)
testl %r12d, %r12d
je 0x34ea
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
movl $0x1, 0x4(%rsp)
xorl %ebx, %ebx
xorl %r14d, %r14d
movq $0x0, 0x10(%rsp)
xorl %r15d, %r15d
movl $0x1, 0x1c(%rsp)
movl $0x0, 0x8(%rsp)
movl %r15d, %r13d
movl %ebx, %eax
shlq $0x2, %rax
orq $0x4, %rax
movl (%rbp,%rax), %r15d
movl $0x3, %edi
leaq 0x450c(%rip), %rsi      # 0x792c
movl %r12d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x2cac
cmpl $0x2093, %r12d          # imm = 0x2093
jle 0x3458
cmpl $0x2094, %r12d          # imm = 0x2094
je 0x3478
cmpl $0x31b3, %r12d          # imm = 0x31B3
je 0x347f
cmpl $0x9126, %r12d          # imm = 0x9126
jne 0x346a
movl %r15d, 0x1c(%rsp)
jmp 0x348b
cmpl $0x2091, %r12d          # imm = 0x2091
je 0x3486
cmpl $0x2092, %r12d          # imm = 0x2092
je 0x348e
movq 0x10(%rsp), %rax
incl %eax
movq %rax, 0x10(%rsp)
jmp 0x348b
movl %r15d, 0x8(%rsp)
jmp 0x348b
movl %r15d, 0xc(%rsp)
jmp 0x348b
movl %r15d, 0x4(%rsp)
movl %r13d, %r15d
movl 0x8(%rbp,%rbx,4), %r12d
incl %r14d
addq $0x2, %rbx
testl %r12d, %r12d
jne 0x3402
movl 0x4(%rsp), %ebx
cmpl $0x3, %ebx
jge 0x34cf
movl 0x1c(%rsp), %r13d
jmp 0x34ea
movq $0x0, 0x10(%rsp)
xorl %r15d, %r15d
movl $0x1, %r13d
movl $0x0, 0x8(%rsp)
jmp 0x34ea
sete %al
cmpl $0x2, %r15d
setl %cl
andb %al, %cl
movl $0x3, %ebx
cmpb $0x1, %cl
movl 0x1c(%rsp), %r13d
jne 0x3512
testb $0x2, 0x7c37(%rip)      # 0xb128
je 0x350e
leaq 0x445a(%rip), %rsi      # 0x7954
movl $0x3, %edi
xorl %eax, %eax
callq 0x2cac
andl $-0x4, %r13d
orl $0x2, %r13d
movl %ebx, 0x4(%rsp)
movl 0x7c1c(%rip), %ecx      # 0xb134
testl %ecx, %ecx
js 0x3547
movl 0x4(%rsp), %r12d
cmpl %ecx, %r12d
jge 0x354c
leaq 0x4454(%rip), %rsi      # 0x7981
movl $0x3, %edi
movl %r12d, %edx
xorl %eax, %eax
callq 0x2cac
movl 0x7bf2(%rip), %ecx      # 0xb134
movl %ecx, %r12d
jmp 0x354c
movl 0x4(%rsp), %r12d
movl 0x7be6(%rip), %eax      # 0xb138
testl %eax, %eax
js 0x3583
testl %ecx, %ecx
js 0x355f
cmpl %ecx, %r12d
jg 0x3583
cmpl %eax, %r15d
jge 0x3583
leaq 0x444c(%rip), %rsi      # 0x79b7
movl $0x3, %edi
movl %r15d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x2cac
movl 0x7bb5(%rip), %r15d     # 0xb138
movl 0x7bb3(%rip), %ecx      # 0xb13c
testl %ecx, %ecx
js 0x35b1
cmpl %ecx, %r12d
jle 0x35b1
leaq 0x4454(%rip), %rsi      # 0x79ed
movl $0x3, %edi
movl %r12d, %edx
xorl %eax, %eax
callq 0x2cac
movl 0x7b8e(%rip), %ecx      # 0xb13c
movl %ecx, %r12d
movl 0x7b89(%rip), %eax      # 0xb140
testl %eax, %eax
js 0x35e8
testl %ecx, %ecx
js 0x35c4
cmpl %ecx, %r12d
jl 0x35e8
cmpl %eax, %r15d
jle 0x35e8
leaq 0x4453(%rip), %rsi      # 0x7a23
movl $0x3, %edi
movl %r15d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x2cac
movl 0x7b58(%rip), %r15d     # 0xb140
movl 0x7b3e(%rip), %ecx      # 0xb12c
testl %ecx, %ecx
js 0x360f
leaq 0x4460(%rip), %rsi      # 0x7a59
movl $0x3, %edi
movl %r12d, %edx
xorl %eax, %eax
callq 0x2cac
movl 0x7b1d(%rip), %r12d     # 0xb12c
movl 0x7b1b(%rip), %ecx      # 0xb130
testl %ecx, %ecx
js 0x3637
leaq 0x4469(%rip), %rsi      # 0x7a89
movl $0x3, %edi
movl %r15d, %edx
xorl %eax, %eax
callq 0x2cac
movl 0x7afb(%rip), %ebx      # 0xb130
jmp 0x363a
movl %r15d, %ebx
movl 0x7b04(%rip), %eax      # 0xb144
movl 0x7b01(%rip), %r15d     # 0xb148
movl %eax, %ecx
orl %r15d, %ecx
je 0x3675
movl 0x8(%rsp), %edx
orl %edx, %eax
notl %r15d
andl %eax, %r15d
leaq 0x4458(%rip), %rsi      # 0x7ab9
movl $0x3, %edi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x2cac
movl %r15d, 0x8(%rsp)
movl 0x7ad1(%rip), %eax      # 0xb14c
movl 0x7ace(%rip), %r15d     # 0xb150
movl %eax, %ecx
orl %r15d, %ecx
je 0x36ae
orl %r13d, %eax
notl %r15d
andl %eax, %r15d
leaq 0x444c(%rip), %rsi      # 0x7ae5
movl $0x3, %edi
movl %r13d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x2cac
movl %r15d, %r13d
movl 0x7aa0(%rip), %ecx      # 0xb154
movl %r13d, %r15d
testl %ecx, %ecx
js 0x36dc
leaq 0x4456(%rip), %rsi      # 0x7b18
movl $0x3, %edi
movl 0xc(%rsp), %edx
xorl %eax, %eax
callq 0x2cac
movl 0x7a7c(%rip), %eax      # 0xb154
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
leal 0xc(,%rax,2), %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x2130
testq %rax, %rax
je 0x376e
movq %rbp, 0x10(%rsp)
leaq 0x4482(%rip), %rsi      # 0x7b87
movl $0x3, %edi
movl %r12d, %edx
movl %ebx, %ecx
movq %rax, %r13
movl 0x8(%rsp), %ebp
movl %ebp, %r8d
movl %r15d, %r9d
xorl %eax, %eax
callq 0x2cac
movl $0x2091, (%r13)         # imm = 0x2091
movl %r12d, 0x4(%r13)
movl $0x2092, 0x8(%r13)      # imm = 0x2092
movl %ebx, 0xc(%r13)
movl $0x9126, 0x10(%r13)     # imm = 0x9126
movl %r15d, 0x14(%r13)
movl $0x2094, 0x18(%r13)     # imm = 0x2094
movl %ebp, 0x1c(%r13)
movl 0xc(%rsp), %eax
testl %eax, %eax
js 0x379b
movl $0x31b3, 0x20(%r13)     # imm = 0x31B3
movl %eax, 0x24(%r13)
movl $0xa, %eax
jmp 0x37a0
leaq 0x43d7(%rip), %rsi      # 0x7b4c
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x2cac
leaq 0x3d69(%rip), %rsi      # 0x74f3
movl $0x2, %edi
xorl %eax, %eax
callq 0x2cac
jmp 0x3adc
movl $0x8, %eax
movq 0x10(%rsp), %r9
testl %r14d, %r14d
je 0x37f5
movl %r14d, %ecx
xorl %edx, %edx
movl (%r9,%rdx,8), %esi
leal -0x2091(%rsi), %edi
cmpl $0x3, %edi
ja 0x37c3
cmpl $0x2, %edi
jne 0x37e9
cmpl $0x31b3, %esi           # imm = 0x31B3
je 0x37e9
cmpl $0x9126, %esi           # imm = 0x9126
je 0x37e9
movl 0x4(%r9,%rdx,8), %edi
movslq %eax, %r8
movl %esi, (%r13,%r8,4)
leal 0x2(%r8), %eax
movl %edi, 0x4(%r13,%r8,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x37af
cltq
jmp 0x37f7
movl %eax, %eax
movq $0x0, (%r13,%rax,4)
movq 0x48(%rsp), %r12
testq %r12, %r12
je 0x38cc
leaq 0x795b(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x799e(%rip)      # 0xb1c0
jne 0x386d
leaq 0x7945(%rip), %rbx      # 0xb170
movq %rbx, %rdi
callq 0x2120
leaq 0x38e8(%rip), %r14      # 0x7122
movq %r14, %rdi
callq 0x601b
movq %rax, %r15
leaq 0x3d4a(%rip), %rsi      # 0x7596
movl $0x4, %edi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x2cac
movq %rbx, %rdi
callq 0x21a0
movq %r15, 0x7953(%rip)      # 0xb1c0
leaq 0x78fc(%rip), %rdi      # 0xb170
callq 0x2120
cmpq $0x0, 0x793f(%rip)      # 0xb1c0
je 0x397c
movq 0x7932(%rip), %rax      # 0xb1c0
movq (%r12), %rsi
movq 0x28(%rsp), %rdi
movq 0x40(%rsp), %rdx
movl 0x34(%rsp), %ecx
movq %r13, %r8
callq *%rax
testq %rax, %rax
je 0x398f
movq %rax, %rbx
leaq 0x3d49(%rip), %rsi      # 0x7601
movl $0x3, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2cac
jmp 0x3ad4
cmpq $0x0, 0x38(%rsp)
je 0x399b
leaq 0x7891(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x7974(%rip)      # 0xb260
jne 0x3901
leaq 0x42c2(%rip), %rdi      # 0x7bb7
callq 0x3b35
movq %rax, 0x795f(%rip)      # 0xb260
leaq 0x7868(%rip), %rbx      # 0xb170
movq %rbx, %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x21a0
cmpq $0x0, 0x7948(%rip)      # 0xb268
jne 0x3935
leaq 0x429e(%rip), %rdi      # 0x7bc7
callq 0x3b35
movq %rax, 0x7933(%rip)      # 0xb268
leaq 0x7834(%rip), %rbx      # 0xb170
movq %rbx, %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x21a0
cmpq $0x0, 0x791c(%rip)      # 0xb270
jne 0x39ca
cmpq $0x0, 0x783a(%rip)      # 0xb198
je 0x39a7
movq 0x7831(%rip), %rax      # 0xb198
leaq 0x426e(%rip), %rsi      # 0x7bdc
movq $-0x1, %rdi
callq *%rax
movq %rax, %rbx
jmp 0x39c3
leaq 0x3c2f(%rip), %rsi      # 0x75b2
movl $0x2, %edi
xorl %eax, %eax
callq 0x2cac
leaq 0x3c46(%rip), %rsi      # 0x75dc
jmp 0x3ac6
leaq 0x3b8b(%rip), %rsi      # 0x752d
jmp 0x3ac6
leaq 0x3acf(%rip), %rsi      # 0x747d
leaq 0x4227(%rip), %rdx      # 0x7bdc
xorl %ebx, %ebx
movl $0x2, %edi
xorl %eax, %eax
callq 0x2cac
movq %rbx, 0x78a6(%rip)      # 0xb270
leaq 0x779f(%rip), %rdi      # 0xb170
callq 0x2120
cmpq $0x0, 0x7882(%rip)      # 0xb260
je 0x3aac
cmpq $0x0, 0x787c(%rip)      # 0xb268
je 0x3aac
cmpq $0x0, 0x7876(%rip)      # 0xb270
je 0x3aac
movq 0x7859(%rip), %rax      # 0xb260
leaq 0x24(%rsp), %rdx
movq 0x28(%rsp), %rdi
xorl %esi, %esi
callq *%rax
movq %rax, %rbx
testq %rax, %rax
je 0x3aee
cmpl $0x0, 0x24(%rsp)
jle 0x3aee
leaq 0x20(%rsp), %r15
leaq 0x41ed(%rip), %r12      # 0x7c25
leaq 0x4204(%rip), %rbp      # 0x7c43
xorl %r14d, %r14d
movl $0xffffffff, 0x20(%rsp) # imm = 0xFFFFFFFF
movq 0x7817(%rip), %rax      # 0xb268
movq (%rbx,%r14,8), %rsi
movq 0x28(%rsp), %rdi
movl $0x800b, %edx           # imm = 0x800B
movq %r15, %rcx
callq *%rax
testl %eax, %eax
je 0x3a79
movl $0x2, %edi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x2cac
jmp 0x3a9d
movl 0x20(%rsp), %ecx
movl $0x4, %edi
movq %r12, %rsi
movl %r14d, %edx
xorl %eax, %eax
callq 0x2cac
movl 0x20(%rsp), %ecx
movq 0x38(%rsp), %rax
cmpl 0x8(%rax), %ecx
je 0x3b01
incq %r14
movslq 0x24(%rsp), %rax
cmpq %rax, %r14
jl 0x3a42
jmp 0x3af3
leaq 0x412f(%rip), %rsi      # 0x7be2
movl $0x1, %edi
xorl %eax, %eax
callq 0x2cac
leaq 0x3a9c(%rip), %rsi      # 0x7562
xorl %ebx, %ebx
movl $0x2, %edi
xorl %eax, %eax
callq 0x2cac
movq %r13, %rdi
callq 0x2040
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %rbx, %rbx
je 0x3abf
movq 0x7776(%rip), %rax      # 0xb270
movq %rbx, %rdi
callq *%rax
jmp 0x3abf
leaq 0x4117(%rip), %rsi      # 0x7c1f
movl $0x3, %edi
movl %r14d, %edx
xorl %eax, %eax
callq 0x2cac
movq (%rbx,%r14,8), %rax
leaq 0x50(%rsp), %r12
movq %rax, (%r12)
movq 0x7745(%rip), %rax      # 0xb270
movq %rbx, %rdi
callq *%rax
jmp 0x380e