	.file	"extr_mkmylofw.c_parse_opt_block.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"too many blocks specified"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"processing block option %s, count %d"
	.align 8
.LC2:
	.string	"no block address specified in %s"
	.section	.rodata.str1.1
.LC3:
	.string	"invalid block address: %s"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"no block length specified in %s"
	.section	.rodata.str1.1
.LC5:
	.string	"invalid block length: %s"
.LC6:
	.string	"empty block %s"
.LC7:
	.string	"invalid block flag \"%c\""
.LC8:
	.string	"file name missing in %s"
.LC9:
	.string	"not enough memory"
	.text
	.p2align 4
	.globl	parse_opt_block
	.type	parse_opt_block, @function
parse_opt_block:
.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, 40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAX_ARG_LEN[rip]
	mov	rcx, rsp
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L36:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L36
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L37
.L4:
	movsx	rax, DWORD PTR MAX_ARG_COUNT[rip]
	mov	rcx, rsp
	mov	r12, rsp
	lea	rax, 15[0+rax*8]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L6
.L38:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L38
.L6:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L39
.L7:
	lea	rdx, 7[rsp]
	movsx	edi, dil
	mov	rsi, r13
	mov	r14, rdx
	and	rdx, -8
	shr	r14, 3
	mov	QWORD PTR -72[rbp], rdx
	call	required_arg@PLT
	test	rax, rax
	jne	.L23
	mov	rax, QWORD PTR MAX_FW_BLOCKS[rip]
	cmp	QWORD PTR fw_num_blocks[rip], rax
	mov	rdx, QWORD PTR -72[rbp]
	jge	.L40
	mov	rsi, r12
	mov	rdi, r13
	call	parse_arg@PLT
	mov	rdx, r13
	mov	edi, 1
	lea	rsi, .LC1[rip]
	mov	ecx, eax
	mov	r12d, eax
	xor	eax, eax
	call	dbgmsg@PLT
	mov	rax, QWORD PTR fw_num_blocks[rip]
	mov	r15, QWORD PTR 0[0+r14*8]
	lea	rdx, 1[rax]
	lea	rbx, [rax+rax*2]
	mov	rax, QWORD PTR fw_blocks[rip]
	mov	rdi, r15
	mov	QWORD PTR fw_num_blocks[rip], rdx
	lea	rbx, [rax+rbx*8]
	call	is_empty_arg@PLT
	test	rax, rax
	jne	.L41
	lea	rsi, 16[rbx]
	mov	rdi, r15
	call	str2u32@PLT
	test	rax, rax
	jne	.L42
	mov	r15, QWORD PTR 8[0+r14*8]
	mov	rdi, r15
	call	is_empty_arg@PLT
	test	rax, rax
	jne	.L43
	lea	rsi, 12[rbx]
	mov	rdi, r15
	call	str2u32@PLT
	test	rax, rax
	jne	.L44
	cmp	r12d, 2
	jle	.L45
	mov	r12, QWORD PTR 16[0+r14*8]
	mov	rdi, r12
	call	is_empty_arg@PLT
	test	rax, rax
	jne	.L20
	movsx	edx, BYTE PTR [r12]
	mov	eax, DWORD PTR BLOCK_FLAG_HAVEHDR[rip]
	test	dl, dl
	jne	.L19
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L46:
	add	r12, 1
	or	DWORD PTR 8[rbx], eax
	movsx	edx, BYTE PTR [r12]
	test	dl, dl
	je	.L20
.L19:
	cmp	dl, 104
	je	.L46
	lea	rsi, .LC7[rip]
	xor	edi, edi
	xor	eax, eax
	call	errmsg@PLT
	mov	eax, -1
.L1:
	mov	rcx, QWORD PTR -56[rbp]
	xor	rcx, QWORD PTR fs:40
	jne	.L47
	lea	rsp, -40[rbp]
	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
.L37:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L20:
	mov	r12, QWORD PTR 24[0+r14*8]
	mov	rdi, r12
	call	is_empty_arg@PLT
	test	rax, rax
	jne	.L48
	mov	rdi, r12
	call	strdup@PLT
	mov	QWORD PTR [rbx], rax
	test	rax, rax
	je	.L49
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L45:
	mov	rdx, r13
	lea	rsi, .LC6[rip]
	mov	edi, 1
	xor	eax, eax
	call	dbgmsg@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L39:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L7
