	.file	"extr_makeamitbin.c_main.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"-1"
.LC1:
	.string	"-2"
.LC2:
	.string	"-o"
.LC3:
	.string	"-ids"
.LC4:
	.string	"w"
.LC5:
	.string	"-"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	mov	r13, rsi
	push	r12
	push	rbx
	sub	rsp, 72
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -68[rbp], edi
	mov	rcx, rsp
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR HDRSIZE[rip]
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L48:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L48
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L49
.L4:
	mov	edx, DWORD PTR -68[rbp]
	mov	QWORD PTR -80[rbp], rsp
	cmp	edx, 1
	jle	.L28
	lea	rax, 8[r13]
	xor	r14d, r14d
	lea	rbx, .LC0[rip]
	mov	QWORD PTR -88[rbp], rax
	mov	r15, rax
	lea	eax, -2[rdx]
	lea	r12, 16[r13+rax*8]
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	add	r15, 8
	cmp	r15, r12
	je	.L50
.L10:
	mov	rdi, QWORD PTR [r15]
	mov	rsi, rbx
	call	strcmp@PLT
	test	rax, rax
	jne	.L6
	mov	rax, QWORD PTR 8[r15]
	mov	QWORD PTR ascii1[rip], rax
.L6:
	mov	rdi, QWORD PTR [r15]
	lea	rsi, .LC1[rip]
	call	strcmp@PLT
	test	rax, rax
	jne	.L7
	mov	rax, QWORD PTR 8[r15]
	mov	QWORD PTR ascii2[rip], rax
.L7:
	mov	rdi, QWORD PTR [r15]
	lea	rsi, .LC2[rip]
	call	strcmp@PLT
	test	rax, rax
	jne	.L8
	mov	r14, QWORD PTR 8[r15]
.L8:
	mov	rdi, QWORD PTR [r15]
	lea	rsi, .LC3[rip]
	call	strcmp@PLT
	test	rax, rax
	jne	.L9
	call	show_fwids@PLT
	add	r15, 8
	cmp	r15, r12
	jne	.L10
.L50:
	cmp	QWORD PTR ascii1[rip], 0
	je	.L5
	cmp	QWORD PTR ascii2[rip], 0
	je	.L5
	test	r14, r14
	je	.L5
	lea	rsi, .LC4[rip]
	mov	rdi, r14
	call	fopen@PLT
	mov	r15, rax
	test	rax, rax
	je	.L26
.L14:
	lea	rax, -64[rbp]
	mov	r12, QWORD PTR -88[rbp]
	mov	ebx, 3
	mov	QWORD PTR -104[rbp], rax
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rdi, QWORD PTR [r12]
	mov	edx, 1
	lea	rsi, .LC5[rip]
	mov	r14d, ebx
	call	strncmp@PLT
	test	rax, rax
	je	.L23
	mov	rdi, QWORD PTR [r12]
	lea	eax, -1[rbx]
	cmp	DWORD PTR -68[rbp], eax
	jle	.L51
.L18:
	xor	eax, eax
	cmp	ebx, DWORD PTR -68[rbp]
	mov	r14d, ebx
	setge	al
	mov	DWORD PTR -88[rbp], eax
	call	find_hdrinfo@PLT
	mov	r10, rax
	test	rax, rax
	je	.L52
.L19:
	mov	rdi, QWORD PTR 8[r12]
	mov	rsi, QWORD PTR -104[rbp]
	mov	QWORD PTR -96[rbp], r10
	call	read_file@PLT
	mov	r10, QWORD PTR -96[rbp]
	test	rax, rax
	mov	r13, rax
	je	.L53
