	.file	"extr_closefs.c_write_primary_superblock.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	write_primary_superblock, @function
write_primary_superblock:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rdi, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR [rdi]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L2
	mov	rbp, QWORD PTR 0[r13]
	test	rbp, rbp
	je	.L2
	mov	r8d, DWORD PTR SUPERBLOCK_SIZE[rip]
	mov	edx, r8d
	shr	edx, 31
	add	edx, r8d
	sar	edx
	cmp	r8d, 1
	jle	.L5
	xor	ecx, ecx
	.p2align 4,,10
	.p2align 3
.L11:
	movsx	rax, ecx
	lea	ebx, 1[rcx]
	lea	rsi, 0[0+rax*8]
	lea	r9, [r12+rsi]
	mov	rdi, QWORD PTR [r9]
	cmp	QWORD PTR 0[rbp+rax*8], rdi
	je	.L12
	cmp	edx, ebx
	jle	.L13
	lea	rax, 8[rsi+rbp]
	mov	rsi, r12
	sub	rsi, rbp
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	add	ebx, 1
	add	rax, 8
	cmp	ebx, edx
	je	.L17
.L9:
	mov	rdi, QWORD PTR [rsi+rax]
	cmp	QWORD PTR [rax], rdi
	jne	.L8
.L17:
	mov	edx, ebx
	sub	edx, ecx
	add	edx, edx
.L7:
	lea	esi, [rcx+rcx]
	mov	rdi, QWORD PTR 8[r13]
	mov	rcx, r9
	movsx	rsi, esi
	add	rsi, QWORD PTR SUPERBLOCK_OFFSET[rip]
	call	io_channel_write_byte@PLT
	cmp	QWORD PTR EXT2_ET_UNIMPLEMENTED[rip], rax
	mov	r14, rax
	je	.L19
	test	rax, rax
	jne	.L1
	mov	r8d, DWORD PTR SUPERBLOCK_SIZE[rip]
	lea	ecx, 1[rbx]
.L6:
	mov	edx, r8d
	shr	edx, 31
	add	edx, r8d
	sar	edx
	cmp	edx, ecx
	jg	.L11
	mov	rbp, QWORD PTR 0[r13]
.L5:
	mov	edx, r8d
	mov	rsi, r12
	mov	rdi, rbp
	xor	r14d, r14d
	call	memcpy@PLT
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r14
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	ecx, ebx
	jmp	.L6
.L19:
	mov	rdi, QWORD PTR 8[r13]
.L2:
	mov	rsi, QWORD PTR SUPERBLOCK_OFFSET[rip]
	call	io_channel_set_blksize@PLT
	mov	edx, DWORD PTR SUPERBLOCK_SIZE[rip]
	mov	rdi, QWORD PTR 8[r13]
	mov	rcx, r12
	mov	esi, 1
	neg	edx
	call	io_channel_write_blk64@PLT
	mov	rsi, QWORD PTR 16[r13]
	mov	rdi, QWORD PTR 8[r13]
	mov	r14, rax
	call	io_channel_set_blksize@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r14
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	mov	edx, 2
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	write_primary_superblock, .-write_primary_superblock
	.comm	SUPERBLOCK_SIZE,4,4
	.comm	SUPERBLOCK_OFFSET,8,8
	.comm	EXT2_ET_UNIMPLEMENTED,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_closefs.c_write_primary_superblock.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_primary_superblock, %function
write_primary_superblock:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r0
	ldr	r0, [r0, #4]
	mov	r6, r1
	ldr	r3, [r0]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L20
	ldr	r5, [r7]
	cmp	r5, #0
	beq	.L20
	ldr	r8, .L24
	ldr	r2, [r8]
	add	lr, r2, r2, lsr #31
	cmp	r2, #1
	asr	lr, lr, #1
	ble	.L5
	mov	r1, #0
	ldr	r9, .L24+4
	ldr	r10, .L24+8
.L11:
	ldr	r0, [r5, r1, lsl #2]
	ldr	r2, [r6, r1, lsl #2]
	add	r3, r6, r1, lsl #2
	cmp	r0, r2
	add	r4, r1, #1
	beq	.L12
	cmp	lr, r4
	ble	.L13
	mov	r2, r3
	rsb	fp, r6, #4
	b	.L9
.L8:
	add	r4, r4, #1
	cmp	r4, lr
	beq	.L21
.L9:
	add	r0, r2, r5
	ldr	ip, [r0, fp]
	ldr	r0, [r2, #4]!
	cmp	ip, r0
	bne	.L8
.L21:
	sub	r2, r4, r1
	lsl	r2, r2, #1
.L7:
	ldr	r0, [r9]
	add	r1, r0, r1, lsl #1
	ldr	r0, [r7, #4]
	bl	io_channel_write_byte
	ldr	r3, [r10]
	mov	fp, r0
	cmp	r3, r0
	mov	r2, r9
	beq	.L23
	cmp	r0, #0
	bne	.L1
	add	r1, r4, #1
.L6:
	ldr	r2, [r8]
	add	lr, r2, r2, lsr #31
	cmp	r1, lr, asr #1
	asr	lr, lr, #1
	blt	.L11
	ldr	r5, [r7]
.L5:
	mov	r1, r6
	mov	r0, r5
	bl	memcpy
	mov	fp, #0
.L1:
	mov	r0, fp
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	mov	r1, r4
	b	.L6
.L20:
	ldr	r2, .L24+4
	ldr	r8, .L24
.L2:
	ldr	r1, [r2]
	bl	io_channel_set_blksize
	ldr	r2, [r8]
	mov	r3, r6
	rsb	r2, r2, #0
	mov	r1, #1
	ldr	r0, [r7, #4]
	bl	io_channel_write_blk64
	mov	fp, r0
	ldmib	r7, {r0, r1}
	bl	io_channel_set_blksize
	mov	r0, fp
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	mov	r2, #2
	b	.L7
.L23:
	ldr	r0, [r7, #4]
	b	.L2
.L25:
	.align	2
.L24:
	.word	SUPERBLOCK_SIZE
	.word	SUPERBLOCK_OFFSET
	.word	EXT2_ET_UNIMPLEMENTED
	.size	write_primary_superblock, .-write_primary_superblock
	.comm	SUPERBLOCK_SIZE,4,4
	.comm	SUPERBLOCK_OFFSET,4,4
	.comm	EXT2_ET_UNIMPLEMENTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
