	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_bo_get_pages
_tegra_bo_get_pages:                    ## @tegra_bo_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	leaq	16(%rsi), %r14
	movq	%r14, %rdi
	callq	_drm_gem_get_pages
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.7:
	movq	8(%rbx), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movl	16(%rbx), %esi
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %esi
	movl	%esi, (%rbx)
	movq	8(%rbx), %rdi
	callq	_drm_prime_pages_to_sg
	movq	%rax, 24(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	24(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
LBB0_5:
	movq	8(%rbx), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_drm_gem_put_pages
	jmp	LBB0_6
LBB0_3:
	movl	(%r15), %edi
	movq	24(%rbx), %rax
	movl	(%rax), %edx
	movl	4(%rax), %esi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_sg
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_4
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	24(%rbx), %rdi
	callq	_sg_free_table
	movq	24(%rbx), %rdi
	callq	_kfree
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_tegra_bo_get_pages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_bo_get_pages
_tegra_bo_get_pages:                    ; @tegra_bo_get_pages
	.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	x19, x1
	mov	x21, x0
	add	x20, x1, #16
	mov	x0, x20
	bl	_drm_gem_get_pages
	str	x0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x0, [x19, #8]
	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
	b	_PTR_ERR
LBB0_2:
	ldr	w8, [x19, #16]
Lloh0:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	asr	w1, w8, w9
	str	w1, [x19]
	ldr	x0, [x19, #8]
	bl	_drm_prime_pages_to_sg
	str	x0, [x19, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x0, [x19, #24]
	bl	_PTR_ERR
	mov	x21, x0
LBB0_4:
	ldr	x1, [x19, #8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	bl	_drm_gem_put_pages
	b	LBB0_7
LBB0_5:
	ldr	w0, [x21]
	ldr	x8, [x19, #24]
	ldp	w2, w1, [x8]
Lloh3:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	bl	_dma_map_sg
	cbz	w0, LBB0_8
; %bb.6:
	mov	w21, #0
LBB0_7:
	mov	x0, x21
	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
LBB0_8:
Lloh6:
	adrp	x8, _EFAULT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
	ldr	x0, [x19, #24]
	bl	_sg_free_table
	ldr	x0, [x19, #24]
	bl	_kfree
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_tegra_bo_get_pages
.subsections_via_symbols
