	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t3_sge_init                    ## -- Begin function t3_sge_init
	.p2align	4, 0x90
_t3_sge_init:                           ## @t3_sge_init
	.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	%rdi, %r15
	movl	16(%rdi), %edi
	movl	$2, %esi
	callq	_pci_resource_len
	movl	%eax, %r14d
	sarl	$12, %eax
	bsfl	%eax, %r13d
	movq	_F_DROPPKT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	$2, %edi
	callq	_V_PKTSHIFT
	movl	%eax, %ebx
	orl	%r12d, %ebx
	movq	_F_FLMODE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_F_AVOIDCQOVFL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_F_CQCRDTCTRL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_F_CONGMODE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_F_TNLFLMODE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_F_FATLPERREN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	$-11, %rdi
	callq	_V_HOSTPAGESIZE
	movl	%eax, %r12d
	orl	%ebx, %r12d
	movq	_F_BIGENDIANINGRESS@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	xorl	%edi, %edi
	cmpl	$4096, %r14d                    ## imm = 0x1000
	cmovael	%r13d, %edi
	callq	_V_USERSPACESIZE
	orl	%r12d, %eax
	movq	_F_ISCSICOALESCING@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	cmpq	$0, 8(%r15)
	jle	LBB0_3
## %bb.1:
	movq	_USING_MSIX@GOTPCREL(%rip), %rcx
	movq	_USING_MSI@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%edx, (%r15)
	jne	LBB0_3
## %bb.2:
	movq	_F_ONEINTMULTQ@GOTPCREL(%rip), %rcx
	movq	_F_OPTONEINTMULTQ@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
LBB0_3:
	movq	_A_SG_CONTROL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_t3_write_reg
	movq	_A_SG_EGR_RCQ_DRB_THRSH@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	$512, %edi                      ## imm = 0x200
	callq	_V_HIRCQDRBTHRSH
	movl	%eax, %ebx
	movl	$512, %edi                      ## imm = 0x200
	callq	_V_LORCQDRBTHRSH
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_t3_write_reg
	movq	_A_SG_TIMER_TICK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_core_ticks_per_usec
	cltq
	imulq	$1717986919, %rax, %rdx         ## imm = 0x66666667
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$34, %rdx
	addl	%eax, %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_t3_write_reg
	movq	_A_SG_CMDQ_CREDIT_TH@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	$32, %edi
	callq	_V_THRESHOLD
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_core_ticks_per_usec
	imull	$200, %eax, %edi
	callq	_V_TIMEOUT
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_t3_write_reg
	movq	_A_SG_HI_DRB_HI_THRSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r15), %rax
	movq	_T3_REV_C@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$1000, %eax                     ## imm = 0x3E8
	movl	$500, %edx                      ## imm = 0x1F4
	cmovll	%eax, %edx
	movq	%r15, %rdi
	callq	_t3_write_reg
	movq	_A_SG_HI_DRB_LO_THRSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$256, %edx                      ## imm = 0x100
	callq	_t3_write_reg
	movq	_A_SG_LO_DRB_HI_THRSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1000, %edx                     ## imm = 0x3E8
	callq	_t3_write_reg
	movq	_A_SG_LO_DRB_LO_THRSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$256, %edx                      ## imm = 0x100
	callq	_t3_write_reg
	movq	_A_SG_OCO_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$4095, %edi                     ## imm = 0xFFF
	callq	_V_BASE1
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_t3_write_reg
	movq	_A_SG_DRB_PRI_THRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$64512, %edx                    ## imm = 0xFC00
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_t3_write_reg                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_F_DROPPKT,4,2                  ## @F_DROPPKT
	.comm	_F_FLMODE,4,2                   ## @F_FLMODE
	.comm	_F_AVOIDCQOVFL,4,2              ## @F_AVOIDCQOVFL
	.comm	_F_CQCRDTCTRL,4,2               ## @F_CQCRDTCTRL
	.comm	_F_CONGMODE,4,2                 ## @F_CONGMODE
	.comm	_F_TNLFLMODE,4,2                ## @F_TNLFLMODE
	.comm	_F_FATLPERREN,4,2               ## @F_FATLPERREN
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_F_BIGENDIANINGRESS,4,2         ## @F_BIGENDIANINGRESS
	.comm	_F_ISCSICOALESCING,4,2          ## @F_ISCSICOALESCING
	.comm	_USING_MSIX,4,2                 ## @USING_MSIX
	.comm	_USING_MSI,4,2                  ## @USING_MSI
	.comm	_F_ONEINTMULTQ,4,2              ## @F_ONEINTMULTQ
	.comm	_F_OPTONEINTMULTQ,4,2           ## @F_OPTONEINTMULTQ
	.comm	_A_SG_CONTROL,4,2               ## @A_SG_CONTROL
	.comm	_A_SG_EGR_RCQ_DRB_THRSH,4,2     ## @A_SG_EGR_RCQ_DRB_THRSH
	.comm	_A_SG_TIMER_TICK,4,2            ## @A_SG_TIMER_TICK
	.comm	_A_SG_CMDQ_CREDIT_TH,4,2        ## @A_SG_CMDQ_CREDIT_TH
	.comm	_A_SG_HI_DRB_HI_THRSH,4,2       ## @A_SG_HI_DRB_HI_THRSH
	.comm	_T3_REV_C,8,3                   ## @T3_REV_C
	.comm	_A_SG_HI_DRB_LO_THRSH,4,2       ## @A_SG_HI_DRB_LO_THRSH
	.comm	_A_SG_LO_DRB_HI_THRSH,4,2       ## @A_SG_LO_DRB_HI_THRSH
	.comm	_A_SG_LO_DRB_LO_THRSH,4,2       ## @A_SG_LO_DRB_LO_THRSH
	.comm	_A_SG_OCO_BASE,4,2              ## @A_SG_OCO_BASE
	.comm	_A_SG_DRB_PRI_THRESH,4,2        ## @A_SG_DRB_PRI_THRESH
	.comm	_F_EGRGENCTRL,4,2               ## @F_EGRGENCTRL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t3_sge_init                    ; -- Begin function t3_sge_init
	.p2align	2
