	.file	"extr_biosdisk.c_bd_io.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"%s%d: Write %d sector(s) from %p (0x%x) to %lld: 0x%x\n"
	.align 8
.LC1:
	.string	"%s%d: Read %d sector(s) from %lld to %p (0x%x): 0x%x\n"
	.text
	.p2align 4
	.type	bd_io, @function
bd_io:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	QWORD PTR 8[rsp], rdi
	test	ecx, ecx
	js	.L11
	mov	rbx, rsi
	mov	r13d, edx
	mov	r12d, ecx
	mov	ebp, r8d
	mov	DWORD PTR 4[rsp], 3
	mov	r14d, r9d
.L9:
	mov	eax, DWORD PTR [rbx]
	mov	r8d, r14d
	mov	ecx, ebp
	mov	edx, r12d
	mov	esi, r13d
	mov	rdi, rbx
	test	DWORD PTR BD_MODEEDD[rip], eax
	je	.L3
	call	bd_edd_io@PLT
	mov	r15d, eax
.L4:
	test	r15d, r15d
	je	.L18
	mov	edi, DWORD PTR 4[rbx]
	call	bd_reset_disk@PLT
	cmp	r15d, 32
	je	.L6
	cmp	r15d, 49
	je	.L6
	cmp	r15d, 128
	je	.L6
	sub	DWORD PTR 4[rsp], 1
	jne	.L9
	mov	eax, DWORD PTR BD_NO_MEDIA[rip]
	and	eax, DWORD PTR [rbx]
.L8:
	test	eax, eax
	jne	.L1
	cmp	DWORD PTR BD_WR[rip], r14d
	mov	edi, ebp
	je	.L19
	call	VTOP@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	r9d, ebp
	mov	ecx, r12d
	mov	r8d, eax
	lea	rdi, .LC1[rip]
	mov	rax, QWORD PTR 8[rdx]
	push	r15
	.cfi_def_cfa_offset 88
	push	r8
	.cfi_def_cfa_offset 96
	mov	edx, DWORD PTR [rdx]
	mov	r8d, r13d
	mov	rsi, QWORD PTR [rax]
	call	printf@PLT
	pop	rax
	.cfi_def_cfa_offset 88
	pop	rdx
	.cfi_def_cfa_offset 80
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	call	bd_chs_io@PLT
	mov	r15d, eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L19:
	call	VTOP@PLT
	mov	ecx, r12d
	mov	r8d, ebp
	lea	rdi, .LC0[rip]
	mov	r9d, eax
	mov	rax, QWORD PTR 8[rsp]
	mov	rsi, QWORD PTR 8[rax]
	push	r15
	.cfi_def_cfa_offset 88
	push	r13
	.cfi_def_cfa_offset 96
	mov	edx, DWORD PTR [rax]
	mov	rsi, QWORD PTR [rsi]
	call	printf@PLT
	pop	rcx
	.cfi_def_cfa_offset 88
	pop	rsi
	.cfi_def_cfa_offset 80
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, DWORD PTR BD_NO_MEDIA[rip]
	or	DWORD PTR [rbx], eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edx, DWORD PTR [rbx]
	mov	eax, DWORD PTR BD_NO_MEDIA[rip]
	test	edx, eax
	je	.L1
	not	eax
	and	eax, edx
	mov	DWORD PTR [rbx], eax
	jmp	.L1
.L11:
	mov	r15d, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	bd_io, .-bd_io
	.comm	BD_WR,4,4
	.comm	BD_RD,4,4
	.comm	BD_NO_MEDIA,4,4
	.comm	BD_MODEEDD,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_bd_io.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s%d: Write %d sector(s) from %p (0x%x) to %lld: 0x"
	.ascii	"%x\012\000"
	.align	2
.LC1:
	.ascii	"%s%d: Read %d sector(s) from %lld to %p (0x%x): 0x%"
	.ascii	"x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bd_io, %function
bd_io:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r7, r3, #0
	sub	sp, sp, #20
	ldr	r9, [sp, #56]
	blt	.L11
	mov	r10, r0
	mov	r5, r1
	mov	r8, r2
	mov	r6, #3
	ldr	fp, .L20
.L9:
	ldr	r2, [r5]
	ldr	r3, [fp]
	mov	r1, r8
	tst	r2, r3
	ldr	r3, [sp, #60]
	mov	r2, r7
	str	r3, [sp]
	mov	r0, r5
	mov	r3, r9
	beq	.L3
	bl	bd_edd_io
	mov	r4, r0
.L4:
	cmp	r4, #0
	beq	.L18
	ldr	r0, [r5, #4]
	bl	bd_reset_disk
	cmp	r4, #49
	cmpne	r4, #32
	beq	.L6
	cmp	r4, #128
	beq	.L6
	subs	r6, r6, #1
	bne	.L9
	ldr	r3, .L20+4
	ldr	r2, [r5]
	ldr	r3, [r3]
	and	r3, r3, r2
.L8:
	cmp	r3, #0
	bne	.L1
	ldr	r2, [r10, #4]
	ldr	r3, .L20+8
	ldr	r5, [r2]
	ldr	r3, [r3]
	ldr	r2, [sp, #60]
	mov	r0, r9
	cmp	r3, r2
	ldr	r6, [r10]
	beq	.L19
	bl	VTOP
	mov	r3, r7
	str	r0, [sp, #8]
	mov	r2, r6
	mov	r1, r5
	stm	sp, {r8, r9}
	ldr	r0, .L20+12
	str	r4, [sp, #12]
	bl	printf
.L1:
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	bl	bd_chs_io
	mov	r4, r0
	b	.L4
.L19:
	bl	VTOP
	mov	r3, r7
	stmib	sp, {r0, r8}
	mov	r2, r6
	mov	r1, r5
	str	r4, [sp, #12]
	str	r9, [sp]
	ldr	r0, .L20+16
	bl	printf
	b	.L1
.L6:
	ldr	r3, .L20+4
	ldr	r2, [r5]
	ldr	r3, [r3]
	orr	r2, r2, r3
	str	r2, [r5]
	b	.L8
.L18:
	ldr	r2, .L20+4
	ldr	r3, [r5]
	ldr	r2, [r2]
	tst	r3, r2
	bicne	r3, r3, r2
	strne	r3, [r5]
	b	.L1
.L11:
	mvn	r4, #0
	b	.L1
.L21:
	.align	2
.L20:
	.word	BD_MODEEDD
	.word	BD_NO_MEDIA
	.word	BD_WR
	.word	.LC1
	.word	.LC0
	.size	bd_io, .-bd_io
	.comm	BD_WR,4,4
	.comm	BD_RD,4,4
	.comm	BD_NO_MEDIA,4,4
	.comm	BD_MODEEDD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
