Given the following C code and 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;
}```

Assembly Code:

```assembly
	.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:
```

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.
Optimized Assembly Code:

user
```assembly
	.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
```assembly
	.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:
```
```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;
}```
Given the following C 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;
}```

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.
Optimized Assembly Code:

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 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;
}```

Assembly Code:

```assembly
	.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:
```

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.
Optimized Assembly Code:

train
```assembly
	.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:
```