	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpu_reset                      ## -- Begin function cpu_reset
	.p2align	4, 0x90
_cpu_reset:                             ## @cpu_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_aml8726_wdt_sc@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	_AML_WDT_RESET_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_CSR_WRITE_4
	movq	(%rbx), %rdi
	movq	_AML_WDT_CTRL_REG@GOTPCREL(%rip), %rax
	movq	_AML_WDT_CTRL_CPU_WDRESET_MASK@GOTPCREL(%rip), %rcx
	movq	_AML_WDT_CTRL_EN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	(%rcx), %ebx
	movl	(%rax), %esi
	movq	_AML_WDT_CTRL_TERMINAL_CNT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$10, %edx
	shll	%cl, %edx
	orl	%ebx, %edx
	callq	_CSR_WRITE_4
	jmp	LBB0_3
LBB0_1:
	leaq	L_str(%rip), %rdi
	callq	_puts
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_aml8726_wdt_sc,8,3             ## @aml8726_wdt_sc
	.comm	_AML_WDT_RESET_REG,4,2          ## @AML_WDT_RESET_REG
	.comm	_AML_WDT_CTRL_REG,4,2           ## @AML_WDT_CTRL_REG
	.comm	_AML_WDT_CTRL_CPU_WDRESET_MASK,4,2 ## @AML_WDT_CTRL_CPU_WDRESET_MASK
	.comm	_AML_WDT_CTRL_EN,4,2            ## @AML_WDT_CTRL_EN
	.comm	_AML_WDT_CTRL_TERMINAL_CNT_SHIFT,4,2 ## @AML_WDT_CTRL_TERMINAL_CNT_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"Reset hardware has not yet been initialized."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpu_reset                      ; -- Begin function cpu_reset
	.p2align	2
_cpu_reset:                             ; @cpu_reset
	.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
Lloh0:
	adrp	x19, _aml8726_wdt_sc@GOTPAGE
Lloh1:
	ldr	x19, [x19, _aml8726_wdt_sc@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _AML_WDT_RESET_REG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AML_WDT_RESET_REG@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_CSR_WRITE_4
	ldr	x0, [x19]
Lloh5:
	adrp	x8, _AML_WDT_CTRL_REG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AML_WDT_CTRL_REG@GOTPAGEOFF]
Lloh7:
	adrp	x9, _AML_WDT_CTRL_CPU_WDRESET_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AML_WDT_CTRL_CPU_WDRESET_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	ldr	w8, [x9]
Lloh11:
	adrp	x9, _AML_WDT_CTRL_EN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AML_WDT_CTRL_EN@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _AML_WDT_CTRL_TERMINAL_CNT_SHIFT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _AML_WDT_CTRL_TERMINAL_CNT_SHIFT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	mov	w10, #10
	lsl	w9, w10, w9
	orr	w2, w8, w9
	bl	_CSR_WRITE_4
	b	LBB0_3
LBB0_2:
Lloh17:
	adrp	x0, l_str@PAGE
Lloh18:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_aml8726_wdt_sc,8,3             ; @aml8726_wdt_sc
	.comm	_AML_WDT_RESET_REG,4,2          ; @AML_WDT_RESET_REG
	.comm	_AML_WDT_CTRL_REG,4,2           ; @AML_WDT_CTRL_REG
	.comm	_AML_WDT_CTRL_CPU_WDRESET_MASK,4,2 ; @AML_WDT_CTRL_CPU_WDRESET_MASK
	.comm	_AML_WDT_CTRL_EN,4,2            ; @AML_WDT_CTRL_EN
	.comm	_AML_WDT_CTRL_TERMINAL_CNT_SHIFT,4,2 ; @AML_WDT_CTRL_TERMINAL_CNT_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"Reset hardware has not yet been initialized."

.subsections_via_symbols
