	.file	"15761531.c"
	.intel_syntax noprefix
	.text
	.local	ofname
	.comm	ofname,8,8
	.local	progname
	.comm	progname,8,8
	.local	model
	.comm	model,8,8
	.local	signature
	.comm	signature,8,8
	.section	.rodata
.LC0:
	.string	"DEF"
	.section	.data.rel.local,"aw"
	.align 8
	.type	region, @object
	.size	region, 8
region:
	.quad	.LC0
	.local	version
	.comm	version,8,8
	.local	kernel_info
	.comm	kernel_info,16,16
	.local	rootfs_info
	.comm	rootfs_info,16,16
	.local	kernel_size
	.comm	kernel_size,4,4
	.local	image_size
	.comm	image_size,4,4
	.local	combined
	.comm	combined,4,4
	.section	.rodata
.LC1:
	.string	"Usage: %s [OPTIONS...]\n"
	.align 8
.LC2:
	.ascii	"\nOptions:\n  -k <file>       read kernel image from the fil"
	.ascii	"e <file>\n  -c              use the kernel image as a combin"
	.ascii	"ed image\n  -M <model>      set model to <model>\n  -o <file"
	.ascii	">       write output to the file <file>\n  -r <file>       r"
	.ascii	"ead rootfs image from the file <file>\n  -S <signature"
	.string	">  set image signature to <signature>\n  -R <region>     set image region to <region>\n  -V <version>    set image version to <version>\n  -I <size>       set image size to <size>\n  -K <size>       set kernel size to <size>\n  -h              show this screen\n"
	.text
	.type	usage, @function
usage:
.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	DWORD PTR -20[rbp], edi
	cmp	DWORD PTR -20[rbp], 0
	je	.L2
	mov	rax, QWORD PTR stderr[rip]
	jmp	.L3
.L2:
	mov	rax, QWORD PTR stdout[rip]
.L3:
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rax
	mov	edx, 543
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	usage, .-usage
	.globl	str2u32
	.type	str2u32, @function
