	.file	"extr_ms_block.c_msb_sg_copy.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	msb_sg_copy, @function
msb_sg_copy:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, edx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, r8
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	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
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	test	rcx, rcx
	je	.L12
	mov	rbx, rcx
.L5:
	mov	rsi, QWORD PTR 0[rbp]
	cmp	rsi, rbx
	ja	.L3
	mov	rdi, rbp
	call	sg_is_last@PLT
	test	rax, rax
	je	.L25
	xor	r14d, r14d
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r14
	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
	sub	rsi, rbx
	mov	rdi, r13
	call	min@PLT
	mov	rdi, rbp
	add	rbx, QWORD PTR 8[rbp]
	mov	r14, rax
	call	sg_page@PLT
	mov	rdi, r12
	mov	rcx, rbx
	mov	rdx, r14
	mov	esi, eax
	sub	r13, r14
	call	sg_set_page@PLT
	mov	rdi, rbp
	call	sg_is_last@PLT
	test	r13, r13
	je	.L6
	test	rax, rax
	jne	.L6
	mov	rdi, r12
	sub	r15d, 1
	call	sg_next@PLT
	mov	rdi, rbp
	mov	r12, rax
	call	sg_next@PLT
	mov	rbp, rax
.L2:
	mov	rbx, QWORD PTR 0[rbp]
	cmp	rbx, r13
	jnb	.L7
	lea	eax, -1[r15]
	mov	DWORD PTR 12[rsp], eax
	test	r15d, r15d
	je	.L26
.L10:
	mov	r15, QWORD PTR 8[rbp]
	mov	rdi, rbp
	sub	r13, rbx
	add	r14, rbx
	call	sg_page@PLT
	mov	rdi, r12
	mov	rdx, rbx
	mov	esi, eax
	mov	rcx, r15
	call	sg_set_page@PLT
	mov	rdi, rbp
	call	sg_is_last@PLT
	test	rax, rax
	jne	.L6
	mov	rdi, rbp
	call	sg_next@PLT
	mov	rdi, r12
	mov	rbp, rax
	call	sg_next@PLT
	mov	rbx, QWORD PTR 0[rbp]
	mov	r12, rax
	cmp	rbx, r13
	jnb	.L27
	mov	edx, DWORD PTR 12[rsp]
	lea	eax, -1[rdx]
	test	edx, edx
	je	.L11
	mov	DWORD PTR 12[rsp], eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L25:
	mov	rdi, rbp
	sub	rbx, QWORD PTR 0[rbp]
	call	sg_next@PLT
	mov	rbp, rax
	test	rbx, rbx
	jne	.L5
.L12:
	xor	r14d, r14d
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L7:
	test	r15d, r15d
	setne	al
.L8:
	test	r13, r13
	je	.L6
	test	al, al
	je	.L6
.L11:
	mov	r15, QWORD PTR 8[rbp]
	mov	rdi, rbp
	add	r14, r13
	call	sg_page@PLT
	mov	rdx, r13
	mov	rdi, r12
	mov	esi, eax
	mov	rcx, r15
	call	sg_set_page@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, r12
	call	sg_mark_end@PLT
	jmp	.L1
.L26:
	mov	eax, 1
	jmp	.L8
.L27:
	mov	eax, DWORD PTR 12[rsp]
	test	eax, eax
	setne	al
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	msb_sg_copy, .-msb_sg_copy
	.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_ms_block.c_msb_sg_copy.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	msb_sg_copy, %function
msb_sg_copy:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	subs	r6, r3, #0
	mov	r4, r0
	mov	r5, r1
	mov	r9, r2
	ldr	r8, [sp, #32]
	beq	.L12
.L5:
	ldr	r1, [r4]
	cmp	r1, r6
	bhi	.L3
	mov	r0, r4
	bl	sg_is_last
	cmp	r0, #0
	beq	.L22
	mov	r7, #0
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L3:
	sub	r1, r1, r6
	mov	r0, r8
	bl	min
	mov	r7, r0
	mov	r0, r4
	bl	sg_page
	ldr	r3, [r4, #4]
	mov	r1, r0
	mov	r2, r7
	add	r3, r6, r3
	mov	r0, r5
	bl	sg_set_page
	mov	r0, r4
	bl	sg_is_last
	sub	r8, r8, r7
	subs	r0, r0, #0
	movne	r0, #1
	cmp	r8, #0
	moveq	r0, #1
	cmp	r0, #0
	bne	.L6
	mov	r0, r5
	bl	sg_next
	mov	r5, r0
	mov	r0, r4
	bl	sg_next
	mov	r4, r0
	sub	r9, r9, #1
.L2:
	ldr	r3, [r4]
	cmp	r3, r8
	bcs	.L7
	cmp	r9, #0
	sub	r9, r9, #1
	beq	.L14
.L10:
	mov	r0, r4
	sub	r8, r8, r3
	add	r7, r7, r3
	bl	sg_page
	ldm	r4, {r2, r3}
	mov	r1, r0
	mov	r0, r5
	bl	sg_set_page
	mov	r0, r4
	bl	sg_is_last
	cmp	r0, #0
	bne	.L6
	mov	r0, r4
	bl	sg_next
	mov	r4, r0
	mov	r0, r5
	bl	sg_next
	ldr	r3, [r4]
	mov	r5, r0
	cmp	r3, r8
	bcs	.L7
	cmp	r9, #0
	sub	r9, r9, #1
	bne	.L10
.L11:
	mov	r0, r4
	bl	sg_page
	mov	r2, r8
	mov	r1, r0
	ldr	r3, [r4, #4]
	mov	r0, r5
	bl	sg_set_page
	add	r7, r7, r8
.L6:
	mov	r0, r5
	bl	sg_mark_end
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L22:
	ldr	r3, [r4]
	mov	r0, r4
	sub	r6, r6, r3
	bl	sg_next
	cmp	r6, #0
	mov	r4, r0
	bne	.L5
.L12:
	mov	r7, r6
	b	.L2
.L7:
	subs	r9, r9, #0
	movne	r9, #1
.L8:
	cmp	r8, #0
	moveq	r9, #0
	cmp	r9, #0
	beq	.L6
	b	.L11
.L14:
	mov	r9, #1
	b	.L8
	.size	msb_sg_copy, .-msb_sg_copy
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
