	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jz_mmc_irq_worker
_jz_mmc_irq_worker:                     ## @jz_mmc_irq_worker
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	8(%rsi), %r12
	movq	8(%r12), %rsi
	cmpq	$0, 8(%rsi)
	je	LBB0_2
## %bb.1:
	movl	$131, (%rbx)
LBB0_25:
	movq	%rbx, %rdi
	callq	_jz4740_mmc_request_done
LBB0_26:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	16(%rsi), %r14
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_10
## %bb.3:
	cmpl	$129, %eax
	je	LBB0_4
## %bb.5:
	cmpl	$130, %eax
	jne	LBB0_25
## %bb.6:
	movq	_MMC_RSP_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rsi)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_jz4740_mmc_read_response
LBB0_8:
	testq	%r14, %r14
	je	LBB0_25
## %bb.9:
	movq	%rbx, %rdi
	callq	_jz_mmc_prepare_data_transfer
LBB0_10:
	cmpl	$0, 4(%rbx)
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_jz4740_mmc_start_dma_transfer
	movl	%eax, %r15d
	movl	8(%r14), %eax
	imull	4(%r14), %eax
	movl	%eax, (%r14)
	jmp	LBB0_16
LBB0_4:
	xorl	%r15d, %r15d
LBB0_19:
	movl	(%r12), %esi
	testl	%esi, %esi
	je	LBB0_24
## %bb.20:
	movq	%rbx, %rdi
	callq	_jz4740_mmc_send_command
	movl	(%r12), %edi
	callq	_mmc_resp_type
	movq	_MMC_RSP_BUSY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_24
## %bb.21:
	movq	_JZ_MMC_IRQ_PRG_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_jz4740_mmc_poll_irq
	testl	%eax, %eax
	je	LBB0_25
## %bb.22:
	movl	$131, (%rbx)
	jmp	LBB0_26
LBB0_12:
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 12(%r14)
	je	LBB0_14
## %bb.13:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_jz4740_mmc_read_data
	jmp	LBB0_15
LBB0_14:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_jz4740_mmc_write_data
LBB0_15:
	movl	%eax, %r15d
LBB0_16:
	movl	%r15d, %edi
	callq	_unlikely
	movl	$128, %ecx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.17:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_jz4740_mmc_transfer_check_state
	movq	_JZ_MMC_IRQ_DATA_TRAN_DONE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_jz4740_mmc_poll_irq
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_unlikely
	movl	$129, %ecx
	testl	%eax, %eax
	je	LBB0_18
LBB0_23:
	movl	%ecx, (%rbx)
LBB0_24:
	testl	%r15d, %r15d
	jne	LBB0_26
	jmp	LBB0_25
LBB0_18:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_jz4740_mmc_write_irq_reg
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_RSP_PRESENT,4,2            ## @MMC_RSP_PRESENT
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_JZ_MMC_IRQ_DATA_TRAN_DONE,4,2  ## @JZ_MMC_IRQ_DATA_TRAN_DONE
	.comm	_MMC_RSP_BUSY,4,2               ## @MMC_RSP_BUSY
	.comm	_JZ_MMC_IRQ_PRG_DONE,4,2        ## @JZ_MMC_IRQ_PRG_DONE
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_jz_mmc_irq_worker
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jz_mmc_irq_worker
_jz_mmc_irq_worker:                     ; @jz_mmc_irq_worker
	.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	x19, x1
	ldr	x22, [x1, #8]
	ldr	x1, [x22, #8]
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_4
; %bb.1:
	mov	w8, #131
	str	w8, [x19]
LBB0_2:
	mov	x0, x19
	bl	_jz4740_mmc_request_done
LBB0_3:
Lloh0:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	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_4:
	ldr	x20, [x1, #16]
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_11
; %bb.5:
	cmp	w8, #129
	b.eq	LBB0_13
; %bb.6:
	cmp	w8, #130
	b.ne	LBB0_2
; %bb.7:
	ldr	w8, [x1]
Lloh3:
	adrp	x9, _MMC_RSP_PRESENT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MMC_RSP_PRESENT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_jz4740_mmc_read_response
LBB0_9:
	cbz	x20, LBB0_2
; %bb.10:
	mov	x0, x19
	bl	_jz_mmc_prepare_data_transfer
LBB0_11:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_17
; %bb.12:
	mov	x0, x19
	mov	x1, x20
	bl	_jz4740_mmc_start_dma_transfer
	mov	x21, x0
	ldp	w8, w9, [x20, #4]
	mul	w8, w9, w8
	str	w8, [x20]
	b	LBB0_21
LBB0_13:
	mov	w21, #0
	ldr	w1, [x22]
	cbz	w1, LBB0_26
LBB0_14:
	mov	x0, x19
	bl	_jz4740_mmc_send_command
	ldr	w0, [x22]
	bl	_mmc_resp_type
Lloh6:
	adrp	x8, _MMC_RSP_BUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MMC_RSP_BUSY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_26
; %bb.15:
Lloh9:
	adrp	x8, _JZ_MMC_IRQ_PRG_DONE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _JZ_MMC_IRQ_PRG_DONE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_jz4740_mmc_poll_irq
	cbz	w0, LBB0_2
; %bb.16:
	mov	w8, #131
	str	w8, [x19]
	b	LBB0_3
LBB0_17:
	ldr	w8, [x20, #12]
Lloh12:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	mov	x0, x19
	mov	x1, x20
	tst	w9, w8
	b.eq	LBB0_19
; %bb.18:
	bl	_jz4740_mmc_read_data
	b	LBB0_20
LBB0_19:
	bl	_jz4740_mmc_write_data
LBB0_20:
	mov	x21, x0
LBB0_21:
	mov	x0, x21
	bl	_unlikely
	cbz	w0, LBB0_23
; %bb.22:
	mov	w8, #128
	b	LBB0_25
LBB0_23:
	mov	x0, x19
	mov	x1, x20
	bl	_jz4740_mmc_transfer_check_state
Lloh15:
	adrp	x20, _JZ_MMC_IRQ_DATA_TRAN_DONE@GOTPAGE
Lloh16:
	ldr	x20, [x20, _JZ_MMC_IRQ_DATA_TRAN_DONE@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_jz4740_mmc_poll_irq
	mov	x21, x0
	bl	_unlikely
	cbz	w0, LBB0_27
; %bb.24:
	mov	w8, #129
LBB0_25:
	str	w8, [x19]
LBB0_26:
	cbnz	w21, LBB0_3
	b	LBB0_2
LBB0_27:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_jz4740_mmc_write_irq_reg
	ldr	w1, [x22]
	cbnz	w1, LBB0_14
	b	LBB0_26
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_RSP_PRESENT,4,2            ; @MMC_RSP_PRESENT
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_JZ_MMC_IRQ_DATA_TRAN_DONE,4,2  ; @JZ_MMC_IRQ_DATA_TRAN_DONE
	.comm	_MMC_RSP_BUSY,4,2               ; @MMC_RSP_BUSY
	.comm	_JZ_MMC_IRQ_PRG_DONE,4,2        ; @JZ_MMC_IRQ_PRG_DONE
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_jz_mmc_irq_worker
.subsections_via_symbols
