	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pm3393_mac_reset
_pm3393_mac_reset:                      ## @pm3393_mac_reset
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	xorl	%eax, %eax
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$2, %eax
	leal	1(%rax), %eax
	setb	%cl
                                        ## kill: def $eax killed $eax def $rax
	testb	%r14b, %cl
	je	LBB0_4
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_A_ELMER0_GPO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	leaq	-44(%rbp), %r14
	movq	%r14, %rdx
	callq	_t1_tpi_read
	movl	-44(%rbp), %edx
	andl	$-2, %edx
	movl	%edx, -44(%rbp)
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_t1_tpi_write
	movl	$1, %edi
	callq	_msleep
	movl	$1, %edi
	callq	_msleep
	movl	$2, %edi
	callq	_msleep
	movl	-44(%rbp), %edx
	orl	$1, %edx
	movl	%edx, -44(%rbp)
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_t1_tpi_write
	movl	$15, %edi
	callq	_msleep
	movl	$1, %edi
	callq	_msleep
	movq	_SUNI1x10GEXP_REG_DEVICE_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OFFSET
	movq	%r13, %rdi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_t1_tpi_read
	movq	_SUNI1x10GEXP_BITMSK_TOP_PL4_ID_ROOL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_SUNI1x10GEXP_BITMSK_TOP_PL4_ID_DOOL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_SUNI1x10GEXP_BITMSK_TOP_PL4_IS_ROOL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_SUNI1x10GEXP_BITMSK_TOP_PL4_OUT_ROOL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	-44(%rbp), %r15d
	movq	_SUNI1x10GEXP_BITMSK_TOP_EXPIRED@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	%r15d, %r12d
	sete	%al
	andl	%r15d, %ebx
	setne	%cl
	movq	_SUNI1x10GEXP_BITMSK_TOP_SXRA_EXPIRED@GOTPCREL(%rip), %rdx
	andl	(%rdx), %r15d
	sete	%r14b
	orb	%al, %r14b
	orb	%cl, %r14b
	movq	%r13, %rdi
	callq	_netif_msg_hw
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r13), %rdi
	movl	-44(%rbp), %r8d
	movl	%r15d, (%rsp)
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r12d, %ecx
	movl	%ebx, %r9d
	callq	_dev_dbg
	jmp	LBB0_3
LBB0_4:
	movzbl	%r14b, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_A_ELMER0_GPO,4,2               ## @A_ELMER0_GPO
	.comm	_SUNI1x10GEXP_REG_DEVICE_STATUS,4,2 ## @SUNI1x10GEXP_REG_DEVICE_STATUS
	.comm	_SUNI1x10GEXP_BITMSK_TOP_EXPIRED,4,2 ## @SUNI1x10GEXP_BITMSK_TOP_EXPIRED
	.comm	_SUNI1x10GEXP_BITMSK_TOP_PL4_ID_DOOL,4,2 ## @SUNI1x10GEXP_BITMSK_TOP_PL4_ID_DOOL
	.comm	_SUNI1x10GEXP_BITMSK_TOP_PL4_ID_ROOL,4,2 ## @SUNI1x10GEXP_BITMSK_TOP_PL4_ID_ROOL
	.comm	_SUNI1x10GEXP_BITMSK_TOP_PL4_IS_ROOL,4,2 ## @SUNI1x10GEXP_BITMSK_TOP_PL4_IS_ROOL
	.comm	_SUNI1x10GEXP_BITMSK_TOP_PL4_OUT_ROOL,4,2 ## @SUNI1x10GEXP_BITMSK_TOP_PL4_OUT_ROOL
	.comm	_SUNI1x10GEXP_BITMSK_TOP_SXRA_EXPIRED,4,2 ## @SUNI1x10GEXP_BITMSK_TOP_SXRA_EXPIRED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PM3393 HW reset %d: pl4_reset 0x%x, val 0x%x, is_pl4_outof_lock 0x%x, xaui_locked 0x%x\n"

	.no_dead_strip	_pm3393_mac_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pm3393_mac_reset
_pm3393_mac_reset:                      ; @pm3393_mac_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	mov	w20, #0
Lloh0:
	adrp	x25, _A_ELMER0_GPO@GOTPAGE
Lloh1:
	ldr	x25, [x25, _A_ELMER0_GPO@GOTPAGEOFF]
Lloh2:
	adrp	x28, _SUNI1x10GEXP_BITMSK_TOP_SXRA_EXPIRED@GOTPAGE
