	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function moxart_prepare_data
_moxart_prepare_data:                   ## @moxart_prepare_data
	.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	32(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.1:
	movq	%rdi, %r15
	movl	4(%rbx), %eax
	movl	(%rbx), %edx
	imull	%eax, %edx
	bsfl	%eax, %ecx
	movl	$-1, %r14d
	cmovnel	%ecx, %r14d
	movl	$1, %esi
	movl	%r14d, %ecx
	shll	%cl, %esi
	movl	%edx, (%rdi)
	xorl	%edi, %edi
	cmpl	%eax, %esi
	setne	%dil
	callq	_BUG_ON
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_moxart_init_sg
	movq	_DCR_DATA_EN@GOTPCREL(%rip), %rax
	movq	_DCR_BLK_SIZE@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r14d
	orl	(%rax), %r14d
	movq	_MMC_DATA_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	8(%rbx), %eax
	je	LBB0_3
## %bb.2:
	movq	_DCR_DATA_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_3:
	orl	%eax, %r14d
	movl	(%r15), %eax
	cmpl	4(%r15), %eax
	jle	LBB0_6
## %bb.4:
	cmpq	$0, 24(%r15)
	je	LBB0_6
## %bb.5:
	movq	_DCR_DMA_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
LBB0_6:
	movq	_DCR_DATA_FIFO_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_REG_DATA_CONTROL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	16(%r15), %rsi
	callq	_writel
	movq	_MASK_DATA@GOTPCREL(%rip), %rax
	movq	_FIFO_URUN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_FIFO_ORUN@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_REG_CLEAR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	callq	_writel
	movl	8(%r15), %edi
	movq	_REG_DATA_TIMER@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	callq	_writel
	movl	(%r15), %edi
	movq	_REG_DATA_LENGTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	callq	_writel
	movq	(%rbx), %rsi
	addq	16(%r15), %rsi
	movl	%r14d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DCR_DATA_EN,4,2                ## @DCR_DATA_EN
	.comm	_DCR_BLK_SIZE,4,2               ## @DCR_BLK_SIZE
	.comm	_MMC_DATA_WRITE,4,2             ## @MMC_DATA_WRITE
	.comm	_DCR_DATA_WRITE,4,2             ## @DCR_DATA_WRITE
	.comm	_DCR_DMA_EN,4,2                 ## @DCR_DMA_EN
	.comm	_DCR_DATA_FIFO_RESET,4,2        ## @DCR_DATA_FIFO_RESET
	.comm	_REG_DATA_CONTROL,8,3           ## @REG_DATA_CONTROL
	.comm	_MASK_DATA,4,2                  ## @MASK_DATA
	.comm	_FIFO_URUN,4,2                  ## @FIFO_URUN
	.comm	_FIFO_ORUN,4,2                  ## @FIFO_ORUN
	.comm	_REG_CLEAR,8,3                  ## @REG_CLEAR
	.comm	_REG_DATA_TIMER,8,3             ## @REG_DATA_TIMER
	.comm	_REG_DATA_LENGTH,8,3            ## @REG_DATA_LENGTH
	.no_dead_strip	_moxart_prepare_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function moxart_prepare_data
_moxart_prepare_data:                   ; @moxart_prepare_data
	.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
	ldr	x8, [x0, #32]
	ldr	x8, [x8]
	ldr	x20, [x8]
	cbz	x20, LBB0_5
; %bb.1:
	mov	x19, x0
	ldp	w8, w9, [x20]
	mul	w8, w9, w8
	str	w8, [x0]
	rbit	w8, w9
	clz	w8, w8
	cmp	w9, #0
	csinv	w21, w8, wzr, ne
	mov	w8, #1
	lsl	w8, w8, w21
	cmp	w8, w9
	cset	w0, ne
	bl	_BUG_ON
	mov	x0, x19
	mov	x1, x20
	bl	_moxart_init_sg
Lloh0:
	adrp	x8, _DCR_DATA_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DCR_DATA_EN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DCR_BLK_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DCR_BLK_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w9, w9, w21
	orr	w8, w9, w8
	ldr	w9, [x20, #8]
Lloh6:
	adrp	x10, _MMC_DATA_WRITE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MMC_DATA_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _DCR_DATA_WRITE@GOTPAGE
Lloh10:
	ldr	x11, [x11, _DCR_DATA_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w9, wzr, w11, eq
	orr	w20, w8, w9
	ldp	w8, w9, [x19]
	cmp	w8, w9
	b.le	LBB0_4
; %bb.2:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _DCR_DMA_EN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DCR_DMA_EN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w20, w8, w20
LBB0_4:
Lloh15:
	adrp	x8, _DCR_DATA_FIFO_RESET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DCR_DATA_FIFO_RESET@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	x8, [x19, #16]
Lloh18:
	adrp	x21, _REG_DATA_CONTROL@GOTPAGE
Lloh19:
	ldr	x21, [x21, _REG_DATA_CONTROL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
Lloh20:
	adrp	x8, _MASK_DATA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MASK_DATA@GOTPAGEOFF]
Lloh22:
	adrp	x9, _FIFO_URUN@GOTPAGE
Lloh23:
	ldr	x9, [x9, _FIFO_URUN@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh26:
	adrp	x9, _FIFO_ORUN@GOTPAGE
Lloh27:
	ldr	x9, [x9, _FIFO_ORUN@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x19, #16]
Lloh29:
	adrp	x9, _REG_CLEAR@GOTPAGE
Lloh30:
	ldr	x9, [x9, _REG_CLEAR@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x19, #8]
	ldr	x8, [x19, #16]
Lloh32:
	adrp	x9, _REG_DATA_TIMER@GOTPAGE
Lloh33:
	ldr	x9, [x9, _REG_DATA_TIMER@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x19]
	ldr	x8, [x19, #16]
Lloh35:
	adrp	x9, _REG_DATA_LENGTH@GOTPAGE
Lloh36:
	ldr	x9, [x9, _REG_DATA_LENGTH@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #16]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x20
	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	_writel
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
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DCR_DATA_EN,4,2                ; @DCR_DATA_EN
	.comm	_DCR_BLK_SIZE,4,2               ; @DCR_BLK_SIZE
	.comm	_MMC_DATA_WRITE,4,2             ; @MMC_DATA_WRITE
	.comm	_DCR_DATA_WRITE,4,2             ; @DCR_DATA_WRITE
	.comm	_DCR_DMA_EN,4,2                 ; @DCR_DMA_EN
	.comm	_DCR_DATA_FIFO_RESET,4,2        ; @DCR_DATA_FIFO_RESET
	.comm	_REG_DATA_CONTROL,8,3           ; @REG_DATA_CONTROL
	.comm	_MASK_DATA,4,2                  ; @MASK_DATA
	.comm	_FIFO_URUN,4,2                  ; @FIFO_URUN
	.comm	_FIFO_ORUN,4,2                  ; @FIFO_ORUN
	.comm	_REG_CLEAR,8,3                  ; @REG_CLEAR
	.comm	_REG_DATA_TIMER,8,3             ; @REG_DATA_TIMER
	.comm	_REG_DATA_LENGTH,8,3            ; @REG_DATA_LENGTH
	.no_dead_strip	_moxart_prepare_data
.subsections_via_symbols
