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>
//#include<string.h>

int top, S[1000];

void push(int x)
{
  S[++top] = x;
}

int pop()
{
  //top--;
  //return S[top+1];
  return S[top--];
}

int main()
{
  int a,b;
  top = 0;
  char s[100];
  while(scanf("%s", s) != EOF)
  {
    if(s[0] == '+')
    {
      a = pop();
      b = pop();
      push(a+b);
    }
    else if(s[0] == '-')
    {
      b = pop();
      a = pop();
      push(a-b);
    }
    else if(s[0] == '*')
    {
      a = pop();
      b = pop();
      push(a*b);
    }
    else push(atoi(s));
  }

  printf("%d\n", pop());

  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	top
	.bss
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 4000
S:
	.zero	4000
	.text
	.globl	push
	.type	push, @function
push:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	top(%rip), %eax
	addl	$1, %eax
	movl	%eax, top(%rip)
	movl	top(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	S(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	push, .-push
	.globl	pop
	.type	pop, @function
pop:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	top(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, top(%rip)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	pop, .-pop
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, top(%rip)
	jmp	.L5
.L9:
	movzbl	-112(%rbp), %eax
	cmpb	$43, %al
	jne	.L6
	movl	$0, %eax
	call	pop
	movl	%eax, -120(%rbp)
	movl	$0, %eax
	call	pop
	movl	%eax, -116(%rbp)
	movl	-120(%rbp), %edx
	movl	-116(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edi
	call	push
	jmp	.L5
.L6:
	movzbl	-112(%rbp), %eax
	cmpb	$45, %al
	jne	.L7
	movl	$0, %eax
	call	pop
	movl	%eax, -116(%rbp)
	movl	$0, %eax
	call	pop
	movl	%eax, -120(%rbp)
	movl	-120(%rbp), %eax
	subl	-116(%rbp), %eax
	movl	%eax, %edi
	call	push
	jmp	.L5
.L7:
	movzbl	-112(%rbp), %eax
	cmpb	$42, %al
	jne	.L8
	movl	$0, %eax
	call	pop
	movl	%eax, -120(%rbp)
	movl	$0, %eax
	call	pop
	movl	%eax, -116(%rbp)
	movl	-120(%rbp), %eax
	imull	-116(%rbp), %eax
	movl	%eax, %edi
	call	push
	jmp	.L5
.L8:
	leaq	-112(%rbp), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, %edi
	call	push
.L5:
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L9
	movl	$0, %eax
	call	pop
	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	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	push
	.type	push, @function
push:
.LFB39:
	.cfi_startproc
	endbr64
	movl	top(%rip), %eax
	leaq	S(%rip), %rdx
	addl	$1, %eax
	movl	%eax, top(%rip)
	cltq
	movl	%edi, (%rdx,%rax,4)
	ret
	.cfi_endproc
.LFE39:
	.size	push, .-push
	.p2align 4
	.globl	pop
	.type	pop, @function
pop:
.LFB40:
	.cfi_startproc
	endbr64
	movslq	top(%rip), %rax
	leal	-1(%rax), %edx
	movl	%edx, top(%rip)
	leaq	S(%rip), %rdx
	movl	(%rdx,%rax,4), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	pop, .-pop
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	S(%rip), %rbx
	subq	$112, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movl	$0, top(%rip)
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L13
	movzbl	(%rsp), %eax
	cmpb	$43, %al
	je	.L14
	cmpb	$45, %al
	je	.L15
	cmpb	$42, %al
	jne	.L9
	movslq	top(%rip), %rax
	leal	-1(%rax), %esi
	movslq	%esi, %rcx
	movl	%esi, top(%rip)
	movl	(%rbx,%rcx,4), %edx
	imull	(%rbx,%rax,4), %edx
	movl	%edx, (%rbx,%rcx,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	top(%rip), %rax
	leal	-1(%rax), %ecx
	movl	(%rbx,%rax,4), %eax
	movslq	%ecx, %rdx
	movl	%ecx, top(%rip)
	addl	%eax, (%rbx,%rdx,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	top(%rip), %rax
	leal	-1(%rax), %esi
	movslq	%esi, %rcx
	movl	%esi, top(%rip)
	movl	(%rbx,%rcx,4), %edx
	subl	(%rbx,%rax,4), %edx
	movl	%edx, (%rbx,%rcx,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	movl	$10, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	strtol@PLT
	movq	%rax, %r8
	movl	top(%rip), %eax
	addl	$1, %eax
	movl	%eax, top(%rip)
	cltq
	movl	%r8d, (%rbx,%rax,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L13:
	movslq	top(%rip), %rax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	leal	-1(%rax), %edx
	movl	%edx, top(%rip)
	movl	(%rbx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$112, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 4000
S:
	.zero	4000
	.globl	top
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.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	push
	.type	push, @function
push:
.LFB39:
	.cfi_startproc
	endbr64
	movl	top(%rip), %eax
	leaq	S(%rip), %rdx
	addl	$1, %eax
	movl	%eax, top(%rip)
	cltq
	movl	%edi, (%rdx,%rax,4)
	ret
	.cfi_endproc
.LFE39:
	.size	push, .-push
	.p2align 4
	.globl	pop
	.type	pop, @function
pop:
.LFB40:
	.cfi_startproc
	endbr64
	movslq	top(%rip), %rax
	leal	-1(%rax), %edx
	movl	%edx, top(%rip)
	leaq	S(%rip), %rdx
	movl	(%rdx,%rax,4), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	pop, .-pop
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	S(%rip), %rbx
	subq	$112, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movl	$0, top(%rip)
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L13
	movzbl	(%rsp), %eax
	cmpb	$43, %al
	je	.L14
	cmpb	$45, %al
	je	.L15
	cmpb	$42, %al
	jne	.L9
	movslq	top(%rip), %rax
	leal	-1(%rax), %esi
	movslq	%esi, %rcx
	movl	%esi, top(%rip)
	movl	(%rbx,%rcx,4), %edx
	imull	(%rbx,%rax,4), %edx
	movl	%edx, (%rbx,%rcx,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	top(%rip), %rax
	leal	-1(%rax), %ecx
	movl	(%rbx,%rax,4), %eax
	movslq	%ecx, %rdx
	movl	%ecx, top(%rip)
	addl	%eax, (%rbx,%rdx,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	top(%rip), %rax
	leal	-1(%rax), %esi
	movslq	%esi, %rcx
	movl	%esi, top(%rip)
	movl	(%rbx,%rcx,4), %edx
	subl	(%rbx,%rax,4), %edx
	movl	%edx, (%rbx,%rcx,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	movl	$10, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	strtol@PLT
	movq	%rax, %r8
	movl	top(%rip), %eax
	addl	$1, %eax
	movl	%eax, top(%rip)
	cltq
	movl	%r8d, (%rbx,%rax,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L13:
	movslq	top(%rip), %rax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	leal	-1(%rax), %edx
	movl	%edx, top(%rip)
	movl	(%rbx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$112, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 4000
S:
	.zero	4000
	.globl	top
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.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>
//#include<string.h>

int top, S[1000];

void push(int x)
{
  S[++top] = x;
}

int pop()
{
  //top--;
  //return S[top+1];
  return S[top--];
}

int main()
{
  int a,b;
  top = 0;
  char s[100];
  while(scanf("%s", s) != EOF)
  {
    if(s[0] == '+')
    {
      a = pop();
      b = pop();
      push(a+b);
    }
    else if(s[0] == '-')
    {
      b = pop();
      a = pop();
      push(a-b);
    }
    else if(s[0] == '*')
    {
      a = pop();
      b = pop();
      push(a*b);
    }
    else push(atoi(s));
  }

  printf("%d\n", pop());

  return 0;
}


1 4 + 3 4 - *
 1 3 +
 1 4 + 2 4 - *
 0 3 +
 1 1 + 2 4 - *
 0 3 *
 1 4 + 3 8 - *
 0 5 +
 1 1 + 3 4 - *
 1 4 * 3 1 - *

-5
 4
 -10
 3
 -4
 0
 -25
 5
 -2
 8

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>
//#include<string.h>

int top, S[1000];

void push(int x)
{
  S[++top] = x;
}

int pop()
{
  //top--;
  //return S[top+1];
  return S[top--];
}

int main()
{
  int a,b;
  top = 0;
  char s[100];
  while(scanf("%s", s) != EOF)
  {
    if(s[0] == '+')
    {
      a = pop();
      b = pop();
      push(a+b);
    }
    else if(s[0] == '-')
    {
      b = pop();
      a = pop();
      push(a-b);
    }
    else if(s[0] == '*')
    {
      a = pop();
      b = pop();
      push(a*b);
    }
    else push(atoi(s));
  }

  printf("%d\n", pop());

  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	top
	.bss
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 4000
S:
	.zero	4000
	.text
	.globl	push
	.type	push, @function
push:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	top(%rip), %eax
	addl	$1, %eax
	movl	%eax, top(%rip)
	movl	top(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	S(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	push, .-push
	.globl	pop
	.type	pop, @function
pop:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	top(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, top(%rip)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	pop, .-pop
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, top(%rip)
	jmp	.L5
.L9:
	movzbl	-112(%rbp), %eax
	cmpb	$43, %al
	jne	.L6
	movl	$0, %eax
	call	pop
	movl	%eax, -120(%rbp)
	movl	$0, %eax
	call	pop
	movl	%eax, -116(%rbp)
	movl	-120(%rbp), %edx
	movl	-116(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edi
	call	push
	jmp	.L5
.L6:
	movzbl	-112(%rbp), %eax
	cmpb	$45, %al
	jne	.L7
	movl	$0, %eax
	call	pop
	movl	%eax, -116(%rbp)
	movl	$0, %eax
	call	pop
	movl	%eax, -120(%rbp)
	movl	-120(%rbp), %eax
	subl	-116(%rbp), %eax
	movl	%eax, %edi
	call	push
	jmp	.L5
.L7:
	movzbl	-112(%rbp), %eax
	cmpb	$42, %al
	jne	.L8
	movl	$0, %eax
	call	pop
	movl	%eax, -120(%rbp)
	movl	$0, %eax
	call	pop
	movl	%eax, -116(%rbp)
	movl	-120(%rbp), %eax
	imull	-116(%rbp), %eax
	movl	%eax, %edi
	call	push
	jmp	.L5
.L8:
	leaq	-112(%rbp), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, %edi
	call	push
.L5:
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L9
	movl	$0, %eax
	call	pop
	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	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	top
	.bss
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 4000
S:
	.zero	4000
	.text
	.globl	push
	.type	push, @function
push:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	top(%rip), %eax
	addl	$1, %eax
	movl	%eax, top(%rip)
	movl	top(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	S(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	push, .-push
	.globl	pop
	.type	pop, @function
pop:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	top(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, top(%rip)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	pop, .-pop
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, top(%rip)
	jmp	.L5
.L9:
	movzbl	-112(%rbp), %eax
	cmpb	$43, %al
	jne	.L6
	movl	$0, %eax
	call	pop
	movl	%eax, -120(%rbp)
	movl	$0, %eax
	call	pop
	movl	%eax, -116(%rbp)
	movl	-120(%rbp), %edx
	movl	-116(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edi
	call	push
	jmp	.L5
.L6:
	movzbl	-112(%rbp), %eax
	cmpb	$45, %al
	jne	.L7
	movl	$0, %eax
	call	pop
	movl	%eax, -116(%rbp)
	movl	$0, %eax
	call	pop
	movl	%eax, -120(%rbp)
	movl	-120(%rbp), %eax
	subl	-116(%rbp), %eax
	movl	%eax, %edi
	call	push
	jmp	.L5
.L7:
	movzbl	-112(%rbp), %eax
	cmpb	$42, %al
	jne	.L8
	movl	$0, %eax
	call	pop
	movl	%eax, -120(%rbp)
	movl	$0, %eax
	call	pop
	movl	%eax, -116(%rbp)
	movl	-120(%rbp), %eax
	imull	-116(%rbp), %eax
	movl	%eax, %edi
	call	push
	jmp	.L5
.L8:
	leaq	-112(%rbp), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, %edi
	call	push
.L5:
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L9
	movl	$0, %eax
	call	pop
	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	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