.L20:
	mov	rcx, QWORD PTR -64[rbp]
	mov	rdi, QWORD PTR -80[rbp]
	mov	rdx, r13
	mov	rsi, r10
	mov	r8d, DWORD PTR -88[rbp]
	call	makehdr@PLT
	movsx	rsi, DWORD PTR HDRSIZE[rip]
	mov	rdi, QWORD PTR -80[rbp]
	mov	rcx, r15
	mov	edx, 1
	call	fwrite@PLT
	cmp	eax, 1
	je	.L21
	mov	rdi, r15
	call	oferror@PLT
.L21:
	mov	rsi, QWORD PTR -64[rbp]
	mov	rcx, r15
	mov	edx, 1
	mov	rdi, r13
	call	fwrite@PLT
	cmp	eax, 1
	je	.L22
	mov	rdi, r15
	call	oferror@PLT
.L22:
	mov	rdi, r13
	call	free@PLT
.L23:
	add	r12, 16
	add	ebx, 2
	cmp	DWORD PTR -68[rbp], r14d
	jg	.L24
.L25:
	mov	rdi, r15
	call	fclose@PLT
	test	rax, rax
	jne	.L54
.L16:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L55
	lea	rsp, -40[rbp]
	xor	eax, eax
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L51:
	.cfi_restore_state
	xor	eax, eax
	mov	QWORD PTR -88[rbp], rdi
	call	showhelp@PLT
	mov	rdi, QWORD PTR -88[rbp]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L53:
	xor	eax, eax
	call	showhelp@PLT
	mov	r10, QWORD PTR -96[rbp]
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L52:
	mov	QWORD PTR -96[rbp], rax
	xor	eax, eax
	call	showhelp@PLT
	mov	r10, QWORD PTR -96[rbp]
	jmp	.L19
.L28:
	xor	r14d, r14d
.L5:
	xor	eax, eax
	call	showhelp@PLT
	lea	rsi, .LC4[rip]
	mov	rdi, r14
	call	fopen@PLT
	mov	r15, rax
	test	rax, rax
	je	.L26
.L13:
	mov	rax, r13
	add	rax, 8
	cmp	DWORD PTR -68[rbp], 1
	mov	QWORD PTR -88[rbp], rax
	jg	.L14
	jmp	.L25
.L54:
	xor	edi, edi
	call	oferror@PLT
	jmp	.L16
.L49:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L26:
	xor	edi, edi
	xor	r15d, r15d
	call	oferror@PLT
	jmp	.L13
.L55:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.comm	ascii2,8,8
	.comm	ascii1,8,8
	.comm	HDRSIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_makeamitbin.c_main.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"-ids\000"
	.align	2
