	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gdi_gfx_free
_gdi_gfx_free:                          ## @gdi_gfx_free
	.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
	xorl	%eax, %eax
	callq	_win32_get_window
	movq	%rax, %r14
	movq	_gdi_menu_frame@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_free
	movq	$0, (%r15)
LBB0_2:
	movq	_gdi_temp_buf@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_free
	movq	$0, (%r15)
LBB0_4:
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.5:
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_DeleteObject
LBB0_7:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_DeleteDC
	movq	$0, 16(%rbx)
LBB0_9:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.10:
	callq	_DeleteDC
	movq	$0, 8(%rbx)
LBB0_11:
	testq	%r14, %r14
	je	LBB0_14
## %bb.12:
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	callq	_ReleaseDC
	movq	$0, (%rbx)
LBB0_14:
	xorl	%eax, %eax
	callq	_font_driver_free_osd
	xorl	%eax, %eax
	callq	_video_context_driver_free
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gdi_menu_frame,8,3             ## @gdi_menu_frame
	.comm	_gdi_temp_buf,8,3               ## @gdi_temp_buf
	.no_dead_strip	_gdi_gfx_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gdi_gfx_free
_gdi_gfx_free:                          ; @gdi_gfx_free
	.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
Lloh0:
	adrp	x21, _gdi_menu_frame@GOTPAGE
Lloh1:
	ldr	x21, [x21, _gdi_menu_frame@GOTPAGEOFF]
	ldr	x0, [x21]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_free
	str	xzr, [x21]
LBB0_2:
Lloh2:
	adrp	x21, _gdi_temp_buf@GOTPAGE
Lloh3:
	ldr	x21, [x21, _gdi_temp_buf@GOTPAGEOFF]
	ldr	x0, [x21]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_free
	str	xzr, [x21]
LBB0_4:
	cbz	x19, LBB0_15
; %bb.5:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_7
; %bb.6:
	bl	_DeleteObject
LBB0_7:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_DeleteDC
	str	xzr, [x19, #16]
LBB0_9:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_11
; %bb.10:
	bl	_DeleteDC
	str	xzr, [x19, #8]
LBB0_11:
	cbz	x20, LBB0_14
; %bb.12:
	ldr	x1, [x19]
	cbz	x1, LBB0_14
; %bb.13:
	mov	x0, x20
	bl	_ReleaseDC
	str	xzr, [x19]
LBB0_14:
	bl	_font_driver_free_osd
	bl	_video_context_driver_free
	mov	x0, x19
	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
	b	_free
LBB0_15:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_gdi_menu_frame,8,3             ; @gdi_menu_frame
	.comm	_gdi_temp_buf,8,3               ; @gdi_temp_buf
	.no_dead_strip	_gdi_gfx_free
.subsections_via_symbols
