	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_pages_vram
_get_pages_vram:                        ## @get_pages_vram
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_to_msm_bo
	movq	%rax, %rbx
	movq	(%r15), %rax
	movq	(%rax), %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	$8, %esi
	callq	_kvmalloc_array
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_spin_lock
	leaq	4(%r12), %rdi
	movl	(%rbx), %esi
	movl	%r14d, %edx
	callq	_drm_mm_insert_node
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_spin_unlock
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.3:
	movq	%r13, %rdi
	callq	_kvfree
	jmp	LBB0_4
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_5:
	movq	%r15, %rdi
	callq	_physaddr
	testl	%r14d, %r14d
	jle	LBB0_8
## %bb.6:
	movl	%eax, %r15d
	movl	%r14d, %r14d
	xorl	%ebx, %ebx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	callq	_phys_to_page
	movq	%rax, (%r13,%rbx,8)
	addl	(%r12), %r15d
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_7
LBB0_8:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.no_dead_strip	_get_pages_vram
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_pages_vram
_get_pages_vram:                        ; @get_pages_vram
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x21, x0
	bl	_to_msm_bo
	mov	x23, x0
	ldr	x8, [x21]
	ldr	x22, [x8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #8
	bl	_kvmalloc_array
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	x0, x22
	bl	_spin_lock
	add	x0, x22, #4
	ldr	w1, [x23]
	mov	x2, x20
	bl	_drm_mm_insert_node
	mov	x23, x0
	mov	x0, x22
	bl	_spin_unlock
	cbz	w23, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_kvfree
	b	LBB0_4
LBB0_3:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_4:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_5:
	mov	x0, x21
	bl	_physaddr
	cmp	w20, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x21, x0
	mov	x22, #0
	mov	w8, w20
	lsl	x20, x8, #3
Lloh6:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_phys_to_page
	str	x0, [x19, x22]
	ldr	w8, [x23]
	add	w21, w21, w8
	add	x22, x22, #8
	cmp	x20, x22
	b.ne	LBB0_7
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.no_dead_strip	_get_pages_vram
.subsections_via_symbols
