// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/opengl/ctx-x11.cpp
// Function: aropengl_base::context::create(unsigned int, unsigned int, unsigned long, unsigned long*, unsigned int)
aropengl::context* aropengl::context::create(uint32_t width, uint32_t height, uintptr_t parent, uintptr_t* window, uint32_t flags)
{
	aropengl_x11* ret = new aropengl_x11();
	if (ret->init(width, height, parent, window, flags)) return ret;
	
	delete ret;
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movl %r8d, 0x8(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdx, %r13
movl %esi, 0xc(%rsp)
movl %edi, %r12d
movl $0x20, %edi
callq 0x3340
movq %rax, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
leaq 0x2f5a5(%rip), %rax     # 0x457a0
movq %rax, (%rbx)
movups %xmm0, 0x8(%rbx)
movb $0x0, 0x18(%rbx)
leaq 0x19995(%rip), %rdi     # 0x2fba2
movl $0x1, %esi
callq 0x34c0
movq %rax, 0x301ea(%rip)     # 0x46408
testq %rax, %rax
je 0x16272
movq %rbx, %r14
addq $0x8, %r14
leaq 0x1997f(%rip), %rbp     # 0x2fbb0
leaq 0x30180(%rip), %r15     # 0x463b8
movq 0x301c9(%rip), %rdi     # 0x46408
movq %rbp, %rsi
callq 0x3330
movq %rax, (%r15)
testq %rax, %rax
je 0x16272
addq $0x8, %r15
movq %rbp, %rdi
callq 0x30f0
addq %rax, %rbp
incq %rbp
cmpb $0x0, (%rbp)
jne 0x16238
callq *0x3016b(%rip)          # 0x463d8
testq %rax, %rax
je 0x16292
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
xorl %ebx, %ebx
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
leaq 0x14(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x10(%rsp), %rdx
movl %eax, (%rdx)
leaq 0x3009f(%rip), %rbp     # 0x46348
movq (%rbp), %rdi
callq *0x3011d(%rip)          # 0x463d0
testl %eax, %eax
je 0x16272
cmpl $0x1, 0x14(%rsp)
jne 0x16272
cmpl $0x3, 0x10(%rsp)
jl 0x16272
movaps 0x19894(%rip), %xmm0    # 0x2fb60
leaq 0x50(%rsp), %rdx
movaps %xmm0, 0x20(%rdx)
movaps 0x19874(%rip), %xmm0    # 0x2fb50
movaps %xmm0, 0x10(%rdx)
movaps 0x19859(%rip), %xmm0    # 0x2fb40
movaps %xmm0, (%rdx)
movl $0x0, 0x30(%rdx)
movq (%rbp), %rdi
movl 0x8(%rbp), %esi
leaq 0x2c(%rsp), %rcx
callq *0x300dd(%rip)          # 0x463e0
testq %rax, %rax
je 0x16272
movq (%rax), %r15
movq %rax, %rdi
callq 0x3480
movq (%rbp), %rdi
movq %r15, 0x18(%rsp)
movq %r15, %rsi
callq *0x300bf(%rip)          # 0x463e8
movq %rax, %r15
movq (%rbp), %rdi
movq (%rax), %rdx
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x31e0
leaq 0x88(%rsp), %r10
movq %rax, 0x60(%r10)
xorl %eax, %eax
movq %rax, (%r10)
movq %rax, 0x18(%r10)
movq $0x8000, 0x48(%r10)     # imm = 0x8000
movq (%rbp), %rdi
movl 0x14(%r15), %eax
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r12d, %r8d
movl 0xc(%rsp), %r9d
pushq %r10
pushq $0x2808                 # imm = 0x2808
pushq (%r15)
pushq $0x1
pushq %rax
pushq $0x0
callq 0x35a0
addq $0x30, %rsp
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x16272
movq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq (%rbp), %rdi
movq 0xe8(%rsp), %rsi
callq 0x30a0
movq %r15, %rdi
callq 0x3480
leaq 0x197b6(%rip), %rdi     # 0x2fb74
callq *0x2fff4(%rip)          # 0x463b8
testq %rax, %rax
je 0x16272
movl 0x8(%rsp), %esi
movl %esi, %ecx
andl $0xfff, %ecx            # imm = 0xFFF
leaq 0x30(%rsp), %r8
movl $0x2091, (%r8)          # imm = 0x2091
movl %ecx, %ecx
imulq $0x28f5c29, %rcx, %rdx  # imm = 0x28F5C29
shrq $0x20, %rdx
movl %edx, 0x4(%r8)
movl $0x2092, 0x8(%r8)       # imm = 0x2092
imulq $0x1999999a, %rcx, %rcx # imm = 0x1999999A
shrq $0x20, %rcx
imulq $0x1999999a, %rcx, %rdx # imm = 0x1999999A
shrq $0x20, %rdx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
subl %edx, %ecx
movl %ecx, 0xc(%r8)
movl $0x2094, 0x10(%r8)      # imm = 0x2094
shrl $0xc, %esi
andl $0x1, %esi
movl %esi, 0x14(%r8)
movl $0x0, 0x18(%r8)
movq (%rbp), %rdi
movq 0x18(%rsp), %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq *%rax
movq %rax, (%r14)
testq %rax, %rax
je 0x16272
movq (%rbx), %rax
movq %rbx, %rdi
movl $0x1, %esi
callq *(%rax)
leaq 0x19724(%rip), %rdi     # 0x2fb8f
callq *0x2ff47(%rip)          # 0x463b8
movq %rax, 0x2ff88(%rip)     # 0x46400
jmp 0x1627d
nop