	.file	"extr_tjunction.c_InsertPointOnEdge.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	InsertPointOnEdge
	.type	InsertPointOnEdge, @function
InsertPointOnEdge:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rsi
	mov	edx, ebp
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR 36[rsi]
	call	VectorSubtract@PLT
	mov	esi, DWORD PTR 32[rbx]
	mov	edi, ebp
	call	DotProduct@PLT
	mov	edi, 32
	movss	DWORD PTR 12[rsp], xmm0
	call	safe_malloc@PLT
	movss	xmm0, DWORD PTR 12[rsp]
	mov	edi, r12d
	mov	esi, DWORD PTR 24[rax]
	mov	rbp, rax
	movss	DWORD PTR [rax], xmm0
	call	VectorCopy@PLT
	mov	rax, QWORD PTR 16[rbx]
	cmp	rax, rbx
	je	.L17
	movss	xmm4, DWORD PTR LINE_POSITION_EPSILON[rip]
	movss	xmm2, DWORD PTR 0[rbp]
	movaps	xmm3, xmm4
	xorps	xmm3, XMMWORD PTR .LC0[rip]
	.p2align 4,,10
	.p2align 3
.L9:
	movss	xmm0, DWORD PTR [rax]
	movaps	xmm1, xmm2
	subss	xmm1, xmm0
	comiss	xmm1, xmm3
	jbe	.L4
	comiss	xmm4, xmm1
	ja	.L18
.L4:
	comiss	xmm0, xmm2
	ja	.L19
	mov	rax, QWORD PTR 16[rax]
	cmp	rbx, rax
	jne	.L9
	mov	rax, QWORD PTR 8[rbx]
	mov	QWORD PTR 16[rbp], rbx
	mov	QWORD PTR 8[rbp], rax
	mov	rax, QWORD PTR 8[rbx]
	mov	QWORD PTR 16[rax], rbp
	mov	QWORD PTR 8[rbx], rbp
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	rdx, QWORD PTR 8[rax]
	mov	QWORD PTR 16[rbp], rax
	mov	QWORD PTR 8[rbp], rdx
	mov	QWORD PTR 16[rdx], rbp
	mov	QWORD PTR 8[rax], rbp
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	QWORD PTR 8[rax], rbp
	mov	QWORD PTR 16[rax], rbp
	mov	QWORD PTR 8[rbp], rax
	mov	QWORD PTR 16[rbp], rax
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	add	rsp, 16
	.cfi_def_cfa_offset 32
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	free@PLT
	.cfi_endproc
.LFE0:
	.size	InsertPointOnEdge, .-InsertPointOnEdge
	.comm	LINE_POSITION_EPSILON,4,4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	2147483648
	.long	0
	.long	0
	.long	0
	.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_tjunction.c_InsertPointOnEdge.c"
	.text
	.global	__aeabi_fsub
	.global	__aeabi_fcmplt
	.global	__aeabi_fcmpgt
	.align	2
	.global	InsertPointOnEdge
	.syntax unified
	.arm
	.fpu softvfp
	.type	InsertPointOnEdge, %function
InsertPointOnEdge:
	@ 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	r4, #0
	mov	r7, r1
	mov	r2, r4
	ldr	r1, [r1, #20]
	mov	r5, r0
	bl	VectorSubtract
	ldr	r1, [r7, #16]
	mov	r0, r4
	bl	DotProduct
	mov	r4, r0
	mov	r0, #16
	bl	safe_malloc
	mov	r9, r0
	mov	r0, r5
	ldr	r1, [r9, #12]
	str	r4, [r9]	@ float
	bl	VectorCopy
	ldr	r5, [r7, #8]
	cmp	r5, r7
	beq	.L17
	ldr	r3, .L20
	ldr	r6, [r9]	@ float
	ldr	r10, [r3]	@ float
	add	r8, r10, #-2147483648
.L9:
	ldr	fp, [r5]	@ float
	mov	r0, r6
	mov	r1, fp
	bl	__aeabi_fsub
	mov	r4, r0
	mov	r0, r8
	mov	r1, r4
	bl	__aeabi_fcmplt
	cmp	r0, #0
	beq	.L4
	mov	r1, r4
	mov	r0, r10
	bl	__aeabi_fcmpgt
	cmp	r0, #0
	bne	.L18
.L4:
	mov	r1, fp
	mov	r0, r6
	bl	__aeabi_fcmplt
	cmp	r0, #0
	bne	.L19
	ldr	r5, [r5, #8]
	cmp	r7, r5
	bne	.L9
	ldr	r3, [r7, #4]
	stmib	r9, {r3, r7}
	ldr	r3, [r7, #4]
	str	r9, [r3, #8]
	str	r9, [r7, #4]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	ldr	r3, [r5, #4]
	stmib	r9, {r3, r5}
	str	r9, [r3, #8]
	str	r9, [r5, #4]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	str	r9, [r5, #4]
	str	r9, [r5, #8]
	str	r5, [r9, #4]
	str	r5, [r9, #8]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	mov	r0, r9
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	free
.L21:
	.align	2
.L20:
	.word	LINE_POSITION_EPSILON
	.size	InsertPointOnEdge, .-InsertPointOnEdge
	.comm	LINE_POSITION_EPSILON,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