Lloh3:
	ldr	x28, [x28, _SUNI1x10GEXP_BITMSK_TOP_SXRA_EXPIRED@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	orr	w8, w21, w26
	orr	w0, w8, w27
	cmp	w20, #2
	add	w20, w20, #1
	cset	w8, lo
	and	w8, w8, w0
	tbz	w8, #0, LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	add	x2, sp, #12
	mov	x0, x19
	bl	_t1_tpi_read
	ldr	w8, [sp, #12]
	and	w2, w8, #0xfffffffe
	str	w2, [sp, #12]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_t1_tpi_write
	mov	w0, #1
	bl	_msleep
	mov	w0, #1
	bl	_msleep
	mov	w0, #2
	bl	_msleep
	ldr	w8, [sp, #12]
	orr	w2, w8, #0x1
	str	w2, [sp, #12]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_t1_tpi_write
	mov	w0, #15
	bl	_msleep
	mov	w0, #1
	bl	_msleep
Lloh4:
	adrp	x8, _SUNI1x10GEXP_REG_DEVICE_STATUS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SUNI1x10GEXP_REG_DEVICE_STATUS@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_OFFSET
	mov	x1, x0
	add	x2, sp, #12
	mov	x0, x19
	bl	_t1_tpi_read
	ldr	w8, [sp, #12]
Lloh7:
	adrp	x9, _SUNI1x10GEXP_BITMSK_TOP_EXPIRED@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SUNI1x10GEXP_BITMSK_TOP_EXPIRED@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	ands	w22, w9, w8
Lloh10:
	adrp	x9, _SUNI1x10GEXP_BITMSK_TOP_PL4_ID_DOOL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SUNI1x10GEXP_BITMSK_TOP_PL4_ID_DOOL@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _SUNI1x10GEXP_BITMSK_TOP_PL4_ID_ROOL@GOTPAGE
Lloh14:
	ldr	x10, [x10, _SUNI1x10GEXP_BITMSK_TOP_PL4_ID_ROOL@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh16:
	adrp	x10, _SUNI1x10GEXP_BITMSK_TOP_PL4_IS_ROOL@GOTPAGE
Lloh17:
	ldr	x10, [x10, _SUNI1x10GEXP_BITMSK_TOP_PL4_IS_ROOL@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	orr	w9, w9, w10
Lloh19:
	adrp	x10, _SUNI1x10GEXP_BITMSK_TOP_PL4_OUT_ROOL@GOTPAGE
Lloh20:
	ldr	x10, [x10, _SUNI1x10GEXP_BITMSK_TOP_PL4_OUT_ROOL@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	orr	w9, w9, w10
	cset	w21, eq
	ands	w23, w9, w8
	ldr	w9, [x28]
	cset	w26, ne
	ands	w24, w9, w8
	cset	w27, eq
	mov	x0, x19
	bl	_netif_msg_hw
	cbz	x0, LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19]
	ldr	w4, [sp, #12]
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x22
	mov	x5, x23
	mov	x6, x24
	bl	_dev_dbg
	b	LBB0_1
LBB0_4:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_A_ELMER0_GPO,4,2               ; @A_ELMER0_GPO
	.comm	_SUNI1x10GEXP_REG_DEVICE_STATUS,4,2 ; @SUNI1x10GEXP_REG_DEVICE_STATUS
	.comm	_SUNI1x10GEXP_BITMSK_TOP_EXPIRED,4,2 ; @SUNI1x10GEXP_BITMSK_TOP_EXPIRED
	.comm	_SUNI1x10GEXP_BITMSK_TOP_PL4_ID_DOOL,4,2 ; @SUNI1x10GEXP_BITMSK_TOP_PL4_ID_DOOL
	.comm	_SUNI1x10GEXP_BITMSK_TOP_PL4_ID_ROOL,4,2 ; @SUNI1x10GEXP_BITMSK_TOP_PL4_ID_ROOL
	.comm	_SUNI1x10GEXP_BITMSK_TOP_PL4_IS_ROOL,4,2 ; @SUNI1x10GEXP_BITMSK_TOP_PL4_IS_ROOL
	.comm	_SUNI1x10GEXP_BITMSK_TOP_PL4_OUT_ROOL,4,2 ; @SUNI1x10GEXP_BITMSK_TOP_PL4_OUT_ROOL
	.comm	_SUNI1x10GEXP_BITMSK_TOP_SXRA_EXPIRED,4,2 ; @SUNI1x10GEXP_BITMSK_TOP_SXRA_EXPIRED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PM3393 HW reset %d: pl4_reset 0x%x, val 0x%x, is_pl4_outof_lock 0x%x, xaui_locked 0x%x\n"

	.no_dead_strip	_pm3393_mac_reset
.subsections_via_symbols
