	.file	"extr_biosdisk.c_fd_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"BIOS drive %c: is %s%d\n"
	.text
	.p2align 4
	.type	fd_init, @function
fd_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	eax, eax
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	fd_count@PLT
	test	eax, eax
	jle	.L6
	mov	ebx, eax
	xor	r12d, r12d
	lea	r13, .LC0[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L14:
	mov	eax, DWORD PTR BIOSDISK_SECSIZE[rip]
	mov	rdi, rbp
	mov	DWORD PTR 20[rbp], eax
	mov	eax, DWORD PTR BD_FLOPPY[rip]
	mov	DWORD PTR 0[rbp], r12d
	mov	DWORD PTR 16[rbp], eax
	call	bd_get_diskinfo_std@PLT
	test	rax, rax
	jne	.L13
	cmp	QWORD PTR 8[rbp], 0
	jne	.L4
	mov	eax, DWORD PTR BD_NO_MEDIA[rip]
	or	DWORD PTR 16[rbp], eax
.L4:
	mov	rdx, QWORD PTR biosfd[rip]
	lea	esi, 65[r12]
	mov	ecx, r12d
	mov	rdi, r13
	movsx	esi, sil
	add	r12d, 1
	call	printf@PLT
	mov	edx, DWORD PTR bd_link[rip]
	mov	rsi, rbp
	lea	rdi, fdinfo[rip]
	call	STAILQ_INSERT_TAIL@PLT
	cmp	ebx, r12d
	je	.L2
.L5:
	mov	esi, 24
	mov	edi, 1
	call	calloc@PLT
	mov	rbp, rax
	test	rax, rax
	jne	.L14
.L2:
	mov	edi, r12d
	call	bcache_add_dev@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	rdi, rbp
	call	free@PLT
	jmp	.L2
.L6:
	xor	r12d, r12d
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	fd_init, .-fd_init
	.comm	fdinfo,4,4
	.comm	biosfd,8,8
	.comm	bd_link,4,4
	.comm	BIOSDISK_SECSIZE,4,4
	.comm	BD_NO_MEDIA,4,4
	.comm	BD_FLOPPY,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_biosdisk.c_fd_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"BIOS drive %c: is %s%d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fd_init, %function
fd_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	bl	fd_count
	subs	r6, r0, #0
	mov	r5, #0
	ble	.L2
	ldr	r8, .L14
	ldr	r7, .L14+4
	ldr	fp, .L14+8
	ldr	r10, .L14+12
	ldr	r9, .L14+16
	b	.L5
.L3:
	ldr	ip, [r4, #4]
	mov	r3, r5
	cmp	ip, #0
	ldreq	lr, .L14+20
	ldreq	ip, [r4, #8]
	ldreq	lr, [lr]
	ldr	r2, [fp]
	orreq	ip, ip, lr
	streq	ip, [r4, #8]
	mov	r0, r10
	bl	printf
	add	r5, r5, #1
	mov	r1, r4
	ldr	r2, [r9]
	ldr	r0, .L14+24
	bl	STAILQ_INSERT_TAIL
	cmp	r6, r5
	beq	.L2
.L5:
	mov	r1, #16
	mov	r0, #1
	bl	calloc
	subs	r4, r0, #0
	beq	.L2
	ldr	r2, [r8]
	ldr	r3, [r7]
	str	r5, [r4]
	str	r2, [r4, #12]
	str	r3, [r4, #8]
	bl	bd_get_diskinfo_std
	add	r1, r5, #65
	cmp	r0, #0
	and	r1, r1, #255
	beq	.L3
	mov	r0, r4
	bl	free
.L2:
	mov	r0, r5
	bl	bcache_add_dev
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	.align	2
.L14:
	.word	BIOSDISK_SECSIZE
	.word	BD_FLOPPY
	.word	biosfd
	.word	.LC0
	.word	bd_link
	.word	BD_NO_MEDIA
	.word	fdinfo
	.size	fd_init, .-fd_init
	.comm	fdinfo,4,4
	.comm	biosfd,4,4
	.comm	bd_link,4,4
	.comm	BIOSDISK_SECSIZE,4,4
	.comm	BD_NO_MEDIA,4,4
	.comm	BD_FLOPPY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
