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

```c
/*
  AOJ 2044
  Title:Lying about Your Age
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
#define min(x,y) (((x)<(y))?(x):(y))

int a,c,saba;
char b[9];
int radix;

int dec2M(char *s,int rad,int num)
{
  int d,pos,i;

  memset(s,0,9);
  pos=0;
  while(1)
    {
      d = num % rad;
      if(d > 9)
	return(0);
      s[0]=d+'0';
      num /= rad;
      if(num==0)
	break;
      for(i=pos+2;i>0;i--)
	s[i]=s[i-1];
      pos++;
    }
  return(-1); // -1: '0~9' only
              // 0:  include 'a'~
}
int M2dec(char *s,int rad)
{
  int i,ret,n;

  ret=0;
  while(1)
    {
      n = (*s-'0');
      if(n >= rad)
	return(-1);
      ret+=n;
      s++;
      if(!*s)
	break;
      ret*=rad;
    }
  return(ret);
}

int cal_radix(int num,char *s)
{
  int i,limit,val;

  if(strlen(s)==1 && num == (s[0]-'0'))
    return(16);
  if(strlen(s)>2)
    limit=10;
  else
    limit=16;
  for(i=2;i<=16;i++)
    {
      val=M2dec(s,i);

      if(val==num)
	return(i);
      if(val>num)
	break;
    }
  return(-1);
}


int next_age(int num,int radix)
{
  int i=radix,prev_val,val;
  char prev_s[9],s[9];

  dec2M(prev_s,i,num-1);
  sscanf(prev_s,"%d",&prev_val);

  for(i=16;i>1;i--)
    {
      if(dec2M(s,i,num))
	{
	  sscanf(s,"%d",&val);
	  if(val >= prev_val)
	    return(i);
	}

    }
}
main()
{
  int ret,i;
  char result[9];
  
  while(scanf("%d %s %d",&a,&b[0],&c) && (a!=-1||c!=-1))
    {
      radix=cal_radix(a,b);
      if(radix==-1)
	{
	  printf("-1\n");
	  continue;
	}
      for(i=a+1;i<=c;i++)
	{
	  radix=next_age(i,radix);
	  //dec2M(result,radix,i);
	  //printf("%d %d %s\n",i,radix,result);
	}
      dec2M(result,radix,c);
      printf("%s\n",result);
    }
  
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	saba
	.align 4
	.type	saba, @object
	.size	saba, 4
saba:
	.zero	4
	.globl	b
	.align 8
	.type	b, @object
	.size	b, 9
b:
	.zero	9
	.globl	radix
	.align 4
	.type	radix, @object
	.size	radix, 4
radix:
	.zero	4
	.text
	.globl	dec2M
	.type	dec2M, @function
dec2M:
.LFB0:
	.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)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movq	-24(%rbp), %rax
	movl	$9, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -12(%rbp)
.L8:
	movl	-32(%rbp), %eax
	cltd
	idivl	-28(%rbp)
	movl	%edx, -4(%rbp)
	cmpl	$9, -4(%rbp)
	jle	.L2
	movl	$0, %eax
	jmp	.L3
.L2:
	movl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	movb	%dl, (%rax)
	movl	-32(%rbp), %eax
	cltd
	idivl	-28(%rbp)
	movl	%eax, -32(%rbp)
	cmpl	$0, -32(%rbp)
	je	.L10
	movl	-12(%rbp), %eax
	addl	$2, %eax
	movl	%eax, -8(%rbp)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	-1(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %edx
	movslq	%edx, %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rax), %eax
	movb	%al, (%rdx)
	subl	$1, -8(%rbp)
.L6:
	cmpl	$0, -8(%rbp)
	jg	.L7
	addl	$1, -12(%rbp)
	jmp	.L8
.L10:
	nop
	movl	$-1, %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dec2M, .-dec2M
	.globl	M2dec
	.type	M2dec, @function
M2dec:
.LFB1:
	.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)
	movl	$0, -8(%rbp)
.L16:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L12
	movl	$-1, %eax
	jmp	.L13
.L12:
	movl	-4(%rbp), %eax
	addl	%eax, -8(%rbp)
	addq	$1, -24(%rbp)
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L18
	movl	-8(%rbp), %eax
	imull	-28(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L16
.L18:
	nop
	movl	-8(%rbp), %eax
.L13:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	M2dec, .-M2dec
	.globl	cal_radix
	.type	cal_radix, @function
cal_radix:
.LFB2:
	.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
	movl	%edi, -20(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	$1, %rax
	jne	.L20
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	cmpl	%eax, -20(%rbp)
	jne	.L20
	movl	$16, %eax
	jmp	.L21
.L20:
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	$2, %rax
	jbe	.L22
	movl	$10, -8(%rbp)
	jmp	.L23
.L22:
	movl	$16, -8(%rbp)
.L23:
	movl	$2, -12(%rbp)
	jmp	.L24
.L28:
	movl	-12(%rbp), %edx
	movq	-32(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	M2dec
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jne	.L25
	movl	-12(%rbp), %eax
	jmp	.L21
.L25:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L29
	addl	$1, -12(%rbp)
.L24:
	cmpl	$16, -12(%rbp)
	jle	.L28
	jmp	.L27
.L29:
	nop
.L27:
	movl	$-1, %eax
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	cal_radix, .-cal_radix
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	next_age
	.type	next_age, @function
next_age:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movl	%edi, -52(%rbp)
	movl	%esi, -56(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	-56(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-52(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-32(%rbp), %ecx
	leaq	-26(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	dec2M
	leaq	-40(%rbp), %rdx
	leaq	-26(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$16, -32(%rbp)
	jmp	.L31
.L34:
	movl	-52(%rbp), %edx
	movl	-32(%rbp), %ecx
	leaq	-17(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	dec2M
	testl	%eax, %eax
	je	.L32
	leaq	-36(%rbp), %rdx
	leaq	-17(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-36(%rbp), %edx
	movl	-40(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L32
	movl	-32(%rbp), %eax
	jmp	.L30
.L32:
	subl	$1, -32(%rbp)
.L31:
	cmpl	$1, -32(%rbp)
	jg	.L34
.L30:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L35
	call	__stack_chk_fail@PLT
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	next_age, .-next_age
	.section	.rodata
.LC1:
	.string	"-1"
.LC2:
	.string	"%d %s %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L37
.L42:
	movl	a(%rip), %eax
	leaq	b(%rip), %rdx
	movq	%rdx, %rsi
	movl	%eax, %edi
	call	cal_radix
	movl	%eax, radix(%rip)
	movl	radix(%rip), %eax
	cmpl	$-1, %eax
	jne	.L38
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L37
.L38:
	movl	a(%rip), %eax
	addl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L39
.L40:
	movl	radix(%rip), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	next_age
	movl	%eax, radix(%rip)
	addl	$1, -24(%rbp)
.L39:
	movl	c(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L40
	movl	c(%rip), %edx
	movl	radix(%rip), %ecx
	leaq	-17(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	dec2M
	leaq	-17(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L37:
	leaq	c(%rip), %rax
	movq	%rax, %rcx
	leaq	b(%rip), %rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L41
	movl	a(%rip), %eax
	cmpl	$-1, %eax
	jne	.L42
	movl	c(%rip), %eax
	cmpl	$-1, %eax
	jne	.L42
.L41:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L44
	call	__stack_chk_fail@PLT
.L44:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	dec2M
	.type	dec2M, @function
dec2M:
.LFB35:
	.cfi_startproc
	endbr64
	movl	%edx, %eax
	movq	$0, (%rdi)
	cltd
	movb	$0, 8(%rdi)
	idivl	%esi
	cmpl	$9, %edx
	jg	.L18
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	addl	$48, %edx
	movq	%rdi, %r13
	leaq	1(%rdi), %rcx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	$2, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movl	%eax, %ebx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movb	%dl, (%rdi)
	testl	%eax, %eax
	jne	.L4
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L13:
	addl	$48, %edx
	addq	$1, %r12
	movb	%dl, 0(%r13)
	testl	%ebx, %ebx
	je	.L5
.L4:
	movq	%r12, %rdx
	movq	%rcx, %rdi
	movq	%r13, %rsi
	call	memmove@PLT
	movq	%rax, %rcx
	movl	%ebx, %eax
	cltd
	idivl	%ebp
	movl	%eax, %ebx
	cmpl	$9, %edx
	jle	.L13
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %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
.L5:
	.cfi_restore_state
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	movl	$-1, %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
.L18:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE35:
	.size	dec2M, .-dec2M
	.p2align 4
	.globl	M2dec
	.type	M2dec, @function
M2dec:
.LFB36:
	.cfi_startproc
	endbr64
	movsbl	(%rdi), %edx
	subl	$48, %edx
	cmpl	%edx, %esi
	jle	.L22
	xorl	%eax, %eax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L27:
	subl	$48, %edx
	imull	%esi, %eax
	cmpl	%esi, %edx
	jge	.L22
.L21:
	addq	$1, %rdi
	addl	%edx, %eax
	movsbl	(%rdi), %edx
	testb	%dl, %dl
	jne	.L27
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	movl	$-1, %eax
	ret
	.cfi_endproc
.LFE36:
	.size	M2dec, .-M2dec
	.p2align 4
	.globl	cal_radix
	.type	cal_radix, @function
cal_radix:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%edi, %ebp
	movq	%rsi, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rsi, %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	strlen@PLT
	movsbl	(%rbx), %edi
	subl	$48, %edi
	cmpq	$1, %rax
	je	.L44
.L31:
	movl	$2, %r8d
	.p2align 4,,10
	.p2align 3
.L34:
	cmpl	%r8d, %edi
	jge	.L37
	movl	%edi, %eax
	movq	%rbx, %rcx
	xorl	%edx, %edx
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L45:
	subl	$48, %eax
	imull	%r8d, %edx
	cmpl	%r8d, %eax
	jge	.L37
.L33:
	addq	$1, %rcx
	addl	%eax, %edx
	movsbl	(%rcx), %eax
	testb	%al, %al
	jne	.L45
.L32:
	cmpl	%edx, %ebp
	je	.L28
	jl	.L36
	addl	$1, %r8d
	cmpl	$17, %r8d
	jne	.L34
.L36:
	movl	$-1, %r8d
.L28:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movl	%r8d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	.cfi_restore_state
	movl	$-1, %edx
	jmp	.L32
.L44:
	cmpl	%ebp, %edi
	jne	.L31
	movl	$16, %r8d
	jmp	.L28
	.cfi_endproc
.LFE37:
	.size	cal_radix, .-cal_radix
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.text
	.p2align 4
	.globl	next_age
	.type	next_age, @function
next_age:
.LFB38:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%edi, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leal	-1(%rdi), %eax
	movb	$0, 46(%rsp)
	movq	$0, 38(%rsp)
	cltd
	idivl	%esi
	cmpl	$9, %edx
	jg	.L74
	addl	$48, %edx
	movl	%eax, %ebx
	movb	%dl, 38(%rsp)
	testl	%eax, %eax
	je	.L74
	movl	%esi, %ebp
	movl	$2, %r12d
	leaq	38(%rsp), %r15
	leaq	39(%rsp), %rcx
	jmp	.L50
.L71:
	addl	$48, %edx
	addq	$1, %r12
	movb	%dl, 38(%rsp)
	testl	%ebx, %ebx
	je	.L49
.L50:
	movq	%r12, %rdx
	movq	%rcx, %rdi
	movq	%r15, %rsi
	call	memmove@PLT
	movq	%rax, %rcx
	movl	%ebx, %eax
	cltd
	idivl	%ebp
	movl	%eax, %ebx
	cmpl	$9, %edx
	jle	.L71
.L49:
	movq	%r15, %rdi
	leaq	28(%rsp), %rdx
	xorl	%eax, %eax
	movl	$16, %r12d
	leaq	.LC0(%rip), %r14
	leaq	47(%rsp), %rbp
	movq	%r14, %rsi
	leaq	32(%rsp), %r15
	call	__isoc99_sscanf@PLT
	.p2align 4,,10
	.p2align 3
.L48:
	movl	12(%rsp), %eax
	movq	$0, 0(%rbp)
	movb	$0, 8(%rbp)
	cltd
	idivl	%r12d
	cmpl	$9, %edx
	jg	.L52
	addl	$48, %edx
	movl	%eax, %ebx
	movb	%dl, 47(%rsp)
	testl	%eax, %eax
	je	.L53
	movl	$2, %r13d
	leaq	48(%rsp), %rdi
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L72:
	addl	$48, %edx
	addq	$1, %r13
	movb	%dl, 47(%rsp)
	testl	%ebx, %ebx
	je	.L53
.L54:
	movq	%r13, %rdx
	movq	%rbp, %rsi
	call	memmove@PLT
	movq	%rax, %rdi
	movl	%ebx, %eax
	cltd
	idivl	%r12d
	movl	%eax, %ebx
	cmpl	$9, %edx
	jle	.L72
.L52:
	subl	$1, %r12d
	cmpl	$1, %r12d
	jne	.L48
.L46:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L76
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r12d, %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
.L53:
	.cfi_restore_state
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	28(%rsp), %eax
	cmpl	%eax, 32(%rsp)
	jge	.L46
	subl	$1, %r12d
	cmpl	$1, %r12d
	jne	.L48
	jmp	.L46
.L74:
	leaq	38(%rsp), %r15
	jmp	.L49
.L76:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE38:
	.size	next_age, .-next_age
	.section	.rodata.str1.1
.LC1:
	.string	"%d %s %d"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	56(%rsp), %rax
	movq	%rax, 40(%rsp)
.L78:
	xorl	%eax, %eax
	leaq	c(%rip), %rcx
	leaq	b(%rip), %rdx
	leaq	a(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L100
	movl	a(%rip), %r13d
	movl	c(%rip), %ebx
	movl	%r13d, %eax
	andl	%ebx, %eax
	cmpl	$-1, %eax
	je	.L100
	leaq	b(%rip), %rdi
	movl	$2, %r15d
	call	strlen@PLT
	leaq	b(%rip), %rcx
	movsbl	(%rcx), %edi
	subl	$48, %edi
	cmpq	$1, %rax
	je	.L150
.L138:
	cmpl	%edi, %r15d
	jle	.L106
	movl	%edi, %eax
	xorl	%edx, %edx
	leaq	b(%rip), %rcx
	jmp	.L82
	.p2align 4,,10
	.p2align 3
.L151:
	subl	$48, %eax
	imull	%r15d, %edx
	cmpl	%r15d, %eax
	jge	.L106
.L82:
	addq	$1, %rcx
	addl	%eax, %edx
	movsbl	(%rcx), %eax
	testb	%al, %al
	jne	.L151
	cmpl	%edx, %r13d
	je	.L80
.L152:
	jl	.L83
	addl	$1, %r15d
	cmpl	$17, %r15d
	jne	.L138
.L83:
	leaq	.LC2(%rip), %rdi
	movl	$-1, radix(%rip)
	call	puts@PLT
	jmp	.L78
.L106:
	movl	$-1, %edx
	cmpl	%edx, %r13d
	jne	.L152
.L80:
	leal	1(%r13), %eax
	movl	%r15d, radix(%rip)
	movl	%eax, 8(%rsp)
	cmpl	%eax, %ebx
	jl	.L84
	leaq	52(%rsp), %rax
	leaq	70(%rsp), %r14
	movq	%rax, 24(%rsp)
	leaq	71(%rsp), %rax
	leaq	79(%rsp), %rbp
	movq	%rax, 32(%rsp)
	movl	8(%rsp), %eax
	leaq	80(%rsp), %r12
.L94:
	subl	$1, %eax
	movq	$0, (%r14)
	cltd
	movb	$0, 8(%r14)
	idivl	%r15d
	cmpl	$9, %edx
	jg	.L87
	addl	$48, %edx
	movl	%eax, %ebx
	movb	%dl, 70(%rsp)
	testl	%eax, %eax
	je	.L87
	movq	32(%rsp), %rcx
	movl	$2, %r13d
	jmp	.L88
.L139:
	addl	$48, %edx
	addq	$1, %r13
	movb	%dl, 70(%rsp)
	testl	%ebx, %ebx
	je	.L87
.L88:
	movq	%r13, %rdx
	movq	%rcx, %rdi
	movq	%r14, %rsi
	call	memmove@PLT
	movq	%rax, %rcx
	movl	%ebx, %eax
	cltd
	idivl	%r15d
	movl	%eax, %ebx
	cmpl	$9, %edx
	jle	.L139
.L87:
	movq	24(%rsp), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	movl	$16, %ebx
	leaq	.LC0(%rip), %rsi
	call	__isoc99_sscanf@PLT
	movq	%r14, 16(%rsp)
	movq	40(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L86:
	movl	8(%rsp), %eax
	movq	$0, 0(%rbp)
	movb	$0, 8(%rbp)
	cltd
	idivl	%ebx
	cmpl	$9, %edx
	jg	.L90
	addl	$48, %edx
	movl	%eax, %r13d
	movb	%dl, 79(%rsp)
	testl	%eax, %eax
	je	.L91
	movl	$2, %r14d
	jmp	.L92
	.p2align 4,,10
	.p2align 3
.L93:
	addl	$48, %edx
	addq	$1, %r14
	movb	%dl, 79(%rsp)
	testl	%r13d, %r13d
	je	.L91
.L92:
	movq	%r14, %rdx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	memmove@PLT
	movl	%r13d, %eax
	cltd
	idivl	%ebx
	movl	%eax, %r13d
	cmpl	$9, %edx
	jle	.L93
.L90:
	subl	$1, %ebx
	cmpl	$1, %ebx
	jne	.L86
	movq	16(%rsp), %r14
.L102:
	movl	12(%rsp), %eax
	addl	$1, 8(%rsp)
	movl	c(%rip), %ebx
	movl	12(%rsp), %r15d
	movl	%eax, radix(%rip)
	movl	8(%rsp), %eax
	cmpl	%eax, %ebx
	jge	.L94
.L84:
	movl	%ebx, %eax
	movb	$0, 69(%rsp)
	leaq	61(%rsp), %rbp
	movq	$0, 61(%rsp)
	cltd
	idivl	%r15d
	movl	%eax, %ebx
	cmpl	$9, %edx
	jg	.L97
	addl	$48, %edx
	movb	%dl, 61(%rsp)
	testl	%eax, %eax
	je	.L97
	movl	$2, %r12d
	leaq	62(%rsp), %rdi
	jmp	.L98
.L140:
	addl	$48, %edx
	addq	$1, %r12
	movb	%dl, 61(%rsp)
	testl	%ebx, %ebx
	je	.L97
.L98:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	call	memmove@PLT
	movq	%rax, %rdi
	movl	%ebx, %eax
	cltd
	idivl	%r15d
	movl	%eax, %ebx
	cmpl	$9, %edx
	jle	.L140
.L97:
	movq	%rbp, %rdi
	call	puts@PLT
	jmp	.L78
.L91:
	movq	%r15, %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	52(%rsp), %eax
	cmpl	%eax, 56(%rsp)
	jl	.L90
	movl	%ebx, 12(%rsp)
	movq	16(%rsp), %r14
	jmp	.L102
.L150:
	cmpl	%edi, %r13d
	jne	.L138
	movl	$16, %r15d
	jmp	.L80
.L100:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L153
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L153:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	radix
	.bss
	.align 4
	.type	radix, @object
	.size	radix, 4
radix:
	.zero	4
	.globl	b
	.align 8
	.type	b, @object
	.size	b, 9
b:
	.zero	9
	.globl	saba
	.align 4
	.type	saba, @object
	.size	saba, 4
saba:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.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	dec2M
	.type	dec2M, @function
dec2M:
.LFB35:
	.cfi_startproc
	endbr64
	movl	%edx, %eax
	movq	$0, (%rdi)
	cltd
	movb	$0, 8(%rdi)
	idivl	%esi
	cmpl	$9, %edx
	jg	.L18
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	addl	$48, %edx
	movq	%rdi, %r13
	leaq	1(%rdi), %rcx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	$2, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movl	%eax, %ebx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movb	%dl, (%rdi)
	testl	%eax, %eax
	jne	.L4
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L13:
	addl	$48, %edx
	addq	$1, %r12
	movb	%dl, 0(%r13)
	testl	%ebx, %ebx
	je	.L5
.L4:
	movq	%r12, %rdx
	movq	%rcx, %rdi
	movq	%r13, %rsi
	call	memmove@PLT
	movq	%rax, %rcx
	movl	%ebx, %eax
	cltd
	idivl	%ebp
	movl	%eax, %ebx
	cmpl	$9, %edx
	jle	.L13
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %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
.L5:
	.cfi_restore_state
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	movl	$-1, %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
.L18:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE35:
	.size	dec2M, .-dec2M
	.p2align 4
	.globl	M2dec
	.type	M2dec, @function
M2dec:
.LFB36:
	.cfi_startproc
	endbr64
	movsbl	(%rdi), %edx
	subl	$48, %edx
	cmpl	%edx, %esi
	jle	.L22
	xorl	%eax, %eax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L27:
	subl	$48, %edx
	imull	%esi, %eax
	cmpl	%esi, %edx
	jge	.L22
.L21:
	addq	$1, %rdi
	addl	%edx, %eax
	movsbl	(%rdi), %edx
	testb	%dl, %dl
	jne	.L27
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	movl	$-1, %eax
	ret
	.cfi_endproc
.LFE36:
	.size	M2dec, .-M2dec
	.p2align 4
	.globl	cal_radix
	.type	cal_radix, @function
cal_radix:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%edi, %ebp
	movq	%rsi, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rsi, %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	strlen@PLT
	movsbl	(%rbx), %edi
	subl	$48, %edi
	cmpq	$1, %rax
	je	.L44
.L31:
	movl	$2, %r8d
	.p2align 4,,10
	.p2align 3
.L34:
	cmpl	%r8d, %edi
	jge	.L37
	movl	%edi, %eax
	movq	%rbx, %rcx
	xorl	%edx, %edx
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L45:
	subl	$48, %eax
	imull	%r8d, %edx
	cmpl	%r8d, %eax
	jge	.L37
.L33:
	addq	$1, %rcx
	addl	%eax, %edx
	movsbl	(%rcx), %eax
	testb	%al, %al
	jne	.L45
.L32:
	cmpl	%edx, %ebp
	je	.L28
	jl	.L36
	addl	$1, %r8d
	cmpl	$17, %r8d
	jne	.L34
.L36:
	movl	$-1, %r8d
.L28:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movl	%r8d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	.cfi_restore_state
	movl	$-1, %edx
	jmp	.L32
.L44:
	cmpl	%ebp, %edi
	jne	.L31
	movl	$16, %r8d
	jmp	.L28
	.cfi_endproc
.LFE37:
	.size	cal_radix, .-cal_radix
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.text
	.p2align 4
	.globl	next_age
	.type	next_age, @function
next_age:
.LFB38:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%edi, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leal	-1(%rdi), %eax
	movb	$0, 46(%rsp)
	movq	$0, 38(%rsp)
	cltd
	idivl	%esi
	cmpl	$9, %edx
	jg	.L74
	addl	$48, %edx
	movl	%eax, %ebx
	movb	%dl, 38(%rsp)
	testl	%eax, %eax
	je	.L74
	movl	%esi, %ebp
	movl	$2, %r12d
	leaq	38(%rsp), %r15
	leaq	39(%rsp), %rcx
	jmp	.L50
.L71:
	addl	$48, %edx
	addq	$1, %r12
	movb	%dl, 38(%rsp)
	testl	%ebx, %ebx
	je	.L49
.L50:
	movq	%r12, %rdx
	movq	%rcx, %rdi
	movq	%r15, %rsi
	call	memmove@PLT
	movq	%rax, %rcx
	movl	%ebx, %eax
	cltd
	idivl	%ebp
	movl	%eax, %ebx
	cmpl	$9, %edx
	jle	.L71
.L49:
	movq	%r15, %rdi
	leaq	28(%rsp), %rdx
	xorl	%eax, %eax
	movl	$16, %r12d
	leaq	.LC0(%rip), %r14
	leaq	47(%rsp), %rbp
	movq	%r14, %rsi
	leaq	32(%rsp), %r15
	call	__isoc99_sscanf@PLT
	.p2align 4,,10
	.p2align 3
.L48:
	movl	12(%rsp), %eax
	movq	$0, 0(%rbp)
	movb	$0, 8(%rbp)
	cltd
	idivl	%r12d
	cmpl	$9, %edx
	jg	.L52
	addl	$48, %edx
	movl	%eax, %ebx
	movb	%dl, 47(%rsp)
	testl	%eax, %eax
	je	.L53
	movl	$2, %r13d
	leaq	48(%rsp), %rdi
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L72:
	addl	$48, %edx
	addq	$1, %r13
	movb	%dl, 47(%rsp)
	testl	%ebx, %ebx
	je	.L53
.L54:
	movq	%r13, %rdx
	movq	%rbp, %rsi
	call	memmove@PLT
	movq	%rax, %rdi
	movl	%ebx, %eax
	cltd
	idivl	%r12d
	movl	%eax, %ebx
	cmpl	$9, %edx
	jle	.L72
.L52:
	subl	$1, %r12d
	cmpl	$1, %r12d
	jne	.L48
.L46:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L76
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r12d, %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
.L53:
	.cfi_restore_state
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	28(%rsp), %eax
	cmpl	%eax, 32(%rsp)
	jge	.L46
	subl	$1, %r12d
	cmpl	$1, %r12d
	jne	.L48
	jmp	.L46
.L74:
	leaq	38(%rsp), %r15
	jmp	.L49
.L76:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE38:
	.size	next_age, .-next_age
	.section	.rodata.str1.1
.LC1:
	.string	"%d %s %d"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	56(%rsp), %rax
	movq	%rax, 40(%rsp)
.L78:
	xorl	%eax, %eax
	leaq	c(%rip), %rcx
	leaq	b(%rip), %rdx
	leaq	a(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L100
	movl	a(%rip), %r13d
	movl	c(%rip), %ebx
	movl	%r13d, %eax
	andl	%ebx, %eax
	cmpl	$-1, %eax
	je	.L100
	leaq	b(%rip), %rdi
	movl	$2, %r15d
	call	strlen@PLT
	leaq	b(%rip), %rcx
	movsbl	(%rcx), %edi
	subl	$48, %edi
	cmpq	$1, %rax
	je	.L150
.L138:
	cmpl	%edi, %r15d
	jle	.L106
	movl	%edi, %eax
	xorl	%edx, %edx
	leaq	b(%rip), %rcx
	jmp	.L82
	.p2align 4,,10
	.p2align 3
.L151:
	subl	$48, %eax
	imull	%r15d, %edx
	cmpl	%r15d, %eax
	jge	.L106
.L82:
	addq	$1, %rcx
	addl	%eax, %edx
	movsbl	(%rcx), %eax
	testb	%al, %al
	jne	.L151
	cmpl	%edx, %r13d
	je	.L80
.L152:
	jl	.L83
	addl	$1, %r15d
	cmpl	$17, %r15d
	jne	.L138
.L83:
	leaq	.LC2(%rip), %rdi
	movl	$-1, radix(%rip)
	call	puts@PLT
	jmp	.L78
.L106:
	movl	$-1, %edx
	cmpl	%edx, %r13d
	jne	.L152
.L80:
	leal	1(%r13), %eax
	movl	%r15d, radix(%rip)
	movl	%eax, 8(%rsp)
	cmpl	%eax, %ebx
	jl	.L84
	leaq	52(%rsp), %rax
	leaq	70(%rsp), %r14
	movq	%rax, 24(%rsp)
	leaq	71(%rsp), %rax
	leaq	79(%rsp), %rbp
	movq	%rax, 32(%rsp)
	movl	8(%rsp), %eax
	leaq	80(%rsp), %r12
.L94:
	subl	$1, %eax
	movq	$0, (%r14)
	cltd
	movb	$0, 8(%r14)
	idivl	%r15d
	cmpl	$9, %edx
	jg	.L87
	addl	$48, %edx
	movl	%eax, %ebx
	movb	%dl, 70(%rsp)
	testl	%eax, %eax
	je	.L87
	movq	32(%rsp), %rcx
	movl	$2, %r13d
	jmp	.L88
.L139:
	addl	$48, %edx
	addq	$1, %r13
	movb	%dl, 70(%rsp)
	testl	%ebx, %ebx
	je	.L87
.L88:
	movq	%r13, %rdx
	movq	%rcx, %rdi
	movq	%r14, %rsi
	call	memmove@PLT
	movq	%rax, %rcx
	movl	%ebx, %eax
	cltd
	idivl	%r15d
	movl	%eax, %ebx
	cmpl	$9, %edx
	jle	.L139
.L87:
	movq	24(%rsp), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	movl	$16, %ebx
	leaq	.LC0(%rip), %rsi
	call	__isoc99_sscanf@PLT
	movq	%r14, 16(%rsp)
	movq	40(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L86:
	movl	8(%rsp), %eax
	movq	$0, 0(%rbp)
	movb	$0, 8(%rbp)
	cltd
	idivl	%ebx
	cmpl	$9, %edx
	jg	.L90
	addl	$48, %edx
	movl	%eax, %r13d
	movb	%dl, 79(%rsp)
	testl	%eax, %eax
	je	.L91
	movl	$2, %r14d
	jmp	.L92
	.p2align 4,,10
	.p2align 3
.L93:
	addl	$48, %edx
	addq	$1, %r14
	movb	%dl, 79(%rsp)
	testl	%r13d, %r13d
	je	.L91
.L92:
	movq	%r14, %rdx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	memmove@PLT
	movl	%r13d, %eax
	cltd
	idivl	%ebx
	movl	%eax, %r13d
	cmpl	$9, %edx
	jle	.L93
.L90:
	subl	$1, %ebx
	cmpl	$1, %ebx
	jne	.L86
	movq	16(%rsp), %r14
.L102:
	movl	12(%rsp), %eax
	addl	$1, 8(%rsp)
	movl	c(%rip), %ebx
	movl	12(%rsp), %r15d
	movl	%eax, radix(%rip)
	movl	8(%rsp), %eax
	cmpl	%eax, %ebx
	jge	.L94
.L84:
	movl	%ebx, %eax
	movb	$0, 69(%rsp)
	leaq	61(%rsp), %rbp
	movq	$0, 61(%rsp)
	cltd
	idivl	%r15d
	movl	%eax, %ebx
	cmpl	$9, %edx
	jg	.L97
	addl	$48, %edx
	movb	%dl, 61(%rsp)
	testl	%eax, %eax
	je	.L97
	movl	$2, %r12d
	leaq	62(%rsp), %rdi
	jmp	.L98
.L140:
	addl	$48, %edx
	addq	$1, %r12
	movb	%dl, 61(%rsp)
	testl	%ebx, %ebx
	je	.L97
.L98:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	call	memmove@PLT
	movq	%rax, %rdi
	movl	%ebx, %eax
	cltd
	idivl	%r15d
	movl	%eax, %ebx
	cmpl	$9, %edx
	jle	.L140
.L97:
	movq	%rbp, %rdi
	call	puts@PLT
	jmp	.L78
.L91:
	movq	%r15, %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	52(%rsp), %eax
	cmpl	%eax, 56(%rsp)
	jl	.L90
	movl	%ebx, 12(%rsp)
	movq	16(%rsp), %r14
	jmp	.L102
.L150:
	cmpl	%edi, %r13d
	jne	.L138
	movl	$16, %r15d
	jmp	.L80
.L100:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L153
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L153:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	radix
	.bss
	.align 4
	.type	radix, @object
	.size	radix, 4
radix:
	.zero	4
	.globl	b
	.align 8
	.type	b, @object
	.size	b, 9
b:
	.zero	9
	.globl	saba
	.align 4
	.type	saba, @object
	.size	saba, 4
saba:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.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:

/*
  AOJ 2044
  Title:Lying about Your Age
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
#define min(x,y) (((x)<(y))?(x):(y))

int a,c,saba;
char b[9];
int radix;

int dec2M(char *s,int rad,int num)
{
  int d,pos,i;

  memset(s,0,9);
  pos=0;
  while(1)
    {
      d = num % rad;
      if(d > 9)
	return(0);
      s[0]=d+'0';
      num /= rad;
      if(num==0)
	break;
      for(i=pos+2;i>0;i--)
	s[i]=s[i-1];
      pos++;
    }
  return(-1); // -1: '0~9' only
              // 0:  include 'a'~
}
int M2dec(char *s,int rad)
{
  int i,ret,n;

  ret=0;
  while(1)
    {
      n = (*s-'0');
      if(n >= rad)
	return(-1);
      ret+=n;
      s++;
      if(!*s)
	break;
      ret*=rad;
    }
  return(ret);
}

int cal_radix(int num,char *s)
{
  int i,limit,val;

  if(strlen(s)==1 && num == (s[0]-'0'))
    return(16);
  if(strlen(s)>2)
    limit=10;
  else
    limit=16;
  for(i=2;i<=16;i++)
    {
      val=M2dec(s,i);

      if(val==num)
	return(i);
      if(val>num)
	break;
    }
  return(-1);
}


int next_age(int num,int radix)
{
  int i=radix,prev_val,val;
  char prev_s[9],s[9];

  dec2M(prev_s,i,num-1);
  sscanf(prev_s,"%d",&prev_val);

  for(i=16;i>1;i--)
    {
      if(dec2M(s,i,num))
	{
	  sscanf(s,"%d",&val);
	  if(val >= prev_val)
	    return(i);
	}

    }
}
main()
{
  int ret,i;
  char result[9];
  
  while(scanf("%d %s %d",&a,&b[0],&c) && (a!=-1||c!=-1))
    {
      radix=cal_radix(a,b);
      if(radix==-1)
	{
	  printf("-1\n");
	  continue;
	}
      for(i=a+1;i<=c;i++)
	{
	  radix=next_age(i,radix);
	  //dec2M(result,radix,i);
	  //printf("%d %d %s\n",i,radix,result);
	}
      dec2M(result,radix,c);
      printf("%s\n",result);
    }
  
  return(0);
}
23 29 53
46 30 47
-1 -1 -1
 23 18 53
91 30 47
-1 -1 -1
 23 18 97
91 22 47
-1 -1 -1
 23 18 37
91 30 47
-1 -1 -1
 23 29 53
46 37 47
-1 -1 -1
 23 29 53
46 37 67
-1 -1 -1
 23 18 138
91 22 90
-1 -1 -1
 8 13 73
92 30 60
-1 -1 -1
 12 13 28
156 56 8
-1 -1 -1
 8 8 19
92 30 47
-1 -1 -1

-1
-1
 49
-1
 97
-1
 31
-1
 -1
38
 -1
67
 138
-1
 73
-1
 22
-1
 13
-1

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

```c
/*
  AOJ 2044
  Title:Lying about Your Age
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
#define min(x,y) (((x)<(y))?(x):(y))

int a,c,saba;
char b[9];
int radix;

int dec2M(char *s,int rad,int num)
{
  int d,pos,i;

  memset(s,0,9);
  pos=0;
  while(1)
    {
      d = num % rad;
      if(d > 9)
	return(0);
      s[0]=d+'0';
      num /= rad;
      if(num==0)
	break;
      for(i=pos+2;i>0;i--)
	s[i]=s[i-1];
      pos++;
    }
  return(-1); // -1: '0~9' only
              // 0:  include 'a'~
}
int M2dec(char *s,int rad)
{
  int i,ret,n;

  ret=0;
  while(1)
    {
      n = (*s-'0');
      if(n >= rad)
	return(-1);
      ret+=n;
      s++;
      if(!*s)
	break;
      ret*=rad;
    }
  return(ret);
}

int cal_radix(int num,char *s)
{
  int i,limit,val;

  if(strlen(s)==1 && num == (s[0]-'0'))
    return(16);
  if(strlen(s)>2)
    limit=10;
  else
    limit=16;
  for(i=2;i<=16;i++)
    {
      val=M2dec(s,i);

      if(val==num)
	return(i);
      if(val>num)
	break;
    }
  return(-1);
}


int next_age(int num,int radix)
{
  int i=radix,prev_val,val;
  char prev_s[9],s[9];

  dec2M(prev_s,i,num-1);
  sscanf(prev_s,"%d",&prev_val);

  for(i=16;i>1;i--)
    {
      if(dec2M(s,i,num))
	{
	  sscanf(s,"%d",&val);
	  if(val >= prev_val)
	    return(i);
	}

    }
}
main()
{
  int ret,i;
  char result[9];
  
  while(scanf("%d %s %d",&a,&b[0],&c) && (a!=-1||c!=-1))
    {
      radix=cal_radix(a,b);
      if(radix==-1)
	{
	  printf("-1\n");
	  continue;
	}
      for(i=a+1;i<=c;i++)
	{
	  radix=next_age(i,radix);
	  //dec2M(result,radix,i);
	  //printf("%d %d %s\n",i,radix,result);
	}
      dec2M(result,radix,c);
      printf("%s\n",result);
    }
  
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	saba
	.align 4
	.type	saba, @object
	.size	saba, 4
saba:
	.zero	4
	.globl	b
	.align 8
	.type	b, @object
	.size	b, 9
b:
	.zero	9
	.globl	radix
	.align 4
	.type	radix, @object
	.size	radix, 4
radix:
	.zero	4
	.text
	.globl	dec2M
	.type	dec2M, @function
dec2M:
.LFB0:
	.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)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movq	-24(%rbp), %rax
	movl	$9, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -12(%rbp)
.L8:
	movl	-32(%rbp), %eax
	cltd
	idivl	-28(%rbp)
	movl	%edx, -4(%rbp)
	cmpl	$9, -4(%rbp)
	jle	.L2
	movl	$0, %eax
	jmp	.L3
.L2:
	movl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	movb	%dl, (%rax)
	movl	-32(%rbp), %eax
	cltd
	idivl	-28(%rbp)
	movl	%eax, -32(%rbp)
	cmpl	$0, -32(%rbp)
	je	.L10
	movl	-12(%rbp), %eax
	addl	$2, %eax
	movl	%eax, -8(%rbp)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	-1(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %edx
	movslq	%edx, %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rax), %eax
	movb	%al, (%rdx)
	subl	$1, -8(%rbp)
.L6:
	cmpl	$0, -8(%rbp)
	jg	.L7
	addl	$1, -12(%rbp)
	jmp	.L8
.L10:
	nop
	movl	$-1, %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dec2M, .-dec2M
	.globl	M2dec
	.type	M2dec, @function
M2dec:
.LFB1:
	.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)
	movl	$0, -8(%rbp)
.L16:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L12
	movl	$-1, %eax
	jmp	.L13
.L12:
	movl	-4(%rbp), %eax
	addl	%eax, -8(%rbp)
	addq	$1, -24(%rbp)
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L18
	movl	-8(%rbp), %eax
	imull	-28(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L16
.L18:
	nop
	movl	-8(%rbp), %eax
.L13:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	M2dec, .-M2dec
	.globl	cal_radix
	.type	cal_radix, @function
cal_radix:
.LFB2:
	.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
	movl	%edi, -20(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	$1, %rax
	jne	.L20
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	cmpl	%eax, -20(%rbp)
	jne	.L20
	movl	$16, %eax
	jmp	.L21
.L20:
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	$2, %rax
	jbe	.L22
	movl	$10, -8(%rbp)
	jmp	.L23
.L22:
	movl	$16, -8(%rbp)
.L23:
	movl	$2, -12(%rbp)
	jmp	.L24
.L28:
	movl	-12(%rbp), %edx
	movq	-32(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	M2dec
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jne	.L25
	movl	-12(%rbp), %eax
	jmp	.L21
.L25:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L29
	addl	$1, -12(%rbp)
.L24:
	cmpl	$16, -12(%rbp)
	jle	.L28
	jmp	.L27
.L29:
	nop
.L27:
	movl	$-1, %eax
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	cal_radix, .-cal_radix
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	next_age
	.type	next_age, @function
next_age:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movl	%edi, -52(%rbp)
	movl	%esi, -56(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	-56(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-52(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-32(%rbp), %ecx
	leaq	-26(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	dec2M
	leaq	-40(%rbp), %rdx
	leaq	-26(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$16, -32(%rbp)
	jmp	.L31
.L34:
	movl	-52(%rbp), %edx
	movl	-32(%rbp), %ecx
	leaq	-17(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	dec2M
	testl	%eax, %eax
	je	.L32
	leaq	-36(%rbp), %rdx
	leaq	-17(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-36(%rbp), %edx
	movl	-40(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L32
	movl	-32(%rbp), %eax
	jmp	.L30
.L32:
	subl	$1, -32(%rbp)
.L31:
	cmpl	$1, -32(%rbp)
	jg	.L34
.L30:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L35
	call	__stack_chk_fail@PLT
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	next_age, .-next_age
	.section	.rodata
.LC1:
	.string	"-1"
.LC2:
	.string	"%d %s %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L37
.L42:
	movl	a(%rip), %eax
	leaq	b(%rip), %rdx
	movq	%rdx, %rsi
	movl	%eax, %edi
	call	cal_radix
	movl	%eax, radix(%rip)
	movl	radix(%rip), %eax
	cmpl	$-1, %eax
	jne	.L38
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L37
.L38:
	movl	a(%rip), %eax
	addl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L39
.L40:
	movl	radix(%rip), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	next_age
	movl	%eax, radix(%rip)
	addl	$1, -24(%rbp)
.L39:
	movl	c(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L40
	movl	c(%rip), %edx
	movl	radix(%rip), %ecx
	leaq	-17(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	dec2M
	leaq	-17(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L37:
	leaq	c(%rip), %rax
	movq	%rax, %rcx
	leaq	b(%rip), %rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L41
	movl	a(%rip), %eax
	cmpl	$-1, %eax
	jne	.L42
	movl	c(%rip), %eax
	cmpl	$-1, %eax
	jne	.L42
.L41:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L44
	call	__stack_chk_fail@PLT
.L44:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	a
	.bss
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	saba
	.align 4
	.type	saba, @object
	.size	saba, 4
saba:
	.zero	4
	.globl	b
	.align 8
	.type	b, @object
	.size	b, 9
b:
	.zero	9
	.globl	radix
	.align 4
	.type	radix, @object
	.size	radix, 4
radix:
	.zero	4
	.text
	.globl	dec2M
	.type	dec2M, @function
dec2M:
.LFB0:
	.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)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movq	-24(%rbp), %rax
	movl	$9, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -12(%rbp)
.L8:
	movl	-32(%rbp), %eax
	cltd
	idivl	-28(%rbp)
	movl	%edx, -4(%rbp)
	cmpl	$9, -4(%rbp)
	jle	.L2
	movl	$0, %eax
	jmp	.L3
.L2:
	movl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	movb	%dl, (%rax)
	movl	-32(%rbp), %eax
	cltd
	idivl	-28(%rbp)
	movl	%eax, -32(%rbp)
	cmpl	$0, -32(%rbp)
	je	.L10
	movl	-12(%rbp), %eax
	addl	$2, %eax
	movl	%eax, -8(%rbp)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	leaq	-1(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %edx
	movslq	%edx, %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rax), %eax
	movb	%al, (%rdx)
	subl	$1, -8(%rbp)
.L6:
	cmpl	$0, -8(%rbp)
	jg	.L7
	addl	$1, -12(%rbp)
	jmp	.L8
.L10:
	nop
	movl	$-1, %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dec2M, .-dec2M
	.globl	M2dec
	.type	M2dec, @function
M2dec:
.LFB1:
	.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)
	movl	$0, -8(%rbp)
.L16:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L12
	movl	$-1, %eax
	jmp	.L13
.L12:
	movl	-4(%rbp), %eax
	addl	%eax, -8(%rbp)
	addq	$1, -24(%rbp)
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L18
	movl	-8(%rbp), %eax
	imull	-28(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L16
.L18:
	nop
	movl	-8(%rbp), %eax
.L13:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	M2dec, .-M2dec
	.globl	cal_radix
	.type	cal_radix, @function
cal_radix:
.LFB2:
	.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
	movl	%edi, -20(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	$1, %rax
	jne	.L20
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	cmpl	%eax, -20(%rbp)
	jne	.L20
	movl	$16, %eax
	jmp	.L21
.L20:
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	$2, %rax
	jbe	.L22
	movl	$10, -8(%rbp)
	jmp	.L23
.L22:
	movl	$16, -8(%rbp)
.L23:
	movl	$2, -12(%rbp)
	jmp	.L24
.L28:
	movl	-12(%rbp), %edx
	movq	-32(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	M2dec
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jne	.L25
	movl	-12(%rbp), %eax
	jmp	.L21
.L25:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L29
	addl	$1, -12(%rbp)
.L24:
	cmpl	$16, -12(%rbp)
	jle	.L28
	jmp	.L27
.L29:
	nop
.L27:
	movl	$-1, %eax
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	cal_radix, .-cal_radix
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	next_age
	.type	next_age, @function
next_age:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movl	%edi, -52(%rbp)
	movl	%esi, -56(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	-56(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-52(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-32(%rbp), %ecx
	leaq	-26(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	dec2M
	leaq	-40(%rbp), %rdx
	leaq	-26(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$16, -32(%rbp)
	jmp	.L31
.L34:
	movl	-52(%rbp), %edx
	movl	-32(%rbp), %ecx
	leaq	-17(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	dec2M
	testl	%eax, %eax
	je	.L32
	leaq	-36(%rbp), %rdx
	leaq	-17(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-36(%rbp), %edx
	movl	-40(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L32
	movl	-32(%rbp), %eax
	jmp	.L30
.L32:
	subl	$1, -32(%rbp)
.L31:
	cmpl	$1, -32(%rbp)
	jg	.L34
.L30:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L35
	call	__stack_chk_fail@PLT
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	next_age, .-next_age
	.section	.rodata
.LC1:
	.string	"-1"
.LC2:
	.string	"%d %s %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L37
.L42:
	movl	a(%rip), %eax
	leaq	b(%rip), %rdx
	movq	%rdx, %rsi
	movl	%eax, %edi
	call	cal_radix
	movl	%eax, radix(%rip)
	movl	radix(%rip), %eax
	cmpl	$-1, %eax
	jne	.L38
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L37
.L38:
	movl	a(%rip), %eax
	addl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L39
.L40:
	movl	radix(%rip), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	next_age
	movl	%eax, radix(%rip)
	addl	$1, -24(%rbp)
.L39:
	movl	c(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L40
	movl	c(%rip), %edx
	movl	radix(%rip), %ecx
	leaq	-17(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	dec2M
	leaq	-17(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L37:
	leaq	c(%rip), %rax
	movq	%rax, %rcx
	leaq	b(%rip), %rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L41
	movl	a(%rip), %eax
	cmpl	$-1, %eax
	jne	.L42
	movl	c(%rip), %eax
	cmpl	$-1, %eax
	jne	.L42
.L41:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L44
	call	__stack_chk_fail@PLT
.L44:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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:
