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

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

#define INT(X) \
  ( *( (const int *)(X) ) )
#define SQ(X) \
  ( (X) * (X) )

static int
compare (
  const void *a,
  const void *b
  )
{
  return ( INT( a ) - INT( b ) );
}

int
main (
  int   argc,
  char *argv[ ]
  )
{
  int r[ 3 ] = { 0 };
  int n;

  for ( n = 0; ; ++n )
  {
    int d[ 3 ];

    scanf ( "%d%d%d", &d[ 0 ], &d[ 1 ], &d[ 2 ] );
    qsort ( d, 3, sizeof ( int ), compare );
    if ( d[ 0 ] + d[ 1 ] <= d[ 2 ] ) break ;

    if ( SQ( d[ 0 ] ) + SQ( d[ 1 ] ) == SQ( d[ 2 ] ) )
      ++r[ 0 ];
    else if ( SQ( d[ 0 ] ) + SQ( d[ 1 ] ) > SQ( d[ 2 ] ) )
      ++r[ 1 ];
    else
      ++r[ 2 ];
  }
  
  printf ( "%d %d %d %d\n", n, r[ 0 ], r[ 1 ], r[ 2 ] );

  return ( EXIT_SUCCESS );
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.type	compare, @function
compare:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d %d %d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movl	%edi, -52(%rbp)
	movq	%rsi, -64(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -36(%rbp)
.L9:
	leaq	-20(%rbp), %rax
	leaq	8(%rax), %rcx
	leaq	-20(%rbp), %rax
	leaq	4(%rax), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-20(%rbp), %rax
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movl	$3, %esi
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L4
	movl	-24(%rbp), %esi
	movl	-28(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-36(%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	.L10
	jmp	.L11
.L4:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-16(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %edx
	movl	-12(%rbp), %eax
	imull	%edx, %eax
	cmpl	%eax, %ecx
	jne	.L6
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L7
.L6:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-16(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %edx
	movl	-12(%rbp), %eax
	imull	%edx, %eax
	cmpl	%eax, %ecx
	jle	.L8
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -24(%rbp)
.L7:
	addl	$1, -36(%rbp)
	jmp	.L9
.L11:
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.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:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	compare(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rbx
	movl	$0, 12(%rsp)
	leaq	36(%rsp), %r15
	movl	$0, 8(%rsp)
	leaq	32(%rsp), %r14
	movl	$0, 4(%rsp)
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	jle	.L7
	addl	$1, 8(%rsp)
.L6:
	addl	$1, %r12d
.L8:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbp, %rcx
	movl	$4, %edx
	movq	%rbx, %rdi
	movl	$3, %esi
	call	qsort@PLT
	movl	28(%rsp), %eax
	movl	32(%rsp), %ecx
	movl	36(%rsp), %edx
	leal	(%rax,%rcx), %esi
	cmpl	%edx, %esi
	jle	.L4
	imull	%eax, %eax
	imull	%ecx, %ecx
	imull	%edx, %edx
	addl	%ecx, %eax
	cmpl	%edx, %eax
	jne	.L5
	addl	$1, 4(%rsp)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, 12(%rsp)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	movl	12(%rsp), %r9d
	movl	8(%rsp), %r8d
	xorl	%eax, %eax
	movl	%r12d, %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	.L11
	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
.L11:
	.cfi_restore_state
	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
	.file	"temp.c"
	.text
	.p2align 4
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.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:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	compare(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rbx
	movl	$0, 12(%rsp)
	leaq	36(%rsp), %r15
	movl	$0, 8(%rsp)
	leaq	32(%rsp), %r14
	movl	$0, 4(%rsp)
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	jle	.L7
	addl	$1, 8(%rsp)
.L6:
	addl	$1, %r12d
.L8:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbp, %rcx
	movl	$4, %edx
	movq	%rbx, %rdi
	movl	$3, %esi
	call	qsort@PLT
	movl	28(%rsp), %eax
	movl	32(%rsp), %ecx
	movl	36(%rsp), %edx
	leal	(%rax,%rcx), %esi
	cmpl	%edx, %esi
	jle	.L4
	imull	%eax, %eax
	imull	%ecx, %ecx
	imull	%edx, %edx
	addl	%ecx, %eax
	cmpl	%edx, %eax
	jne	.L5
	addl	$1, 4(%rsp)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, 12(%rsp)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	movl	12(%rsp), %r9d
	movl	8(%rsp), %r8d
	xorl	%eax, %eax
	movl	%r12d, %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	.L11
	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
.L11:
	.cfi_restore_state
	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:

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

#define INT(X) \
  ( *( (const int *)(X) ) )
#define SQ(X) \
  ( (X) * (X) )

static int
compare (
  const void *a,
  const void *b
  )
{
  return ( INT( a ) - INT( b ) );
}

int
main (
  int   argc,
  char *argv[ ]
  )
{
  int r[ 3 ] = { 0 };
  int n;

  for ( n = 0; ; ++n )
  {
    int d[ 3 ];

    scanf ( "%d%d%d", &d[ 0 ], &d[ 1 ], &d[ 2 ] );
    qsort ( d, 3, sizeof ( int ), compare );
    if ( d[ 0 ] + d[ 1 ] <= d[ 2 ] ) break ;

    if ( SQ( d[ 0 ] ) + SQ( d[ 1 ] ) == SQ( d[ 2 ] ) )
      ++r[ 0 ];
    else if ( SQ( d[ 0 ] ) + SQ( d[ 1 ] ) > SQ( d[ 2 ] ) )
      ++r[ 1 ];
    else
      ++r[ 2 ];
  }
  
  printf ( "%d %d %d %d\n", n, r[ 0 ], r[ 1 ], r[ 2 ] );

  return ( EXIT_SUCCESS );
}
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
#include <stdio.h>
#include <stdlib.h>

#define INT(X) \
  ( *( (const int *)(X) ) )
#define SQ(X) \
  ( (X) * (X) )

static int
compare (
  const void *a,
  const void *b
  )
{
  return ( INT( a ) - INT( b ) );
}

int
main (
  int   argc,
  char *argv[ ]
  )
{
  int r[ 3 ] = { 0 };
  int n;

  for ( n = 0; ; ++n )
  {
    int d[ 3 ];

    scanf ( "%d%d%d", &d[ 0 ], &d[ 1 ], &d[ 2 ] );
    qsort ( d, 3, sizeof ( int ), compare );
    if ( d[ 0 ] + d[ 1 ] <= d[ 2 ] ) break ;

    if ( SQ( d[ 0 ] ) + SQ( d[ 1 ] ) == SQ( d[ 2 ] ) )
      ++r[ 0 ];
    else if ( SQ( d[ 0 ] ) + SQ( d[ 1 ] ) > SQ( d[ 2 ] ) )
      ++r[ 1 ];
    else
      ++r[ 2 ];
  }
  
  printf ( "%d %d %d %d\n", n, r[ 0 ], r[ 1 ], r[ 2 ] );

  return ( EXIT_SUCCESS );
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.type	compare, @function
compare:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d %d %d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movl	%edi, -52(%rbp)
	movq	%rsi, -64(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -36(%rbp)
.L9:
	leaq	-20(%rbp), %rax
	leaq	8(%rax), %rcx
	leaq	-20(%rbp), %rax
	leaq	4(%rax), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-20(%rbp), %rax
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movl	$3, %esi
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L4
	movl	-24(%rbp), %esi
	movl	-28(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-36(%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	.L10
	jmp	.L11
.L4:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-16(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %edx
	movl	-12(%rbp), %eax
	imull	%edx, %eax
	cmpl	%eax, %ecx
	jne	.L6
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L7
.L6:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-16(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %edx
	movl	-12(%rbp), %eax
	imull	%edx, %eax
	cmpl	%eax, %ecx
	jle	.L8
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -24(%rbp)
.L7:
	addl	$1, -36(%rbp)
	jmp	.L9
.L11:
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.type	compare, @function
compare:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d %d %d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movl	%edi, -52(%rbp)
	movq	%rsi, -64(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -36(%rbp)
.L9:
	leaq	-20(%rbp), %rax
	leaq	8(%rax), %rcx
	leaq	-20(%rbp), %rax
	leaq	4(%rax), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-20(%rbp), %rax
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movl	$3, %esi
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L4
	movl	-24(%rbp), %esi
	movl	-28(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-36(%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	.L10
	jmp	.L11
.L4:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-16(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %edx
	movl	-12(%rbp), %eax
	imull	%edx, %eax
	cmpl	%eax, %ecx
	jne	.L6
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L7
.L6:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-16(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %edx
	movl	-12(%rbp), %eax
	imull	%edx, %eax
	cmpl	%eax, %ecx
	jle	.L8
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -24(%rbp)
.L7:
	addl	$1, -36(%rbp)
	jmp	.L9
.L11:
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
