	.file	"extr_block.c_bwrite.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"failed to open disk for writing"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"allocate bounce buffer"
.LC2:
	.string	"write error to block device"
.LC3:
	.string	"short write to block device"
	.text
	.p2align 4
	.globl	bwrite
	.type	bwrite, @function
bwrite:
.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
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	xor	esi, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rcx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	ERROR@PLT
	mov	rdi, rbp
	call	ufs_disk_write@PLT
	cmp	eax, -1
	je	.L10
	test	r14b, 63
	je	.L4
	mov	rdi, rbx
	call	malloc@PLT
	mov	r15, rax
	test	rax, rax
	je	.L11
	mov	rdx, rbx
	mov	rsi, r14
	mov	rdi, rax
	call	memcpy@PLT
	mov	ecx, DWORD PTR 0[rbp]
	mov	edi, DWORD PTR 4[rbp]
	mov	rdx, rbx
	mov	rsi, r15
	imul	ecx, r13d
	call	pwrite@PLT
	mov	rdi, r15
	mov	r12d, eax
	call	free@PLT
.L7:
	cmp	r12d, -1
	je	.L12
	movsx	rax, r12d
	cmp	rax, rbx
	jne	.L13
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L4:
	.cfi_restore_state
	mov	ecx, DWORD PTR 0[rbp]
	mov	edi, DWORD PTR 4[rbp]
	mov	rdx, rbx
	mov	rsi, r14
	imul	ecx, r13d
	call	pwrite@PLT
	mov	r12d, eax
	jmp	.L7
.L13:
	lea	rsi, .LC3[rip]
	mov	rdi, rbp
	mov	r12d, -1
	call	ERROR@PLT
	jmp	.L1
.L10:
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	mov	r12d, eax
	call	ERROR@PLT
	jmp	.L1
.L12:
	lea	rsi, .LC2[rip]
	mov	rdi, rbp
	call	ERROR@PLT
	jmp	.L1
.L11:
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	or	r12d, -1
	call	ERROR@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	bwrite, .-bwrite
	.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_block.c_bwrite.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to open disk for writing\000"
	.align	2
.LC1:
	.ascii	"allocate bounce buffer\000"
	.align	2
.LC2:
	.ascii	"write error to block device\000"
	.align	2
.LC3:
	.ascii	"short write to block device\000"
	.text
	.align	2
	.global	bwrite
	.syntax unified
	.arm
	.fpu softvfp
	.type	bwrite, %function
bwrite:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r0
	mov	r8, r1
	mov	r1, #0
	mov	r7, r2
	mov	r5, r3
	bl	ERROR
	mov	r0, r6
	bl	ufs_disk_write
	cmn	r0, #1
	beq	.L10
	tst	r7, #63
	beq	.L4
	mov	r0, r5
	bl	malloc
	subs	r9, r0, #0
	beq	.L11
	mov	r1, r7
	mov	r2, r5
	bl	memcpy
	ldr	r3, [r6]
	mov	r2, r5
	mov	r1, r9
	mul	r3, r8, r3
	ldr	r0, [r6, #4]
	bl	pwrite
	mov	r4, r0
	mov	r0, r9
	bl	free
.L7:
	cmn	r4, #1
	beq	.L12
	cmp	r5, r4
	bne	.L13
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	ldr	r3, [r6]
	mov	r1, r7
	mov	r2, r5
	mul	r3, r8, r3
	ldr	r0, [r6, #4]
	bl	pwrite
	mov	r4, r0
	b	.L7
.L13:
	mov	r0, r6
	ldr	r1, .L14
	bl	ERROR
	mvn	r4, #0
	b	.L1
.L10:
	mov	r4, r0
	ldr	r1, .L14+4
	mov	r0, r6
	bl	ERROR
	b	.L1
.L12:
	mov	r0, r6
	ldr	r1, .L14+8
	bl	ERROR
	b	.L1
.L11:
	mov	r0, r6
	ldr	r1, .L14+12
	bl	ERROR
	mvn	r4, #0
	b	.L1
.L15:
	.align	2
.L14:
	.word	.LC3
	.word	.LC0
	.word	.LC2
	.word	.LC1
	.size	bwrite, .-bwrite
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
