	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_dmae_chan_probe
_sh_dmae_chan_probe:                    ## @sh_dmae_chan_probe
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	24(%rdi), %rax
	movq	(%rax), %r14
	movl	16(%rdi), %edi
	callq	_to_platform_device
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	16(%r12), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movslq	%ebx, %r14
	leaq	16(%r12), %rdi
	movq	%rax, %r15
	addq	$16, %r15
	movq	_SH_DMA_TCR_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	incq	%rax
	movq	%rax, 16(%r13)
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_shdma_chan_probe
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r14,8), %rax
	addq	8(%r12), %rax
	movq	%rax, 8(%r13)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movl	(%r13), %edi
	testq	%rcx, %rcx
	js	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%ebx, %r14d
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_snprintf
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str.1(%rip), %rdx
	movl	$4, %esi
	movl	%ebx, %r14d
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_snprintf
LBB0_5:
	movl	(%r13), %ecx
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	callq	_shdma_request_irq
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	callq	_dev_err
	movq	%r15, %rdi
	callq	_shdma_chan_remove
	jmp	LBB0_8
LBB0_7:
	movq	(%r12), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%r13, (%rax,%rcx,8)
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$56, %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	_SH_DMA_TCR_MAX,8,3             ## @SH_DMA_TCR_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sh-dmae%d.%d"

L_.str.1:                               ## @.str.1
	.asciz	"sh-dma%d"

L_.str.2:                               ## @.str.2
	.asciz	"DMA channel %d request_irq error %d\n"

	.no_dead_strip	_sh_dmae_chan_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_dmae_chan_probe
_sh_dmae_chan_probe:                    ; @sh_dmae_chan_probe
	.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	x22, x3
	mov	x23, x2
	mov	x19, x1
	mov	x20, x0
	mov	x21, x0
	ldr	w0, [x21, #16]!
	ldr	x8, [x21, #8]
	ldr	x28, [x8]
	bl	_to_platform_device
	mov	x26, x0
	ldr	w0, [x21]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x24, x0
Lloh3:
	adrp	x8, _SH_DMA_TCR_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SH_DMA_TCR_MAX@GOTPAGEOFF]
	sxtw	x27, w19
Lloh5:
	ldr	x8, [x8]
	add	x8, x8, #1
	mov	x25, x0
	str	x8, [x25, #16]!
	mov	x0, x21
	mov	x1, x25
	mov	x2, x19
	bl	_shdma_chan_probe
	ldr	x8, [x20, #8]
	ldr	x9, [x28, x27, lsl #3]
	add	x8, x9, x8
	str	x8, [x24, #8]
	ldr	x3, [x26]
	ldr	w0, [x24]
	tbnz	x3, #63, LBB0_4
; %bb.2:
	mov	x8, x19
	str	x8, [sp]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
                                        ; kill: def $w3 killed $w3 killed $x3
	b	LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_8
LBB0_4:
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #4
	mov	x3, x19
LBB0_5:
	bl	_snprintf
	ldr	w3, [x24]
	mov	x0, x25
	mov	x1, x23
	mov	x2, x22
	bl	_shdma_request_irq
	mov	x22, x0
	cbz	w0, LBB0_7
; %bb.6:
	ldr	w0, [x21]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	mov	x3, x22
	bl	_dev_err
	mov	x0, x25
	bl	_shdma_chan_remove
	b	LBB0_8
LBB0_7:
	ldr	x8, [x20]
	str	x24, [x8, x27, lsl #3]
LBB0_8:
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SH_DMA_TCR_MAX,8,3             ; @SH_DMA_TCR_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sh-dmae%d.%d"

l_.str.1:                               ; @.str.1
	.asciz	"sh-dma%d"

l_.str.2:                               ; @.str.2
	.asciz	"DMA channel %d request_irq error %d\n"

	.no_dead_strip	_sh_dmae_chan_probe
.subsections_via_symbols
