	.file	"538261.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"-1"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L2
.L7:
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1431655766
	shr	rdx, 32
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	mov	DWORD PTR -12[rbp], edx
	mov	ecx, DWORD PTR -12[rbp]
	mov	edx, ecx
	add	edx, edx
	add	edx, ecx
	sub	eax, edx
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 2
	jne	.L3
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 4
	jle	.L3
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 5
	mov	edi, eax
	call	dig
	imul	rax, rax, 100000
	add	rax, 33333
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L4
.L3:
	cmp	DWORD PTR -12[rbp], 0
	jne	.L5
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	dig
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L4
.L5:
	cmp	DWORD PTR -12[rbp], 1
	jne	.L6
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 9
	jle	.L6
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 10
	mov	edi, eax
	call	dig
	imul	rax, rax, 1000000000
	mov	edx, 3333333333
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L4
.L6:
	lea	rdi, .LC2[rip]
	call	puts@PLT
.L4:
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, 1
	mov	DWORD PTR -16[rbp], eax
.L2:
	mov	eax, DWORD PTR -16[rbp]
	test	eax, eax
	jg	.L7
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	dig
	.type	dig, @function
dig:
.LFB1:
	.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
	mov	DWORD PTR -8[rbp], 0
	jmp	.L11
.L12:
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	DWORD PTR -4[rbp], eax
	add	DWORD PTR -4[rbp], 5
	add	DWORD PTR -8[rbp], 1
.L11:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L12
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	dig, .-dig
	.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	"538261.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.ascii	"%lld\012\000"
	.align	2
.LC2:
	.ascii	"-1\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 = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #16
	ldr	r3, .L10+8
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	sub	r3, fp, #32
	mov	r1, r3
	ldr	r0, .L10+12
	bl	__isoc99_scanf
	b	.L2
.L7:
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, .L10+12
	bl	__isoc99_scanf
	ldr	r2, [fp, #-36]
	ldr	r3, .L10+16
	smull	r0, r1, r3, r2
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	sub	r3, r2, r3
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #2
	bne	.L3
	ldr	r3, [fp, #-36]
	cmp	r3, #4
	ble	.L3
	ldr	r3, [fp, #-36]
	sub	r3, r3, #5
	mov	r0, r3
	bl	dig
	ldr	r3, .L10+20
	mul	r2, r3, r1
	mov	r3, #0
	mul	r3, r0, r3
	add	ip, r2, r3
	ldr	lr, .L10+20
	umull	r2, r3, r0, lr
	add	r1, ip, r3
	mov	r3, r1
	ldr	r0, .L10+24
	mov	r1, #0
	adds	r4, r2, r0
	adc	r5, r3, r1
	mov	r2, r4
	mov	r3, r5
	ldr	r0, .L10+28
	bl	printf
	b	.L4
.L3:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L5
	ldr	r3, [fp, #-36]
	mov	r0, r3
	bl	dig
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L10+28
	bl	printf
	b	.L4
.L5:
	ldr	r3, [fp, #-28]
	cmp	r3, #1
	bne	.L6
	ldr	r3, [fp, #-36]
	cmp	r3, #9
	ble	.L6
	ldr	r3, [fp, #-36]
	sub	r3, r3, #10
	mov	r0, r3
	bl	dig
	ldr	r3, .L10+32
	mul	r2, r3, r1
	mov	r3, #0
	mul	r3, r0, r3
	add	ip, r2, r3
	ldr	lr, .L10+32
	umull	r2, r3, r0, lr
	add	r1, ip, r3
	mov	r3, r1
	adr	r1, .L10
	ldmia	r1, {r0-r1}
	adds	r6, r2, r0
	adc	r7, r3, r1
	mov	r2, r6
	mov	r3, r7
	ldr	r0, .L10+28
	bl	printf
	b	.L4
.L6:
	ldr	r0, .L10+36
	bl	puts
.L4:
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	str	r3, [fp, #-32]
.L2:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bgt	.L7
	mov	r3, #0
	ldr	r2, .L10+8
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L11:
	.align	3
.L10:
	.word	-961633963
	.word	0
	.word	.LC3
	.word	.LC0
	.word	1431655766
	.word	100000
	.word	33333
	.word	.LC1
	.word	1000000000
	.word	.LC2
	.size	main, .-main
	.align	2
	.global	dig
	.syntax unified
	.arm
	.fpu softvfp
	.type	dig, %function
dig:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L13
.L14:
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	add	r3, r3, #5
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L13:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L14
	ldr	r3, [fp, #-8]
	mov	r2, r3
	asr	r3, r2, #31
	mov	r0, r2
	mov	r1, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	dig, .-dig
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
