	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_pwrsrc_switch_to_vmain
_tg3_pwrsrc_switch_to_vmain:            ## @tg3_pwrsrc_switch_to_vmain
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_IS_NIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_tg3_flag
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movq	%rbx, %rdi
	callq	_tg3_asic_rev
	movq	_ASIC_REV_5717@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	callq	_tg3_asic_rev
	movq	_ASIC_REV_5719@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_tg3_asic_rev
	movq	_ASIC_REV_5720@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
LBB0_4:
	movq	_TG3_APE_LOCK_GPIO@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_tg3_ape_lock
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_6:
	movq	_TG3_GPIO_MSG_DRVR_PRES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_tg3_set_function_status
	movq	_GRC_LOCAL_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	movq	_TG3_GRC_LCLCTL_PWRSW_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_tw32_wait_f
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_tg3_ape_unlock
	jmp	LBB0_8
LBB0_7:
	movq	_GRC_LOCAL_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	movq	_TG3_GRC_LCLCTL_PWRSW_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_tw32_wait_f
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IS_NIC,4,2                     ## @IS_NIC
	.comm	_ASIC_REV_5717,8,3              ## @ASIC_REV_5717
	.comm	_ASIC_REV_5719,8,3              ## @ASIC_REV_5719
	.comm	_ASIC_REV_5720,8,3              ## @ASIC_REV_5720
	.comm	_TG3_APE_LOCK_GPIO,4,2          ## @TG3_APE_LOCK_GPIO
	.comm	_EIO,4,2                        ## @EIO
	.comm	_TG3_GPIO_MSG_DRVR_PRES,4,2     ## @TG3_GPIO_MSG_DRVR_PRES
	.comm	_GRC_LOCAL_CTRL,4,2             ## @GRC_LOCAL_CTRL
	.comm	_TG3_GRC_LCLCTL_PWRSW_DELAY,4,2 ## @TG3_GRC_LCLCTL_PWRSW_DELAY
	.no_dead_strip	_tg3_pwrsrc_switch_to_vmain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_pwrsrc_switch_to_vmain
_tg3_pwrsrc_switch_to_vmain:            ; @tg3_pwrsrc_switch_to_vmain
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _IS_NIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IS_NIC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_tg3_flag
	cbz	w0, LBB0_9
; %bb.1:
	mov	x0, x19
	bl	_tg3_asic_rev
Lloh3:
	adrp	x8, _ASIC_REV_5717@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ASIC_REV_5717@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_tg3_asic_rev
Lloh6:
	adrp	x8, _ASIC_REV_5719@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ASIC_REV_5719@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_tg3_asic_rev
Lloh9:
	adrp	x8, _ASIC_REV_5720@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ASIC_REV_5720@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
LBB0_4:
Lloh12:
	adrp	x20, _TG3_APE_LOCK_GPIO@GOTPAGE
Lloh13:
	ldr	x20, [x20, _TG3_APE_LOCK_GPIO@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_tg3_ape_lock
	cbz	x0, LBB0_6
; %bb.5:
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_6:
Lloh17:
	adrp	x8, _TG3_GPIO_MSG_DRVR_PRES@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TG3_GPIO_MSG_DRVR_PRES@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tg3_set_function_status
Lloh20:
	adrp	x8, _GRC_LOCAL_CTRL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _GRC_LOCAL_CTRL@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldr	w1, [x19]
Lloh23:
	adrp	x8, _TG3_GRC_LCLCTL_PWRSW_DELAY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TG3_GRC_LCLCTL_PWRSW_DELAY@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	bl	_tw32_wait_f
	ldr	w1, [x20]
	mov	x0, x19
	bl	_tg3_ape_unlock
	b	LBB0_8
LBB0_7:
Lloh26:
	adrp	x8, _GRC_LOCAL_CTRL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _GRC_LOCAL_CTRL@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	ldr	w1, [x19]
Lloh29:
	adrp	x8, _TG3_GRC_LCLCTL_PWRSW_DELAY@GOTPAGE
Lloh30:
	ldr	x8, [x8, _TG3_GRC_LCLCTL_PWRSW_DELAY@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	bl	_tw32_wait_f
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_IS_NIC,4,2                     ; @IS_NIC
	.comm	_ASIC_REV_5717,8,3              ; @ASIC_REV_5717
	.comm	_ASIC_REV_5719,8,3              ; @ASIC_REV_5719
	.comm	_ASIC_REV_5720,8,3              ; @ASIC_REV_5720
	.comm	_TG3_APE_LOCK_GPIO,4,2          ; @TG3_APE_LOCK_GPIO
	.comm	_EIO,4,2                        ; @EIO
	.comm	_TG3_GPIO_MSG_DRVR_PRES,4,2     ; @TG3_GPIO_MSG_DRVR_PRES
	.comm	_GRC_LOCAL_CTRL,4,2             ; @GRC_LOCAL_CTRL
	.comm	_TG3_GRC_LCLCTL_PWRSW_DELAY,4,2 ; @TG3_GRC_LCLCTL_PWRSW_DELAY
	.no_dead_strip	_tg3_pwrsrc_switch_to_vmain
.subsections_via_symbols
