	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmatest_add_channel
_dmatest_add_channel:                   ## @dmatest_add_channel
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, 8(%rax)
	movq	%rax, %rdi
	addq	$4, %rdi
	callq	_INIT_LIST_HEAD
	movq	_DMA_MEMCPY@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	(%r12), %esi
	callq	_dma_has_cap
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_dmatest_add_threads
	movl	%eax, %r15d
	jmp	LBB0_5
LBB0_1:
	movq	%r14, %rdi
	callq	_dma_chan_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warning
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_3:
	xorl	%r15d, %r15d
LBB0_5:
	movq	_DMA_XOR@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	(%r12), %esi
	callq	_dma_has_cap
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_dmatest_add_threads
	addl	%eax, %r15d
LBB0_7:
	movq	_DMA_PQ@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	(%r12), %esi
	callq	_dma_has_cap
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_dmatest_add_threads
	cmpl	$1, %eax
	sbbl	$-1, %r15d
LBB0_9:
	movq	%r14, %rdi
	callq	_dma_chan_name
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_pr_info
	movq	_dmatest_channels@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_list_add_tail
	movq	_nr_channels@GOTPCREL(%rip), %rax
	incl	(%rax)
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dmatest: No memory for %s\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_MEMCPY,4,2                 ## @DMA_MEMCPY
	.comm	_DMA_XOR,4,2                    ## @DMA_XOR
	.comm	_DMA_PQ,4,2                     ## @DMA_PQ
L_.str.1:                               ## @.str.1
	.asciz	"dmatest: Started %u threads using %s\n"

	.comm	_dmatest_channels,4,2           ## @dmatest_channels
	.comm	_nr_channels,4,2                ## @nr_channels
	.no_dead_strip	_dmatest_add_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmatest_add_channel
_dmatest_add_channel:                   ; @dmatest_add_channel
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kmalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	str	x20, [x0, #8]
	add	x0, x0, #4
	bl	_INIT_LIST_HEAD
Lloh3:
	adrp	x21, _DMA_MEMCPY@GOTPAGE
Lloh4:
	ldr	x21, [x21, _DMA_MEMCPY@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	w1, [x22]
	bl	_dma_has_cap
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_dmatest_add_threads
	mov	x21, x0
	b	LBB0_5
LBB0_3:
	mov	x0, x20
	bl	_dma_chan_name
	mov	x1, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warning
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_4:
	mov	w21, #0
LBB0_5:
Lloh10:
	adrp	x23, _DMA_XOR@GOTPAGE
Lloh11:
	ldr	x23, [x23, _DMA_XOR@GOTPAGEOFF]
	ldr	w0, [x23]
	ldr	w1, [x22]
	bl	_dma_has_cap
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_dmatest_add_threads
	add	w21, w0, w21
LBB0_7:
Lloh12:
	adrp	x23, _DMA_PQ@GOTPAGE
Lloh13:
	ldr	x23, [x23, _DMA_PQ@GOTPAGEOFF]
	ldr	w0, [x23]
	ldr	w1, [x22]
	bl	_dma_has_cap
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_dmatest_add_threads
	cmp	w0, #0
	cinc	w21, w21, ne
LBB0_9:
	mov	x0, x20
	bl	_dma_chan_name
	mov	x2, x0
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_pr_info
Lloh16:
	adrp	x1, _dmatest_channels@GOTPAGE
Lloh17:
	ldr	x1, [x1, _dmatest_channels@GOTPAGEOFF]
	mov	x0, x19
	bl	_list_add_tail
	mov	w0, #0
Lloh18:
	adrp	x8, _nr_channels@GOTPAGE
Lloh19:
	ldr	x8, [x8, _nr_channels@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dmatest: No memory for %s\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_MEMCPY,4,2                 ; @DMA_MEMCPY
	.comm	_DMA_XOR,4,2                    ; @DMA_XOR
	.comm	_DMA_PQ,4,2                     ; @DMA_PQ
l_.str.1:                               ; @.str.1
	.asciz	"dmatest: Started %u threads using %s\n"

	.comm	_dmatest_channels,4,2           ; @dmatest_channels
	.comm	_nr_channels,4,2                ; @nr_channels
	.no_dead_strip	_dmatest_add_channel
.subsections_via_symbols
