	.file	"200644.c"
	.intel_syntax noprefix
	.text
	.globl	get_sum_of_digit
	.type	get_sum_of_digit, @function
get_sum_of_digit:
.LFB6:
	.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 -4[rbp], 0
	jmp	.L2
.L3:
	mov	ecx, DWORD PTR -20[rbp]
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	add	DWORD PTR -4[rbp], edx
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx, 2
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -20[rbp], eax
.L2:
	cmp	DWORD PTR -20[rbp], 0
	jg	.L3
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_sum_of_digit, .-get_sum_of_digit
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	r11, -999424[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 624
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -1000015[rbp], 0
	movzx	eax, BYTE PTR -1000015[rbp]
	mov	BYTE PTR -1000016[rbp], al
	mov	DWORD PTR -1000032[rbp], 2
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -1000032[rbp]
	cdqe
	mov	BYTE PTR -1000016[rbp+rax], 1
	add	DWORD PTR -1000032[rbp], 1
.L6:
	cmp	DWORD PTR -1000032[rbp], 999999
	jle	.L7
	mov	DWORD PTR -1000032[rbp], 2
	jmp	.L8
.L12:
	mov	eax, DWORD PTR -1000032[rbp]
	cdqe
	movzx	eax, BYTE PTR -1000016[rbp+rax]
	test	al, al
	je	.L9
	mov	eax, DWORD PTR -1000032[rbp]
	add	eax, eax
	mov	DWORD PTR -1000028[rbp], eax
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -1000028[rbp]
	cdqe
	mov	BYTE PTR -1000016[rbp+rax], 0
	mov	eax, DWORD PTR -1000032[rbp]
	add	DWORD PTR -1000028[rbp], eax
.L10:
	cmp	DWORD PTR -1000028[rbp], 999999
	jle	.L11
.L9:
	add	DWORD PTR -1000032[rbp], 1
.L8:
	cmp	DWORD PTR -1000032[rbp], 999999
	jle	.L12
	lea	rax, -1000044[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L13
.L17:
	lea	rdx, -1000036[rbp]
	lea	rax, -1000040[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -1000024[rbp], 0
	mov	eax, DWORD PTR -1000040[rbp]
	mov	DWORD PTR -1000032[rbp], eax
	jmp	.L14
.L16:
	mov	eax, DWORD PTR -1000032[rbp]
	cdqe
	movzx	eax, BYTE PTR -1000016[rbp+rax]
	test	al, al
	je	.L15
	mov	eax, DWORD PTR -1000032[rbp]
	mov	edi, eax
	call	get_sum_of_digit
	mov	DWORD PTR -1000020[rbp], eax
	mov	eax, DWORD PTR -1000020[rbp]
	cdqe
	movzx	eax, BYTE PTR -1000016[rbp+rax]
	test	al, al
	je	.L15
	add	DWORD PTR -1000024[rbp], 1
.L15:
	add	DWORD PTR -1000032[rbp], 1
.L14:
	mov	eax, DWORD PTR -1000036[rbp]
	cmp	DWORD PTR -1000032[rbp], eax
	jle	.L16
	mov	eax, DWORD PTR -1000024[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L13:
	mov	eax, DWORD PTR -1000044[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -1000044[rbp], edx
	test	eax, eax
	jne	.L17
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.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	"200644.c"
	.text
	.align	2
	.global	get_sum_of_digit
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_sum_of_digit, %function
get_sum_of_digit:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r1, [fp, #-16]
	ldr	r3, .L5
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r2, .L5
	smull	r1, r2, r3, r2
	asr	r2, r2, #2
	asr	r3, r3, #31
	sub	r3, r2, r3
	str	r3, [fp, #-16]
.L2:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bgt	.L3
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L6:
	.align	2
.L5:
	.word	1717986919
	.size	get_sum_of_digit, .-get_sum_of_digit
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.ascii	"%d %d\000"
	.align	2
.LC2:
	.ascii	"%d\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1000032
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #999424
	sub	sp, sp, #612
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, #0
	strb	r2, [r3, #-579]
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldrb	r2, [r3, #-579]	@ zero_extendqisi2
	sub	r3, fp, #999424
	sub	r3, r3, #12
	strb	r2, [r3, #-580]
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #2
	str	r3, [r2, #-596]
	b	.L8
.L9:
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-596]
	add	r3, r2, r3
	sub	r3, r3, #580
	mov	r2, #1
	strb	r2, [r3]
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-596]
	add	r3, r3, #1
	str	r3, [r2, #-596]
.L8:
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-596]
	ldr	r2, .L22+4
	cmp	r3, r2
	blt	.L9
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #2
	str	r3, [r2, #-596]
	b	.L10
.L14:
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-596]
	add	r3, r2, r3
	sub	r3, r3, #580
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L11
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-596]
	lsl	r3, r3, #1
	str	r3, [r2, #-592]
	b	.L12
.L13:
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-592]
	add	r3, r2, r3
	sub	r3, r3, #580
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r2, [r2, #-592]
	ldr	r3, [r3, #-596]
	add	r3, r2, r3
	str	r3, [r1, #-592]
.L12:
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-592]
	ldr	r2, .L22+4
	cmp	r3, r2
	blt	.L13
.L11:
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-596]
	add	r3, r3, #1
	str	r3, [r2, #-596]
.L10:
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-596]
	ldr	r2, .L22+4
	cmp	r3, r2
	blt	.L14
	sub	r3, fp, #999424
	sub	r3, r3, #12
	sub	r3, r3, #608
	mov	r1, r3
	ldr	r0, .L22+8
	bl	__isoc99_scanf
	b	.L15
.L19:
	sub	r2, fp, #999424
	sub	r2, r2, #12
	sub	r2, r2, #600
	sub	r3, fp, #999424
	sub	r3, r3, #12
	sub	r3, r3, #604
	mov	r1, r3
	ldr	r0, .L22+12
	bl	__isoc99_scanf
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-588]
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-604]
	str	r3, [r2, #-596]
	b	.L16
.L18:
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-596]
	add	r3, r2, r3
	sub	r3, r3, #580
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L17
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r0, [r3, #-596]
	bl	get_sum_of_digit
	str	r0, [r4, #-584]
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-584]
	add	r3, r2, r3
	sub	r3, r3, #580
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L17
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-588]
	add	r3, r3, #1
	str	r3, [r2, #-588]
.L17:
	sub	r3, fp, #999424
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-596]
	add	r3, r3, #1
	str	r3, [r2, #-596]
.L16:
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-600]
	sub	r2, fp, #999424
	sub	r2, r2, #12
	ldr	r2, [r2, #-596]
	cmp	r2, r3
	ble	.L18
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r1, [r3, #-588]
	ldr	r0, .L22+16
	bl	printf
.L15:
	sub	r3, fp, #999424
	sub	r3, r3, #12
	ldr	r3, [r3, #-608]
	sub	r2, r3, #1
	sub	r1, fp, #999424
	sub	r1, r1, #12
	str	r2, [r1, #-608]
	cmp	r3, #0
	bne	.L19
	mov	r3, #0
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC3
	.word	1000000
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