.L23:
	mov	eax, -1
	jmp	.L1
.L40:
	lea	rsi, .LC0[rip]
	xor	edi, edi
	xor	eax, eax
	call	errmsg@PLT
	mov	eax, -1
	jmp	.L1
.L42:
	mov	rdx, r15
	lea	rsi, .LC3[rip]
	xor	edi, edi
	xor	eax, eax
	call	errmsg@PLT
	mov	eax, -1
	jmp	.L1
.L41:
	mov	rdx, r13
	lea	rsi, .LC2[rip]
	xor	edi, edi
	xor	eax, eax
	call	errmsg@PLT
	mov	eax, -1
	jmp	.L1
.L43:
	mov	rdx, r13
	lea	rsi, .LC4[rip]
	xor	edi, edi
	xor	eax, eax
	call	errmsg@PLT
	mov	eax, -1
	jmp	.L1
.L44:
	mov	rdx, r15
	lea	rsi, .LC5[rip]
	xor	edi, edi
	xor	eax, eax
	call	errmsg@PLT
	mov	eax, -1
	jmp	.L1
.L48:
	mov	rdx, r13
	lea	rsi, .LC8[rip]
	xor	edi, edi
	xor	eax, eax
	call	errmsg@PLT
	mov	eax, -1
	jmp	.L1
.L47:
	call	__stack_chk_fail@PLT
.L49:
	lea	rsi, .LC9[rip]
	xor	edi, edi
	call	errmsg@PLT
	or	eax, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	parse_opt_block, .-parse_opt_block
	.comm	fw_num_blocks,8,8
	.comm	fw_blocks,8,8
	.comm	MAX_FW_BLOCKS,8,8
	.comm	MAX_ARG_LEN,4,4
	.comm	MAX_ARG_COUNT,4,4
	.comm	BLOCK_FLAG_HAVEHDR,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_mkmylofw.c_parse_opt_block.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"too many blocks specified\000"
	.align	2
.LC1:
	.ascii	"processing block option %s, count %d\000"
	.align	2
.LC2:
	.ascii	"no block address specified in %s\000"
	.align	2
.LC3:
	.ascii	"invalid block address: %s\000"
	.align	2
.LC4:
	.ascii	"no block length specified in %s\000"
	.align	2
.LC5:
	.ascii	"invalid block length: %s\000"
	.align	2
.LC6:
	.ascii	"empty block %s\000"
	.align	2
.LC7:
	.ascii	"invalid block flag \"%c\"\000"
	.align	2
.LC8:
	.ascii	"file name missing in %s\000"
	.align	2
