	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_irq_reserve                ## -- Begin function pci_irq_reserve
	.p2align	4, 0x90
_pci_irq_reserve:                       ## @pci_irq_reserve
	.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
	movl	%edi, %ebx
	testl	%edi, %edi
	js	LBB0_1
## %bb.2:
	movq	_irq_counts@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_nitems
	xorl	%edi, %edi
	cmpl	%ebx, %eax
	setg	%dil
	jmp	LBB0_3
LBB0_1:
	xorl	%edi, %edi
LBB0_3:
	callq	_assert
	movq	_pirq_cold@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_assert
	movq	_irq_counts@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movslq	%ebx, %rbx
	movq	(%rax,%rbx,8), %rax
	testq	%rax, %rax
	sete	%cl
	movq	_IRQ_DISABLED@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	movq	(%r15), %rax
	movq	(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_irq_counts,8,3                 ## @irq_counts
	.comm	_pirq_cold,4,2                  ## @pirq_cold
	.comm	_IRQ_DISABLED,8,3               ## @IRQ_DISABLED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_irq_reserve                ; -- Begin function pci_irq_reserve
	.p2align	2
_pci_irq_reserve:                       ; @pci_irq_reserve
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _irq_counts@GOTPAGE
Lloh1:
	ldr	x20, [x20, _irq_counts@GOTPAGEOFF]
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	x0, [x20]
	bl	_nitems
	cmp	w0, w19
	cset	w0, gt
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_assert
Lloh2:
	adrp	x8, _pirq_cold@GOTPAGE
Lloh3:
	ldr	x8, [x8, _pirq_cold@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_assert
	ldr	x8, [x20]
	sbfiz	x19, x19, #3, #32
	ldr	x8, [x8, x19]
	cmp	x8, #0
Lloh5:
	adrp	x21, _IRQ_DISABLED@GOTPAGE
Lloh6:
	ldr	x21, [x21, _IRQ_DISABLED@GOTPAGEOFF]
	ldr	x9, [x21]
	ccmp	x8, x9, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	x8, [x21]
	ldr	x9, [x20]
	str	x8, [x9, x19]
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_irq_counts,8,3                 ; @irq_counts
	.comm	_pirq_cold,4,2                  ; @pirq_cold
	.comm	_IRQ_DISABLED,8,3               ; @IRQ_DISABLED
.subsections_via_symbols
