	.file	"extr_tegra124_machdep.c_tegra124_cpu_reset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Resetting...\n"
	.text
	.p2align 4
	.type	tegra124_cpu_reset, @function
tegra124_cpu_reset:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	lea	rdi, .LC0[rip]
	sub	rsp, 16
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	printf@PLT
	mov	edx, DWORD PTR PMC_SIZE[rip]
	mov	esi, DWORD PTR PMC_PHYSBASE[rip]
	xor	ecx, ecx
	mov	edi, DWORD PTR fdtbus_bs_tag[rip]
	lea	r8, 4[rsp]
	call	bus_space_map@PLT
	mov	edx, DWORD PTR PMC_SCRATCH0[rip]
	mov	esi, DWORD PTR 4[rsp]
	mov	edi, DWORD PTR fdtbus_bs_tag[rip]
	call	bus_space_read_4@PLT
	mov	ecx, DWORD PTR PMC_SCRATCH0_MODE_BOOTLOADER[rip]
	mov	esi, DWORD PTR 4[rsp]
	mov	edx, DWORD PTR PMC_SCRATCH0[rip]
	mov	edi, DWORD PTR fdtbus_bs_tag[rip]
	and	eax, DWORD PTR PMC_SCRATCH0_MODE_MASK[rip]
	or	ecx, eax
	call	bus_space_write_4@PLT
	mov	edx, DWORD PTR PMC_SCRATCH0[rip]
	mov	esi, DWORD PTR 4[rsp]
	mov	edi, DWORD PTR fdtbus_bs_tag[rip]
	call	bus_space_read_4@PLT
	mov	edx, DWORD PTR PMC_CONTROL_REG[rip]
	mov	esi, DWORD PTR 4[rsp]
	mov	edi, DWORD PTR fdtbus_bs_tag[rip]
	call	bus_space_read_4@PLT
	mov	ebx, eax
	xor	eax, eax
	call	spinlock_enter@PLT
	xor	eax, eax
	or	ebx, 16
	call	dsb@PLT
	mov	edx, DWORD PTR PMC_CONTROL_REG[rip]
	mov	esi, DWORD PTR 4[rsp]
	mov	ecx, ebx
	mov	edi, DWORD PTR fdtbus_bs_tag[rip]
	call	bus_space_write_4@PLT
	mov	edx, DWORD PTR PMC_CONTROL_REG[rip]
	mov	esi, DWORD PTR 4[rsp]
	mov	edi, DWORD PTR fdtbus_bs_tag[rip]
	call	bus_space_read_4@PLT
.L2:
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	tegra124_cpu_reset, .-tegra124_cpu_reset
	.comm	fdtbus_bs_tag,4,4
	.comm	PMC_SIZE,4,4
	.comm	PMC_SCRATCH0_MODE_MASK,4,4
	.comm	PMC_SCRATCH0_MODE_BOOTLOADER,4,4
	.comm	PMC_SCRATCH0,4,4
	.comm	PMC_PHYSBASE,4,4
	.comm	PMC_CONTROL_REG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_tegra124_machdep.c_tegra124_cpu_reset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Resetting...\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tegra124_cpu_reset, %function
tegra124_cpu_reset:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L6
	sub	sp, sp, #16
	ldr	r0, .L6+4
	ldr	r4, .L6+8
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	printf
	ldr	r2, .L6+12
	ldr	r1, .L6+16
	ldr	r6, .L6+20
	add	r3, sp, #8
	ldr	r2, [r2]
	ldr	r1, [r1]
	ldr	r0, [r4]
	str	r3, [sp]
	mov	r3, #0
	bl	bus_space_map
	ldr	r2, [r6]
	ldr	r1, [sp, #8]
	ldr	r0, [r4]
	bl	bus_space_read_4
	ldr	r3, .L6+24
	ldr	r2, .L6+28
	ldr	r3, [r3]
	ldr	r2, [r2]
	and	r3, r3, r0
	orr	r3, r3, r2
	ldr	r5, .L6+32
	ldr	r2, [r6]
	ldr	r1, [sp, #8]
	ldr	r0, [r4]
	bl	bus_space_write_4
	ldr	r2, [r6]
	ldr	r1, [sp, #8]
	ldr	r0, [r4]
	bl	bus_space_read_4
	ldr	r2, [r5]
	ldr	r1, [sp, #8]
	ldr	r0, [r4]
	bl	bus_space_read_4
	mov	r6, r0
	bl	spinlock_enter
	bl	dsb
	ldr	r2, [r5]
	ldr	r1, [sp, #8]
	ldr	r0, [r4]
	orr	r3, r6, #16
	bl	bus_space_write_4
	ldr	r2, [r5]
	ldr	r0, [r4]
	ldr	r1, [sp, #8]
	bl	bus_space_read_4
.L2:
	b	.L2
.L7:
	.align	2
.L6:
	.word	.LC1
	.word	.LC0
	.word	fdtbus_bs_tag
	.word	PMC_SIZE
	.word	PMC_PHYSBASE
	.word	PMC_SCRATCH0
	.word	PMC_SCRATCH0_MODE_MASK
	.word	PMC_SCRATCH0_MODE_BOOTLOADER
	.word	PMC_CONTROL_REG
	.size	tegra124_cpu_reset, .-tegra124_cpu_reset
	.comm	fdtbus_bs_tag,4,4
	.comm	PMC_SIZE,4,4
	.comm	PMC_SCRATCH0_MODE_MASK,4,4
	.comm	PMC_SCRATCH0_MODE_BOOTLOADER,4,4
	.comm	PMC_SCRATCH0,4,4
	.comm	PMC_PHYSBASE,4,4
	.comm	PMC_CONTROL_REG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
