	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_adma_request_alloc
_tegra_adma_request_alloc:              ## @tegra_adma_request_alloc
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	cmpl	$0, 4(%rdi)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	cmpl	%r14d, 8(%rbx)
	cmovel	%edx, %eax
	jmp	LBB0_13
LBB0_2:
	movq	16(%rbx), %r15
	movl	(%rbx), %edi
	movq	16(%r15), %rax
	cmpl	(%rax), %edi
	jbe	LBB0_6
## %bb.3:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_6:
	cmpl	$129, %r14d
	je	LBB0_11
## %bb.7:
	cmpl	$128, %r14d
	jne	LBB0_14
## %bb.8:
	leaq	8(%r15), %rsi
	jmp	LBB0_9
LBB0_11:
	leaq	4(%r15), %rsi
LBB0_9:
	callq	_test_and_set_bit
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	callq	_dev_err
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	(%r15), %r14d
	addq	$12, %rbx
	movq	%rbx, %rdi
	callq	_dma_chan_name
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_dev_WARN
	jmp	LBB0_5
LBB0_12:
	movl	%r14d, 8(%rbx)
	movl	$1, 4(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid DMA request\n"

L_.str.1:                               ## @.str.1
	.asciz	"DMA request reserved\n"

L_.str.2:                               ## @.str.2
	.asciz	"channel %s has invalid transfer type\n"

	.no_dead_strip	_tegra_adma_request_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_adma_request_alloc
_tegra_adma_request_alloc:              ; @tegra_adma_request_alloc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w8, [x19, #8]
Lloh0:
	adrp	x9, _EINVAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w20
	csneg	w0, wzr, w9, eq
	b	LBB0_10
LBB0_2:
	ldr	x21, [x19, #16]
	ldr	w0, [x19]
	ldr	x8, [x21, #16]
	ldr	w8, [x8]
	cmp	w0, w8
	b.ls	LBB0_4
; %bb.3:
	ldr	w0, [x21]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_4:
	cmp	w20, #129
	b.eq	LBB0_11
; %bb.5:
	cmp	w20, #128
	b.ne	LBB0_13
; %bb.6:
	add	x1, x21, #8
	bl	_test_and_set_bit
	cbz	w0, LBB0_12
LBB0_7:
	ldr	w0, [x21]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
	bl	_dev_err
LBB0_9:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
	add	x1, x21, #4
	bl	_test_and_set_bit
	cbnz	w0, LBB0_7
LBB0_12:
	mov	w0, #0
	mov	w8, #1
	stp	w8, w20, [x19, #4]
	b	LBB0_10
LBB0_13:
	ldr	w20, [x21]
	add	x0, x19, #12
	bl	_dma_chan_name
	mov	x2, x0
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_WARN
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid DMA request\n"

l_.str.1:                               ; @.str.1
	.asciz	"DMA request reserved\n"

l_.str.2:                               ; @.str.2
	.asciz	"channel %s has invalid transfer type\n"

	.no_dead_strip	_tegra_adma_request_alloc
.subsections_via_symbols
