	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tp_init
_tp_init:                               ## @tp_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_tp_config
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movl	$3, %esi
	xorl	%edx, %edx
	callq	_t3_set_vlan_accel
	movq	%rbx, %rdi
	callq	_is_offload
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	imull	$1000, (%rbx), %esi             ## imm = 0x3E8
	movq	%rbx, %rdi
	callq	_tp_set_timers
	movq	_A_TP_RESET@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_F_FLSTINITENABLE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_t3_write_reg
	movl	(%r15), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	movl	$5, %r9d
	callq	_t3_wait_op_done
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_CH_ERR
	movl	%r15d, %r14d
	jmp	LBB0_4
LBB0_3:
	movq	_A_TP_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_F_TPRESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_t3_write_reg
LBB0_4:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_A_TP_RESET,4,2                 ## @A_TP_RESET
	.comm	_F_FLSTINITENABLE,4,2           ## @F_FLSTINITENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TP initialization timed out\n"

	.comm	_F_TPRESET,4,2                  ## @F_TPRESET
	.no_dead_strip	_tp_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tp_init
_tp_init:                               ; @tp_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
	bl	_tp_config
	mov	x0, x19
	mov	w1, #3
	mov	w2, #0
	bl	_t3_set_vlan_accel
	mov	x0, x19
	bl	_is_offload
Lloh0:
	adrp	x21, _A_TP_RESET@GOTPAGE
Lloh1:
	ldr	x21, [x21, _A_TP_RESET@GOTPAGEOFF]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x19]
	mov	w9, #1000
	mul	w1, w8, w9
	mov	x0, x19
	bl	_tp_set_timers
	ldr	w1, [x21]
Lloh2:
	adrp	x20, _F_FLSTINITENABLE@GOTPAGE
Lloh3:
	ldr	x20, [x20, _F_FLSTINITENABLE@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_t3_write_reg
	ldr	w1, [x21]
	ldr	w2, [x20]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #1000
	mov	w5, #5
	bl	_t3_wait_op_done
	cbz	w0, LBB0_3
; %bb.2:
	mov	x20, x0
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_CH_ERR
	b	LBB0_4
LBB0_3:
	ldr	w1, [x21]
Lloh6:
	adrp	x8, _F_TPRESET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _F_TPRESET@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_t3_write_reg
	mov	w20, #0
LBB0_4:
	mov	x0, x20
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_A_TP_RESET,4,2                 ; @A_TP_RESET
	.comm	_F_FLSTINITENABLE,4,2           ; @F_FLSTINITENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TP initialization timed out\n"

	.comm	_F_TPRESET,4,2                  ; @F_TPRESET
	.no_dead_strip	_tp_init
.subsections_via_symbols
