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

```c
/*
  AOJ 0582
  Title:
  @kankichi573
*/
#include <stdio.h>
// #include <stdlib.h>
// #include <string.h>
// #include <math.h>
// #include <float.h>
// #include <stdlib.h>


istriangle(int a,int b,int c)
{
        return(a+b>c && b+c>a && c+a>b);
}
isright(int a,int b,int c)
{
        return ((a*a+b*b==c*c)|| \
                (b*b+c*c==a*a)|| \
                (c*c+a*a==b*b));
}
iseikaku(int a,int b,int c)
{
        return ((a*a+b*b>c*c)&& \
                (b*b+c*c>a*a)&& \
                (c*c+a*a>b*b));
}
main()
{
        int tri,right,eikaku,donkaku,flag;
        int a,b,c;

        tri=right=eikaku=donkaku=flag=0;

        while(EOF!=scanf("%d %d %d",&a,&b,&c))
        {
                //printf("%d %d %d \n",a,b,c);
                if(flag==0 && istriangle(a,b,c))
                {
                        tri++;
                        if(isright(a,b,c))
                                right++;
                        else if (iseikaku(a,b,c))
                                eikaku++;
                        else
                                donkaku++;
                }
                else
                        flag=1;
        }
        printf("%d %d %d %d\n",tri,right,eikaku,donkaku);
        return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	istriangle
	.type	istriangle, @function
istriangle:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -12(%rbp)
	jge	.L2
	movl	-8(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -4(%rbp)
	jge	.L2
	movl	-12(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -8(%rbp)
	jge	.L2
	movl	$1, %eax
	jmp	.L4
.L2:
	movl	$0, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	istriangle, .-istriangle
	.globl	isright
	.type	isright, @function
isright:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	je	.L6
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	je	.L6
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	jne	.L7
.L6:
	movl	$1, %eax
	jmp	.L9
.L7:
	movl	$0, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	isright, .-isright
	.globl	iseikaku
	.type	iseikaku, @function
iseikaku:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	jle	.L11
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	jle	.L11
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	jle	.L11
	movl	$1, %eax
	jmp	.L13
.L11:
	movl	$0, %eax
.L13:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	iseikaku, .-iseikaku
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d %d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.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
	movl	$0, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L15
.L20:
	cmpl	$0, -12(%rbp)
	jne	.L16
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %ecx
	movl	-40(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	istriangle
	testl	%eax, %eax
	je	.L16
	addl	$1, -28(%rbp)
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %ecx
	movl	-40(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	isright
	testl	%eax, %eax
	je	.L17
	addl	$1, -24(%rbp)
	jmp	.L15
.L17:
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %ecx
	movl	-40(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	iseikaku
	testl	%eax, %eax
	je	.L19
	addl	$1, -20(%rbp)
	jmp	.L15
.L19:
	addl	$1, -16(%rbp)
	jmp	.L15
.L16:
	movl	$1, -12(%rbp)
.L15:
	leaq	-32(%rbp), %rcx
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L20
	movl	-16(%rbp), %esi
	movl	-20(%rbp), %ecx
	movl	-24(%rbp), %edx
	movl	-28(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	istriangle
	.type	istriangle, @function
istriangle:
.LFB23:
	.cfi_startproc
	endbr64
	leal	(%rdi,%rsi), %ecx
	xorl	%eax, %eax
	cmpl	%edx, %ecx
	jle	.L1
	leal	(%rsi,%rdx), %ecx
	cmpl	%edi, %ecx
	jle	.L1
	addl	%edx, %edi
	xorl	%eax, %eax
	cmpl	%esi, %edi
	setg	%al
.L1:
	ret
	.cfi_endproc
.LFE23:
	.size	istriangle, .-istriangle
	.p2align 4
	.globl	isright
	.type	isright, @function
isright:
.LFB24:
	.cfi_startproc
	endbr64
	imull	%edi, %edi
	movl	$1, %eax
	imull	%esi, %esi
	imull	%edx, %edx
	leal	(%rdi,%rsi), %ecx
	cmpl	%edx, %ecx
	je	.L6
	leal	(%rsi,%rdx), %ecx
	cmpl	%ecx, %edi
	je	.L6
	addl	%edx, %edi
	xorl	%eax, %eax
	cmpl	%esi, %edi
	sete	%al
.L6:
	ret
	.cfi_endproc
.LFE24:
	.size	isright, .-isright
	.p2align 4
	.globl	iseikaku
	.type	iseikaku, @function
iseikaku:
.LFB25:
	.cfi_startproc
	endbr64
	imull	%edi, %edi
	xorl	%eax, %eax
	imull	%esi, %esi
	imull	%edx, %edx
	leal	(%rdi,%rsi), %ecx
	cmpl	%edx, %ecx
	jle	.L10
	leal	(%rsi,%rdx), %ecx
	cmpl	%ecx, %edi
	jge	.L10
	addl	%edx, %edi
	xorl	%eax, %eax
	cmpl	%edi, %esi
	setl	%al
.L10:
	ret
	.cfi_endproc
.LFE25:
	.size	iseikaku, .-iseikaku
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d %d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%r15d, %r15d
	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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %r14
	leaq	32(%rsp), %r13
	movl	$0, 8(%rsp)
	movl	$0, 12(%rsp)
	leaq	28(%rsp), %r12
	movl	$0, 4(%rsp)
	.p2align 4,,10
	.p2align 3
.L15:
	xorl	%eax, %eax
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L31
	testl	%ebx, %ebx
	jne	.L15
	movl	32(%rsp), %ecx
	movl	28(%rsp), %edx
	movl	36(%rsp), %eax
	leal	(%rcx,%rdx), %esi
	cmpl	%esi, %eax
	jge	.L25
	leal	(%rax,%rcx), %esi
	cmpl	%esi, %edx
	jge	.L25
	leal	(%rax,%rdx), %esi
	cmpl	%esi, %ecx
	jge	.L25
	imull	%edx, %edx
	addl	$1, %r15d
	imull	%ecx, %ecx
	imull	%eax, %eax
	leal	(%rdx,%rcx), %esi
	cmpl	%eax, %esi
	je	.L17
	leal	(%rcx,%rax), %edi
	cmpl	%edi, %edx
	je	.L17
	leal	(%rdx,%rax), %r8d
	cmpl	%r8d, %ecx
	je	.L17
	cmpl	%edi, %edx
	setl	%dl
	cmpl	%eax, %esi
	setg	%al
	testb	%al, %dl
	je	.L26
	cmpl	%r8d, %ecx
	jl	.L19
.L26:
	addl	$1, 8(%rsp)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L25:
	movl	$1, %ebx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L31:
	movl	8(%rsp), %r9d
	movl	12(%rsp), %r8d
	xorl	%eax, %eax
	movl	%r15d, %edx
	movl	4(%rsp), %ecx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$56, %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
.L17:
	.cfi_restore_state
	addl	$1, 4(%rsp)
	jmp	.L15
.L19:
	addl	$1, 12(%rsp)
	jmp	.L15
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.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	istriangle
	.type	istriangle, @function
istriangle:
.LFB23:
	.cfi_startproc
	endbr64
	leal	(%rdi,%rsi), %ecx
	xorl	%eax, %eax
	cmpl	%edx, %ecx
	jle	.L1
	leal	(%rsi,%rdx), %ecx
	cmpl	%edi, %ecx
	jle	.L1
	addl	%edx, %edi
	xorl	%eax, %eax
	cmpl	%esi, %edi
	setg	%al
.L1:
	ret
	.cfi_endproc
.LFE23:
	.size	istriangle, .-istriangle
	.p2align 4
	.globl	isright
	.type	isright, @function
isright:
.LFB24:
	.cfi_startproc
	endbr64
	imull	%edi, %edi
	movl	$1, %eax
	imull	%esi, %esi
	imull	%edx, %edx
	leal	(%rdi,%rsi), %ecx
	cmpl	%edx, %ecx
	je	.L6
	leal	(%rsi,%rdx), %ecx
	cmpl	%ecx, %edi
	je	.L6
	addl	%edx, %edi
	xorl	%eax, %eax
	cmpl	%esi, %edi
	sete	%al
.L6:
	ret
	.cfi_endproc
.LFE24:
	.size	isright, .-isright
	.p2align 4
	.globl	iseikaku
	.type	iseikaku, @function
iseikaku:
.LFB25:
	.cfi_startproc
	endbr64
	imull	%edi, %edi
	xorl	%eax, %eax
	imull	%esi, %esi
	imull	%edx, %edx
	leal	(%rdi,%rsi), %ecx
	cmpl	%edx, %ecx
	jle	.L10
	leal	(%rsi,%rdx), %ecx
	cmpl	%ecx, %edi
	jge	.L10
	addl	%edx, %edi
	xorl	%eax, %eax
	cmpl	%edi, %esi
	setl	%al
.L10:
	ret
	.cfi_endproc
.LFE25:
	.size	iseikaku, .-iseikaku
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d %d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%r15d, %r15d
	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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %r14
	leaq	32(%rsp), %r13
	movl	$0, 8(%rsp)
	movl	$0, 12(%rsp)
	leaq	28(%rsp), %r12
	movl	$0, 4(%rsp)
	.p2align 4,,10
	.p2align 3
.L15:
	xorl	%eax, %eax
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L31
	testl	%ebx, %ebx
	jne	.L15
	movl	32(%rsp), %ecx
	movl	28(%rsp), %edx
	movl	36(%rsp), %eax
	leal	(%rcx,%rdx), %esi
	cmpl	%esi, %eax
	jge	.L25
	leal	(%rax,%rcx), %esi
	cmpl	%esi, %edx
	jge	.L25
	leal	(%rax,%rdx), %esi
	cmpl	%esi, %ecx
	jge	.L25
	imull	%edx, %edx
	addl	$1, %r15d
	imull	%ecx, %ecx
	imull	%eax, %eax
	leal	(%rdx,%rcx), %esi
	cmpl	%eax, %esi
	je	.L17
	leal	(%rcx,%rax), %edi
	cmpl	%edi, %edx
	je	.L17
	leal	(%rdx,%rax), %r8d
	cmpl	%r8d, %ecx
	je	.L17
	cmpl	%edi, %edx
	setl	%dl
	cmpl	%eax, %esi
	setg	%al
	testb	%al, %dl
	je	.L26
	cmpl	%r8d, %ecx
	jl	.L19
.L26:
	addl	$1, 8(%rsp)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L25:
	movl	$1, %ebx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L31:
	movl	8(%rsp), %r9d
	movl	12(%rsp), %r8d
	xorl	%eax, %eax
	movl	%r15d, %edx
	movl	4(%rsp), %ecx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$56, %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
.L17:
	.cfi_restore_state
	addl	$1, 4(%rsp)
	jmp	.L15
.L19:
	addl	$1, 12(%rsp)
	jmp	.L15
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.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:

/*
  AOJ 0582
  Title:
  @kankichi573
*/
#include <stdio.h>
// #include <stdlib.h>
// #include <string.h>
// #include <math.h>
// #include <float.h>
// #include <stdlib.h>


istriangle(int a,int b,int c)
{
        return(a+b>c && b+c>a && c+a>b);
}
isright(int a,int b,int c)
{
        return ((a*a+b*b==c*c)|| \
                (b*b+c*c==a*a)|| \
                (c*c+a*a==b*b));
}
iseikaku(int a,int b,int c)
{
        return ((a*a+b*b>c*c)&& \
                (b*b+c*c>a*a)&& \
                (c*c+a*a>b*b));
}
main()
{
        int tri,right,eikaku,donkaku,flag;
        int a,b,c;

        tri=right=eikaku=donkaku=flag=0;

        while(EOF!=scanf("%d %d %d",&a,&b,&c))
        {
                //printf("%d %d %d \n",a,b,c);
                if(flag==0 && istriangle(a,b,c))
                {
                        tri++;
                        if(isright(a,b,c))
                                right++;
                        else if (iseikaku(a,b,c))
                                eikaku++;
                        else
                                donkaku++;
                }
                else
                        flag=1;
        }
        printf("%d %d %d %d\n",tri,right,eikaku,donkaku);
        return(0);
}
3 4 5
2 1 2
6 3 4
1 1 1
1 2 3

4 1 2 1

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

```c
/*
  AOJ 0582
  Title:
  @kankichi573
*/
#include <stdio.h>
// #include <stdlib.h>
// #include <string.h>
// #include <math.h>
// #include <float.h>
// #include <stdlib.h>


