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>
int main()
{
    int AB,BC,CA,A;
    scanf("%d%d%d",&AB,&BC,&CA);
    int a,b,c;
    a=AB*AB;
    b=BC*BC;
    c=CA*CA;
    if(a==(b+c))
    {
        A=.5*BC*CA;
        printf("%d\n",A);

    }
    if(c==(a+b))
    {
        A=.5*BC*AB;
        printf("%d\n",A);
    }
    if(b==(a+c))
    {
        A=.5*AB*CA;
        printf("%d\n",A);
    }
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %edx
	movl	20(%rsp), %eax
	movl	12(%rsp), %ebx
	movl	%edx, %r12d
	movl	%eax, %ebp
	imull	%edx, %r12d
	imull	%eax, %ebp
	imull	%ebx, %ebx
	leal	(%r12,%rbp), %ecx
	cmpl	%ebx, %ecx
	je	.L8
.L2:
	leal	(%rbx,%r12), %eax
	cmpl	%ebp, %eax
	je	.L9
.L3:
	addl	%ebp, %ebx
	cmpl	%r12d, %ebx
	je	.L10
.L4:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	cvtsi2sdl	%edx, %xmm0
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC2(%rip), %rsi
	cvtsi2sdl	%eax, %xmm1
	xorl	%eax, %eax
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	jmp	.L2
.L10:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	xorl	%eax, %eax
	cvtsi2sdl	12(%rsp), %xmm0
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC2(%rip), %rsi
	cvtsi2sdl	20(%rsp), %xmm1
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	jmp	.L4
.L9:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	xorl	%eax, %eax
	cvtsi2sdl	16(%rsp), %xmm0
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC2(%rip), %rsi
	cvtsi2sdl	12(%rsp), %xmm1
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	jmp	.L3
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %edx
	movl	20(%rsp), %eax
	movl	12(%rsp), %ebx
	movl	%edx, %r12d
	movl	%eax, %ebp
	imull	%edx, %r12d
	imull	%eax, %ebp
	imull	%ebx, %ebx
	leal	(%r12,%rbp), %ecx
	cmpl	%ebx, %ecx
	je	.L8
.L2:
	leal	(%rbx,%r12), %eax
	cmpl	%ebp, %eax
	je	.L9
.L3:
	addl	%ebp, %ebx
	cmpl	%r12d, %ebx
	je	.L10
.L4:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	cvtsi2sdl	%edx, %xmm0
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC2(%rip), %rsi
	cvtsi2sdl	%eax, %xmm1
	xorl	%eax, %eax
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	jmp	.L2
.L10:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	xorl	%eax, %eax
	cvtsi2sdl	12(%rsp), %xmm0
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC2(%rip), %rsi
	cvtsi2sdl	20(%rsp), %xmm1
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	jmp	.L4
.L9:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	xorl	%eax, %eax
	cvtsi2sdl	16(%rsp), %xmm0
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC2(%rip), %rsi
	cvtsi2sdl	12(%rsp), %xmm1
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	jmp	.L3
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %edx
	movl	20(%rsp), %eax
	movl	12(%rsp), %ebx
	movl	%edx, %r12d
	movl	%eax, %ebp
	imull	%edx, %r12d
	imull	%eax, %ebp
	imull	%ebx, %ebx
	leal	(%r12,%rbp), %ecx
	cmpl	%ebx, %ecx
	je	.L8
.L2:
	leal	(%rbx,%r12), %eax
	cmpl	%ebp, %eax
	je	.L9
.L3:
	addl	%ebp, %ebx
	cmpl	%r12d, %ebx
	je	.L10
.L4:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	cvtsi2sdl	%edx, %xmm0
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC2(%rip), %rsi
	cvtsi2sdl	%eax, %xmm1
	xorl	%eax, %eax
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	jmp	.L2
.L10:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	xorl	%eax, %eax
	cvtsi2sdl	12(%rsp), %xmm0
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC2(%rip), %rsi
	cvtsi2sdl	20(%rsp), %xmm1
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	jmp	.L4
.L9:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	xorl	%eax, %eax
	cvtsi2sdl	16(%rsp), %xmm0
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC2(%rip), %rsi
	cvtsi2sdl	12(%rsp), %xmm1
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	jmp	.L3
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.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>
int main()
{
    int AB,BC,CA,A;
    scanf("%d%d%d",&AB,&BC,&CA);
    int a,b,c;
    a=AB*AB;
    b=BC*BC;
    c=CA*CA;
    if(a==(b+c))
    {
        A=.5*BC*CA;
        printf("%d\n",A);

    }
    if(c==(a+b))
    {
        A=.5*BC*AB;
        printf("%d\n",A);
    }
    if(b==(a+c))
    {
        A=.5*AB*CA;
        printf("%d\n",A);
    }
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main()
{
    int AB,BC,CA,A;
    scanf("%d%d%d",&AB,&BC,&CA);
    int a,b,c;
    a=AB*AB;
    b=BC*BC;
    c=CA*CA;
    if(a==(b+c))
    {
        A=.5*BC*CA;
        printf("%d\n",A);

    }
    if(c==(a+b))
    {
        A=.5*BC*AB;
        printf("%d\n",A);
    }
    if(b==(a+c))
    {
        A=.5*AB*CA;
        printf("%d\n",A);
    }
}
```

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:

3 3 5
 45 38 53
 5 18 13
 0 3 5
 45 30 53
 5 24 13
 45 49 53
 5 13 13
 18 49 53
 1 10 1

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>
int main()
{
    int AB,BC,CA,A;
    scanf("%d%d%d",&AB,&BC,&CA);
    int a,b,c;
    a=AB*AB;
    b=BC*BC;
    c=CA*CA;
    if(a==(b+c))
    {
        A=.5*BC*CA;
        printf("%d\n",A);

    }
    if(c==(a+b))
    {
        A=.5*BC*AB;
        printf("%d\n",A);
    }
    if(b==(a+c))
    {
        A=.5*AB*CA;
        printf("%d\n",A);
    }
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %edx
	movl	20(%rsp), %eax
	movl	12(%rsp), %ebx
	movl	%edx, %r12d
	movl	%eax, %ebp
	imull	%edx, %r12d
	imull	%eax, %ebp
	imull	%ebx, %ebx
	leal	(%r12,%rbp), %ecx
	cmpl	%ebx, %ecx
	je	.L8
.L2:
	leal	(%rbx,%r12), %eax
	cmpl	%ebp, %eax
	je	.L9
.L3:
	addl	%ebp, %ebx
	cmpl	%r12d, %ebx
	je	.L10
.L4:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	cvtsi2sdl	%edx, %xmm0
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC2(%rip), %rsi
	cvtsi2sdl	%eax, %xmm1
	xorl	%eax, %eax
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	jmp	.L2
.L10:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	xorl	%eax, %eax
	cvtsi2sdl	12(%rsp), %xmm0
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC2(%rip), %rsi
	cvtsi2sdl	20(%rsp), %xmm1
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	jmp	.L4
.L9:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	xorl	%eax, %eax
	cvtsi2sdl	16(%rsp), %xmm0
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC2(%rip), %rsi
	cvtsi2sdl	12(%rsp), %xmm1
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	jmp	.L3
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %edx
	movl	20(%rsp), %eax
	movl	12(%rsp), %ebx
	movl	%edx, %r12d
	movl	%eax, %ebp
	imull	%edx, %r12d
	imull	%eax, %ebp
	imull	%ebx, %ebx
	leal	(%r12,%rbp), %ecx
	cmpl	%ebx, %ecx
	je	.L8
.L2:
	leal	(%rbx,%r12), %eax
	cmpl	%ebp, %eax
	je	.L9
.L3:
	addl	%ebp, %ebx
	cmpl	%r12d, %ebx
	je	.L10
.L4:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	cvtsi2sdl	%edx, %xmm0
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC2(%rip), %rsi
	cvtsi2sdl	%eax, %xmm1
	xorl	%eax, %eax
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	jmp	.L2
.L10:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	xorl	%eax, %eax
	cvtsi2sdl	12(%rsp), %xmm0
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC2(%rip), %rsi
	cvtsi2sdl	20(%rsp), %xmm1
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	jmp	.L4
.L9:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	xorl	%eax, %eax
	cvtsi2sdl	16(%rsp), %xmm0
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC2(%rip), %rsi
	cvtsi2sdl	12(%rsp), %xmm1
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %edx
	call	__printf_chk@PLT
	jmp	.L3
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.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:
```