	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_endpoint_test_alloc_irq_vectors
_pci_endpoint_test_alloc_irq_vectors:   ## @pci_endpoint_test_alloc_irq_vectors
	.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
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	cmpl	$128, %esi
	je	LBB0_8
## %bb.1:
	cmpl	$129, %esi
	je	LBB0_6
## %bb.2:
	cmpl	$130, %esi
	jne	LBB0_3
## %bb.4:
	movq	_PCI_IRQ_LEGACY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_pci_alloc_irq_vectors
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_11
## %bb.5:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_10
LBB0_8:
	movq	_PCI_IRQ_MSIX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$2048, %edx                     ## imm = 0x800
	callq	_pci_alloc_irq_vectors
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_11
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
LBB0_6:
	movq	_PCI_IRQ_MSI@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$32, %edx
	callq	_pci_alloc_irq_vectors
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_11
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_10
LBB0_3:
	movl	$-1, %ebx
	leaq	L_.str.3(%rip), %rsi
LBB0_10:
	movq	%r14, %rdi
	callq	_dev_err
LBB0_11:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	cmovgl	%ebx, %eax
	notl	%ebx
	shrl	$31, %ebx
	movl	%eax, (%r15)
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_IRQ_LEGACY,4,2             ## @PCI_IRQ_LEGACY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get Legacy interrupt\n"

	.comm	_PCI_IRQ_MSI,4,2                ## @PCI_IRQ_MSI
L_.str.1:                               ## @.str.1
	.asciz	"Failed to get MSI interrupts\n"

	.comm	_PCI_IRQ_MSIX,4,2               ## @PCI_IRQ_MSIX
L_.str.2:                               ## @.str.2
	.asciz	"Failed to get MSI-X interrupts\n"

L_.str.3:                               ## @.str.3
	.asciz	"Invalid IRQ type selected\n"

	.no_dead_strip	_pci_endpoint_test_alloc_irq_vectors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_endpoint_test_alloc_irq_vectors
_pci_endpoint_test_alloc_irq_vectors:   ; @pci_endpoint_test_alloc_irq_vectors
	.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
	ldr	x20, [x0, #8]
	cmp	w1, #128
	b.eq	LBB0_5
; %bb.1:
	cmp	w1, #129
	b.eq	LBB0_7
; %bb.2:
	cmp	w1, #130
	b.ne	LBB0_9
; %bb.3:
Lloh0:
	adrp	x8, _PCI_IRQ_LEGACY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_IRQ_LEGACY@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w1, #1
	mov	w2, #1
	bl	_pci_alloc_irq_vectors
	mov	x21, x0
	tbz	w0, #31, LBB0_11
; %bb.4:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_5:
Lloh5:
	adrp	x8, _PCI_IRQ_MSIX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCI_IRQ_MSIX@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w1, #1
	mov	w2, #2048
	bl	_pci_alloc_irq_vectors
	mov	x21, x0
	tbz	w0, #31, LBB0_11
; %bb.6:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_7:
Lloh10:
	adrp	x8, _PCI_IRQ_MSI@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PCI_IRQ_MSI@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w1, #1
	mov	w2, #32
	bl	_pci_alloc_irq_vectors
	mov	x21, x0
	tbz	w0, #31, LBB0_11
; %bb.8:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_9:
	mov	w21, #-1
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_10:
	mov	x0, x20
	bl	_dev_err
LBB0_11:
	cmp	w21, #0
	csel	w8, w21, wzr, gt
	mvn	w9, w21
	lsr	w0, w9, #31
	str	w8, [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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_IRQ_LEGACY,4,2             ; @PCI_IRQ_LEGACY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get Legacy interrupt\n"

	.comm	_PCI_IRQ_MSI,4,2                ; @PCI_IRQ_MSI
l_.str.1:                               ; @.str.1
	.asciz	"Failed to get MSI interrupts\n"

	.comm	_PCI_IRQ_MSIX,4,2               ; @PCI_IRQ_MSIX
l_.str.2:                               ; @.str.2
	.asciz	"Failed to get MSI-X interrupts\n"

l_.str.3:                               ; @.str.3
	.asciz	"Invalid IRQ type selected\n"

	.no_dead_strip	_pci_endpoint_test_alloc_irq_vectors
.subsections_via_symbols
