	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_init_afu
_pci_init_afu:                          ## @pci_init_afu
	.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, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	_ENOMEM@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	callq	_cxl_alloc_afu
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	addq	$20, %rax
	movq	%rax, %rdi
	callq	_mutex_init
	movq	%r14, %r12
	addq	$16, %r12
	movl	8(%r15), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%r13d, %ecx
	callq	_dev_set_name
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_pci_configure_afu
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
LBB0_11:
	movq	8(%r14), %rdi
	callq	_kfree
	jmp	LBB0_12
LBB0_1:
	xorl	%ebx, %ebx
	subl	(%r12), %ebx
	jmp	LBB0_13
LBB0_3:
	negl	%ebx
LBB0_12:
	movq	%r14, %rdi
	callq	_kfree
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r14, %rdi
	callq	_cxl_debugfs_afu_add
	movq	%r14, %rdi
	callq	_cxl_register_afu
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	movq	%r14, %rdi
	callq	_cxl_sysfs_afu_add
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
LBB0_10:
	movq	%r14, %rdi
	callq	_pci_deconfigure_afu
	movq	%r14, %rdi
	callq	_cxl_debugfs_afu_remove
	movq	%r12, %rdi
	callq	_device_unregister
	jmp	LBB0_13
LBB0_8:
	movq	(%r15), %rax
	movq	(%r14), %rcx
	movq	%r14, (%rax,%rcx,8)
	movq	%r14, %rdi
	callq	_cxl_pci_vphb_add
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_info
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"afu%i.%i"

L_.str.1:                               ## @.str.1
	.asciz	"Can't register vPHB\n"

	.no_dead_strip	_pci_init_afu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_init_afu
_pci_init_afu:                          ; @pci_init_afu
	.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	x23, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x24, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ENOMEM@GOTPAGEOFF]
	ldr	w21, [x24]
	bl	_cxl_alloc_afu
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.2:
	add	x0, x0, #20
	bl	_mutex_init
	add	x21, x19, #16
	ldr	w2, [x20, #8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x3, x22
	bl	_dev_set_name
	mov	x22, x0
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	bl	_pci_configure_afu
	mov	x22, x0
	cbz	w0, LBB0_9
LBB0_4:
	ldr	x0, [x19, #8]
	bl	_kfree
	b	LBB0_7
LBB0_5:
	ldr	w8, [x24]
	neg	w22, w8
	b	LBB0_8
LBB0_6:
	neg	w22, w21
LBB0_7:
	mov	x0, x19
	bl	_kfree
LBB0_8:
	mov	x0, x22
	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:
	mov	x0, x19
	bl	_cxl_debugfs_afu_add
	mov	x0, x19
	bl	_cxl_register_afu
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_cxl_sysfs_afu_add
	mov	x22, x0
	cbz	w0, LBB0_12
LBB0_11:
	mov	x0, x19
	bl	_pci_deconfigure_afu
	mov	x0, x19
	bl	_cxl_debugfs_afu_remove
	mov	x0, x21
	bl	_device_unregister
	b	LBB0_8
LBB0_12:
	ldr	x8, [x20]
	ldr	x9, [x19]
	str	x19, [x8, x9, lsl #3]
	mov	x0, x19
	bl	_cxl_pci_vphb_add
	cbz	w0, LBB0_14
; %bb.13:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_info
LBB0_14:
	mov	w22, #0
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"afu%i.%i"

l_.str.1:                               ; @.str.1
	.asciz	"Can't register vPHB\n"

	.no_dead_strip	_pci_init_afu
.subsections_via_symbols
