	.file	"898812.c"
	.intel_syntax noprefix
	.text
	.type	stm32image_default_header, @function
stm32image_default_header:
.LFB36:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	je	.L4
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 843928659
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 100[rax], 1
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 104[rax], 1
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 96[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 255[rax], 16
	jmp	.L1
.L4:
	nop
.L1:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE36:
	.size	stm32image_default_header, .-stm32image_default_header
	.type	stm32image_checksum, @function
stm32image_checksum:
.LFB37:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 256
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jnb	.L6
	mov	eax, 0
	jmp	.L7
.L6:
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -12[rbp]
	sub	DWORD PTR -28[rbp], eax
	jmp	.L8
.L9:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	DWORD PTR -16[rbp], eax
	add	QWORD PTR -8[rbp], 1
	sub	DWORD PTR -28[rbp], 1
.L8:
	cmp	DWORD PTR -28[rbp], 0
	jne	.L9
	mov	eax, DWORD PTR -16[rbp]
.L7:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE37:
	.size	stm32image_checksum, .-stm32image_checksum
	.section	.rodata
	.align 8
.LC0:
	.string	"Image Type   : ST Microelectronics STM32 V%d.%d\n"
.LC1:
	.string	"Image Size   : %lu bytes\n"
.LC2:
	.string	"Image Load   : 0x%08x\n"
.LC3:
	.string	"Entry Point  : 0x%08x\n"
.LC4:
	.string	"Checksum     : 0x%08x\n"
.LC5:
	.string	"Option     : 0x%08x\n"
.LC6:
	.string	"Version\t   : 0x%08x\n"
	.text
	.type	stm32image_print_header, @function
stm32image_print_header:
.LFB38:
	.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 73[rax]
	movzx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 74[rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 76[rax]
	mov	eax, eax
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 88[rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 80[rax]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 68[rax]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 100[rax]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 96[rax]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE38:
	.size	stm32image_print_header, .-stm32image_print_header
	.type	stm32image_set_header, @function
stm32image_set_header:
.LFB39:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	DWORD PTR -40[rbp], ecx
	mov	DWORD PTR -44[rbp], r8d
	mov	DWORD PTR -48[rbp], r9d
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	stm32image_default_header
	mov	eax, DWORD PTR 16[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 74[rax], dl
	mov	eax, DWORD PTR 24[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 73[rax], dl
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -40[rbp]
	mov	DWORD PTR 88[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -44[rbp]
	mov	DWORD PTR 80[rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 48[rax]
	lea	edx, -256[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 76[rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 48[rax]
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	stm32image_checksum
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 68[rdx], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -48[rbp]
	mov	DWORD PTR 96[rax], edx
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE39:
	.size	stm32image_set_header, .-stm32image_set_header
	.section	.rodata
.LC7:
	.string	"Can't open %s: %s\n"
.LC8:
	.string	"Can't read %s\n"
.LC9:
	.string	"Write error %s: %s\n"
.LC10:
	.string	"Write error on %s: %s\n"
.LC11:
	.string	"Can't write %s\n"
	.text
	.type	stm32image_create_header_file, @function
stm32image_create_header_file:
.LFB40:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 464
	mov	QWORD PTR -440[rbp], rdi
	mov	QWORD PTR -448[rbp], rsi
	mov	DWORD PTR -452[rbp], edx
	mov	DWORD PTR -456[rbp], ecx
	mov	DWORD PTR -460[rbp], r8d
	mov	DWORD PTR -464[rbp], r9d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -448[rbp]
	mov	edx, 438
	mov	esi, 1602
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -432[rbp], eax
	cmp	DWORD PTR -432[rbp], -1
	jne	.L13
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -448[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L22
.L13:
	mov	rax, QWORD PTR -440[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -428[rbp], eax
	cmp	DWORD PTR -428[rbp], -1
	jne	.L15
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -440[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L22
.L15:
	lea	rdx, -416[rbp]
	mov	eax, DWORD PTR -428[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	test	eax, eax
	jns	.L16
	mov	eax, -1
	jmp	.L22
.L16:
	mov	rax, QWORD PTR -368[rbp]
	mov	rsi, rax
	mov	eax, DWORD PTR -428[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 1
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -424[rbp], rax
	cmp	QWORD PTR -424[rbp], -1
	jne	.L17
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -440[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L22
.L17:
	lea	rax, -272[rbp]
	mov	edx, 256
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -272[rbp]
	mov	eax, DWORD PTR -432[rbp]
	mov	edx, 256
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	rax, 256
	je	.L18
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -448[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L22
.L18:
	mov	rax, QWORD PTR -368[rbp]
	mov	rdx, rax
	mov	rcx, QWORD PTR -424[rbp]
	mov	eax, DWORD PTR -432[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	rdx, QWORD PTR -368[rbp]
	cmp	rax, rdx
	je	.L19
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -448[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L22
.L19:
	mov	rax, QWORD PTR -368[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -424[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	mov	eax, DWORD PTR -428[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rdx, -416[rbp]
	mov	eax, DWORD PTR -432[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	test	eax, eax
	jns	.L20
	mov	eax, -1
	jmp	.L22
.L20:
	mov	rax, QWORD PTR -368[rbp]
	mov	rsi, rax
	mov	eax, DWORD PTR -432[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -424[rbp], rax
	cmp	QWORD PTR -424[rbp], -1
	jne	.L21
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -448[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L22
.L21:
	mov	r9d, DWORD PTR -460[rbp]
	mov	r8d, DWORD PTR -456[rbp]
	mov	ecx, DWORD PTR -452[rbp]
	mov	edx, DWORD PTR -432[rbp]
	lea	rsi, -416[rbp]
	mov	rax, QWORD PTR -424[rbp]
	mov	edi, DWORD PTR 16[rbp]
	push	rdi
	mov	edi, DWORD PTR -464[rbp]
	push	rdi
	mov	rdi, rax
	call	stm32image_set_header
	add	rsp, 16
	mov	rax, QWORD PTR -424[rbp]
	mov	rdi, rax
	call	stm32image_print_header
	mov	rax, QWORD PTR -368[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -424[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	mov	eax, DWORD PTR -432[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L22:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE40:
	.size	stm32image_create_header_file, .-stm32image_create_header_file
	.section	.rodata
	.align 8
.LC12:
	.string	"Usage : %s [-s srcfile] [-d destfile] [-l loadaddr] [-e entry_point] [-m major] [-n minor]\n"
.LC13:
	.string	":s:d:l:e:v:m:n:"
.LC14:
	.string	"Missing -s option\n"
.LC15:
	.string	"Missing -d option\n"
.LC16:
	.string	"Missing -l option\n"
.LC17:
	.string	"Missing -e option\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	DWORD PTR -44[rbp], -1
	mov	DWORD PTR -40[rbp], -1
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -32[rbp], 1
	mov	DWORD PTR -28[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	mov	QWORD PTR -8[rbp], 0
	jmp	.L25
.L36:
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 100
	cmp	eax, 18
	ja	.L26
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L28[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L28[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L28:
	.long	.L34-.L28
	.long	.L33-.L28
	.long	.L26-.L28
	.long	.L26-.L28
	.long	.L26-.L28
	.long	.L26-.L28
	.long	.L26-.L28
	.long	.L26-.L28
	.long	.L32-.L28
	.long	.L31-.L28
	.long	.L30-.L28
	.long	.L26-.L28
	.long	.L26-.L28
	.long	.L26-.L28
	.long	.L26-.L28
	.long	.L29-.L28
	.long	.L26-.L28
	.long	.L26-.L28
	.long	.L27-.L28
	.text
.L29:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L25
.L34:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L25
.L32:
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -44[rbp], eax
	jmp	.L25
.L33:
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -40[rbp], eax
	jmp	.L25
.L27:
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -36[rbp], eax
	jmp	.L25
.L31:
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -32[rbp], eax
	jmp	.L25
.L30:
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -28[rbp], eax
	jmp	.L25
.L26:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L35
.L25:
	mov	rcx, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR -52[rbp]
	lea	rdx, .LC13[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	jne	.L36
	cmp	QWORD PTR -8[rbp], 0
	jne	.L37
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 18
	mov	esi, 1
	lea	rdi, .LC14[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L35
.L37:
	cmp	QWORD PTR -16[rbp], 0
	jne	.L38
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 18
	mov	esi, 1
	lea	rdi, .LC15[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L35
.L38:
	cmp	DWORD PTR -44[rbp], -1
	jne	.L39
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 18
	mov	esi, 1
	lea	rdi, .LC16[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L35
.L39:
	cmp	DWORD PTR -40[rbp], -1
	jne	.L40
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 18
	mov	esi, 1
	lea	rdi, .LC17[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L35
.L40:
	mov	edi, DWORD PTR -28[rbp]
	mov	r9d, DWORD PTR -32[rbp]
	mov	r8d, DWORD PTR -36[rbp]
	mov	ecx, DWORD PTR -40[rbp]
	mov	edx, DWORD PTR -44[rbp]
	mov	rsi, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	sub	rsp, 8
	push	rdi
	mov	rdi, rax
	call	stm32image_create_header_file
	add	rsp, 16
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.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	"898812.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stm32image_default_header, %function
stm32image_default_header:
	@ 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]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L4
	ldr	r3, [fp, #-8]
	ldr	r2, .L5
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #1
	str	r2, [r3, #100]
	ldr	r3, [fp, #-8]
	mov	r2, #1
	str	r2, [r3, #104]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #96]
	ldr	r3, [fp, #-8]
	mov	r2, #16
	strb	r2, [r3, #255]
	b	.L1
.L4:
	nop
.L1:
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L6:
	.align	2
.L5:
	.word	843928659
	.size	stm32image_default_header, .-stm32image_default_header
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stm32image_checksum, %function
stm32image_checksum:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #256
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bcs	.L8
	mov	r3, #0
	b	.L9
.L8:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	str	r3, [fp, #-28]
	b	.L10
.L11:
	ldr	r3, [fp, #-12]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	str	r3, [fp, #-28]
.L10:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L11
	ldr	r3, [fp, #-16]
.L9:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	stm32image_checksum, .-stm32image_checksum
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Image Type   : ST Microelectronics STM32 V%d.%d\012"
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"Image Size   : %lu bytes\012\000"
	.align	2
.LC2:
	.ascii	"Image Load   : 0x%08x\012\000"
	.align	2
.LC3:
	.ascii	"Entry Point  : 0x%08x\012\000"
	.align	2
.LC4:
	.ascii	"Checksum     : 0x%08x\012\000"
	.align	2
.LC5:
	.ascii	"Option     : 0x%08x\012\000"
	.align	2
.LC6:
	.ascii	"Version\011   : 0x%08x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stm32image_print_header, %function
stm32image_print_header:
	@ 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]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #74]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #73]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r0, .L13
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #76]
	mov	r1, r3
	ldr	r0, .L13+4
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #88]
	mov	r1, r3
	ldr	r0, .L13+8
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #80]
	mov	r1, r3
	ldr	r0, .L13+12
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #68]
	mov	r1, r3
	ldr	r0, .L13+16
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #100]
	mov	r1, r3
	ldr	r0, .L13+20
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #96]
	mov	r1, r3
	ldr	r0, .L13+24
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	stm32image_print_header, .-stm32image_print_header
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stm32image_set_header, %function
stm32image_set_header:
	@ args = 16, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	stm32image_default_header
	ldr	r3, [fp, #12]
	and	r2, r3, #255
	ldr	r3, [fp, #-8]
	strb	r2, [r3, #74]
	ldr	r3, [fp, #16]
	and	r2, r3, #255
	ldr	r3, [fp, #-8]
	strb	r2, [r3, #73]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #88]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #4]
	str	r2, [r3, #80]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #44]
	sub	r2, r3, #256
	ldr	r3, [fp, #-8]
	str	r2, [r3, #76]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #44]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	stm32image_checksum
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #68]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #8]
	str	r2, [r3, #96]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	stm32image_set_header, .-stm32image_set_header
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Can't open %s: %s\012\000"
	.align	2
.LC8:
	.ascii	"Can't read %s\012\000"
	.align	2
.LC9:
	.ascii	"Write error %s: %s\012\000"
	.align	2
.LC10:
	.ascii	"Write error on %s: %s\012\000"
	.align	2
.LC11:
	.ascii	"Can't write %s\012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stm32image_create_header_file, %function
stm32image_create_header_file:
	@ args = 12, pretend = 0, frame = 384
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #404
	str	r0, [fp, #-384]
	str	r1, [fp, #-388]
	str	r2, [fp, #-392]
	str	r3, [fp, #-396]
	ldr	r3, .L28
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r2, .L28+4
	ldr	r1, .L28+8
	ldr	r0, [fp, #-388]
	bl	open
	str	r0, [fp, #-376]
	ldr	r3, [fp, #-376]
	cmn	r3, #1
	bne	.L17
	ldr	r3, .L28+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-388]
	ldr	r1, .L28+16
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L26
.L17:
	mov	r1, #0
	ldr	r0, [fp, #-384]
	bl	open
	str	r0, [fp, #-372]
	ldr	r3, [fp, #-372]
	cmn	r3, #1
	bne	.L19
	ldr	r3, .L28+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-384]
	ldr	r1, .L28+16
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L26
.L19:
	sub	r3, fp, #364
	mov	r1, r3
	ldr	r0, [fp, #-372]
	bl	fstat
	mov	r3, r0
	cmp	r3, #0
	bge	.L20
	mvn	r3, #0
	b	.L26
.L20:
	ldr	r3, [fp, #-320]
	mov	r1, r3
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-372]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #1
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-368]
	ldr	r3, [fp, #-368]
	cmn	r3, #1
	bne	.L21
	ldr	r3, .L28+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-384]
	ldr	r1, .L28+20
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
	b	.L26
.L21:
	sub	r3, fp, #272
	mov	r2, #256
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #272
	mov	r2, #256
	mov	r1, r3
	ldr	r0, [fp, #-376]
	bl	write
	mov	r3, r0
	cmp	r3, #256
	beq	.L22
	ldr	r3, .L28+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-388]
	ldr	r1, .L28+24
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L26
.L22:
	ldr	r3, [fp, #-320]
	mov	r2, r3
	ldr	r1, [fp, #-368]
	ldr	r0, [fp, #-376]
	bl	write
	mov	r2, r0
	ldr	r3, [fp, #-320]
	cmp	r2, r3
	beq	.L23
	ldr	r3, .L28+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-388]
	ldr	r1, .L28+28
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L26
.L23:
	ldr	r3, [fp, #-320]
	mov	r1, r3
	ldr	r0, [fp, #-368]
	bl	munmap
	ldr	r0, [fp, #-372]
	bl	close
	sub	r3, fp, #364
	mov	r1, r3
	ldr	r0, [fp, #-376]
	bl	fstat
	mov	r3, r0
	cmp	r3, #0
	bge	.L24
	mvn	r3, #0
	b	.L26
.L24:
	ldr	r3, [fp, #-320]
	mov	r1, r3
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-376]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-368]
	ldr	r3, [fp, #-368]
	cmn	r3, #1
	bne	.L25
	ldr	r3, .L28+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-388]
	ldr	r1, .L28+32
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
	b	.L26
.L25:
	sub	r1, fp, #364
	ldr	r3, [fp, #12]
	str	r3, [sp, #12]
	ldr	r3, [fp, #8]
	str	r3, [sp, #8]
	ldr	r3, [fp, #4]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-396]
	str	r3, [sp]
	ldr	r3, [fp, #-392]
	ldr	r2, [fp, #-376]
	ldr	r0, [fp, #-368]
	bl	stm32image_set_header
	ldr	r0, [fp, #-368]
	bl	stm32image_print_header
	ldr	r3, [fp, #-320]
	mov	r1, r3
	ldr	r0, [fp, #-368]
	bl	munmap
	ldr	r0, [fp, #-376]
	bl	close
	mov	r3, #0
.L26:
	ldr	r2, .L28
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L27
	bl	__stack_chk_fail
.L27:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L29:
	.align	2
.L28:
	.word	.LC12
	.word	438
	.word	1602
	.word	stderr
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	stm32image_create_header_file, .-stm32image_create_header_file
	.section	.rodata
	.align	2
.LC13:
	.ascii	"Usage : %s [-s srcfile] [-d destfile] [-l loadaddr]"
	.ascii	" [-e entry_point] [-m major] [-n minor]\012\000"
	.align	2
.LC14:
	.ascii	":s:d:l:e:v:m:n:\000"
	.align	2
.LC15:
	.ascii	"Missing -s option\012\000"
	.align	2
.LC16:
	.ascii	"Missing -d option\012\000"
	.align	2
.LC17:
	.ascii	"Missing -l option\012\000"
	.align	2
.LC18:
	.ascii	"Missing -e option\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	mvn	r3, #0
	str	r3, [fp, #-40]
	mvn	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #1
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L31
.L42:
	ldr	r3, [fp, #-8]
	sub	r3, r3, #100
	cmp	r3, #18
	ldrls	pc, [pc, r3, asl #2]
	b	.L32
.L34:
	.word	.L40
	.word	.L39
	.word	.L32
	.word	.L32
	.word	.L32
	.word	.L32
	.word	.L32
	.word	.L32
	.word	.L38
	.word	.L37
	.word	.L36
	.word	.L32
	.word	.L32
	.word	.L32
	.word	.L32
	.word	.L35
	.word	.L32
	.word	.L32
	.word	.L33
.L35:
	ldr	r3, .L47
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	b	.L31
.L40:
	ldr	r3, .L47
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	b	.L31
.L38:
	ldr	r3, .L47
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-40]
	b	.L31
.L39:
	ldr	r3, .L47
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-36]
	b	.L31
.L33:
	ldr	r3, .L47
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-32]
	b	.L31
.L37:
	ldr	r3, .L47
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-28]
	b	.L31
.L36:
	ldr	r3, .L47
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-24]
	b	.L31
.L32:
	ldr	r3, .L47+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L47+8
	bl	fprintf
	mvn	r3, #0
	b	.L41
.L31:
	ldr	r2, .L47+12
	ldr	r1, [fp, #-52]
	ldr	r0, [fp, #-48]
	bl	getopt
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L42
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L43
	ldr	r3, .L47+4
	ldr	r3, [r3]
	mov	r2, #18
	mov	r1, #1
	ldr	r0, .L47+16
	bl	fwrite
	mvn	r3, #0
	b	.L41
.L43:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L44
	ldr	r3, .L47+4
	ldr	r3, [r3]
	mov	r2, #18
	mov	r1, #1
	ldr	r0, .L47+20
	bl	fwrite
	mvn	r3, #0
	b	.L41
.L44:
	ldr	r3, [fp, #-40]
	cmn	r3, #1
	bne	.L45
	ldr	r3, .L47+4
	ldr	r3, [r3]
	mov	r2, #18
	mov	r1, #1
	ldr	r0, .L47+24
	bl	fwrite
	mvn	r3, #0
	b	.L41
.L45:
	ldr	r3, [fp, #-36]
	cmn	r3, #1
	bne	.L46
	ldr	r3, .L47+4
	ldr	r3, [r3]
	mov	r2, #18
	mov	r1, #1
	ldr	r0, .L47+28
	bl	fwrite
	mvn	r3, #0
	b	.L41
.L46:
	ldr	r0, [fp, #-40]
	ldr	ip, [fp, #-36]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-24]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r0
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	stm32image_create_header_file
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
.L41:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L48:
	.align	2
.L47:
	.word	optarg
	.word	stderr
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
