	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3c24xx_dma_get_phy
_s3c24xx_dma_get_phy:                   ## @s3c24xx_dma_get_phy
	.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	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r12
	movq	16(%r12), %rax
	cmpl	$0, (%rax)
	jle	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movq	16(%r12), %rax
	movslq	(%rax), %rcx
	addq	$24, %r14
	cmpq	%rcx, %rbx
	jge	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %r15
	leaq	(%r15,%r14), %r13
	cmpl	$0, 20(%r15,%r14)
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_s3c24xx_dma_phy_valid
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	leaq	(%r15,%r14), %r13
	addq	$16, %r13
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, (%r15,%r14)
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_8
LBB0_1:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
LBB0_9:
	cmpl	(%rax), %ebx
	jne	LBB0_11
LBB0_10:
	movq	(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_14
LBB0_6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r15,%r14)
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movq	16(%r12), %rax
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	cmpl	(%rax), %ebx
	je	LBB0_10
LBB0_11:
	movq	8(%r12), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.12:
	movl	12(%r13), %edi
	callq	_clk_enable
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:
	movq	(%r12), %rdi
	movl	8(%r13), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %ecx
	callq	_dev_err
	movq	$0, (%r13)
LBB0_14:
	xorl	%r13d, %r13d
LBB0_15:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no phy channel available\n"

L_.str.1:                               ## @.str.1
	.asciz	"could not enable clock for channel %d, err %d\n"

	.no_dead_strip	_s3c24xx_dma_get_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3c24xx_dma_get_phy
_s3c24xx_dma_get_phy:                   ; @s3c24xx_dma_get_phy
	.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
	ldr	x22, [x0]
	ldr	x8, [x22, #16]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x20, x0
	mov	x9, #0
	mov	x23, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	ldr	x8, [x22, #16]
	ldrsw	x10, [x8]
	add	x9, x24, #24
	cmp	x23, x10
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x24, x9
	ldr	x25, [x22, #24]
	add	x1, x25, x9
	ldr	w8, [x1, #20]
	cbz	w8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_s3c24xx_dma_phy_valid
	cbz	w0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x19, x25, x24
	add	x21, x19, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x19]
	cbz	x8, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	b	LBB0_2
LBB0_7:
	add	x19, x25, x24
	b	LBB0_10
LBB0_8:
	mov	w23, #0
	mov	x19, #0
	b	LBB0_10
LBB0_9:
	mov	x0, x19
	str	x20, [x0], #16
	bl	_spin_unlock_irqrestore
	ldr	x8, [x22, #16]
LBB0_10:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ne	LBB0_12
; %bb.11:
	ldr	x0, [x22]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	b	LBB0_15
LBB0_12:
	ldr	x8, [x22, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_16
; %bb.13:
	ldr	w0, [x19, #12]
	bl	_clk_enable
	cbz	w0, LBB0_16
; %bb.14:
	mov	x3, x0
	ldr	x0, [x22]
	ldr	w2, [x19, #8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	str	xzr, [x19]
LBB0_15:
	mov	x19, #0
LBB0_16:
	mov	x0, 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
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no phy channel available\n"

l_.str.1:                               ; @.str.1
	.asciz	"could not enable clock for channel %d, err %d\n"

	.no_dead_strip	_s3c24xx_dma_get_phy
.subsections_via_symbols
