	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function next_free_urb
_next_free_urb:                         ## @next_free_urb
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	leaq	16(%rdi), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_NUM_CPORT_OUT_URB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movq	(%rbx), %rdx
	xorl	%ecx, %ecx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rdx,%rcx,4)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%rbx), %rsi
	cmpl	$0, (%rsi,%rcx,4)
	jne	LBB0_4
## %bb.7:
	movl	$1, (%rdx,%rcx,4)
	movq	24(%rbx), %rax
	movq	(%rax,%rcx,8), %r12
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	testq	%r12, %r12
	je	LBB0_6
## %bb.8:
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
LBB0_6:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	xorl	%edi, %edi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_usb_alloc_urb                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_CPORT_OUT_URB,4,2          ## @NUM_CPORT_OUT_URB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No free CPort OUT urbs, having to dynamically allocate one!\n"

	.no_dead_strip	_next_free_urb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function next_free_urb
_next_free_urb:                         ; @next_free_urb
	.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	x19, x1
	mov	x20, x0
	add	x21, x0, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x8, _NUM_CPORT_OUT_URB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NUM_CPORT_OUT_URB@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x9, #0
	ldr	x10, [x20]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x9, lsl #2]
	cbnz	w11, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x11, [x20, #32]
	ldr	w11, [x11, x9, lsl #2]
	cbnz	w11, LBB0_2
; %bb.5:
	mov	w8, #1
	str	w8, [x10, x9, lsl #2]
	ldr	x8, [x20, #24]
	ldr	x22, [x8, x9, lsl #3]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	cbz	x22, LBB0_8
; %bb.6:
	mov	x0, x22
	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_7:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
LBB0_8:
	ldr	x0, [x20, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	w0, #0
	mov	x1, x19
	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
	b	_usb_alloc_urb
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_CPORT_OUT_URB,4,2          ; @NUM_CPORT_OUT_URB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No free CPort OUT urbs, having to dynamically allocate one!\n"

	.no_dead_strip	_next_free_urb
.subsections_via_symbols
