	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alpine_cpu_reset
_alpine_cpu_reset:                      ## @alpine_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
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	leaq	-32(%rbp), %rdi
	leaq	-24(%rbp), %rsi
	callq	_alpine_get_wdt_base
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_printf
	jmp	LBB0_5
LBB0_2:
	movq	_fdtbus_bs_tag@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_al_devmap_pa@GOTPCREL(%rip), %rax
	movq	-32(%rbp), %rsi
	addq	(%rax), %rsi
	movq	-24(%rbp), %rdx
	leaq	-12(%rbp), %r8
	xorl	%ecx, %ecx
	callq	_bus_space_map
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_printf
	jmp	LBB0_5
LBB0_4:
	movl	(%rbx), %edi
	movl	-12(%rbp), %esi
	movq	_WDTLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_bus_space_write_4
	movl	(%rbx), %edi
	movl	-12(%rbp), %esi
	movq	_WDTLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_LOAD_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_bus_space_write_4
	movl	(%rbx), %edi
	movl	-12(%rbp), %esi
	movq	_WDTCONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_INT_ENABLE@GOTPCREL(%rip), %rax
	movq	_RESET_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	callq	_bus_space_write_4
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to get WDT base, do power down manually..."

	.comm	_fdtbus_bs_tag,4,2              ## @fdtbus_bs_tag
	.comm	_al_devmap_pa,8,3               ## @al_devmap_pa
L_.str.1:                               ## @.str.1
	.asciz	"Unable to map WDT base, do power down manually..."

	.comm	_WDTLOCK,4,2                    ## @WDTLOCK
	.comm	_UNLOCK,4,2                     ## @UNLOCK
	.comm	_WDTLOAD,4,2                    ## @WDTLOAD
	.comm	_LOAD_MIN,4,2                   ## @LOAD_MIN
	.comm	_WDTCONTROL,4,2                 ## @WDTCONTROL
	.comm	_INT_ENABLE,4,2                 ## @INT_ENABLE
	.comm	_RESET_ENABLE,4,2               ## @RESET_ENABLE
	.no_dead_strip	_alpine_cpu_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alpine_cpu_reset
_alpine_cpu_reset:                      ; @alpine_cpu_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	add	x0, sp, #24
	add	x1, sp, #16
	bl	_alpine_get_wdt_base
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	b	LBB0_5
LBB0_2:
Lloh2:
	adrp	x19, _fdtbus_bs_tag@GOTPAGE
Lloh3:
	ldr	x19, [x19, _fdtbus_bs_tag@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh4:
	adrp	x8, _al_devmap_pa@GOTPAGE
Lloh5:
	ldr	x8, [x8, _al_devmap_pa@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldp	x2, x9, [sp, #16]
	add	x1, x9, x8
	add	x4, sp, #12
	mov	w3, #0
	bl	_bus_space_map
	cbz	w0, LBB0_4
; %bb.3:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19]
	ldr	w1, [sp, #12]
Lloh9:
	adrp	x8, _WDTLOCK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WDTLOCK@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x8, _UNLOCK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _UNLOCK@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	bl	_bus_space_write_4
	ldr	w0, [x19]
	ldr	w1, [sp, #12]
Lloh15:
	adrp	x8, _WDTLOAD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WDTLOAD@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
Lloh18:
	adrp	x8, _LOAD_MIN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LOAD_MIN@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	bl	_bus_space_write_4
	ldr	w0, [x19]
	ldr	w1, [sp, #12]
Lloh21:
	adrp	x8, _WDTCONTROL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WDTCONTROL@GOTPAGEOFF]
Lloh23:
	adrp	x9, _INT_ENABLE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _INT_ENABLE@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
Lloh26:
	ldr	w8, [x9]
Lloh27:
	adrp	x9, _RESET_ENABLE@GOTPAGE
Lloh28:
	ldr	x9, [x9, _RESET_ENABLE@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w3, w9, w8
	bl	_bus_space_write_4
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh25
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to get WDT base, do power down manually..."

	.comm	_fdtbus_bs_tag,4,2              ; @fdtbus_bs_tag
	.comm	_al_devmap_pa,8,3               ; @al_devmap_pa
l_.str.1:                               ; @.str.1
	.asciz	"Unable to map WDT base, do power down manually..."

	.comm	_WDTLOCK,4,2                    ; @WDTLOCK
	.comm	_UNLOCK,4,2                     ; @UNLOCK
	.comm	_WDTLOAD,4,2                    ; @WDTLOAD
	.comm	_LOAD_MIN,4,2                   ; @LOAD_MIN
	.comm	_WDTCONTROL,4,2                 ; @WDTCONTROL
	.comm	_INT_ENABLE,4,2                 ; @INT_ENABLE
	.comm	_RESET_ENABLE,4,2               ; @RESET_ENABLE
	.no_dead_strip	_alpine_cpu_reset
.subsections_via_symbols
