	.file	"extr_substx3g.c_SegmentSplit.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	SegmentSplit, @function
SegmentSplit:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	rdi, QWORD PTR [rsi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	QWORD PTR [rsp], 0
	mov	QWORD PTR 8[rsp], 0
	mov	eax, DWORD PTR [rdi]
	mov	QWORD PTR 16[rsp], 0
	test	eax, eax
	je	.L12
	mov	esi, edx
	mov	edx, ecx
	cmp	esi, ecx
	jg	.L12
	mov	r12, r8
	mov	r8d, ecx
	lea	ecx, -1[rax]
	sub	r8d, esi
	cmp	r8d, ecx
	ja	.L12
	cmp	eax, edx
	jg	.L18
	.p2align 4,,10
	.p2align 3
.L12:
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR 24[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L19
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L18:
	.cfi_restore_state
	mov	rcx, rsp
	lea	r9, 16[rsp]
	lea	r8, 8[rsp]
	call	SegmentDoSplit@PLT
	cmp	QWORD PTR 8[rsp], 0
	je	.L20
	mov	rax, QWORD PTR [rbx]
	mov	rdi, QWORD PTR 8[rax]
	mov	r13, QWORD PTR 16[rax]
	call	text_segment_Delete@PLT
	mov	rdi, QWORD PTR [rbx]
	call	free@PLT
	mov	rax, QWORD PTR [rsp]
	test	rax, rax
	je	.L4
	mov	rdx, QWORD PTR 8[rsp]
.L5:
	mov	QWORD PTR [rbx], rax
	test	rbp, rbp
	je	.L6
	mov	QWORD PTR 16[rbp], rax
.L6:
	mov	rax, QWORD PTR 16[rsp]
	test	rax, rax
	je	.L7
	mov	QWORD PTR 16[rax], r13
.L8:
	mov	rbx, QWORD PTR 8[rdx]
	mov	rdi, QWORD PTR [rbx]
	test	rdi, rdi
	je	.L9
	mov	edx, 1
	mov	rsi, r12
	call	text_style_Merge@PLT
	mov	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, r12
	call	text_style_Duplicate@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR 8[rsp]
	mov	rdx, rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	mov	QWORD PTR 16[rdx], r13
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rax, QWORD PTR [rsp]
	mov	rdi, QWORD PTR 8[rax]
	call	text_segment_Delete@PLT
	mov	rdi, QWORD PTR [rsp]
	call	free@PLT
	mov	rax, QWORD PTR 16[rsp]
	mov	rdi, QWORD PTR 8[rax]
	call	text_segment_Delete@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	free@PLT
	xor	eax, eax
	jmp	.L1
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	SegmentSplit, .-SegmentSplit
	.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_substx3g.c_SegmentSplit.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	SegmentSplit, %function
SegmentSplit:
	@ args = 4, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, [r1]
	mov	r5, r1
	ldr	r1, [r4]
	cmp	r2, r3
	mov	lr, r2
	movle	r2, #0
	movgt	r2, #1
	cmp	r1, ip
	moveq	r2, #1
	mov	r6, r0
	ldr	r0, .L21
	sub	sp, sp, #24
	cmp	r2, ip
	ldr	r0, [r0]
	str	r0, [sp, #20]
	mov	r0,#0
	ldr	r7, [sp, #48]
	movne	r0, ip
	str	ip, [sp, #8]
	str	ip, [sp, #12]
	str	ip, [sp, #16]
	beq	.L18
.L1:
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L18:
	cmp	r1, r3
	movgt	r0, #0
	movle	r0, #1
	sub	r1, r1, #1
	sub	ip, r3, lr
	cmp	ip, r1
	movls	r1, r0
	orrhi	r1, r0, #1
	cmp	r1, #0
	movne	r0, r2
	bne	.L1
	add	ip, sp, #12
	add	r8, sp, #16
	mov	r2, r3
	mov	r0, r4
	mov	r1, lr
	str	r8, [sp, #4]
	str	ip, [sp]
	add	r3, sp, #8
	bl	SegmentDoSplit
	ldr	r4, [sp, #12]
	cmp	r4, #0
	beq	.L20
	ldr	r3, [r5]
	ldmib	r3, {r0, r4}
	bl	text_segment_Delete
	ldr	r0, [r5]
	bl	free
	ldr	r3, [sp, #8]
	cmp	r3, #0
	ldreq	r3, [sp, #12]
	ldrne	r2, [sp, #12]
	moveq	r2, r3
	cmp	r6, #0
	str	r3, [r5]
	strne	r3, [r6, #8]
	ldr	r3, [sp, #16]
	cmp	r3, #0
	strne	r4, [r3, #8]
	streq	r4, [r2, #8]
	ldr	r4, [r2, #4]
	ldr	r0, [r4]
	cmp	r0, #0
	beq	.L9
	mov	r1, r7
	mov	r2, #1
	bl	text_style_Merge
	mov	r0, #1
	b	.L1
.L9:
	mov	r0, r7
	bl	text_style_Duplicate
	mov	r3, r0
	mov	r0, #1
	str	r3, [r4]
	b	.L1
.L20:
	ldr	r3, [sp, #8]
	ldr	r0, [r3, #4]
	bl	text_segment_Delete
	ldr	r0, [sp, #8]
	bl	free
	ldr	r3, [sp, #16]
	ldr	r0, [r3, #4]
	bl	text_segment_Delete
	ldr	r0, [sp, #16]
	bl	free
	mov	r0, r4
	b	.L1
.L19:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	.LC0
	.size	SegmentSplit, .-SegmentSplit
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
