	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_gem_get_pages              ## -- Begin function drm_gem_get_pages
	.p2align	4, 0x90
_drm_gem_get_pages:                     ## @drm_gem_get_pages
	.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
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	xorl	%edi, %edi
	andl	(%rbx), %eax
	setne	%dil
	callq	_WARN_ON
	movl	(%rbx), %ebx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movl	$8, %esi
	callq	_kvmalloc_array
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_17
## %bb.1:
	movq	%r15, %rdi
	callq	_mapping_set_unevictable
	testl	%ebx, %ebx
	jle	LBB0_16
## %bb.2:
	movl	%ebx, %r14d
	shlq	$3, %r14
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	callq	_page_to_pfn
	cmpl	$1048576, %eax                  ## imm = 0x100000
	setae	%al
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movzbl	%al, %edi
	callq	_BUG_ON
	addq	$8, %rbx
	incl	%r13d
	cmpq	%rbx, %r14
	je	LBB0_16
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_shmem_read_mapping_page
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, (%rax,%rbx)
	movq	___GFP_DMA32@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mapping_gfp_constraint
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_8:
	movq	%r15, %rdi
	callq	_mapping_clear_unevictable
	leaq	-48(%rbp), %rdi
	callq	_pagevec_init
	testl	%r13d, %r13d
	je	LBB0_13
## %bb.9:
	leaq	-48(%rbp), %r15
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	addq	$-8, %rbx
	je	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-8(%rax,%rbx), %rsi
	movq	%r15, %rdi
	callq	_pagevec_add
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r15, %rdi
	callq	_drm_gem_check_release_pagevec
	jmp	LBB0_12
LBB0_13:
	leaq	-48(%rbp), %rdi
	callq	_pagevec_count
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	leaq	-48(%rbp), %rdi
	callq	_drm_gem_check_release_pagevec
LBB0_15:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_kvfree
	movq	%r12, %rdi
	callq	_ERR_CAST
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_16:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	___GFP_DMA32,4,2                ## @__GFP_DMA32
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_gem_get_pages              ; -- Begin function drm_gem_get_pages
	.p2align	2
_drm_gem_get_pages:                     ; @drm_gem_get_pages
	.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	x19, x0
	ldr	x8, [x0, #8]
	ldr	x20, [x8]
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sub	w9, w9, #1
	tst	w9, w8
	cset	w0, ne
	bl	_WARN_ON
Lloh3:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w9, [x19]
Lloh5:
	ldr	w8, [x8]
	asr	w21, w9, w8
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #8
	bl	_kvmalloc_array
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	bl	_mapping_set_unevictable
	cmp	w21, #1
	b.lt	LBB0_16
; %bb.2:
	mov	w22, #0
	mov	x23, #0
	lsl	x24, x21, #3
Lloh9:
	adrp	x25, ___GFP_DMA32@GOTPAGE
Lloh10:
	ldr	x25, [x25, ___GFP_DMA32@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_BUG_ON
	add	x23, x23, #8
	add	w22, w22, #1
	cmp	x24, x23
	b.eq	LBB0_16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_shmem_read_mapping_page
	mov	x21, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x21, [x19, x23]
	ldr	w1, [x25]
	mov	x0, x20
	bl	_mapping_gfp_constraint
	cbz	x0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_page_to_pfn
	tst	w0, #0xfff00000
	cset	w0, ne
	b	LBB0_3
LBB0_7:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
LBB0_8:
	mov	x0, x20
	bl	_mapping_clear_unevictable
	add	x0, sp, #8
	bl	_pagevec_init
	cbz	w22, LBB0_13
; %bb.9:
	sub	x20, x19, #8
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	subs	x23, x23, #8
	b.eq	LBB0_13
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x20, x23]
	add	x0, sp, #8
	bl	_pagevec_add
	cbnz	w0, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x0, sp, #8
	bl	_drm_gem_check_release_pagevec
	b	LBB0_10
LBB0_13:
	add	x0, sp, #8
	bl	_pagevec_count
	cbz	x0, LBB0_15
; %bb.14:
	add	x0, sp, #8
	bl	_drm_gem_check_release_pagevec
LBB0_15:
	mov	x0, x19
	bl	_kvfree
	mov	x0, x21
	bl	_ERR_CAST
	mov	x19, x0
LBB0_16:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	___GFP_DMA32,4,2                ; @__GFP_DMA32
.subsections_via_symbols
