	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hl_vm_init                     ## -- Begin function hl_vm_init
	.p2align	4, 0x90
_hl_vm_init:                            ## @hl_vm_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	48(%rdi), %edi
	callq	___ffs
	movl	%eax, %edi
	movl	$-1, %esi
	callq	_gen_pool_create
	movl	%eax, 12(%rbx)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	24(%rbx), %rdi
	callq	_kref_init
	movl	12(%rbx), %edi
	movq	32(%rbx), %rsi
	movq	40(%rbx), %rdx
	subq	%rsi, %rdx
	movl	$-1, %ecx
	callq	_gen_pool_add
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	movl	4(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	12(%rbx), %edi
	callq	_gen_pool_destroy
	jmp	LBB0_5
LBB0_1:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_5
LBB0_4:
	leaq	20(%rbx), %rdi
	callq	_spin_lock_init
	leaq	16(%rbx), %rdi
	callq	_idr_init
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_atomic64_set
	movl	$1, 8(%rbx)
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create dram page pool\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Failed to add memory to dram page pool %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hl_vm_init                     ; -- Begin function hl_vm_init
	.p2align	2
_hl_vm_init:                            ; @hl_vm_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w0, [x0, #48]
	bl	___ffs
	mov	w1, #-1
	bl	_gen_pool_create
	str	w0, [x19, #12]
	cbz	w0, LBB0_3
; %bb.1:
	add	x0, x19, #24
	bl	_kref_init
	ldr	w0, [x19, #12]
	ldp	x1, x8, [x19, #32]
	sub	x2, x8, x1
	mov	w3, #-1
	bl	_gen_pool_add
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x19, #4]
	str	x20, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	ldr	w0, [x19, #12]
	bl	_gen_pool_destroy
	b	LBB0_5
LBB0_3:
	ldr	w0, [x19, #4]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_4:
	add	x0, x19, #20
	bl	_spin_lock_init
	add	x0, x19, #16
	bl	_idr_init
	mov	x0, x19
	mov	w1, #0
	bl	_atomic64_set
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create dram page pool\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Failed to add memory to dram page pool %d\n"

.subsections_via_symbols
