	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxgb3_alloc_atid               ## -- Begin function cxgb3_alloc_atid
	.p2align	4, 0x90
_cxgb3_alloc_atid:                      ## @cxgb3_alloc_atid
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	callq	_T3C_DATA
	movq	%rax, %rbx
	leaq	20(%rax), %r12
	movq	%r12, %rdi
	callq	_spin_lock_bh
	movl	$-1, %r13d
	cmpq	$0, 24(%rbx)
	je	LBB0_3
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r14
	movq	%rbx, %rdi
	addq	$40, %rdi
	callq	_atomic_read
	addq	%r14, %rax
	movq	_MC5_MIN_TIDS@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	cmpq	8(%rbx), %rax
	jg	LBB0_3
## %bb.2:
	movq	24(%rbx), %rax
	movq	%rax, %r13
	subq	32(%rbx), %r13
	shrq	$4, %r13
	addl	16(%rbx), %r13d
	movq	(%rax), %rcx
	movq	%rcx, 24(%rbx)
	movq	%r15, 8(%rax)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	incq	(%rbx)
LBB0_3:
	movq	%r12, %rdi
	callq	_spin_unlock_bh
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MC5_MIN_TIDS,8,3               ## @MC5_MIN_TIDS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxgb3_alloc_atid               ; -- Begin function cxgb3_alloc_atid
	.p2align	2
_cxgb3_alloc_atid:                      ; @cxgb3_alloc_atid
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x2
	mov	x20, x1
	bl	_T3C_DATA
	mov	x22, x0
	add	x19, x0, #20
	mov	x0, x19
	bl	_spin_lock_bh
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x23, [x22]
	add	x0, x22, #40
	bl	_atomic_read
Lloh0:
	adrp	x8, _MC5_MIN_TIDS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MC5_MIN_TIDS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x9, x0, x23
	add	x8, x9, x8
	ldr	x9, [x22, #8]
	cmp	x8, x9
	b.le	LBB0_3
LBB0_2:
	mov	w23, #-1
	b	LBB0_4
LBB0_3:
	ldp	x8, x9, [x22, #24]
	sub	x9, x8, x9
	lsr	x9, x9, #4
	ldr	w10, [x22, #16]
	add	w23, w10, w9
	ldr	x9, [x8]
	str	x9, [x22, #24]
	stp	x20, x21, [x8]
	ldr	x8, [x22]
	add	x8, x8, #1
	str	x8, [x22]
LBB0_4:
	mov	x0, x19
	bl	_spin_unlock_bh
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MC5_MIN_TIDS,8,3               ; @MC5_MIN_TIDS
.subsections_via_symbols
