// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x20
popq %rdi
callq 0x3340
movq %rax, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
leaq 0x2e79e(%rip), %rax     # 0x40770
movq %rax, (%rbx)
movups %xmm0, 0x8(%rbx)
movb $0x0, 0x18(%rbx)
leaq 0x16b3e(%rip), %rdi     # 0x28b22
pushq $0x1
popq %rsi
callq 0x34c0
movq %rax, 0x2f415(%rip)     # 0x41408
testq %rax, %rax
je 0x12049
movq %rbx, %r14
addq $0x8, %r14
leaq 0x2f3b2(%rip), %r15     # 0x413b8
leaq 0x16b23(%rip), %rbp     # 0x28b30
cmpb $0x0, (%rbp)
je 0x1203e
movq 0x2f3ee(%rip), %rdi     # 0x41408
movq %rbp, %rsi
callq 0x3330
movq %rax, (%r15)
testq %rax, %rax
je 0x12049
addq $0x8, %r15
movq %rbp, %rdi
callq 0x30f0
addq %rax, %rbp
incq %rbp
jmp 0x1200d
callq *0x2f394(%rip)          # 0x413d8
testq %rax, %rax
je 0x12069
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
leaq 0x14(%rsp), %rsi
andl $0x0, (%rsi)
leaq 0x10(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x2f2c8(%rip), %rbp     # 0x41348
movq (%rbp), %rdi
callq *0x2f346(%rip)          # 0x413d0
testl %eax, %eax
je 0x12049
cmpl $0x1, 0x14(%rsp)
jne 0x12049
cmpl $0x3, 0x10(%rsp)
jl 0x12049
movaps 0x16a3d(%rip), %xmm0    # 0x28ae0
leaq 0x50(%rsp), %rdx
movaps %xmm0, 0x20(%rdx)
movaps 0x16a1d(%rip), %xmm0    # 0x28ad0
movaps %xmm0, 0x10(%rdx)
andl $0x0, 0x30(%rdx)
movaps 0x169fe(%rip), %xmm0    # 0x28ac0
movaps %xmm0, (%rdx)
movq (%rbp), %rdi
movl 0x8(%rbp), %esi
leaq 0x2c(%rsp), %rcx
callq *0x2f309(%rip)          # 0x413e0
testq %rax, %rax
je 0x12049
movq (%rax), %r15
movq %rax, %rdi
callq 0x3480
movq (%rbp), %rdi
movq %r15, 0x18(%rsp)
movq %r15, %rsi
callq *0x2f2eb(%rip)          # 0x413e8
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)
andq $0x0, (%r10)
andq $0x0, 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 0x12049
movq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq (%rbp), %rdi
movq 0xe8(%rsp), %rsi
callq 0x30a0
movq %r15, %rdi
callq 0x3480
leaq 0x16962(%rip), %rdi     # 0x28af4
callq *0x2f220(%rip)          # 0x413b8
testq %rax, %rax
je 0x12049
movq %rax, %r9
leaq 0x30(%rsp), %r8
movl $0x2091, (%r8)          # imm = 0x2091
movl 0x8(%rsp), %edi
movl %edi, %ecx
andl $0xfff, %ecx            # imm = 0xFFF
movw $0x64, %si
movl %ecx, %eax
xorl %edx, %edx
divw %si
movzwl %ax, %eax
movl %eax, 0x4(%r8)
movl $0x2092, 0x8(%r8)       # imm = 0x2092
movw $0xa, %si
movl %ecx, %eax
xorl %edx, %edx
divw %si
xorl %edx, %edx
divw %si
movzwl %dx, %eax
movl %eax, 0xc(%r8)
movl $0x2094, 0x10(%r8)      # imm = 0x2094
shrl $0xc, %edi
andl $0x1, %edi
movl %edi, 0x14(%r8)
andl $0x0, 0x18(%r8)
movq (%rbp), %rdi
pushq $0x1
popq %rcx
movq 0x18(%rsp), %rsi
xorl %edx, %edx
callq *%r9
movq %rax, (%r14)
testq %rax, %rax
je 0x12049
movq (%rbx), %rax
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq *(%rax)
leaq 0x168dc(%rip), %rdi     # 0x28b0f
callq *0x2f17f(%rip)          # 0x413b8
movq %rax, 0x2f1c0(%rip)     # 0x41400
jmp 0x12054
nop