	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra124_cpu_reset
_tegra124_cpu_reset:                    ## @tegra124_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	_fdtbus_bs_tag@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_PMC_PHYSBASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PMC_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-28(%rbp), %r8
	xorl	%ecx, %ecx
	callq	_bus_space_map
	movl	(%r14), %edi
	movl	-28(%rbp), %esi
	movq	_PMC_SCRATCH0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	callq	_bus_space_read_4
	movq	_PMC_SCRATCH0_MODE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	(%r14), %edi
	movl	-28(%rbp), %esi
	movl	(%rbx), %edx
	movq	_PMC_SCRATCH0_MODE_BOOTLOADER@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, %ecx
	callq	_bus_space_write_4
	movl	(%r14), %edi
	movl	-28(%rbp), %esi
	movl	(%rbx), %edx
	callq	_bus_space_read_4
	movl	(%r14), %edi
	movl	-28(%rbp), %esi
	movq	_PMC_CONTROL_REG@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	callq	_bus_space_read_4
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_spinlock_enter
	xorl	%eax, %eax
	callq	_dsb
	movl	(%r14), %edi
	movl	-28(%rbp), %esi
	movl	(%r15), %edx
	orl	$16, %ebx
	movl	%ebx, %ecx
	callq	_bus_space_write_4
	movl	(%r14), %edi
	movl	-28(%rbp), %esi
	movl	(%r15), %edx
	callq	_bus_space_read_4
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.comm	_fdtbus_bs_tag,4,2              ## @fdtbus_bs_tag
	.comm	_PMC_PHYSBASE,4,2               ## @PMC_PHYSBASE
	.comm	_PMC_SIZE,4,2                   ## @PMC_SIZE
	.comm	_PMC_SCRATCH0,4,2               ## @PMC_SCRATCH0
	.comm	_PMC_SCRATCH0_MODE_MASK,4,2     ## @PMC_SCRATCH0_MODE_MASK
	.comm	_PMC_SCRATCH0_MODE_BOOTLOADER,4,2 ## @PMC_SCRATCH0_MODE_BOOTLOADER
	.comm	_PMC_CONTROL_REG,4,2            ## @PMC_CONTROL_REG
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"Resetting..."

	.no_dead_strip	_tegra124_cpu_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra124_cpu_reset
_tegra124_cpu_reset:                    ; @tegra124_cpu_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x0, l_str@PAGE
Lloh1:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
Lloh2:
	adrp	x20, _fdtbus_bs_tag@GOTPAGE
Lloh3:
	ldr	x20, [x20, _fdtbus_bs_tag@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh4:
	adrp	x8, _PMC_PHYSBASE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PMC_PHYSBASE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x8, _PMC_SIZE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PMC_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	add	x4, sp, #12
	mov	w3, #0
	bl	_bus_space_map
	ldr	w0, [x20]
	ldr	w1, [sp, #12]
Lloh10:
	adrp	x19, _PMC_SCRATCH0@GOTPAGE
Lloh11:
	ldr	x19, [x19, _PMC_SCRATCH0@GOTPAGEOFF]
	ldr	w2, [x19]
	bl	_bus_space_read_4
Lloh12:
	adrp	x8, _PMC_SCRATCH0_MODE_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PMC_SCRATCH0_MODE_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	and	w8, w8, w0
	ldr	w0, [x20]
	ldr	w1, [sp, #12]
	ldr	w2, [x19]
Lloh15:
	adrp	x9, _PMC_SCRATCH0_MODE_BOOTLOADER@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PMC_SCRATCH0_MODE_BOOTLOADER@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w3, w9, w8
	bl	_bus_space_write_4
	ldr	w0, [x20]
	ldr	w1, [sp, #12]
	ldr	w2, [x19]
	bl	_bus_space_read_4
	ldr	w0, [x20]
	ldr	w1, [sp, #12]
Lloh18:
	adrp	x21, _PMC_CONTROL_REG@GOTPAGE
Lloh19:
	ldr	x21, [x21, _PMC_CONTROL_REG@GOTPAGEOFF]
	ldr	w2, [x21]
	bl	_bus_space_read_4
	mov	x19, x0
	bl	_spinlock_enter
	bl	_dsb
	ldr	w0, [x20]
	ldr	w1, [sp, #12]
	orr	w3, w19, #0x10
	ldr	w2, [x21]
	bl	_bus_space_write_4
	ldr	w0, [x20]
	ldr	w1, [sp, #12]
	ldr	w2, [x21]
	bl	_bus_space_read_4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	b	LBB0_1
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_fdtbus_bs_tag,4,2              ; @fdtbus_bs_tag
	.comm	_PMC_PHYSBASE,4,2               ; @PMC_PHYSBASE
	.comm	_PMC_SIZE,4,2                   ; @PMC_SIZE
	.comm	_PMC_SCRATCH0,4,2               ; @PMC_SCRATCH0
	.comm	_PMC_SCRATCH0_MODE_MASK,4,2     ; @PMC_SCRATCH0_MODE_MASK
	.comm	_PMC_SCRATCH0_MODE_BOOTLOADER,4,2 ; @PMC_SCRATCH0_MODE_BOOTLOADER
	.comm	_PMC_CONTROL_REG,4,2            ; @PMC_CONTROL_REG
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"Resetting..."

	.no_dead_strip	_tegra124_cpu_reset
.subsections_via_symbols