.LC1:
	.ascii	"w\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.section	.text.startup,"ax",%progbits
	.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	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #28
	ldr	r3, .L50
	str	r1, [fp, #-48]
	ldr	r3, [r3]
	cmp	r0, #1
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L50+4
	mov	r7, r0
	mov	r6, #0
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	add	r10, sp, #8
	ble	.L2
	ldr	r8, .L50+8
	ldr	r5, .L50+12
	add	r9, r1, #4
	add	r4, r1, r0, lsl #2
	b	.L10
.L9:
	cmp	r4, r9
	beq	.L45
.L10:
	ldr	r0, [r9], #4
	ldrb	r2, [r0]	@ zero_extendqisi2
	cmp	r2, #45
	bne	.L4
	ldrb	r2, [r0, #1]	@ zero_extendqisi2
	cmp	r2, #49
	bne	.L4
	ldrb	r2, [r0, #2]	@ zero_extendqisi2
	cmp	r2, #0
	ldreq	r2, [r9]
	streq	r2, [r8]
	ldreq	r0, [r9, #-4]
.L4:
	ldrb	r2, [r0]	@ zero_extendqisi2
	cmp	r2, #45
	bne	.L6
	ldrb	r2, [r0, #1]	@ zero_extendqisi2
	cmp	r2, #50
	bne	.L6
	ldrb	r2, [r0, #2]	@ zero_extendqisi2
	cmp	r2, #0
	ldreq	r2, [r9]
	ldreq	r3, .L50+16
	streq	r2, [r3]
	ldreq	r0, [r9, #-4]
.L6:
	ldrb	r2, [r0]	@ zero_extendqisi2
	cmp	r2, #45
	bne	.L8
	ldrb	r2, [r0, #1]	@ zero_extendqisi2
	cmp	r2, #111
	bne	.L8
	ldrb	r2, [r0, #2]	@ zero_extendqisi2
	cmp	r2, #0
	ldreq	r6, [r9]
.L8:
	mov	r1, r5
	bl	strcmp
	cmp	r0, #0
	bne	.L9
	bl	show_fwids
	cmp	r4, r9
	bne	.L10
.L45:
	ldr	r3, [r8]
	cmp	r3, #0
	beq	.L2
	ldr	r3, .L50+16
	ldr	r3, [r3]
	cmp	r6, #0
	cmpne	r3, #0
	beq	.L2
	mov	r0, r6
	ldr	r1, .L50+20
	bl	fopen
	subs	r8, r0, #0
	bne	.L13
.L25:
	mov	r0, #0
	bl	oferror
	mov	r8, #0
.L12:
	cmp	r7, #1
	ble	.L24
.L13:
	mov	r5, #3
	ldr	r6, [fp, #-48]
	b	.L23
.L17:
	mov	r0, r4
	bl	find_hdrinfo
	subs	r3, r0, #0
	mov	r9, r5
	beq	.L46
.L18:
	ldr	r0, [r6, #8]
	sub	r1, fp, #44
	str	r3, [fp, #-48]
	bl	read_file
	subs	r4, r0, #0
	ldr	r3, [fp, #-48]
	beq	.L47
.L19:
	cmp	r5, r7
	movlt	r2, #0
	movge	r2, #1
	mov	r1, r3
	str	r2, [sp]
	ldr	r3, [fp, #-44]
	mov	r2, r4
	mov	r0, r10
	bl	makehdr
	ldr	r1, .L50
	mov	r3, r8
	mov	r2, #1
	mov	r0, r10
	ldr	r1, [r1]
	bl	fwrite
	cmp	r0, #1
	beq	.L20
	mov	r0, r8
	bl	oferror
.L20:
	mov	r3, r8
	mov	r2, #1
	mov	r0, r4
	ldr	r1, [fp, #-44]
	bl	fwrite
	cmp	r0, #1
	beq	.L21
	mov	r0, r8
	bl	oferror
.L21:
	mov	r0, r4
	bl	free
.L22:
	cmp	r7, r9
	add	r6, r6, #8
	add	r5, r5, #2
	ble	.L24
.L23:
	ldr	r4, [r6, #4]
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #45
	moveq	r9, r5
	beq	.L22
	sub	r3, r5, #1
	cmp	r7, r3
	bgt	.L17
	bl	showhelp
	b	.L17
.L2:
	bl	showhelp
	mov	r0, r6
	ldr	r1, .L50+20
	bl	fopen
	subs	r8, r0, #0
	bne	.L12
	b	.L25
.L24:
	mov	r0, r8
	bl	fclose
	cmp	r0, #0
	bne	.L48
.L15:
	ldr	r3, .L50+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L49
	mov	r0, #0
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L46:
	str	r3, [fp, #-48]
	bl	showhelp
	ldr	r3, [fp, #-48]
	b	.L18
.L47:
	bl	showhelp
	ldr	r3, [fp, #-48]
	b	.L19
.L48:
	mov	r0, #0
	bl	oferror
	b	.L15
.L49:
	bl	__stack_chk_fail
.L51:
	.align	2
.L50:
	.word	HDRSIZE
	.word	.LC2
	.word	ascii1
	.word	.LC0
	.word	ascii2
	.word	.LC1
	.size	main, .-main
	.comm	ascii2,4,4
	.comm	ascii1,4,4
	.comm	HDRSIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
