	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xv_free
_xv_free:                               ## @xv_free
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_x11_input_ctx_destroy
	movq	_g_x11_dpy@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	44(%rbx), %rsi
	callq	_XShmDetach
	movl	48(%rbx), %edi
	callq	_shmdt
	movl	44(%rbx), %edi
	movq	_IPC_RMID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_shmctl
	movl	40(%rbx), %edi
	callq	_XFree
	movl	$1, %edi
	callq	_x11_window_destroy
	xorl	%eax, %eax
	callq	_x11_colormap_destroy
	movl	(%r14), %edi
	callq	_XCloseDisplay
	movq	32(%rbx), %rdi
	callq	_free
	movq	24(%rbx), %rdi
	callq	_free
	movq	16(%rbx), %rdi
	callq	_free
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	movq	8(%rbx), %rax
	callq	*(%rax)
LBB0_3:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_free                           ## TAILCALL
LBB0_4:
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_x11_dpy,4,2                  ## @g_x11_dpy
	.comm	_IPC_RMID,4,2                   ## @IPC_RMID
	.no_dead_strip	_xv_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xv_free
_xv_free:                               ; @xv_free
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_4
; %bb.1:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_x11_input_ctx_destroy
Lloh0:
	adrp	x20, _g_x11_dpy@GOTPAGE
Lloh1:
	ldr	x20, [x20, _g_x11_dpy@GOTPAGEOFF]
	ldr	w0, [x20]
	add	x1, x19, #44
	bl	_XShmDetach
	ldr	w0, [x19, #48]
	bl	_shmdt
	ldr	w0, [x19, #44]
Lloh2:
	adrp	x8, _IPC_RMID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IPC_RMID@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_shmctl
	ldr	w0, [x19, #40]
	bl	_XFree
	mov	w0, #1
	bl	_x11_window_destroy
	bl	_x11_colormap_destroy
	ldr	w0, [x20]
	bl	_XCloseDisplay
	ldr	x0, [x19, #32]
	bl	_free
	ldr	x0, [x19, #24]
	bl	_free
	ldr	x0, [x19, #16]
	bl	_free
	ldr	x0, [x19]
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	blr	x8
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_free
LBB0_4:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_g_x11_dpy,4,2                  ; @g_x11_dpy
	.comm	_IPC_RMID,4,2                   ; @IPC_RMID
	.no_dead_strip	_xv_free
.subsections_via_symbols
