	.file	"438749.c"
	.intel_syntax noprefix
	.text
	.globl	UART_BASE
	.section	.rodata
	.align 8
	.type	UART_BASE, @object
	.size	UART_BASE, 8
UART_BASE:
	.quad	1612709888
	.globl	UART_RBR
	.data
	.align 8
	.type	UART_RBR, @object
	.size	UART_RBR, 8
UART_RBR:
	.quad	1612713984
	.globl	UART_THR
	.align 8
	.type	UART_THR, @object
	.size	UART_THR, 8
UART_THR:
	.quad	1612713984
	.globl	UART_DLL
	.align 8
	.type	UART_DLL, @object
	.size	UART_DLL, 8
UART_DLL:
	.quad	1612713984
	.globl	UART_IER
	.align 8
	.type	UART_IER, @object
	.size	UART_IER, 8
UART_IER:
	.quad	1612713988
	.globl	UART_DLM
	.align 8
	.type	UART_DLM, @object
	.size	UART_DLM, 8
UART_DLM:
	.quad	1612713988
	.globl	UART_FCR
	.align 8
	.type	UART_FCR, @object
	.size	UART_FCR, 8
UART_FCR:
	.quad	1612713992
	.globl	UART_LCR
	.align 8
	.type	UART_LCR, @object
	.size	UART_LCR, 8
UART_LCR:
	.quad	1612713996
	.globl	UART_MCR
	.align 8
	.type	UART_MCR, @object
	.size	UART_MCR, 8
UART_MCR:
	.quad	1612714000
	.globl	UART_LSR
	.align 8
	.type	UART_LSR, @object
	.size	UART_LSR, 8
UART_LSR:
	.quad	1612714004
	.text
	.globl	init_serial
	.type	init_serial, @function
init_serial:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR UART_FCR[rip]
	mov	BYTE PTR [rax], -127
	mov	rax, QWORD PTR UART_LCR[rip]
	mov	BYTE PTR [rax], -128
	mov	rax, QWORD PTR UART_DLL[rip]
	mov	BYTE PTR [rax], 54
	mov	rax, QWORD PTR UART_DLM[rip]
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR UART_LCR[rip]
	mov	BYTE PTR [rax], 3
	mov	rax, QWORD PTR UART_MCR[rip]
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR UART_IER[rip]
	mov	BYTE PTR [rax], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	init_serial, .-init_serial
	.globl	putc
	.type	putc, @function
putc:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, edi
	mov	BYTE PTR -4[rbp], al
	nop
.L3:
	mov	rax, QWORD PTR UART_LSR[rip]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	and	eax, 64
	test	eax, eax
	je	.L3
	mov	rax, QWORD PTR UART_THR[rip]
	movzx	edx, BYTE PTR -4[rbp]
	mov	BYTE PTR [rax], dl
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	putc, .-putc
	.globl	getc
	.type	getc, @function
getc:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	nop
.L5:
	mov	rax, QWORD PTR UART_LSR[rip]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	and	eax, 1
	test	eax, eax
	je	.L5
	mov	rax, QWORD PTR UART_RBR[rip]
	movzx	eax, BYTE PTR [rax]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	getc, .-getc
	.globl	getlen
	.type	getlen, @function
getlen:
.LFB3:
	.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	DWORD PTR -4[rbp], 0
	mov	eax, 0
	call	getc
	movzx	eax, al
	or	DWORD PTR -4[rbp], eax
	sal	DWORD PTR -4[rbp], 8
	mov	eax, 0
	call	getc
	movzx	eax, al
	or	DWORD PTR -4[rbp], eax
	sal	DWORD PTR -4[rbp], 8
	mov	eax, 0
	call	getc
	movzx	eax, al
	or	DWORD PTR -4[rbp], eax
	sal	DWORD PTR -4[rbp], 8
	mov	eax, 0
	call	getc
	movzx	eax, al
	or	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	getlen, .-getlen
	.globl	puts
	.type	puts, @function
puts:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 8
	mov	QWORD PTR -8[rbp], rdi
	jmp	.L10
.L11:
	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
	call	putc
.L10:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L11
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	puts, .-puts
	.globl	puthex
	.type	puthex, @function
puthex:
.LFB5:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 24
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -8[rbp], 7
	jmp	.L13
.L17:
	mov	eax, DWORD PTR -8[rbp]
	sal	eax, 2
	mov	edx, DWORD PTR -20[rbp]
	mov	ecx, eax
	shr	edx, cl
	mov	eax, edx
	and	eax, 15
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 10
	jg	.L14
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 48
	movsx	eax, al
	mov	edi, eax
	call	putc
	jmp	.L15