str2u32:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -16[rbp], 0
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	lea	rcx, -16[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	strtoul@PLT
	mov	DWORD PTR -20[rbp], eax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L5
	mov	rax, QWORD PTR -16[rbp]
	cmp	QWORD PTR -40[rbp], rax
	je	.L5
	mov	rax, QWORD PTR -16[rbp]
	test	rax, rax
	je	.L6
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L6
.L5:
	mov	eax, -1
	jmp	.L8
.L6:
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, 0
.L8:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	str2u32, .-str2u32
	.section	.rodata
	.align 8
.LC3:
	.string	"[%s] *** error: stat failed on %s (%s)\n"
	.text
	.type	get_file_stat, @function
get_file_stat:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 192
	mov	QWORD PTR -184[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L11
	mov	eax, 0
	jmp	.L14
.L11:
	mov	rax, QWORD PTR -184[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, -160[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	mov	DWORD PTR -168[rbp], eax
	cmp	DWORD PTR -168[rbp], 0
	je	.L13
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -164[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -164[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rsi
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -168[rbp]
	jmp	.L14
.L13:
	mov	rax, QWORD PTR -112[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -184[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -184[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	eax, 0
.L14:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	get_file_stat, .-get_file_stat
	.section	.rodata
.LC4:
	.string	"r"
	.align 8
.LC5:
	.string	"[%s] *** error: could not open \"%s\" for reading (%s)\n"
	.align 8
.LC6:
	.string	"[%s] *** error: unable to read from file \"%s\" (%s)\n"
	.text
	.type	read_to_buf, @function
read_to_buf:
.LFB9:
	.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 -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -20[rbp], 1
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L17
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rsi
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L18
.L17:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L19
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -16[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rsi
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L20
.L19:
	mov	DWORD PTR -20[rbp], 0
.L20:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L18:
	mov	eax, DWORD PTR -20[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	read_to_buf, .-read_to_buf
	.section	.rodata
.LC7:
	.string	"model"
	.align 8
.LC8:
	.string	"[%s] *** error: no %s specified\n"
	.align 8
.LC9:
	.string	"[%s] *** error: %s is too long, max length is %d\n"
.LC10:
	.string	"signature"
.LC11:
	.string	"region"
.LC12:
	.string	"version"
.LC13:
	.string	"output file"
.LC14:
	.string	"kernel image"
	.align 8
.LC15:
	.string	"[%s] *** error: kernel size must be specified for combined images\n"
	.align 8
.LC16:
	.string	"[%s] *** error: kernel image is too big\n"
.LC17:
	.string	"rootfs image"
	.align 8
.LC18:
	.string	"[%s] *** error: rootfs image is too big\n"
	.text
	.type	check_options, @function
check_options:
.LFB10:
	.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	rax, QWORD PTR model[rip]
	test	rax, rax
	jne	.L23
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, .LC7[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L24
.L23:
	mov	DWORD PTR -20[rbp], 19
	mov	rax, QWORD PTR model[rip]
	mov	rdi, rax
	call	strlen@PLT
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	cmp	rax, rdx
	jbe	.L25
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -20[rbp]
	mov	r8d, ecx
	lea	rcx, .LC7[rip]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L24
.L25:
	mov	rax, QWORD PTR signature[rip]
	test	rax, rax
	jne	.L26
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, .LC10[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L24
.L26:
	mov	DWORD PTR -16[rbp], 29
	mov	rax, QWORD PTR signature[rip]
	mov	rdi, rax
	call	strlen@PLT
	mov	edx, DWORD PTR -16[rbp]
	movsx	rdx, edx
	cmp	rax, rdx
	jbe	.L27
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -16[rbp]
	mov	r8d, ecx
	lea	rcx, .LC10[rip]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L24
.L27:
	mov	rax, QWORD PTR region[rip]
	test	rax, rax
	jne	.L28
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, .LC11[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L24
.L28:
	mov	DWORD PTR -12[rbp], 3
	mov	rax, QWORD PTR region[rip]
	mov	rdi, rax
	call	strlen@PLT
	mov	edx, DWORD PTR -12[rbp]
	movsx	rdx, edx
	cmp	rax, rdx
	jbe	.L29
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -12[rbp]
	mov	r8d, ecx
	lea	rcx, .LC11[rip]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L24
.L29:
	mov	rax, QWORD PTR version[rip]
	test	rax, rax
	jne	.L30
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, .LC12[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L24
.L30:
	mov	DWORD PTR -8[rbp], 11
	mov	rax, QWORD PTR version[rip]
	mov	rdi, rax
	call	strlen@PLT
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	cmp	rax, rdx
	jbe	.L31
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -8[rbp]
	mov	r8d, ecx
	lea	rcx, .LC12[rip]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L24
.L31:
	mov	rax, QWORD PTR ofname[rip]
	test	rax, rax
	jne	.L32
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, .LC13[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L24
.L32:
	mov	rax, QWORD PTR kernel_info[rip]
	test	rax, rax
	jne	.L33
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, .LC14[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L24
.L33:
	lea	rdi, kernel_info[rip]
	call	get_file_stat
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L34
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L24
.L34:
	mov	eax, DWORD PTR combined[rip]
	test	eax, eax
	je	.L35
	mov	eax, DWORD PTR kernel_size[rip]
	test	eax, eax
	jne	.L36
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L24
.L36:
	mov	eax, DWORD PTR image_size[rip]
	test	eax, eax
	jne	.L37
	mov	eax, DWORD PTR kernel_info[rip+8]
	mov	DWORD PTR image_size[rip], eax
.L37:
	mov	edx, DWORD PTR kernel_info[rip+8]
	mov	eax, DWORD PTR image_size[rip]
	cmp	edx, eax
	jbe	.L38
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L24
.L38:
	mov	eax, DWORD PTR image_size[rip]
	mov	DWORD PTR kernel_info[rip+12], eax
	jmp	.L39
.L35:
	mov	rax, QWORD PTR rootfs_info[rip]
	test	rax, rax
	jne	.L40
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, .LC17[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L24
.L40:
	lea	rdi, rootfs_info[rip]
	call	get_file_stat
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L41
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L24
.L41:
	mov	eax, DWORD PTR kernel_size[rip]
	test	eax, eax
	je	.L42
	mov	eax, DWORD PTR kernel_size[rip]
	mov	DWORD PTR kernel_info[rip+12], eax
.L42:
	mov	eax, DWORD PTR image_size[rip]
	test	eax, eax
	je	.L43
	mov	edx, DWORD PTR kernel_info[rip+12]
	mov	eax, DWORD PTR image_size[rip]
	cmp	edx, eax
	jbe	.L44
	mov	eax, DWORD PTR image_size[rip]
	mov	DWORD PTR kernel_info[rip+12], eax
.L44:
	mov	eax, DWORD PTR image_size[rip]
	mov	edx, DWORD PTR kernel_info[rip+12]
	sub	eax, edx
	mov	DWORD PTR rootfs_info[rip+12], eax
.L43:
	mov	edx, DWORD PTR kernel_info[rip+8]
	mov	eax, DWORD PTR kernel_info[rip+12]
	cmp	edx, eax
	jbe	.L45
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L24
.L45:
	mov	edx, DWORD PTR rootfs_info[rip+8]
	mov	eax, DWORD PTR rootfs_info[rip+12]
	cmp	edx, eax
	jbe	.L39
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L24
.L39:
	mov	eax, 0
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	check_options, .-check_options
	.section	.rodata
.LC19:
	.string	"w"
	.align 8
.LC20:
	.string	"[%s] *** error: could not open \"%s\" for writing (%s)\n"
	.align 8
.LC21:
	.string	"[%s] *** error: unable to write output file (%s)\n"
	.align 8
.LC22:
	.string	"[%s] firmware file \"%s\" completed\n"
	.text
	.type	write_fw, @function
write_fw:
.LFB11:
	.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 -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	DWORD PTR -20[rbp], 1
	mov	rax, QWORD PTR ofname[rip]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L47
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rcx, QWORD PTR ofname[rip]
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rsi
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L48
.L47:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	eax, DWORD PTR -44[rbp]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L49
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -16[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L50
.L49:
	mov	rcx, QWORD PTR ofname[rip]
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -20[rbp], 0
.L50:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fflush@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	cmp	DWORD PTR -20[rbp], 0
	je	.L52
	mov	rax, QWORD PTR ofname[rip]
	mov	rdi, rax
	call	unlink@PLT
	jmp	.L48
.L52:
	nop
.L48:
	mov	eax, DWORD PTR -20[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	write_fw, .-write_fw
	.type	get_csum, @function
get_csum:
.LFB12:
	.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 -4[rbp], 0
	jmp	.L54
.L55:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	DWORD PTR -4[rbp], eax
.L54:
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -28[rbp], edx
	test	eax, eax
	jne	.L55
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	get_csum, .-get_csum
	.section	.rodata
	.align 8
.LC23:
	.string	"[%s] *** error: no memory for buffer\n\n"
	.text
	.type	build_fw, @function
build_fw:
.LFB13:
	.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	DWORD PTR -36[rbp], 1
	mov	edx, DWORD PTR kernel_info[rip+12]
	mov	eax, DWORD PTR rootfs_info[rip+12]
	add	eax, edx
	add	eax, 84
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L58
	mov	edi, 0
	call	fflush@PLT
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L59
.L58:
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 84
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, kernel_info[rip]
	call	read_to_buf
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jne	.L67
	mov	eax, DWORD PTR combined[rip]
	test	eax, eax
	jne	.L62
	mov	eax, DWORD PTR kernel_info[rip+12]
	mov	eax, eax
	add	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, rootfs_info[rip]
	call	read_to_buf
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jne	.L68
.L62:
	mov	eax, DWORD PTR -32[rbp]
	lea	edx, -84[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 84
	mov	esi, edx
	mov	rdi, rax
	call	get_csum
	mov	DWORD PTR -28[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	htonl@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -32[rbp]
	sub	eax, 84
	mov	edi, eax
	call	htonl@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rdx], eax
	mov	eax, DWORD PTR combined[rip]
	test	eax, eax
	jne	.L63
	mov	eax, DWORD PTR kernel_info[rip+12]
	mov	edi, eax
	call	htonl@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rdx], eax
	jmp	.L64
.L63:
	mov	eax, DWORD PTR kernel_size[rip]
	mov	edi, eax
	call	htonl@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rdx], eax
.L64:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 78[rax], 84
	mov	rax, QWORD PTR model[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rcx, 12[rdx]
	mov	edx, 20
	mov	rsi, rax
	mov	rdi, rcx
	call	strncpy@PLT
	mov	rax, QWORD PTR signature[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rcx, 32[rdx]
	mov	edx, 30
	mov	rsi, rax
	mov	rdi, rcx
	call	strncpy@PLT
	mov	rax, QWORD PTR version[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rcx, 66[rdx]
	mov	edx, 12
	mov	rsi, rax
	mov	rdi, rcx
	call	strncpy@PLT
	mov	rax, QWORD PTR region[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rcx, 62[rdx]
	mov	edx, 4
	mov	rsi, rax
	mov	rdi, rcx
	call	strncpy@PLT
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	write_fw
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jne	.L69
	mov	DWORD PTR -36[rbp], 0
	jmp	.L61
.L67:
	nop
	jmp	.L61
.L68:
	nop
	jmp	.L61
.L69:
	nop
.L61:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
.L59:
	mov	eax, DWORD PTR -36[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	build_fw, .-build_fw
	.section	.rodata
.LC24:
	.string	"M:S:V:R:k:K:I:r:o:hc"
.LC25:
	.string	"kernel size"
	.align 8
.LC26:
	.string	"[%s] *** error: %s is invalid '%s'\n"
.LC27:
	.string	"image size"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -8[rbp], 1
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	__xpg_basename@PLT
	mov	QWORD PTR progname[rip], rax
.L90:
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	lea	rdx, .LC24[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	je	.L94
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 73
	cmp	eax, 41
	ja	.L73
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L75[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L75[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L75:
	.long	.L85-.L75
	.long	.L73-.L75
	.long	.L84-.L75
	.long	.L73-.L75
	.long	.L83-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L82-.L75
	.long	.L81-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L80-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L79-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L78-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L77-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L76-.L75
	.long	.L73-.L75
	.long	.L73-.L75
	.long	.L74-.L75
	.text
.L83:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR model[rip], rax
	jmp	.L86
.L81:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR signature[rip], rax
	jmp	.L86
.L80:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR version[rip], rax
	jmp	.L86
.L82:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR region[rip], rax
	jmp	.L86
.L77:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR kernel_info[rip], rax
	jmp	.L86
.L84:
	mov	rax, QWORD PTR optarg[rip]
	lea	rsi, kernel_size[rip]
	mov	rdi, rax
	call	str2u32
	test	eax, eax
	je	.L95
	mov	edi, 0
	call	fflush@PLT
	mov	rcx, QWORD PTR optarg[rip]
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rcx
	lea	rcx, .LC25[rip]
	lea	rsi, .LC26[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L88
.L85:
	mov	rax, QWORD PTR optarg[rip]
	lea	rsi, image_size[rip]
	mov	rdi, rax
	call	str2u32
	test	eax, eax
	je	.L96
	mov	edi, 0
	call	fflush@PLT
	mov	rcx, QWORD PTR optarg[rip]
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rcx
	lea	rcx, .LC27[rip]
	lea	rsi, .LC26[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L88
.L74:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR rootfs_info[rip], rax
	jmp	.L86
.L79:
	mov	DWORD PTR combined[rip], 1
	jmp	.L86
.L76:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR ofname[rip], rax
	jmp	.L86
.L78:
	mov	edi, 0
	call	usage
	jmp	.L86
.L73:
	mov	edi, 1
	call	usage
	jmp	.L86
.L95:
	nop
	jmp	.L90
.L96:
	nop
.L86:
	jmp	.L90
.L94:
	nop
	call	check_options
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], 0
	jne	.L97
	call	build_fw
	mov	DWORD PTR -8[rbp], eax
	jmp	.L88
.L97:
	nop
.L88:
	mov	eax, DWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.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	"15761531.c"
	.text
	.local	ofname
	.comm	ofname,4,4
	.local	progname
	.comm	progname,4,4
	.local	model
	.comm	model,4,4
	.local	signature
	.comm	signature,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"DEF\000"
	.data
	.align	2
	.type	region, %object
	.size	region, 4
region:
	.word	.LC0
	.local	version
	.comm	version,4,4
	.local	kernel_info
	.comm	kernel_info,12,4
	.local	rootfs_info
	.comm	rootfs_info,12,4
	.local	kernel_size
	.comm	kernel_size,4,4
	.local	image_size
	.comm	image_size,4,4
	.local	combined
	.comm	combined,4,4
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Usage: %s [OPTIONS...]\012\000"
	.align	2
.LC2:
	.ascii	"\012Options:\012  -k <file>       read kernel image"
	.ascii	" from the file <file>\012  -c              use the "
	.ascii	"kernel image as a combined image\012  -M <model>   "
	.ascii	"   set model to <model>\012  -o <file>       write "
	.ascii	"output to the file <file>\012  -r <file>       read"
	.ascii	" rootfs image from the file <file>\012  -S <signatu"
	.ascii	"re>  set image signature to <signature>\012  -R <re"
	.ascii	"gion>     set image region to <region>\012  -V <ver"
	.ascii	"sion>    set image version to <version>\012  -I <si"
	.ascii	"ze>       set image size to <size>\012  -K <size>  "
	.ascii	"     set kernel size to <size>\012  -h             "
	.ascii	" show this screen\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ 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]
	cmp	r3, #0
	beq	.L2
	ldr	r3, .L4
	ldr	r3, [r3]
	b	.L3
.L2:
	ldr	r3, .L4+4
	ldr	r3, [r3]
.L3:
	str	r3, [fp, #-8]
	ldr	r3, .L4+8
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L4+12
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r3, [fp, #-8]
	ldr	r2, .L4+16
	mov	r1, #1
	ldr	r0, .L4+20
	bl	fwrite
	ldr	r0, [fp, #-16]
	bl	exit
.L5:
	.align	2
.L4:
	.word	stderr
	.word	stdout
	.word	progname
	.word	.LC1
	.word	543
	.word	.LC2
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	str2u32
	.syntax unified
	.arm
	.fpu softvfp
	.type	str2u32, %function
str2u32:
	@ args = 0, 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, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-16]
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	sub	r3, fp, #16
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	strtoul
	str	r0, [fp, #-12]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L7
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	beq	.L7
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L8
.L7:
	mvn	r3, #0
	b	.L10
.L8:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	mov	r3, #0
.L10:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC3
	.size	str2u32, .-str2u32
	.section	.rodata
	.align	2
.LC4:
	.ascii	"[%s] *** error: stat failed on %s (%s)\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_file_stat, %function
get_file_stat:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #124
	str	r0, [fp, #-128]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	ldr	r3, [fp, #-128]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L15
	mov	r3, #0
	b	.L18
.L15:
	ldr	r3, [fp, #-128]
	ldr	r3, [r3]
	sub	r2, fp, #116
	mov	r1, r2
	mov	r0, r3
	bl	stat
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-124]
	cmp	r3, #0
	beq	.L17
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-120]
	mov	r0, #0
	bl	fflush
	ldr	r3, .L20+4
	ldr	r4, [r3]
	ldr	r3, .L20+8
	ldr	r5, [r3]
	ldr	r3, [fp, #-128]
	ldr	r6, [r3]
	ldr	r0, [fp, #-120]
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	ldr	r1, .L20+12
	mov	r0, r4
	bl	fprintf
	ldr	r3, [fp, #-124]
	b	.L18
.L17:
	ldr	r3, [fp, #-72]
	mov	r2, r3
	ldr	r3, [fp, #-128]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-128]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-128]
	str	r2, [r3, #8]
	mov	r3, #0
.L18:
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC5
	.word	stderr
	.word	progname
	.word	.LC4
	.size	get_file_stat, .-get_file_stat
	.section	.rodata
	.align	2
.LC6:
	.ascii	"r\000"
	.align	2
.LC7:
	.ascii	"[%s] *** error: could not open \"%s\" for reading ("
	.ascii	"%s)\012\000"
	.align	2
.LC8:
	.ascii	"[%s] *** error: unable to read from file \"%s\" (%s"
	.ascii	")\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_to_buf, %function
read_to_buf:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #36
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	mov	r3, #1
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	ldr	r1, .L28
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L23
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r0, #0
	bl	fflush
	ldr	r3, .L28+4
	ldr	r4, [r3]
	ldr	r3, .L28+8
	ldr	r5, [r3]
	ldr	r3, [fp, #-40]
	ldr	r6, [r3]
	ldr	r0, [fp, #-24]
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	ldr	r1, .L28+12
	mov	r0, r4
	bl	fprintf
	b	.L24
.L23:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-40]
	ldr	r1, [r3, #4]
	ldr	r3, [fp, #-32]
	mov	r2, #1
	ldr	r0, [fp, #-44]
	bl	fread
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L25
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-28]
	mov	r0, #0
	bl	fflush
	ldr	r3, .L28+4
	ldr	r4, [r3]
	ldr	r3, .L28+8
	ldr	r5, [r3]
	ldr	r3, [fp, #-40]
	ldr	r6, [r3]
	ldr	r0, [fp, #-28]
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	ldr	r1, .L28+16
	mov	r0, r4
	bl	fprintf
	b	.L26
.L25:
	mov	r3, #0
	str	r3, [fp, #-36]
.L26:
	ldr	r0, [fp, #-32]
	bl	fclose
.L24:
	ldr	r3, [fp, #-36]
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L29:
	.align	2
.L28:
	.word	.LC6
	.word	stderr
	.word	progname
	.word	.LC7
	.word	.LC8
	.size	read_to_buf, .-read_to_buf
	.section	.rodata
	.align	2
.LC9:
	.ascii	"model\000"
	.align	2
.LC10:
	.ascii	"[%s] *** error: no %s specified\012\000"
	.align	2
.LC11:
	.ascii	"[%s] *** error: %s is too long, max length is %d\012"
	.ascii	"\000"
	.align	2
.LC12:
	.ascii	"signature\000"
	.align	2
.LC13:
	.ascii	"region\000"
	.align	2
.LC14:
	.ascii	"version\000"
	.align	2
.LC15:
	.ascii	"output file\000"
	.align	2
.LC16:
	.ascii	"kernel image\000"
	.align	2
.LC17:
	.ascii	"[%s] *** error: kernel size must be specified for c"
	.ascii	"ombined images\012\000"
	.align	2
.LC18:
	.ascii	"[%s] *** error: kernel image is too big\012\000"
	.align	2
.LC19:
	.ascii	"rootfs image\000"
	.align	2
.LC20:
	.ascii	"[%s] *** error: rootfs image is too big\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_options, %function
check_options:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L54
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L31
	mov	r0, #0
	bl	fflush
	ldr	r3, .L54+4
	ldr	r0, [r3]
	ldr	r3, .L54+8
	ldr	r2, [r3]
	ldr	r3, .L54+12
	ldr	r1, .L54+16
	bl	fprintf
	mvn	r3, #0
	b	.L32
.L31:
	mov	r3, #19
	str	r3, [fp, #-24]
	ldr	r3, .L54
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bls	.L33
	mov	r0, #0
	bl	fflush
	ldr	r3, .L54+4
	ldr	r0, [r3]
	ldr	r3, .L54+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	str	r3, [sp]
	ldr	r3, .L54+12
	ldr	r1, .L54+20
	bl	fprintf
	mvn	r3, #0
	b	.L32
.L33:
	ldr	r3, .L54+24
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L34
	mov	r0, #0
	bl	fflush
	ldr	r3, .L54+4
	ldr	r0, [r3]
	ldr	r3, .L54+8
	ldr	r2, [r3]
	ldr	r3, .L54+28
	ldr	r1, .L54+16
	bl	fprintf
	mvn	r3, #0
	b	.L32
.L34:
	mov	r3, #29
	str	r3, [fp, #-20]
	ldr	r3, .L54+24
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bls	.L35
	mov	r0, #0
	bl	fflush
	ldr	r3, .L54+4
	ldr	r0, [r3]
	ldr	r3, .L54+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	ldr	r3, .L54+28
	ldr	r1, .L54+20
	bl	fprintf
	mvn	r3, #0
	b	.L32
.L35:
	ldr	r3, .L54+32
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L36
	mov	r0, #0
	bl	fflush
	ldr	r3, .L54+4
	ldr	r0, [r3]
	ldr	r3, .L54+8
	ldr	r2, [r3]
	ldr	r3, .L54+36
	ldr	r1, .L54+16
	bl	fprintf
	mvn	r3, #0
	b	.L32
.L36:
	mov	r3, #3
	str	r3, [fp, #-16]
	ldr	r3, .L54+32
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bls	.L37
	mov	r0, #0
	bl	fflush
	ldr	r3, .L54+4
	ldr	r0, [r3]
	ldr	r3, .L54+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	str	r3, [sp]
	ldr	r3, .L54+36
	ldr	r1, .L54+20
	bl	fprintf
	mvn	r3, #0
	b	.L32
.L37:
	ldr	r3, .L54+40
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L38
	mov	r0, #0
	bl	fflush
	ldr	r3, .L54+4
	ldr	r0, [r3]
	ldr	r3, .L54+8
	ldr	r2, [r3]
	ldr	r3, .L54+44
	ldr	r1, .L54+16
	bl	fprintf
	mvn	r3, #0
	b	.L32
.L38:
	mov	r3, #11
	str	r3, [fp, #-12]
	ldr	r3, .L54+40
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bls	.L39
	mov	r0, #0
	bl	fflush
	ldr	r3, .L54+4
	ldr	r0, [r3]
	ldr	r3, .L54+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	ldr	r3, .L54+44
	ldr	r1, .L54+20
	bl	fprintf
	mvn	r3, #0
	b	.L32
.L39:
	ldr	r3, .L54+48
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L40
	mov	r0, #0
	bl	fflush
	ldr	r3, .L54+4
	ldr	r0, [r3]
	ldr	r3, .L54+8
	ldr	r2, [r3]
	ldr	r3, .L54+52
	ldr	r1, .L54+16
	bl	fprintf
	mvn	r3, #0
	b	.L32
.L40:
	ldr	r3, .L54+56
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L41
	mov	r0, #0
	bl	fflush
	ldr	r3, .L54+4
	ldr	r0, [r3]
	ldr	r3, .L54+8
	ldr	r2, [r3]
	ldr	r3, .L54+60
	ldr	r1, .L54+16
	bl	fprintf
	mvn	r3, #0
	b	.L32
.L41:
	ldr	r0, .L54+56
	bl	get_file_stat
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L42
	ldr	r3, [fp, #-8]
	b	.L32
.L42:
	ldr	r3, .L54+64
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L43
	ldr	r3, .L54+68
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L44
	mov	r0, #0
	bl	fflush
	ldr	r3, .L54+4
	ldr	r3, [r3]
	ldr	r2, .L54+8
	ldr	r2, [r2]
	ldr	r1, .L54+72
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
	b	.L32
.L44:
	ldr	r3, .L54+76
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L45
	ldr	r3, .L54+56
	ldr	r3, [r3, #4]
	ldr	r2, .L54+76
	str	r3, [r2]
.L45:
	ldr	r3, .L54+56
	ldr	r2, [r3, #4]
	ldr	r3, .L54+76
	ldr	r3, [r3]
	cmp	r2, r3
	bls	.L46
	mov	r0, #0
	bl	fflush
	ldr	r3, .L54+4
	ldr	r3, [r3]
	ldr	r2, .L54+8
	ldr	r2, [r2]
	ldr	r1, .L54+80
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
	b	.L32
.L46:
	ldr	r3, .L54+76
	ldr	r3, [r3]
	ldr	r2, .L54+56
	str	r3, [r2, #8]
	b	.L47
.L43:
	ldr	r3, .L54+84
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L48
	mov	r0, #0
	bl	fflush
	ldr	r3, .L54+4
	ldr	r0, [r3]
	ldr	r3, .L54+8
	ldr	r2, [r3]
	ldr	r3, .L54+88
	ldr	r1, .L54+16
	bl	fprintf
	mvn	r3, #0
	b	.L32
.L48:
	ldr	r0, .L54+84
	bl	get_file_stat
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L49
	ldr	r3, [fp, #-8]
	b	.L32
.L49:
	ldr	r3, .L54+68
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L50
	ldr	r3, .L54+68
	ldr	r3, [r3]
	ldr	r2, .L54+56
	str	r3, [r2, #8]
.L50:
	ldr	r3, .L54+76
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L51
	ldr	r3, .L54+56
	ldr	r2, [r3, #8]
	ldr	r3, .L54+76
	ldr	r3, [r3]
	cmp	r2, r3
	bls	.L52
	ldr	r3, .L54+76
	ldr	r3, [r3]
	ldr	r2, .L54+56
	str	r3, [r2, #8]
.L52:
	ldr	r3, .L54+76
	ldr	r2, [r3]
	ldr	r3, .L54+56
	ldr	r3, [r3, #8]
	sub	r3, r2, r3
	ldr	r2, .L54+84
	str	r3, [r2, #8]
.L51:
	ldr	r3, .L54+56
	ldr	r2, [r3, #4]
	ldr	r3, .L54+56
	ldr	r3, [r3, #8]
	cmp	r2, r3
	bls	.L53
	mov	r0, #0
	bl	fflush
	ldr	r3, .L54+4
	ldr	r3, [r3]
	ldr	r2, .L54+8
	ldr	r2, [r2]
	ldr	r1, .L54+80
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
	b	.L32
.L53:
	ldr	r3, .L54+84
	ldr	r2, [r3, #4]
	ldr	r3, .L54+84
	ldr	r3, [r3, #8]
	cmp	r2, r3
	bls	.L47
	mov	r0, #0
	bl	fflush
	ldr	r3, .L54+4
	ldr	r3, [r3]
	ldr	r2, .L54+8
	ldr	r2, [r2]
	ldr	r1, .L54+92
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
	b	.L32
.L47:
	mov	r3, #0
.L32:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L55:
	.align	2
.L54:
	.word	model
	.word	stderr
	.word	progname
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	signature
	.word	.LC12
	.word	region
	.word	.LC13
	.word	version
	.word	.LC14
	.word	ofname
	.word	.LC15
	.word	kernel_info
	.word	.LC16
	.word	combined
	.word	kernel_size
	.word	.LC17
	.word	image_size
	.word	.LC18
	.word	rootfs_info
	.word	.LC19
	.word	.LC20
	.size	check_options, .-check_options
	.section	.rodata
	.align	2
.LC21:
	.ascii	"w\000"
	.align	2
.LC22:
	.ascii	"[%s] *** error: could not open \"%s\" for writing ("
	.ascii	"%s)\012\000"
	.align	2
.LC23:
	.ascii	"[%s] *** error: unable to write output file (%s)\012"
	.ascii	"\000"
	.align	2
.LC24:
	.ascii	"[%s] firmware file \"%s\" completed\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_fw, %function
write_fw:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #36
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	mov	r3, #1
	str	r3, [fp, #-36]
	ldr	r3, .L63
	ldr	r3, [r3]
	ldr	r1, .L63+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L57
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r0, #0
	bl	fflush
	ldr	r3, .L63+8
	ldr	r4, [r3]
	ldr	r3, .L63+12
	ldr	r5, [r3]
	ldr	r3, .L63
	ldr	r6, [r3]
	ldr	r0, [fp, #-24]
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	ldr	r1, .L63+16
	mov	r0, r4
	bl	fprintf
	b	.L58
.L57:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, [fp, #-44]
	ldr	r3, [fp, #-32]
	mov	r2, #1
	ldr	r0, [fp, #-40]
	bl	fwrite
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L59
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-28]
	mov	r0, #0
	bl	fflush
	ldr	r3, .L63+8
	ldr	r4, [r3]
	ldr	r3, .L63+12
	ldr	r5, [r3]
	ldr	r0, [fp, #-28]
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L63+20
	mov	r0, r4
	bl	fprintf
	b	.L60
.L59:
	ldr	r3, .L63+8
	ldr	r0, [r3]
	ldr	r3, .L63+12
	ldr	r2, [r3]
	ldr	r3, .L63
	ldr	r3, [r3]
	ldr	r1, .L63+24
	bl	fprintf
	mov	r3, #0
	str	r3, [fp, #-36]
.L60:
	ldr	r0, [fp, #-32]
	bl	fflush
	ldr	r0, [fp, #-32]
	bl	fclose
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L62
	ldr	r3, .L63
	ldr	r3, [r3]
	mov	r0, r3
	bl	unlink
	b	.L58
.L62:
	nop
.L58:
	ldr	r3, [fp, #-36]
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L64:
	.align	2
.L63:
	.word	ofname
	.word	.LC21
	.word	stderr
	.word	progname
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.size	write_fw, .-write_fw
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_csum, %function
get_csum:
	@ 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
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L66
.L67:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	str	r3, [fp, #-8]
.L66:
	ldr	r3, [fp, #-20]
	sub	r2, r3, #1
	str	r2, [fp, #-20]
	cmp	r3, #0
	bne	.L67
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	get_csum, .-get_csum
	.section	.rodata
	.align	2
.LC25:
	.ascii	"[%s] *** error: no memory for buffer\012\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	build_fw, %function
build_fw:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	mov	r3, #1
	str	r3, [fp, #-28]
	ldr	r3, .L82
	ldr	r2, [r3, #8]
	ldr	r3, .L82+4
	ldr	r3, [r3, #8]
	add	r3, r2, r3
	add	r3, r3, #84
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L70
	mov	r0, #0
	bl	fflush
	ldr	r3, .L82+8
	ldr	r3, [r3]
	ldr	r2, .L82+12
	ldr	r2, [r2]
	ldr	r1, .L82+16
	mov	r0, r3
	bl	fprintf
	b	.L71
.L70:
	ldr	r3, [fp, #-24]
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-20]
	bl	memset
	ldr	r3, [fp, #-20]
	add	r3, r3, #84
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-16]
	ldr	r0, .L82
	bl	read_to_buf
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L79
	ldr	r3, .L82+20
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L74
	ldr	r3, .L82
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-16]
	ldr	r0, .L82+4
	bl	read_to_buf
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L80
.L74:
	ldr	r3, [fp, #-20]
	add	r2, r3, #84
	ldr	r3, [fp, #-24]
	sub	r3, r3, #84
	mov	r1, r3
	mov	r0, r2
	bl	get_csum
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	htonl
	mov	r2, r0
	ldr	r3, [fp, #-8]
	and	r1, r2, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3]
	lsr	r1, r2, #8
	and	r1, r1, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #1]
	lsr	r1, r2, #16
	and	r1, r1, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #2]
	lsr	r2, r2, #24
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #3]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #84
	mov	r0, r3
	bl	htonl
	mov	r2, r0
	ldr	r3, [fp, #-8]
	and	r1, r2, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #4]
	lsr	r1, r2, #8
	and	r1, r1, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #5]
	lsr	r1, r2, #16
	and	r1, r1, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #6]
	lsr	r2, r2, #24
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #7]
	ldr	r3, .L82+20
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L75
	ldr	r3, .L82
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	htonl
	mov	r2, r0
	ldr	r3, [fp, #-8]
	and	r1, r2, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #8]
	lsr	r1, r2, #8
	and	r1, r1, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #9]
	lsr	r1, r2, #16
	and	r1, r1, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #10]
	lsr	r2, r2, #24
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #11]
	b	.L76
.L75:
	ldr	r3, .L82+24
	ldr	r3, [r3]
	mov	r0, r3
	bl	htonl
	mov	r2, r0
	ldr	r3, [fp, #-8]
	and	r1, r2, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #8]
	lsr	r1, r2, #8
	and	r1, r1, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #9]
	lsr	r1, r2, #16
	and	r1, r1, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #10]
	lsr	r2, r2, #24
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #11]
.L76:
	ldr	r3, [fp, #-8]
	mov	r2, #84
	strb	r2, [r3, #78]
	ldr	r3, [fp, #-8]
	add	r3, r3, #12
	ldr	r2, .L82+28
	ldr	r1, [r2]
	mov	r2, #20
	mov	r0, r3
	bl	strncpy
	ldr	r3, [fp, #-8]
	add	r3, r3, #32
	ldr	r2, .L82+32
	ldr	r1, [r2]
	mov	r2, #30
	mov	r0, r3
	bl	strncpy
	ldr	r3, [fp, #-8]
	add	r3, r3, #66
	ldr	r2, .L82+36
	ldr	r1, [r2]
	mov	r2, #12
	mov	r0, r3
	bl	strncpy
	ldr	r3, [fp, #-8]
	add	r3, r3, #62
	ldr	r2, .L82+40
	ldr	r1, [r2]
	mov	r2, #4
	mov	r0, r3
	bl	strncpy
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-20]
	bl	write_fw
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L81
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L73
.L79:
	nop
	b	.L73
.L80:
	nop
	b	.L73
.L81:
	nop
.L73:
	ldr	r0, [fp, #-20]
	bl	free
.L71:
	ldr	r3, [fp, #-28]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L83:
	.align	2
.L82:
	.word	kernel_info
	.word	rootfs_info
	.word	stderr
	.word	progname
	.word	.LC25
	.word	combined
	.word	kernel_size
	.word	model
	.word	signature
	.word	version
	.word	region
	.size	build_fw, .-build_fw
	.section	.rodata
	.align	2
.LC26:
	.ascii	"M:S:V:R:k:K:I:r:o:hc\000"
	.align	2
.LC27:
	.ascii	"kernel size\000"
	.align	2
.LC28:
	.ascii	"[%s] *** error: %s is invalid '%s'\012\000"
	.align	2
.LC29:
	.ascii	"image size\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ 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]
	mov	r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r0, r3
	bl	__xpg_basename
	mov	r3, r0
	ldr	r2, .L112
	str	r3, [r2]
.L104:
	ldr	r2, .L112+4
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	getopt
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L108
	ldr	r3, [fp, #-8]
	sub	r3, r3, #73
	cmp	r3, #41
	ldrls	pc, [pc, r3, asl #2]
	b	.L87
.L89:
	.word	.L99
	.word	.L87
	.word	.L98
	.word	.L87
	.word	.L97
	.word	.L87
	.word	.L87
	.word	.L87
	.word	.L87
	.word	.L96
	.word	.L95
	.word	.L87
	.word	.L87
	.word	.L94
	.word	.L87
	.word	.L87
	.word	.L87
	.word	.L87
	.word	.L87
	.word	.L87
	.word	.L87
	.word	.L87
	.word	.L87
	.word	.L87
	.word	.L87
	.word	.L87
	.word	.L93
	.word	.L87
	.word	.L87
	.word	.L87
	.word	.L87
	.word	.L92
	.word	.L87
	.word	.L87
	.word	.L91
	.word	.L87
	.word	.L87
	.word	.L87
	.word	.L90
	.word	.L87
	.word	.L87
	.word	.L88
.L97:
	ldr	r3, .L112+8
	ldr	r3, [r3]
	ldr	r2, .L112+12
	str	r3, [r2]
	b	.L100
.L95:
	ldr	r3, .L112+8
	ldr	r3, [r3]
	ldr	r2, .L112+16
	str	r3, [r2]
	b	.L100
.L94:
	ldr	r3, .L112+8
	ldr	r3, [r3]
	ldr	r2, .L112+20
	str	r3, [r2]
	b	.L100
.L96:
	ldr	r3, .L112+8
	ldr	r3, [r3]
	ldr	r2, .L112+24
	str	r3, [r2]
	b	.L100
.L91:
	ldr	r3, .L112+8
	ldr	r3, [r3]
	ldr	r2, .L112+28
	str	r3, [r2]
	b	.L100
.L98:
	ldr	r3, .L112+8
	ldr	r3, [r3]
	ldr	r1, .L112+32
	mov	r0, r3
	bl	str2u32
	mov	r3, r0
	cmp	r3, #0
	beq	.L109
	mov	r0, #0
	bl	fflush
	ldr	r3, .L112+36
	ldr	r0, [r3]
	ldr	r3, .L112
	ldr	r2, [r3]
	ldr	r3, .L112+8
	ldr	r3, [r3]
	str	r3, [sp]
	ldr	r3, .L112+40
	ldr	r1, .L112+44
	bl	fprintf
	b	.L102
.L99:
	ldr	r3, .L112+8
	ldr	r3, [r3]
	ldr	r1, .L112+48
	mov	r0, r3
	bl	str2u32
	mov	r3, r0
	cmp	r3, #0
	beq	.L110
	mov	r0, #0
	bl	fflush
	ldr	r3, .L112+36
	ldr	r0, [r3]
	ldr	r3, .L112
	ldr	r2, [r3]
	ldr	r3, .L112+8
	ldr	r3, [r3]
	str	r3, [sp]
	ldr	r3, .L112+52
	ldr	r1, .L112+44
	bl	fprintf
	b	.L102
.L88:
	ldr	r3, .L112+8
	ldr	r3, [r3]
	ldr	r2, .L112+56
	str	r3, [r2]
	b	.L100
.L93:
	ldr	r3, .L112+60
	mov	r2, #1
	str	r2, [r3]
	b	.L100
.L90:
	ldr	r3, .L112+8
	ldr	r3, [r3]
	ldr	r2, .L112+64
	str	r3, [r2]
	b	.L100
.L92:
	mov	r0, #0
	bl	usage
	b	.L100
.L87:
	mov	r0, #1
	bl	usage
	b	.L100
.L109:
	nop
	b	.L104
.L110:
	nop
.L100:
	b	.L104
.L108:
	nop
	bl	check_options
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L111
	bl	build_fw
	str	r0, [fp, #-12]
	b	.L102
.L111:
	nop
.L102:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L113:
	.align	2
.L112:
	.word	progname
	.word	.LC26
	.word	optarg
	.word	model
	.word	signature
	.word	version
	.word	region
	.word	kernel_info
	.word	kernel_size
	.word	stderr
	.word	.LC27
	.word	.LC28
	.word	image_size
	.word	.LC29
	.word	rootfs_info
	.word	combined
	.word	ofname
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
