	.file	"925500.c"
	.intel_syntax noprefix
	.text
	.globl	ram0
	.bss
	.align 32
	.type	ram0, @object
	.size	ram0, 256
ram0:
	.zero	256
	.text
	.globl	putstr
	.type	putstr, @function
putstr:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	jmp	.L2
.L4:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L3
	mov	edi, 13
	mov	eax, 0
	call	uart_tx@PLT
.L3:
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -8[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	mov	eax, 0
	call	uart_tx@PLT
.L2:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L4
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	putstr, .-putstr
	.globl	DdrInitData
	.data
	.align 32
	.type	DdrInitData, @object
	.size	DdrInitData, 32
DdrInitData:
	.long	112
	.long	8388640
	.long	10240
	.long	2367488
	.long	8388640
	.long	16
	.long	16
	.long	270336
	.text
	.globl	ddr_init
	.type	ddr_init, @function
ddr_init:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L6
.L9:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, DdrInitData[rip]
	mov	eax, DWORD PTR [rdx+rax]
	add	eax, 268435456
	cdqe
	mov	DWORD PTR [rax], 0
	mov	DWORD PTR -8[rbp], 0
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	mov	DWORD PTR -8[rbp], eax
.L7:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, 3
	jle	.L8
	mov	eax, DWORD PTR -12[rbp]
	add	eax, 1
	mov	DWORD PTR -12[rbp], eax
.L6:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 7
	jbe	.L9
	mov	DWORD PTR -8[rbp], 0
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	mov	DWORD PTR -8[rbp], eax
.L10:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, 99
	jle	.L11
	mov	eax, 268435456
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	ddr_init, .-ddr_init
	.globl	led
	.type	led, @function
led:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	led, .-led
	.section	.rodata
.LC0:
	.string	"CPU tests passed\n"
.LC1:
	.string	"DDR Init\n"
.LC2:
	.string	"GDB Stub for HS-2J0 SH2 ROM\n"
	.text
	.globl	main_sh
	.type	main_sh, @function
main_sh:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edi, 64
	call	led
	mov	eax, 0
	call	uart_set_baudrate@PLT
	mov	edi, 66
	call	led
	lea	rdi, .LC0[rip]
	call	putstr
	mov	edi, 67
	call	led
	lea	rdi, .LC1[rip]
	call	putstr
	mov	edi, 66
	call	led
	call	ddr_init
	lea	rdi, .LC2[rip]
	call	putstr
	lea	rdi, version_string[rip]
	call	putstr
	mov	edi, 80
	call	led
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	main_sh, .-main_sh
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"925500.c"
	.text
	.comm	ram0,256,4
	.align	2
	.global	putstr
	.syntax unified
	.arm
	.fpu softvfp
	.type	putstr, %function
putstr:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	b	.L2
.L4:
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L3
	mov	r0, #13
	bl	uart_tx
.L3:
	ldr	r3, [fp, #-8]
	add	r2, r3, #1
	str	r2, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	uart_tx
.L2:
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L4
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	putstr, .-putstr
	.global	DdrInitData
	.data
	.align	2
	.type	DdrInitData, %object
	.size	DdrInitData, 32
DdrInitData:
	.word	112
	.word	8388640
	.word	10240
	.word	2367488
	.word	8388640
	.word	16
	.word	16
	.word	270336
	.text
	.align	2
	.global	ddr_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	ddr_init, %function
ddr_init:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L6
.L9:
	ldr	r3, [fp, #-16]
	ldr	r2, .L13
	ldr	r3, [r2, r3, lsl #2]
	add	r3, r3, #268435456
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L7
.L8:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L7:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L8
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L6:
	ldr	r3, [fp, #-16]
	cmp	r3, #7
	bls	.L9
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L10
.L11:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L10:
	ldr	r3, [fp, #-12]
	cmp	r3, #99
	ble	.L11
	mov	r3, #268435456
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L14:
	.align	2
.L13:
	.word	DdrInitData
	.size	ddr_init, .-ddr_init
	.align	2
	.global	led
	.syntax unified
	.arm
	.fpu softvfp
	.type	led, %function
led:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	led, .-led
	.section	.rodata
	.align	2
.LC0:
	.ascii	"CPU tests passed\012\000"
	.align	2
.LC1:
	.ascii	"DDR Init\012\000"
	.align	2
.LC2:
	.ascii	"GDB Stub for HS-2J0 SH2 ROM\012\000"
	.text
	.align	2
	.global	main_sh
	.syntax unified
	.arm
	.fpu softvfp
	.type	main_sh, %function
main_sh:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r0, #64
	bl	led
	bl	uart_set_baudrate
	mov	r0, #66
	bl	led
	ldr	r0, .L17
	bl	putstr
	mov	r0, #67
	bl	led
	ldr	r0, .L17+4
	bl	putstr
	mov	r0, #66
	bl	led
	bl	ddr_init
	ldr	r0, .L17+8
	bl	putstr
	ldr	r0, .L17+12
	bl	putstr
	mov	r0, #80
	bl	led
	nop
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	version_string
	.size	main_sh, .-main_sh
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
