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>
#include <stdint.h>
#include <limits.h>

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

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

static uint64_t
factorial (
  uint64_t n
  )
{
  uint64_t res = 1;
  uint64_t i;

  for ( i = 2; i <= n; ++i )
  {
    res *= i;
  }

  return ( res );
}

/** Application main entry point. */
int
main (
  int     argc,
  char  * argv[ ]
  )
{
  int h[ CHAR_MAX + 1 ] = { 0 };
  int64_t res = 0, dv = 1;
  int dl = 0;
  int i, j;

  for ( ; ; )
  {
    const char ch = getchar ( );

    if ( ch == '\n' ) break ;

    ++h[ ch ];
  }

  qsort ( h, CHAR_MAX + 1, sizeof ( int ), compare );
  for ( i = 0; i <= CHAR_MAX; ++i )
  {
    if ( !( h[ i ] ) ) break ;
    if ( h[ i ] % 2 )
    {
      if ( dl )
      {
        puts ( "0" );
        goto CONTT;
      }

      --h[ i ];
      ++dl;
    }

    h[ i ] /= 2;
    res += h[ i ];
    dv *= factorial ( h[ i ] );
  }

  printf ( "%llu\n", factorial ( res ) / dv );
CONTT: ;

  return ( 0 );
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"0"
.LC1:
	.string	"%llu\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$64, %ecx
	subq	$528, %rsp
	.cfi_def_cfa_offset 544
	movq	%fs:40, %rax
	movq	%rax, 520(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	rep stosq
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L28:
	movsbq	%al, %rax
	addl	$1, (%rsp,%rax,4)
.L5:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	cmpb	$10, %al
	jne	.L28
	movl	$128, %esi
	movq	%rbp, %rdi
	movl	$4, %edx
	leaq	compare(%rip), %rcx
	call	qsort@PLT
	movq	%rbp, %rdi
	xorl	%r9d, %r9d
	xorl	%esi, %esi
	leaq	512(%rsp), %r10
	movl	$1, %r8d
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	.L6
	testb	$1, %al
	je	.L7
	testl	%r9d, %r9d
	jne	.L29
	subl	$1, %eax
	movl	$1, %r9d
.L7:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, (%rdi)
	movslq	%ecx, %rcx
	addq	%rcx, %rsi
	cmpq	$1, %rcx
	jbe	.L16
	movl	$2, %eax
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L11:
	imulq	%rax, %rdx
	addq	$1, %rax
	cmpq	%rax, %rcx
	jnb	.L11
	addq	$4, %rdi
	imulq	%rdx, %r8
	cmpq	%rdi, %r10
	jne	.L12
.L6:
	cmpq	$1, %rsi
	jbe	.L17
	movl	$2, %ecx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L14:
	imulq	%rcx, %rax
	addq	$1, %rcx
	cmpq	%rcx, %rsi
	jnb	.L14
.L13:
	xorl	%edx, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	divq	%r8
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L9:
	movq	520(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$528, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movl	$1, %edx
	addq	$4, %rdi
	imulq	%rdx, %r8
	cmpq	%rdi, %r10
	jne	.L12
	jmp	.L6
.L29:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L9
.L17:
	movl	$1, %eax
	jmp	.L13
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"0"
.LC1:
	.string	"%llu\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$64, %ecx
	subq	$528, %rsp
	.cfi_def_cfa_offset 544
	movq	%fs:40, %rax
	movq	%rax, 520(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	rep stosq
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L28:
	movsbq	%al, %rax
	addl	$1, (%rsp,%rax,4)
.L5:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	cmpb	$10, %al
	jne	.L28
	movl	$128, %esi
	movq	%rbp, %rdi
	movl	$4, %edx
	leaq	compare(%rip), %rcx
	call	qsort@PLT
	movq	%rbp, %rdi
	xorl	%r9d, %r9d
	xorl	%esi, %esi
	leaq	512(%rsp), %r10
	movl	$1, %r8d
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	.L6
	testb	$1, %al
	je	.L7
	testl	%r9d, %r9d
	jne	.L29
	subl	$1, %eax
	movl	$1, %r9d
.L7:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, (%rdi)
	movslq	%ecx, %rcx
	addq	%rcx, %rsi
	cmpq	$1, %rcx
	jbe	.L16
	movl	$2, %eax
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L11:
	imulq	%rax, %rdx
	addq	$1, %rax
	cmpq	%rax, %rcx
	jnb	.L11
	addq	$4, %rdi
	imulq	%rdx, %r8
	cmpq	%rdi, %r10
	jne	.L12
.L6:
	cmpq	$1, %rsi
	jbe	.L17
	movl	$2, %ecx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L14:
	imulq	%rcx, %rax
	addq	$1, %rcx
	cmpq	%rcx, %rsi
	jnb	.L14
.L13:
	xorl	%edx, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	divq	%r8
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L9:
	movq	520(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$528, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movl	$1, %edx
	addq	$4, %rdi
	imulq	%rdx, %r8
	cmpq	%rdi, %r10
	jne	.L12
	jmp	.L6
.L29:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L9
.L17:
	movl	$1, %eax
	jmp	.L13
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"0"
.LC1:
	.string	"%llu\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$64, %ecx
	subq	$528, %rsp
	.cfi_def_cfa_offset 544
	movq	%fs:40, %rax
	movq	%rax, 520(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	rep stosq
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L28:
	movsbq	%al, %rax
	addl	$1, (%rsp,%rax,4)
.L5:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	cmpb	$10, %al
	jne	.L28
	movl	$128, %esi
	movq	%rbp, %rdi
	movl	$4, %edx
	leaq	compare(%rip), %rcx
	call	qsort@PLT
	movq	%rbp, %rdi
	xorl	%r9d, %r9d
	xorl	%esi, %esi
	leaq	512(%rsp), %r10
	movl	$1, %r8d
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	.L6
	testb	$1, %al
	je	.L7
	testl	%r9d, %r9d
	jne	.L29
	subl	$1, %eax
	movl	$1, %r9d
.L7:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, (%rdi)
	movslq	%ecx, %rcx
	addq	%rcx, %rsi
	cmpq	$1, %rcx
	jbe	.L16
	movl	$2, %eax
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L11:
	imulq	%rax, %rdx
	addq	$1, %rax
	cmpq	%rax, %rcx
	jnb	.L11
	addq	$4, %rdi
	imulq	%rdx, %r8
	cmpq	%rdi, %r10
	jne	.L12
.L6:
	cmpq	$1, %rsi
	jbe	.L17
	movl	$2, %ecx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L14:
	imulq	%rcx, %rax
	addq	$1, %rcx
	cmpq	%rcx, %rsi
	jnb	.L14
.L13:
	xorl	%edx, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	divq	%r8
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L9:
	movq	520(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$528, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movl	$1, %edx
	addq	$4, %rdi
	imulq	%rdx, %r8
	cmpq	%rdi, %r10
	jne	.L12
	jmp	.L6
.L29:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L9
.L17:
	movl	$1, %eax
	jmp	.L13
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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>
#include <stdint.h>
#include <limits.h>

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

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

static uint64_t
factorial (
  uint64_t n
  )
{
  uint64_t res = 1;
  uint64_t i;

  for ( i = 2; i <= n; ++i )
  {
    res *= i;
  }

  return ( res );
}

/** Application main entry point. */
int
main (
  int     argc,
  char  * argv[ ]
  )
{
  int h[ CHAR_MAX + 1 ] = { 0 };
  int64_t res = 0, dv = 1;
  int dl = 0;
  int i, j;

  for ( ; ; )
  {
    const char ch = getchar ( );

    if ( ch == '\n' ) break ;

    ++h[ ch ];
  }

  qsort ( h, CHAR_MAX + 1, sizeof ( int ), compare );
  for ( i = 0; i <= CHAR_MAX; ++i )
  {
    if ( !( h[ i ] ) ) break ;
    if ( h[ i ] % 2 )
    {
      if ( dl )
      {
        puts ( "0" );
        goto CONTT;
      }

      --h[ i ];
      ++dl;
    }

    h[ i ] /= 2;
    res += h[ i ];
    dv *= factorial ( h[ i ] );
  }

  printf ( "%llu\n", factorial ( res ) / dv );
CONTT: ;

  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>
#include <stdint.h>
#include <limits.h>

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

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

static uint64_t
factorial (
  uint64_t n
  )
{
  uint64_t res = 1;
  uint64_t i;

  for ( i = 2; i <= n; ++i )
  {
    res *= i;
  }

  return ( res );
}

/** Application main entry point. */
int
main (
  int     argc,
  char  * argv[ ]
  )
{
  int h[ CHAR_MAX + 1 ] = { 0 };
  int64_t res = 0, dv = 1;
  int dl = 0;
  int i, j;

  for ( ; ; )
  {
    const char ch = getchar ( );

    if ( ch == '\n' ) break ;

    ++h[ ch ];
  }

  qsort ( h, CHAR_MAX + 1, sizeof ( int ), compare );
  for ( i = 0; i <= CHAR_MAX; ++i )
  {
    if ( !( h[ i ] ) ) break ;
    if ( h[ i ] % 2 )
    {
      if ( dl )
      {
        puts ( "0" );
        goto CONTT;
      }

      --h[ i ];
      ++dl;
    }

    h[ i ] /= 2;
    res += h[ i ];
    dv *= factorial ( h[ i ] );
  }

  printf ( "%llu\n", factorial ( res ) / dv );
CONTT: ;

  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:

ac
 cbcb
 cc
 abca
 bc
 aaca
 cb
 aacb
 ca
 bacb

0
 2
 1
 0
 0
 0
 0
 0
 0
 0

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>
#include <stdint.h>
#include <limits.h>

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

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

static uint64_t
factorial (
  uint64_t n
  )
{
  uint64_t res = 1;
  uint64_t i;

  for ( i = 2; i <= n; ++i )
  {
    res *= i;
  }

  return ( res );
}

/** Application main entry point. */
int
main (
  int     argc,
  char  * argv[ ]
  )
{
  int h[ CHAR_MAX + 1 ] = { 0 };
  int64_t res = 0, dv = 1;
  int dl = 0;
  int i, j;

  for ( ; ; )
  {
    const char ch = getchar ( );

    if ( ch == '\n' ) break ;

    ++h[ ch ];
  }

  qsort ( h, CHAR_MAX + 1, sizeof ( int ), compare );
  for ( i = 0; i <= CHAR_MAX; ++i )
  {
    if ( !( h[ i ] ) ) break ;
    if ( h[ i ] % 2 )
    {
      if ( dl )
      {
        puts ( "0" );
        goto CONTT;
      }

      --h[ i ];
      ++dl;
    }

    h[ i ] /= 2;
    res += h[ i ];
    dv *= factorial ( h[ i ] );
  }

  printf ( "%llu\n", factorial ( res ) / dv );
CONTT: ;

  return ( 0 );
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"0"
.LC1:
	.string	"%llu\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$64, %ecx
	subq	$528, %rsp
	.cfi_def_cfa_offset 544
	movq	%fs:40, %rax
	movq	%rax, 520(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	rep stosq
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L28:
	movsbq	%al, %rax
	addl	$1, (%rsp,%rax,4)
.L5:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	cmpb	$10, %al
	jne	.L28
	movl	$128, %esi
	movq	%rbp, %rdi
	movl	$4, %edx
	leaq	compare(%rip), %rcx
	call	qsort@PLT
	movq	%rbp, %rdi
	xorl	%r9d, %r9d
	xorl	%esi, %esi
	leaq	512(%rsp), %r10
	movl	$1, %r8d
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	.L6
	testb	$1, %al
	je	.L7
	testl	%r9d, %r9d
	jne	.L29
	subl	$1, %eax
	movl	$1, %r9d
.L7:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, (%rdi)
	movslq	%ecx, %rcx
	addq	%rcx, %rsi
	cmpq	$1, %rcx
	jbe	.L16
	movl	$2, %eax
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L11:
	imulq	%rax, %rdx
	addq	$1, %rax
	cmpq	%rax, %rcx
	jnb	.L11
	addq	$4, %rdi
	imulq	%rdx, %r8
	cmpq	%rdi, %r10
	jne	.L12
.L6:
	cmpq	$1, %rsi
	jbe	.L17
	movl	$2, %ecx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L14:
	imulq	%rcx, %rax
	addq	$1, %rcx
	cmpq	%rcx, %rsi
	jnb	.L14
.L13:
	xorl	%edx, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	divq	%r8
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L9:
	movq	520(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$528, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movl	$1, %edx
	addq	$4, %rdi
	imulq	%rdx, %r8
	cmpq	%rdi, %r10
	jne	.L12
	jmp	.L6
.L29:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L9
.L17:
	movl	$1, %eax
	jmp	.L13
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"0"
.LC1:
	.string	"%llu\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$64, %ecx
	subq	$528, %rsp
	.cfi_def_cfa_offset 544
	movq	%fs:40, %rax
	movq	%rax, 520(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	rep stosq
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L28:
	movsbq	%al, %rax
	addl	$1, (%rsp,%rax,4)
.L5:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	cmpb	$10, %al
	jne	.L28
	movl	$128, %esi
	movq	%rbp, %rdi
	movl	$4, %edx
	leaq	compare(%rip), %rcx
	call	qsort@PLT
	movq	%rbp, %rdi
	xorl	%r9d, %r9d
	xorl	%esi, %esi
	leaq	512(%rsp), %r10
	movl	$1, %r8d
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	.L6
	testb	$1, %al
	je	.L7
	testl	%r9d, %r9d
	jne	.L29
	subl	$1, %eax
	movl	$1, %r9d
.L7:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, (%rdi)
	movslq	%ecx, %rcx
	addq	%rcx, %rsi
	cmpq	$1, %rcx
	jbe	.L16
	movl	$2, %eax
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L11:
	imulq	%rax, %rdx
	addq	$1, %rax
	cmpq	%rax, %rcx
	jnb	.L11
	addq	$4, %rdi
	imulq	%rdx, %r8
	cmpq	%rdi, %r10
	jne	.L12
.L6:
	cmpq	$1, %rsi
	jbe	.L17
	movl	$2, %ecx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L14:
	imulq	%rcx, %rax
	addq	$1, %rcx
	cmpq	%rcx, %rsi
	jnb	.L14
.L13:
	xorl	%edx, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	divq	%r8
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L9:
	movq	520(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$528, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movl	$1, %edx
	addq	$4, %rdi
	imulq	%rdx, %r8
	cmpq	%rdi, %r10
	jne	.L12
	jmp	.L6
.L29:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L9
.L17:
	movl	$1, %eax
	jmp	.L13
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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:
```