	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pl08x_dma_init_virtual_channels
_pl08x_dma_init_virtual_channels:       ## @pl08x_dma_init_virtual_channels
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movq	%rdi, %r12
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_INIT_LIST_HEAD
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	testl	%r14d, %r14d
	je	LBB0_8
## %bb.1:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	shlq	$4, %rax
	leaq	(%rax,%rax,2), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12), %rax
	movq	8(%rax), %rax
	addq	%r15, %rax
	movq	%rax, 24(%r13)
	movl	%r14d, (%r13)
	movq	%r13, %rdi
	callq	_pl08x_dma_slave_init
	movl	20(%r13), %eax
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_dbg
	movq	_pl08x_desc_free@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r13, %rdi
	addq	$16, %rdi
	movl	%eax, 16(%r13)
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_vchan_init
	incl	%r14d
	addq	$48, %r15
	cmpq	%r15, -64(%rbp)                 ## 8-byte Folded Reload
	movq	%rbx, %rax
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rbx
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r13
	movq	%r12, 40(%rax)
	movq	_PL08X_CHAN_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r13)
	movl	$-1, (%r13)
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %r12
	movl	(%rbx), %esi
	movl	$48, %edi
	callq	_kzalloc
	movq	%rax, 24(%r13)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rcx
	movq	%rcx, 8(%rax)
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rdx), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%rax)
	movl	(%r12), %edi
	movq	%rdx, %r12
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	callq	_kasprintf
	movl	%eax, 20(%r13)
	testl	%eax, %eax
	jne	LBB0_7
## %bb.12:
	movq	24(%r13), %rdi
	callq	_kfree
LBB0_10:
	movq	%r13, %rdi
	callq	_kfree
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_4
LBB0_8:
	movq	(%r12), %rdi
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	leaq	L_.str(%rip), %rax
	leaq	L_.str.4(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str.3(%rip), %rsi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_dev_info
LBB0_4:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PL08X_CHAN_IDLE,4,2            ## @PL08X_CHAN_IDLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"memcpy"

L_.str.1:                               ## @.str.1
	.asciz	"memcpy%d"

L_.str.2:                               ## @.str.2
	.asciz	"initialize virtual channel \"%s\"\n"

	.comm	_pl08x_desc_free,4,2            ## @pl08x_desc_free
L_.str.3:                               ## @.str.3
	.asciz	"initialized %d virtual %s channels\n"

L_.str.4:                               ## @.str.4
	.asciz	"slave"

	.no_dead_strip	_pl08x_dma_init_virtual_channels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pl08x_dma_init_virtual_channels
_pl08x_dma_init_virtual_channels:       ; @pl08x_dma_init_virtual_channels
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	mov	x0, x1
	bl	_INIT_LIST_HEAD
	str	w19, [sp, #12]                  ; 4-byte Folded Spill
	cbz	w19, LBB0_11
; %bb.1:
	mov	x28, #0
	mov	w23, #0
	mov	w8, #48
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	umull	x24, w9, w8
Lloh0:
	adrp	x27, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x27, [x27, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	adrp	x19, _pl08x_desc_free@GOTPAGE
Lloh3:
	ldr	x19, [x19, _pl08x_desc_free@GOTPAGEOFF]
Lloh4:
	adrp	x25, l_.str.2@PAGE
Lloh5:
	add	x25, x25, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #8]
	ldr	x8, [x8, #8]
	add	x8, x8, x28
	str	x8, [x26, #24]
	str	w23, [x26]
	mov	x0, x26
	bl	_pl08x_dma_slave_init
	ldr	w2, [x26, #20]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x21]
	mov	x1, x25
	bl	_dev_dbg
	ldr	w8, [x19]
	str	w8, [x26, #16]!
	mov	x0, x26
	mov	x1, x22
	bl	_vchan_init
	add	w23, w23, #1
	add	x28, x28, #48
	cmp	x24, x28
	b.eq	LBB0_11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x27]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x26, x0
	str	x21, [x0, #40]
Lloh6:
	adrp	x8, _PL08X_CHAN_IDLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PL08X_CHAN_IDLE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x0, #36]
	mov	w8, #-1
	str	w8, [x0]
	cbnz	w20, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x27]
	mov	w0, #48
	bl	_kzalloc
	str	x0, [x26, #24]
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh9:
	adrp	x8, l_.str@PAGE
Lloh10:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x0, #8]
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	str	w8, [x0, #32]
	ldr	w0, [x27]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x23
	bl	_kasprintf
	mov	x2, x0
	str	w0, [x26, #20]
	cbnz	w0, LBB0_3
; %bb.8:
	ldr	x0, [x26, #24]
	bl	_kfree
LBB0_9:
	mov	x0, x26
	bl	_kfree
LBB0_10:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_12
LBB0_11:
	ldr	x0, [x21]
Lloh16:
	adrp	x8, l_.str.4@PAGE
Lloh17:
	add	x8, x8, l_.str.4@PAGEOFF
	cmp	w20, #0
Lloh18:
	adrp	x9, l_.str@PAGE
Lloh19:
	add	x9, x9, l_.str@PAGEOFF
	csel	x3, x9, x8, eq
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	ldr	w19, [sp, #12]                  ; 4-byte Folded Reload
	mov	x2, x19
	bl	_dev_info
LBB0_12:
	mov	x0, x19
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PL08X_CHAN_IDLE,4,2            ; @PL08X_CHAN_IDLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"memcpy"

l_.str.1:                               ; @.str.1
	.asciz	"memcpy%d"

l_.str.2:                               ; @.str.2
	.asciz	"initialize virtual channel \"%s\"\n"

	.comm	_pl08x_desc_free,4,2            ; @pl08x_desc_free
l_.str.3:                               ; @.str.3
	.asciz	"initialized %d virtual %s channels\n"

l_.str.4:                               ; @.str.4
	.asciz	"slave"

	.no_dead_strip	_pl08x_dma_init_virtual_channels
.subsections_via_symbols
