	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hl_ctx_init                    ## -- Begin function hl_ctx_init
	.p2align	4, 0x90
_hl_ctx_init:                           ## @hl_ctx_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rdi, 40(%rsi)
	leaq	32(%rsi), %rdi
	callq	_kref_init
	movl	$1, (%rbx)
	leaq	28(%rbx), %rdi
	callq	_spin_lock_init
	leaq	24(%rbx), %rdi
	movl	$1, %esi
	callq	_atomic_set
	movq	$0, 16(%rbx)
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.1:
	movq	_HL_KERNEL_ASID_ID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_hl_mmu_ctx_init
	testl	%eax, %eax
	je	LBB0_10
## %bb.2:
	movl	%eax, %r15d
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_6
LBB0_3:
	movq	%r14, %rdi
	callq	_hl_asid_alloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	movq	%rbx, %rdi
	callq	_hl_vm_ctx_init
	testl	%eax, %eax
	je	LBB0_10
## %bb.5:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_6:
	movq	8(%rbx), %rsi
	movq	_HL_KERNEL_ASID_ID@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_11
## %bb.7:
	movq	%r14, %rdi
	callq	_hl_asid_free
	jmp	LBB0_11
LBB0_10:
	xorl	%r15d, %r15d
	jmp	LBB0_11
LBB0_9:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_11:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HL_KERNEL_ASID_ID,8,3          ## @HL_KERNEL_ASID_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to init mmu ctx module\n"

L_.str.1:                               ## @.str.1
	.asciz	"No free ASID, failed to create context\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"Failed to init mem ctx module\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hl_ctx_init                    ; -- Begin function hl_ctx_init
	.p2align	2
_hl_ctx_init:                           ; @hl_ctx_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	x21, x2
	mov	x20, x1
	mov	x19, x0
	str	x0, [x1, #40]
	add	x0, x1, #32
	bl	_kref_init
	mov	w8, #1
	str	w8, [x20]
	add	x0, x20, #28
	bl	_spin_lock_init
	add	x0, x20, #24
	mov	w1, #1
	bl	_atomic_set
	str	xzr, [x20, #16]
Lloh0:
	adrp	x22, _HL_KERNEL_ASID_ID@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HL_KERNEL_ASID_ID@GOTPAGEOFF]
	cbz	w21, LBB0_3
; %bb.1:
	ldr	x8, [x22]
	str	x8, [x20, #8]
	mov	x0, x20
	bl	_hl_mmu_ctx_init
	mov	x21, x0
	cbz	w0, LBB0_10
; %bb.2:
	ldr	w0, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_6
LBB0_3:
	mov	x0, x19
	bl	_hl_asid_alloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_8
; %bb.4:
	mov	x0, x20
	bl	_hl_vm_ctx_init
	cbz	w0, LBB0_9
; %bb.5:
	ldr	w0, [x19]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	ldr	x1, [x20, #8]
	ldr	x8, [x22]
	cmp	x1, x8
	b.eq	LBB0_10
; %bb.7:
	mov	x0, x19
	bl	_hl_asid_free
	b	LBB0_10
LBB0_8:
	ldr	w0, [x19]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_9:
	mov	w21, #0
LBB0_10:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_HL_KERNEL_ASID_ID,8,3          ; @HL_KERNEL_ASID_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to init mmu ctx module\n"

l_.str.1:                               ; @.str.1
	.asciz	"No free ASID, failed to create context\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"Failed to init mem ctx module\n"

.subsections_via_symbols
