	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function context_choose_pixel_format
_context_choose_pixel_format:           ## @context_choose_pixel_format
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movl	(%rax), %ebx
	movl	48(%rdx), %edi
	callq	_debug_d3dformat
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	48(%r14), %edi
	callq	_debug_d3dformat
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	movl	%r12d, -68(%rbp)                ## 4-byte Spill
	movl	%r12d, %edx
	movq	%r14, %r12
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%eax, %r8d
	movq	-88(%rbp), %r9                  ## 8-byte Reload
	movq	%r15, %r14
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_TRACE
	testq	%rbx, %rbx
	je	LBB0_24
## %bb.1:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rax
	movq	8(%rax), %rax
	movq	_WGL_TYPE_RGBA_ARB@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$5, %rbx
	leaq	(%rbx,%rbx,2), %rdx
	xorl	%esi, %esi
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_4
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 72(%rax,%rsi)
	je	LBB0_19
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$96, %rsi
	cmpq	%rsi, %rdx
	je	LBB0_23
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rcx, (%rax,%rsi)
	jne	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 88(%rax,%rsi)
	je	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 80(%rax,%rsi)
	je	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rax,%rsi), %r12
	movq	(%r14), %rbx
	cmpq	%rbx, %r12
	jl	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%rax,%rsi), %r9
	movq	8(%r14), %r11
	cmpq	%r11, %r9
	jl	LBB0_3
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	24(%rax,%rsi), %r10
	movq	16(%r14), %r15
	cmpq	%r15, %r10
	jl	LBB0_2
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	32(%rax,%rsi), %r8
	movq	24(%r14), %rdi
	cmpq	%rdi, %r8
	jl	LBB0_2
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	movq	%r8, -112(%rbp)                 ## 8-byte Spill
	movq	40(%rax,%rsi), %r13
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	32(%rdi), %r8
	cmpq	%r8, %r13
	jl	LBB0_2
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r8, -96(%rbp)                  ## 8-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	40(%rdi), %r13
	testq	%r13, %r13
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%r13, 48(%rax,%rsi)
	jne	LBB0_2
	jmp	LBB0_16
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r8d, %r8d
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	cmpq	%rdi, -64(%rbp)                 ## 8-byte Folded Reload
	sete	%r8b
	xorl	%edi, %edi
	cmpq	%r13, 48(%rax,%rsi)
	sete	%dil
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	cmpq	%rdi, -112(%rbp)                ## 8-byte Folded Reload
	sete	%r13b
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leal	(%r8,%rdi,2), %edi
	leal	(%rdi,%r13,4), %r8d
	incl	%r8d
	cmpq	$0, -88(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_4 Depth=1
	leal	8(%r8), %edi
	cmpq	$0, 64(%rax,%rsi)
	cmovel	%r8d, %edi
	movl	%edi, %r8d
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=1
	xorq	%rbx, %r12
	xorq	%r11, %r9
	orq	%r12, %r9
	xorq	%r15, %r10
	leal	16(%r8), %edi
	orq	%r9, %r10
	cmovnel	%r8d, %edi
	cmpl	-52(%rbp), %edi                 ## 4-byte Folded Reload
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jbe	LBB0_3
## %bb.22:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	56(%rax,%rsi), %r15d
	movl	%edi, -52(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
LBB0_23:
	testl	%r15d, %r15d
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_25
LBB0_24:
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	leaq	-168(%rbp), %rbx
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_memset
	movabsq	$4294967352, %rax               ## imm = 0x100000038
	movq	%rax, -168(%rbp)
	movq	_PFD_SUPPORT_OPENGL@GOTPCREL(%rip), %rax
	movq	_PFD_DOUBLEBUFFER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_PFD_DRAW_TO_WINDOW@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -160(%rbp)
	movq	_PFD_TYPE_RGBA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -116(%rbp)
	movq	24(%r14), %rax
	movq	%rax, -152(%rbp)
	addq	(%r14), %rax
	addq	8(%r14), %rax
	addq	16(%r14), %rax
	movq	%rax, -144(%rbp)
	movups	32(%r12), %xmm0
	movups	%xmm0, -136(%rbp)
	movq	_PFD_MAIN_PLANE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -120(%rbp)
	movl	-68(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	callq	_ChoosePixelFormat
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_26
LBB0_25:
	movl	48(%r14), %edi
	callq	_debug_d3dformat
	movl	%eax, %ebx
	movl	48(%r12), %edi
	callq	_debug_d3dformat
	leaq	L_.str.3(%rip), %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_TRACE
	movl	%r15d, %r13d
	jmp	LBB0_27
LBB0_26:
	leaq	L_.str.2(%rip), %rdi
	callq	_ERR
LBB0_27:
	movl	%r13d, %eax
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device %p, dc %p, color_format %s, ds_format %s, aux_buffers %#x.\n"

	.comm	_WGL_TYPE_RGBA_ARB,8,3          ## @WGL_TYPE_RGBA_ARB
L_.str.1:                               ## @.str.1
	.asciz	"Trying to locate a compatible pixel format because an exact match failed.\n"

	.comm	_PFD_SUPPORT_OPENGL,4,2         ## @PFD_SUPPORT_OPENGL
	.comm	_PFD_DOUBLEBUFFER,4,2           ## @PFD_DOUBLEBUFFER
	.comm	_PFD_DRAW_TO_WINDOW,4,2         ## @PFD_DRAW_TO_WINDOW
	.comm	_PFD_TYPE_RGBA,4,2              ## @PFD_TYPE_RGBA
	.comm	_PFD_MAIN_PLANE,4,2             ## @PFD_MAIN_PLANE
L_.str.2:                               ## @.str.2
	.asciz	"Can't find a suitable pixel format.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Found iPixelFormat=%d for ColorFormat=%s, DepthStencilFormat=%s.\n"

	.no_dead_strip	_context_choose_pixel_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function context_choose_pixel_format
lCPI0_0:
	.long	56                              ; 0x38
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_context_choose_pixel_format:           ; @context_choose_pixel_format
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x24, x0
	ldr	x8, [x0]
	ldr	w25, [x8]
	ldr	w0, [x2, #48]
	bl	_debug_d3dformat
	mov	x22, x0
	ldr	w0, [x19, #48]
	bl	_debug_d3dformat
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x0, x23, [sp, #24]
	stp	x21, x22, [sp, #8]
	str	x24, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	cbz	w25, LBB0_19
; %bb.1:
	mov	w22, #0
	mov	w9, #0
	ldr	x8, [x24]
	ldr	x10, [x8, #8]
Lloh2:
	adrp	x8, _WGL_TYPE_RGBA_ARB@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WGL_TYPE_RGBA_ARB@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x10, x10, #48
	mov	w11, #1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x5, [x10, #24]
	cbz	x5, LBB0_14
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x10, #96
	subs	x25, x25, #1
	b.eq	LBB0_18
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x12, [x10, #-48]
	cmp	x12, x8
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x12, [x10, #40]
	cbz	x12, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x12, [x10, #32]
	cbz	x12, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldur	x12, [x10, #-40]
	ldr	x13, [x20]
	cmp	x12, x13
	b.lt	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldur	x14, [x10, #-32]
	ldr	x15, [x20, #8]
	cmp	x14, x15
	b.lt	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldur	x16, [x10, #-24]
	ldr	x17, [x20, #16]
	cmp	x16, x17
	b.lt	LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldur	x0, [x10, #-16]
	ldr	x1, [x20, #24]
	cmp	x0, x1
	b.lt	LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldur	x2, [x10, #-8]
	ldr	x3, [x19, #32]
	cmp	x2, x3
	b.lt	LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x4, [x19, #40]
	cbz	x4, LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x5, [x10]
	cmp	x5, x4
	b.eq	LBB0_2
	b	LBB0_3
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x2, x3
	cinc	w2, w11, eq
	ldr	x3, [x10]
	add	w5, w2, #2
	cmp	x3, x4
	csel	w2, w5, w2, eq
	add	w3, w2, #4
	cmp	x0, x1
	csel	w0, w3, w2, eq
	cbz	x23, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x10, #16]
	add	w2, w0, #8
	cmp	x1, #0
	csel	w0, w0, w2, eq
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x16, x17
	ccmp	x14, x15, #0, eq
	ccmp	x12, x13, #0, eq
	add	w12, w0, #16
	csel	w12, w12, w0, eq
	cmp	w12, w9
	b.ls	LBB0_3
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w22, [x10, #8]
	mov	x9, x12
	b	LBB0_3
LBB0_18:
	cbnz	w22, LBB0_20
LBB0_19:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #56
	bl	_memset
Lloh7:
	adrp	x8, lCPI0_0@PAGE
Lloh8:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
Lloh9:
	adrp	x8, _PFD_SUPPORT_OPENGL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PFD_SUPPORT_OPENGL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _PFD_DOUBLEBUFFER@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PFD_DOUBLEBUFFER@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _PFD_DRAW_TO_WINDOW@GOTPAGE
Lloh16:
	ldr	x10, [x10, _PFD_DRAW_TO_WINDOW@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh17:
	ldr	w9, [x10]
	orr	w8, w8, w9
	str	w8, [sp, #48]
	ldp	x8, x9, [x20]
	ldp	x11, x10, [x20, #16]
	add	x8, x8, x10
	add	x8, x8, x9
Lloh18:
	adrp	x9, _PFD_TYPE_RGBA@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PFD_TYPE_RGBA@GOTPAGEOFF]
	str	d0, [sp, #40]
Lloh20:
	ldr	w9, [x9]
	add	x8, x8, x11
	stp	x10, x8, [sp, #56]
	ldr	q0, [x19, #32]
	stur	q0, [sp, #72]
Lloh21:
	adrp	x8, _PFD_MAIN_PLANE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PFD_MAIN_PLANE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	stp	w8, w9, [sp, #88]
	add	x1, sp, #40
	mov	x0, x21
	bl	_ChoosePixelFormat
	mov	x22, x0
	cbz	w0, LBB0_21
LBB0_20:
	ldr	w0, [x20, #48]
	bl	_debug_d3dformat
	mov	x20, x0
	ldr	w0, [x19, #48]
	bl	_debug_d3dformat
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x20, x0, [sp, #8]
	str	x22, [sp]
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_TRACE
	b	LBB0_22
LBB0_21:
Lloh26:
	adrp	x0, l_.str.2@PAGE
Lloh27:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ERR
LBB0_22:
	mov	x0, x22
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdrp	Lloh7, Lloh9
	.loh AdrpLdr	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device %p, dc %p, color_format %s, ds_format %s, aux_buffers %#x.\n"

	.comm	_WGL_TYPE_RGBA_ARB,8,3          ; @WGL_TYPE_RGBA_ARB
l_.str.1:                               ; @.str.1
	.asciz	"Trying to locate a compatible pixel format because an exact match failed.\n"

	.comm	_PFD_SUPPORT_OPENGL,4,2         ; @PFD_SUPPORT_OPENGL
	.comm	_PFD_DOUBLEBUFFER,4,2           ; @PFD_DOUBLEBUFFER
	.comm	_PFD_DRAW_TO_WINDOW,4,2         ; @PFD_DRAW_TO_WINDOW
	.comm	_PFD_TYPE_RGBA,4,2              ; @PFD_TYPE_RGBA
	.comm	_PFD_MAIN_PLANE,4,2             ; @PFD_MAIN_PLANE
l_.str.2:                               ; @.str.2
	.asciz	"Can't find a suitable pixel format.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Found iPixelFormat=%d for ColorFormat=%s, DepthStencilFormat=%s.\n"

	.no_dead_strip	_context_choose_pixel_format
.subsections_via_symbols
