	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xen_intr_pirq_enable_intr
_xen_intr_pirq_enable_intr:             ## @xen_intr_pirq_enable_intr
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_xen_intr_pirq_eoi_map_enabled@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_5
## %bb.1:
	movl	8(%rbx), %eax
	movl	%eax, -28(%rbp)
	movq	_PHYSDEVOP_irq_status_query@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-32(%rbp), %rsi
	callq	_HYPERVISOR_physdev_op
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	8(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_panic
LBB0_3:
	movq	_XENIRQSTAT_needs_eoi@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -32(%rbp)
	je	LBB0_5
## %bb.4:
	movl	8(%rbx), %edi
	movq	_xen_intr_pirq_eoi_map@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_xen_set_bit
LBB0_5:
	movl	8(%rbx), %eax
	movl	%eax, -36(%rbp)
	xorl	%eax, %eax
	cmpq	$0, 16(%rbx)
	jne	LBB0_7
## %bb.6:
	movq	_BIND_PIRQ__WILL_SHARE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	movl	%eax, -40(%rbp)
	movq	_EVTCHNOP_bind_pirq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rsi
	callq	_HYPERVISOR_event_channel_op
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	8(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_panic
LBB0_9:
	movq	-48(%rbp), %rax
	movq	%rax, (%rbx)
	movq	_xen_intr_isrc_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mtx_lock
	movq	_xen_intr_port_to_isrc@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	-48(%rbp), %rcx
	xorl	%edi, %edi
	cmpq	$0, (%rax,%rcx,8)
	sete	%dil
	leaq	L_.str.2(%rip), %rsi
	callq	_KASSERT
	movq	(%r15), %rax
	movq	-48(%rbp), %rcx
	movq	%rbx, (%rax,%rcx,8)
	movq	%r14, %rdi
	callq	_mtx_unlock
	movq	(%rbx), %rdi
	callq	_evtchn_unmask_port
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_xen_intr_pirq_eoi_map_enabled,4,2 ## @xen_intr_pirq_eoi_map_enabled
	.comm	_PHYSDEVOP_irq_status_query,4,2 ## @PHYSDEVOP_irq_status_query
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to get status of IRQ#%d"

	.comm	_XENIRQSTAT_needs_eoi,4,2       ## @XENIRQSTAT_needs_eoi
	.comm	_xen_intr_pirq_eoi_map,4,2      ## @xen_intr_pirq_eoi_map
	.comm	_BIND_PIRQ__WILL_SHARE,4,2      ## @BIND_PIRQ__WILL_SHARE
	.comm	_EVTCHNOP_bind_pirq,4,2         ## @EVTCHNOP_bind_pirq
L_.str.1:                               ## @.str.1
	.asciz	"unable to bind IRQ#%d"

	.comm	_xen_intr_isrc_lock,4,2         ## @xen_intr_isrc_lock
	.comm	_xen_intr_port_to_isrc,8,3      ## @xen_intr_port_to_isrc
L_.str.2:                               ## @.str.2
	.asciz	"trying to override an already setup event channel port"

	.no_dead_strip	_xen_intr_pirq_enable_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xen_intr_pirq_enable_intr
_xen_intr_pirq_enable_intr:             ; @xen_intr_pirq_enable_intr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _xen_intr_pirq_eoi_map_enabled@GOTPAGE
Lloh1:
	ldr	x8, [x8, _xen_intr_pirq_eoi_map_enabled@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbnz	w8, LBB0_5
; %bb.1:
	ldr	w8, [x19, #8]
	str	w8, [sp, #12]
Lloh3:
	adrp	x8, _PHYSDEVOP_irq_status_query@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PHYSDEVOP_irq_status_query@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_HYPERVISOR_physdev_op
	cbz	w0, LBB0_3
; %bb.2:
	ldr	w1, [x19, #8]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_3:
	ldr	w8, [sp, #8]
Lloh8:
	adrp	x9, _XENIRQSTAT_needs_eoi@GOTPAGE
Lloh9:
	ldr	x9, [x9, _XENIRQSTAT_needs_eoi@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	w0, [x19, #8]
Lloh11:
	adrp	x8, _xen_intr_pirq_eoi_map@GOTPAGE
Lloh12:
	ldr	x8, [x8, _xen_intr_pirq_eoi_map@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_xen_set_bit
LBB0_5:
	ldr	w8, [x19, #8]
	ldr	x9, [x19, #16]
Lloh14:
	adrp	x10, _BIND_PIRQ__WILL_SHARE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _BIND_PIRQ__WILL_SHARE@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	cmp	x9, #0
	csel	w9, w10, wzr, eq
	stp	w9, w8, [sp, #24]
Lloh17:
	adrp	x8, _EVTCHNOP_bind_pirq@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EVTCHNOP_bind_pirq@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	add	x1, sp, #16
	bl	_HYPERVISOR_event_channel_op
	cbz	w0, LBB0_7
; %bb.6:
	ldr	w1, [x19, #8]
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_panic
LBB0_7:
	ldr	x8, [sp, #16]
	str	x8, [x19]
Lloh22:
	adrp	x20, _xen_intr_isrc_lock@GOTPAGE
Lloh23:
	ldr	x20, [x20, _xen_intr_isrc_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_mtx_lock
Lloh24:
	adrp	x21, _xen_intr_port_to_isrc@GOTPAGE
Lloh25:
	ldr	x21, [x21, _xen_intr_port_to_isrc@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x9, [sp, #16]
	ldr	x8, [x8, x9, lsl #3]
	cmp	x8, #0
	cset	w0, eq
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_KASSERT
	ldr	x8, [x21]
	ldr	x9, [sp, #16]
	str	x19, [x8, x9, lsl #3]
	mov	x0, x20
	bl	_mtx_unlock
	ldr	x0, [x19]
	bl	_evtchn_unmask_port
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_xen_intr_pirq_eoi_map_enabled,4,2 ; @xen_intr_pirq_eoi_map_enabled
	.comm	_PHYSDEVOP_irq_status_query,4,2 ; @PHYSDEVOP_irq_status_query
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to get status of IRQ#%d"

	.comm	_XENIRQSTAT_needs_eoi,4,2       ; @XENIRQSTAT_needs_eoi
	.comm	_xen_intr_pirq_eoi_map,4,2      ; @xen_intr_pirq_eoi_map
	.comm	_BIND_PIRQ__WILL_SHARE,4,2      ; @BIND_PIRQ__WILL_SHARE
	.comm	_EVTCHNOP_bind_pirq,4,2         ; @EVTCHNOP_bind_pirq
l_.str.1:                               ; @.str.1
	.asciz	"unable to bind IRQ#%d"

	.comm	_xen_intr_isrc_lock,4,2         ; @xen_intr_isrc_lock
	.comm	_xen_intr_port_to_isrc,8,3      ; @xen_intr_port_to_isrc
l_.str.2:                               ; @.str.2
	.asciz	"trying to override an already setup event channel port"

	.no_dead_strip	_xen_intr_pirq_enable_intr
.subsections_via_symbols
