Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <math.h>

#define PREC 1e-12

int main() {
    int x, y, x0, y0, x1, y1, x2, y2, x3, y3;
    int q;
    double v1x, v1y, v2x, v2y, cosa;
    int judge;

    scanf("%d", &q);
    
    while (q--) {
        scanf("%d %d %d %d %d %d %d %d",
              &x0, &y0, &x1, &y1, &x2, &y2, &x3, &y3);
        v1x = x1 - x0;
        v1y = y1 - y0;
        v2x = x3 - x2;
        v2y = y3 - y2;
        cosa = (v1x*v2x + v1y*v2y) /
            (sqrt(v1x*v1x+v1y*v1y) * sqrt(v2x*v2x+v2y*v2y));

        if (fabs(cosa) < PREC) {
            judge = 1;
        }
        else if (fabs(fabs(cosa) - 1.0) < PREC) {
            judge = 2;
        }
        else {
            judge = 0;
        }
        printf("%d\n", judge);
    }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d %d %d %d %d %d"
.LC5:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$112, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L8:
	leaq	-72(%rbp), %r8
	leaq	-76(%rbp), %rdi
	leaq	-80(%rbp), %rcx
	leaq	-84(%rbp), %rdx
	leaq	-88(%rbp), %rax
	subq	$8, %rsp
	leaq	-60(%rbp), %rsi
	pushq	%rsi
	leaq	-64(%rbp), %rsi
	pushq	%rsi
	leaq	-68(%rbp), %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$32, %rsp
	movl	-80(%rbp), %eax
	movl	-88(%rbp), %edx
	subl	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -48(%rbp)
	movl	-76(%rbp), %eax
	movl	-84(%rbp), %edx
	subl	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -40(%rbp)
	movl	-64(%rbp), %eax
	movl	-72(%rbp), %edx
	subl	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -32(%rbp)
	movl	-60(%rbp), %eax
	movl	-68(%rbp), %edx
	subl	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -24(%rbp)
	movsd	-48(%rbp), %xmm0
	movapd	%xmm0, %xmm1
	mulsd	-32(%rbp), %xmm1
	movsd	-40(%rbp), %xmm0
	mulsd	-24(%rbp), %xmm0
	addsd	%xmm0, %xmm1
	movsd	%xmm1, -104(%rbp)
	movsd	-48(%rbp), %xmm0
	movapd	%xmm0, %xmm2
	mulsd	%xmm0, %xmm2
	movapd	%xmm2, %xmm1
	movsd	-40(%rbp), %xmm0
	mulsd	%xmm0, %xmm0
	movapd	%xmm1, %xmm3
	addsd	%xmm0, %xmm3
	movq	%xmm3, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movsd	%xmm0, -112(%rbp)
	movsd	-32(%rbp), %xmm0
	movapd	%xmm0, %xmm4
	mulsd	%xmm0, %xmm4
	movapd	%xmm4, %xmm1
	movsd	-24(%rbp), %xmm0
	mulsd	%xmm0, %xmm0
	movapd	%xmm1, %xmm5
	addsd	%xmm0, %xmm5
	movq	%xmm5, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movsd	-112(%rbp), %xmm6
	mulsd	%xmm0, %xmm6
	movapd	%xmm6, %xmm1
	movsd	-104(%rbp), %xmm0
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-16(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm0, %xmm1
	movsd	.LC3(%rip), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L13
	movl	$1, -52(%rbp)
	jmp	.L5
.L13:
	movsd	-16(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	.LC4(%rip), %xmm1
	subsd	%xmm1, %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm0, %xmm1
	movsd	.LC3(%rip), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L14
	movl	$2, -52(%rbp)
	jmp	.L5
.L14:
	movl	$0, -52(%rbp)
.L5:
	movl	-52(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	movl	-56(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -56(%rbp)
	testl	%eax, %eax
	jne	.L8
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC2:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.align 8
.LC3:
	.long	-2127697391
	.long	1030854553
	.align 8
.LC4:
	.long	0
	.long	1072693248
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.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:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d %d %d %d %d %d"
.LC6:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	84(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	84(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 84(%rsp)
	testl	%eax, %eax
	je	.L2
	leaq	80(%rsp), %rax
	leaq	68(%rsp), %r15
	movq	%rax, (%rsp)
	leaq	76(%rsp), %rax
	leaq	64(%rsp), %r14
	movq	%rax, 16(%rsp)
	leaq	72(%rsp), %rax
	leaq	60(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	56(%rsp), %r12
	leaq	52(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L11:
	subq	$8, %rsp
	.cfi_def_cfa_offset 168
	xorl	%eax, %eax
	movq	%r15, %r9
	movq	%r14, %r8
	pushq	8(%rsp)
	.cfi_def_cfa_offset 176
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%rbp, %rsi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 184
	movq	%rbx, %rdi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 192
	call	__isoc99_scanf@PLT
	movl	92(%rsp), %eax
	pxor	%xmm0, %xmm0
	subl	84(%rsp), %eax
	cvtsi2sdl	%eax, %xmm0
	pxor	%xmm1, %xmm1
	movl	96(%rsp), %eax
	subl	88(%rsp), %eax
	cvtsi2sdl	%eax, %xmm1
	pxor	%xmm2, %xmm2
	movl	108(%rsp), %eax
	subl	100(%rsp), %eax
	cvtsi2sdl	%eax, %xmm2
	pxor	%xmm4, %xmm4
	movl	112(%rsp), %eax
	subl	104(%rsp), %eax
	cvtsi2sdl	%eax, %xmm4
	pxor	%xmm6, %xmm6
	addq	$32, %rsp
	.cfi_def_cfa_offset 160
	movapd	%xmm0, %xmm3
	mulsd	%xmm0, %xmm0
	movapd	%xmm1, %xmm5
	mulsd	%xmm1, %xmm1
	mulsd	%xmm2, %xmm3
	mulsd	%xmm4, %xmm5
	addsd	%xmm0, %xmm1
	addsd	%xmm5, %xmm3
	ucomisd	%xmm1, %xmm6
	ja	.L21
	sqrtsd	%xmm1, %xmm1
	movapd	%xmm6, %xmm7
.L5:
	mulsd	%xmm2, %xmm2
	mulsd	%xmm4, %xmm4
	addsd	%xmm4, %xmm2
	ucomisd	%xmm2, %xmm7
	ja	.L22
	sqrtsd	%xmm2, %xmm2
.L8:
	mulsd	%xmm2, %xmm1
	movsd	.LC4(%rip), %xmm6
	movl	$1, %edx
	divsd	%xmm1, %xmm3
	andpd	.LC3(%rip), %xmm3
	comisd	%xmm3, %xmm6
	movapd	%xmm3, %xmm0
	ja	.L24
	subsd	.LC5(%rip), %xmm0
	andpd	.LC3(%rip), %xmm0
	xorl	%edx, %edx
	comisd	%xmm0, %xmm6
	seta	%dl
	addl	%edx, %edx
.L24:
	leaq	.LC6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	84(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 84(%rsp)
	testl	%eax, %eax
	jne	.L11
.L2:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	movapd	%xmm1, %xmm0
	movsd	%xmm4, 40(%rsp)
	movsd	%xmm2, 32(%rsp)
	movsd	%xmm3, 24(%rsp)
	call	sqrt@PLT
	movsd	40(%rsp), %xmm4
	movsd	32(%rsp), %xmm2
	pxor	%xmm7, %xmm7
	movsd	24(%rsp), %xmm3
	movapd	%xmm0, %xmm1
	jmp	.L5
.L22:
	movapd	%xmm2, %xmm0
	movsd	%xmm1, 32(%rsp)
	movsd	%xmm3, 24(%rsp)
	call	sqrt@PLT
	movsd	32(%rsp), %xmm1
	movsd	24(%rsp), %xmm3
	movapd	%xmm0, %xmm2
	jmp	.L8
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC4:
	.long	-2127697391
	.long	1030854553
	.align 8
.LC5:
	.long	0
	.long	1072693248
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d %d %d %d %d %d"
.LC6:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	84(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	84(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 84(%rsp)
	testl	%eax, %eax
	je	.L2
	leaq	80(%rsp), %rax
	leaq	68(%rsp), %r15
	movq	%rax, (%rsp)
	leaq	76(%rsp), %rax
	leaq	64(%rsp), %r14
	movq	%rax, 16(%rsp)
	leaq	72(%rsp), %rax
	leaq	60(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	56(%rsp), %r12
	leaq	52(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L11:
	subq	$8, %rsp
	.cfi_def_cfa_offset 168
	xorl	%eax, %eax
	movq	%r15, %r9
	movq	%r14, %r8
	pushq	8(%rsp)
	.cfi_def_cfa_offset 176
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%rbp, %rsi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 184
	movq	%rbx, %rdi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 192
	call	__isoc99_scanf@PLT
	movl	92(%rsp), %eax
	pxor	%xmm0, %xmm0
	subl	84(%rsp), %eax
	cvtsi2sdl	%eax, %xmm0
	pxor	%xmm1, %xmm1
	movl	96(%rsp), %eax
	subl	88(%rsp), %eax
	cvtsi2sdl	%eax, %xmm1
	pxor	%xmm2, %xmm2
	movl	108(%rsp), %eax
	subl	100(%rsp), %eax
	cvtsi2sdl	%eax, %xmm2
	pxor	%xmm4, %xmm4
	movl	112(%rsp), %eax
	subl	104(%rsp), %eax
	cvtsi2sdl	%eax, %xmm4
	pxor	%xmm6, %xmm6
	addq	$32, %rsp
	.cfi_def_cfa_offset 160
	movapd	%xmm0, %xmm3
	mulsd	%xmm0, %xmm0
	movapd	%xmm1, %xmm5
	mulsd	%xmm1, %xmm1
	mulsd	%xmm2, %xmm3
	mulsd	%xmm4, %xmm5
	addsd	%xmm0, %xmm1
	addsd	%xmm5, %xmm3
	ucomisd	%xmm1, %xmm6
	ja	.L21
	sqrtsd	%xmm1, %xmm1
	movapd	%xmm6, %xmm7
.L5:
	mulsd	%xmm2, %xmm2
	mulsd	%xmm4, %xmm4
	addsd	%xmm4, %xmm2
	ucomisd	%xmm2, %xmm7
	ja	.L22
	sqrtsd	%xmm2, %xmm2
.L8:
	mulsd	%xmm2, %xmm1
	movsd	.LC4(%rip), %xmm6
	movl	$1, %edx
	divsd	%xmm1, %xmm3
	andpd	.LC3(%rip), %xmm3
	comisd	%xmm3, %xmm6
	movapd	%xmm3, %xmm0
	ja	.L24
	subsd	.LC5(%rip), %xmm0
	andpd	.LC3(%rip), %xmm0
	xorl	%edx, %edx
	comisd	%xmm0, %xmm6
	seta	%dl
	addl	%edx, %edx
.L24:
	leaq	.LC6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	84(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 84(%rsp)
	testl	%eax, %eax
	jne	.L11
.L2:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	movapd	%xmm1, %xmm0
	movsd	%xmm4, 40(%rsp)
	movsd	%xmm2, 32(%rsp)
	movsd	%xmm3, 24(%rsp)
	call	sqrt@PLT
	movsd	40(%rsp), %xmm4
	movsd	32(%rsp), %xmm2
	pxor	%xmm7, %xmm7
	movsd	24(%rsp), %xmm3
	movapd	%xmm0, %xmm1
	jmp	.L5
.L22:
	movapd	%xmm2, %xmm0
	movsd	%xmm1, 32(%rsp)
	movsd	%xmm3, 24(%rsp)
	call	sqrt@PLT
	movsd	32(%rsp), %xmm1
	movsd	24(%rsp), %xmm3
	movapd	%xmm0, %xmm2
	jmp	.L8
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC4:
	.long	-2127697391
	.long	1030854553
	.align 8
.LC5:
	.long	0
	.long	1072693248
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.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:

#include <stdio.h>
#include <math.h>

#define PREC 1e-12

int main() {
    int x, y, x0, y0, x1, y1, x2, y2, x3, y3;
    int q;
    double v1x, v1y, v2x, v2y, cosa;
    int judge;

    scanf("%d", &q);
    
    while (q--) {
        scanf("%d %d %d %d %d %d %d %d",
              &x0, &y0, &x1, &y1, &x2, &y2, &x3, &y3);
        v1x = x1 - x0;
        v1y = y1 - y0;
        v2x = x3 - x2;
        v2y = y3 - y2;
        cosa = (v1x*v2x + v1y*v2y) /
            (sqrt(v1x*v1x+v1y*v1y) * sqrt(v2x*v2x+v2y*v2y));

        if (fabs(cosa) < PREC) {
            judge = 1;
        }
        else if (fabs(fabs(cosa) - 1.0) < PREC) {
            judge = 2;
        }
        else {
            judge = 0;
        }
        printf("%d\n", judge);
    }
}
3
0 0 3 0 0 2 3 2
0 0 3 0 1 1 1 7
0 0 3 0 1 1 2 2
 3
0 0 3 1 0 2 3 2
0 0 3 0 1 1 1 7
0 0 3 0 1 1 2 2
 3
0 0 3 0 0 2 3 2
0 0 3 -1 1 1 1 4
0 0 3 0 1 1 2 2
 3
0 0 3 1 0 2 3 2
0 1 3 0 1 1 1 7
0 0 3 0 1 1 2 2
 3
0 0 3 1 0 2 3 2
0 1 3 0 1 0 1 7
0 0 3 0 1 1 2 1
 3
0 -1 3 0 0 4 3 2
1 0 3 -1 1 0 1 16
0 0 1 0 0 1 0 0
 3
-1 1 1 5 4 -1 0 1
0 1 4 0 0 0 -1 11
-2 -2 1 1 0 0 -1 0
 3
-1 1 1 5 4 -1 0 1
0 1 4 0 0 0 -1 11
-2 -2 1 1 0 0 -1 -1
 3
0 0 2 5 4 0 -2 0
1 0 6 0 2 1 -2 1
-1 -6 0 1 -1 0 -1 -3
 3
0 -1 2 1 0 4 3 1
1 0 3 -2 1 -1 0 16
0 0 1 0 0 1 0 0

2
1
0
 0
1
0
 2
0
0
 0
0
0
 0
0
2
 0
0
1
 1
0
0
 1
0
2
 0
2
0
 1
0
1

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <math.h>

#define PREC 1e-12

int main() {
    int x, y, x0, y0, x1, y1, x2, y2, x3, y3;
    int q;
    double v1x, v1y, v2x, v2y, cosa;
    int judge;

    scanf("%d", &q);
    
    while (q--) {
        scanf("%d %d %d %d %d %d %d %d",
              &x0, &y0, &x1, &y1, &x2, &y2, &x3, &y3);
        v1x = x1 - x0;
        v1y = y1 - y0;
        v2x = x3 - x2;
        v2y = y3 - y2;
        cosa = (v1x*v2x + v1y*v2y) /
            (sqrt(v1x*v1x+v1y*v1y) * sqrt(v2x*v2x+v2y*v2y));

        if (fabs(cosa) < PREC) {
            judge = 1;
        }
        else if (fabs(fabs(cosa) - 1.0) < PREC) {
            judge = 2;
        }
        else {
            judge = 0;
        }
        printf("%d\n", judge);
    }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d %d %d %d %d %d"
.LC5:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$112, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L8:
	leaq	-72(%rbp), %r8
	leaq	-76(%rbp), %rdi
	leaq	-80(%rbp), %rcx
	leaq	-84(%rbp), %rdx
	leaq	-88(%rbp), %rax
	subq	$8, %rsp
	leaq	-60(%rbp), %rsi
	pushq	%rsi
	leaq	-64(%rbp), %rsi
	pushq	%rsi
	leaq	-68(%rbp), %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$32, %rsp
	movl	-80(%rbp), %eax
	movl	-88(%rbp), %edx
	subl	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -48(%rbp)
	movl	-76(%rbp), %eax
	movl	-84(%rbp), %edx
	subl	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -40(%rbp)
	movl	-64(%rbp), %eax
	movl	-72(%rbp), %edx
	subl	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -32(%rbp)
	movl	-60(%rbp), %eax
	movl	-68(%rbp), %edx
	subl	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -24(%rbp)
	movsd	-48(%rbp), %xmm0
	movapd	%xmm0, %xmm1
	mulsd	-32(%rbp), %xmm1
	movsd	-40(%rbp), %xmm0
	mulsd	-24(%rbp), %xmm0
	addsd	%xmm0, %xmm1
	movsd	%xmm1, -104(%rbp)
	movsd	-48(%rbp), %xmm0
	movapd	%xmm0, %xmm2
	mulsd	%xmm0, %xmm2
	movapd	%xmm2, %xmm1
	movsd	-40(%rbp), %xmm0
	mulsd	%xmm0, %xmm0
	movapd	%xmm1, %xmm3
	addsd	%xmm0, %xmm3
	movq	%xmm3, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movsd	%xmm0, -112(%rbp)
	movsd	-32(%rbp), %xmm0
	movapd	%xmm0, %xmm4
	mulsd	%xmm0, %xmm4
	movapd	%xmm4, %xmm1
	movsd	-24(%rbp), %xmm0
	mulsd	%xmm0, %xmm0
	movapd	%xmm1, %xmm5
	addsd	%xmm0, %xmm5
	movq	%xmm5, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movsd	-112(%rbp), %xmm6
	mulsd	%xmm0, %xmm6
	movapd	%xmm6, %xmm1
	movsd	-104(%rbp), %xmm0
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-16(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm0, %xmm1
	movsd	.LC3(%rip), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L13
	movl	$1, -52(%rbp)
	jmp	.L5
.L13:
	movsd	-16(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	.LC4(%rip), %xmm1
	subsd	%xmm1, %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm0, %xmm1
	movsd	.LC3(%rip), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L14
	movl	$2, -52(%rbp)
	jmp	.L5
.L14:
	movl	$0, -52(%rbp)
.L5:
	movl	-52(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	movl	-56(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -56(%rbp)
	testl	%eax, %eax
	jne	.L8
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC2:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.align 8
.LC3:
	.long	-2127697391
	.long	1030854553
	.align 8
.LC4:
	.long	0
	.long	1072693248
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.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:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d %d %d %d %d %d"
.LC5:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$112, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L8:
	leaq	-72(%rbp), %r8
	leaq	-76(%rbp), %rdi
	leaq	-80(%rbp), %rcx
	leaq	-84(%rbp), %rdx
	leaq	-88(%rbp), %rax
	subq	$8, %rsp
	leaq	-60(%rbp), %rsi
	pushq	%rsi
	leaq	-64(%rbp), %rsi
	pushq	%rsi
	leaq	-68(%rbp), %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$32, %rsp
	movl	-80(%rbp), %eax
	movl	-88(%rbp), %edx
	subl	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -48(%rbp)
	movl	-76(%rbp), %eax
	movl	-84(%rbp), %edx
	subl	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -40(%rbp)
	movl	-64(%rbp), %eax
	movl	-72(%rbp), %edx
	subl	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -32(%rbp)
	movl	-60(%rbp), %eax
	movl	-68(%rbp), %edx
	subl	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -24(%rbp)
	movsd	-48(%rbp), %xmm0
	movapd	%xmm0, %xmm1
	mulsd	-32(%rbp), %xmm1
	movsd	-40(%rbp), %xmm0
	mulsd	-24(%rbp), %xmm0
	addsd	%xmm0, %xmm1
	movsd	%xmm1, -104(%rbp)
	movsd	-48(%rbp), %xmm0
	movapd	%xmm0, %xmm2
	mulsd	%xmm0, %xmm2
	movapd	%xmm2, %xmm1
	movsd	-40(%rbp), %xmm0
	mulsd	%xmm0, %xmm0
	movapd	%xmm1, %xmm3
	addsd	%xmm0, %xmm3
	movq	%xmm3, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movsd	%xmm0, -112(%rbp)
	movsd	-32(%rbp), %xmm0
	movapd	%xmm0, %xmm4
	mulsd	%xmm0, %xmm4
	movapd	%xmm4, %xmm1
	movsd	-24(%rbp), %xmm0
	mulsd	%xmm0, %xmm0
	movapd	%xmm1, %xmm5
	addsd	%xmm0, %xmm5
	movq	%xmm5, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movsd	-112(%rbp), %xmm6
	mulsd	%xmm0, %xmm6
	movapd	%xmm6, %xmm1
	movsd	-104(%rbp), %xmm0
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-16(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm0, %xmm1
	movsd	.LC3(%rip), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L13
	movl	$1, -52(%rbp)
	jmp	.L5
.L13:
	movsd	-16(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	.LC4(%rip), %xmm1
	subsd	%xmm1, %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm0, %xmm1
	movsd	.LC3(%rip), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L14
	movl	$2, -52(%rbp)
	jmp	.L5
.L14:
	movl	$0, -52(%rbp)
.L5:
	movl	-52(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	movl	-56(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -56(%rbp)
	testl	%eax, %eax
	jne	.L8
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC2:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.align 8
.LC3:
	.long	-2127697391
	.long	1030854553
	.align 8
.LC4:
	.long	0
	.long	1072693248
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.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:
