	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_ctx_gdi_destroy
_gfx_ctx_gdi_destroy:                   ## @gfx_ctx_gdi_destroy
	.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, %r14
	xorl	%eax, %eax
	callq	_win32_get_window
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_win32_gdi_hdc@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_ReleaseDC
	movq	$0, (%r15)
LBB0_3:
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_win32_monitor_from_window
	xorl	%eax, %eax
	callq	_win32_destroy_window
LBB0_5:
	movq	_g_win32_restore_desktop@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	je	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	callq	_win32_monitor_get_info
	movl	$0, (%rbx)
LBB0_7:
	testq	%r14, %r14
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_free
LBB0_9:
	movq	_g_win32_inited@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_win32_gdi_major@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_win32_gdi_minor@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_win32_gdi_hdc,8,3              ## @win32_gdi_hdc
	.comm	_g_win32_restore_desktop,4,2    ## @g_win32_restore_desktop
	.comm	_g_win32_inited,4,2             ## @g_win32_inited
	.comm	_win32_gdi_major,8,3            ## @win32_gdi_major
	.comm	_win32_gdi_minor,8,3            ## @win32_gdi_minor
	.no_dead_strip	_gfx_ctx_gdi_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_ctx_gdi_destroy
_gfx_ctx_gdi_destroy:                   ; @gfx_ctx_gdi_destroy
	.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
	bl	_win32_get_window
	mov	x20, x0
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x21, _win32_gdi_hdc@GOTPAGE
Lloh1:
	ldr	x21, [x21, _win32_gdi_hdc@GOTPAGEOFF]
	ldr	x1, [x21]
	cbz	x1, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_ReleaseDC
	str	xzr, [x21]
LBB0_3:
	cbz	x20, LBB0_5
; %bb.4:
	bl	_win32_monitor_from_window
	bl	_win32_destroy_window
LBB0_5:
Lloh2:
	adrp	x20, _g_win32_restore_desktop@GOTPAGE
Lloh3:
	ldr	x20, [x20, _g_win32_restore_desktop@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_7
; %bb.6:
	bl	_win32_monitor_get_info
	str	wzr, [x20]
LBB0_7:
	cbz	x19, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_free
LBB0_9:
Lloh4:
	adrp	x8, _g_win32_inited@GOTPAGE
Lloh5:
	ldr	x8, [x8, _g_win32_inited@GOTPAGEOFF]
Lloh6:
	str	wzr, [x8]
Lloh7:
	adrp	x8, _win32_gdi_major@GOTPAGE
Lloh8:
	ldr	x8, [x8, _win32_gdi_major@GOTPAGEOFF]
Lloh9:
	str	xzr, [x8]
Lloh10:
	adrp	x8, _win32_gdi_minor@GOTPAGE
Lloh11:
	ldr	x8, [x8, _win32_gdi_minor@GOTPAGEOFF]
Lloh12:
	str	xzr, [x8]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_win32_gdi_hdc,8,3              ; @win32_gdi_hdc
	.comm	_g_win32_restore_desktop,4,2    ; @g_win32_restore_desktop
	.comm	_g_win32_inited,4,2             ; @g_win32_inited
	.comm	_win32_gdi_major,8,3            ; @win32_gdi_major
	.comm	_win32_gdi_minor,8,3            ; @win32_gdi_minor
	.no_dead_strip	_gfx_ctx_gdi_destroy
.subsections_via_symbols
