	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hl_vm_ctx_init_with_ranges
_hl_vm_ctx_init_with_ranges:            ## @hl_vm_ctx_init_with_ranges
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
	movl	%ecx, %r15d
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	32(%rdi), %r12
	callq	_hl_mmu_ctx_init
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	movl	(%r12), %edi
	movl	24(%r13), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
LBB0_2:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_mutex_init
	movl	20(%r13), %edi
	callq	_hash_init
	leaq	4(%r13), %rbx
	movq	%rbx, %rdi
	callq	_mutex_init
	movq	%r12, %rdi
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	callq	_hl_va_range_init
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_6
LBB0_4:
	leaq	12(%r13), %rbx
	movq	%rbx, %rdi
	callq	_mutex_init
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_hl_va_range_init
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	%eax, %r14d
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_mutex_destroy
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_mutex_lock
	leaq	8(%r13), %rsi
	movq	%r12, %rdi
	callq	_clear_va_list_locked
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_6:
	movq	%r15, %rdi
	callq	_mutex_destroy
	movq	%r13, %rdi
	callq	_mutex_destroy
	movq	%r13, %rdi
	callq	_hl_mmu_ctx_fini
LBB0_7:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_hl_debugfs_add_ctx_mem_hash
	xorl	%r14d, %r14d
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to init context %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to init host vm range\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to init dram vm range\n"

	.no_dead_strip	_hl_vm_ctx_init_with_ranges
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hl_vm_ctx_init_with_ranges
_hl_vm_ctx_init_with_ranges:            ; @hl_vm_ctx_init_with_ranges
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x4
	mov	x24, x3
	mov	x25, x2
	mov	x26, x1
	mov	x19, x0
	ldr	x21, [x0, #32]
	bl	_hl_mmu_ctx_init
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w0, [x21]
	ldr	w8, [x19, #24]
	str	x8, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_7
LBB0_2:
	mov	x0, x19
	bl	_mutex_init
	ldr	w0, [x19, #20]
	bl	_hash_init
	add	x22, x19, #4
	mov	x0, x22
	bl	_mutex_init
	mov	x0, x21
	mov	x1, x22
	mov	x2, x26
	mov	x3, x25
	bl	_hl_va_range_init
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
	ldr	w0, [x21]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_6
LBB0_4:
	add	x25, x19, #12
	mov	x0, x25
	bl	_mutex_init
	mov	x0, x21
	mov	x1, x25
	mov	x2, x24
	mov	x3, x23
	bl	_hl_va_range_init
	mov	x20, x0
	cbz	w0, LBB0_8
; %bb.5:
	ldr	w0, [x21]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	mov	x0, x25
	bl	_mutex_destroy
	mov	x0, x22
	bl	_mutex_lock
	add	x1, x19, #8
	mov	x0, x21
	bl	_clear_va_list_locked
	mov	x0, x22
	bl	_mutex_unlock
LBB0_6:
	mov	x0, x22
	bl	_mutex_destroy
	mov	x0, x19
	bl	_mutex_destroy
	mov	x0, x19
	bl	_hl_mmu_ctx_fini
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
	mov	x0, x21
	mov	x1, x19
	bl	_hl_debugfs_add_ctx_mem_hash
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to init context %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to init host vm range\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to init dram vm range\n"

	.no_dead_strip	_hl_vm_ctx_init_with_ranges
.subsections_via_symbols
