	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3cmci_dma_done_callback
_s3cmci_dma_done_callback:              ## @s3cmci_dma_done_callback
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rbx
	movq	_S3C2410_SDICMDSTAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	40(%rsi), %rdi
	callq	_readl
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_S3C2410_SDIDSTA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	40(%rbx), %rdi
	callq	_readl
	movl	%eax, %r14d
	movq	_S3C2410_SDIFSTA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	40(%rbx), %rdi
	callq	_readl
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_S3C2410_SDIDCNT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	40(%rbx), %rdi
	callq	_readl
	movl	%eax, %r13d
	xorl	%edi, %edi
	cmpq	$0, 16(%rbx)
	sete	%dil
	callq	_BUG_ON
	movq	16(%rbx), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	sete	%dil
	callq	_BUG_ON
	xorl	%edi, %edi
	cmpq	$0, 32(%rbx)
	sete	%dil
	callq	_BUG_ON
	leaq	24(%rbx), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %r10
	movq	_S3C2410_RES_OK@GOTPCREL(%rip), %rax
	cmpl	%r10d, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	32(%rbx), %r10
	decq	%r10
	movq	%r10, 32(%rbx)
	movq	_dbg_dma@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	je	LBB0_4
## %bb.3:
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r14d, %r8d
	movl	%r13d, %r9d
	xorl	%eax, %eax
	pushq	%r10
	callq	_dbg
	addq	$16, %rsp
	jmp	LBB0_5
LBB0_1:
	movq	_dbg_fail@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	subq	$8, %rsp
	leaq	L_.str(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%r14d, %r8d
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	xorl	%eax, %eax
	pushq	32(%rbx)
	pushq	%r10
	pushq	%r13
	callq	_dbg
	addq	$32, %rsp
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movl	%r15d, (%rax)
	movq	_COMPLETION_FINALIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_clear_imask
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r14d, %r8d
	movl	%r13d, %r9d
	xorl	%eax, %eax
	callq	_dbg
	movl	$1, (%rbx)
	movq	_COMPLETION_FINALIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
LBB0_5:
	addq	$28, %rbx
	movq	%rbx, %rdi
	callq	_tasklet_schedule
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_S3C2410_SDICMDSTAT,8,3         ## @S3C2410_SDICMDSTAT
	.comm	_S3C2410_SDIDSTA,8,3            ## @S3C2410_SDIDSTA
	.comm	_S3C2410_SDIFSTA,8,3            ## @S3C2410_SDIFSTA
	.comm	_S3C2410_SDIDCNT,8,3            ## @S3C2410_SDIDCNT
	.comm	_S3C2410_RES_OK,4,2             ## @S3C2410_RES_OK
	.comm	_dbg_fail,4,2                   ## @dbg_fail
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA FAILED: csta=0x%08x dsta=0x%08x fsta=0x%08x dcnt:0x%08x result:0x%08x toGo:%u\n"

	.comm	_dbg_dma,4,2                    ## @dbg_dma
L_.str.1:                               ## @.str.1
	.asciz	"DMA DONE  Size:%i DSTA:[%08x] DCNT:[%08x] toGo:%u\n"

L_.str.2:                               ## @.str.2
	.asciz	"DMA FINISHED Size:%i DSTA:%08x DCNT:%08x\n"

	.comm	_COMPLETION_FINALIZE,8,3        ## @COMPLETION_FINALIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_s3cmci_dma_done_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3cmci_dma_done_callback
_s3cmci_dma_done_callback:              ; @s3cmci_dma_done_callback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x3
	mov	x21, x2
	mov	x19, x1
	ldr	x8, [x1, #40]
Lloh0:
	adrp	x9, _S3C2410_SDICMDSTAT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _S3C2410_SDICMDSTAT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x24, x0
	ldr	x8, [x19, #40]
Lloh3:
	adrp	x9, _S3C2410_SDIDSTA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _S3C2410_SDIDSTA@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x20, x0
	ldr	x8, [x19, #40]
Lloh6:
	adrp	x9, _S3C2410_SDIFSTA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _S3C2410_SDIFSTA@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x26, x0
	ldr	x8, [x19, #40]
Lloh9:
	adrp	x9, _S3C2410_SDIDCNT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _S3C2410_SDIDCNT@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x25, x0
	ldr	x8, [x19, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x8, [x19, #32]
	cmp	x8, #0
	cset	w0, eq
	bl	_BUG_ON
	add	x22, x19, #24
	mov	x0, x22
	bl	_spin_lock_irqsave
Lloh12:
	adrp	x8, _S3C2410_RES_OK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _S3C2410_RES_OK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, w23
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x19, #32]
Lloh15:
	adrp	x9, _dbg_dma@GOTPAGE
Lloh16:
	ldr	x9, [x9, _dbg_dma@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x9]
	subs	x8, x8, #1
	str	x8, [x19, #32]
	b.eq	LBB0_4
; %bb.2:
	str	x8, [sp]
Lloh18:
	adrp	x2, l_.str.1@PAGE
Lloh19:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	mov	x4, x20
	mov	x5, x25
	bl	_dbg
	b	LBB0_5
LBB0_3:
Lloh20:
	adrp	x8, _dbg_fail@GOTPAGE
Lloh21:
	ldr	x8, [x8, _dbg_fail@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldr	x8, [x19, #32]
	stp	x23, x8, [sp, #8]
	str	x25, [sp]
Lloh23:
	adrp	x2, l_.str@PAGE
Lloh24:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x24
	mov	x4, x20
	mov	x5, x26
	bl	_dbg
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w8, w8
	ldr	x9, [x19, #16]
	ldr	x9, [x9]
	str	w8, [x9]
Lloh28:
	adrp	x8, _COMPLETION_FINALIZE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _COMPLETION_FINALIZE@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_clear_imask
	b	LBB0_5
LBB0_4:
Lloh31:
	adrp	x2, l_.str.2@PAGE
Lloh32:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	mov	x4, x20
	mov	x5, x25
	bl	_dbg
	mov	w8, #1
	str	w8, [x19]
Lloh33:
	adrp	x8, _COMPLETION_FINALIZE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _COMPLETION_FINALIZE@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_5:
	add	x0, x19, #28
	bl	_tasklet_schedule
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_S3C2410_SDICMDSTAT,8,3         ; @S3C2410_SDICMDSTAT
	.comm	_S3C2410_SDIDSTA,8,3            ; @S3C2410_SDIDSTA
	.comm	_S3C2410_SDIFSTA,8,3            ; @S3C2410_SDIFSTA
	.comm	_S3C2410_SDIDCNT,8,3            ; @S3C2410_SDIDCNT
	.comm	_S3C2410_RES_OK,4,2             ; @S3C2410_RES_OK
	.comm	_dbg_fail,4,2                   ; @dbg_fail
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA FAILED: csta=0x%08x dsta=0x%08x fsta=0x%08x dcnt:0x%08x result:0x%08x toGo:%u\n"

	.comm	_dbg_dma,4,2                    ; @dbg_dma
l_.str.1:                               ; @.str.1
	.asciz	"DMA DONE  Size:%i DSTA:[%08x] DCNT:[%08x] toGo:%u\n"

l_.str.2:                               ; @.str.2
	.asciz	"DMA FINISHED Size:%i DSTA:%08x DCNT:%08x\n"

	.comm	_COMPLETION_FINALIZE,8,3        ; @COMPLETION_FINALIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_s3cmci_dma_done_callback
.subsections_via_symbols