.L14:
	cmp	DWORD PTR -4[rbp], 15
	jg	.L16
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 55
	movsx	eax, al
	mov	edi, eax
	call	putc
	jmp	.L15
.L16:
	mov	edi, 46
	call	putc
.L15:
	sub	DWORD PTR -8[rbp], 1
.L13:
	cmp	DWORD PTR -8[rbp], 0
	jns	.L17
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	puthex, .-puthex
	.section	.rodata
.LC0:
	.string	"NO BOOT FAIL\r\n"
.LC1:
	.string	"LEN "
.LC2:
	.string	"\r\n"
.LC3:
	.string	"BOOT\r\n"
	.text
	.globl	bootloader
	.type	bootloader, @function
bootloader:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	eax, 0
	call	init_serial
	lea	rdi, .LC0[rip]
	call	puts
	mov	eax, 0
	call	getlen
	mov	DWORD PTR -20[rbp], eax
	lea	rdi, .LC1[rip]
	call	puts
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	puthex
	lea	rdi, .LC2[rip]
	call	puts
	mov	eax, 2147483648
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -24[rbp], 0
	jmp	.L19
.L20:
	mov	eax, 0
	call	getc
	mov	rdx, QWORD PTR -16[rbp]
	mov	BYTE PTR [rdx], al
	add	QWORD PTR -16[rbp], 1
	add	DWORD PTR -24[rbp], 1
.L19:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jb	.L20
	lea	rdi, .LC3[rip]
	call	puts
	mov	eax, 2147483648
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, 0
	call	rdx
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	bootloader, .-bootloader
	.section	.rodata
.LC4:
	.string	"HALT "
	.text
	.globl	halt
	.type	halt, @function
halt:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 8
	mov	DWORD PTR -4[rbp], edi
	lea	rdi, .LC4[rip]
	call	puts
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	puthex
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	halt, .-halt
	.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	"438749.c"
	.text
	.global	UART_BASE
	.section	.rodata
	.align	2
	.type	UART_BASE, %object
	.size	UART_BASE, 4
UART_BASE:
	.word	1612709888
	.global	UART_RBR
	.data
	.align	2
	.type	UART_RBR, %object
	.size	UART_RBR, 4
UART_RBR:
	.word	1612713984
	.global	UART_THR
	.align	2
	.type	UART_THR, %object
	.size	UART_THR, 4
UART_THR:
	.word	1612713984
	.global	UART_DLL
	.align	2
	.type	UART_DLL, %object
	.size	UART_DLL, 4
UART_DLL:
	.word	1612713984
	.global	UART_IER
	.align	2
	.type	UART_IER, %object
	.size	UART_IER, 4
UART_IER:
	.word	1612713988
	.global	UART_DLM
	.align	2
	.type	UART_DLM, %object
	.size	UART_DLM, 4
UART_DLM:
	.word	1612713988
	.global	UART_FCR
	.align	2
	.type	UART_FCR, %object
	.size	UART_FCR, 4
UART_FCR:
	.word	1612713992
	.global	UART_LCR
	.align	2
	.type	UART_LCR, %object
	.size	UART_LCR, 4
UART_LCR:
	.word	1612713996
	.global	UART_MCR
	.align	2
	.type	UART_MCR, %object
	.size	UART_MCR, 4
UART_MCR:
	.word	1612714000
	.global	UART_LSR
	.align	2
	.type	UART_LSR, %object
	.size	UART_LSR, 4
UART_LSR:
	.word	1612714004
	.text
	.align	2
	.global	init_serial
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_serial, %function
init_serial:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L2
	ldr	r3, [r3]
	mvn	r2, #126
	strb	r2, [r3]
	ldr	r3, .L2+4
	ldr	r3, [r3]
	mvn	r2, #127
	strb	r2, [r3]
	ldr	r3, .L2+8
	ldr	r3, [r3]
	mov	r2, #54
	strb	r2, [r3]
	ldr	r3, .L2+12
	ldr	r3, [r3]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L2+4
	ldr	r3, [r3]
	mov	r2, #3
	strb	r2, [r3]
	ldr	r3, .L2+16
	ldr	r3, [r3]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L2+20
	ldr	r3, [r3]
	mov	r2, #0
	strb	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L3:
	.align	2
