	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xen_drm_front_evtchnl_set_state ## -- Begin function xen_drm_front_evtchnl_set_state
	.p2align	4, 0x90
_xen_drm_front_evtchnl_set_state:       ## @xen_drm_front_evtchnl_set_state
	.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
	cmpq	$0, 8(%rdi)
	je	LBB0_13
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %r15
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%r15), %r8d
	testl	%r8d, %r8d
	jle	LBB0_12
## %bb.2:
	movq	8(%r15), %rcx
	cmpl	$4, %r8d
	jae	LBB0_4
## %bb.3:
	xorl	%edx, %edx
	jmp	LBB0_11
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%r8d, %edx
	andl	$-4, %edx
	movd	%ebx, %xmm0
	leaq	-4(%rdx), %rdi
	movq	%rdi, %rsi
	shrq	$2, %rsi
	incq	%rsi
	movl	%esi, %eax
	andl	$3, %eax
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	cmpq	$12, %rdi
	jae	LBB0_6
## %bb.5:
	xorl	%edi, %edi
	jmp	LBB0_8
LBB0_6:
	andq	$-4, %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	%xmm0, (%rcx,%rdi,8)
	movdqu	%xmm0, 16(%rcx,%rdi,8)
	movdqu	%xmm0, 32(%rcx,%rdi,8)
	movdqu	%xmm0, 48(%rcx,%rdi,8)
	movdqu	%xmm0, 64(%rcx,%rdi,8)
	movdqu	%xmm0, 80(%rcx,%rdi,8)
	movdqu	%xmm0, 96(%rcx,%rdi,8)
	movdqu	%xmm0, 112(%rcx,%rdi,8)
	addq	$16, %rdi
	addq	$-4, %rsi
	jne	LBB0_7
LBB0_8:
	testq	%rax, %rax
	je	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(,%rdi,8), %rsi
	orq	$16, %rsi
	movdqu	%xmm0, (%rcx,%rdi,8)
	movdqu	%xmm0, (%rcx,%rsi)
	addq	$4, %rdi
	decq	%rax
	jne	LBB0_9
LBB0_10:
	cmpq	%r8, %rdx
	je	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, 4(%rcx,%rdx,8)
	movl	%ebx, (%rcx,%rdx,8)
	incq	%rdx
	cmpq	%rdx, %r8
	jne	LBB0_11
LBB0_12:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xen_drm_front_evtchnl_set_state ; -- Begin function xen_drm_front_evtchnl_set_state
	.p2align	2
_xen_drm_front_evtchnl_set_state:       ; @xen_drm_front_evtchnl_set_state
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, x1
	mov	x21, x0
	add	x20, x0, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.2:
	ldr	x9, [x21, #8]
	cmp	w8, #16
	b.hs	LBB0_5
; %bb.3:
	mov	x10, #0
	b	LBB0_8
LBB0_4:
	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
LBB0_5:
	and	x10, x8, #0xfffffff0
	dup.4s	v0, w19
	add	x11, x9, #64
	mov	x12, x10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	stp	q0, q0, [x11, #-64]
	stp	q0, q0, [x11, #-32]
	stp	q0, q0, [x11]
	stp	q0, q0, [x11, #32]
	add	x11, x11, #128
	subs	x12, x12, #16
	b.ne	LBB0_6
; %bb.7:
	cmp	x10, x8
	b.eq	LBB0_10
LBB0_8:
	add	x9, x9, x10, lsl #3
	add	x9, x9, #4
	sub	x8, x8, x10
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	stp	w19, w19, [x9, #-4]
	add	x9, x9, #8
	subs	x8, x8, #1
	b.ne	LBB0_9
LBB0_10:
	mov	x0, x20
	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	_spin_unlock_irqrestore
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
