	.file	"301071.c"
	.intel_syntax noprefix
	.text
	.globl	convert_to_10
	.type	convert_to_10, @function
convert_to_10:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L2
.L5:
	mov	rcx, QWORD PTR -40[rbp]
	movabs	rdx, -3689348814741910323
	mov	rax, rcx
	mul	rdx
	shr	rdx, 3
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	sub	rcx, rax
	mov	rdx, rcx
	mov	ebx, edx
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR .LC0[rip]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	comisd	xmm0, QWORD PTR .LC1[rip]
	jnb	.L3
	cvttsd2si	rax, xmm0
	jmp	.L4
.L3:
	movsd	xmm1, QWORD PTR .LC1[rip]
	subsd	xmm0, xmm1
	cvttsd2si	rax, xmm0
	movabs	rdx, -9223372036854775808
	xor	rax, rdx
.L4:
	imul	ebx, eax
	mov	edx, ebx
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	mov	DWORD PTR -24[rbp], eax
	add	DWORD PTR -20[rbp], 1
	mov	rax, QWORD PTR -40[rbp]
	movabs	rdx, -3689348814741910323
	mul	rdx
	mov	rax, rdx
	shr	rax, 3
	mov	QWORD PTR -40[rbp], rax
.L2:
	cmp	QWORD PTR -40[rbp], 0
	jne	.L5
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	convert_to_10, .-convert_to_10
	.globl	digitcount
	.type	digitcount, @function
digitcount:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L8
.L9:
	mov	rax, QWORD PTR -24[rbp]
	movabs	rdx, -3689348814741910323
	mul	rdx
	mov	rax, rdx
	shr	rax, 3
	mov	QWORD PTR -24[rbp], rax
	add	DWORD PTR -4[rbp], 1
.L8:
	cmp	QWORD PTR -24[rbp], 0
	jne	.L9
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	digitcount, .-digitcount
	.globl	digit_replace
	.type	digit_replace, @function
digit_replace:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L12
.L16:
	mov	rcx, QWORD PTR -24[rbp]
	movabs	rdx, -3689348814741910323
	mov	rax, rcx
	mul	rdx
	shr	rdx, 3
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	sub	rcx, rax
	mov	rdx, rcx
	cmp	rdx, 1
	jne	.L13
	mov	DWORD PTR -12[rbp], 0
.L13:
	mov	rcx, QWORD PTR -24[rbp]
	movabs	rdx, -3689348814741910323
	mov	rax, rcx
	mul	rdx
	shr	rdx, 3
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	sub	rcx, rax
	mov	rdx, rcx
	cmp	rdx, 7
	jne	.L14
	mov	DWORD PTR -12[rbp], 1
.L14:
	mov	rcx, QWORD PTR -24[rbp]
	movabs	rdx, -3689348814741910323
	mov	rax, rcx
	mul	rdx
	shr	rdx, 3
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	sub	rcx, rax
	mov	rdx, rcx
	cmp	rdx, 9
	jne	.L15
	mov	DWORD PTR -12[rbp], 2
.L15:
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR .LC2[rip]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	cvttsd2si	eax, xmm0
	imul	eax, DWORD PTR -12[rbp]
	cdqe
	add	QWORD PTR -8[rbp], rax
	add	DWORD PTR -16[rbp], 1
	mov	rax, QWORD PTR -24[rbp]
	movabs	rdx, -3689348814741910323
	mul	rdx
	mov	rax, rdx
	shr	rax, 3
	mov	QWORD PTR -24[rbp], rax
.L12:
	cmp	QWORD PTR -24[rbp], 0
	jne	.L16
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	digit_replace, .-digit_replace
	.globl	is_lucky
	.type	is_lucky, @function
