// File: /workspace/github_cpp_makefile_star2_O3/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, 0x10(%rax)
leaq 0x2f31c(%rip), %rax     # 0x457a0
movq %rax, (%rbx)
movups %xmm0, 0x8(%rbx)
movb $0x0, 0x18(%rbx)
leaq 0x1972c(%rip), %rdi     # 0x2fbc2
movl $0x1, %esi
callq 0x34c0
movq %rax, 0x2ff61(%rip)     # 0x46408
testq %rax, %rax
je 0x164fb
movq %rbx, %r14
addq $0x8, %r14
leaq 0x19716(%rip), %rbp     # 0x2fbd0
leaq 0x2fef7(%rip), %r15     # 0x463b8
movq 0x2ff40(%rip), %rdi     # 0x46408
movq %rbp, %rsi
callq 0x3330
movq %rax, (%r15)
testq %rax, %rax
je 0x164fb
addq $0x8, %r15
movq %rbp, %rdi
callq 0x30f0
addq %rax, %rbp
incq %rbp
cmpb $0x0, (%rbp)
jne 0x164c1
callq *0x2fee2(%rip)          # 0x463d8
testq %rax, %rax
je 0x1651b
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 0x2fe16(%rip), %rbp     # 0x46348
movq (%rbp), %rdi
callq *0x2fe94(%rip)          # 0x463d0
testl %eax, %eax
je 0x164fb
cmpl $0x1, 0x14(%rsp)
jne 0x164fb
cmpl $0x3, 0x10(%rsp)
jl 0x164fb
movaps 0x1962b(%rip), %xmm0    # 0x2fb80
leaq 0x50(%rsp), %rdx
movaps %xmm0, 0x20(%rdx)
movaps 0x1960b(%rip), %xmm0    # 0x2fb70
movaps %xmm0, 0x10(%rdx)
movaps 0x195f0(%rip), %xmm0    # 0x2fb60
movaps %xmm0, (%rdx)
movl $0x0, 0x30(%rdx)
movq (%rbp), %rdi
movl 0x8(%rbp), %esi
leaq 0x2c(%rsp), %rcx
callq *0x2fe54(%rip)          # 0x463e0
testq %rax, %rax
je 0x164fb
movq (%rax), %r15
movq %rax, %rdi
callq 0x3480
movq (%rbp), %rdi
movq %r15, 0x18(%rsp)
movq %r15, %rsi
callq *0x2fe36(%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 0x164fb
movq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq (%rbp), %rdi
movq 0xe8(%rsp), %rsi
callq 0x30a0
movq %r15, %rdi
callq 0x3480
leaq 0x1954d(%rip), %rdi     # 0x2fb94
callq *0x2fd6b(%rip)          # 0x463b8
testq %rax, %rax
je 0x164fb
leaq 0x30(%rsp), %r8
movl $0x2091, (%r8)          # imm = 0x2091
movl 0x8(%rsp), %esi
movl %esi, %ecx
andl $0xfff, %ecx            # imm = 0xFFF
imull $0x51f, %ecx, %edx      # imm = 0x51F
shrl $0x11, %edx
movl %edx, 0x4(%r8)
movl $0x2092, 0x8(%r8)       # imm = 0x2092
imull $0x199a, %ecx, %ecx     # imm = 0x199A
shrl $0x10, %ecx
imull $0x199a, %ecx, %edx     # imm = 0x199A
shrl $0xf, %edx
andl $-0x2, %edx
leal (%rdx,%rdx,4), %edx
subl %edx, %ecx
movzwl %cx, %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 0x164fb
movq (%rbx), %rax
movq %rbx, %rdi
movl $0x1, %esi
callq *(%rax)
leaq 0x194bf(%rip), %rdi     # 0x2fbaf
callq *0x2fcc2(%rip)          # 0x463b8
movq %rax, 0x2fd03(%rip)     # 0x46400
jmp 0x16506