	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function davinci_fifo_data_trans
_davinci_fifo_data_trans:               ## @davinci_fifo_data_trans
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	(%rdi), %eax
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	32(%r15), %rax
	movl	(%rax), %edi
	callq	_sg_next
	movl	%eax, 40(%r15)
	movq	%r15, %rdi
	callq	_mmc_davinci_sg_to_buf
	movl	(%r15), %eax
LBB0_2:
	movq	8(%r15), %rcx
	movq	16(%r15), %r12
	cmpl	%r14d, %eax
	cmovbl	%eax, %r14d
	subl	%r14d, %eax
	movl	%eax, (%r15)
	subl	%r14d, 4(%r15)
	movq	_DAVINCI_MMC_DATADIR_WRITE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_3
## %bb.8:
	cmpl	$4, %r14d
	jb	LBB0_11
## %bb.9:
	movl	%r14d, %ebx
	shrl	$2, %ebx
	movq	_DAVINCI_MMCDXR@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movq	(%r13), %rsi
	addq	24(%r15), %rsi
	callq	_writel
	addq	$16, %r12
	decl	%ebx
	jne	LBB0_10
LBB0_11:
	andl	$3, %r14d
	je	LBB0_14
## %bb.12:
	movq	_DAVINCI_MMCDXR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	24(%r15), %rdi
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_iowrite8_rep
	jmp	LBB0_13
LBB0_3:
	cmpl	$4, %r14d
	jb	LBB0_6
## %bb.4:
	movl	%r14d, %ebx
	shrl	$2, %ebx
	movq	_DAVINCI_MMCDRR@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	addq	24(%r15), %rdi
	callq	_readl
	movl	%eax, (%r12)
	addq	$16, %r12
	decl	%ebx
	jne	LBB0_5
LBB0_6:
	andl	$3, %r14d
	je	LBB0_14
## %bb.7:
	movq	_DAVINCI_MMCDRR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	24(%r15), %rdi
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_ioread8_rep
LBB0_13:
	movl	%r14d, %eax
	leaq	(%r12,%rax,4), %r12
LBB0_14:
	movq	%r12, 16(%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DAVINCI_MMC_DATADIR_WRITE,8,3  ## @DAVINCI_MMC_DATADIR_WRITE
	.comm	_DAVINCI_MMCDXR,8,3             ## @DAVINCI_MMCDXR
	.comm	_DAVINCI_MMCDRR,8,3             ## @DAVINCI_MMCDRR
	.no_dead_strip	_davinci_fifo_data_trans
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function davinci_fifo_data_trans
_davinci_fifo_data_trans:               ; @davinci_fifo_data_trans
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
	cbnz	w8, LBB0_2
; %bb.1:
	ldr	x8, [x19, #32]
	ldr	w0, [x8]
	bl	_sg_next
	str	w0, [x19, #40]
	mov	x0, x19
	bl	_mmc_davinci_sg_to_buf
	ldr	w8, [x19]
LBB0_2:
	cmp	w8, w20
	csel	w21, w8, w20, lo
	sub	w8, w8, w21
	ldr	w9, [x19, #4]
	sub	w9, w9, w21
	stp	w8, w9, [x19]
	ldp	x8, x20, [x19, #8]
Lloh0:
	adrp	x9, _DAVINCI_MMC_DATADIR_WRITE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DAVINCI_MMC_DATADIR_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.3:
Lloh3:
	adrp	x22, _DAVINCI_MMCDXR@GOTPAGE
Lloh4:
	ldr	x22, [x22, _DAVINCI_MMCDXR@GOTPAGEOFF]
	cmp	w21, #4
	b.lo	LBB0_6
; %bb.4:
	lsr	w23, w21, #2
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20], #16
	ldr	x8, [x19, #24]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
	subs	w23, w23, #1
	b.ne	LBB0_5
LBB0_6:
	ands	w21, w21, #0x3
	b.eq	LBB0_14
; %bb.7:
	ldr	x8, [x19, #24]
	ldr	x9, [x22]
	add	x0, x9, x8
	mov	x1, x20
	mov	x2, x21
	bl	_iowrite8_rep
	b	LBB0_13
LBB0_8:
Lloh5:
	adrp	x22, _DAVINCI_MMCDRR@GOTPAGE
Lloh6:
	ldr	x22, [x22, _DAVINCI_MMCDRR@GOTPAGEOFF]
	cmp	w21, #4
	b.lo	LBB0_11
; %bb.9:
	lsr	w23, w21, #2
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	str	w0, [x20], #16
	subs	w23, w23, #1
	b.ne	LBB0_10
LBB0_11:
	ands	w21, w21, #0x3
	b.eq	LBB0_14
; %bb.12:
	ldr	x8, [x19, #24]
	ldr	x9, [x22]
	add	x0, x9, x8
	mov	x1, x20
	mov	x2, x21
	bl	_ioread8_rep
LBB0_13:
	add	x20, x20, w21, uxtw #2
LBB0_14:
	str	x20, [x19, #16]
	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
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_DAVINCI_MMC_DATADIR_WRITE,8,3  ; @DAVINCI_MMC_DATADIR_WRITE
	.comm	_DAVINCI_MMCDXR,8,3             ; @DAVINCI_MMCDXR
	.comm	_DAVINCI_MMCDRR,8,3             ; @DAVINCI_MMCDRR
	.no_dead_strip	_davinci_fifo_data_trans
.subsections_via_symbols
