	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nix_link_config
_nix_link_config:                       ## @nix_link_config
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movl	4(%rax), %edi
	addl	(%rax), %edi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	movq	_NIC_HW_MAX_FRS@GOTPCREL(%rip), %r15
	movq	_NIC_HW_MIN_FRS@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_NIX_AF_RX_LINKX_CFG
	movl	(%r15), %ecx
	shll	$16, %ecx
	orl	(%r13), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_rvu_write64
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	%ebx
	movl	4(%rax), %edi
	addl	(%rax), %edi
	cmpl	%edi, %ebx
	jl	LBB0_2
LBB0_3:
	cmpq	$0, 16(%rax)
	je	LBB0_5
## %bb.4:
	callq	_NIX_AF_RX_LINKX_CFG
	movq	_SDP_HW_MAX_FRS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$16, %ecx
	movq	_NIC_HW_MIN_FRS@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_rvu_write64
	movq	-48(%rbp), %rax                 ## 8-byte Reload
LBB0_5:
	cmpl	$0, 8(%rax)
	jle	LBB0_11
## %bb.6:
	xorl	%edi, %edi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	incl	%edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	8(%rax), %edi
	jge	LBB0_11
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movl	%edi, -52(%rbp)                 ## 4-byte Spill
	movq	%r12, %rsi
	callq	_rvu_cgx_pdata
	movl	%eax, %edi
	callq	_cgx_get_lmac_cnt
	movl	%eax, %r13d
	movq	_CGX_FIFO_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	%r13d
                                        ## kill: def $eax killed $eax def $rax
	movq	_NIC_HW_MAX_FRS@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	leal	15(%rax), %r15d
	testl	%eax, %eax
	cmovnsl	%eax, %r15d
	movl	$1, %edi
	callq	_BIT_ULL
	testl	%r13d, %r13d
	jle	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, %ebx
	andl	$-16, %r15d
	shll	$8, %r15d
	orl	%r15d, %ebx
	orl	$2044, %ebx                     ## imm = 0x7FC
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	12(%rax), %r15d
	imull	-52(%rbp), %r15d                ## 4-byte Folded Reload
	addl	%r15d, %r13d
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r15d, %edi
	callq	_NIX_AF_TX_LINKX_NORM_CREDIT
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	movl	%ebx, %ecx
	callq	_rvu_write64
	movl	%r15d, %edi
	callq	_NIX_AF_TX_LINKX_EXPR_CREDIT
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	movl	%ebx, %ecx
	callq	_rvu_write64
	incl	%r15d
	cmpl	%r13d, %r15d
	jl	LBB0_9
	jmp	LBB0_10
LBB0_11:
	cmpl	$0, 4(%rax)
	jle	LBB0_14
## %bb.12:
	movl	(%rax), %r13d
	movl	%r13d, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_BIT_ULL
	movl	%eax, %r15d
	orl	$4098044, %r15d                 ## imm = 0x3E87FC
	movl	%ebx, %edi
	callq	_NIX_AF_TX_LINKX_NORM_CREDIT
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	movl	%r15d, %ecx
	callq	_rvu_write64
	movl	%ebx, %edi
	callq	_NIX_AF_TX_LINKX_EXPR_CREDIT
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	movl	%r15d, %ecx
	callq	_rvu_write64
	incl	%ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %eax
	addl	%r13d, %eax
	cmpl	%eax, %ebx
	jl	LBB0_13
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NIC_HW_MAX_FRS,4,2             ## @NIC_HW_MAX_FRS
	.comm	_NIC_HW_MIN_FRS,4,2             ## @NIC_HW_MIN_FRS
	.comm	_SDP_HW_MAX_FRS,4,2             ## @SDP_HW_MAX_FRS
	.comm	_CGX_FIFO_LEN,4,2               ## @CGX_FIFO_LEN
	.no_dead_strip	_nix_link_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nix_link_config
_nix_link_config:                       ; @nix_link_config
	.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	x19, x1
	mov	x20, x0
	ldr	x25, [x0]
	ldp	w8, w9, [x25]
	add	w0, w9, w8