istriangle(int a,int b,int c)
{
        return(a+b>c && b+c>a && c+a>b);
}
isright(int a,int b,int c)
{
        return ((a*a+b*b==c*c)|| \
                (b*b+c*c==a*a)|| \
                (c*c+a*a==b*b));
}
iseikaku(int a,int b,int c)
{
        return ((a*a+b*b>c*c)&& \
                (b*b+c*c>a*a)&& \
                (c*c+a*a>b*b));
}
main()
{
        int tri,right,eikaku,donkaku,flag;
        int a,b,c;

        tri=right=eikaku=donkaku=flag=0;

        while(EOF!=scanf("%d %d %d",&a,&b,&c))
        {
                //printf("%d %d %d \n",a,b,c);
                if(flag==0 && istriangle(a,b,c))
                {
                        tri++;
                        if(isright(a,b,c))
                                right++;
                        else if (iseikaku(a,b,c))
                                eikaku++;
                        else
                                donkaku++;
                }
                else
                        flag=1;
        }
        printf("%d %d %d %d\n",tri,right,eikaku,donkaku);
        return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	istriangle
	.type	istriangle, @function
istriangle:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -12(%rbp)
	jge	.L2
	movl	-8(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -4(%rbp)
	jge	.L2
	movl	-12(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -8(%rbp)
	jge	.L2
	movl	$1, %eax
	jmp	.L4
.L2:
	movl	$0, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	istriangle, .-istriangle
	.globl	isright
	.type	isright, @function
isright:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	je	.L6
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	je	.L6
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	jne	.L7
.L6:
	movl	$1, %eax
	jmp	.L9
.L7:
	movl	$0, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	isright, .-isright
	.globl	iseikaku
	.type	iseikaku, @function
iseikaku:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	jle	.L11
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	jle	.L11
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	jle	.L11
	movl	$1, %eax
	jmp	.L13
.L11:
	movl	$0, %eax
.L13:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	iseikaku, .-iseikaku
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d %d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.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
	movl	$0, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L15
.L20:
	cmpl	$0, -12(%rbp)
	jne	.L16
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %ecx
	movl	-40(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	istriangle
	testl	%eax, %eax
	je	.L16
	addl	$1, -28(%rbp)
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %ecx
	movl	-40(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	isright
	testl	%eax, %eax
	je	.L17
	addl	$1, -24(%rbp)
	jmp	.L15
.L17:
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %ecx
	movl	-40(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	iseikaku
	testl	%eax, %eax
	je	.L19
	addl	$1, -20(%rbp)
	jmp	.L15
.L19:
	addl	$1, -16(%rbp)
	jmp	.L15
.L16:
	movl	$1, -12(%rbp)
.L15:
	leaq	-32(%rbp), %rcx
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L20
	movl	-16(%rbp), %esi
	movl	-20(%rbp), %ecx
	movl	-24(%rbp), %edx
	movl	-28(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	istriangle
	.type	istriangle, @function
istriangle:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -12(%rbp)
	jge	.L2
	movl	-8(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -4(%rbp)
	jge	.L2
	movl	-12(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -8(%rbp)
	jge	.L2
	movl	$1, %eax
	jmp	.L4
.L2:
	movl	$0, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	istriangle, .-istriangle
	.globl	isright
	.type	isright, @function
isright:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	je	.L6
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	je	.L6
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	jne	.L7
.L6:
	movl	$1, %eax
	jmp	.L9
.L7:
	movl	$0, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	isright, .-isright
	.globl	iseikaku
	.type	iseikaku, @function
iseikaku:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	jle	.L11
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	jle	.L11
	movl	-12(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, %edx
	jle	.L11
	movl	$1, %eax
	jmp	.L13
.L11:
	movl	$0, %eax
.L13:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	iseikaku, .-iseikaku
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d %d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.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
	movl	$0, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L15
.L20:
	cmpl	$0, -12(%rbp)
	jne	.L16
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %ecx
	movl	-40(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	istriangle
	testl	%eax, %eax
	je	.L16
	addl	$1, -28(%rbp)
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %ecx
	movl	-40(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	isright
	testl	%eax, %eax
	je	.L17
	addl	$1, -24(%rbp)
	jmp	.L15
.L17:
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %ecx
	movl	-40(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	iseikaku
	testl	%eax, %eax
	je	.L19
	addl	$1, -20(%rbp)
	jmp	.L15
.L19:
	addl	$1, -16(%rbp)
	jmp	.L15
.L16:
	movl	$1, -12(%rbp)
.L15:
	leaq	-32(%rbp), %rcx
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L20
	movl	-16(%rbp), %esi
	movl	-20(%rbp), %ecx
	movl	-24(%rbp), %edx
	movl	-28(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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:
