	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3c24xx_dma_prep_memcpy
_s3c24xx_dma_prep_memcpy:               ## @s3c24xx_dma_prep_memcpy
	.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
	movq	%r8, %r13
	movq	%rcx, %r14
	movl	%edx, %r15d
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	callq	_to_s3c24xx_dma_chan
	movq	%rax, %r12
	movq	8(%rax), %rbx
	movq	(%rbx), %rdi
	movl	4(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	callq	_dev_dbg
	movq	_S3C24XX_DCON_TC_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	notq	%rax
	testq	%rax, %r14
	jne	LBB0_1
## %bb.3:
	xorl	%eax, %eax
	callq	_s3c24xx_dma_get_txd
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%rax, %rbx
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r13
	movq	%rax, %rdi
	addq	$16, %rdi
	leaq	20(%rbx), %rsi
	callq	_list_add_tail
	movl	%r15d, (%r13)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, 4(%r13)
	movq	%r14, 8(%r13)
	leal	3(%r15), %eax
	testl	%r15d, %r15d
	cmovnsl	%r15d, %eax
	andl	$-4, %eax
	subl	%eax, %r15d
	leal	3(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	andl	$-4, %eax
	subl	%eax, %ecx
	andl	$3, %r14d
	cmpq	$2, %r14
	je	LBB0_9
## %bb.7:
	movl	$1, %eax
	testq	%r14, %r14
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jne	LBB0_10
## %bb.8:
	xorl	%eax, %eax
	orl	%ecx, %r15d
	sete	%al
	leal	(%rax,%rax,2), %eax
	incl	%eax
	jmp	LBB0_10
LBB0_1:
	movq	(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	callq	_dev_err
LBB0_2:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdi
	callq	_s3c24xx_dma_free_txd
	jmp	LBB0_2
LBB0_9:
	orl	%ecx, %r15d
	andl	$-3, %r15d
	xorl	%eax, %eax
	cmpl	$1, %r15d
	adcl	$1, %eax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
LBB0_10:
	movl	%eax, (%rbx)
	movq	_S3C24XX_DISRCC_LOC_AHB@GOTPCREL(%rip), %rax
	movq	_S3C24XX_DISRCC_INC_INCREMENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 4(%rbx)
	movq	_S3C24XX_DIDSTC_LOC_AHB@GOTPCREL(%rip), %rax
	movq	_S3C24XX_DIDSTC_INC_INCREMENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 8(%rbx)
	movq	_S3C24XX_DCON_DEMAND@GOTPCREL(%rip), %rax
	movq	_S3C24XX_DCON_SYNC_HCLK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_S3C24XX_DCON_SERV_WHOLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	%ecx, 12(%rbx)
	addq	$16, %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vchan_tx_prep                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"prepare memcpy of %zu bytes from %s\n"

	.comm	_S3C24XX_DCON_TC_MASK,8,3       ## @S3C24XX_DCON_TC_MASK
L_.str.1:                               ## @.str.1
	.asciz	"memcpy size %zu to large\n"

	.comm	_GFP_NOWAIT,4,2                 ## @GFP_NOWAIT
	.comm	_S3C24XX_DISRCC_LOC_AHB,4,2     ## @S3C24XX_DISRCC_LOC_AHB
	.comm	_S3C24XX_DISRCC_INC_INCREMENT,4,2 ## @S3C24XX_DISRCC_INC_INCREMENT
	.comm	_S3C24XX_DIDSTC_LOC_AHB,4,2     ## @S3C24XX_DIDSTC_LOC_AHB
	.comm	_S3C24XX_DIDSTC_INC_INCREMENT,4,2 ## @S3C24XX_DIDSTC_INC_INCREMENT
	.comm	_S3C24XX_DCON_DEMAND,4,2        ## @S3C24XX_DCON_DEMAND
	.comm	_S3C24XX_DCON_SYNC_HCLK,4,2     ## @S3C24XX_DCON_SYNC_HCLK
	.comm	_S3C24XX_DCON_SERV_WHOLE,4,2    ## @S3C24XX_DCON_SERV_WHOLE
	.no_dead_strip	_s3c24xx_dma_prep_memcpy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3c24xx_dma_prep_memcpy
_s3c24xx_dma_prep_memcpy:               ; @s3c24xx_dma_prep_memcpy
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x4
	mov	x22, x3
	mov	x24, x2
	mov	x23, x1
	bl	_to_s3c24xx_dma_chan
	mov	x20, x0
	ldr	x21, [x0, #8]
	ldr	x0, [x21]
	ldr	w3, [x20, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_dev_dbg
Lloh2:
	adrp	x8, _S3C24XX_DCON_TC_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _S3C24XX_DCON_TC_MASK@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	bics	xzr, x22, x8
	b.ne	LBB0_6
; %bb.1:
	bl	_s3c24xx_dma_get_txd
	cbz	x0, LBB0_7
; %bb.2:
	mov	x21, x0
Lloh5:
	adrp	x8, _GFP_NOWAIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_NOWAIT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_8
; %bb.3:
	mov	x25, x0
	add	x0, x0, #16
	add	x1, x21, #20
	bl	_list_add_tail
	stp	w24, w23, [x25]
	str	x22, [x25, #8]
	negs	w8, w24
	and	w8, w8, #0x3
	and	w9, w24, #0x3
	csneg	w9, w9, w8, mi
	negs	w8, w23
	and	w8, w8, #0x3
	and	w10, w23, #0x3
	csneg	w10, w10, w8, mi
	and	x11, x22, #0x3
	mov	w8, #1
	cmp	x11, #2
	b.eq	LBB0_9
; %bb.4:
	cbnz	x11, LBB0_10
; %bb.5:
	orr	w8, w9, w10
	cmp	w8, #0
	mov	w8, #4
	csinc	w8, w8, wzr, eq
	b	LBB0_10
LBB0_6:
	ldr	x0, [x21]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	bl	_dev_err
LBB0_7:
	mov	x0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x0, x21
	bl	_s3c24xx_dma_free_txd
	b	LBB0_7
LBB0_9:
	orr	w9, w9, w10
	tst	w9, #0xfffffffd
	cinc	w8, w8, eq
LBB0_10:
	str	w8, [x21]
Lloh10:
	adrp	x8, _S3C24XX_DISRCC_LOC_AHB@GOTPAGE
Lloh11:
	ldr	x8, [x8, _S3C24XX_DISRCC_LOC_AHB@GOTPAGEOFF]
Lloh12:
	adrp	x9, _S3C24XX_DISRCC_INC_INCREMENT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _S3C24XX_DISRCC_INC_INCREMENT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh16:
	adrp	x9, _S3C24XX_DIDSTC_LOC_AHB@GOTPAGE
Lloh17:
	ldr	x9, [x9, _S3C24XX_DIDSTC_LOC_AHB@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _S3C24XX_DIDSTC_INC_INCREMENT@GOTPAGE
Lloh20:
	ldr	x10, [x10, _S3C24XX_DIDSTC_INC_INCREMENT@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	orr	w9, w10, w9
	stp	w8, w9, [x21, #4]
Lloh22:
	adrp	x8, _S3C24XX_DCON_DEMAND@GOTPAGE
Lloh23:
	ldr	x8, [x8, _S3C24XX_DCON_DEMAND@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _S3C24XX_DCON_SYNC_HCLK@GOTPAGE
Lloh26:
	ldr	x9, [x9, _S3C24XX_DCON_SYNC_HCLK@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh28:
	adrp	x9, _S3C24XX_DCON_SERV_WHOLE@GOTPAGE
Lloh29:
	ldr	x9, [x9, _S3C24XX_DCON_SERV_WHOLE@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x21, #12]
	orr	w8, w8, w9
	str	w8, [x21, #12]
	add	x1, x21, #16
	mov	x0, x20
	mov	x2, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_vchan_tx_prep
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"prepare memcpy of %zu bytes from %s\n"

	.comm	_S3C24XX_DCON_TC_MASK,8,3       ; @S3C24XX_DCON_TC_MASK
l_.str.1:                               ; @.str.1
	.asciz	"memcpy size %zu to large\n"

	.comm	_GFP_NOWAIT,4,2                 ; @GFP_NOWAIT
	.comm	_S3C24XX_DISRCC_LOC_AHB,4,2     ; @S3C24XX_DISRCC_LOC_AHB
	.comm	_S3C24XX_DISRCC_INC_INCREMENT,4,2 ; @S3C24XX_DISRCC_INC_INCREMENT
	.comm	_S3C24XX_DIDSTC_LOC_AHB,4,2     ; @S3C24XX_DIDSTC_LOC_AHB
	.comm	_S3C24XX_DIDSTC_INC_INCREMENT,4,2 ; @S3C24XX_DIDSTC_INC_INCREMENT
	.comm	_S3C24XX_DCON_DEMAND,4,2        ; @S3C24XX_DCON_DEMAND
	.comm	_S3C24XX_DCON_SYNC_HCLK,4,2     ; @S3C24XX_DCON_SYNC_HCLK
	.comm	_S3C24XX_DCON_SERV_WHOLE,4,2    ; @S3C24XX_DCON_SERV_WHOLE
	.no_dead_strip	_s3c24xx_dma_prep_memcpy
.subsections_via_symbols
