	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmae_find_slave
_dmae_find_slave:                       ## @dmae_find_slave
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_to_sh_dev
	movq	(%rax), %rax
	movq	8(%r14), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_1
## %bb.6:
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_11
## %bb.7:
	movq	8(%rax), %rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%ebx, 4(%rax)
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	incl	%edx
	addq	$8, %rax
	cmpl	%edx, %ecx
	jne	LBB0_8
	jmp	LBB0_11
LBB0_1:
	movq	_SH_DMA_SLAVE_NUMBER@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	jle	LBB0_11
## %bb.2:
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_11
## %bb.3:
	movq	8(%rax), %rax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%ebx, (%rax)
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	addq	$8, %rax
	decl	%ecx
	jne	LBB0_4
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_9:
	movl	%edx, (%r14)
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SH_DMA_SLAVE_NUMBER,4,2        ## @SH_DMA_SLAVE_NUMBER
	.no_dead_strip	_dmae_find_slave
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmae_find_slave
_dmae_find_slave:                       ; @dmae_find_slave
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	bl	_to_sh_dev
	ldr	x10, [x0]
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_5
; %bb.1:
	ldr	w8, [x10]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.2:
	mov	w9, #0
	ldr	x0, [x10, #8]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x0, #4]
	cmp	w10, w19
	b.eq	LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w9, w9, #1
	add	x0, x0, #8
	cmp	w8, w9
	b.ne	LBB0_3
	b	LBB0_10
LBB0_5:
Lloh0:
	adrp	x8, _SH_DMA_SLAVE_NUMBER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SH_DMA_SLAVE_NUMBER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w19
	b.le	LBB0_10
; %bb.6:
	ldr	w8, [x10]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.7:
	ldr	x0, [x10, #8]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x0]
	cmp	w9, w19
	b.eq	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x0, x0, #8
	subs	w8, w8, #1
	b.ne	LBB0_8
LBB0_10:
	mov	x0, #0
	b	LBB0_12
LBB0_11:
	str	w9, [x20]
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SH_DMA_SLAVE_NUMBER,4,2        ; @SH_DMA_SLAVE_NUMBER
	.no_dead_strip	_dmae_find_slave
.subsections_via_symbols
