	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xen_drm_front_mode_set         ## -- Begin function xen_drm_front_mode_set
	.p2align	4, 0x90
_xen_drm_front_mode_set:                ## @xen_drm_front_mode_set
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	(%rdi), %r14
	movq	8(%rdi), %rax
	movq	(%rax), %r13
	movq	8(%r13), %rbx
	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_5
LBB0_2:
	leaq	(%rbx,%r14,4), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	_XENDISPL_OP_SET_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_be_prepare_req
	movq	%r12, 40(%rax)
	movq	%r15, 32(%rax)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 24(%rax)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 16(%rax)
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 8(%rax)
	movl	16(%rbp), %ecx
	movl	%ecx, (%rax)
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_be_stream_do_io
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	testl	%ebx, %ebx
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_be_stream_wait_io
	movl	%eax, %ebx
LBB0_4:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_5:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_XENDISPL_OP_SET_CONFIG,4,2     ## @XENDISPL_OP_SET_CONFIG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xen_drm_front_mode_set         ; -- Begin function xen_drm_front_mode_set
	.p2align	2
_xen_drm_front_mode_set:                ; @xen_drm_front_mode_set
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x6
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x25, x2
	mov	x26, x1
	ldp	x19, x8, [x0]
	ldr	x21, [x8]
	ldr	x27, [x21, #8]
	cmp	x27, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_2:
	add	x19, x27, x19, lsl #2
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh3:
	adrp	x8, _XENDISPL_OP_SET_CONFIG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XENDISPL_OP_SET_CONFIG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_be_prepare_req
	mov	x1, x0
	stp	x25, x26, [x0, #32]
	stp	x23, x24, [x0, #16]
	str	x22, [x0, #8]
	str	w20, [x0]
	mov	x0, x19
	bl	_be_stream_do_io
	mov	x20, x0
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	cbnz	w20, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_be_stream_wait_io
	mov	x20, x0
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_XENDISPL_OP_SET_CONFIG,4,2     ; @XENDISPL_OP_SET_CONFIG
.subsections_via_symbols
