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

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

int compar(const int *val1,const int *val2){
    return *val1-*val2;
}
int main(void){
    int map[4]={0},i,sign=0,sum=0;
    for(i=0;i<4;i++)
        scanf("%d",&map[i]);
    qsort(map,4,sizeof(int),(int(*)(const void *,const void *))compar);
    for(i=0;i<3;i++){
        if(map[i] != map[i+1]){
            sum++;
            sign=i;
        }
    }
    if((sign == 0 || sign == 1) && (sum == 0 || sum == 1))
        printf("yes\n");
    else
        printf("no\n");
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compar
	.type	compar, @function
compar:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compar, .-compar
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r13
	movaps	%xmm0, (%rsp)
	leaq	16(%rsp), %r12
	movq	%r13, %rbx
.L4:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L4
	leaq	compar(%rip), %rcx
	movl	$4, %edx
	movl	$4, %esi
	movq	%r13, %rdi
	call	qsort@PLT
	movl	4(%rsp), %eax
	movl	8(%rsp), %ecx
	xorl	%edx, %edx
	cmpl	%eax, (%rsp)
	setne	%dl
	cmpl	%ecx, %eax
	je	.L5
	addl	$1, %edx
	cmpl	%ecx, 12(%rsp)
	je	.L13
.L6:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L7:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	andl	$-2, %edx
	jne	.L6
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L7
.L5:
	cmpl	12(%rsp), %eax
	jne	.L6
	jmp	.L8
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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	compar
	.type	compar, @function
compar:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compar, .-compar
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r13
	movaps	%xmm0, (%rsp)
	leaq	16(%rsp), %r12
	movq	%r13, %rbx
.L4:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L4
	leaq	compar(%rip), %rcx
	movl	$4, %edx
	movl	$4, %esi
	movq	%r13, %rdi
	call	qsort@PLT
	movl	4(%rsp), %eax
	movl	8(%rsp), %ecx
	xorl	%edx, %edx
	cmpl	%eax, (%rsp)
	setne	%dl
	cmpl	%ecx, %eax
	je	.L5
	addl	$1, %edx
	cmpl	%ecx, 12(%rsp)
	je	.L13
.L6:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L7:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	andl	$-2, %edx
	jne	.L6
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L7
.L5:
	cmpl	12(%rsp), %eax
	jne	.L6
	jmp	.L8
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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	compar
	.type	compar, @function
compar:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compar, .-compar
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r13
	movaps	%xmm0, (%rsp)
	leaq	16(%rsp), %r12
	movq	%r13, %rbx
.L4:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L4
	leaq	compar(%rip), %rcx
	movl	$4, %edx
	movl	$4, %esi
	movq	%r13, %rdi
	call	qsort@PLT
	movl	4(%rsp), %eax
	movl	8(%rsp), %ecx
	xorl	%edx, %edx
	cmpl	%eax, (%rsp)
	setne	%dl
	cmpl	%ecx, %eax
	je	.L5
	addl	$1, %edx
	cmpl	%ecx, 12(%rsp)
	je	.L13
.L6:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L7:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	andl	$-2, %edx
	jne	.L6
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L7
.L5:
	cmpl	12(%rsp), %eax
	jne	.L6
	jmp	.L8
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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
#include <stdio.h>
#include <stdlib.h>

int compar(const int *val1,const int *val2){
    return *val1-*val2;
}
int main(void){
    int map[4]={0},i,sign=0,sum=0;
    for(i=0;i<4;i++)
        scanf("%d",&map[i]);
    qsort(map,4,sizeof(int),(int(*)(const void *,const void *))compar);
    for(i=0;i<3;i++){
        if(map[i] != map[i+1]){
            sum++;
            sign=i;
        }
    }
    if((sign == 0 || sign == 1) && (sum == 0 || sum == 1))
        printf("yes\n");
    else
        printf("no\n");
    return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

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

int compar(const int *val1,const int *val2){
    return *val1-*val2;
}
int main(void){
    int map[4]={0},i,sign=0,sum=0;
    for(i=0;i<4;i++)
        scanf("%d",&map[i]);
    qsort(map,4,sizeof(int),(int(*)(const void *,const void *))compar);
    for(i=0;i<3;i++){
        if(map[i] != map[i+1]){
            sum++;
            sign=i;
        }
    }
    if((sign == 0 || sign == 1) && (sum == 0 || sum == 1))
        printf("yes\n");
    else
        printf("no\n");
    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:

0 1 2 2
 0 0 2 2
 0 4 4 10
 2 0 1 2
 1 1 0 4
 -1 1 2 2
 1 4 4 10
 2 0 2 2
 1 1 0 6
 -1 4 4 10

no
 yes
 no
 no
 no
 no
 no
 yes
 no
 no

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

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

int compar(const int *val1,const int *val2){
    return *val1-*val2;
}
int main(void){
    int map[4]={0},i,sign=0,sum=0;
    for(i=0;i<4;i++)
        scanf("%d",&map[i]);
    qsort(map,4,sizeof(int),(int(*)(const void *,const void *))compar);
    for(i=0;i<3;i++){
        if(map[i] != map[i+1]){
            sum++;
            sign=i;
        }
    }
    if((sign == 0 || sign == 1) && (sum == 0 || sum == 1))
        printf("yes\n");
    else
        printf("no\n");
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compar
	.type	compar, @function
compar:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compar, .-compar
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r13
	movaps	%xmm0, (%rsp)
	leaq	16(%rsp), %r12
	movq	%r13, %rbx
.L4:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L4
	leaq	compar(%rip), %rcx
	movl	$4, %edx
	movl	$4, %esi
	movq	%r13, %rdi
	call	qsort@PLT
	movl	4(%rsp), %eax
	movl	8(%rsp), %ecx
	xorl	%edx, %edx
	cmpl	%eax, (%rsp)
	setne	%dl
	cmpl	%ecx, %eax
	je	.L5
	addl	$1, %edx
	cmpl	%ecx, 12(%rsp)
	je	.L13
.L6:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L7:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	andl	$-2, %edx
	jne	.L6
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L7
.L5:
	cmpl	12(%rsp), %eax
	jne	.L6
	jmp	.L8
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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	compar
	.type	compar, @function
compar:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compar, .-compar
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r13
	movaps	%xmm0, (%rsp)
	leaq	16(%rsp), %r12
	movq	%r13, %rbx
.L4:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L4
	leaq	compar(%rip), %rcx
	movl	$4, %edx
	movl	$4, %esi
	movq	%r13, %rdi
	call	qsort@PLT
	movl	4(%rsp), %eax
	movl	8(%rsp), %ecx
	xorl	%edx, %edx
	cmpl	%eax, (%rsp)
	setne	%dl
	cmpl	%ecx, %eax
	je	.L5
	addl	$1, %edx
	cmpl	%ecx, 12(%rsp)
	je	.L13
.L6:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L7:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	andl	$-2, %edx
	jne	.L6
.L8:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L7
.L5:
	cmpl	12(%rsp), %eax
	jne	.L6
	jmp	.L8
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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:
```