	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_guest_init_adapter         ## -- Begin function cxl_guest_init_adapter
	.p2align	4, 0x90
_cxl_guest_init_adapter:                ## @cxl_guest_init_adapter
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_cxl_alloc_adapter
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	$0, 32(%r12)
	movq	%r14, (%rax)
	movq	%r14, 16(%r12)
	movq	_release_adapter@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_dev_set_drvdata
	movl	$1, (%r12)
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_cxl_of_read_adapter_handle
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_cxl_of_read_adapter_properties
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	movq	%r12, %rdi
	callq	_properties_look_ok
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	movq	%r12, %rdi
	callq	_cxl_guest_add_chardev
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_8
LBB0_11:
	movq	%r12, %rdi
	callq	_free_adapter
LBB0_12:
	movl	%r14d, %edi
	jmp	LBB0_13
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %edi
	jmp	LBB0_13
LBB0_3:
	movq	%r12, %rdi
	callq	_free_adapter
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_8:
	movq	%r12, %rdi
	callq	_cxl_register_adapter
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	callq	_cxl_sysfs_adapter_add
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_14
LBB0_10:
	movq	%r12, %rdi
	addq	$8, %rdi
	callq	_device_unregister
	movq	%r12, %rdi
	callq	_cxl_guest_remove_chardev
	jmp	LBB0_12
LBB0_14:
	movq	%r12, %rdi
	callq	_cxl_adapter_context_unlock
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_release_adapter,4,2            ## @release_adapter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_guest_init_adapter         ; -- Begin function cxl_guest_init_adapter
	.p2align	2
_cxl_guest_init_adapter:                ; @cxl_guest_init_adapter
	.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	x21, x1
	mov	x22, x0
	bl	_cxl_alloc_adapter
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_8
; %bb.2:
	str	xzr, [x19, #32]
Lloh3:
	adrp	x8, _release_adapter@GOTPAGE
Lloh4:
	ldr	x8, [x8, _release_adapter@GOTPAGEOFF]
	str	x21, [x0]
Lloh5:
	ldr	w8, [x8]
	mov	x20, x19
	str	w8, [x20, #8]!
	str	x21, [x19, #16]
	mov	x0, x21
	mov	x1, x19
	bl	_dev_set_drvdata
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	mov	x1, x22
	bl	_cxl_of_read_adapter_handle
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.3:
	mov	x0, x19
	mov	x1, x22
	bl	_cxl_of_read_adapter_properties
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_properties_look_ok
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_cxl_guest_add_chardev
	mov	x21, x0
	cbz	w0, LBB0_11
LBB0_6:
	mov	x0, x19
	bl	_free_adapter
LBB0_7:
	mov	x0, x21
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_free_adapter
LBB0_9:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	b	_ERR_PTR
LBB0_11:
	mov	x0, x19
	bl	_cxl_register_adapter
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_cxl_sysfs_adapter_add
	mov	x21, x0
	cbz	w0, LBB0_14
LBB0_13:
	mov	x0, x20
	bl	_device_unregister
	mov	x0, x19
	bl	_cxl_guest_remove_chardev
	b	LBB0_7
LBB0_14:
	mov	x0, x19
	bl	_cxl_adapter_context_unlock
	mov	x0, 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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_release_adapter,4,2            ; @release_adapter
.subsections_via_symbols