.LC9:
	.ascii	"not enough memory\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	parse_opt_block
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_opt_block, %function
parse_opt_block:
	@ args = 0, pretend = 0, frame = 24
	@ 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	r2, .L32
	ldr	r3, .L32+4
	ldr	r2, [r2]
	ldr	r3, [r3]
	add	r2, r2, #7
	lsl	r3, r3, #2
	bic	r2, r2, #7
	add	r3, r3, #7
	sub	sp, sp, r2
	bic	r3, r3, #7
	mov	r6, sp
	sub	sp, sp, r3
	ldr	r3, .L32+8
	mov	r4, r1
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	required_arg
	subs	r3, r0, #0
	str	r3, [fp, #-52]
	bne	.L17
	ldr	r8, .L32+12
	ldr	r3, .L32+16
	ldr	r2, [r8]
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L22
	mov	r5, sp
	mov	r1, r6
	mov	r2, r5
	mov	r0, r4
	bl	parse_arg
	mov	r2, r4
	mov	r3, r0
	ldr	r1, .L32+20
	mov	r6, r0
	mov	r0, #1
	bl	dbgmsg
	ldr	r3, .L32+24
	ldr	r9, [r8]
	ldr	r7, [r5]
	ldr	r10, [r3]
	add	r1, r9, #1
	mov	r0, r7
	str	r1, [r8]
	str	r10, [fp, #-48]
	bl	is_empty_arg
	subs	r8, r0, #0
	add	r10, r10, r9, lsl #4
	bne	.L23
	mov	r0, r7
	add	r1, r10, #12
	bl	str2u32
	subs	r3, r0, #0
	str	r3, [fp, #-52]
	bne	.L24
	ldr	r8, [r5, #4]
	mov	r0, r8
	bl	is_empty_arg
	subs	r3, r0, #0
	str	r3, [fp, #-56]
	bne	.L25
	mov	r0, r8
	add	r1, r10, #8
	bl	str2u32
	subs	r7, r0, #0
	bne	.L26
	cmp	r6, #2
	ble	.L27
	ldr	r6, [r5, #8]
	mov	r0, r6
	bl	is_empty_arg
	cmp	r0, #0
	bne	.L14
	ldrb	r2, [r6]	@ zero_extendqisi2
	cmp	r2, #0
	beq	.L14
	ldr	r1, .L32+28
	ldr	r1, [r1]
	b	.L13
.L28:
	ldr	r2, [r10, #4]
	orr	r2, r2, r1
	str	r2, [r10, #4]
	ldrb	r2, [r6, #1]!	@ zero_extendqisi2
	cmp	r2, #0
	beq	.L14
.L13:
	cmp	r2, #104
	beq	.L28
	mov	r0, #0
	ldr	r1, .L32+32
	bl	errmsg
	mvn	r7, #0
	b	.L1
.L14:
	ldr	r5, [r5, #12]
	mov	r0, r5
	bl	is_empty_arg
	subs	r7, r0, #0
	bne	.L29
	mov	r0, r5
	bl	strdup
	ldr	r2, [fp, #-48]
	cmp	r0, #0
	str	r0, [r2, r9, lsl #4]
	beq	.L30
.L1:
	ldr	r3, .L32+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L31
	mov	r0, r7
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L27:
	mov	r2, r4
	ldr	r1, .L32+36
	mov	r0, #1
	bl	dbgmsg
	b	.L1
.L17:
	mvn	r7, #0
	b	.L1
.L23:
	mov	r2, r4
	ldr	r0, [fp, #-52]
	ldr	r1, .L32+40
	bl	errmsg
	mvn	r7, #0
	b	.L1
.L22:
	ldr	r1, .L32+44
	bl	errmsg
	mvn	r7, #0
	b	.L1
.L25:
	mov	r2, r4
	ldr	r0, [fp, #-52]
	ldr	r1, .L32+48
	bl	errmsg
	mvn	r7, #0
	b	.L1
.L24:
	mov	r2, r7
	mov	r0, r8
	ldr	r1, .L32+52
	bl	errmsg
	mvn	r7, #0
	b	.L1
.L26:
	mov	r2, r8
	ldr	r0, [fp, #-56]
	ldr	r1, .L32+56
	bl	errmsg
	mvn	r7, #0
	b	.L1
.L29:
	mov	r2, r4
	mov	r0, #0
	ldr	r1, .L32+60
	bl	errmsg
	mvn	r7, #0
	b	.L1
.L31:
	bl	__stack_chk_fail
.L30:
	ldr	r1, .L32+64
	bl	errmsg
	mvn	r7, #0
	b	.L1
.L33:
	.align	2
.L32:
	.word	MAX_ARG_LEN
	.word	MAX_ARG_COUNT
	.word	.LC10
	.word	fw_num_blocks
	.word	MAX_FW_BLOCKS
	.word	.LC1
	.word	fw_blocks
	.word	BLOCK_FLAG_HAVEHDR
	.word	.LC7
	.word	.LC6
	.word	.LC2
	.word	.LC0
	.word	.LC4
	.word	.LC3
	.word	.LC5
	.word	.LC8
	.word	.LC9
	.size	parse_opt_block, .-parse_opt_block
	.comm	fw_num_blocks,4,4
	.comm	fw_blocks,4,4
	.comm	MAX_FW_BLOCKS,4,4
	.comm	MAX_ARG_LEN,4,4
	.comm	MAX_ARG_COUNT,4,4
	.comm	BLOCK_FLAG_HAVEHDR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
