	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%r15d, %r15d
	movq	_A_ELMER0_GPO@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r14, %rdi
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdx
	callq	_t1_tpi_read
	movl	-44(%rbp), %edx
	andl	$-2, %edx
	movl	%edx, -44(%rbp)
	movl	(%r13), %esi
	movq	%r14, %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	(%r13), %esi
	movq	%r14, %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	%r14, %rdi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_t1_tpi_read
	movq	_SUNI1x10GEXP_BITMSK_TOP_PL4_ID_ROOL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_SUNI1x10GEXP_BITMSK_TOP_PL4_ID_DOOL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_SUNI1x10GEXP_BITMSK_TOP_PL4_IS_ROOL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_SUNI1x10GEXP_BITMSK_TOP_PL4_OUT_ROOL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	-44(%rbp), %r9d
	movq	_SUNI1x10GEXP_BITMSK_TOP_EXPIRED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	andl	%r9d, %r8d
	setne	%cl
	andl	%r9d, %eax
	sete	%dl
	movq	_SUNI1x10GEXP_BITMSK_TOP_SXRA_EXPIRED@GOTPCREL(%rip), %rsi
	movl	(%rsi), %ebx
	andl	%r9d, %ebx
	setne	%r12b
	andb	%cl, %r12b
	andb	%dl, %r12b
	movq	_HW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	leaq	L_.str(%rip), %rdx
	movl	%r15d, %ecx
	pushq	%rbx
	pushq	%rax
	callq	_CH_DBG
	addq	$16, %rsp
	testb	%r12b, %r12b
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%r15), %eax
	cmpl	$2, %r15d
	movl	%eax, %r15d
	jb	LBB0_1
LBB0_3:
	xorb	$1, %r12b
	movzbl	%r12b, %eax
	addq	$8, %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
	.comm	_HW,4,2                         ## @HW
	.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	x22, _A_ELMER0_GPO@GOTPAGE
Lloh1:
	ldr	x22, [x22, _A_ELMER0_GPO@GOTPAGEOFF]
Lloh2:
	adrp	x26, _SUNI1x10GEXP_BITMSK_TOP_PL4_ID_ROOL@GOTPAGE
Lloh3:
	ldr	x26, [x26, _SUNI1x10GEXP_BITMSK_TOP_PL4_ID_ROOL@GOTPAGEOFF]
Lloh4:
	adrp	x27, _SUNI1x10GEXP_BITMSK_TOP_PL4_IS_ROOL@GOTPAGE
Lloh5:
	ldr	x27, [x27, _SUNI1x10GEXP_BITMSK_TOP_PL4_IS_ROOL@GOTPAGEOFF]
Lloh6:
	adrp	x28, _SUNI1x10GEXP_BITMSK_TOP_PL4_OUT_ROOL@GOTPAGE
Lloh7:
	ldr	x28, [x28, _SUNI1x10GEXP_BITMSK_TOP_PL4_OUT_ROOL@GOTPAGEOFF]
Lloh8:
	adrp	x23, _SUNI1x10GEXP_BITMSK_TOP_SXRA_EXPIRED@GOTPAGE
Lloh9:
	ldr	x23, [x23, _SUNI1x10GEXP_BITMSK_TOP_SXRA_EXPIRED@GOTPAGEOFF]
Lloh10:
	adrp	x21, l_.str@PAGE
Lloh11:
	add	x21, x21, l_.str@PAGEOFF
Lloh12:
	adrp	x24, _HW@GOTPAGE
Lloh13:
	ldr	x24, [x24, _HW@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	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, [x22]
	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, [x22]
	mov	x0, x19
	bl	_t1_tpi_write
	mov	w0, #15
	bl	_msleep
	mov	w0, #1
	bl	_msleep
Lloh14:
	adrp	x8, _SUNI1x10GEXP_REG_DEVICE_STATUS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SUNI1x10GEXP_REG_DEVICE_STATUS@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_OFFSET
	mov	x1, x0
	add	x2, sp, #12
	mov	x0, x19
	bl	_t1_tpi_read
	ldr	w5, [sp, #12]
Lloh17:
	adrp	x8, _SUNI1x10GEXP_BITMSK_TOP_EXPIRED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SUNI1x10GEXP_BITMSK_TOP_EXPIRED@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _SUNI1x10GEXP_BITMSK_TOP_PL4_ID_DOOL@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SUNI1x10GEXP_BITMSK_TOP_PL4_ID_DOOL@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	ldr	w10, [x26]
	orr	w9, w10, w9
	ldr	w10, [x27]
	orr	w9, w9, w10
	ldr	w10, [x28]
	orr	w9, w9, w10
	ldr	w10, [x23]
	ands	w4, w8, w5
	cset	w8, ne
	ands	w6, w9, w5
	cset	w9, eq
	ands	w7, w10, w5
	cset	w10, ne
	and	w8, w8, w9
	and	w25, w10, w8
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	bl	_CH_DBG
	tbnz	w25, #0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w8, w20, #1
	cmp	w20, #2
	mov	x20, x8
	b.lo	LBB0_1
LBB0_3:
	eor	w0, w25, #0x1
	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	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.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
	.comm	_HW,4,2                         ; @HW
	.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
