	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_gem_shmem_get_pages_sgt    ## -- Begin function drm_gem_shmem_get_pages_sgt
	.p2align	4, 0x90
_drm_gem_shmem_get_pages_sgt:           ## @drm_gem_shmem_get_pages_sgt
	.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	%rdi, %r15
	callq	_to_drm_gem_shmem_obj
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
LBB0_7:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rax, %r14
	movl	8(%r15), %edi
	callq	_WARN_ON
	movq	%r14, %rdi
	callq	_drm_gem_shmem_get_pages
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %edi
	jmp	LBB0_3
LBB0_4:
	movq	%r14, %rdi
	addq	$8, %rdi
	callq	_drm_gem_shmem_get_sg_table
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_drm_gem_shmem_put_pages
	movl	%ebx, %edi
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_6:
	movq	(%r15), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_sg
	movq	%rbx, (%r14)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_gem_shmem_get_pages_sgt    ; -- Begin function drm_gem_shmem_get_pages_sgt
	.p2align	2
_drm_gem_shmem_get_pages_sgt:           ; @drm_gem_shmem_get_pages_sgt
	.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
	bl	_to_drm_gem_shmem_obj
	ldr	x21, [x0]
	cbz	x21, LBB0_2
LBB0_1:
	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_2:
	mov	x19, x0
	ldr	w0, [x20, #8]
	bl	_WARN_ON
	mov	x0, x19
	bl	_drm_gem_shmem_get_pages
	cbnz	w0, LBB0_5
; %bb.3:
	add	x0, x19, #8
	bl	_drm_gem_shmem_get_sg_table
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x21
	bl	_PTR_ERR
	mov	x20, x0
	mov	x0, x19
	bl	_drm_gem_shmem_put_pages
	mov	x0, x20
LBB0_5:
	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	_ERR_PTR
LBB0_6:
	ldr	x8, [x20]
	ldr	w0, [x8]
	ldp	w2, w1, [x21]
Lloh0:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	bl	_dma_map_sg
	str	x21, [x19]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
.subsections_via_symbols
