	.file	"220456257.c"
	.intel_syntax noprefix
	.text
	.globl	cache
	.bss
	.align 32
	.type	cache, @object
	.size	cache, 8000008
cache:
	.zero	8000008
	.text
	.globl	lenCollatzNum
	.type	lenCollatzNum, @function
lenCollatzNum:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 1000000
	ja	.L2
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, cache[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	je	.L2
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, cache[rip]
	mov	rax, QWORD PTR [rdx+rax]
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -8[rbp]
	and	eax, 1
	test	rax, rax
	je	.L4
	cmp	QWORD PTR -8[rbp], 1000000
	ja	.L5
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, 1
	shr	rax
	mov	rdi, rax
	call	lenCollatzNum
	lea	rcx, 2[rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, cache[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, cache[rip]
	mov	rax, QWORD PTR [rdx+rax]
	jmp	.L3
.L5:
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, 1
	shr	rax
	mov	rdi, rax
	call	lenCollatzNum
	add	rax, 2
	jmp	.L3
.L4:
	cmp	QWORD PTR -8[rbp], 1000000
	ja	.L6
	mov	rax, QWORD PTR -8[rbp]
	shr	rax
	mov	rdi, rax
	call	lenCollatzNum
	lea	rcx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, cache[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, cache[rip]
	mov	rax, QWORD PTR [rdx+rax]
	jmp	.L3
.L6:
	mov	rax, QWORD PTR -8[rbp]
	shr	rax
	mov	rdi, rax
	call	lenCollatzNum
	add	rax, 1
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	lenCollatzNum, .-lenCollatzNum
	.section	.rodata
.LC0:
	.string	"%lu %lu %lu\n"
.LC1:
	.string	"%lu %lu"
	.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
	sub	rsp, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR cache[rip+8], 1
	mov	QWORD PTR -32[rbp], 2
	jmp	.L8
.L9:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, cache[rip]
	mov	QWORD PTR [rdx+rax], 0
	add	QWORD PTR -32[rbp], 1
.L8:
	cmp	QWORD PTR -32[rbp], 1000000
	jbe	.L9
	jmp	.L10
.L19:
	mov	QWORD PTR -24[rbp], 0
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	cmp	rdx, rax
	jnb	.L11
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -32[rbp], rax
	jmp	.L12
.L14:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	lenCollatzNum
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	cmp	rax, QWORD PTR -24[rbp]
	jbe	.L13
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -24[rbp], rax
.L13:
	add	QWORD PTR -32[rbp], 1
.L12:
	mov	rax, QWORD PTR -40[rbp]
	cmp	QWORD PTR -32[rbp], rax
	jbe	.L14
	jmp	.L15
.L11:
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -32[rbp], rax
	jmp	.L16
.L18:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	lenCollatzNum
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	cmp	rax, QWORD PTR -24[rbp]
	jbe	.L17
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -24[rbp], rax
.L17:
	add	QWORD PTR -32[rbp], 1
.L16:
	mov	rax, QWORD PTR -48[rbp]
	cmp	QWORD PTR -32[rbp], rax
	jbe	.L18
.L15:
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rcx, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L10:
	lea	rdx, -40[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, -1
	jne	.L19
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	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	"220456257.c"
	.text
	.comm	cache,4000004,4
	.align	2
	.global	lenCollatzNum
	.syntax unified
	.arm
	.fpu softvfp
	.type	lenCollatzNum, %function
lenCollatzNum:
	@ 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, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, .L7
	cmp	r3, r2
	bhi	.L2
	ldr	r2, .L7+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	beq	.L2
	ldr	r2, .L7+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	b	.L3
.L2:
	ldr	r3, [fp, #-8]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L4
	ldr	r3, [fp, #-8]
	ldr	r2, .L7
	cmp	r3, r2
	bhi	.L5
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, #1
	lsr	r3, r3, #1
	mov	r0, r3
	bl	lenCollatzNum
	mov	r3, r0
	add	r2, r3, #2
	ldr	r1, .L7+4
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r2, .L7+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	b	.L3
.L5:
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, #1
	lsr	r3, r3, #1
	mov	r0, r3
	bl	lenCollatzNum
	mov	r3, r0
	add	r3, r3, #2
	b	.L3
.L4:
	ldr	r3, [fp, #-8]
	ldr	r2, .L7
	cmp	r3, r2
	bhi	.L6
	ldr	r3, [fp, #-8]
	lsr	r3, r3, #1
	mov	r0, r3
	bl	lenCollatzNum
	mov	r3, r0
	add	r2, r3, #1
	ldr	r1, .L7+4
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r2, .L7+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	b	.L3
.L6:
	ldr	r3, [fp, #-8]
	lsr	r3, r3, #1
	mov	r0, r3
	bl	lenCollatzNum
	mov	r3, r0
	add	r3, r3, #1
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	1000000
	.word	cache
	.size	lenCollatzNum, .-lenCollatzNum
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%lu %lu %lu\012\000"
	.align	2
.LC1:
	.ascii	"%lu %lu\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 = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L24+4
	mov	r2, #1
	str	r2, [r3, #4]
	mov	r3, #2
	str	r3, [fp, #-20]
	b	.L10
.L11:
	ldr	r2, .L24+4
	ldr	r3, [fp, #-20]
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L10:
	ldr	r3, [fp, #-20]
	ldr	r2, .L24+8
	cmp	r3, r2
	bls	.L11
	b	.L12
.L21:
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bcs	.L13
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-20]
	b	.L14
.L16:
	ldr	r0, [fp, #-20]
	bl	lenCollatzNum
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bls	.L15
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-16]
.L15:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L14:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bls	.L16
	b	.L17
.L13:
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-20]
	b	.L18
.L20:
	ldr	r0, [fp, #-20]
	bl	lenCollatzNum
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bls	.L19
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-16]
.L19:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L18:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bls	.L20
.L17:
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	ldr	r0, .L24+12
	bl	printf
.L12:
	sub	r2, fp, #24
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L24+16
	bl	__isoc99_scanf
	mov	r3, r0
	cmn	r3, #1
	bne	.L21
	mov	r3, #0
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC2
	.word	cache
	.word	1000000
	.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
