	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_link
_alloc_link:                            ## @alloc_link
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	32(%rax), %rdi
	callq	_kref_init
	movq	8(%r12), %rdi
	callq	_pci_domain_nr
	movl	%eax, 28(%rbx)
	movq	8(%r12), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movl	(%r12), %edi
	callq	_PCI_SLOT
	movl	%eax, 20(%rbx)
	movq	%rbx, %rdi
	addq	$16, %rdi
	movq	_MAX_IRQ_PER_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_atomic_set
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_alloc_spa
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_setup_xsl_irq
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	movq	%rbx, %rcx
	callq	_pnv_ocxl_spa_setup
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_release_xsl_irq
LBB0_7:
	movq	%rbx, %rdi
	callq	_free_spa
LBB0_8:
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_9:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, (%r14)
	xorl	%r13d, %r13d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MAX_IRQ_PER_LINK,4,2           ## @MAX_IRQ_PER_LINK
	.no_dead_strip	_alloc_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_link
_alloc_link:                            ; @alloc_link
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	add	x0, x0, #32
	bl	_kref_init
	ldr	x0, [x22, #8]
	bl	_pci_domain_nr
	ldr	x8, [x22, #8]
	ldr	w8, [x8]
	stp	w8, w0, [x19, #24]
	ldr	w0, [x22]
	bl	_PCI_SLOT
	str	w0, [x19, #20]
	add	x0, x19, #16
Lloh3:
	adrp	x8, _MAX_IRQ_PER_LINK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_IRQ_PER_LINK@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_atomic_set
	mov	x0, x22
	mov	x1, x19
	bl	_alloc_spa
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.2:
	mov	x0, x22
	mov	x1, x19
	bl	_setup_xsl_irq
	mov	x23, x0
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
	mov	x0, x22
	mov	x2, x21
	mov	x3, x19
	bl	_pnv_ocxl_spa_setup
	mov	x23, x0
	cbz	w0, LBB0_9
; %bb.4:
	mov	x0, x19
	bl	_release_xsl_irq
LBB0_5:
	mov	x0, x19
	bl	_free_spa
LBB0_6:
	mov	x0, x19
	bl	_kfree
	b	LBB0_8
LBB0_7:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_8:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	str	x19, [x20]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MAX_IRQ_PER_LINK,4,2           ; @MAX_IRQ_PER_LINK
	.no_dead_strip	_alloc_link
.subsections_via_symbols
