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>

long long N;

void dfs(long long x, int bits, long long int *cnt){
    if(x>N) return;
    if(bits == 0b111) *cnt = *cnt+1;
    dfs(x*10+3,bits|0b001,cnt);
    dfs(x*10+5,bits|0b010,cnt);
    dfs(x*10+7,bits|0b100,cnt);
}

int main(void){
    scanf("%lld",&N);
    long long int ans=0;
    dfs(0,0,&ans);
    printf("%lld",ans);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 8
	.type	N, @object
	.size	N, 8
N:
	.zero	8
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.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, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	%rdx, -24(%rbp)
	movq	N(%rip), %rax
	cmpq	%rax, -8(%rbp)
	jg	.L5
	cmpl	$7, -12(%rbp)
	jne	.L4
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
.L4:
	movl	-12(%rbp), %eax
	orl	$1, %eax
	movl	%eax, %esi
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	leaq	3(%rax), %rcx
	movq	-24(%rbp), %rax
	movq	%rax, %rdx
	movq	%rcx, %rdi
	call	dfs
	movl	-12(%rbp), %eax
	orl	$2, %eax
	movl	%eax, %esi
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	leaq	5(%rax), %rcx
	movq	-24(%rbp), %rax
	movq	%rax, %rdx
	movq	%rcx, %rdi
	call	dfs
	movl	-12(%rbp), %eax
	orl	$4, %eax
	movl	%eax, %esi
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	leaq	7(%rax), %rcx
	movq	-24(%rbp), %rax
	movq	%rax, %rdx
	movq	%rcx, %rdi
	call	dfs
	jmp	.L1
.L5:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -16(%rbp)
	leaq	-16(%rbp), %rax
	movq	%rax, %rdx
	movl	$0, %esi
	movl	$0, %edi
	call	dfs
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	dfs
	.type	dfs, @function
dfs:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdx, %r15
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	N(%rip), %rdx
	movl	%esi, 20(%rsp)
	cmpq	%rdx, %rdi
	jg	.L1
	movq	%rdi, %rcx
.L2:
	cmpl	$7, 20(%rsp)
	jne	.L3
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L3:
	movl	20(%rsp), %eax
	leaq	(%rcx,%rcx,4), %rcx
	orl	$1, %eax
	movl	%eax, 16(%rsp)
	leaq	(%rcx,%rcx), %rax
	leaq	3(%rax), %rcx
	movq	%rax, 24(%rsp)
	cmpq	%rdx, %rcx
	jg	.L4
.L38:
	cmpl	$7, 16(%rsp)
	jne	.L5
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L5:
	leaq	(%rcx,%rcx,4), %rcx
	movl	16(%rsp), %r14d
	leaq	(%rcx,%rcx), %rax
	leaq	3(%rax), %r13
	movq	%rax, 8(%rsp)
	orl	$1, %r14d
	cmpq	%rdx, %r13
	jg	.L6
.L23:
	cmpl	$7, %r14d
	jne	.L7
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L7:
	leaq	0(%r13,%r13,4), %r13
	movl	%r14d, %r12d
	leaq	(%r13,%r13), %rax
	orl	$1, %r12d
	leaq	3(%rax), %rbp
	movq	%rax, (%rsp)
	cmpq	%rdx, %rbp
	jg	.L8
.L18:
	cmpl	$7, %r12d
	jne	.L9
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L9:
	leaq	0(%rbp,%rbp,4), %rbp
	movl	%r12d, %r13d
	addq	%rbp, %rbp
	orl	$1, %r13d
	leaq	3(%rbp), %rbx
	cmpq	%rdx, %rbx
	jg	.L10
.L13:
	cmpl	$7, %r13d
	je	.L12
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L13
.L10:
	movl	%r12d, %r13d
	leaq	5(%rbp), %rbx
	orl	$2, %r13d
	cmpq	%rdx, %rbx
	jg	.L14
.L17:
	cmpl	$7, %r13d
	je	.L16
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L17
.L14:
	addq	$7, %rbp
	orl	$4, %r12d
	cmpq	%rdx, %rbp
	jle	.L18
.L8:
	movq	(%rsp), %rax
	movl	%r14d, %ebp
	orl	$2, %ebp
	leaq	5(%rax), %rbx
	cmpq	%rdx, %rbx
	jg	.L19
.L22:
	cmpl	$7, %ebp
	je	.L21
	leaq	(%rbx,%rbx,4), %rbx
	movl	%ebp, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%ebp, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %ebp
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L22
.L19:
	movq	(%rsp), %r13
	orl	$4, %r14d
	addq	$7, %r13
	cmpq	%rdx, %r13
	jle	.L23
.L6:
	movq	8(%rsp), %rax
	movl	16(%rsp), %r14d
	leaq	5(%rax), %r13
	orl	$2, %r14d
	cmpq	%rdx, %r13
	jg	.L24
.L37:
	cmpl	$7, %r14d
	jne	.L25
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L25:
	leaq	0(%r13,%r13,4), %r13
	movl	%r14d, %ebp
	leaq	(%r13,%r13), %rax
	orl	$1, %ebp
	leaq	3(%rax), %rbx
	movq	%rax, (%rsp)
	cmpq	%rdx, %rbx
	jg	.L26
.L29:
	cmpl	$7, %ebp
	je	.L28
	leaq	(%rbx,%rbx,4), %rbx
	movl	%ebp, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%ebp, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %ebp
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L29
.L26:
	movq	(%rsp), %rax
	movl	%r14d, %r12d
	orl	$2, %r12d
	leaq	5(%rax), %rbp
	cmpq	%rdx, %rbp
	jg	.L30
.L33:
	cmpl	$7, %r12d
	jne	.L31
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L31:
	leaq	0(%rbp,%rbp,4), %rbp
	movl	%r12d, %r13d
	addq	%rbp, %rbp
	orl	$1, %r13d
	leaq	3(%rbp), %rbx
	cmpq	%rdx, %rbx
	jg	.L35
.L32:
	cmpl	$7, %r13d
	je	.L36
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	orl	$4, %r13d
	addq	$7, %rbx
	call	dfs
	cmpq	%rbx, N(%rip)
	jge	.L32
.L35:
	movl	%r12d, %esi
	leaq	5(%rbp), %rdi
	movq	%r15, %rdx
	addq	$7, %rbp
	orl	$2, %esi
	orl	$4, %r12d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbp, %rdx
	jge	.L33
.L30:
	movq	(%rsp), %r13
	orl	$4, %r14d
	addq	$7, %r13
	cmpq	%rdx, %r13
	jle	.L37
.L24:
	movq	8(%rsp), %rcx
	orl	$4, 16(%rsp)
	addq	$7, %rcx
	cmpq	%rdx, %rcx
	jle	.L38
.L4:
	movl	20(%rsp), %eax
	orl	$2, %eax
	movl	%eax, 16(%rsp)
	movq	24(%rsp), %rax
	leaq	5(%rax), %rcx
	cmpq	%rdx, %rcx
	jg	.L39
.L84:
	cmpl	$7, 16(%rsp)
	jne	.L40
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L40:
	leaq	(%rcx,%rcx,4), %rcx
	movl	16(%rsp), %r14d
	leaq	(%rcx,%rcx), %rax
	leaq	3(%rax), %r13
	movq	%rax, 8(%rsp)
	orl	$1, %r14d
	cmpq	%rdx, %r13
	jg	.L41
.L58:
	cmpl	$7, %r14d
	jne	.L42
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L42:
	leaq	0(%r13,%r13,4), %r13
	movl	%r14d, %r12d
	leaq	(%r13,%r13), %rax
	orl	$1, %r12d
	leaq	3(%rax), %rbp
	movq	%rax, (%rsp)
	cmpq	%rdx, %rbp
	jg	.L43
.L53:
	cmpl	$7, %r12d
	jne	.L44
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L44:
	leaq	0(%rbp,%rbp,4), %rbp
	movl	%r12d, %r13d
	addq	%rbp, %rbp
	orl	$1, %r13d
	leaq	3(%rbp), %rbx
	cmpq	%rdx, %rbx
	jg	.L45
.L48:
	cmpl	$7, %r13d
	je	.L47
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L48
.L45:
	movl	%r12d, %r13d
	leaq	5(%rbp), %rbx
	orl	$2, %r13d
	cmpq	%rdx, %rbx
	jg	.L49
.L52:
	cmpl	$7, %r13d
	je	.L51
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L52
.L49:
	addq	$7, %rbp
	orl	$4, %r12d
	cmpq	%rdx, %rbp
	jle	.L53
.L43:
	movq	(%rsp), %rax
	movl	%r14d, %ebp
	orl	$2, %ebp
	leaq	5(%rax), %rbx
	cmpq	%rdx, %rbx
	jg	.L54
.L57:
	cmpl	$7, %ebp
	je	.L56
	leaq	(%rbx,%rbx,4), %rbx
	movl	%ebp, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%ebp, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %ebp
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L57
.L54:
	movq	(%rsp), %r13
	orl	$4, %r14d
	addq	$7, %r13
	cmpq	%rdx, %r13
	jle	.L58
.L41:
	movq	8(%rsp), %rax
	movl	16(%rsp), %r14d
	leaq	5(%rax), %r13
	orl	$2, %r14d
	cmpq	%rdx, %r13
	jg	.L59
.L83:
	cmpl	$7, %r14d
	jne	.L60
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L60:
	leaq	0(%r13,%r13,4), %r13
	movl	%r14d, %r12d
	leaq	(%r13,%r13), %rax
	orl	$1, %r12d
	leaq	3(%rax), %rbp
	movq	%rax, (%rsp)
	cmpq	%rdx, %rbp
	jg	.L61
.L71:
	cmpl	$7, %r12d
	jne	.L62
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L62:
	leaq	0(%rbp,%rbp,4), %rbp
	movl	%r12d, %r13d
	addq	%rbp, %rbp
	orl	$1, %r13d
	leaq	3(%rbp), %rbx
	cmpq	%rdx, %rbx
	jg	.L63
.L66:
	cmpl	$7, %r13d
	je	.L65
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L66
.L63:
	movl	%r12d, %r13d
	leaq	5(%rbp), %rbx
	orl	$2, %r13d
	cmpq	%rdx, %rbx
	jg	.L67
.L70:
	cmpl	$7, %r13d
	je	.L69
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L70
.L67:
	addq	$7, %rbp
	orl	$4, %r12d
	cmpq	%rdx, %rbp
	jle	.L71
.L61:
	movq	(%rsp), %rax
	movl	%r14d, %r12d
	orl	$2, %r12d
	leaq	5(%rax), %rbp
	cmpq	%rdx, %rbp
	jg	.L72
.L82:
	cmpl	$7, %r12d
	jne	.L73
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L73:
	leaq	0(%rbp,%rbp,4), %rbp
	movl	%r12d, %r13d
	addq	%rbp, %rbp
	orl	$1, %r13d
	leaq	3(%rbp), %rbx
	cmpq	%rdx, %rbx
	jg	.L74
.L77:
	cmpl	$7, %r13d
	je	.L76
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L77
.L74:
	movl	%r12d, %r13d
	leaq	5(%rbp), %rbx
	orl	$2, %r13d
	cmpq	%rdx, %rbx
	jg	.L78
.L81:
	cmpl	$7, %r13d
	je	.L80
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L81
.L78:
	addq	$7, %rbp
	orl	$4, %r12d
	cmpq	%rdx, %rbp
	jle	.L82
.L72:
	movq	(%rsp), %r13
	orl	$4, %r14d
	addq	$7, %r13
	cmpq	%rdx, %r13
	jle	.L83
.L59:
	movq	8(%rsp), %rcx
	orl	$4, 16(%rsp)
	addq	$7, %rcx
	cmpq	%rdx, %rcx
	jle	.L84
.L39:
	movq	24(%rsp), %rcx
	orl	$4, 20(%rsp)
	addq	$7, %rcx
	cmpq	%rdx, %rcx
	jle	.L2
.L1:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L12
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L16
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L21:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L21
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L28:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L28
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L36:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	addq	$7, %rbx
	cmpq	%rbx, N(%rip)
	jge	.L36
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L47:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L47
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L51:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L51
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L56:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L56
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L65:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L65
	jmp	.L63
	.p2align 4,,10
	.p2align 3
.L69:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L69
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L76:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L76
	jmp	.L74
	.p2align 4,,10
	.p2align 3
.L80:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rdx, %rbx
	jle	.L80
	jmp	.L78
	.cfi_endproc
.LFE23:
	.size	dfs, .-dfs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	leaq	N(%rip), %rsi
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%esi, %esi
	xorl	%edi, %edi
	movq	%rsp, %rdx
	movq	$0, (%rsp)
	call	dfs
	movq	(%rsp), %rdx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L114
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L114:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	N
	.bss
	.align 8
	.type	N, @object
	.size	N, 8
N:
	.zero	8
	.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	dfs
	.type	dfs, @function
dfs:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdx, %r15
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	N(%rip), %rdx
	movl	%esi, 20(%rsp)
	cmpq	%rdx, %rdi
	jg	.L1
	movq	%rdi, %rcx
.L2:
	cmpl	$7, 20(%rsp)
	jne	.L3
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L3:
	movl	20(%rsp), %eax
	leaq	(%rcx,%rcx,4), %rcx
	orl	$1, %eax
	movl	%eax, 16(%rsp)
	leaq	(%rcx,%rcx), %rax
	leaq	3(%rax), %rcx
	movq	%rax, 24(%rsp)
	cmpq	%rdx, %rcx
	jg	.L4
.L38:
	cmpl	$7, 16(%rsp)
	jne	.L5
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L5:
	leaq	(%rcx,%rcx,4), %rcx
	movl	16(%rsp), %r14d
	leaq	(%rcx,%rcx), %rax
	leaq	3(%rax), %r13
	movq	%rax, 8(%rsp)
	orl	$1, %r14d
	cmpq	%rdx, %r13
	jg	.L6
.L23:
	cmpl	$7, %r14d
	jne	.L7
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L7:
	leaq	0(%r13,%r13,4), %r13
	movl	%r14d, %r12d
	leaq	(%r13,%r13), %rax
	orl	$1, %r12d
	leaq	3(%rax), %rbp
	movq	%rax, (%rsp)
	cmpq	%rdx, %rbp
	jg	.L8
.L18:
	cmpl	$7, %r12d
	jne	.L9
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L9:
	leaq	0(%rbp,%rbp,4), %rbp
	movl	%r12d, %r13d
	addq	%rbp, %rbp
	orl	$1, %r13d
	leaq	3(%rbp), %rbx
	cmpq	%rdx, %rbx
	jg	.L10
.L13:
	cmpl	$7, %r13d
	je	.L12
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L13
.L10:
	movl	%r12d, %r13d
	leaq	5(%rbp), %rbx
	orl	$2, %r13d
	cmpq	%rdx, %rbx
	jg	.L14
.L17:
	cmpl	$7, %r13d
	je	.L16
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L17
.L14:
	addq	$7, %rbp
	orl	$4, %r12d
	cmpq	%rdx, %rbp
	jle	.L18
.L8:
	movq	(%rsp), %rax
	movl	%r14d, %ebp
	orl	$2, %ebp
	leaq	5(%rax), %rbx
	cmpq	%rdx, %rbx
	jg	.L19
.L22:
	cmpl	$7, %ebp
	je	.L21
	leaq	(%rbx,%rbx,4), %rbx
	movl	%ebp, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%ebp, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %ebp
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L22
.L19:
	movq	(%rsp), %r13
	orl	$4, %r14d
	addq	$7, %r13
	cmpq	%rdx, %r13
	jle	.L23
.L6:
	movq	8(%rsp), %rax
	movl	16(%rsp), %r14d
	leaq	5(%rax), %r13
	orl	$2, %r14d
	cmpq	%rdx, %r13
	jg	.L24
.L37:
	cmpl	$7, %r14d
	jne	.L25
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L25:
	leaq	0(%r13,%r13,4), %r13
	movl	%r14d, %ebp
	leaq	(%r13,%r13), %rax
	orl	$1, %ebp
	leaq	3(%rax), %rbx
	movq	%rax, (%rsp)
	cmpq	%rdx, %rbx
	jg	.L26
.L29:
	cmpl	$7, %ebp
	je	.L28
	leaq	(%rbx,%rbx,4), %rbx
	movl	%ebp, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%ebp, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %ebp
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L29
.L26:
	movq	(%rsp), %rax
	movl	%r14d, %r12d
	orl	$2, %r12d
	leaq	5(%rax), %rbp
	cmpq	%rdx, %rbp
	jg	.L30
.L33:
	cmpl	$7, %r12d
	jne	.L31
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L31:
	leaq	0(%rbp,%rbp,4), %rbp
	movl	%r12d, %r13d
	addq	%rbp, %rbp
	orl	$1, %r13d
	leaq	3(%rbp), %rbx
	cmpq	%rdx, %rbx
	jg	.L35
.L32:
	cmpl	$7, %r13d
	je	.L36
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	orl	$4, %r13d
	addq	$7, %rbx
	call	dfs
	cmpq	%rbx, N(%rip)
	jge	.L32
.L35:
	movl	%r12d, %esi
	leaq	5(%rbp), %rdi
	movq	%r15, %rdx
	addq	$7, %rbp
	orl	$2, %esi
	orl	$4, %r12d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbp, %rdx
	jge	.L33
.L30:
	movq	(%rsp), %r13
	orl	$4, %r14d
	addq	$7, %r13
	cmpq	%rdx, %r13
	jle	.L37
.L24:
	movq	8(%rsp), %rcx
	orl	$4, 16(%rsp)
	addq	$7, %rcx
	cmpq	%rdx, %rcx
	jle	.L38
.L4:
	movl	20(%rsp), %eax
	orl	$2, %eax
	movl	%eax, 16(%rsp)
	movq	24(%rsp), %rax
	leaq	5(%rax), %rcx
	cmpq	%rdx, %rcx
	jg	.L39
.L84:
	cmpl	$7, 16(%rsp)
	jne	.L40
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L40:
	leaq	(%rcx,%rcx,4), %rcx
	movl	16(%rsp), %r14d
	leaq	(%rcx,%rcx), %rax
	leaq	3(%rax), %r13
	movq	%rax, 8(%rsp)
	orl	$1, %r14d
	cmpq	%rdx, %r13
	jg	.L41
.L58:
	cmpl	$7, %r14d
	jne	.L42
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L42:
	leaq	0(%r13,%r13,4), %r13
	movl	%r14d, %r12d
	leaq	(%r13,%r13), %rax
	orl	$1, %r12d
	leaq	3(%rax), %rbp
	movq	%rax, (%rsp)
	cmpq	%rdx, %rbp
	jg	.L43
.L53:
	cmpl	$7, %r12d
	jne	.L44
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L44:
	leaq	0(%rbp,%rbp,4), %rbp
	movl	%r12d, %r13d
	addq	%rbp, %rbp
	orl	$1, %r13d
	leaq	3(%rbp), %rbx
	cmpq	%rdx, %rbx
	jg	.L45
.L48:
	cmpl	$7, %r13d
	je	.L47
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L48
.L45:
	movl	%r12d, %r13d
	leaq	5(%rbp), %rbx
	orl	$2, %r13d
	cmpq	%rdx, %rbx
	jg	.L49
.L52:
	cmpl	$7, %r13d
	je	.L51
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L52
.L49:
	addq	$7, %rbp
	orl	$4, %r12d
	cmpq	%rdx, %rbp
	jle	.L53
.L43:
	movq	(%rsp), %rax
	movl	%r14d, %ebp
	orl	$2, %ebp
	leaq	5(%rax), %rbx
	cmpq	%rdx, %rbx
	jg	.L54
.L57:
	cmpl	$7, %ebp
	je	.L56
	leaq	(%rbx,%rbx,4), %rbx
	movl	%ebp, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%ebp, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %ebp
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L57
.L54:
	movq	(%rsp), %r13
	orl	$4, %r14d
	addq	$7, %r13
	cmpq	%rdx, %r13
	jle	.L58
.L41:
	movq	8(%rsp), %rax
	movl	16(%rsp), %r14d
	leaq	5(%rax), %r13
	orl	$2, %r14d
	cmpq	%rdx, %r13
	jg	.L59
.L83:
	cmpl	$7, %r14d
	jne	.L60
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L60:
	leaq	0(%r13,%r13,4), %r13
	movl	%r14d, %r12d
	leaq	(%r13,%r13), %rax
	orl	$1, %r12d
	leaq	3(%rax), %rbp
	movq	%rax, (%rsp)
	cmpq	%rdx, %rbp
	jg	.L61
.L71:
	cmpl	$7, %r12d
	jne	.L62
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L62:
	leaq	0(%rbp,%rbp,4), %rbp
	movl	%r12d, %r13d
	addq	%rbp, %rbp
	orl	$1, %r13d
	leaq	3(%rbp), %rbx
	cmpq	%rdx, %rbx
	jg	.L63
.L66:
	cmpl	$7, %r13d
	je	.L65
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L66
.L63:
	movl	%r12d, %r13d
	leaq	5(%rbp), %rbx
	orl	$2, %r13d
	cmpq	%rdx, %rbx
	jg	.L67
.L70:
	cmpl	$7, %r13d
	je	.L69
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L70
.L67:
	addq	$7, %rbp
	orl	$4, %r12d
	cmpq	%rdx, %rbp
	jle	.L71
.L61:
	movq	(%rsp), %rax
	movl	%r14d, %r12d
	orl	$2, %r12d
	leaq	5(%rax), %rbp
	cmpq	%rdx, %rbp
	jg	.L72
.L82:
	cmpl	$7, %r12d
	jne	.L73
	addq	$1, (%r15)
	movq	N(%rip), %rdx
.L73:
	leaq	0(%rbp,%rbp,4), %rbp
	movl	%r12d, %r13d
	addq	%rbp, %rbp
	orl	$1, %r13d
	leaq	3(%rbp), %rbx
	cmpq	%rdx, %rbx
	jg	.L74
.L77:
	cmpl	$7, %r13d
	je	.L76
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L77
.L74:
	movl	%r12d, %r13d
	leaq	5(%rbp), %rbx
	orl	$2, %r13d
	cmpq	%rdx, %rbx
	jg	.L78
.L81:
	cmpl	$7, %r13d
	je	.L80
	leaq	(%rbx,%rbx,4), %rbx
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	%rbx, %rbx
	orl	$1, %esi
	leaq	3(%rbx), %rdi
	call	dfs
	movl	%r13d, %esi
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	orl	$2, %esi
	addq	$7, %rbx
	orl	$4, %r13d
	call	dfs
	movq	N(%rip), %rdx
	cmpq	%rbx, %rdx
	jge	.L81
.L78:
	addq	$7, %rbp
	orl	$4, %r12d
	cmpq	%rdx, %rbp
	jle	.L82
.L72:
	movq	(%rsp), %r13
	orl	$4, %r14d
	addq	$7, %r13
	cmpq	%rdx, %r13
	jle	.L83
.L59:
	movq	8(%rsp), %rcx
	orl	$4, 16(%rsp)
	addq	$7, %rcx
	cmpq	%rdx, %rcx
	jle	.L84
.L39:
	movq	24(%rsp), %rcx
	orl	$4, 20(%rsp)
	addq	$7, %rcx
	cmpq	%rdx, %rcx
	jle	.L2
.L1:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L12
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L16
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L21:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L21
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L28:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L28
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L36:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	addq	$7, %rbx
	cmpq	%rbx, N(%rip)
	jge	.L36
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L47:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L47
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L51:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L51
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L56:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L56
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L65:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L65
	jmp	.L63
	.p2align 4,,10
	.p2align 3
.L69:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L69
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L76:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rbx, %rdx
	jge	.L76
	jmp	.L74
	.p2align 4,,10
	.p2align 3
.L80:
	addq	$1, (%r15)
	leaq	(%rbx,%rbx,4), %rbx
	movq	%r15, %rdx
	movl	$7, %esi
	addq	%rbx, %rbx
	leaq	3(%rbx), %rdi
	call	dfs
	leaq	5(%rbx), %rdi
	movq	%r15, %rdx
	movl	$7, %esi
	call	dfs
	movq	N(%rip), %rdx
	addq	$7, %rbx
	cmpq	%rdx, %rbx
	jle	.L80
	jmp	.L78
	.cfi_endproc
.LFE23:
	.size	dfs, .-dfs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	leaq	N(%rip), %rsi
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%esi, %esi
	xorl	%edi, %edi
	movq	%rsp, %rdx
	movq	$0, (%rsp)
	call	dfs
	movq	(%rsp), %rdx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L114
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L114:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	N
	.bss
	.align 8
	.type	N, @object
	.size	N, 8
N:
	.zero	8
	.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>

long long N;

void dfs(long long x, int bits, long long int *cnt){
    if(x>N) return;
    if(bits == 0b111) *cnt = *cnt+1;
    dfs(x*10+3,bits|0b001,cnt);
    dfs(x*10+5,bits|0b010,cnt);
    dfs(x*10+7,bits|0b100,cnt);
}

int main(void){
    scanf("%lld",&N);
    long long int ans=0;
    dfs(0,0,&ans);
    printf("%lld",ans);
}
60
 1134
 656396080
 1260308870
 251112438
 3669
 4753
 3412
 5825
 471776498

0 6 20434 26484 8334 13 18 8 30 14384
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>

long long N;

void dfs(long long x, int bits, long long int *cnt){
    if(x>N) return;
    if(bits == 0b111) *cnt = *cnt+1;
    dfs(x*10+3,bits|0b001,cnt);
    dfs(x*10+5,bits|0b010,cnt);
    dfs(x*10+7,bits|0b100,cnt);
}

int main(void){
    scanf("%lld",&N);
    long long int ans=0;
    dfs(0,0,&ans);
    printf("%lld",ans);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 8
	.type	N, @object
	.size	N, 8
N:
	.zero	8
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.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, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	%rdx, -24(%rbp)
	movq	N(%rip), %rax
	cmpq	%rax, -8(%rbp)
	jg	.L5
	cmpl	$7, -12(%rbp)
	jne	.L4
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
.L4:
	movl	-12(%rbp), %eax
	orl	$1, %eax
	movl	%eax, %esi
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	leaq	3(%rax), %rcx
	movq	-24(%rbp), %rax
	movq	%rax, %rdx
	movq	%rcx, %rdi
	call	dfs
	movl	-12(%rbp), %eax
	orl	$2, %eax
	movl	%eax, %esi
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	leaq	5(%rax), %rcx
	movq	-24(%rbp), %rax
	movq	%rax, %rdx
	movq	%rcx, %rdi
	call	dfs
	movl	-12(%rbp), %eax
	orl	$4, %eax
	movl	%eax, %esi
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	leaq	7(%rax), %rcx
	movq	-24(%rbp), %rax
	movq	%rax, %rdx
	movq	%rcx, %rdi
	call	dfs
	jmp	.L1
.L5:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -16(%rbp)
	leaq	-16(%rbp), %rax
	movq	%rax, %rdx
	movl	$0, %esi
	movl	$0, %edi
	call	dfs
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	N
	.bss
	.align 8
	.type	N, @object
	.size	N, 8
N:
	.zero	8
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.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, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	%rdx, -24(%rbp)
	movq	N(%rip), %rax
	cmpq	%rax, -8(%rbp)
	jg	.L5
	cmpl	$7, -12(%rbp)
	jne	.L4
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
.L4:
	movl	-12(%rbp), %eax
	orl	$1, %eax
	movl	%eax, %esi
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	leaq	3(%rax), %rcx
	movq	-24(%rbp), %rax
	movq	%rax, %rdx
	movq	%rcx, %rdi
	call	dfs
	movl	-12(%rbp), %eax
	orl	$2, %eax
	movl	%eax, %esi
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	leaq	5(%rax), %rcx
	movq	-24(%rbp), %rax
	movq	%rax, %rdx
	movq	%rcx, %rdi
	call	dfs
	movl	-12(%rbp), %eax
	orl	$4, %eax
	movl	%eax, %esi
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	leaq	7(%rax), %rcx
	movq	-24(%rbp), %rax
	movq	%rax, %rdx
	movq	%rcx, %rdi
	call	dfs
	jmp	.L1
.L5:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -16(%rbp)
	leaq	-16(%rbp), %rax
	movq	%rax, %rdx
	movl	$0, %esi
	movl	$0, %edi
	call	dfs
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
