	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm_find_master_chan
_stm_find_master_chan:                  ## @stm_find_master_chan
	.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
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	(%rdx), %ebx
	cmpl	%ecx, %ebx
	jbe	LBB0_1
LBB0_8:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r8, %r12
	movl	%ecx, %r13d
	movl	%esi, %r15d
	movq	%rdi, %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	%r13d, %ebx
	ja	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_stm_master
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_stp_master_alloc
	testl	%eax, %eax
	jne	LBB0_9
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_stm_master
	cmpl	$0, 4(%rax)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %edi
	movl	(%r12), %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r15d, %ecx
	callq	_find_free_channels
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%ebx, (%rcx)
	movl	%eax, (%r12)
	xorl	%eax, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.no_dead_strip	_stm_find_master_chan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm_find_master_chan
_stm_find_master_chan:                  ; @stm_find_master_chan
	.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
	ldr	w23, [x2]
	cmp	w23, w3
	b.ls	LBB0_3
LBB0_1:
Lloh0:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_2:
	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
LBB0_3:
	mov	x20, x5
	mov	x19, x4
	mov	x22, x3
	mov	x21, x2
	mov	x24, x1
	mov	x25, x0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w23, w23, #1
	cmp	w23, w22
	b.hi	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	mov	x1, x23
	bl	_stm_master
	cbnz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x25
	mov	x1, x23
	bl	_stp_master_alloc
	cbnz	w0, LBB0_2
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x25
	mov	x1, x23
	bl	_stm_master
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x0]
	ldr	w1, [x19]
	mov	x2, x20
	mov	x3, x24
	bl	_find_free_channels
	tbnz	w0, #31, LBB0_4
; %bb.9:
	mov	x8, x0
	mov	w0, #0
	str	w23, [x21]
	str	w8, [x19]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.no_dead_strip	_stm_find_master_chan
.subsections_via_symbols
