	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcba_usb_get_free_ctx
_mcba_usb_get_free_ctx:                 ## @mcba_usb_get_free_ctx
	.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
	movq	%rdi, %r14
	movq	_MCBA_MAX_TX_URBS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.1:
	movq	8(%r14), %rbx
	movq	_MCBA_CTX_FREE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rcx, (%rbx)
	je	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdx
	addq	$24, %rbx
	cmpq	%rdx, %rax
	jne	LBB0_2
LBB0_8:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_3:
	movq	%rdx, (%rbx)
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.5:
	movq	(%rsi), %rcx
	movl	$1, %eax
	jmp	LBB0_6
LBB0_4:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
LBB0_6:
	movl	%eax, 8(%rbx)
	movq	%rcx, 16(%rbx)
	leaq	4(%r14), %rdi
	callq	_atomic_dec
LBB0_9:
	leaq	4(%r14), %rdi
	callq	_atomic_read
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movl	(%r14), %edi
	callq	_netif_stop_queue
LBB0_11:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MCBA_MAX_TX_URBS,4,2           ## @MCBA_MAX_TX_URBS
	.comm	_MCBA_CTX_FREE,8,3              ## @MCBA_CTX_FREE
	.no_dead_strip	_mcba_usb_get_free_ctx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcba_usb_get_free_ctx
_mcba_usb_get_free_ctx:                 ; @mcba_usb_get_free_ctx
	.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, x0
Lloh0:
	adrp	x8, _MCBA_MAX_TX_URBS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MCBA_MAX_TX_URBS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x9, #0
	ldr	x20, [x19, #8]
Lloh3:
	adrp	x10, _MCBA_CTX_FREE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MCBA_CTX_FREE@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x20]
	cmp	x11, x10
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #1
	add	x20, x20, #24
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_4:
	mov	x20, #0
	b	LBB0_9
LBB0_5:
	str	x9, [x20]
	cbz	x1, LBB0_7
; %bb.6:
	ldr	x8, [x1]
	mov	w9, #1
	b	LBB0_8
LBB0_7:
	mov	w9, #0
	mov	x8, #0
LBB0_8:
	str	w9, [x20, #8]
	str	x8, [x20, #16]
	add	x0, x19, #4
	bl	_atomic_dec
LBB0_9:
	add	x0, x19, #4
	bl	_atomic_read
	cbnz	w0, LBB0_11
; %bb.10:
	ldr	w0, [x19]
	bl	_netif_stop_queue
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MCBA_MAX_TX_URBS,4,2           ; @MCBA_MAX_TX_URBS
	.comm	_MCBA_CTX_FREE,8,3              ; @MCBA_CTX_FREE
	.no_dead_strip	_mcba_usb_get_free_ctx
.subsections_via_symbols
