	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_frob_aux_power_5717
_tg3_frob_aux_power_5717:               ## @tg3_frob_aux_power_5717
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_TG3_APE_LOCK_GPIO@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_tg3_ape_lock
	testq	%rax, %rax
	je	LBB0_1
## %bb.10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_ENABLE_ASF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_tg3_flag
	testq	%rax, %rax
	je	LBB0_2
LBB0_4:
	movq	_TG3_GPIO_MSG_NEED_VAUX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_5:
	movq	%rbx, %rdi
	callq	_tg3_set_function_status
	movq	_TG3_GPIO_MSG_ALL_DRVR_PRES_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_9
## %bb.6:
	movq	_TG3_GPIO_MSG_ALL_NEED_VAUX_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_tg3_pwrsrc_switch_to_vaux
	jmp	LBB0_9
LBB0_2:
	movq	_ENABLE_APE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_tg3_flag
	testl	%r14d, %r14d
	jne	LBB0_4
## %bb.3:
	xorl	%esi, %esi
	testq	%rax, %rax
	je	LBB0_5
	jmp	LBB0_4
LBB0_8:
	movq	%rbx, %rdi
	callq	_tg3_pwrsrc_die_with_vmain
LBB0_9:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tg3_ape_unlock                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TG3_APE_LOCK_GPIO,4,2          ## @TG3_APE_LOCK_GPIO
	.comm	_ENABLE_ASF,4,2                 ## @ENABLE_ASF
	.comm	_ENABLE_APE,4,2                 ## @ENABLE_APE
	.comm	_TG3_GPIO_MSG_NEED_VAUX,4,2     ## @TG3_GPIO_MSG_NEED_VAUX
	.comm	_TG3_GPIO_MSG_ALL_DRVR_PRES_MASK,4,2 ## @TG3_GPIO_MSG_ALL_DRVR_PRES_MASK
	.comm	_TG3_GPIO_MSG_ALL_NEED_VAUX_MASK,4,2 ## @TG3_GPIO_MSG_ALL_NEED_VAUX_MASK
	.no_dead_strip	_tg3_frob_aux_power_5717
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_frob_aux_power_5717
_tg3_frob_aux_power_5717:               ; @tg3_frob_aux_power_5717
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _TG3_APE_LOCK_GPIO@GOTPAGE
Lloh1:
	ldr	x21, [x21, _TG3_APE_LOCK_GPIO@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_tg3_ape_lock
	cbz	x0, LBB0_2
; %bb.1:
	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
LBB0_2:
Lloh2:
	adrp	x8, _ENABLE_ASF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENABLE_ASF@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tg3_flag
	cbz	x0, LBB0_7
LBB0_3:
Lloh5:
	adrp	x8, _TG3_GPIO_MSG_NEED_VAUX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TG3_GPIO_MSG_NEED_VAUX@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
LBB0_4:
	mov	x0, x19
	bl	_tg3_set_function_status
Lloh8:
	adrp	x8, _TG3_GPIO_MSG_ALL_DRVR_PRES_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TG3_GPIO_MSG_ALL_DRVR_PRES_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_11
; %bb.5:
Lloh11:
	adrp	x8, _TG3_GPIO_MSG_ALL_NEED_VAUX_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TG3_GPIO_MSG_ALL_NEED_VAUX_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_10
; %bb.6:
	mov	x0, x19
	bl	_tg3_pwrsrc_switch_to_vaux
	b	LBB0_11
LBB0_7:
Lloh14:
	adrp	x8, _ENABLE_APE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENABLE_APE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tg3_flag
	cbnz	w20, LBB0_3
; %bb.8:
	cbnz	x0, LBB0_3
; %bb.9:
	mov	w1, #0
	b	LBB0_4
LBB0_10:
	mov	x0, x19
	bl	_tg3_pwrsrc_die_with_vmain
LBB0_11:
	ldr	w1, [x21]
	mov	x0, x19
	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	_tg3_ape_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_TG3_APE_LOCK_GPIO,4,2          ; @TG3_APE_LOCK_GPIO
	.comm	_ENABLE_ASF,4,2                 ; @ENABLE_ASF
	.comm	_ENABLE_APE,4,2                 ; @ENABLE_APE
	.comm	_TG3_GPIO_MSG_NEED_VAUX,4,2     ; @TG3_GPIO_MSG_NEED_VAUX
	.comm	_TG3_GPIO_MSG_ALL_DRVR_PRES_MASK,4,2 ; @TG3_GPIO_MSG_ALL_DRVR_PRES_MASK
	.comm	_TG3_GPIO_MSG_ALL_NEED_VAUX_MASK,4,2 ; @TG3_GPIO_MSG_ALL_NEED_VAUX_MASK
	.no_dead_strip	_tg3_frob_aux_power_5717
.subsections_via_symbols
