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

```c
/*
  AOJ #3002
  title:Factrization
  @kankichi573
  2017/12/14 WA 35/37
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define max(x,y) (((x)>(y))?(x):(y))
char S[1000];
int  k[6];
int  jisuu;
int  insuu[6];

char delim[3]="+-";

int find_sign(char s[])
{
  char *p;
  int ret;

  for(p=s;*p;p++)
    if(*p=='+')
      {
        ret=1;
        goto END;
      }
    else
      {
        ret=-1;
        goto END;
      }
  ret=0;
 END:
  printf("f_s %s [%d]\n",s,ret);
}


int parse_monomial(char s[])
{ 
  char *p1,*p2;
  int a,b,ji;

  //printf("Mono=%s\n",s);
  
  
  p1=strchr(s,'x');
  p2=strchr(s,'^');

  
  if(p1 && p2 && p1!=s)
    {
      sscanf(s,"%dx^%d",&a,&b);
      ji=b;
      k[b]=a;
    }
  
  else if(p2 && p1==s)
    {
      sscanf(s,"x^%d",&b);
      ji=b;
      k[b]=1;
    }
    
  else if(p1 && !p2 && p1!=s)
    {
      if( 0==strcmp("+x",s))
        {
          ji=1;
          k[1]=1;
        }
      else if(0==strcmp("-x",s))
        {
          ji=1;
          k[1]=-1;
        }
      else
        {
          sscanf(s,"%dx",&a);
          ji=1;
          k[1]=a;
        }
    }

  else if(!p1 && !p2)
    {
      sscanf(s,"%d",&a);
      ji=0;
      k[0]=a;
    }
  return(ji);
}




int parse(char s[],int k[])
{
  char *p,*q,buf[100];
  int jisuu,ji,t;
  //printf("%s:\n",s);
  ji=0;
  t=0;
  p=q=s;
  while(1)
    {
      if(t==1)
        p++;
      while(*p!='+' && *p!='-' && *p)
        p++;
      memset(buf,0,sizeof(buf));
      strncpy(buf,q,p-q);
      jisuu=parse_monomial(buf);
      ji=max(ji,jisuu);
      q=p;
      t=1;
      if(!*p)
        return(ji);
    }
}
void dump()
{
  int i;
  for(i=5;i>=0;i--)
    printf("[%d],%d\n",i,k[i]);
}

long long calc_poly(int k[],int n)
{
  long long ret;
  ret =  k[5]*n*n*n*n*n;
  ret += k[4]*n*n*n*n;
  ret += k[3]*n*n*n;
  ret += k[2]*n*n;
  ret += k[1]*n;
  ret += k[0];
  return(ret);
}

int comp( const void * a , const void * b ) {

  if( *( int * )a < *( int * )b ) {
    return 1;
  }
  else
    if( *( int * )a == *( int * )b ) {
      return 0;
    }
  return -1;
}

void dump2()
{
  int i;
  for(i=0;i<jisuu;i++)
    printf("|%d\n",insuu[i]);
}

int main()
{
  int i,p;
  long long llret,llret2;

  scanf("%s",S);
  jisuu=parse(S,k);
  //dump();
  for(i=1,p=0;i<=200000;i++)
    if((k[0] % i)==0)
      {
        llret=calc_poly(k,i);
        llret2=calc_poly(k,-i);
        if(0==llret)
          insuu[p++]=i;
        if(0==llret2)
          insuu[p++]=-i;
      }

  qsort(insuu,jisuu,sizeof(int),comp);
  for(i=0;i<jisuu;i++)
    if(insuu[i]>0)
      printf("(x-%d)",insuu[i]);
    else
      printf("(x+%d)",-insuu[i]);
  printf("\n");
  
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 1000
S:
	.zero	1000
	.globl	k
	.align 16
	.type	k, @object
	.size	k, 24
k:
	.zero	24
	.globl	jisuu
	.align 4
	.type	jisuu, @object
	.size	jisuu, 4
jisuu:
	.zero	4
	.globl	insuu
	.align 16
	.type	insuu, @object
	.size	insuu, 24
insuu:
	.zero	24
	.globl	delim
	.data
	.type	delim, @object
	.size	delim, 3
delim:
	.string	"+-"
	.section	.rodata
.LC0:
	.string	"f_s %s [%d]\n"
	.text
	.globl	find_sign
	.type	find_sign, @function
find_sign:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -8(%rbp)
	nop
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L6
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$43, %al
	jne	.L3
	movl	$1, -12(%rbp)
	jmp	.L4
.L3:
	movl	$-1, -12(%rbp)
	jmp	.L4
.L6:
	movl	$0, -12(%rbp)
.L4:
	movl	-12(%rbp), %edx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	find_sign, .-find_sign
	.section	.rodata
.LC1:
	.string	"%dx^%d"
.LC2:
	.string	"x^%d"
.LC3:
	.string	"+x"
.LC4:
	.string	"-x"
.LC5:
	.string	"%dx"
.LC6:
	.string	"%d"
	.text
	.globl	parse_monomial
	.type	parse_monomial, @function
parse_monomial:
.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
	movq	%rdi, -56(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-56(%rbp), %rax
	movl	$120, %esi
	movq	%rax, %rdi
	call	strchr@PLT
	movq	%rax, -24(%rbp)
	movq	-56(%rbp), %rax
	movl	$94, %esi
	movq	%rax, %rdi
	call	strchr@PLT
	movq	%rax, -16(%rbp)
	cmpq	$0, -24(%rbp)
	je	.L8
	cmpq	$0, -16(%rbp)
	je	.L8
	movq	-24(%rbp), %rax
	cmpq	-56(%rbp), %rax
	je	.L8
	leaq	-32(%rbp), %rcx
	leaq	-36(%rbp), %rdx
	movq	-56(%rbp), %rax
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-32(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	k(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	jmp	.L9
.L8:
	cmpq	$0, -16(%rbp)
	je	.L10
	movq	-24(%rbp), %rax
	cmpq	-56(%rbp), %rax
	jne	.L10
	leaq	-32(%rbp), %rdx
	movq	-56(%rbp), %rax
	leaq	.LC2(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-32(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	k(%rip), %rax
	movl	$1, (%rdx,%rax)
	jmp	.L9
.L10:
	cmpq	$0, -24(%rbp)
	je	.L11
	cmpq	$0, -16(%rbp)
	jne	.L11
	movq	-24(%rbp), %rax
	cmpq	-56(%rbp), %rax
	je	.L11
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L12
	movl	$1, -28(%rbp)
	movl	$1, 4+k(%rip)
	jmp	.L9
.L12:
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L14
	movl	$1, -28(%rbp)
	movl	$-1, 4+k(%rip)
	jmp	.L9
.L14:
	leaq	-36(%rbp), %rdx
	movq	-56(%rbp), %rax
	leaq	.LC5(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$1, -28(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, 4+k(%rip)
	jmp	.L9
.L11:
	cmpq	$0, -24(%rbp)
	jne	.L9
	cmpq	$0, -16(%rbp)
	jne	.L9
	leaq	-36(%rbp), %rdx
	movq	-56(%rbp), %rax
	leaq	.LC6(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$0, -28(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, k(%rip)
.L9:
	movl	-28(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	parse_monomial, .-parse_monomial
	.globl	parse
	.type	parse, @function
parse:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$160, %rsp
	movq	%rdi, -152(%rbp)
	movq	%rsi, -160(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -140(%rbp)
	movl	$0, -136(%rbp)
	movq	-152(%rbp), %rax
	movq	%rax, -120(%rbp)
	movq	-120(%rbp), %rax
	movq	%rax, -128(%rbp)
.L24:
	cmpl	$1, -136(%rbp)
	jne	.L19
	addq	$1, -128(%rbp)
	jmp	.L19
.L21:
	addq	$1, -128(%rbp)
.L19:
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$43, %al
	je	.L20
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$45, %al
	je	.L20
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L21
.L20:
	leaq	-112(%rbp), %rax
	movl	$100, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	-128(%rbp), %rax
	subq	-120(%rbp), %rax
	movq	%rax, %rdx
	movq	-120(%rbp), %rcx
	leaq	-112(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strncpy@PLT
	leaq	-112(%rbp), %rax
	movq	%rax, %rdi
	call	parse_monomial
	movl	%eax, -132(%rbp)
	movl	-140(%rbp), %edx
	movl	-132(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -140(%rbp)
	movq	-128(%rbp), %rax
	movq	%rax, -120(%rbp)
	movl	$1, -136(%rbp)
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L24
	movl	-140(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	parse, .-parse
	.section	.rodata
.LC7:
	.string	"[%d],%d\n"
	.text
	.globl	dump
	.type	dump, @function
dump:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$5, -4(%rbp)
	jmp	.L28
.L29:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	k(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	subl	$1, -4(%rbp)
.L28:
	cmpl	$0, -4(%rbp)
	jns	.L29
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	dump, .-dump
	.globl	calc_poly
	.type	calc_poly, @function
calc_poly:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movq	-24(%rbp), %rax
	addq	$20, %rax
	movl	(%rax), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	cltq
	movq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	addq	$16, %rax
	movl	(%rax), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	addq	$12, %rax
	movl	(%rax), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	addq	$8, %rax
	movl	(%rax), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	addq	$4, %rax
	movl	(%rax), %eax
	imull	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	cltq
	addq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	calc_poly, .-calc_poly
	.globl	comp
	.type	comp, @function
comp:
.LFB11:
	.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), %eax
	cmpl	%eax, %edx
	jge	.L33
	movl	$1, %eax
	jmp	.L34
.L33:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L35
	movl	$0, %eax
	jmp	.L34
.L35:
	movl	$-1, %eax
.L34:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	comp, .-comp
	.section	.rodata
.LC8:
	.string	"|%d\n"
	.text
	.globl	dump2
	.type	dump2, @function
dump2:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -4(%rbp)
	jmp	.L37
.L38:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	insuu(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L37:
	movl	jisuu(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L38
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	dump2, .-dump2
	.section	.rodata
.LC9:
	.string	"%s"
.LC10:
	.string	"(x-%d)"
.LC11:
	.string	"(x+%d)"
	.text
	.globl	main
	.type	main, @function
main:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	leaq	S(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	k(%rip), %rax
	movq	%rax, %rsi
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	call	parse
	movl	%eax, jisuu(%rip)
	movl	$1, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L40
.L43:
	movl	k(%rip), %eax
	cltd
	idivl	-24(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L41
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	k(%rip), %rax
	movq	%rax, %rdi
	call	calc_poly
	movq	%rax, -16(%rbp)
	movl	-24(%rbp), %eax
	negl	%eax
	movl	%eax, %esi
	leaq	k(%rip), %rax
	movq	%rax, %rdi
	call	calc_poly
	movq	%rax, -8(%rbp)
	cmpq	$0, -16(%rbp)
	jne	.L42
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -20(%rbp)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	insuu(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L42:
	cmpq	$0, -8(%rbp)
	jne	.L41
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -20(%rbp)
	movl	-24(%rbp), %edx
	movl	%edx, %ecx
	negl	%ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	insuu(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L41:
	addl	$1, -24(%rbp)
.L40:
	cmpl	$200000, -24(%rbp)
	jle	.L43
	movl	jisuu(%rip), %eax
	cltq
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	insuu(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -24(%rbp)
	jmp	.L44
.L47:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	insuu(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jle	.L45
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	insuu(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC10(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L46
.L45:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	insuu(%rip), %rax
	movl	(%rdx,%rax), %eax
	negl	%eax
	movl	%eax, %esi
	leaq	.LC11(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L46:
	addl	$1, -24(%rbp)
.L44:
	movl	jisuu(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L47
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.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	comp
	.type	comp, @function
comp:
.LFB56:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jl	.L1
	setne	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE56:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"f_s %s [%d]\n"
	.text
	.p2align 4
	.globl	find_sign
	.type	find_sign, @function
find_sign:
.LFB51:
	.cfi_startproc
	endbr64
	movzbl	(%rdi), %eax
	movq	%rdi, %rdx
	xorl	%ecx, %ecx
	testb	%al, %al
	je	.L6
	xorl	%ecx, %ecx
	cmpb	$43, %al
	sete	%cl
	leal	-1(%rcx,%rcx), %ecx
.L6:
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE51:
	.size	find_sign, .-find_sign
	.section	.rodata.str1.1
.LC1:
	.string	"%dx^%d"
.LC2:
	.string	"x^%d"
.LC3:
	.string	"%dx"
.LC4:
	.string	"%d"
	.text
	.p2align 4
	.globl	parse_monomial
	.type	parse_monomial, @function
parse_monomial:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$120, %esi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	strchr@PLT
	movl	$94, %esi
	movq	%rbp, %rdi
	movq	%rax, %rbx
	call	strchr@PLT
	testq	%rbx, %rbx
	setne	%dl
	testq	%rax, %rax
	setne	%cl
	testb	%dl, %dl
	je	.L11
	testb	%cl, %cl
	je	.L11
	cmpq	%rbx, %rbp
	je	.L12
	leaq	4(%rsp), %rcx
	movq	%rsp, %rdx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__isoc99_sscanf@PLT
	movslq	4(%rsp), %rdx
	movl	(%rsp), %ecx
	leaq	k(%rip), %rax
	movl	%ecx, (%rax,%rdx,4)
	movq	%rdx, %r12
.L10:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L40
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	movl	%r12d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	cmpq	%rbx, %rbp
	jne	.L14
	testb	%cl, %cl
	jne	.L12
.L14:
	testq	%rax, %rax
	jne	.L15
	testb	%dl, %dl
	je	.L15
	cmpq	%rbx, %rbp
	je	.L10
	movzbl	0(%rbp), %eax
	cmpl	$43, %eax
	jne	.L17
	cmpb	$120, 1(%rbp)
	jne	.L17
	cmpb	$0, 2(%rbp)
	jne	.L17
	movl	$1, 4+k(%rip)
	movl	$1, %r12d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L15:
	orq	%rax, %rbx
	jne	.L10
	movq	%rsp, %rdx
	leaq	.LC4(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	(%rsp), %eax
	xorl	%r12d, %r12d
	movl	%eax, k(%rip)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	4(%rsp), %rdx
	leaq	.LC2(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movslq	4(%rsp), %rdx
	leaq	k(%rip), %rax
	movl	$1, (%rax,%rdx,4)
	movq	%rdx, %r12
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L17:
	cmpl	$45, %eax
	jne	.L19
	cmpb	$120, 1(%rbp)
	jne	.L19
	cmpb	$0, 2(%rbp)
	jne	.L19
	movl	$-1, 4+k(%rip)
	movl	$1, %r12d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%rsp, %rdx
	leaq	.LC3(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	(%rsp), %eax
	movl	$1, %r12d
	movl	%eax, 4+k(%rip)
	jmp	.L10
.L40:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	parse_monomial, .-parse_monomial
	.p2align 4
	.globl	parse
	.type	parse, @function
parse:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rdi, %rsi
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rdi, %rbx
	subq	$120, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	jmp	.L60
	.p2align 4,,10
	.p2align 3
.L61:
	testb	%al, %al
	je	.L42
	addq	$1, %rbx
.L60:
	movzbl	(%rbx), %eax
	leal	-43(%rax), %edx
	andl	$253, %edx
	jne	.L61
.L42:
	movq	%r12, %rax
	movl	$12, %ecx
	movq	%rbp, %rdi
	movq	%rbx, %rdx
	rep stosq
	subq	%rsi, %rdx
	movl	$100, %ecx
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	call	__strncpy_chk@PLT
	movq	%rbp, %rdi
	call	parse_monomial
	cmpl	%eax, %r13d
	cmovl	%eax, %r13d
	cmpb	$0, (%rbx)
	je	.L41
	movq	%rbx, %rsi
	addq	$1, %rbx
	jmp	.L60
	.p2align 4,,10
	.p2align 3
.L41:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L62
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movl	%r13d, %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
.L62:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	parse, .-parse
	.section	.rodata.str1.1
.LC5:
	.string	"[%d],%d\n"
	.text
	.p2align 4
	.globl	dump
	.type	dump, @function
dump:
.LFB54:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	k(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC5(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	$5, %ebx
	.p2align 4,,10
	.p2align 3
.L64:
	movl	(%r12,%rbx,4), %ecx
	movl	%ebx, %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	subq	$1, %rbx
	jnb	.L64
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE54:
	.size	dump, .-dump
	.p2align 4
	.globl	calc_poly
	.type	calc_poly, @function
calc_poly:
.LFB55:
	.cfi_startproc
	endbr64
	movl	20(%rdi), %ecx
	movl	16(%rdi), %edx
	movl	%esi, %eax
	imull	4(%rdi), %eax
	imull	%esi, %ecx
	imull	%esi, %edx
	imull	%esi, %ecx
	imull	%esi, %edx
	imull	%esi, %ecx
	imull	%esi, %edx
	imull	%esi, %ecx
	imull	%esi, %edx
	imull	%esi, %ecx
	movslq	%edx, %rdx
	movslq	%ecx, %rcx
	addq	%rcx, %rdx
	movl	12(%rdi), %ecx
	imull	%esi, %ecx
	imull	%esi, %ecx
	imull	%esi, %ecx
	movslq	%ecx, %rcx
	addq	%rcx, %rdx
	movl	8(%rdi), %ecx
	imull	%esi, %ecx
	imull	%esi, %ecx
	movslq	%ecx, %rcx
	addq	%rdx, %rcx
	movslq	%eax, %rdx
	movslq	(%rdi), %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	ret
	.cfi_endproc
.LFE55:
	.size	calc_poly, .-calc_poly
	.section	.rodata.str1.1
.LC6:
	.string	"|%d\n"
	.text
	.p2align 4
	.globl	dump2
	.type	dump2, @function
dump2:
.LFB57:
	.cfi_startproc
	endbr64
	movl	jisuu(%rip), %eax
	testl	%eax, %eax
	jle	.L73
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	insuu(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC6(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L70:
	movl	(%r12,%rbx,4), %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, jisuu(%rip)
	jg	.L70
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L73:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	ret
	.cfi_endproc
.LFE57:
	.size	dump2, .-dump2
	.section	.rodata.str1.1
.LC7:
	.string	"%s"
.LC8:
	.string	"(x-%d)"
.LC9:
	.string	"(x+%d)"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB58:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC7(%rip), %rdi
	xorl	%eax, %eax
	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	S(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rsi
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	leaq	k(%rip), %rsi
	call	parse
	movl	20+k(%rip), %ebx
	movl	16+k(%rip), %esi
	movl	$0, 40(%rsp)
	movl	12+k(%rip), %edi
	movl	8+k(%rip), %r8d
	movl	%eax, 44(%rsp)
	movl	$1, %ecx
	movl	4+k(%rip), %r9d
	movl	%eax, jisuu(%rip)
	movl	%ebx, %r13d
	movl	%esi, %r12d
	movslq	k(%rip), %rax
	movl	%esi, 28(%rsp)
	negl	%r13d
	movl	%edi, %ebp
	movl	%edi, 20(%rsp)
	negl	%r12d
	movl	%r8d, %r11d
	movl	%r9d, %r10d
	movl	%r8d, 16(%rsp)
	negl	%ebp
	negl	%r11d
	negl	%r10d
	movl	%r9d, 12(%rsp)
	movl	%esi, 4(%rsp)
	movl	%eax, 8(%rsp)
	movq	%rax, 32(%rsp)
	movl	%ebx, %eax
	movl	%ebx, 24(%rsp)
	movl	%r12d, %ebx
	movl	%r13d, %r12d
	movl	%eax, %r13d
	.p2align 4,,10
	.p2align 3
.L79:
	movl	8(%rsp), %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L77
	movl	%r13d, %edx
	movl	4(%rsp), %eax
	movslq	%r9d, %r14
	movl	%r12d, %r15d
	imull	%ecx, %edx
	imull	%ecx, %eax
	imull	%ecx, %edx
	imull	%ecx, %eax
	imull	%ecx, %edx
	imull	%ecx, %eax
	imull	%ecx, %edx
	cltq
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	%edi, %edx
	imull	%ecx, %edx
	imull	%ecx, %edx
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	%r8d, %edx
	imull	%ecx, %edx
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	%ebx, %edx
	addq	%rax, %r14
	movl	%ecx, %eax
	negl	%eax
	imull	%eax, %r15d
	imull	%eax, %edx
	imull	%eax, %r15d
	imull	%eax, %edx
	imull	%eax, %r15d
	imull	%eax, %edx
	imull	%eax, %r15d
	movslq	%edx, %rdx
	movslq	%r15d, %r15
	addq	%r15, %rdx
	movl	%ebp, %r15d
	imull	%eax, %r15d
	imull	%eax, %r15d
	movslq	%r15d, %r15
	addq	%r15, %rdx
	movl	%r11d, %r15d
	imull	%eax, %r15d
	movslq	%r15d, %r15
	addq	%rdx, %r15
	movslq	%r10d, %rdx
	addq	%r15, %rdx
	movq	32(%rsp), %r15
	addq	%r15, %rdx
	addq	%r15, %r14
	jne	.L78
	movslq	40(%rsp), %r14
	leaq	insuu(%rip), %rsi
	movl	%ecx, (%rsi,%r14,4)
	leal	1(%r14), %esi
	movl	%esi, 40(%rsp)
.L78:
	testq	%rdx, %rdx
	jne	.L77
	movslq	40(%rsp), %rdx
	leaq	insuu(%rip), %rsi
	movl	%eax, (%rsi,%rdx,4)
	leal	1(%rdx), %eax
	movl	%eax, 40(%rsp)
.L77:
	movl	24(%rsp), %esi
	movl	28(%rsp), %r15d
	addl	$1, %ecx
	movl	20(%rsp), %r14d
	movl	16(%rsp), %edx
	movl	12(%rsp), %eax
	addl	%r15d, 4(%rsp)
	addl	%esi, %r13d
	subl	%esi, %r12d
	addl	%r14d, %edi
	addl	%edx, %r8d
	subl	%r15d, %ebx
	subl	%r14d, %ebp
	addl	%eax, %r9d
	subl	%edx, %r11d
	subl	%eax, %r10d
	cmpl	$200001, %ecx
	jne	.L79
	movslq	44(%rsp), %rsi
	leaq	comp(%rip), %rcx
	movl	$4, %edx
	leaq	insuu(%rip), %rdi
	call	qsort@PLT
	movl	jisuu(%rip), %eax
	testl	%eax, %eax
	jle	.L80
	xorl	%ebx, %ebx
	leaq	.LC9(%rip), %r12
	leaq	.LC8(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L83:
	leaq	insuu(%rip), %rax
	movq	%rbp, %rsi
	movl	(%rax,%rbx,4), %edx
	testl	%edx, %edx
	jg	.L86
	negl	%edx
	movq	%r12, %rsi
.L86:
	xorl	%eax, %eax
	movl	$1, %edi
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, jisuu(%rip)
	jg	.L83
.L80:
	movl	$10, %edi
	call	putchar@PLT
	addq	$56, %rsp
	.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
	.cfi_endproc
.LFE58:
	.size	main, .-main
	.globl	delim
	.data
	.type	delim, @object
	.size	delim, 3
delim:
	.string	"+-"
	.globl	insuu
	.bss
	.align 16
	.type	insuu, @object
	.size	insuu, 24
insuu:
	.zero	24
	.globl	jisuu
	.align 4
	.type	jisuu, @object
	.size	jisuu, 4
jisuu:
	.zero	4
	.globl	k
	.align 16
	.type	k, @object
	.size	k, 24
k:
	.zero	24
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 1000
S:
	.zero	1000
	.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	comp
	.type	comp, @function
comp:
.LFB56:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jl	.L1
	setne	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE56:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"f_s %s [%d]\n"
	.text
	.p2align 4
	.globl	find_sign
	.type	find_sign, @function
find_sign:
.LFB51:
	.cfi_startproc
	endbr64
	movzbl	(%rdi), %eax
	movq	%rdi, %rdx
	xorl	%ecx, %ecx
	testb	%al, %al
	je	.L6
	xorl	%ecx, %ecx
	cmpb	$43, %al
	sete	%cl
	leal	-1(%rcx,%rcx), %ecx
.L6:
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE51:
	.size	find_sign, .-find_sign
	.section	.rodata.str1.1
.LC1:
	.string	"%dx^%d"
.LC2:
	.string	"x^%d"
.LC3:
	.string	"%dx"
.LC4:
	.string	"%d"
	.text
	.p2align 4
	.globl	parse_monomial
	.type	parse_monomial, @function
parse_monomial:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$120, %esi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	strchr@PLT
	movl	$94, %esi
	movq	%rbp, %rdi
	movq	%rax, %rbx
	call	strchr@PLT
	testq	%rbx, %rbx
	setne	%dl
	testq	%rax, %rax
	setne	%cl
	testb	%dl, %dl
	je	.L11
	testb	%cl, %cl
	je	.L11
	cmpq	%rbx, %rbp
	je	.L12
	leaq	4(%rsp), %rcx
	movq	%rsp, %rdx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__isoc99_sscanf@PLT
	movslq	4(%rsp), %rdx
	movl	(%rsp), %ecx
	leaq	k(%rip), %rax
	movl	%ecx, (%rax,%rdx,4)
	movq	%rdx, %r12
.L10:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L40
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	movl	%r12d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	cmpq	%rbx, %rbp
	jne	.L14
	testb	%cl, %cl
	jne	.L12
.L14:
	testq	%rax, %rax
	jne	.L15
	testb	%dl, %dl
	je	.L15
	cmpq	%rbx, %rbp
	je	.L10
	movzbl	0(%rbp), %eax
	cmpl	$43, %eax
	jne	.L17
	cmpb	$120, 1(%rbp)
	jne	.L17
	cmpb	$0, 2(%rbp)
	jne	.L17
	movl	$1, 4+k(%rip)
	movl	$1, %r12d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L15:
	orq	%rax, %rbx
	jne	.L10
	movq	%rsp, %rdx
	leaq	.LC4(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	(%rsp), %eax
	xorl	%r12d, %r12d
	movl	%eax, k(%rip)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	4(%rsp), %rdx
	leaq	.LC2(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movslq	4(%rsp), %rdx
	leaq	k(%rip), %rax
	movl	$1, (%rax,%rdx,4)
	movq	%rdx, %r12
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L17:
	cmpl	$45, %eax
	jne	.L19
	cmpb	$120, 1(%rbp)
	jne	.L19
	cmpb	$0, 2(%rbp)
	jne	.L19
	movl	$-1, 4+k(%rip)
	movl	$1, %r12d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%rsp, %rdx
	leaq	.LC3(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	(%rsp), %eax
	movl	$1, %r12d
	movl	%eax, 4+k(%rip)
	jmp	.L10
.L40:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	parse_monomial, .-parse_monomial
	.p2align 4
	.globl	parse
	.type	parse, @function
parse:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rdi, %rsi
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rdi, %rbx
	subq	$120, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	jmp	.L60
	.p2align 4,,10
	.p2align 3
.L61:
	testb	%al, %al
	je	.L42
	addq	$1, %rbx
.L60:
	movzbl	(%rbx), %eax
	leal	-43(%rax), %edx
	andl	$253, %edx
	jne	.L61
.L42:
	movq	%r12, %rax
	movl	$12, %ecx
	movq	%rbp, %rdi
	movq	%rbx, %rdx
	rep stosq
	subq	%rsi, %rdx
	movl	$100, %ecx
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	call	__strncpy_chk@PLT
	movq	%rbp, %rdi
	call	parse_monomial
	cmpl	%eax, %r13d
	cmovl	%eax, %r13d
	cmpb	$0, (%rbx)
	je	.L41
	movq	%rbx, %rsi
	addq	$1, %rbx
	jmp	.L60
	.p2align 4,,10
	.p2align 3
.L41:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L62
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movl	%r13d, %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
.L62:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	parse, .-parse
	.section	.rodata.str1.1
.LC5:
	.string	"[%d],%d\n"
	.text
	.p2align 4
	.globl	dump
	.type	dump, @function
dump:
.LFB54:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	k(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC5(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	$5, %ebx
	.p2align 4,,10
	.p2align 3
.L64:
	movl	(%r12,%rbx,4), %ecx
	movl	%ebx, %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	subq	$1, %rbx
	jnb	.L64
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE54:
	.size	dump, .-dump
	.p2align 4
	.globl	calc_poly
	.type	calc_poly, @function
calc_poly:
.LFB55:
	.cfi_startproc
	endbr64
	movl	20(%rdi), %ecx
	movl	16(%rdi), %edx
	movl	%esi, %eax
	imull	4(%rdi), %eax
	imull	%esi, %ecx
	imull	%esi, %edx
	imull	%esi, %ecx
	imull	%esi, %edx
	imull	%esi, %ecx
	imull	%esi, %edx
	imull	%esi, %ecx
	imull	%esi, %edx
	imull	%esi, %ecx
	movslq	%edx, %rdx
	movslq	%ecx, %rcx
	addq	%rcx, %rdx
	movl	12(%rdi), %ecx
	imull	%esi, %ecx
	imull	%esi, %ecx
	imull	%esi, %ecx
	movslq	%ecx, %rcx
	addq	%rcx, %rdx
	movl	8(%rdi), %ecx
	imull	%esi, %ecx
	imull	%esi, %ecx
	movslq	%ecx, %rcx
	addq	%rdx, %rcx
	movslq	%eax, %rdx
	movslq	(%rdi), %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	ret
	.cfi_endproc
.LFE55:
	.size	calc_poly, .-calc_poly
	.section	.rodata.str1.1
.LC6:
	.string	"|%d\n"
	.text
	.p2align 4
	.globl	dump2
	.type	dump2, @function
dump2:
.LFB57:
	.cfi_startproc
	endbr64
	movl	jisuu(%rip), %eax
	testl	%eax, %eax
	jle	.L73
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	insuu(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC6(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L70:
	movl	(%r12,%rbx,4), %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, jisuu(%rip)
	jg	.L70
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L73:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	ret
	.cfi_endproc
.LFE57:
	.size	dump2, .-dump2
	.section	.rodata.str1.1
.LC7:
	.string	"%s"
.LC8:
	.string	"(x-%d)"
.LC9:
	.string	"(x+%d)"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB58:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC7(%rip), %rdi
	xorl	%eax, %eax
	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	S(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rsi
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	leaq	k(%rip), %rsi
	call	parse
	movl	20+k(%rip), %ebx
	movl	16+k(%rip), %esi
	movl	$0, 40(%rsp)
	movl	12+k(%rip), %edi
	movl	8+k(%rip), %r8d
	movl	%eax, 44(%rsp)
	movl	$1, %ecx
	movl	4+k(%rip), %r9d
	movl	%eax, jisuu(%rip)
	movl	%ebx, %r13d
	movl	%esi, %r12d
	movslq	k(%rip), %rax
	movl	%esi, 28(%rsp)
	negl	%r13d
	movl	%edi, %ebp
	movl	%edi, 20(%rsp)
	negl	%r12d
	movl	%r8d, %r11d
	movl	%r9d, %r10d
	movl	%r8d, 16(%rsp)
	negl	%ebp
	negl	%r11d
	negl	%r10d
	movl	%r9d, 12(%rsp)
	movl	%esi, 4(%rsp)
	movl	%eax, 8(%rsp)
	movq	%rax, 32(%rsp)
	movl	%ebx, %eax
	movl	%ebx, 24(%rsp)
	movl	%r12d, %ebx
	movl	%r13d, %r12d
	movl	%eax, %r13d
	.p2align 4,,10
	.p2align 3
.L79:
	movl	8(%rsp), %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L77
	movl	%r13d, %edx
	movl	4(%rsp), %eax
	movslq	%r9d, %r14
	movl	%r12d, %r15d
	imull	%ecx, %edx
	imull	%ecx, %eax
	imull	%ecx, %edx
	imull	%ecx, %eax
	imull	%ecx, %edx
	imull	%ecx, %eax
	imull	%ecx, %edx
	cltq
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	%edi, %edx
	imull	%ecx, %edx
	imull	%ecx, %edx
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	%r8d, %edx
	imull	%ecx, %edx
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	%ebx, %edx
	addq	%rax, %r14
	movl	%ecx, %eax
	negl	%eax
	imull	%eax, %r15d
	imull	%eax, %edx
	imull	%eax, %r15d
	imull	%eax, %edx
	imull	%eax, %r15d
	imull	%eax, %edx
	imull	%eax, %r15d
	movslq	%edx, %rdx
	movslq	%r15d, %r15
	addq	%r15, %rdx
	movl	%ebp, %r15d
	imull	%eax, %r15d
	imull	%eax, %r15d
	movslq	%r15d, %r15
	addq	%r15, %rdx
	movl	%r11d, %r15d
	imull	%eax, %r15d
	movslq	%r15d, %r15
	addq	%rdx, %r15
	movslq	%r10d, %rdx
	addq	%r15, %rdx
	movq	32(%rsp), %r15
	addq	%r15, %rdx
	addq	%r15, %r14
	jne	.L78
	movslq	40(%rsp), %r14
	leaq	insuu(%rip), %rsi
	movl	%ecx, (%rsi,%r14,4)
	leal	1(%r14), %esi
	movl	%esi, 40(%rsp)
.L78:
	testq	%rdx, %rdx
	jne	.L77
	movslq	40(%rsp), %rdx
	leaq	insuu(%rip), %rsi
	movl	%eax, (%rsi,%rdx,4)
	leal	1(%rdx), %eax
	movl	%eax, 40(%rsp)
.L77:
	movl	24(%rsp), %esi
	movl	28(%rsp), %r15d
	addl	$1, %ecx
	movl	20(%rsp), %r14d
	movl	16(%rsp), %edx
	movl	12(%rsp), %eax
	addl	%r15d, 4(%rsp)
	addl	%esi, %r13d
	subl	%esi, %r12d
	addl	%r14d, %edi
	addl	%edx, %r8d
	subl	%r15d, %ebx
	subl	%r14d, %ebp
	addl	%eax, %r9d
	subl	%edx, %r11d
	subl	%eax, %r10d
	cmpl	$200001, %ecx
	jne	.L79
	movslq	44(%rsp), %rsi
	leaq	comp(%rip), %rcx
	movl	$4, %edx
	leaq	insuu(%rip), %rdi
	call	qsort@PLT
	movl	jisuu(%rip), %eax
	testl	%eax, %eax
	jle	.L80
	xorl	%ebx, %ebx
	leaq	.LC9(%rip), %r12
	leaq	.LC8(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L83:
	leaq	insuu(%rip), %rax
	movq	%rbp, %rsi
	movl	(%rax,%rbx,4), %edx
	testl	%edx, %edx
	jg	.L86
	negl	%edx
	movq	%r12, %rsi
.L86:
	xorl	%eax, %eax
	movl	$1, %edi
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, jisuu(%rip)
	jg	.L83
.L80:
	movl	$10, %edi
	call	putchar@PLT
	addq	$56, %rsp
	.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
	.cfi_endproc
.LFE58:
	.size	main, .-main
	.globl	delim
	.data
	.type	delim, @object
	.size	delim, 3
delim:
	.string	"+-"
	.globl	insuu
	.bss
	.align 16
	.type	insuu, @object
	.size	insuu, 24
insuu:
	.zero	24
	.globl	jisuu
	.align 4
	.type	jisuu, @object
	.size	jisuu, 4
jisuu:
	.zero	4
	.globl	k
	.align 16
	.type	k, @object
	.size	k, 24
k:
	.zero	24
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 1000
S:
	.zero	1000
	.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 #3002
  title:Factrization
  @kankichi573
  2017/12/14 WA 35/37
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define max(x,y) (((x)>(y))?(x):(y))
char S[1000];
int  k[6];
int  jisuu;
int  insuu[6];

char delim[3]="+-";

int find_sign(char s[])
{
  char *p;
  int ret;

  for(p=s;*p;p++)
    if(*p=='+')
      {
        ret=1;
        goto END;
      }
    else
      {
        ret=-1;
        goto END;
      }
  ret=0;
 END:
  printf("f_s %s [%d]\n",s,ret);
}


int parse_monomial(char s[])
{ 
  char *p1,*p2;
  int a,b,ji;

  //printf("Mono=%s\n",s);
  
  
  p1=strchr(s,'x');
  p2=strchr(s,'^');

  
  if(p1 && p2 && p1!=s)
    {
      sscanf(s,"%dx^%d",&a,&b);
      ji=b;
      k[b]=a;
    }
  
  else if(p2 && p1==s)
    {
      sscanf(s,"x^%d",&b);
      ji=b;
      k[b]=1;
    }
    
  else if(p1 && !p2 && p1!=s)
    {
      if( 0==strcmp("+x",s))
        {
          ji=1;
          k[1]=1;
        }
      else if(0==strcmp("-x",s))
        {
          ji=1;
          k[1]=-1;
        }
      else
        {
          sscanf(s,"%dx",&a);
          ji=1;
          k[1]=a;
        }
    }

  else if(!p1 && !p2)
    {
      sscanf(s,"%d",&a);
      ji=0;
      k[0]=a;
    }
  return(ji);
}




int parse(char s[],int k[])
{
  char *p,*q,buf[100];
  int jisuu,ji,t;
  //printf("%s:\n",s);
  ji=0;
  t=0;
  p=q=s;
  while(1)
    {
      if(t==1)
        p++;
      while(*p!='+' && *p!='-' && *p)
        p++;
      memset(buf,0,sizeof(buf));
      strncpy(buf,q,p-q);
      jisuu=parse_monomial(buf);
      ji=max(ji,jisuu);
      q=p;
      t=1;
      if(!*p)
        return(ji);
    }
}
void dump()
{
  int i;
  for(i=5;i>=0;i--)
    printf("[%d],%d\n",i,k[i]);
}

long long calc_poly(int k[],int n)
{
  long long ret;
  ret =  k[5]*n*n*n*n*n;
  ret += k[4]*n*n*n*n;
  ret += k[3]*n*n*n;
  ret += k[2]*n*n;
  ret += k[1]*n;
  ret += k[0];
  return(ret);
}

int comp( const void * a , const void * b ) {

  if( *( int * )a < *( int * )b ) {
    return 1;
  }
  else
    if( *( int * )a == *( int * )b ) {
      return 0;
    }
  return -1;
}

void dump2()
{
  int i;
  for(i=0;i<jisuu;i++)
    printf("|%d\n",insuu[i]);
}

int main()
{
  int i,p;
  long long llret,llret2;

  scanf("%s",S);
  jisuu=parse(S,k);
  //dump();
  for(i=1,p=0;i<=200000;i++)
    if((k[0] % i)==0)
      {
        llret=calc_poly(k,i);
        llret2=calc_poly(k,-i);
        if(0==llret)
          insuu[p++]=i;
        if(0==llret2)
          insuu[p++]=-i;
      }

  qsort(insuu,jisuu,sizeof(int),comp);
  for(i=0;i<jisuu;i++)
    if(insuu[i]>0)
      printf("(x-%d)",insuu[i]);
    else
      printf("(x+%d)",-insuu[i]);
  printf("\n");
  
  return(0);
}
x^1-2
 x^1-1
 x^1-3
 x^1-4
 x^2-4
 x^1-5
 x^1-6
 x^1+6
 x^1+5
 x^1+7

(x-2)
 (x-1)
 (x-3)
 (x-4)
 (x-2)(x+2)
 (x-5)
 (x-6)
 (x+6)
 (x+5)
 (x+7)

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

```c
/*
  AOJ #3002
  title:Factrization
  @kankichi573
  2017/12/14 WA 35/37
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define max(x,y) (((x)>(y))?(x):(y))
char S[1000];
int  k[6];
int  jisuu;
int  insuu[6];

char delim[3]="+-";

int find_sign(char s[])
{
  char *p;
  int ret;

  for(p=s;*p;p++)
    if(*p=='+')
      {
        ret=1;
        goto END;
      }
    else
      {
        ret=-1;
        goto END;
      }
  ret=0;
 END:
  printf("f_s %s [%d]\n",s,ret);
}


int parse_monomial(char s[])
{ 
  char *p1,*p2;
  int a,b,ji;

  //printf("Mono=%s\n",s);
  
  
  p1=strchr(s,'x');
  p2=strchr(s,'^');

  
  if(p1 && p2 && p1!=s)
    {
      sscanf(s,"%dx^%d",&a,&b);
      ji=b;
      k[b]=a;
    }
  
  else if(p2 && p1==s)
    {
      sscanf(s,"x^%d",&b);
      ji=b;
      k[b]=1;
    }
    
  else if(p1 && !p2 && p1!=s)
    {
      if( 0==strcmp("+x",s))
        {
          ji=1;
          k[1]=1;
        }
      else if(0==strcmp("-x",s))
        {
          ji=1;
          k[1]=-1;
        }
      else
        {
          sscanf(s,"%dx",&a);
          ji=1;
          k[1]=a;
        }
    }

  else if(!p1 && !p2)
    {
      sscanf(s,"%d",&a);
      ji=0;
      k[0]=a;
    }
  return(ji);
}




int parse(char s[],int k[])
{
  char *p,*q,buf[100];
  int jisuu,ji,t;
  //printf("%s:\n",s);
  ji=0;
  t=0;
  p=q=s;
  while(1)
    {
      if(t==1)
        p++;
      while(*p!='+' && *p!='-' && *p)
        p++;
      memset(buf,0,sizeof(buf));
      strncpy(buf,q,p-q);
      jisuu=parse_monomial(buf);
      ji=max(ji,jisuu);
      q=p;
      t=1;
      if(!*p)
        return(ji);
    }
}
void dump()
{
  int i;
  for(i=5;i>=0;i--)
    printf("[%d],%d\n",i,k[i]);
}

long long calc_poly(int k[],int n)
{
  long long ret;
  ret =  k[5]*n*n*n*n*n;
  ret += k[4]*n*n*n*n;
  ret += k[3]*n*n*n;
  ret += k[2]*n*n;
  ret += k[1]*n;
  ret += k[0];
  return(ret);
}

int comp( const void * a , const void * b ) {

  if( *( int * )a < *( int * )b ) {
    return 1;
  }
  else
    if( *( int * )a == *( int * )b ) {
      return 0;
    }
  return -1;
}

void dump2()
{
  int i;
  for(i=0;i<jisuu;i++)
    printf("|%d\n",insuu[i]);
}

int main()
{
  int i,p;
  long long llret,llret2;

  scanf("%s",S);
  jisuu=parse(S,k);
  //dump();
  for(i=1,p=0;i<=200000;i++)
    if((k[0] % i)==0)
      {
        llret=calc_poly(k,i);
        llret2=calc_poly(k,-i);
        if(0==llret)
          insuu[p++]=i;
        if(0==llret2)
          insuu[p++]=-i;
      }

  qsort(insuu,jisuu,sizeof(int),comp);
  for(i=0;i<jisuu;i++)
    if(insuu[i]>0)
      printf("(x-%d)",insuu[i]);
    else
      printf("(x+%d)",-insuu[i]);
  printf("\n");
  
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 1000
S:
	.zero	1000
	.globl	k
	.align 16
	.type	k, @object
	.size	k, 24
k:
	.zero	24
	.globl	jisuu
	.align 4
	.type	jisuu, @object
	.size	jisuu, 4
jisuu:
	.zero	4
	.globl	insuu
	.align 16
	.type	insuu, @object
	.size	insuu, 24
insuu:
	.zero	24
	.globl	delim
	.data
	.type	delim, @object
	.size	delim, 3
delim:
	.string	"+-"
	.section	.rodata
.LC0:
	.string	"f_s %s [%d]\n"
	.text
	.globl	find_sign
	.type	find_sign, @function
find_sign:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -8(%rbp)
	nop
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L6
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$43, %al
	jne	.L3
	movl	$1, -12(%rbp)
	jmp	.L4
.L3:
	movl	$-1, -12(%rbp)
	jmp	.L4
.L6:
	movl	$0, -12(%rbp)
.L4:
	movl	-12(%rbp), %edx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	find_sign, .-find_sign
	.section	.rodata
.LC1:
	.string	"%dx^%d"
.LC2:
	.string	"x^%d"
.LC3:
	.string	"+x"
.LC4:
	.string	"-x"
.LC5:
	.string	"%dx"
.LC6:
	.string	"%d"
	.text
	.globl	parse_monomial
	.type	parse_monomial, @function
parse_monomial:
.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
	movq	%rdi, -56(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-56(%rbp), %rax
	movl	$120, %esi
	movq	%rax, %rdi
	call	strchr@PLT
	movq	%rax, -24(%rbp)
	movq	-56(%rbp), %rax
	movl	$94, %esi
	movq	%rax, %rdi
	call	strchr@PLT
	movq	%rax, -16(%rbp)
	cmpq	$0, -24(%rbp)
	je	.L8
	cmpq	$0, -16(%rbp)
	je	.L8
	movq	-24(%rbp), %rax
	cmpq	-56(%rbp), %rax
	je	.L8
	leaq	-32(%rbp), %rcx
	leaq	-36(%rbp), %rdx
	movq	-56(%rbp), %rax
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-32(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	k(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	jmp	.L9
.L8:
	cmpq	$0, -16(%rbp)
	je	.L10
	movq	-24(%rbp), %rax
	cmpq	-56(%rbp), %rax
	jne	.L10
	leaq	-32(%rbp), %rdx
	movq	-56(%rbp), %rax
	leaq	.LC2(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-32(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	k(%rip), %rax
	movl	$1, (%rdx,%rax)
	jmp	.L9
.L10:
	cmpq	$0, -24(%rbp)
	je	.L11
	cmpq	$0, -16(%rbp)
	jne	.L11
	movq	-24(%rbp), %rax
	cmpq	-56(%rbp), %rax
	je	.L11
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L12
	movl	$1, -28(%rbp)
	movl	$1, 4+k(%rip)
	jmp	.L9
.L12:
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L14
	movl	$1, -28(%rbp)
	movl	$-1, 4+k(%rip)
	jmp	.L9
.L14:
	leaq	-36(%rbp), %rdx
	movq	-56(%rbp), %rax
	leaq	.LC5(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$1, -28(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, 4+k(%rip)
	jmp	.L9
.L11:
	cmpq	$0, -24(%rbp)
	jne	.L9
	cmpq	$0, -16(%rbp)
	jne	.L9
	leaq	-36(%rbp), %rdx
	movq	-56(%rbp), %rax
	leaq	.LC6(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$0, -28(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, k(%rip)
.L9:
	movl	-28(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	parse_monomial, .-parse_monomial
	.globl	parse
	.type	parse, @function
parse:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$160, %rsp
	movq	%rdi, -152(%rbp)
	movq	%rsi, -160(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -140(%rbp)
	movl	$0, -136(%rbp)
	movq	-152(%rbp), %rax
	movq	%rax, -120(%rbp)
	movq	-120(%rbp), %rax
	movq	%rax, -128(%rbp)
.L24:
	cmpl	$1, -136(%rbp)
	jne	.L19
	addq	$1, -128(%rbp)
	jmp	.L19
.L21:
	addq	$1, -128(%rbp)
.L19:
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$43, %al
	je	.L20
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$45, %al
	je	.L20
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L21
.L20:
	leaq	-112(%rbp), %rax
	movl	$100, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	-128(%rbp), %rax
	subq	-120(%rbp), %rax
	movq	%rax, %rdx
	movq	-120(%rbp), %rcx
	leaq	-112(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strncpy@PLT
	leaq	-112(%rbp), %rax
	movq	%rax, %rdi
	call	parse_monomial
	movl	%eax, -132(%rbp)
	movl	-140(%rbp), %edx
	movl	-132(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -140(%rbp)
	movq	-128(%rbp), %rax
	movq	%rax, -120(%rbp)
	movl	$1, -136(%rbp)
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L24
	movl	-140(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	parse, .-parse
	.section	.rodata
.LC7:
	.string	"[%d],%d\n"
	.text
	.globl	dump
	.type	dump, @function
dump:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$5, -4(%rbp)
	jmp	.L28
.L29:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	k(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	subl	$1, -4(%rbp)
.L28:
	cmpl	$0, -4(%rbp)
	jns	.L29
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	dump, .-dump
	.globl	calc_poly
	.type	calc_poly, @function
calc_poly:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movq	-24(%rbp), %rax
	addq	$20, %rax
	movl	(%rax), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	cltq
	movq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	addq	$16, %rax
	movl	(%rax), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	addq	$12, %rax
	movl	(%rax), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	addq	$8, %rax
	movl	(%rax), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	addq	$4, %rax
	movl	(%rax), %eax
	imull	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	cltq
	addq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	calc_poly, .-calc_poly
	.globl	comp
	.type	comp, @function
comp:
.LFB11:
	.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), %eax
	cmpl	%eax, %edx
	jge	.L33
	movl	$1, %eax
	jmp	.L34
.L33:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L35
	movl	$0, %eax
	jmp	.L34
.L35:
	movl	$-1, %eax
.L34:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	comp, .-comp
	.section	.rodata
.LC8:
	.string	"|%d\n"
	.text
	.globl	dump2
	.type	dump2, @function
dump2:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -4(%rbp)
	jmp	.L37
.L38:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	insuu(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L37:
	movl	jisuu(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L38
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	dump2, .-dump2
	.section	.rodata
.LC9:
	.string	"%s"
.LC10:
	.string	"(x-%d)"
.LC11:
	.string	"(x+%d)"
	.text
	.globl	main
	.type	main, @function
main:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	leaq	S(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	k(%rip), %rax
	movq	%rax, %rsi
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	call	parse
	movl	%eax, jisuu(%rip)
	movl	$1, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L40
.L43:
	movl	k(%rip), %eax
	cltd
	idivl	-24(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L41
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	k(%rip), %rax
	movq	%rax, %rdi
	call	calc_poly
	movq	%rax, -16(%rbp)
	movl	-24(%rbp), %eax
	negl	%eax
	movl	%eax, %esi
	leaq	k(%rip), %rax
	movq	%rax, %rdi
	call	calc_poly
	movq	%rax, -8(%rbp)
	cmpq	$0, -16(%rbp)
	jne	.L42
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -20(%rbp)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	insuu(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L42:
	cmpq	$0, -8(%rbp)
	jne	.L41
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -20(%rbp)
	movl	-24(%rbp), %edx
	movl	%edx, %ecx
	negl	%ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	insuu(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L41:
	addl	$1, -24(%rbp)
.L40:
	cmpl	$200000, -24(%rbp)
	jle	.L43
	movl	jisuu(%rip), %eax
	cltq
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	insuu(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -24(%rbp)
	jmp	.L44
.L47:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	insuu(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jle	.L45
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	insuu(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC10(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L46
.L45:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	insuu(%rip), %rax
	movl	(%rdx,%rax), %eax
	negl	%eax
	movl	%eax, %esi
	leaq	.LC11(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L46:
	addl	$1, -24(%rbp)
.L44:
	movl	jisuu(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L47
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.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	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 1000
S:
	.zero	1000
	.globl	k
	.align 16
	.type	k, @object
	.size	k, 24
k:
	.zero	24
	.globl	jisuu
	.align 4
	.type	jisuu, @object
	.size	jisuu, 4
jisuu:
	.zero	4
	.globl	insuu
	.align 16
	.type	insuu, @object
	.size	insuu, 24
insuu:
	.zero	24
	.globl	delim
	.data
	.type	delim, @object
	.size	delim, 3
delim:
	.string	"+-"
	.section	.rodata
.LC0:
	.string	"f_s %s [%d]\n"
	.text
	.globl	find_sign
	.type	find_sign, @function
find_sign:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -8(%rbp)
	nop
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L6
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$43, %al
	jne	.L3
	movl	$1, -12(%rbp)
	jmp	.L4
.L3:
	movl	$-1, -12(%rbp)
	jmp	.L4
.L6:
	movl	$0, -12(%rbp)
.L4:
	movl	-12(%rbp), %edx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	find_sign, .-find_sign
	.section	.rodata
.LC1:
	.string	"%dx^%d"
.LC2:
	.string	"x^%d"
.LC3:
	.string	"+x"
.LC4:
	.string	"-x"
.LC5:
	.string	"%dx"
.LC6:
	.string	"%d"
	.text
	.globl	parse_monomial
	.type	parse_monomial, @function
parse_monomial:
.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
	movq	%rdi, -56(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-56(%rbp), %rax
	movl	$120, %esi
	movq	%rax, %rdi
	call	strchr@PLT
	movq	%rax, -24(%rbp)
	movq	-56(%rbp), %rax
	movl	$94, %esi
	movq	%rax, %rdi
	call	strchr@PLT
	movq	%rax, -16(%rbp)
	cmpq	$0, -24(%rbp)
	je	.L8
	cmpq	$0, -16(%rbp)
	je	.L8
	movq	-24(%rbp), %rax
	cmpq	-56(%rbp), %rax
	je	.L8
	leaq	-32(%rbp), %rcx
	leaq	-36(%rbp), %rdx
	movq	-56(%rbp), %rax
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-32(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	k(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	jmp	.L9
.L8:
	cmpq	$0, -16(%rbp)
	je	.L10
	movq	-24(%rbp), %rax
	cmpq	-56(%rbp), %rax
	jne	.L10
	leaq	-32(%rbp), %rdx
	movq	-56(%rbp), %rax
	leaq	.LC2(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-32(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	k(%rip), %rax
	movl	$1, (%rdx,%rax)
	jmp	.L9
.L10:
	cmpq	$0, -24(%rbp)
	je	.L11
	cmpq	$0, -16(%rbp)
	jne	.L11
	movq	-24(%rbp), %rax
	cmpq	-56(%rbp), %rax
	je	.L11
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L12
	movl	$1, -28(%rbp)
	movl	$1, 4+k(%rip)
	jmp	.L9
.L12:
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L14
	movl	$1, -28(%rbp)
	movl	$-1, 4+k(%rip)
	jmp	.L9
.L14:
	leaq	-36(%rbp), %rdx
	movq	-56(%rbp), %rax
	leaq	.LC5(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$1, -28(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, 4+k(%rip)
	jmp	.L9
.L11:
	cmpq	$0, -24(%rbp)
	jne	.L9
	cmpq	$0, -16(%rbp)
	jne	.L9
	leaq	-36(%rbp), %rdx
	movq	-56(%rbp), %rax
	leaq	.LC6(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$0, -28(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, k(%rip)
.L9:
	movl	-28(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	parse_monomial, .-parse_monomial
	.globl	parse
	.type	parse, @function
parse:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$160, %rsp
	movq	%rdi, -152(%rbp)
	movq	%rsi, -160(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -140(%rbp)
	movl	$0, -136(%rbp)
	movq	-152(%rbp), %rax
	movq	%rax, -120(%rbp)
	movq	-120(%rbp), %rax
	movq	%rax, -128(%rbp)
.L24:
	cmpl	$1, -136(%rbp)
	jne	.L19
	addq	$1, -128(%rbp)
	jmp	.L19
.L21:
	addq	$1, -128(%rbp)
.L19:
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$43, %al
	je	.L20
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$45, %al
	je	.L20
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L21
.L20:
	leaq	-112(%rbp), %rax
	movl	$100, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	-128(%rbp), %rax
	subq	-120(%rbp), %rax
	movq	%rax, %rdx
	movq	-120(%rbp), %rcx
	leaq	-112(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	strncpy@PLT
	leaq	-112(%rbp), %rax
	movq	%rax, %rdi
	call	parse_monomial
	movl	%eax, -132(%rbp)
	movl	-140(%rbp), %edx
	movl	-132(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -140(%rbp)
	movq	-128(%rbp), %rax
	movq	%rax, -120(%rbp)
	movl	$1, -136(%rbp)
	movq	-128(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L24
	movl	-140(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	parse, .-parse
	.section	.rodata
.LC7:
	.string	"[%d],%d\n"
	.text
	.globl	dump
	.type	dump, @function
dump:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$5, -4(%rbp)
	jmp	.L28
.L29:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	k(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	subl	$1, -4(%rbp)
.L28:
	cmpl	$0, -4(%rbp)
	jns	.L29
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	dump, .-dump
	.globl	calc_poly
	.type	calc_poly, @function
calc_poly:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movq	-24(%rbp), %rax
	addq	$20, %rax
	movl	(%rax), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	cltq
	movq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	addq	$16, %rax
	movl	(%rax), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	addq	$12, %rax
	movl	(%rax), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	addq	$8, %rax
	movl	(%rax), %eax
	imull	-28(%rbp), %eax
	imull	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	addq	$4, %rax
	movl	(%rax), %eax
	imull	-28(%rbp), %eax
	cltq
	addq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	cltq
	addq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	calc_poly, .-calc_poly
	.globl	comp
	.type	comp, @function
comp:
.LFB11:
	.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), %eax
	cmpl	%eax, %edx
	jge	.L33
	movl	$1, %eax
	jmp	.L34
.L33:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L35
	movl	$0, %eax
	jmp	.L34
.L35:
	movl	$-1, %eax
.L34:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	comp, .-comp
	.section	.rodata
.LC8:
	.string	"|%d\n"
	.text
	.globl	dump2
	.type	dump2, @function
dump2:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -4(%rbp)
	jmp	.L37
.L38:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	insuu(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L37:
	movl	jisuu(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L38
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	dump2, .-dump2
	.section	.rodata
.LC9:
	.string	"%s"
.LC10:
	.string	"(x-%d)"
.LC11:
	.string	"(x+%d)"
	.text
	.globl	main
	.type	main, @function
main:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	leaq	S(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	k(%rip), %rax
	movq	%rax, %rsi
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	call	parse
	movl	%eax, jisuu(%rip)
	movl	$1, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L40
.L43:
	movl	k(%rip), %eax
	cltd
	idivl	-24(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L41
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	k(%rip), %rax
	movq	%rax, %rdi
	call	calc_poly
	movq	%rax, -16(%rbp)
	movl	-24(%rbp), %eax
	negl	%eax
	movl	%eax, %esi
	leaq	k(%rip), %rax
	movq	%rax, %rdi
	call	calc_poly
	movq	%rax, -8(%rbp)
	cmpq	$0, -16(%rbp)
	jne	.L42
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -20(%rbp)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	insuu(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L42:
	cmpq	$0, -8(%rbp)
	jne	.L41
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -20(%rbp)
	movl	-24(%rbp), %edx
	movl	%edx, %ecx
	negl	%ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	insuu(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L41:
	addl	$1, -24(%rbp)
.L40:
	cmpl	$200000, -24(%rbp)
	jle	.L43
	movl	jisuu(%rip), %eax
	cltq
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	insuu(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -24(%rbp)
	jmp	.L44
.L47:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	insuu(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jle	.L45
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	insuu(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC10(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L46
.L45:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	insuu(%rip), %rax
	movl	(%rdx,%rax), %eax
	negl	%eax
	movl	%eax, %esi
	leaq	.LC11(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L46:
	addl	$1, -24(%rbp)
.L44:
	movl	jisuu(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L47
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.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:
