	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_context_init               ## -- Begin function cxl_context_init
	.p2align	4, 0x90
_cxl_context_init:                      ## @cxl_context_init
	.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, %rbx
	movq	%rsi, 32(%rdi)
	movl	%edx, (%rdi)
	movq	$0, 120(%rdi)
	addq	$112, %rdi
	callq	_mutex_init
	movl	$0, 4(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 96(%rbx)
	xorl	%eax, %eax
	callq	_cxl_is_power8
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	92(%rbx), %rdi
	callq	_spin_lock_init
	movq	%rbx, %rdi
	callq	_cxl_alloc_sst
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
LBB0_2:
	leaq	88(%rbx), %rdi
	movq	_cxl_handle_fault@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	leaq	84(%rbx), %rdi
	callq	_init_waitqueue_head
	leaq	80(%rbx), %rdi
	callq	_spin_lock_init
	movq	$0, 72(%rbx)
	movq	$0, 8(%rbx)
	movl	$0, 16(%rbx)
	leaq	64(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	movq	_CXL_IRQ_RANGES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%esi, %esi
	jle	LBB0_4
## %bb.3:
	movq	56(%rbx), %rdi
	shlq	$3, %rsi
	callq	___bzero
LBB0_4:
	leaq	52(%rbx), %rdi
	callq	_mutex_init
	movq	_OPENED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	leaq	8(%r14), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_idr_preload
	movq	32(%rbx), %rdi
	movl	12(%rdi), %ecx
	addq	$16, %rdi
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_idr_alloc
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_idr_preload_end
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%r15d, %r15d
	js	LBB0_9
## %bb.5:
	movl	%r15d, 20(%rbx)
	movq	_CPU_FTR_HVMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_has_feature
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	32(%rbx), %rax
	movq	(%rax), %rax
	movl	%r15d, %ecx
	shlq	$2, %rcx
	addq	(%rax), %rcx
	movq	%rcx, 40(%rbx)
	movl	20(%rbx), %eax
	jmp	LBB0_8
LBB0_6:
	movl	$-1, %eax
LBB0_8:
	movl	%eax, 24(%rbx)
	movl	$0, 28(%rbx)
	movq	%r14, %rdi
	callq	_cxl_afu_get
	xorl	%r15d, %r15d
LBB0_9:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cxl_handle_fault,4,2           ## @cxl_handle_fault
	.comm	_CXL_IRQ_RANGES,4,2             ## @CXL_IRQ_RANGES
	.comm	_OPENED,4,2                     ## @OPENED
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_GFP_NOWAIT,4,2                 ## @GFP_NOWAIT
	.comm	_CPU_FTR_HVMODE,4,2             ## @CPU_FTR_HVMODE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_context_init               ; -- Begin function cxl_context_init
	.p2align	2
_cxl_context_init:                      ; @cxl_context_init
	.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	x19, x1
	mov	x20, x0
	str	x1, [x0, #32]
	str	w2, [x0]
	str	xzr, [x0, #120]
	add	x0, x0, #112
	bl	_mutex_init
	str	wzr, [x20, #4]
	stp	xzr, xzr, [x20, #96]
	bl	_cxl_is_power8
	cbz	x0, LBB0_2
; %bb.1:
	add	x0, x20, #92
	bl	_spin_lock_init
	mov	x0, x20
	bl	_cxl_alloc_sst
	mov	x21, x0
	cbnz	w0, LBB0_9
LBB0_2:
	add	x0, x20, #88
Lloh0:
	adrp	x8, _cxl_handle_fault@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cxl_handle_fault@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x20, #84
	bl	_init_waitqueue_head
	add	x0, x20, #80
	bl	_spin_lock_init
	str	xzr, [x20, #72]
	str	xzr, [x20, #8]
	add	x0, x20, #64
	str	wzr, [x20, #16]
	bl	_INIT_LIST_HEAD
Lloh3:
	adrp	x8, _CXL_IRQ_RANGES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CXL_IRQ_RANGES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.3:
	ldr	x0, [x20, #56]
	lsl	x1, x8, #3
	bl	_bzero
LBB0_4:
	add	x0, x20, #52
	bl	_mutex_init
Lloh6:
	adrp	x8, _OPENED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OPENED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x20, #48]
	add	x22, x19, #8
	mov	x0, x22
	bl	_mutex_lock
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_idr_preload
	ldr	x8, [x20, #32]
	add	x0, x8, #16
	ldr	w3, [x8, #12]
Lloh12:
	adrp	x8, _GFP_NOWAIT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GFP_NOWAIT@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x8]
	mov	x1, x20
	mov	w2, #0
	bl	_idr_alloc
	mov	x21, x0
	bl	_idr_preload_end
	mov	x0, x22
	bl	_mutex_unlock
	tbnz	w21, #31, LBB0_9
; %bb.5:
	str	w21, [x20, #20]
Lloh15:
	adrp	x8, _CPU_FTR_HVMODE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CPU_FTR_HVMODE@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_cpu_has_feature
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x8, [x20, #32]
	ldr	x8, [x8]
	ldr	x8, [x8]
	add	x8, x8, w21, uxtw #2
	str	x8, [x20, #40]
	ldr	w8, [x20, #20]
	b	LBB0_8
LBB0_7:
	mov	w8, #-1
LBB0_8:
	stp	w8, wzr, [x20, #24]
	mov	x0, x19
	bl	_cxl_afu_get
	mov	w21, #0
LBB0_9:
	mov	x0, x21
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_cxl_handle_fault,4,2           ; @cxl_handle_fault
	.comm	_CXL_IRQ_RANGES,4,2             ; @CXL_IRQ_RANGES
	.comm	_OPENED,4,2                     ; @OPENED
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_NOWAIT,4,2                 ; @GFP_NOWAIT
	.comm	_CPU_FTR_HVMODE,4,2             ; @CPU_FTR_HVMODE
.subsections_via_symbols