is_lucky:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	jmp	.L19
.L23:
	mov	rcx, QWORD PTR -8[rbp]
	movabs	rdx, -3689348814741910323
	mov	rax, rcx
	mul	rdx
	shr	rdx, 3
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	sub	rcx, rax
	mov	rdx, rcx
	cmp	rdx, 1
	je	.L20
	mov	rcx, QWORD PTR -8[rbp]
	movabs	rdx, -3689348814741910323
	mov	rax, rcx
	mul	rdx
	shr	rdx, 3
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	sub	rcx, rax
	mov	rdx, rcx
	cmp	rdx, 7
	je	.L20
	mov	rcx, QWORD PTR -8[rbp]
	movabs	rdx, -3689348814741910323
	mov	rax, rcx
	mul	rdx
	shr	rdx, 3
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	sub	rcx, rax
	mov	rdx, rcx
	cmp	rdx, 9
	jne	.L21
.L20:
	mov	rax, QWORD PTR -8[rbp]
	movabs	rdx, -3689348814741910323
	mul	rdx
	mov	rax, rdx
	shr	rax, 3
	mov	QWORD PTR -8[rbp], rax
	jmp	.L19
.L21:
	mov	eax, -1
	jmp	.L22
.L19:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L23
	mov	eax, 1
.L22:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	is_lucky, .-is_lucky
	.globl	gen
	.type	gen, @function
gen:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L25
.L26:
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	mov	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	add	DWORD PTR -12[rbp], 1
.L25:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jl	.L26
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	gen, .-gen
	.section	.rodata
.LC3:
	.string	"%llu"
.LC4:
	.string	"%llu\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -72[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	digitcount
	mov	DWORD PTR -76[rbp], eax
	mov	QWORD PTR -64[rbp], 0
	mov	DWORD PTR -84[rbp], 1
	jmp	.L29
.L36:
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, eax
	mov	edi, 1
	call	gen
	mov	QWORD PTR -48[rbp], rax
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, eax
	mov	edi, 7
	call	gen
	mov	QWORD PTR -40[rbp], rax
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, eax
	mov	edi, 9
	call	gen
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -80[rbp], 0
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	is_lucky
	cmp	eax, 1
	jne	.L30
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR -56[rbp], rax
	mov	DWORD PTR -80[rbp], 1
	jmp	.L34
.L30:
	mov	rax, QWORD PTR -72[rbp]
	cmp	QWORD PTR -32[rbp], rax
	jbe	.L34
	mov	rax, QWORD PTR -72[rbp]
	cmp	QWORD PTR -40[rbp], rax
	jbe	.L32
	mov	rax, QWORD PTR -72[rbp]
	cmp	QWORD PTR -48[rbp], rax
	jbe	.L33
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -56[rbp], rax
	jmp	.L34
.L33:
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -56[rbp], rax
	jmp	.L34
.L32:
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -56[rbp], rax
	jmp	.L34
.L35:
	sub	QWORD PTR -56[rbp], 1
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	is_lucky
	cmp	eax, 1
	jne	.L34
	mov	DWORD PTR -80[rbp], 1
.L34:
	cmp	DWORD PTR -80[rbp], 0
	je	.L35
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	digit_replace
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	convert_to_10
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	add	QWORD PTR -64[rbp], rax
	add	DWORD PTR -84[rbp], 1
.L29:
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -76[rbp]
	jle	.L36
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 1
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1074266112
	.align 8
.LC1:
	.long	0
	.long	1138753536
	.align 8
.LC2:
	.long	0
	.long	1076101120
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"301071.c"
	.text
	.global	__aeabi_uldivmod
	.global	__aeabi_i2d
	.global	__aeabi_d2ulz
	.align	2
	.global	convert_to_10
	.syntax unified
	.arm
	.fpu softvfp
	.type	convert_to_10, %function
convert_to_10:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-28]
	str	r1, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L2
