	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rsi), %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%rbx, 8(%rax)
	movq	%rax, %rdi
	addq	$4, %rdi
	callq	_INIT_LIST_HEAD
	movq	_DMA_MEMCPY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	callq	_dma_has_cap
	xorl	%r15d, %r15d
	movq	_dmatest@GOTPCREL(%rip), %rcx
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	cmpl	$0, (%rcx)
	jne	LBB0_5
## %bb.4:
	movq	_DMA_MEMCPY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_dmatest_add_threads
	xorl	%r15d, %r15d
	testl	%eax, %eax
	cmovgl	%eax, %r15d
LBB0_5:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_DMA_MEMSET@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	(%r13), %esi
	callq	_dma_has_cap
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	_dmatest@GOTPCREL(%rip), %rax
	cmpl	$1, (%rax)
	jne	LBB0_8
## %bb.7:
	movl	(%r14), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_dmatest_add_threads
	xorl	%ecx, %ecx
	testl	%eax, %eax
	cmovgl	%eax, %ecx
	addl	%ecx, %r15d
LBB0_8:
	movq	_DMA_XOR@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	(%r13), %esi
	callq	_dma_has_cap
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	(%r14), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_dmatest_add_threads
	xorl	%ecx, %ecx
	testl	%eax, %eax
	cmovgl	%eax, %ecx
	addl	%ecx, %r15d
LBB0_10:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_DMA_PQ@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	(%r13), %esi
	callq	_dma_has_cap
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movl	(%r14), %edx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_dmatest_add_threads
	xorl	%ecx, %ecx
	testl	%eax, %eax
	cmovgl	%eax, %ecx
	addl	%ecx, %r15d
	jmp	LBB0_13
LBB0_1:
	movq	%rbx, %rdi
	callq	_dma_chan_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_11:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dma_chan_name
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_pr_info
	leaq	4(%rbx), %rsi
	movq	%r12, %rdi
	callq	_list_add_tail
	incl	(%rbx)
	xorl	%eax, %eax
LBB0_14:
	addq	$24, %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	"No memory for %s\n"

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

	.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	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	x20, x1
	mov	x19, x0
	ldr	x23, [x1]
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	x21, x0
	str	x20, [x0, #8]
	add	x0, x0, #4
	bl	_INIT_LIST_HEAD
Lloh3:
	adrp	x22, _DMA_MEMCPY@GOTPAGE
Lloh4:
	ldr	x22, [x22, _DMA_MEMCPY@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w1, [x23]
	bl	_dma_has_cap
Lloh5:
	adrp	x24, _dmatest@GOTPAGE
Lloh6:
	ldr	x24, [x24, _dmatest@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	x0, #0
	ccmp	w8, #0, #0, ne
	b.eq	LBB0_4
; %bb.2:
	mov	w22, #0
	b	LBB0_5
LBB0_3:
	mov	x0, x20
	bl	_dma_chan_name
	mov	x1, x0
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_4:
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x21
	bl	_dmatest_add_threads
	cmp	w0, #0
	csel	w22, w0, wzr, gt
LBB0_5:
Lloh12:
	adrp	x25, _DMA_MEMSET@GOTPAGE
Lloh13:
	ldr	x25, [x25, _DMA_MEMSET@GOTPAGEOFF]
	ldr	w0, [x25]
	ldr	w1, [x23]
	bl	_dma_has_cap
	ldr	w8, [x24]
	cmp	x0, #0
	ccmp	w8, #1, #0, ne
	b.ne	LBB0_7
; %bb.6:
	ldr	w2, [x25]
	mov	x0, x19
	mov	x1, x21
	bl	_dmatest_add_threads
	cmp	w0, #0
	csel	w8, w0, wzr, gt
	add	w22, w8, w22
LBB0_7:
Lloh14:
	adrp	x24, _DMA_XOR@GOTPAGE
Lloh15:
	ldr	x24, [x24, _DMA_XOR@GOTPAGEOFF]
	ldr	w0, [x24]
	ldr	w1, [x23]
	bl	_dma_has_cap
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w2, [x24]
	mov	x0, x19
	mov	x1, x21
	bl	_dmatest_add_threads
	cmp	w0, #0
	csel	w8, w0, wzr, gt
	add	w22, w8, w22
LBB0_9:
Lloh16:
	adrp	x24, _DMA_PQ@GOTPAGE
Lloh17:
	ldr	x24, [x24, _DMA_PQ@GOTPAGEOFF]
	ldr	w0, [x24]
	ldr	w1, [x23]
	bl	_dma_has_cap
	cbz	x0, LBB0_11
; %bb.10:
	ldr	w2, [x24]
	mov	x0, x19
	mov	x1, x21
	bl	_dmatest_add_threads
	cmp	w0, #0
	csel	w8, w0, wzr, gt
	add	w22, w8, w22
LBB0_11:
	mov	x0, x20
	bl	_dma_chan_name
	mov	x2, x0
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_pr_info
	add	x1, x19, #4
	mov	x0, x21
	bl	_list_add_tail
	mov	w0, #0
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_12:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No memory for %s\n"

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

	.no_dead_strip	_dmatest_add_channel
.subsections_via_symbols
