	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function evtchnl_interrupt_ctrl
_evtchnl_interrupt_ctrl:                ## @evtchnl_interrupt_ctrl
	.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	%rsi, %r12
	movq	(%rsi), %rax
	movq	48(%rsi), %rbx
	movq	_EVTCHNL_STATE_CONNECTED@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_12
## %bb.1:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	leaq	16(%r12), %r15
	movq	32(%r12), %rax
	movq	(%rax), %r13
	xorl	%eax, %eax
	callq	_virt_rmb
	movq	16(%r12), %rbx
	cmpq	%r13, %rbx
	jne	LBB0_2
LBB0_8:
	movq	%r13, 16(%r12)
	cmpq	24(%r12), %r13
	jne	LBB0_9
## %bb.10:
	incq	%r13
	movq	32(%r12), %rax
	movq	%r13, 8(%rax)
	jmp	LBB0_11
LBB0_2:
	leaq	40(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_DRM_ERROR
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	%rbx, %r13
	je	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_RING_GET_RESPONSE
	movq	%rax, %r14
	movq	(%rax), %rax
	xorl	%edi, %edi
	cmpq	8(%r12), %rax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	8(%r14), %esi
	leal	-128(%rsi), %eax
	cmpl	$5, %eax
	ja	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	12(%r14), %eax
	movl	%eax, 44(%r12)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_complete
	jmp	LBB0_7
LBB0_9:
	movq	%r15, %rdi
	callq	_RING_FINAL_CHECK_FOR_RESPONSES
LBB0_11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
LBB0_12:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EVTCHNL_STATE_CONNECTED,8,3    ## @EVTCHNL_STATE_CONNECTED
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Operation %d is not supported\n"

	.no_dead_strip	_evtchnl_interrupt_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function evtchnl_interrupt_ctrl
_evtchnl_interrupt_ctrl:                ; @evtchnl_interrupt_ctrl
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	ldr	x19, [x1, #48]
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _EVTCHNL_STATE_CONNECTED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EVTCHNL_STATE_CONNECTED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_12
; %bb.1:
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #32]
	ldr	x26, [x8]
	bl	_virt_rmb
	mov	x21, x20
	ldr	x22, [x21, #16]!
	cmp	x22, x26
	b.ne	LBB0_4
LBB0_2:
	str	x26, [x20, #16]
	ldr	x8, [x20, #24]
	cmp	x26, x8
	b.ne	LBB0_10
; %bb.3:
	add	x8, x26, #1
	ldr	x9, [x20, #32]
	str	x8, [x9, #8]
	b	LBB0_11
LBB0_4:
	add	x23, x20, #40
Lloh3:
	adrp	x24, l_.str@PAGE
Lloh4:
	add	x24, x24, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x24
	bl	_DRM_ERROR
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x22, x22, #1
	cmp	x26, x22
	b.eq	LBB0_2
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_RING_GET_RESPONSE
	mov	x25, x0
	ldr	x8, [x0]
	ldr	x9, [x20, #8]
	cmp	x8, x9
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x25, #8]
	sub	w8, w1, #128
	cmp	w8, #5
	b.hi	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x25, #12]
	str	w8, [x20, #44]
	mov	x0, x23
	bl	_complete
	b	LBB0_6
LBB0_10:
	mov	x0, x21
	bl	_RING_FINAL_CHECK_FOR_RESPONSES
LBB0_11:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_12:
Lloh5:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EVTCHNL_STATE_CONNECTED,8,3    ; @EVTCHNL_STATE_CONNECTED
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Operation %d is not supported\n"

	.no_dead_strip	_evtchnl_interrupt_ctrl
.subsections_via_symbols
