	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lima_vm_create                 ## -- Begin function lima_vm_create
	.p2align	4, 0x90
_lima_vm_create:                        ## @lima_vm_create
	.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	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movq	%r14, 24(%rax)
	leaq	16(%rax), %rdi
	callq	_mutex_init
	leaq	12(%rbx), %rdi
	callq	_kref_init
	movl	(%r14), %edi
	movq	_LIMA_PAGE_SIZE@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	___GFP_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	orl	(%r12), %ecx
	movq	%rbx, %rdx
	callq	_dma_alloc_wc
	movl	%eax, 4(%rbx)
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	cmpq	$0, 32(%r14)
	je	LBB0_4
## %bb.3:
	leaq	24(%r14), %rsi
	movq	_LIMA_VA_RESERVE_DLBU@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	(%r15), %rax
	leaq	(%rdx,%rax), %rcx
	decq	%rcx
	movq	%rbx, %rdi
	callq	_lima_vm_map_page_table
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	(%r14), %edi
	movq	(%r15), %rsi
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	callq	_dma_free_wc
LBB0_6:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_4:
	movq	%rbx, %rdi
	addq	$8, %rdi
	movq	8(%r14), %rsi
	movq	16(%r14), %rdx
	subq	%rsi, %rdx
	callq	_drm_mm_init
LBB0_8:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_LIMA_PAGE_SIZE,8,3             ## @LIMA_PAGE_SIZE
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
	.comm	_LIMA_VA_RESERVE_DLBU,8,3       ## @LIMA_VA_RESERVE_DLBU
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lima_vm_create                 ; -- Begin function lima_vm_create
	.p2align	2
_lima_vm_create:                        ; @lima_vm_create
	.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	x20, x0
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #32
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
	str	x20, [x19, #24]
	add	x0, x19, #16
	bl	_mutex_init
	add	x0, x19, #12
	bl	_kref_init
	ldr	w0, [x20]
Lloh2:
	adrp	x21, _LIMA_PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _LIMA_PAGE_SIZE@GOTPAGEOFF]
	ldr	x1, [x21]
	ldr	w8, [x22]
Lloh4:
	adrp	x9, ___GFP_ZERO@GOTPAGE
Lloh5:
	ldr	x9, [x9, ___GFP_ZERO@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x2, x19
	bl	_dma_alloc_wc
	str	w0, [x19, #4]
	cbz	w0, LBB0_5
; %bb.2:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_6
; %bb.3:
	add	x1, x20, #24
Lloh7:
	adrp	x8, _LIMA_VA_RESERVE_DLBU@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LIMA_VA_RESERVE_DLBU@GOTPAGEOFF]
Lloh9:
	ldr	x2, [x8]
	ldr	x8, [x21]
	add	x8, x2, x8
	sub	x3, x8, #1
	mov	x0, x19
	bl	_lima_vm_map_page_table
	cbz	w0, LBB0_6
; %bb.4:
	ldr	w0, [x20]
	ldr	x1, [x21]
	ldp	w3, w2, [x19]
	bl	_dma_free_wc
LBB0_5:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
	b	LBB0_7
LBB0_6:
	add	x0, x19, #8
	ldp	x1, x8, [x20, #8]
	sub	x2, x8, x1
	bl	_drm_mm_init
LBB0_7:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_LIMA_PAGE_SIZE,8,3             ; @LIMA_PAGE_SIZE
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
	.comm	_LIMA_VA_RESERVE_DLBU,8,3       ; @LIMA_VA_RESERVE_DLBU
.subsections_via_symbols
