	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rcar_du_vsp_map_fb             ## -- Begin function rcar_du_vsp_map_fb
	.p2align	4, 0x90
_rcar_du_vsp_map_fb:                    ## @rcar_du_vsp_map_fb
	.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
	movq	(%rsi), %rax
	cmpl	$0, (%rax)
	je	LBB0_10
## %bb.1:
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_drm_fb_cma_get_gem_obj
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edi
	movl	8(%rax), %edx
	movl	(%rax), %r8d
	movl	4(%rax), %ecx
	movq	%rbx, %rsi
	callq	_dma_get_sgtable
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_vsp1_du_map_sg
	testl	%eax, %eax
	je	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	movq	(%r13), %rax
	movl	(%rax), %eax
	addq	$4, %rbx
	cmpq	%rax, %r15
	jb	LBB0_2
LBB0_10:
	xorl	%r12d, %r12d
	jmp	LBB0_11
LBB0_5:
	movl	%eax, %r12d
	testl	%r15d, %r15d
	jne	LBB0_7
	jmp	LBB0_11
LBB0_4:
	movq	%rbx, %rdi
	callq	_sg_free_table
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	testl	%r15d, %r15d
	je	LBB0_11
LBB0_7:
	addq	$-4, %rbx
	negq	%r15
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_vsp1_du_unmap_sg
	movq	%rbx, %rdi
	callq	_sg_free_table
	addq	$-4, %rbx
	incq	%r15
	jne	LBB0_8
LBB0_11:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rcar_du_vsp_map_fb             ; -- Begin function rcar_du_vsp_map_fb
	.p2align	2
_rcar_du_vsp_map_fb:                    ; @rcar_du_vsp_map_fb
	.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
	ldr	x8, [x1]
	ldr	w8, [x8]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	mov	x21, #0
	ldr	x24, [x0, #8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_drm_fb_cma_get_gem_obj
	ldr	w8, [x24]
	ldp	w3, w2, [x0, #4]
	ldr	w4, [x0]
	mov	x0, x8
	mov	x1, x20
	bl	_dma_get_sgtable
	cbnz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19]
	mov	x1, x20
	bl	_vsp1_du_map_sg
	cbz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, #1
	ldr	x8, [x22]
	ldr	w8, [x8]
	add	x20, x20, #4
	cmp	x21, x8
	b.lo	LBB0_2
LBB0_5:
	mov	w23, #0
	b	LBB0_10
LBB0_6:
	mov	x23, x0
	cbnz	w21, LBB0_8
	b	LBB0_10
LBB0_7:
	mov	x0, x20
	bl	_sg_free_table
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	cbz	w21, LBB0_10
LBB0_8:
	sub	x20, x20, #4
	neg	x21, x21
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	mov	x1, x20
	bl	_vsp1_du_unmap_sg
	mov	x0, x20
	bl	_sg_free_table
	sub	x20, x20, #4
	adds	x21, x21, #1
	b.lo	LBB0_9
LBB0_10:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
