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

#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))
#define DIGITS_MAX 200000
#define BUF_SIZE (DIGITS_MAX+50)

// size: specify sizeof(str)
int get_str(char *str, int size) {
    if(!fgets(str, size, stdin)) return -1;
    return 0;
}

#define DIVISOR 2019

int main(void) {
    static char nstr[BUF_SIZE];
    get_str(nstr, BUF_SIZE);
    int len = strlen(nstr) - 1;
    static int map[DIGITS_MAX+2]; // 1-indexed

    static int power10[DIGITS_MAX+1];
    power10[0] = 1;
    int i;
    for(i = 1; i <= len; i++) {
        power10[i] = (power10[i-1] * 10)%DIVISOR;
    }

    for(i = len; i >= 1; i--) {
        int cur = len-i+1;
        int cur_digit = nstr[i-1] - '0';
        map[i] = (map[i+1] + power10[cur-1]*cur_digit)%DIVISOR;
    }

    static int cnt_map[DIVISOR];
    cnt_map[0]++;
    uint64_t res = 0;
    for(i = len; i >= 1; i--) {
        int mod = map[i];
#ifdef DEBUG
        printf("digit #%d: %d\n", len-i+1, mod);
#endif
        res += cnt_map[mod];
        cnt_map[mod]++;
    }
    printf("%llu\n", res);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	get_str
	.type	get_str, @function
get_str:
.LFB6:
	.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
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	stdin(%rip), %rdx
	movl	-12(%rbp), %ecx
	movq	-8(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L2
	movl	$-1, %eax
	jmp	.L3
.L2:
	movl	$0, %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_str, .-get_str
	.section	.rodata
.LC0:
	.string	"%llu\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$200050, %esi
	leaq	nstr.3(%rip), %rax
	movq	%rax, %rdi
	call	get_str
	leaq	nstr.3(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	movl	$1, power10.2(%rip)
	movl	$1, -28(%rbp)
	jmp	.L5
.L6:
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	power10.2(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movslq	%edx, %rax
	imulq	$-2116638167, %rax, %rax
	shrq	$32, %rax
	addl	%edx, %eax
	sarl	$10, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$2019, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	power10.2(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L5:
	movl	-28(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L6
	movl	-24(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	subl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	nstr.3(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	map.1(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	power10.2(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	-12(%rbp), %eax
	leal	(%rcx,%rax), %edx
	movslq	%edx, %rax
	imulq	$-2116638167, %rax, %rax
	shrq	$32, %rax
	addl	%edx, %eax
	sarl	$10, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$2019, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	map.1(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	subl	$1, -28(%rbp)
.L7:
	cmpl	$0, -28(%rbp)
	jg	.L8
	movl	cnt_map.0(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt_map.0(%rip)
	movq	$0, -8(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L9
.L10:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	map.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt_map.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	addq	%rax, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt_map.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt_map.0(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	subl	$1, -28(%rbp)
.L9:
	cmpl	$0, -28(%rbp)
	jg	.L10
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.local	nstr.3
	.comm	nstr.3,200050,32
	.local	power10.2
	.comm	power10.2,800004,32
	.local	map.1
	.comm	map.1,800008,32
	.local	cnt_map.0
	.comm	cnt_map.0,8076,32
	.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	get_str
	.type	get_str, @function
get_str:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movq	stdin(%rip), %rcx
	movl	%esi, %edx
	movq	$-1, %rsi
	call	__fgets_chk@PLT
	cmpq	$1, %rax
	sbbl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	get_str, .-get_str
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%llu\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	nstr.3(%rip), %rbx
	movl	$200050, %esi
	movq	%rbx, %rdi
	call	get_str
	movq	%rbx, %rdi
	call	strlen@PLT
	movl	$1, power10.2(%rip)
	leal	-1(%rax), %edi
	testl	%edi, %edi
	jle	.L5
	leaq	4+power10.2(%rip), %rsi
	leal	-2(%rax), %edx
	leaq	-4(%rsi), %rcx
	movq	%rdx, %r9
	leaq	8(%rcx), %rax
	leaq	(%rax,%rdx,4), %r10
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L6:
	leal	(%rax,%rax,4), %edx
	addq	$4, %rsi
	addl	%edx, %edx
	movslq	%edx, %rax
	movl	%edx, %r8d
	imulq	$-2116638167, %rax, %rax
	sarl	$31, %r8d
	shrq	$32, %rax
	addl	%edx, %eax
	sarl	$10, %eax
	subl	%r8d, %eax
	imull	$2019, %eax, %r8d
	movl	%edx, %eax
	subl	%r8d, %eax
	movl	%eax, -4(%rsi)
	cmpq	%r10, %rsi
	jne	.L6
	movslq	%edi, %rdi
	leaq	4+map.1(%rip), %rax
	movslq	%r9d, %r9
	subq	%rdi, %r9
	movl	(%rax,%rdi,4), %eax
	movq	%rdi, %rsi
	leaq	map.1(%rip), %r8
	addq	%rbx, %r9
	.p2align 4,,10
	.p2align 3
.L7:
	movsbl	(%r9,%rsi), %edx
	addq	$4, %rcx
	subl	$48, %edx
	imull	-4(%rcx), %edx
	addl	%eax, %edx
	movslq	%edx, %rax
	movl	%edx, %r10d
	imulq	$-2116638167, %rax, %rax
	sarl	$31, %r10d
	shrq	$32, %rax
	addl	%edx, %eax
	sarl	$10, %eax
	subl	%r10d, %eax
	imull	$2019, %eax, %r10d
	movl	%edx, %eax
	subl	%r10d, %eax
	movl	%eax, (%r8,%rsi,4)
	subq	$1, %rsi
	testl	%esi, %esi
	jg	.L7
	addl	$1, cnt_map.0(%rip)
	xorl	%r9d, %r9d
	leaq	cnt_map.0(%rip), %rcx
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	(%r8,%rdi,4), %rdx
	subq	$1, %rdi
	movslq	(%rcx,%rdx,4), %rsi
	movq	%rsi, %rax
	addq	%rsi, %r9
	addl	$1, %eax
	movl	%eax, (%rcx,%rdx,4)
	testl	%edi, %edi
	jg	.L9
.L10:
	movq	%r9, %rdx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	addl	$1, cnt_map.0(%rip)
	xorl	%r9d, %r9d
	jmp	.L10
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.local	cnt_map.0
	.comm	cnt_map.0,8076,32
	.local	map.1
	.comm	map.1,800008,32
	.local	power10.2
	.comm	power10.2,800004,32
	.local	nstr.3
	.comm	nstr.3,200050,32
	.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	get_str
	.type	get_str, @function
get_str:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movq	stdin(%rip), %rcx
	movl	%esi, %edx
	movq	$-1, %rsi
	call	__fgets_chk@PLT
	cmpq	$1, %rax
	sbbl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	get_str, .-get_str
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%llu\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	nstr.3(%rip), %rbx
	movl	$200050, %esi
	movq	%rbx, %rdi
	call	get_str
	movq	%rbx, %rdi
	call	strlen@PLT
	movl	$1, power10.2(%rip)
	leal	-1(%rax), %edi
	testl	%edi, %edi
	jle	.L5
	leaq	4+power10.2(%rip), %rsi
	leal	-2(%rax), %edx
	leaq	-4(%rsi), %rcx
	movq	%rdx, %r9
	leaq	8(%rcx), %rax
	leaq	(%rax,%rdx,4), %r10
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L6:
	leal	(%rax,%rax,4), %edx
	addq	$4, %rsi
	addl	%edx, %edx
	movslq	%edx, %rax
	movl	%edx, %r8d
	imulq	$-2116638167, %rax, %rax
	sarl	$31, %r8d
	shrq	$32, %rax
	addl	%edx, %eax
	sarl	$10, %eax
	subl	%r8d, %eax
	imull	$2019, %eax, %r8d
	movl	%edx, %eax
	subl	%r8d, %eax
	movl	%eax, -4(%rsi)
	cmpq	%r10, %rsi
	jne	.L6
	movslq	%edi, %rdi
	leaq	4+map.1(%rip), %rax
	movslq	%r9d, %r9
	subq	%rdi, %r9
	movl	(%rax,%rdi,4), %eax
	movq	%rdi, %rsi
	leaq	map.1(%rip), %r8
	addq	%rbx, %r9
	.p2align 4,,10
	.p2align 3
.L7:
	movsbl	(%r9,%rsi), %edx
	addq	$4, %rcx
	subl	$48, %edx
	imull	-4(%rcx), %edx
	addl	%eax, %edx
	movslq	%edx, %rax
	movl	%edx, %r10d
	imulq	$-2116638167, %rax, %rax
	sarl	$31, %r10d
	shrq	$32, %rax
	addl	%edx, %eax
	sarl	$10, %eax
	subl	%r10d, %eax
	imull	$2019, %eax, %r10d
	movl	%edx, %eax
	subl	%r10d, %eax
	movl	%eax, (%r8,%rsi,4)
	subq	$1, %rsi
	testl	%esi, %esi
	jg	.L7
	addl	$1, cnt_map.0(%rip)
	xorl	%r9d, %r9d
	leaq	cnt_map.0(%rip), %rcx
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	(%r8,%rdi,4), %rdx
	subq	$1, %rdi
	movslq	(%rcx,%rdx,4), %rsi
	movq	%rsi, %rax
	addq	%rsi, %r9
	addl	$1, %eax
	movl	%eax, (%rcx,%rdx,4)
	testl	%edi, %edi
	jg	.L9
.L10:
	movq	%r9, %rdx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	addl	$1, cnt_map.0(%rip)
	xorl	%r9d, %r9d
	jmp	.L10
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.local	cnt_map.0
	.comm	cnt_map.0,8076,32
	.local	map.1
	.comm	map.1,800008,32
	.local	power10.2
	.comm	power10.2,800004,32
	.local	nstr.3
	.comm	nstr.3,200050,32
	.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 <string.h>
#include <stdlib.h>
#include <stdint.h> // uint64_t

#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))
#define DIGITS_MAX 200000
#define BUF_SIZE (DIGITS_MAX+50)

// size: specify sizeof(str)
int get_str(char *str, int size) {
    if(!fgets(str, size, stdin)) return -1;
    return 0;
}

#define DIVISOR 2019

int main(void) {
    static char nstr[BUF_SIZE];
    get_str(nstr, BUF_SIZE);
    int len = strlen(nstr) - 1;
    static int map[DIGITS_MAX+2]; // 1-indexed

    static int power10[DIGITS_MAX+1];
    power10[0] = 1;
    int i;
    for(i = 1; i <= len; i++) {
        power10[i] = (power10[i-1] * 10)%DIVISOR;
    }

    for(i = len; i >= 1; i--) {
        int cur = len-i+1;
        int cur_digit = nstr[i-1] - '0';
        map[i] = (map[i+1] + power10[cur-1]*cur_digit)%DIVISOR;
    }

    static int cnt_map[DIVISOR];
    cnt_map[0]++;
    uint64_t res = 0;
    for(i = len; i >= 1; i--) {
        int mod = map[i];
#ifdef DEBUG
        printf("digit #%d: %d\n", len-i+1, mod);
#endif
        res += cnt_map[mod];
        cnt_map[mod]++;
    }
    printf("%llu\n", res);
    return 0;
}
3054417607960
 218
 8160152899489
 7932848001410
 6806479110
 9600282290
 649171600089
 3000732030
 4123972862
 5345763557347

3
 0
 1
 5
 2
 4
 6
 8
 0
 0

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

#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))
#define DIGITS_MAX 200000
#define BUF_SIZE (DIGITS_MAX+50)

// size: specify sizeof(str)
int get_str(char *str, int size) {
    if(!fgets(str, size, stdin)) return -1;
    return 0;
}

#define DIVISOR 2019

int main(void) {
    static char nstr[BUF_SIZE];
    get_str(nstr, BUF_SIZE);
    int len = strlen(nstr) - 1;
    static int map[DIGITS_MAX+2]; // 1-indexed

    static int power10[DIGITS_MAX+1];
    power10[0] = 1;
    int i;
    for(i = 1; i <= len; i++) {
        power10[i] = (power10[i-1] * 10)%DIVISOR;
    }

    for(i = len; i >= 1; i--) {
        int cur = len-i+1;
        int cur_digit = nstr[i-1] - '0';
        map[i] = (map[i+1] + power10[cur-1]*cur_digit)%DIVISOR;
    }

    static int cnt_map[DIVISOR];
    cnt_map[0]++;
    uint64_t res = 0;
    for(i = len; i >= 1; i--) {
        int mod = map[i];
#ifdef DEBUG
        printf("digit #%d: %d\n", len-i+1, mod);
#endif
        res += cnt_map[mod];
        cnt_map[mod]++;
    }
    printf("%llu\n", res);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	get_str
	.type	get_str, @function
get_str:
.LFB6:
	.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
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	stdin(%rip), %rdx
	movl	-12(%rbp), %ecx
	movq	-8(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L2
	movl	$-1, %eax
	jmp	.L3
.L2:
	movl	$0, %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_str, .-get_str
	.section	.rodata
.LC0:
	.string	"%llu\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$200050, %esi
	leaq	nstr.3(%rip), %rax
	movq	%rax, %rdi
	call	get_str
	leaq	nstr.3(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	movl	$1, power10.2(%rip)
	movl	$1, -28(%rbp)
	jmp	.L5
.L6:
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	power10.2(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movslq	%edx, %rax
	imulq	$-2116638167, %rax, %rax
	shrq	$32, %rax
	addl	%edx, %eax
	sarl	$10, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$2019, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	power10.2(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L5:
	movl	-28(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L6
	movl	-24(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	subl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	nstr.3(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	map.1(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	power10.2(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	-12(%rbp), %eax
	leal	(%rcx,%rax), %edx
	movslq	%edx, %rax
	imulq	$-2116638167, %rax, %rax
	shrq	$32, %rax
	addl	%edx, %eax
	sarl	$10, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$2019, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	map.1(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	subl	$1, -28(%rbp)
.L7:
	cmpl	$0, -28(%rbp)
	jg	.L8
	movl	cnt_map.0(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt_map.0(%rip)
	movq	$0, -8(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L9
.L10:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	map.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt_map.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	addq	%rax, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt_map.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt_map.0(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	subl	$1, -28(%rbp)
.L9:
	cmpl	$0, -28(%rbp)
	jg	.L10
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.local	nstr.3
	.comm	nstr.3,200050,32
	.local	power10.2
	.comm	power10.2,800004,32
	.local	map.1
	.comm	map.1,800008,32
	.local	cnt_map.0
	.comm	cnt_map.0,8076,32
	.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	get_str
	.type	get_str, @function
get_str:
.LFB6:
	.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
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	stdin(%rip), %rdx
	movl	-12(%rbp), %ecx
	movq	-8(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L2
	movl	$-1, %eax
	jmp	.L3
.L2:
	movl	$0, %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_str, .-get_str
	.section	.rodata
.LC0:
	.string	"%llu\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$200050, %esi
	leaq	nstr.3(%rip), %rax
	movq	%rax, %rdi
	call	get_str
	leaq	nstr.3(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	movl	$1, power10.2(%rip)
	movl	$1, -28(%rbp)
	jmp	.L5
.L6:
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	power10.2(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movslq	%edx, %rax
	imulq	$-2116638167, %rax, %rax
	shrq	$32, %rax
	addl	%edx, %eax
	sarl	$10, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$2019, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	power10.2(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L5:
	movl	-28(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L6
	movl	-24(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	subl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	nstr.3(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	map.1(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	power10.2(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	-12(%rbp), %eax
	leal	(%rcx,%rax), %edx
	movslq	%edx, %rax
	imulq	$-2116638167, %rax, %rax
	shrq	$32, %rax
	addl	%edx, %eax
	sarl	$10, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$2019, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	map.1(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	subl	$1, -28(%rbp)
.L7:
	cmpl	$0, -28(%rbp)
	jg	.L8
	movl	cnt_map.0(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt_map.0(%rip)
	movq	$0, -8(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L9
.L10:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	map.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt_map.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	addq	%rax, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt_map.0(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt_map.0(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	subl	$1, -28(%rbp)
.L9:
	cmpl	$0, -28(%rbp)
	jg	.L10
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.local	nstr.3
	.comm	nstr.3,200050,32
	.local	power10.2
	.comm	power10.2,800004,32
	.local	map.1
	.comm	map.1,800008,32
	.local	cnt_map.0
	.comm	cnt_map.0,8076,32
	.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:
