	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xen_drm_front_dbuf_destroy
_xen_drm_front_dbuf_destroy:            ## @xen_drm_front_dbuf_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	16(%rdi), %rbx
	movq	_GENERIC_OP_EVT_CHNL@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_2:
	leaq	(%rbx,%r15,4), %r15
	movl	8(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_dbuf_free
LBB0_4:
	movq	%r15, %rdi
	callq	_mutex_lock
	leaq	4(%r12), %r13
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	_XENDISPL_OP_DBUF_DESTROY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_be_prepare_req
	movl	%r14d, (%rax)
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_be_stream_do_io
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.6:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
LBB0_8:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	callq	_be_stream_wait_io
	movl	%eax, %ebx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_8
LBB0_7:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_dbuf_free
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GENERIC_OP_EVT_CHNL,8,3        ## @GENERIC_OP_EVT_CHNL
	.comm	_EIO,4,2                        ## @EIO
	.comm	_XENDISPL_OP_DBUF_DESTROY,4,2   ## @XENDISPL_OP_DBUF_DESTROY
	.no_dead_strip	_xen_drm_front_dbuf_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xen_drm_front_dbuf_destroy
_xen_drm_front_dbuf_destroy:            ; @xen_drm_front_dbuf_destroy
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0, #16]
Lloh0:
	adrp	x8, _GENERIC_OP_EVT_CHNL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GENERIC_OP_EVT_CHNL@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	cmp	x21, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_2:
	add	x21, x21, x22, lsl #2
	ldr	w24, [x20, #8]
	cbz	w24, LBB0_4
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	bl	_dbuf_free
LBB0_4:
	mov	x0, x21
	bl	_mutex_lock
	add	x23, x20, #4
	mov	x0, x23
	bl	_spin_lock_irqsave
Lloh6:
	adrp	x8, _XENDISPL_OP_DBUF_DESTROY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XENDISPL_OP_DBUF_DESTROY@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_be_prepare_req
	mov	x1, x0
	str	w19, [x0]
	mov	x0, x21
	bl	_be_stream_do_io
	mov	x22, x0
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	cbz	w22, LBB0_8
; %bb.5:
	cbz	w24, LBB0_9
LBB0_6:
	mov	x0, x21
	bl	_mutex_unlock
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x0, x21
	bl	_be_stream_wait_io
	mov	x22, x0
	cbnz	w24, LBB0_6
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	bl	_dbuf_free
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GENERIC_OP_EVT_CHNL,8,3        ; @GENERIC_OP_EVT_CHNL
	.comm	_EIO,4,2                        ; @EIO
	.comm	_XENDISPL_OP_DBUF_DESTROY,4,2   ; @XENDISPL_OP_DBUF_DESTROY
	.no_dead_strip	_xen_drm_front_dbuf_destroy
.subsections_via_symbols