.L2:
	.word	UART_FCR
	.word	UART_LCR
	.word	UART_DLL
	.word	UART_DLM
	.word	UART_MCR
	.word	UART_IER
	.size	init_serial, .-init_serial
	.align	2
	.global	putc
	.syntax unified
	.arm
	.fpu softvfp
	.type	putc, %function
putc:
	@ 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
	mov	r3, r0
	strb	r3, [fp, #-5]
	nop
.L5:
	ldr	r3, .L6
	ldr	r3, [r3]
	ldrb	r3, [r3]
	and	r3, r3, #255
	and	r3, r3, #64
	cmp	r3, #0
	beq	.L5
	ldr	r3, .L6+4
	ldr	r3, [r3]
	ldrb	r2, [fp, #-5]
	strb	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L7:
	.align	2
.L6:
	.word	UART_LSR
	.word	UART_THR
	.size	putc, .-putc
	.align	2
	.global	getc
	.syntax unified
	.arm
	.fpu softvfp
	.type	getc, %function
getc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	nop
.L9:
	ldr	r3, .L11
	ldr	r3, [r3]
	ldrb	r3, [r3]
	and	r3, r3, #255
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L9
	ldr	r3, .L11+4
	ldr	r3, [r3]
	ldrb	r3, [r3]
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L12:
	.align	2
.L11:
	.word	UART_LSR
	.word	UART_RBR
	.size	getc, .-getc
	.align	2
	.global	getlen
	.syntax unified
	.arm
	.fpu softvfp
	.type	getlen, %function
getlen:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
	bl	getc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	orr	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #8
	str	r3, [fp, #-8]
	bl	getc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	orr	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #8
	str	r3, [fp, #-8]
	bl	getc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	orr	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #8
	str	r3, [fp, #-8]
	bl	getc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	orr	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	getlen, .-getlen
	.align	2
	.global	puts
	.syntax unified
	.arm
	.fpu softvfp
	.type	puts, %function
puts:
	@ 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	.L16
.L17:
	ldr	r3, [fp, #-8]
	add	r2, r3, #1
	str	r2, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putc
.L16:
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L17
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	puts, .-puts
	.align	2
	.global	puthex
	.syntax unified
	.arm
	.fpu softvfp
	.type	puthex, %function
puthex:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #7
	str	r3, [fp, #-12]
	b	.L19
.L23:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	lsr	r3, r2, r3
	and	r3, r3, #15
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #10
	bgt	.L20
	ldr	r3, [fp, #-8]
	and	r3, r3, #255
	add	r3, r3, #48
	and	r3, r3, #255
	mov	r0, r3
	bl	putc
	b	.L21
.L20:
	ldr	r3, [fp, #-8]
	cmp	r3, #15
	bgt	.L22
	ldr	r3, [fp, #-8]
	and	r3, r3, #255
	add	r3, r3, #55
	and	r3, r3, #255
	mov	r0, r3
	bl	putc
	b	.L21
.L22:
	mov	r0, #46
	bl	putc
.L21:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L19:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L23
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	puthex, .-puthex
	.section	.rodata
	.align	2
.LC0:
	.ascii	"NO BOOT FAIL\015\012\000"
	.align	2
.LC1:
	.ascii	"LEN \000"
	.align	2
.LC2:
	.ascii	"\015\012\000"
	.align	2
.LC3:
	.ascii	"BOOT\015\012\000"
	.text
	.align	2
	.global	bootloader
	.syntax unified
	.arm
	.fpu softvfp
	.type	bootloader, %function
bootloader:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	bl	init_serial
	ldr	r0, .L27
	bl	puts
	bl	getlen
	str	r0, [fp, #-12]
	ldr	r0, .L27+4
	bl	puts
	ldr	r0, [fp, #-12]
	bl	puthex
	ldr	r0, .L27+8
	bl	puts
	mov	r3, #-2147483648
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L25
.L26:
	bl	getc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-20]
	strb	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L25:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bcc	.L26
	ldr	r0, .L27+12
	bl	puts
	mov	r3, #-2147483648
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	blx	r3
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	bootloader, .-bootloader
	.section	.rodata
	.align	2
.LC4:
	.ascii	"HALT \000"
	.text
	.align	2
	.global	halt
	.syntax unified
	.arm
	.fpu softvfp
	.type	halt, %function
halt:
	@ 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]
	ldr	r0, .L30
	bl	puts
	ldr	r0, [fp, #-8]
	bl	puthex
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC4
	.size	halt, .-halt
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
