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

```c
/* ex 7_1
   B30095   */

#include <stdio.h>

/* a 2d point */
typedef struct{
    int x;
    int y;
}Point;

/* get next point of a sqaure in counterclockwise */
Point next_square_point(Point p1, Point p2){
    Point p3, vect;

    // vector from p1 to p2
    vect.x = p2.x - p1.x;
    vect.y = p2.y - p1.y;

    // rotate the vector 90 degrees and add it to p2
    p3.x = p2.x - vect.y ;
    p3.y = p2.y + vect.x;

    return p3;
}

int main(void){

    Point p1, p2, p3, p4;

    scanf("%d %d %d %d", &p1.x, &p1.y, &p2.x, &p2.y);
    
    p3 = next_square_point(p1, p2);
    p4 = next_square_point(p2, p3);

    printf("%d %d %d %d", p3.x, p3.y, p4.x, p4.y);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	next_square_point
	.type	next_square_point, @function
next_square_point:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	-32(%rbp), %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-28(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-32(%rbp), %eax
	movl	-4(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -16(%rbp)
	movl	-28(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movq	-16(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	next_square_point, .-next_square_point
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	leaq	4(%rax), %rcx
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rax
	leaq	4(%rax), %rsi
	leaq	-40(%rbp), %rax
	movq	%rcx, %r8
	movq	%rdx, %rcx
	movq	%rsi, %rdx
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-32(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	next_square_point
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rdx
	movq	-32(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	next_square_point
	movq	%rax, -16(%rbp)
	movl	-12(%rbp), %esi
	movl	-16(%rbp), %ecx
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.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
	.p2align 4
	.globl	next_square_point
	.type	next_square_point, @function
next_square_point:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rsi, %rdx
	movq	%rdi, %rax
	sarq	$32, %rdx
	sarq	$32, %rax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	%esi, %eax
	subl	%edi, %esi
	subl	%ecx, %eax
	addl	%edx, %esi
	movd	%eax, %xmm0
	movd	%esi, %xmm1
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	next_square_point, .-next_square_point
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rsi
	leaq	12(%rsp), %rdx
	leaq	20(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %edx
	movl	20(%rsp), %ecx
	movl	12(%rsp), %edi
	movl	8(%rsp), %r8d
	movl	%edx, %esi
	movl	%ecx, %eax
	subl	%r8d, %esi
	subl	%edi, %eax
	addl	%esi, %ecx
	subl	%eax, %edx
	leal	(%rdi,%rsi), %r9d
	subl	%eax, %r8d
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L6
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.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
	.p2align 4
	.globl	next_square_point
	.type	next_square_point, @function
next_square_point:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rsi, %rdx
	movq	%rdi, %rax
	sarq	$32, %rdx
	sarq	$32, %rax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	%esi, %eax
	subl	%edi, %esi
	subl	%ecx, %eax
	addl	%edx, %esi
	movd	%eax, %xmm0
	movd	%esi, %xmm1
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	next_square_point, .-next_square_point
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rsi
	leaq	12(%rsp), %rdx
	leaq	20(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %edx
	movl	20(%rsp), %ecx
	movl	12(%rsp), %edi
	movl	8(%rsp), %r8d
	movl	%edx, %esi
	movl	%ecx, %eax
	subl	%r8d, %esi
	subl	%edi, %eax
	addl	%esi, %ecx
	subl	%eax, %edx
	leal	(%rdi,%rsi), %r9d
	subl	%eax, %r8d
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L6
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.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:

/* ex 7_1
   B30095   */

#include <stdio.h>

/* a 2d point */
typedef struct{
    int x;
    int y;
}Point;

/* get next point of a sqaure in counterclockwise */
Point next_square_point(Point p1, Point p2){
    Point p3, vect;

    // vector from p1 to p2
    vect.x = p2.x - p1.x;
    vect.y = p2.y - p1.y;

    // rotate the vector 90 degrees and add it to p2
    p3.x = p2.x - vect.y ;
    p3.y = p2.y + vect.x;

    return p3;
}

int main(void){

    Point p1, p2, p3, p4;

    scanf("%d %d %d %d", &p1.x, &p1.y, &p2.x, &p2.y);
    
    p3 = next_square_point(p1, p2);
    p4 = next_square_point(p2, p3);

    printf("%d %d %d %d", p3.x, p3.y, p4.x, p4.y);

    return 0;
}
2 1 6 6
 0 0 -1 1
 1 -41 -59 26
 2 2 6 6
 0 0 -1 2
 1 -46 -59 26
 2 2 6 2
 0 -1 -1 2
 1 -46 -59 12
 2 2 6 1

1 10 -3 5 -2 0 -1 -1 -126 -34 -66 -101 2 10 -2 6 -3 1 -2 -1 -131 -34 -71 -106 6 6 2 6 -4 1 -3 -2 -117 -48 -57 -106 7 5 3 6
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
/* ex 7_1
   B30095   */

#include <stdio.h>

/* a 2d point */
typedef struct{
    int x;
    int y;
}Point;

/* get next point of a sqaure in counterclockwise */
Point next_square_point(Point p1, Point p2){
    Point p3, vect;

    // vector from p1 to p2
    vect.x = p2.x - p1.x;
    vect.y = p2.y - p1.y;

    // rotate the vector 90 degrees and add it to p2
    p3.x = p2.x - vect.y ;
    p3.y = p2.y + vect.x;

    return p3;
}

int main(void){

    Point p1, p2, p3, p4;

    scanf("%d %d %d %d", &p1.x, &p1.y, &p2.x, &p2.y);
    
    p3 = next_square_point(p1, p2);
    p4 = next_square_point(p2, p3);

    printf("%d %d %d %d", p3.x, p3.y, p4.x, p4.y);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	next_square_point
	.type	next_square_point, @function
next_square_point:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	-32(%rbp), %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-28(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-32(%rbp), %eax
	movl	-4(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -16(%rbp)
	movl	-28(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movq	-16(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	next_square_point, .-next_square_point
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	leaq	4(%rax), %rcx
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rax
	leaq	4(%rax), %rsi
	leaq	-40(%rbp), %rax
	movq	%rcx, %r8
	movq	%rdx, %rcx
	movq	%rsi, %rdx
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-32(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	next_square_point
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rdx
	movq	-32(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	next_square_point
	movq	%rax, -16(%rbp)
	movl	-12(%rbp), %esi
	movl	-16(%rbp), %ecx
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.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
	.globl	next_square_point
	.type	next_square_point, @function
next_square_point:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	-32(%rbp), %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-28(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-32(%rbp), %eax
	movl	-4(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -16(%rbp)
	movl	-28(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movq	-16(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	next_square_point, .-next_square_point
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	leaq	4(%rax), %rcx
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rax
	leaq	4(%rax), %rsi
	leaq	-40(%rbp), %rax
	movq	%rcx, %r8
	movq	%rdx, %rcx
	movq	%rsi, %rdx
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-32(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	next_square_point
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rdx
	movq	-32(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	next_square_point
	movq	%rax, -16(%rbp)
	movl	-12(%rbp), %esi
	movl	-16(%rbp), %ecx
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.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:
