	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function context_restore_pixel_format
_context_restore_pixel_format:          ## @context_restore_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	cmpq	$0, 8(%rdi)
	je	LBB0_8
## %bb.1:
	movq	(%rbx), %rdi
	callq	_IsWindow
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movq	_WGL_WINE_PIXEL_FORMAT_PASSTHROUGH@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_7
## %bb.3:
	movq	(%rbx), %rdi
	movq	_DCX_USESTYLE@GOTPCREL(%rip), %rax
	movq	_DCX_CACHE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	xorl	%esi, %esi
	callq	_GetDCEx
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	%rax, %r15
	movq	8(%rbx), %rsi
	movq	%rax, %rdi
	callq	_wglSetPixelFormatWINE
	movl	%eax, %edi
	callq	_GL_EXTCALL
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	(%rbx), %rdx
	movq	8(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_ERR
LBB0_6:
	movq	(%rbx), %rdi
	movq	%r15, %rsi
	callq	_ReleaseDC
	jmp	LBB0_8
LBB0_7:
	movq	(%rbx), %rdx
	movq	8(%rbx), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
LBB0_8:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_WGL_WINE_PIXEL_FORMAT_PASSTHROUGH,8,3 ## @WGL_WINE_PIXEL_FORMAT_PASSTHROUGH
	.comm	_DCX_USESTYLE,4,2               ## @DCX_USESTYLE
	.comm	_DCX_CACHE,4,2                  ## @DCX_CACHE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wglSetPixelFormatWINE failed to restore pixel format %d on window %p.\n"

L_.str.1:                               ## @.str.1
	.asciz	"can't restore pixel format %d on window %p\n"

	.no_dead_strip	_context_restore_pixel_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function context_restore_pixel_format
_context_restore_pixel_format:          ; @context_restore_pixel_format
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_8
; %bb.1:
	ldr	x0, [x19]
	bl	_IsWindow
	cbz	x0, LBB0_8
; %bb.2:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _WGL_WINE_PIXEL_FORMAT_PASSTHROUGH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WGL_WINE_PIXEL_FORMAT_PASSTHROUGH@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_7
; %bb.3:
Lloh6:
	adrp	x8, _DCX_USESTYLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DCX_USESTYLE@GOTPAGEOFF]
	ldr	x0, [x19]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _DCX_CACHE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DCX_CACHE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w1, #0
	bl	_GetDCEx
	cbz	x0, LBB0_8
; %bb.4:
	mov	x21, x0
	ldr	x1, [x19, #8]
	bl	_wglSetPixelFormatWINE
	bl	_GL_EXTCALL
	mov	x20, x0
	cbnz	w0, LBB0_6
; %bb.5:
	ldp	x2, x1, [x19]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
LBB0_6:
	ldr	x0, [x19]
	mov	x1, x21
	bl	_ReleaseDC
	b	LBB0_8
LBB0_7:
	ldp	x2, x1, [x19]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
LBB0_8:
	stp	xzr, xzr, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_WGL_WINE_PIXEL_FORMAT_PASSTHROUGH,8,3 ; @WGL_WINE_PIXEL_FORMAT_PASSTHROUGH
	.comm	_DCX_USESTYLE,4,2               ; @DCX_USESTYLE
	.comm	_DCX_CACHE,4,2                  ; @DCX_CACHE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wglSetPixelFormatWINE failed to restore pixel format %d on window %p.\n"

l_.str.1:                               ; @.str.1
	.asciz	"can't restore pixel format %d on window %p\n"

	.no_dead_strip	_context_restore_pixel_format
.subsections_via_symbols
