	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxgb4_alloc_stid               ## -- Begin function cxgb4_alloc_stid
	.p2align	4, 0x90
_cxgb4_alloc_stid:                      ## @cxgb4_alloc_stid
	.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, %r12
	movl	%esi, %r15d
	movq	%rdi, %r13
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%r13), %esi
	movl	40(%r13), %edi
	cmpl	%r15d, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	callq	_find_first_zero_bit
	movl	$-1, %ebx
	cmpl	(%r13), %eax
	jge	LBB0_8
## %bb.2:
	movl	%eax, %r12d
	movl	40(%r13), %esi
	movl	%eax, %edi
	callq	___set_bit
	movl	%r12d, %ebx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	testl	%ebx, %ebx
	jns	LBB0_5
	jmp	LBB0_8
LBB0_3:
	movl	$1, %edx
	callq	_bitmap_find_free_region
	testl	%eax, %eax
	movl	$-1, %ebx
	cmovnsl	%eax, %ebx
	testl	%ebx, %ebx
	js	LBB0_8
LBB0_5:
	movq	32(%r13), %rax
	movl	%ebx, %ecx
	movq	%r12, (%rax,%rcx,8)
	addl	24(%r13), %ebx
	movq	_PF_INET6@GOTPCREL(%rip), %rcx
	movq	16(%r13), %rax
	cmpl	%r15d, (%rcx)
	jne	LBB0_7
## %bb.6:
	addq	$2, %rax
	movq	%rax, 16(%r13)
	addl	$2, 4(%r13)
	jmp	LBB0_8
LBB0_7:
	incq	%rax
	movq	%rax, 16(%r13)
LBB0_8:
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_PF_INET6,4,2                   ## @PF_INET6
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxgb4_alloc_stid               ; -- Begin function cxgb4_alloc_stid
	.p2align	2
_cxgb4_alloc_stid:                      ; @cxgb4_alloc_stid
	.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	x23, x2
	mov	x21, x1
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_spin_lock_bh
Lloh0:
	adrp	x8, _PF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w0, [x20, #40]
	ldr	w1, [x20]
	cmp	w8, w21
	b.ne	LBB0_3
; %bb.1:
	bl	_find_first_zero_bit
	ldr	w8, [x20]
	cmp	w0, w8
	b.ge	LBB0_6
; %bb.2:
	mov	x22, x0
	ldr	w1, [x20, #40]
	bl	___set_bit
	tbz	w22, #31, LBB0_4
	b	LBB0_8
LBB0_3:
	mov	w2, #1
	bl	_bitmap_find_free_region
	cmp	w0, #0
	csinv	w22, w0, wzr, ge
	tbnz	w22, #31, LBB0_8
LBB0_4:
	ldr	x8, [x20, #32]
	str	x23, [x8, w22, uxtw #3]
	ldr	w8, [x20, #24]
	add	w22, w22, w8
Lloh3:
	adrp	x8, _PF_INET6@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PF_INET6@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	ldr	x8, [x20, #16]
	cmp	w9, w21
	b.ne	LBB0_7
; %bb.5:
	add	x8, x8, #2
	str	x8, [x20, #16]
	ldr	w8, [x20, #4]
	add	w8, w8, #2
	str	w8, [x20, #4]
	b	LBB0_8
LBB0_6:
	mov	w22, #-1
	b	LBB0_8
LBB0_7:
	add	x8, x8, #1
	str	x8, [x20, #16]
LBB0_8:
	mov	x0, x19
	bl	_spin_unlock_bh
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_PF_INET6,4,2                   ; @PF_INET6
.subsections_via_symbols