_t3_sge_init:                           ; @t3_sge_init
	.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
	ldr	w0, [x0, #16]
	mov	w1, #2
	bl	_pci_resource_len
	mov	x20, x0
	asr	w8, w0, #12
	rbit	w8, w8
	clz	w21, w8
Lloh0:
	adrp	x8, _F_DROPPKT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _F_DROPPKT@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	w0, #2
	bl	_V_PKTSHIFT
	orr	w8, w0, w22
Lloh3:
	adrp	x9, _F_FLMODE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _F_FLMODE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh6:
	adrp	x9, _F_AVOIDCQOVFL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _F_AVOIDCQOVFL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _F_CQCRDTCTRL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _F_CQCRDTCTRL@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _F_CONGMODE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _F_CONGMODE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _F_TNLFLMODE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _F_TNLFLMODE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh18:
	adrp	x9, _F_FATLPERREN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _F_FATLPERREN@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w22, w8, w9
Lloh21:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	sub	x0, x8, #11
	bl	_V_HOSTPAGESIZE
	orr	w8, w22, w0
Lloh24:
	adrp	x9, _F_BIGENDIANINGRESS@GOTPAGE
Lloh25:
	ldr	x9, [x9, _F_BIGENDIANINGRESS@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w22, w8, w9
	cmp	w20, #1, lsl #12                ; =4096
	csel	w0, wzr, w21, lo
	bl	_V_USERSPACESIZE
	orr	w8, w22, w0
Lloh27:
	adrp	x9, _F_ISCSICOALESCING@GOTPAGE
Lloh28:
	ldr	x9, [x9, _F_ISCSICOALESCING@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w2, w8, w9
	ldr	x8, [x19, #8]
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.1:
	ldr	w8, [x19]
Lloh30:
	adrp	x9, _USING_MSIX@GOTPAGE
Lloh31:
	ldr	x9, [x9, _USING_MSIX@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
Lloh33:
	adrp	x10, _USING_MSI@GOTPAGE
Lloh34:
	ldr	x10, [x10, _USING_MSI@GOTPAGEOFF]
Lloh35:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
Lloh36:
	adrp	x8, _F_ONEINTMULTQ@GOTPAGE
Lloh37:
	ldr	x8, [x8, _F_ONEINTMULTQ@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
Lloh39:
	adrp	x9, _F_OPTONEINTMULTQ@GOTPAGE
Lloh40:
	ldr	x9, [x9, _F_OPTONEINTMULTQ@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	orr	w8, w8, w2
	orr	w2, w8, w9
LBB0_3:
Lloh42:
	adrp	x8, _A_SG_CONTROL@GOTPAGE
Lloh43:
	ldr	x8, [x8, _A_SG_CONTROL@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_t3_write_reg
Lloh45:
	adrp	x8, _A_SG_EGR_RCQ_DRB_THRSH@GOTPAGE
Lloh46:
	ldr	x8, [x8, _A_SG_EGR_RCQ_DRB_THRSH@GOTPAGEOFF]
Lloh47:
	ldr	w20, [x8]
	mov	w0, #512
	bl	_V_HIRCQDRBTHRSH
	mov	x21, x0
	mov	w0, #512
	bl	_V_LORCQDRBTHRSH
	orr	w2, w0, w21
	mov	x0, x19
	mov	x1, x20
	bl	_t3_write_reg
Lloh48:
	adrp	x8, _A_SG_TIMER_TICK@GOTPAGE
Lloh49:
	ldr	x8, [x8, _A_SG_TIMER_TICK@GOTPAGEOFF]
Lloh50:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_core_ticks_per_usec
	mov	w8, #26215
	movk	w8, #26214, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w2, w8, w9
	mov	x0, x19
	mov	x1, x20
	bl	_t3_write_reg
Lloh51:
	adrp	x8, _A_SG_CMDQ_CREDIT_TH@GOTPAGE
Lloh52:
	ldr	x8, [x8, _A_SG_CMDQ_CREDIT_TH@GOTPAGEOFF]
Lloh53:
	ldr	w20, [x8]
	mov	w0, #32
	bl	_V_THRESHOLD
	mov	x21, x0
	mov	x0, x19
	bl	_core_ticks_per_usec
	mov	w8, #200
	mul	w0, w0, w8
	bl	_V_TIMEOUT
	orr	w2, w0, w21
	mov	x0, x19
	mov	x1, x20
	bl	_t3_write_reg
Lloh54:
	adrp	x8, _A_SG_HI_DRB_HI_THRSH@GOTPAGE
Lloh55:
	ldr	x8, [x8, _A_SG_HI_DRB_HI_THRSH@GOTPAGEOFF]
Lloh56:
	ldr	w1, [x8]
Lloh57:
	adrp	x8, _T3_REV_C@GOTPAGE
Lloh58:
	ldr	x8, [x8, _T3_REV_C@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh59:
	ldr	x8, [x8]
	cmp	x9, x8
	mov	w8, #500
	mov	w9, #1000
	csel	w2, w9, w8, lt
	mov	x0, x19
	bl	_t3_write_reg
Lloh60:
	adrp	x8, _A_SG_HI_DRB_LO_THRSH@GOTPAGE
Lloh61:
	ldr	x8, [x8, _A_SG_HI_DRB_LO_THRSH@GOTPAGEOFF]
Lloh62:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #256
	bl	_t3_write_reg
Lloh63:
	adrp	x8, _A_SG_LO_DRB_HI_THRSH@GOTPAGE
Lloh64:
	ldr	x8, [x8, _A_SG_LO_DRB_HI_THRSH@GOTPAGEOFF]
Lloh65:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1000
	bl	_t3_write_reg
Lloh66:
	adrp	x8, _A_SG_LO_DRB_LO_THRSH@GOTPAGE
Lloh67:
	ldr	x8, [x8, _A_SG_LO_DRB_LO_THRSH@GOTPAGEOFF]
Lloh68:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #256
	bl	_t3_write_reg
Lloh69:
	adrp	x8, _A_SG_OCO_BASE@GOTPAGE
Lloh70:
	ldr	x8, [x8, _A_SG_OCO_BASE@GOTPAGEOFF]
Lloh71:
	ldr	w20, [x8]
	mov	w0, #4095
	bl	_V_BASE1
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_t3_write_reg
Lloh72:
	adrp	x8, _A_SG_DRB_PRI_THRESH@GOTPAGE
Lloh73:
	ldr	x8, [x8, _A_SG_DRB_PRI_THRESH@GOTPAGEOFF]
Lloh74:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #64512
	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
	b	_t3_write_reg
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_F_DROPPKT,4,2                  ; @F_DROPPKT
	.comm	_F_FLMODE,4,2                   ; @F_FLMODE
	.comm	_F_AVOIDCQOVFL,4,2              ; @F_AVOIDCQOVFL
	.comm	_F_CQCRDTCTRL,4,2               ; @F_CQCRDTCTRL
	.comm	_F_CONGMODE,4,2                 ; @F_CONGMODE
	.comm	_F_TNLFLMODE,4,2                ; @F_TNLFLMODE
	.comm	_F_FATLPERREN,4,2               ; @F_FATLPERREN
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_F_BIGENDIANINGRESS,4,2         ; @F_BIGENDIANINGRESS
	.comm	_F_ISCSICOALESCING,4,2          ; @F_ISCSICOALESCING
	.comm	_USING_MSIX,4,2                 ; @USING_MSIX
	.comm	_USING_MSI,4,2                  ; @USING_MSI
	.comm	_F_ONEINTMULTQ,4,2              ; @F_ONEINTMULTQ
	.comm	_F_OPTONEINTMULTQ,4,2           ; @F_OPTONEINTMULTQ
	.comm	_A_SG_CONTROL,4,2               ; @A_SG_CONTROL
	.comm	_A_SG_EGR_RCQ_DRB_THRSH,4,2     ; @A_SG_EGR_RCQ_DRB_THRSH
	.comm	_A_SG_TIMER_TICK,4,2            ; @A_SG_TIMER_TICK
	.comm	_A_SG_CMDQ_CREDIT_TH,4,2        ; @A_SG_CMDQ_CREDIT_TH
	.comm	_A_SG_HI_DRB_HI_THRSH,4,2       ; @A_SG_HI_DRB_HI_THRSH
	.comm	_T3_REV_C,8,3                   ; @T3_REV_C
	.comm	_A_SG_HI_DRB_LO_THRSH,4,2       ; @A_SG_HI_DRB_LO_THRSH
	.comm	_A_SG_LO_DRB_HI_THRSH,4,2       ; @A_SG_LO_DRB_HI_THRSH
	.comm	_A_SG_LO_DRB_LO_THRSH,4,2       ; @A_SG_LO_DRB_LO_THRSH
	.comm	_A_SG_OCO_BASE,4,2              ; @A_SG_OCO_BASE
	.comm	_A_SG_DRB_PRI_THRESH,4,2        ; @A_SG_DRB_PRI_THRESH
	.comm	_F_EGRGENCTRL,4,2               ; @F_EGRGENCTRL
.subsections_via_symbols
