	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nix_txschq_free_one
_nix_txschq_free_one:                   ## @nix_txschq_free_one
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movq	8(%rsi), %r12
	movq	_BLKTYPE_NIX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdx
	callq	_rvu_get_blkaddr
	testl	%eax, %eax
	js	LBB0_10
## %bb.1:
	movq	8(%r15), %rdi
	movl	%eax, %esi
	movl	%eax, %r13d
	callq	_get_nix_hw
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%r13d, -68(%rbp)                ## 4-byte Spill
	movl	%r13d, %esi
	shlq	$2, %rsi
	addq	(%r14), %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_rvu_get_lf
	testl	%eax, %eax
	js	LBB0_10
## %bb.3:
	movslq	(%rbx), %rsi
	movq	_NIX_TXSCH_LVL_TL2@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	jg	LBB0_13
## %bb.4:
	movq	%r15, %rdx
	movslq	4(%rbx), %r14
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %r15
	movq	%rsi, %rbx
	shlq	$4, %rbx
	cmpl	8(%r15,%rbx), %r14d
	jge	LBB0_13
## %bb.5:
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	(%r15,%rbx), %r13
	movq	%rdx, %rdi
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	(%r13,%r14,8), %rdi
	callq	_TXSCH_MAP_FUNC
	cmpq	%r12, %rax
	jne	LBB0_12
## %bb.6:
	leaq	(%r15,%rbx), %r12
	addq	$8, %r12
	addq	%rbx, %r15
	movq	_NIX_TXSCH_LVL_SMQ@GOTPCREL(%rip), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpl	(%rax), %ecx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_9
## %bb.7:
	movl	%r14d, %edi
	callq	_NIX_AF_SMQX_CFG
	movq	%rbx, %rdi
	movl	-68(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_rvu_read64
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	$50, %edi
	callq	_BIT_ULL
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %r12d
	movl	$49, %edi
	callq	_BIT_ULL
	orl	%eax, %r12d
	orl	-60(%rbp), %r12d                ## 4-byte Folded Reload
	movl	%r14d, %edi
	callq	_NIX_AF_SMQX_CFG
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	movl	%r12d, %ecx
	callq	_rvu_write64
	movl	%r14d, %edi
	callq	_NIX_AF_SMQX_CFG
	movl	%eax, %r12d
	movl	$49, %edi
	callq	_BIT_ULL
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	%eax, %ecx
	movl	$1, %r8d
	callq	_rvu_poll_reg
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	movl	%r14d, %ecx
	callq	_dev_err
LBB0_9:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_rvu_free_rsrc
	movq	(%r15), %rax
	movq	$0, (%rax,%r14,8)
	movq	%rbx, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_10:
	movq	_NIX_AF_ERR_AF_LF_INVALID@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_15
LBB0_12:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_13:
	movq	_NIX_AF_ERR_TLX_INVALID@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLKTYPE_NIX,4,2                ## @BLKTYPE_NIX
	.comm	_NIX_AF_ERR_AF_LF_INVALID,4,2   ## @NIX_AF_ERR_AF_LF_INVALID
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NIX_TXSCH_LVL_TL2,4,2          ## @NIX_TXSCH_LVL_TL2
	.comm	_NIX_TXSCH_LVL_SMQ,4,2          ## @NIX_TXSCH_LVL_SMQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NIXLF%d: SMQ%d flush failed\n"

	.comm	_NIX_AF_ERR_TLX_INVALID,4,2     ## @NIX_AF_ERR_TLX_INVALID
	.no_dead_strip	_nix_txschq_free_one
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nix_txschq_free_one
_nix_txschq_free_one:                   ; @nix_txschq_free_one
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	ldr	x24, [x1, #8]
Lloh0:
	adrp	x8, _BLKTYPE_NIX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLKTYPE_NIX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x24
	bl	_rvu_get_blkaddr
	tbnz	w0, #31, LBB0_10
; %bb.1:
	mov	x20, x0
	ldr	x0, [x19, #8]
	mov	x1, x20
	bl	_get_nix_hw
	cbz	x0, LBB0_11
; %bb.2:
	mov	x23, x0
	ldr	x8, [x21]
	add	x1, x8, w20, uxtw #2
	mov	x0, x19
	mov	x2, x24
	mov	w3, #0
	bl	_rvu_get_lf
	tbnz	w0, #31, LBB0_10
; %bb.3:
	ldrsw	x25, [x22]
Lloh3:
	adrp	x8, _NIX_TXSCH_LVL_TL2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NIX_TXSCH_LVL_TL2@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w25, w8
	b.gt	LBB0_13
; %bb.4:
	ldrsw	x22, [x22, #4]
	ldr	x8, [x23]
	add	x26, x8, x25, lsl #4
	mov	x23, x26
	ldr	w8, [x23, #8]!
	cmp	w22, w8
	b.ge	LBB0_13
; %bb.5:
	mov	x21, x0
	ldr	x27, [x26]
	mov	x0, x19
	bl	_mutex_lock
	ldr	x0, [x27, x22, lsl #3]
	bl	_TXSCH_MAP_FUNC
	cmp	x0, x24
	b.ne	LBB0_12
; %bb.6:
Lloh6:
	adrp	x8, _NIX_TXSCH_LVL_SMQ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NIX_TXSCH_LVL_SMQ@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w25, w8
	b.ne	LBB0_9
; %bb.7:
	mov	x0, x22
	bl	_NIX_AF_SMQX_CFG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_rvu_read64
	mov	x24, x0
	mov	w0, #50
	bl	_BIT_ULL
	mov	x25, x0
	mov	w0, #49
	bl	_BIT_ULL
	orr	w8, w25, w24
	orr	w24, w8, w0
	mov	x0, x22
	bl	_NIX_AF_SMQX_CFG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	mov	x3, x24
	bl	_rvu_write64
	mov	x0, x22
	bl	_NIX_AF_SMQX_CFG
	mov	x24, x0
	mov	w0, #49
	bl	_BIT_ULL
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x24
	mov	w4, #1
	bl	_rvu_poll_reg
	cbz	w0, LBB0_9
; %bb.8:
	ldr	w0, [x19, #4]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x22
	bl	_dev_err
LBB0_9:
	mov	x0, x23
	mov	x1, x22
	bl	_rvu_free_rsrc
	ldr	x8, [x26]
	str	xzr, [x8, x22, lsl #3]
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_15
LBB0_10:
Lloh11:
	adrp	x8, _NIX_AF_ERR_AF_LF_INVALID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NIX_AF_ERR_AF_LF_INVALID@GOTPAGEOFF]
	b	LBB0_14
LBB0_11:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
Lloh16:
	adrp	x8, _NIX_AF_ERR_TLX_INVALID@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NIX_AF_ERR_TLX_INVALID@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BLKTYPE_NIX,4,2                ; @BLKTYPE_NIX
	.comm	_NIX_AF_ERR_AF_LF_INVALID,4,2   ; @NIX_AF_ERR_AF_LF_INVALID
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NIX_TXSCH_LVL_TL2,4,2          ; @NIX_TXSCH_LVL_TL2
	.comm	_NIX_TXSCH_LVL_SMQ,4,2          ; @NIX_TXSCH_LVL_SMQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NIXLF%d: SMQ%d flush failed\n"

	.comm	_NIX_AF_ERR_TLX_INVALID,4,2     ; @NIX_AF_ERR_TLX_INVALID
	.no_dead_strip	_nix_txschq_free_one
.subsections_via_symbols
