	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_imx_wdog_cpu_reset             ## -- Begin function imx_wdog_cpu_reset
	.p2align	4, 0x90
_imx_wdog_cpu_reset:                    ## @imx_wdog_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
	movl	$4, %esi
	callq	_devmap_ptov
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	movq	_WDOG_CR_WDT@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	je	LBB0_5
## %bb.4:
	movq	_WDOG_CR_WDA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, (%rbx)
	movl	$1000000, %edi                  ## imm = 0xF4240
	callq	_DELAY
	leaq	L_str(%rip), %rdi
	callq	_puts
	movl	$10000, %edi                    ## imm = 0x2710
	callq	_DELAY
LBB0_5:
	movq	_WDOG_CR_SRS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, (%rbx)
	movl	-12(%rbp), %eax
	movl	%eax, (%rbx)
	movl	-12(%rbp), %eax
	movl	%eax, (%rbx)
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_cpu_spinwait
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_printf
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_cpu_spinwait
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"imx_wdog_cpu_reset(): cannot find control register... locking up now."

	.comm	_WDOG_CR_WDT,4,2                ## @WDOG_CR_WDT
	.comm	_WDOG_CR_WDA,4,2                ## @WDOG_CR_WDA
	.comm	_WDOG_CR_SRS,4,2                ## @WDOG_CR_SRS
L_str:                                  ## @str
	.asciz	"imx_wdog_cpu_reset(): External reset failed, trying internal cpu-reset"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_imx_wdog_cpu_reset             ; -- Begin function imx_wdog_cpu_reset
	.p2align	2
_imx_wdog_cpu_reset:                    ; @imx_wdog_cpu_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	w1, #4
	bl	_devmap_ptov
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
	str	w8, [sp, #12]
	ldr	w8, [sp, #12]
Lloh0:
	adrp	x9, _WDOG_CR_WDT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WDOG_CR_WDT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _WDOG_CR_WDA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WDOG_CR_WDA@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
	str	w8, [sp, #12]
	ldr	w8, [sp, #12]
	str	w8, [x19]
	mov	w0, #16960
	movk	w0, #15, lsl #16
	bl	_DELAY
Lloh6:
	adrp	x0, l_str@PAGE
Lloh7:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	w0, #10000
	bl	_DELAY
LBB0_3:
Lloh8:
	adrp	x8, _WDOG_CR_SRS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WDOG_CR_SRS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
	str	w8, [sp, #12]
	ldr	w8, [sp, #12]
	str	w8, [x19]
	ldr	w8, [sp, #12]
	str	w8, [x19]
	ldr	w8, [sp, #12]
	str	w8, [x19]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	bl	_cpu_spinwait
	b	LBB0_4
LBB0_5:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	bl	_cpu_spinwait
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"imx_wdog_cpu_reset(): cannot find control register... locking up now."

	.comm	_WDOG_CR_WDT,4,2                ; @WDOG_CR_WDT
	.comm	_WDOG_CR_WDA,4,2                ; @WDOG_CR_WDA
	.comm	_WDOG_CR_SRS,4,2                ; @WDOG_CR_SRS
l_str:                                  ; @str
	.asciz	"imx_wdog_cpu_reset(): External reset failed, trying internal cpu-reset"

.subsections_via_symbols
