	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prism2_get_txfid_idx
_prism2_get_txfid_idx:                  ## @prism2_get_txfid_idx
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	24(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%r15), %ecx
	movq	8(%r15), %rax
	movq	_PRISM2_TXFID_EMPTY@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_PRISM2_TXFID_COUNT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	xorl	%r8d, %r8d
	movl	%ecx, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %rdi
	cmpq	%rdx, (%rax,%rdi,8)
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	cmpl	%esi, %ebx
	cmovgel	%r8d, %ebx
	cmpl	%ecx, %ebx
	jne	LBB0_1
## %bb.4:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_DEBUG_EXTRA2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_PDEBUG
	movq	16(%r15), %rax
	incl	(%rax)
	movl	$-1, %ebx
	jmp	LBB0_5
LBB0_2:
	movq	_PRISM2_TXFID_RESERVED@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax,%rdi,8)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PRISM2_TXFID_EMPTY,8,3         ## @PRISM2_TXFID_EMPTY
	.comm	_PRISM2_TXFID_RESERVED,8,3      ## @PRISM2_TXFID_RESERVED
	.comm	_PRISM2_TXFID_COUNT,4,2         ## @PRISM2_TXFID_COUNT
	.comm	_DEBUG_EXTRA2,4,2               ## @DEBUG_EXTRA2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"prism2_get_txfid_idx: no room in txfid buf: packet dropped\n"

	.no_dead_strip	_prism2_get_txfid_idx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prism2_get_txfid_idx
_prism2_get_txfid_idx:                  ; @prism2_get_txfid_idx
	.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, x0
	add	x20, x0, #24
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w9, [x19]
Lloh0:
	adrp	x10, _PRISM2_TXFID_EMPTY@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PRISM2_TXFID_EMPTY@GOTPAGEOFF]
	ldr	x8, [x19, #8]
Lloh2:
	ldr	x10, [x10]
Lloh3:
	adrp	x11, _PRISM2_TXFID_COUNT@GOTPAGE
Lloh4:
	ldr	x11, [x11, _PRISM2_TXFID_COUNT@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	mov	x21, x9
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x8, w21, sxtw #3]
	cmp	x12, x10
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w12, w21, #1
	cmp	w12, w11
	csinc	w21, wzr, w21, ge
	cmp	w21, w9
	b.ne	LBB0_1
; %bb.3:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
Lloh6:
	adrp	x8, _DEBUG_EXTRA2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DEBUG_EXTRA2@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
	ldr	x8, [x19, #16]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	mov	w21, #-1
	b	LBB0_5
LBB0_4:
	sxtw	x9, w21
Lloh11:
	adrp	x10, _PRISM2_TXFID_RESERVED@GOTPAGE
Lloh12:
	ldr	x10, [x10, _PRISM2_TXFID_RESERVED@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	str	x10, [x8, x9, lsl #3]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_5:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PRISM2_TXFID_EMPTY,8,3         ; @PRISM2_TXFID_EMPTY
	.comm	_PRISM2_TXFID_RESERVED,8,3      ; @PRISM2_TXFID_RESERVED
	.comm	_PRISM2_TXFID_COUNT,4,2         ; @PRISM2_TXFID_COUNT
	.comm	_DEBUG_EXTRA2,4,2               ; @DEBUG_EXTRA2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"prism2_get_txfid_idx: no room in txfid buf: packet dropped\n"

	.no_dead_strip	_prism2_get_txfid_idx
.subsections_via_symbols
