	.file	"extr_boot.c_getbootfile.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"bootfile"
	.text
	.p2align 4
	.type	getbootfile, @function
getbootfile:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	ebx, edi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rdi, QWORD PTR name.1934[rip]
	test	rdi, rdi
	je	.L2
	call	free@PLT
	mov	QWORD PTR name.1934[rip], 0
.L2:
	lea	rdi, .LC0[rip]
	call	getenv@PLT
	test	ebx, ebx
	mov	rbp, rax
	setg	al
	test	rbp, rbp
	je	.L32
	test	ebx, ebx
	jg	.L6
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L33:
	sub	ebx, 1
	lea	rbp, 1[rax]
	test	ebx, ebx
	jle	.L13
.L6:
	mov	esi, 59
	mov	rdi, rbp
	call	strchr@PLT
	test	rax, rax
	jne	.L33
.L5:
	mov	rax, QWORD PTR name.1934[rip]
.L8:
	test	rax, rax
	je	.L1
	cmp	BYTE PTR [rax], 0
	je	.L34
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	mov	rbp, QWORD PTR default_bootfiles[rip]
	test	rbp, rbp
	je	.L5
	test	al, al
	jne	.L6
	test	rbp, rbp
	je	.L5
.L13:
	mov	esi, 59
	mov	rdi, rbp
	call	strchr@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L9
	sub	rbx, rbp
.L10:
	lea	rdi, 1[rbx]
	call	malloc@PLT
	mov	rdx, rbx
	mov	rsi, rbp
	mov	rdi, rax
	mov	QWORD PTR name.1934[rip], rax
	call	strncpy@PLT
	mov	rax, QWORD PTR name.1934[rip]
	mov	BYTE PTR [rax+rbx], 0
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L34:
	mov	rdi, rax
	call	free@PLT
	xor	eax, eax
	mov	QWORD PTR name.1934[rip], 0
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rdi, rbp
	call	strlen@PLT
	mov	rbx, rax
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	getbootfile, .-getbootfile
	.local	name.1934
	.comm	name.1934,8,8
	.comm	default_bootfiles,8,8
	.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_boot.c_getbootfile.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"bootfile\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	getbootfile, %function
getbootfile:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, .L33
	mov	r5, r0
	ldr	r0, [r7]
	cmp	r0, #0
	beq	.L2
	bl	free
	mov	r3, #0
	str	r3, [r7]
.L2:
	ldr	r0, .L33+4
	bl	getenv
	cmp	r5, #0
	movle	r3, #0
	movgt	r3, #1
	subs	r4, r0, #0
	beq	.L30
	cmp	r5, #0
	bgt	.L6
	b	.L14
.L31:
	cmp	r5, #0
	add	r4, r0, #1
	ble	.L14
.L6:
	mov	r0, r4
	mov	r1, #59
	bl	strchr
	cmp	r0, #0
	sub	r5, r5, #1
	bne	.L31
.L5:
	ldr	r5, [r7]
	cmp	r5, #0
	bne	.L10
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L30:
	ldr	r2, .L33+8
	ldr	r4, [r2]
	cmp	r4, #0
	moveq	r3, #0
	cmp	r3, #0
	bne	.L6
	cmp	r4, #0
	beq	.L5
.L14:
	mov	r1, #59
	mov	r0, r4
	bl	strchr
	cmp	r0, #0
	subne	r6, r0, r4
	beq	.L32
.L9:
	add	r0, r6, #1
	bl	malloc
	mov	r1, r4
	mov	r2, r6
	mov	r5, r0
	str	r0, [r7]
	bl	strncpy
	mov	r3, #0
	strb	r3, [r5, r6]
.L10:
	ldrb	r4, [r5]	@ zero_extendqisi2
	cmp	r4, #0
	beq	.L12
	ldr	r5, [r7]
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	mov	r0, r5
	mov	r5, r4
	bl	free
	mov	r0, r5
	str	r4, [r7]
	pop	{r4, r5, r6, r7, r8, pc}
.L32:
	mov	r0, r4
	bl	strlen
	mov	r6, r0
	b	.L9
.L34:
	.align	2
.L33:
	.word	.LANCHOR0
	.word	.LC0
	.word	default_bootfiles
	.size	getbootfile, .-getbootfile
	.comm	default_bootfiles,4,4
	.bss
	.align	2
	.set	.LANCHOR0,. + 0
	.type	name.4218, %object
	.size	name.4218, 4
name.4218:
	.space	4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
