	.file	"95788.c"
	.intel_syntax noprefix
	.text
	.globl	expand_file
	.type	expand_file, @function
expand_file:
.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, 1072
	mov	DWORD PTR -1060[rbp], edi
	mov	QWORD PTR -1072[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -1060[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	cmp	rax, -1
	jne	.L2
	mov	eax, -1
	jmp	.L7
.L2:
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 128
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	jmp	.L4
.L6:
	mov	rax, QWORD PTR -1072[rbp]
	mov	edx, 1024
	cmp	rax, 1024
	cmova	rax, rdx
	mov	QWORD PTR -1048[rbp], rax
	mov	rdx, QWORD PTR -1048[rbp]
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	QWORD PTR -1048[rbp], rax
	je	.L5
	mov	eax, -1
	jmp	.L7
.L5:
	mov	rax, QWORD PTR -1048[rbp]
	sub	QWORD PTR -1072[rbp], rax
.L4:
	cmp	QWORD PTR -1072[rbp], 0
	jne	.L6
	mov	eax, 0
.L7:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	expand_file, .-expand_file
	.section	.rodata
	.align 8
.LC0:
	.string	"usage: mksuncd partition isoimage bootimage\n"
	.text
	.globl	usage
	.type	usage, @function
usage:
.LFB7:
	.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 stderr[rip]
	mov	rcx, rax
	mov	edx, 44
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	usage, .-usage
	.section	.rodata
.LC1:
	.string	"lseek"
.LC2:
	.string	"fstat"
.LC3:
	.string	"expand_file"
	.text
	.globl	adjust_base
	.type	adjust_base, @function
adjust_base:
.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	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -180[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	cmp	rax, -1
	jne	.L11
	lea	rsi, .LC1[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L11:
	lea	rdx, -160[rbp]
	mov	eax, DWORD PTR -180[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	cmp	eax, -1
	jne	.L12
	lea	rsi, .LC2[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L12:
	mov	rax, QWORD PTR -192[rbp]
	movzx	eax, WORD PTR 438[rax]
	movzx	edx, ax
	mov	rax, QWORD PTR -192[rbp]
	movzx	eax, WORD PTR 436[rax]
	movzx	eax, ax
	imul	rax, rdx
	sal	rax, 9
	mov	QWORD PTR -168[rbp], rax
	mov	rax, QWORD PTR -112[rbp]
	cqo
	idiv	QWORD PTR -168[rbp]
	mov	rax, rdx
	test	rax, rax
	je	.L13
	mov	rax, QWORD PTR -112[rbp]
	cqo
	idiv	QWORD PTR -168[rbp]
	mov	rcx, rdx
	mov	rax, QWORD PTR -168[rbp]
	sub	rax, rcx
	mov	rdx, rax
	mov	eax, DWORD PTR -180[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	expand_file
	test	eax, eax
	je	.L13
	lea	rsi, .LC3[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L13:
	mov	eax, 0
	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	adjust_base, .-adjust_base
	.section	.rodata
.LC4:
	.string	"read"
.LC5:
	.string	"short read"
.LC6:
	.string	"bogus disklabel"
	.text
	.globl	get_label
	.type	get_label, @function
get_label:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	cmp	rax, -1
	jne	.L17
	lea	rsi, .LC1[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L17:
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 512
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L18
	lea	rsi, .LC4[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L18:
	cmp	DWORD PTR -4[rbp], 512
	je	.L19
	lea	rsi, .LC5[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L19:
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, WORD PTR 436[rax]
	test	ax, ax
	je	.L20
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, WORD PTR 432[rax]
	test	ax, ax
	je	.L20
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, WORD PTR 438[rax]
	test	ax, ax
	jne	.L21
.L20:
	lea	rsi, .LC6[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L21:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	get_label, .-get_label
	.section	.rodata
.LC7:
	.string	"open"
.LC8:
	.string	"stdio"
.LC9:
	.string	"pledge"
	.text
	.globl	main
	.type	main, @function
main:
.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, 576
	mov	DWORD PTR -564[rbp], edi
	mov	QWORD PTR -576[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -564[rbp], 4
	je	.L24
	call	usage
	mov	eax, 1
	jmp	.L38
.L24:
	mov	rax, QWORD PTR -576[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L26
	mov	rax, QWORD PTR -576[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 1
	jne	.L26
	mov	rax, QWORD PTR -576[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 96
	jle	.L26
	mov	rax, QWORD PTR -576[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 104
	jle	.L27
.L26:
	call	usage
	mov	eax, 1
	jmp	.L38
.L27:
	mov	rax, QWORD PTR -576[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 97
	mov	DWORD PTR -556[rbp], eax
	mov	rax, QWORD PTR -576[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L28
	mov	rax, QWORD PTR -576[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L29
.L28:
	call	usage
	mov	eax, 1
	jmp	.L38
.L29:
	mov	rax, QWORD PTR -576[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -552[rbp], eax
	cmp	DWORD PTR -552[rbp], -1
	jne	.L30
	lea	rsi, .LC7[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L30:
	mov	rax, QWORD PTR -576[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -548[rbp], eax
	cmp	DWORD PTR -548[rbp], -1
	jne	.L31
	lea	rsi, .LC7[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L31:
	mov	esi, 0
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	pledge@PLT
	cmp	eax, -1
	jne	.L32
	lea	rsi, .LC9[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L32:
	lea	rdx, -528[rbp]
	mov	eax, DWORD PTR -552[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	get_label
	test	eax, eax
	je	.L33
	mov	eax, 1
	jmp	.L38
.L33:
	lea	rdx, -528[rbp]
	mov	eax, DWORD PTR -552[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	adjust_base
	test	eax, eax
	je	.L34
	mov	eax, 1
	jmp	.L38
.L34:
	lea	rdx, -528[rbp]
	mov	eax, DWORD PTR -552[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	cylindersize
	mov	QWORD PTR -544[rbp], rax
	lea	rdx, -528[rbp]
	mov	eax, DWORD PTR -548[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	cylindersize
	mov	QWORD PTR -536[rbp], rax
	mov	edx, DWORD PTR -548[rbp]
	mov	eax, DWORD PTR -552[rbp]
	mov	esi, edx
	mov	edi, eax
	call	append_osfile
	test	eax, eax
	je	.L35
	mov	eax, 1
	jmp	.L38
.L35:
	lea	rdx, -528[rbp]
	mov	eax, DWORD PTR -552[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	adjust_base
	test	eax, eax
	je	.L36
	mov	eax, 1
	jmp	.L38
.L36:
	mov	rdi, QWORD PTR -536[rbp]
	mov	rcx, QWORD PTR -544[rbp]
	mov	edx, DWORD PTR -556[rbp]
	lea	rsi, -528[rbp]
	mov	eax, DWORD PTR -552[rbp]
	mov	r8, rdi
	mov	edi, eax
	call	adjust_label
	test	eax, eax
	je	.L37
	mov	eax, 1
	jmp	.L38
.L37:
	mov	eax, DWORD PTR -552[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -548[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L38:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L39
	call	__stack_chk_fail@PLT
.L39:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.section	.rodata
.LC10:
	.string	"start too large! %lld"
.LC11:
	.string	"invalid partition: %d"
.LC12:
	.string	"write modified label"
.LC13:
	.string	"short write modified label"
	.text
	.globl	adjust_label
	.type	adjust_label, @function
adjust_label:
.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -24[rbp], edx
	mov	QWORD PTR -40[rbp], rcx
	mov	QWORD PTR -48[rbp], r8
	mov	WORD PTR -14[rbp], 0
	cmp	QWORD PTR -40[rbp], 65535
	jle	.L41
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	lea	rsi, .LC10[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L41:
	cmp	DWORD PTR -24[rbp], 0
	js	.L42
	cmp	DWORD PTR -24[rbp], 8
	jle	.L43
.L42:
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, eax
	lea	rsi, .LC11[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L43:
	mov	rax, QWORD PTR -40[rbp]
	mov	ecx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -24[rbp]
	movsx	rdx, edx
	add	rdx, 54
	mov	DWORD PTR 12[rax+rdx*8], ecx
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, WORD PTR 438[rax]
	movzx	eax, ax
	mov	rdx, QWORD PTR -48[rbp]
	imul	edx, eax
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, WORD PTR 436[rax]
	movzx	eax, ax
	imul	eax, edx
	mov	ecx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -24[rbp]
	movsx	rdx, edx
	add	rdx, 54
	mov	DWORD PTR 16[rax+rdx*8], ecx
	mov	rax, QWORD PTR -32[rbp]
	mov	WORD PTR 510[rax], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L44
.L45:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR [rax]
	xor	WORD PTR -14[rbp], ax
	add	QWORD PTR -8[rbp], 2
	add	DWORD PTR -12[rbp], 1
.L44:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 255
	jbe	.L45
	mov	rax, QWORD PTR -32[rbp]
	movzx	edx, WORD PTR -14[rbp]
	mov	WORD PTR 510[rax], dx
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	cmp	rax, -1
	jne	.L46
	mov	eax, -1
	jmp	.L47
.L46:
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 512
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L48
	lea	rsi, .LC12[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L48:
	cmp	DWORD PTR -12[rbp], 512
	je	.L49
	lea	rsi, .LC13[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L49:
	mov	eax, 0
.L47:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	adjust_label, .-adjust_label
	.section	.rodata
.LC14:
	.string	"read osfile"
.LC15:
	.string	"write basefile"
.LC16:
	.string	"short write basefile"
	.text
	.globl	append_osfile
	.type	append_osfile, @function
append_osfile:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 560
	mov	DWORD PTR -548[rbp], edi
	mov	DWORD PTR -552[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L56:
	lea	rcx, -528[rbp]
	mov	eax, DWORD PTR -552[rbp]
	mov	edx, 512
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -536[rbp], eax
	cmp	DWORD PTR -536[rbp], 0
	jns	.L51
	lea	rsi, .LC14[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L51:
	cmp	DWORD PTR -536[rbp], 0
	jne	.L52
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L57
	jmp	.L58
.L52:
	mov	eax, DWORD PTR -536[rbp]
	movsx	rdx, eax
	lea	rcx, -528[rbp]
	mov	eax, DWORD PTR -548[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -532[rbp], eax
	cmp	DWORD PTR -532[rbp], 0
	jns	.L54
	lea	rsi, .LC15[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L54:
	mov	eax, DWORD PTR -532[rbp]
	cmp	eax, DWORD PTR -536[rbp]
	je	.L56
	lea	rsi, .LC16[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L58:
	call	__stack_chk_fail@PLT
.L57:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	append_osfile, .-append_osfile
	.globl	cylindersize
	.type	cylindersize, @function
cylindersize:
.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, 192
	mov	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -160[rbp]
	mov	eax, DWORD PTR -180[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	cmp	eax, -1
	jne	.L60
	lea	rsi, .LC2[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L60:
	mov	rax, QWORD PTR -192[rbp]
	movzx	eax, WORD PTR 438[rax]
	movzx	edx, ax
	mov	rax, QWORD PTR -192[rbp]
	movzx	eax, WORD PTR 436[rax]
	movzx	eax, ax
	imul	rax, rdx
	sal	rax, 9
	mov	QWORD PTR -176[rbp], rax
	mov	rax, QWORD PTR -112[rbp]
	cqo
	idiv	QWORD PTR -176[rbp]
	mov	QWORD PTR -168[rbp], rax
	mov	rax, QWORD PTR -112[rbp]
	cqo
	idiv	QWORD PTR -176[rbp]
	mov	rax, rdx
	test	rax, rax
	jne	.L61
	mov	rax, QWORD PTR -168[rbp]
	jmp	.L63
.L61:
	mov	rax, QWORD PTR -168[rbp]
	add	rax, 1
.L63:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L64
	call	__stack_chk_fail@PLT
.L64:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	cylindersize, .-cylindersize
	.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	"95788.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	expand_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	expand_file, %function
expand_file:
	@ args = 0, pretend = 0, frame = 1040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	str	r0, [fp, #-1040]
	str	r1, [fp, #-1044]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-1040]
	bl	lseek
	mov	r3, r0
	cmn	r3, #1
	bne	.L2
	mvn	r3, #0
	b	.L7
.L2:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	mov	r3, #1024
	mov	r2, r3
	mov	r1, #0
	bl	memset
	b	.L4
.L6:
	ldr	r3, [fp, #-1044]
	cmp	r3, #1024
	movcc	r3, r3
	movcs	r3, #1024
	str	r3, [fp, #-1036]
	ldr	r2, [fp, #-1036]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1040]
	bl	write
	mov	r2, r0
	ldr	r3, [fp, #-1036]
	cmp	r3, r2
	beq	.L5
	mvn	r3, #0
	b	.L7
.L5:
	ldr	r2, [fp, #-1044]
	ldr	r3, [fp, #-1036]
	sub	r3, r2, r3
	str	r3, [fp, #-1044]
.L4:
	ldr	r3, [fp, #-1044]
	cmp	r3, #0
	bne	.L6
	mov	r3, #0
.L7:
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC0
	.size	expand_file, .-expand_file
	.section	.rodata
	.align	2
.LC1:
	.ascii	"usage: mksuncd partition isoimage bootimage\012\000"
	.text
	.align	2
	.global	usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L12
	ldr	r3, [r3]
	mov	r2, #44
	mov	r1, #1
	ldr	r0, .L12+4
	bl	fwrite
	nop
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	stderr
	.word	.LC1
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC2:
	.ascii	"lseek\000"
	.align	2
.LC3:
	.ascii	"fstat\000"
	.global	__aeabi_idivmod
	.align	2
.LC4:
	.ascii	"expand_file\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	adjust_base
	.syntax unified
	.arm
	.fpu softvfp
	.type	adjust_base, %function
adjust_base:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-112]
	bl	lseek
	mov	r3, r0
	cmn	r3, #1
	bne	.L15
	ldr	r1, .L20+4
	mov	r0, #1
	bl	err
.L15:
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	fstat
	mov	r3, r0
	cmn	r3, #1
	bne	.L16
	ldr	r1, .L20+8
	mov	r0, #1
	bl	err
.L16:
	ldr	r3, [fp, #-116]
	add	r3, r3, #436
	add	r3, r3, #2
	ldrh	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-116]
	add	r3, r3, #436
	ldrh	r3, [r3]
	mul	r3, r2, r3
	lsl	r3, r3, #9
	str	r3, [fp, #-104]
	ldr	r3, [fp, #-56]
	ldr	r1, [fp, #-104]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	beq	.L17
	ldr	r3, [fp, #-56]
	ldr	r1, [fp, #-104]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, [fp, #-104]
	sub	r3, r3, r2
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	expand_file
	mov	r3, r0
	cmp	r3, #0
	beq	.L17
	ldr	r1, .L20+12
	mov	r0, #1
	bl	err
.L17:
	mov	r3, #0
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC5
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	adjust_base, .-adjust_base
	.section	.rodata
	.align	2
.LC6:
	.ascii	"read\000"
	.align	2
.LC7:
	.ascii	"short read\000"
	.align	2
.LC8:
	.ascii	"bogus disklabel\000"
	.text
	.align	2
	.global	get_label
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_label, %function
get_label:
	@ 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]
	str	r1, [fp, #-20]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	lseek
	mov	r3, r0
	cmn	r3, #1
	bne	.L23
	ldr	r1, .L29
	mov	r0, #1
	bl	err
.L23:
	mov	r2, #512
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	read
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L24
	ldr	r1, .L29+4
	mov	r0, #1
	bl	err
.L24:
	ldr	r3, [fp, #-8]
	cmp	r3, #512
	beq	.L25
	ldr	r1, .L29+8
	mov	r0, #1
	bl	errx
.L25:
	ldr	r3, [fp, #-20]
	add	r3, r3, #436
	ldrh	r3, [r3]
	cmp	r3, #0
	beq	.L26
	ldr	r3, [fp, #-20]
	add	r3, r3, #432
	ldrh	r3, [r3]
	cmp	r3, #0
	beq	.L26
	ldr	r3, [fp, #-20]
	add	r3, r3, #436
	add	r3, r3, #2
	ldrh	r3, [r3]
	cmp	r3, #0
	bne	.L27
.L26:
	ldr	r1, .L29+12
	mov	r0, #1
	bl	errx
.L27:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC2
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	get_label, .-get_label
	.section	.rodata
	.align	2
.LC9:
	.ascii	"open\000"
	.align	2
.LC10:
	.ascii	"stdio\000"
	.align	2
.LC11:
	.ascii	"pledge\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 544
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #552
	str	r0, [fp, #-544]
	str	r1, [fp, #-548]
	ldr	r3, .L48
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-544]
	cmp	r3, #4
	beq	.L32
	bl	usage
	mov	r3, #1
	b	.L46
.L32:
	ldr	r3, [fp, #-548]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L34
	ldr	r3, [fp, #-548]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #1
	bne	.L34
	ldr	r3, [fp, #-548]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #96
	bls	.L34
	ldr	r3, [fp, #-548]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #104
	bls	.L35
.L34:
	bl	usage
	mov	r3, #1
	b	.L46
.L35:
	ldr	r3, [fp, #-548]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #97
	str	r3, [fp, #-540]
	ldr	r3, [fp, #-548]
	add	r3, r3, #8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L36
	ldr	r3, [fp, #-548]
	add	r3, r3, #12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L37
.L36:
	bl	usage
	mov	r3, #1
	b	.L46
.L37:
	ldr	r3, [fp, #-548]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	open
	str	r0, [fp, #-536]
	ldr	r3, [fp, #-536]
	cmn	r3, #1
	bne	.L38
	ldr	r1, .L48+4
	mov	r0, #1
	bl	err
.L38:
	ldr	r3, [fp, #-548]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-532]
	ldr	r3, [fp, #-532]
	cmn	r3, #1
	bne	.L39
	ldr	r1, .L48+4
	mov	r0, #1
	bl	err
.L39:
	mov	r1, #0
	ldr	r0, .L48+8
	bl	pledge
	mov	r3, r0
	cmn	r3, #1
	bne	.L40
	ldr	r1, .L48+12
	mov	r0, #1
	bl	err
.L40:
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, [fp, #-536]
	bl	get_label
	mov	r3, r0
	cmp	r3, #0
	beq	.L41
	mov	r3, #1
	b	.L46
.L41:
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, [fp, #-536]
	bl	adjust_base
	mov	r3, r0
	cmp	r3, #0
	beq	.L42
	mov	r3, #1
	b	.L46
.L42:
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, [fp, #-536]
	bl	cylindersize
	str	r0, [fp, #-528]
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, [fp, #-532]
	bl	cylindersize
	str	r0, [fp, #-524]
	ldr	r1, [fp, #-532]
	ldr	r0, [fp, #-536]
	bl	append_osfile
	mov	r3, r0
	cmp	r3, #0
	beq	.L43
	mov	r3, #1
	b	.L46
.L43:
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, [fp, #-536]
	bl	adjust_base
	mov	r3, r0
	cmp	r3, #0
	beq	.L44
	mov	r3, #1
	b	.L46
.L44:
	sub	r1, fp, #520
	ldr	r3, [fp, #-524]
	str	r3, [sp]
	ldr	r3, [fp, #-528]
	ldr	r2, [fp, #-540]
	ldr	r0, [fp, #-536]
	bl	adjust_label
	mov	r3, r0
	cmp	r3, #0
	beq	.L45
	mov	r3, #1
	b	.L46
.L45:
	ldr	r0, [fp, #-536]
	bl	close
	ldr	r0, [fp, #-532]
	bl	close
	mov	r3, #0
.L46:
	ldr	r2, .L48
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L47
	bl	__stack_chk_fail
.L47:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L49:
	.align	2
.L48:
	.word	.LC12
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.section	.rodata
	.align	2
.LC13:
	.ascii	"start too large! %lld\000"
	.align	2
.LC14:
	.ascii	"invalid partition: %d\000"
	.align	2
.LC15:
	.ascii	"write modified label\000"
	.align	2
.LC16:
	.ascii	"short write modified label\000"
	.text
	.align	2
	.global	adjust_label
	.syntax unified
	.arm
	.fpu softvfp
	.type	adjust_label, %function
adjust_label:
	@ args = 4, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	mov	r3, #0
	strh	r3, [fp, #-14]	@ movhi
	ldr	r3, [fp, #-36]
	cmp	r3, #65536
	blt	.L51
	ldr	r3, [fp, #-36]
	mov	r2, r3
	asr	r3, r2, #31
	ldr	r1, .L60
	mov	r0, #1
	bl	errx
.L51:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	blt	.L52
	ldr	r3, [fp, #-32]
	cmp	r3, #8
	ble	.L53
.L52:
	ldr	r2, [fp, #-32]
	ldr	r1, .L60+4
	mov	r0, #1
	bl	errx
.L53:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-32]
	add	r3, r3, #55
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, [fp, #-36]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-28]
	add	r3, r3, #436
	add	r3, r3, #2
	ldrh	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #4]
	mul	r3, r2, r3
	ldr	r2, [fp, #-28]
	add	r2, r2, #436
	ldrh	r2, [r2]
	mul	r2, r3, r2
	ldr	r1, [fp, #-28]
	ldr	r3, [fp, #-32]
	add	r3, r3, #55
	lsl	r3, r3, #3
	add	r3, r1, r3
	str	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	add	r3, r3, #508
	add	r3, r3, #2
	mov	r2, #0
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L54
.L55:
	ldr	r3, [fp, #-12]
	ldrh	r2, [r3]
	ldrh	r3, [fp, #-14]	@ movhi
	eor	r3, r3, r2
	strh	r3, [fp, #-14]	@ movhi
	ldr	r3, [fp, #-12]
	add	r3, r3, #2
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L54:
	ldr	r3, [fp, #-8]
	cmp	r3, #255
	bls	.L55
	ldr	r3, [fp, #-28]
	add	r3, r3, #508
	add	r3, r3, #2
	ldrh	r2, [fp, #-14]	@ movhi
	strh	r2, [r3]	@ movhi
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-24]
	bl	lseek
	mov	r3, r0
	cmn	r3, #1
	bne	.L56
	mvn	r3, #0
	b	.L57
.L56:
	mov	r2, #512
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	write
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L58
	ldr	r1, .L60+8
	mov	r0, #1
	bl	err
.L58:
	ldr	r3, [fp, #-8]
	cmp	r3, #512
	beq	.L59
	ldr	r1, .L60+12
	mov	r0, #1
	bl	errx
.L59:
	mov	r3, #0
.L57:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L61:
	.align	2
.L60:
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.size	adjust_label, .-adjust_label
	.section	.rodata
	.align	2
.LC17:
	.ascii	"read osfile\000"
	.align	2
.LC18:
	.ascii	"write basefile\000"
	.align	2
.LC19:
	.ascii	"short write basefile\000"
	.align	2
.LC20:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	append_osfile
	.syntax unified
	.arm
	.fpu softvfp
	.type	append_osfile, %function
append_osfile:
	@ args = 0, pretend = 0, frame = 536
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #536
	str	r0, [fp, #-536]
	str	r1, [fp, #-540]
	ldr	r3, .L71
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L68:
	sub	r3, fp, #520
	mov	r2, #512
	mov	r1, r3
	ldr	r0, [fp, #-540]
	bl	read
	str	r0, [fp, #-528]
	ldr	r3, [fp, #-528]
	cmp	r3, #0
	bge	.L63
	ldr	r1, .L71+4
	mov	r0, #1
	bl	err
.L63:
	ldr	r3, [fp, #-528]
	cmp	r3, #0
	bne	.L64
	mov	r3, #0
	ldr	r2, .L71
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L69
	b	.L70
.L64:
	ldr	r2, [fp, #-528]
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, [fp, #-536]
	bl	write
	str	r0, [fp, #-524]
	ldr	r3, [fp, #-524]
	cmp	r3, #0
	bge	.L66
	ldr	r1, .L71+8
	mov	r0, #1
	bl	err
.L66:
	ldr	r2, [fp, #-524]
	ldr	r3, [fp, #-528]
	cmp	r2, r3
	beq	.L68
	ldr	r1, .L71+12
	mov	r0, #1
	bl	errx
.L70:
	bl	__stack_chk_fail
.L69:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L72:
	.align	2
.L71:
	.word	.LC20
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.size	append_osfile, .-append_osfile
	.global	__aeabi_idiv
	.section	.rodata
	.align	2
.LC21:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	cylindersize
	.syntax unified
	.arm
	.fpu softvfp
	.type	cylindersize, %function
cylindersize:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L79
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	fstat
	mov	r3, r0
	cmn	r3, #1
	bne	.L74
	ldr	r1, .L79+4
	mov	r0, #1
	bl	err
.L74:
	ldr	r3, [fp, #-116]
	add	r3, r3, #436
	add	r3, r3, #2
	ldrh	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-116]
	add	r3, r3, #436
	ldrh	r3, [r3]
	mul	r3, r2, r3
	lsl	r3, r3, #9
	str	r3, [fp, #-108]
	ldr	r3, [fp, #-56]
	ldr	r1, [fp, #-108]
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-104]
	ldr	r3, [fp, #-56]
	ldr	r1, [fp, #-108]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	bne	.L75
	ldr	r3, [fp, #-104]
	b	.L77
.L75:
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
.L77:
	ldr	r2, .L79
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L78
	bl	__stack_chk_fail
.L78:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L80:
	.align	2
.L79:
	.word	.LC21
	.word	.LC3
	.size	cylindersize, .-cylindersize
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
