	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_exynos_drm_gem_prime_import_sg_table ## -- Begin function exynos_drm_gem_prime_import_sg_table
	.p2align	4, 0x90
_exynos_drm_gem_prime_import_sg_table:  ## @exynos_drm_gem_prime_import_sg_table
	.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	%rdx, %r14
	movq	(%rsi), %rax
	movl	(%rax), %esi
	callq	_exynos_drm_gem_init
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %edi
	jmp	LBB0_2
LBB0_3:
	movl	4(%r14), %edi
	callq	_sg_dma_address
	movl	%eax, 24(%rbx)
	movl	(%rbx), %r15d
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r15d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	movl	$8, %esi
	callq	_kvmalloc_array
	movl	%eax, 8(%rbx)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	callq	_drm_prime_sg_to_page_addr_arrays
	testl	%eax, %eax
	js	LBB0_10
## %bb.6:
	movq	%r14, 16(%rbx)
	cmpl	$1, (%r14)
	jne	LBB0_7
## %bb.8:
	movq	_EXYNOS_BO_CONTIG@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_11
LBB0_10:
	movl	%eax, %r15d
	movl	8(%rbx), %edi
	callq	_kvfree
LBB0_11:
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_drm_gem_object_release
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r15d, %edi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_7:
	movq	_EXYNOS_BO_NONCONTIG@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	orl	%eax, 12(%rbx)
	addq	$4, %rbx
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EXYNOS_BO_CONTIG,4,2           ## @EXYNOS_BO_CONTIG
	.comm	_EXYNOS_BO_NONCONTIG,4,2        ## @EXYNOS_BO_NONCONTIG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_exynos_drm_gem_prime_import_sg_table ; -- Begin function exynos_drm_gem_prime_import_sg_table
	.p2align	2
_exynos_drm_gem_prime_import_sg_table:  ; @exynos_drm_gem_prime_import_sg_table
	.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, x2
	ldr	x8, [x1]
	ldr	w1, [x8]
	bl	_exynos_drm_gem_init
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_PTR_ERR
	b	LBB0_8
LBB0_2:
	ldr	w0, [x20, #4]
	bl	_sg_dma_address
	str	w0, [x19, #24]
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w9, [x19]
Lloh2:
	ldr	w8, [x8]
	asr	w21, w9, w8
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #8
	bl	_kvmalloc_array
	str	w0, [x19, #8]
	cbz	w0, LBB0_5
; %bb.3:
	mov	x1, x0
	mov	x0, x20
	mov	x2, #0
	mov	x3, x21
	bl	_drm_prime_sg_to_page_addr_arrays
	tbnz	w0, #31, LBB0_6
; %bb.4:
	str	x20, [x19, #16]
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _EXYNOS_BO_CONTIG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EXYNOS_BO_CONTIG@GOTPAGEOFF]
Lloh8:
	adrp	x10, _EXYNOS_BO_NONCONTIG@GOTPAGE
Lloh9:
	ldr	x10, [x10, _EXYNOS_BO_NONCONTIG@GOTPAGEOFF]
	cmp	w8, #1
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	ldr	w9, [x19, #12]
	orr	w8, w9, w8
	str	w8, [x19, #12]
	add	x0, x19, #4
	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_5:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_6:
	mov	x21, x0
	ldr	w0, [x19, #8]
	bl	_kvfree
LBB0_7:
	add	x0, x19, #4
	bl	_drm_gem_object_release
	mov	x0, x19
	bl	_kfree
	mov	x0, x21
LBB0_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	_ERR_PTR
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EXYNOS_BO_CONTIG,4,2           ; @EXYNOS_BO_CONTIG
	.comm	_EXYNOS_BO_NONCONTIG,4,2        ; @EXYNOS_BO_NONCONTIG
.subsections_via_symbols