Lloh0:
	adrp	x26, _NIC_HW_MAX_FRS@GOTPAGE
Lloh1:
	ldr	x26, [x26, _NIC_HW_MAX_FRS@GOTPAGEOFF]
Lloh2:
	adrp	x22, _NIC_HW_MIN_FRS@GOTPAGE
Lloh3:
	ldr	x22, [x22, _NIC_HW_MIN_FRS@GOTPAGEOFF]
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_NIX_AF_RX_LINKX_CFG
	mov	x2, x0
	ldr	w8, [x26]
	ldr	w9, [x22]
	orr	w3, w9, w8, lsl #16
	mov	x0, x20
	mov	x1, x19
	bl	_rvu_write64
	add	w21, w21, #1
	ldp	w8, w9, [x25]
	add	w0, w9, w8
	cmp	w21, w0
	b.lt	LBB0_2
LBB0_3:
	ldr	x8, [x25, #16]
	cbz	x8, LBB0_5
; %bb.4:
	bl	_NIX_AF_RX_LINKX_CFG
	mov	x2, x0
Lloh4:
	adrp	x8, _SDP_HW_MAX_FRS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SDP_HW_MAX_FRS@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w3, w9, w8, lsl #16
	mov	x0, x20
	mov	x1, x19
	bl	_rvu_write64
LBB0_5:
	ldr	w8, [x25, #8]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.6:
	mov	w21, #0
Lloh7:
	adrp	x27, _CGX_FIFO_LEN@GOTPAGE
Lloh8:
	ldr	x27, [x27, _CGX_FIFO_LEN@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w21, w21, #1
	ldr	w8, [x25, #8]
	cmp	w21, w8
	b.ge	LBB0_11
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	mov	x0, x21
	mov	x1, x20
	bl	_rvu_cgx_pdata
	bl	_cgx_get_lmac_cnt
	mov	x24, x0
	ldr	w8, [x27]
	sdiv	w8, w8, w0
	ldr	w9, [x26]
	sub	w8, w8, w9
	add	w9, w8, #15
	cmp	w8, #0
	csel	w22, w9, w8, lt
	mov	w0, #1
	bl	_BIT_ULL
	cmp	w24, #1
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	lsl	w8, w22, #8
	and	w8, w8, #0xfffff000
	orr	w8, w0, w8
	orr	w22, w8, #0x7fc
	ldr	w8, [x25, #12]
	mul	w23, w8, w21
	add	w24, w23, w24
LBB0_10:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x23
	bl	_NIX_AF_TX_LINKX_NORM_CREDIT
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	mov	x3, x22
	bl	_rvu_write64
	mov	x0, x23
	bl	_NIX_AF_TX_LINKX_EXPR_CREDIT
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	mov	x3, x22
	bl	_rvu_write64
	add	w23, w23, #1
	cmp	w23, w24
	b.lt	LBB0_10
	b	LBB0_7
LBB0_11:
	ldr	w8, [x25, #4]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.12:
	ldr	w23, [x25]
	mov	w24, #34812
	movk	w24, #62, lsl #16
	mov	x21, x23
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_BIT_ULL
	orr	w22, w0, w24
	mov	x0, x21
	bl	_NIX_AF_TX_LINKX_NORM_CREDIT
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	mov	x3, x22
	bl	_rvu_write64
	mov	x0, x21
	bl	_NIX_AF_TX_LINKX_EXPR_CREDIT
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	mov	x3, x22
	bl	_rvu_write64
	add	w21, w21, #1
	ldr	w8, [x25, #4]
	add	w8, w8, w23
	cmp	w21, w8
	b.lt	LBB0_13
LBB0_14:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NIC_HW_MAX_FRS,4,2             ; @NIC_HW_MAX_FRS
	.comm	_NIC_HW_MIN_FRS,4,2             ; @NIC_HW_MIN_FRS
	.comm	_SDP_HW_MAX_FRS,4,2             ; @SDP_HW_MAX_FRS
	.comm	_CGX_FIFO_LEN,4,2               ; @CGX_FIFO_LEN
	.no_dead_strip	_nix_link_config
.subsections_via_symbols
