	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_alloc_irq_vectors_affinity ## -- Begin function pci_alloc_irq_vectors_affinity
	.p2align	4, 0x90
_pci_alloc_irq_vectors_affinity:        ## @pci_alloc_irq_vectors_affinity
	.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	%r8, %rbx
	movl	%ecx, %r15d
	movl	%edx, %ecx
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	movl	$0, -64(%rbp)
	movq	_PCI_IRQ_AFFINITY@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_2
## %bb.1:
	testq	%rbx, %rbx
	leaq	-64(%rbp), %r12
	cmovneq	%rbx, %r12
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	movl	%ecx, %r14d
	callq	_WARN_ON
	movl	%r14d, %ecx
	xorl	%r12d, %r12d
	testq	%rax, %rax
	cmoveq	%rbx, %r12
LBB0_3:
	movq	_PCI_IRQ_MSIX@GOTPCREL(%rip), %rax
	movl	%r13d, %ebx
	testl	%r15d, (%rax)
	je	LBB0_5
## %bb.4:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%ecx, %ebx
	movq	%r12, %r8
	movl	%r15d, %r9d
	callq	___pci_enable_msix_range
	movl	%ebx, %ecx
	movl	%eax, %ebx
	movl	%eax, %r14d
	testl	%eax, %eax
	jg	LBB0_14
LBB0_5:
	movq	_PCI_IRQ_MSI@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_7
## %bb.6:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%ecx, %edx
	movq	%r12, %rcx
	callq	___pci_enable_msi_range
	movl	%eax, %r13d
	movl	%eax, %r14d
	testl	%eax, %eax
	jg	LBB0_14
LBB0_7:
	cmpl	$1, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_13
## %bb.8:
	movq	_PCI_IRQ_LEGACY@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	je	LBB0_13
## %bb.9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.10:
	testq	%r12, %r12
	je	LBB0_12
## %bb.11:
	movl	$1, %edi
	movq	%r12, %rsi
	callq	_irq_create_affinity_masks
LBB0_12:
	movl	$1, %r14d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	callq	_pci_intx
	jmp	LBB0_14
LBB0_13:
	xorl	%eax, %eax
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	cmpl	%eax, %ebx
	cmovel	%eax, %r13d
	movl	%r13d, %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_PCI_IRQ_AFFINITY,4,2           ## @PCI_IRQ_AFFINITY
	.comm	_PCI_IRQ_MSIX,4,2               ## @PCI_IRQ_MSIX
	.comm	_PCI_IRQ_MSI,4,2                ## @PCI_IRQ_MSI
	.comm	_PCI_IRQ_LEGACY,4,2             ## @PCI_IRQ_LEGACY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_alloc_irq_vectors_affinity ; -- Begin function pci_alloc_irq_vectors_affinity
	.p2align	2
_pci_alloc_irq_vectors_affinity:        ; @pci_alloc_irq_vectors_affinity
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x4
	mov	x20, x3
	mov	x24, x2
	mov	x22, x1
	mov	x19, x0
	str	wzr, [sp, #8]
Lloh0:
	adrp	x27, _ENOSPC@GOTPAGE
Lloh1:
	ldr	x27, [x27, _ENOSPC@GOTPAGEOFF]
	ldr	w8, [x27]
	neg	w21, w8
Lloh2:
	adrp	x8, _PCI_IRQ_AFFINITY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCI_IRQ_AFFINITY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w3
	b.eq	LBB0_2
; %bb.1:
	add	x8, sp, #8
	cmp	x23, #0
	csel	x23, x8, x23, eq
	b	LBB0_3
LBB0_2:
	mov	x0, x23
	bl	_WARN_ON
	cmp	x0, #0
	csel	x23, x23, xzr, eq
LBB0_3:
Lloh5:
	adrp	x8, _PCI_IRQ_MSIX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCI_IRQ_MSIX@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	mov	x25, x21
	tst	w8, w20
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, #0
	mov	x2, x22
	mov	x3, x24
	mov	x4, x23
	mov	x5, x20
	bl	___pci_enable_msix_range
	mov	x25, x0
	mov	x26, x0
	cmp	w0, #0
	b.gt	LBB0_14
LBB0_5:
Lloh8:
	adrp	x8, _PCI_IRQ_MSI@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PCI_IRQ_MSI@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x24
	mov	x3, x23
	bl	___pci_enable_msi_range
	mov	x21, x0
	mov	x26, x0
	cmp	w0, #0
	b.gt	LBB0_14
LBB0_7:
	cmp	w22, #1
	b.ne	LBB0_13
; %bb.8:
Lloh11:
	adrp	x8, _PCI_IRQ_LEGACY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PCI_IRQ_LEGACY@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	and	w8, w8, w20
	cbz	w8, LBB0_13
; %bb.9:
	ldr	x8, [x19]
	cbz	x8, LBB0_13
; %bb.10:
	cbz	x23, LBB0_12
; %bb.11:
	mov	w0, #1
	mov	x1, x23
	bl	_irq_create_affinity_masks
LBB0_12:
	mov	w26, #1
	mov	x0, x19
	mov	w1, #1
	bl	_pci_intx
	b	LBB0_14
LBB0_13:
	ldr	w8, [x27]
	cmn	w25, w8
	csneg	w26, w21, w8, ne
LBB0_14:
	mov	x0, x26
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_PCI_IRQ_AFFINITY,4,2           ; @PCI_IRQ_AFFINITY
	.comm	_PCI_IRQ_MSIX,4,2               ; @PCI_IRQ_MSIX
	.comm	_PCI_IRQ_MSI,4,2                ; @PCI_IRQ_MSI
	.comm	_PCI_IRQ_LEGACY,4,2             ; @PCI_IRQ_LEGACY
.subsections_via_symbols
