	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocxl_file_register_afu         ## -- Begin function ocxl_file_register_afu
	.p2align	4, 0x90
_ocxl_file_register_afu:                ## @ocxl_file_register_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	%rdi, %r14
	movq	8(%rdi), %r13
	movl	(%r13), %edi
	callq	_to_pci_dev
	movq	%rax, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_allocate_minor
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_10
## %bb.3:
	movq	%r13, 16(%r15)
	movq	_ocxl_dev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MAJOR
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_MKDEV
	movl	%eax, 8(%r15)
	movq	_ocxl_class@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	movq	_info_release@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r14, 24(%r15)
	movq	%r14, %rdi
	callq	_ocxl_afu_get
	movl	4(%r14), %ebx
	movq	%r12, %rdi
	callq	_dev_name
	movl	(%r14), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_dev_set_name
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	movq	%r15, %rdi
	callq	_device_register
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	movq	%r15, %rdi
	callq	_ocxl_sysfs_register_afu
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movq	%r15, %rdi
	callq	_ocxl_file_make_visible
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_7
LBB0_8:
	movq	%r15, %rdi
	callq	_ocxl_sysfs_unregister_afu
	movq	%r15, %rdi
	callq	_device_unregister
LBB0_9:
	movq	%r14, %rdi
	callq	_ocxl_afu_put
	movq	%r15, %rdi
	callq	_free_minor
LBB0_10:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ocxl_afu_set_private
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ocxl_dev,4,2                   ## @ocxl_dev
	.comm	_ocxl_class,4,2                 ## @ocxl_class
	.comm	_info_release,4,2               ## @info_release
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s.%s.%hhu"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocxl_file_register_afu         ; -- Begin function ocxl_file_register_afu
	.p2align	2
_ocxl_file_register_afu:                ; @ocxl_file_register_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	x19, x0
	ldr	x23, [x0, #8]
	ldr	w0, [x23]
	bl	_to_pci_dev
	mov	x22, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
	bl	_allocate_minor
	mov	x21, x0
	tbnz	w0, #31, LBB0_8
; %bb.2:
	str	x23, [x20, #16]
Lloh3:
	adrp	x8, _ocxl_dev@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ocxl_dev@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_MAJOR
	mov	x1, x21
	bl	_MKDEV
	str	w0, [x20, #8]
Lloh6:
	adrp	x8, _ocxl_class@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ocxl_class@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _info_release@GOTPAGE
Lloh10:
	ldr	x9, [x9, _info_release@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	stp	w9, w8, [x20]
	str	x19, [x20, #24]
	mov	x0, x19
	bl	_ocxl_afu_get
	ldr	w21, [x19, #4]
	mov	x0, x22
	bl	_dev_name
	mov	x3, x0
	ldr	w4, [x19]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_set_name
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.3:
	mov	x0, x20
	bl	_device_register
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.4:
	mov	x0, x20
	bl	_ocxl_sysfs_register_afu
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_ocxl_file_make_visible
	mov	x21, x0
	cbz	w0, LBB0_11
LBB0_6:
	mov	x0, x20
	bl	_ocxl_sysfs_unregister_afu
	mov	x0, x20
	bl	_device_unregister
LBB0_7:
	mov	x0, x19
	bl	_ocxl_afu_put
	mov	x0, x20
	bl	_free_minor
LBB0_8:
	mov	x0, x20
	bl	_kfree
	b	LBB0_10
LBB0_9:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	mov	x0, x21
	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_11:
	mov	x0, x19
	mov	x1, x20
	bl	_ocxl_afu_set_private
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ocxl_dev,4,2                   ; @ocxl_dev
	.comm	_ocxl_class,4,2                 ; @ocxl_class
	.comm	_info_release,4,2               ; @info_release
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s.%s.%hhu"

.subsections_via_symbols