.L3:
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_uldivmod
	mov	r4, r2
	ldr	r0, [fp, #-16]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, #0
	ldr	r1, .L5
	bl	pow
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2ulz
	mov	r2, r0
	mov	r3, r1
	mov	r3, r2
	mul	r2, r3, r4
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_uldivmod
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
.L2:
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	bne	.L3
	ldr	r3, [fp, #-20]
	mov	r2, r3
	asr	r3, r2, #31
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L6:
	.align	2
.L5:
	.word	1074266112
	.size	convert_to_10, .-convert_to_10
	.align	2
	.global	digitcount
	.syntax unified
	.arm
	.fpu softvfp
	.type	digitcount, %function
digitcount:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-20]
	str	r1, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L8
.L9:
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_uldivmod
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L8:
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	bne	.L9
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	digitcount, .-digitcount
	.global	__aeabi_d2iz
	.align	2
	.global	digit_replace
	.syntax unified
	.arm
	.fpu softvfp
	.type	digit_replace, %function
digit_replace:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #24
	str	r0, [fp, #-36]
	str	r1, [fp, #-32]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L12
.L16:
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_uldivmod
	cmp	r3, #0
	cmpeq	r2, #1
	bne	.L13
	mov	r3, #0
	str	r3, [fp, #-24]
.L13:
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_uldivmod
	cmp	r3, #0
	cmpeq	r2, #7
	bne	.L14
	mov	r3, #1
	str	r3, [fp, #-24]
.L14:
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_uldivmod
	cmp	r3, #0
	cmpeq	r2, #9
	bne	.L15
	mov	r3, #2
	str	r3, [fp, #-24]
.L15:
	ldr	r0, [fp, #-28]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, #0
	ldr	r1, .L18
	bl	pow
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r2, r0
	ldr	r3, [fp, #-24]
	mul	r3, r2, r3
	mov	r2, r3
	asr	r3, r2, #31
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	adds	r4, r0, r2
	adc	r5, r1, r3
	str	r4, [fp, #-20]
	str	r5, [fp, #-16]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_uldivmod
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
.L12:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	bne	.L16
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L19:
	.align	2
.L18:
	.word	1076101120
	.size	digit_replace, .-digit_replace
	.align	2
	.global	is_lucky
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_lucky, %function
is_lucky:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-12]
	str	r1, [fp, #-8]
	b	.L21
.L25:
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_uldivmod
	cmp	r3, #0
	cmpeq	r2, #1
	beq	.L22
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_uldivmod
	cmp	r3, #0
	cmpeq	r2, #7
	beq	.L22
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_uldivmod
	cmp	r3, #0
	cmpeq	r2, #9
	bne	.L23
.L22:
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	mov	r2, #10
	mov	r3, #0
	bl	__aeabi_uldivmod
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	b	.L21
.L23:
	mvn	r3, #0
	b	.L24
.L21:
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	bne	.L25
	mov	r3, #1
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	is_lucky, .-is_lucky
	.align	2
	.global	gen
	.syntax unified
	.arm
	.fpu softvfp
	.type	gen, %function
gen:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	push	{r4, r5, r6, r7, r8, r9, fp}
	add	fp, sp, #24
	sub	sp, sp, #28
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L27
.L28:
	sub	r5, fp, #36
	ldmia	r5, {r4-r5}
	mov	r2, r4
	mov	r3, r5
	mov	r0, #0
	mov	r1, #0
	lsl	r1, r3, #2
	orr	r1, r1, r2, lsr #30
	lsl	r0, r2, #2
	mov	r2, r0
	mov	r3, r1
	adds	r2, r2, r4
	adc	r3, r3, r5
	adds	r8, r2, r2
	adc	r9, r3, r3
	mov	r2, r8
	mov	r3, r9
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #-48]
	mov	r2, r3
	asr	r3, r2, #31
	adds	r6, r0, r2
	adc	r7, r1, r3
	str	r6, [fp, #-36]
	str	r7, [fp, #-32]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L27:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-52]
	cmp	r2, r3
	blt	.L28
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp}
	bx	lr
	.size	gen, .-gen
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%llu\000"
	.align	2
.LC1:
	.ascii	"%llu\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #96
	str	r0, [fp, #-120]
	str	r1, [fp, #-124]
	ldr	r3, .L41
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, .L41+4
	bl	__isoc99_scanf
	sub	r3, fp, #100
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	digitcount
	str	r0, [fp, #-104]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-92]
	str	r3, [fp, #-88]
	mov	r3, #1
	str	r3, [fp, #-112]
	b	.L31
.L38:
	ldr	r1, [fp, #-112]
	mov	r0, #1
	bl	gen
	str	r0, [fp, #-76]
	str	r1, [fp, #-72]
	ldr	r1, [fp, #-112]
	mov	r0, #7
	bl	gen
	str	r0, [fp, #-68]
	str	r1, [fp, #-64]
	ldr	r1, [fp, #-112]
	mov	r0, #9
	bl	gen
	str	r0, [fp, #-60]
	str	r1, [fp, #-56]
	mov	r3, #0
	str	r3, [fp, #-108]
	sub	r3, fp, #100
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	is_lucky
	mov	r3, r0
	cmp	r3, #1
	bne	.L32
	sub	r3, fp, #100
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-84]
	str	r3, [fp, #-80]
	mov	r3, #1
	str	r3, [fp, #-108]
	b	.L36
.L32:
	sub	r3, fp, #100
	ldmia	r3, {r2-r3}
	sub	r1, fp, #60
	ldmia	r1, {r0-r1}
	cmp	r1, r3
	cmpeq	r0, r2
	bls	.L36
	sub	r3, fp, #100
	ldmia	r3, {r2-r3}
	sub	r1, fp, #68
	ldmia	r1, {r0-r1}
	cmp	r1, r3
	cmpeq	r0, r2
	bls	.L34
	sub	r3, fp, #100
	ldmia	r3, {r2-r3}
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	cmp	r1, r3
	cmpeq	r0, r2
	bls	.L35
	sub	r3, fp, #76
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-84]
	str	r3, [fp, #-80]
	b	.L36
.L35:
	sub	r3, fp, #68
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-84]
	str	r3, [fp, #-80]
	b	.L36
.L34:
	sub	r3, fp, #60
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-84]
	str	r3, [fp, #-80]
	b	.L36
.L37:
	sub	r3, fp, #84
	ldmia	r3, {r2-r3}
	subs	r4, r2, #1
	sbc	r5, r3, #0
	str	r4, [fp, #-84]
	str	r5, [fp, #-80]
	sub	r1, fp, #84
	ldmia	r1, {r0-r1}
	bl	is_lucky
	mov	r3, r0
	cmp	r3, #1
	bne	.L36
	mov	r3, #1
	str	r3, [fp, #-108]
.L36:
	ldr	r3, [fp, #-108]
	cmp	r3, #0
	beq	.L37
	sub	r1, fp, #84
	ldmia	r1, {r0-r1}
	bl	digit_replace
	str	r0, [fp, #-52]
	str	r1, [fp, #-48]
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	bl	convert_to_10
	str	r0, [fp, #-44]
	str	r1, [fp, #-40]
	sub	r1, fp, #92
	ldmia	r1, {r0-r1}
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	adds	r6, r0, r2
	adc	r7, r1, r3
	str	r6, [fp, #-92]
	str	r7, [fp, #-88]
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L31:
	ldr	r2, [fp, #-112]
	ldr	r3, [fp, #-104]
	cmp	r2, r3
	ble	.L38
	sub	r3, fp, #92
	ldmia	r3, {r2-r3}
	adds	r8, r2, #1
	adc	r9, r3, #0
	mov	r2, r8
	mov	r3, r9
	ldr	r0, .L41+8
	bl	printf
	mov	r3, #0
	ldr	r2, .L41
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L40
	bl	__stack_chk_fail
.L40:
	mov	r0, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
