	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_set_loopback
_tg3_set_loopback:                      ## @tg3_set_loopback
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r12
	movq	_NETIF_F_LOOPBACK@GOTPCREL(%rip), %rcx
	movq	_MAC_MODE_PORT_INT_LPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r12), %eax
	testl	%ebx, (%rcx)
	je	LBB0_3
## %bb.1:
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movq	%r12, %r15
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_spin_lock_bh
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_tg3_mac_loopback
	movl	8(%r12), %edi
	callq	_netif_carrier_on
	leaq	L_.str(%rip), %rbx
	jmp	LBB0_5
LBB0_3:
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movq	%r12, %r15
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_spin_lock_bh
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_tg3_mac_loopback
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_tg3_setup_phy
	leaq	L_.str.1(%rip), %rbx
LBB0_5:
	movq	%r15, %rdi
	callq	_spin_unlock_bh
	movq	%r14, %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netdev_info                    ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NETIF_F_LOOPBACK,4,2           ## @NETIF_F_LOOPBACK
	.comm	_MAC_MODE_PORT_INT_LPBACK,4,2   ## @MAC_MODE_PORT_INT_LPBACK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Internal MAC loopback mode enabled.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Internal MAC loopback mode disabled.\n"

	.no_dead_strip	_tg3_set_loopback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_set_loopback
_tg3_set_loopback:                      ; @tg3_set_loopback
	.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
	bl	_netdev_priv
	mov	x21, x0
Lloh0:
	adrp	x8, _NETIF_F_LOOPBACK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NETIF_F_LOOPBACK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	ldr	w8, [x0]
Lloh3:
	adrp	x10, _MAC_MODE_PORT_INT_LPBACK@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MAC_MODE_PORT_INT_LPBACK@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	and	w8, w10, w8
	tst	w9, w20
	b.eq	LBB0_3
; %bb.1:
	cbnz	w8, LBB0_6
; %bb.2:
	add	x20, x21, #4
	mov	x0, x20
	bl	_spin_lock_bh
	mov	x0, x21
	mov	w1, #1
	bl	_tg3_mac_loopback
	ldr	w0, [x21, #8]
	bl	_netif_carrier_on
Lloh6:
	adrp	x21, l_.str@PAGE
Lloh7:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:
	cbz	w8, LBB0_6
; %bb.4:
	add	x20, x21, #4
	mov	x0, x20
	bl	_spin_lock_bh
	mov	x0, x21
	mov	w1, #0
	bl	_tg3_mac_loopback
	mov	x0, x21
	mov	w1, #1
	bl	_tg3_setup_phy
Lloh8:
	adrp	x21, l_.str.1@PAGE
Lloh9:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_5:
	mov	x0, x20
	bl	_spin_unlock_bh
	mov	x0, x19
	mov	x1, x21
	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	_netdev_info
LBB0_6:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_NETIF_F_LOOPBACK,4,2           ; @NETIF_F_LOOPBACK
	.comm	_MAC_MODE_PORT_INT_LPBACK,4,2   ; @MAC_MODE_PORT_INT_LPBACK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Internal MAC loopback mode enabled.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Internal MAC loopback mode disabled.\n"

	.no_dead_strip	_tg3_set_loopback
.subsections_via_symbols
