	.file	"501485.c"
	.intel_syntax noprefix
	.text
	.globl	tris
	.bss
	.align 32
	.type	tris, @object
	.size	tris, 8192
tris:
	.zero	8192
	.text
	.globl	int_sqrt
	.type	int_sqrt, @function
int_sqrt:
.LFB0:
	.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 -40[rbp], rdi
	mov	QWORD PTR -32[rbp], 1
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	QWORD PTR -16[rbp], 0
	mov	QWORD PTR -8[rbp], 0
	jmp	.L2
.L3:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, rax
	shr	rdx, 63
	add	rax, rdx
	sar	rax
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	cqo
	idiv	QWORD PTR -32[rbp]
	mov	QWORD PTR -24[rbp], rax
.L2:
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, QWORD PTR -8[rbp]
	jne	.L3
	mov	rax, QWORD PTR -32[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	int_sqrt, .-int_sqrt
	.globl	get_hyp
	.type	get_hyp, @function
get_hyp:
.LFB1:
	.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 -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	imul	rax, rax
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	imul	rax, rax
	add	rax, rdx
	mov	rdi, rax
	call	int_sqrt
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	imul	rax, rax
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	imul	rax, rax
	mov	rcx, rax
	mov	rax, QWORD PTR -32[rbp]
	imul	rax, rax
	add	rax, rcx
	cmp	rdx, rax
	je	.L6
	mov	eax, 0
	jmp	.L7
.L6:
	mov	rax, QWORD PTR -8[rbp]
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	get_hyp, .-get_hyp
	.section	.rodata
.LC0:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.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	QWORD PTR -48[rbp], 1
	jmp	.L9
.L15:
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -40[rbp], rax
	jmp	.L10
.L14:
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	get_hyp
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	cmp	rax, 1000
	jg	.L20
	cmp	QWORD PTR -8[rbp], 0
	je	.L13
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	lea	rdx, 0[0+rax*8]
	lea	rcx, tris[rip]
	mov	rdx, QWORD PTR [rdx+rcx]
	lea	rcx, 1[rdx]
	lea	rdx, 0[0+rax*8]
	lea	rax, tris[rip]
	mov	QWORD PTR [rdx+rax], rcx
.L13:
	add	QWORD PTR -40[rbp], 1
.L10:
	cmp	QWORD PTR -40[rbp], 999
	jle	.L14
	jmp	.L12
.L20:
	nop
.L12:
	add	QWORD PTR -48[rbp], 1
.L9:
	cmp	QWORD PTR -48[rbp], 999
	jle	.L15
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	QWORD PTR -16[rbp], 1
	jmp	.L16
.L18:
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, tris[rip]
	mov	rax, QWORD PTR [rdx+rax]
	cmp	QWORD PTR -32[rbp], rax
	jge	.L17
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, tris[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -24[rbp], rax
.L17:
	add	QWORD PTR -16[rbp], 1
.L16:
	cmp	QWORD PTR -16[rbp], 1000
	jle	.L18
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"501485.c"
	.text
	.comm	tris,8192,8
	.global	__aeabi_ldivmod
	.align	2
	.global	int_sqrt
	.syntax unified
	.arm
	.fpu softvfp
	.type	int_sqrt, %function
int_sqrt:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #40
	str	r0, [fp, #-60]
	str	r1, [fp, #-56]
	mov	r2, #1
	mov	r3, #0
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	sub	r3, fp, #60
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	b	.L2
.L3:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	adds	r4, r0, r2
	adc	r5, r1, r3
	lsr	r3, r5, #31
	mov	r2, r3
	mov	r3, #0
	adds	r6, r2, r4
	adc	r7, r3, r5
	mov	r2, #0
	mov	r3, #0
	lsr	r2, r6, #1
	orr	r2, r2, r7, lsl #31
	asr	r3, r7, #1
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	sub	r1, fp, #60
	ldmia	r1, {r0-r1}
	bl	__aeabi_ldivmod
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
.L2:
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	cmp	r1, r3
	cmpeq	r0, r2
	bne	.L3
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
	.size	int_sqrt, .-int_sqrt
	.align	2
	.global	get_hyp
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_hyp, %function
get_hyp:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #24
	str	r0, [fp, #-36]
	str	r1, [fp, #-32]
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-36]
	mul	r2, r3, r2
	ldr	r3, [fp, #-32]
	ldr	r1, [fp, #-36]
	mul	r3, r1, r3
	add	r2, r2, r3
	ldr	r3, [fp, #-36]
	umull	r0, r1, r3, r3
	add	r3, r2, r1
	mov	r1, r3
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-44]
	mul	r2, r3, r2
	ldr	r3, [fp, #-40]
	ldr	ip, [fp, #-44]
	mul	r3, ip, r3
	add	lr, r2, r3
	ldr	ip, [fp, #-44]
	umull	r2, r3, ip, ip
	add	ip, lr, r3
	mov	r3, ip
	adds	r4, r0, r2
	adc	r5, r1, r3
	mov	r0, r4
	mov	r1, r5
	bl	int_sqrt
	str	r0, [fp, #-28]
	str	r1, [fp, #-24]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	mul	r2, r3, r2
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-28]
	mul	r3, r1, r3
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	umull	r4, r5, r3, r3
	add	r3, r2, r5
	mov	r5, r3
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-36]
	mul	r2, r3, r2
	ldr	r3, [fp, #-32]
	ldr	r1, [fp, #-36]
	mul	r3, r1, r3
	add	r2, r2, r3
	ldr	r3, [fp, #-36]
	umull	r0, r1, r3, r3
	add	r3, r2, r1
	mov	r1, r3
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-44]
	mul	r2, r3, r2
	ldr	r3, [fp, #-40]
	ldr	ip, [fp, #-44]
	mul	r3, ip, r3
	add	lr, r2, r3
	ldr	ip, [fp, #-44]
	umull	r2, r3, ip, ip
	add	ip, lr, r3
	mov	r3, ip
	adds	r6, r0, r2
	adc	r7, r1, r3
	cmp	r5, r7
	cmpeq	r4, r6
	beq	.L6
	mov	r2, #0
	mov	r3, #0
	b	.L7
.L6:
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
.L7:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
	.size	get_hyp, .-get_hyp
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%lld\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #88
	mov	r2, #1
	mov	r3, #0
	str	r2, [fp, #-76]
	str	r3, [fp, #-72]
	b	.L9
.L15:
	sub	r3, fp, #76
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-68]
	str	r3, [fp, #-64]
	b	.L10
.L14:
	sub	r3, fp, #68
	ldmia	r3, {r2-r3}
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	bl	get_hyp
	str	r0, [fp, #-36]
	str	r1, [fp, #-32]
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	sub	r3, fp, #68
	ldmia	r3, {r2-r3}
	adds	r4, r0, r2
	adc	r5, r1, r3
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	adds	r1, r4, r2
	str	r1, [fp, #-84]
	adc	r3, r5, r3
	str	r3, [fp, #-80]
	mov	r2, #1000
	mov	r3, #0
	sub	r1, fp, #84
	ldmia	r1, {r0-r1}
	cmp	r2, r0
	sbcs	r3, r3, r1
	blt	.L20
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	beq	.L13
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	sub	r3, fp, #68
	ldmia	r3, {r2-r3}
	adds	r6, r0, r2
	adc	r7, r1, r3
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	adds	r1, r6, r2
	str	r1, [fp, #-92]
	adc	r3, r7, r3
	str	r3, [fp, #-88]
	ldr	r2, .L21
	sub	r1, fp, #92
	ldmia	r1, {r0-r1}
	mov	r3, r0
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	adds	ip, r2, #1
	str	ip, [fp, #-100]
	adc	r3, r3, #0
	str	r3, [fp, #-96]
	ldr	r2, .L21
	mov	r3, r0
	lsl	r3, r3, #3
	add	r3, r2, r3
	sub	r2, fp, #100
	ldmia	r2, {r1-r2}
	stm	r3, {r1-r2}
.L13:
	sub	r3, fp, #68
	ldmia	r3, {r2-r3}
	adds	r1, r2, #1
	str	r1, [fp, #-108]
	adc	r3, r3, #0
	str	r3, [fp, #-104]
	sub	r3, fp, #108
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-68]
	str	r3, [fp, #-64]
.L10:
	sub	r3, fp, #68
	ldmia	r3, {r2-r3}
	cmp	r2, #1000
	sbcs	r3, r3, #0
	blt	.L14
	b	.L12
.L20:
	nop
.L12:
	sub	r3, fp, #76
	ldmia	r3, {r2-r3}
	adds	r1, r2, #1
	str	r1, [fp, #-116]
	adc	r3, r3, #0
	str	r3, [fp, #-112]
	sub	r3, fp, #116
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-76]
	str	r3, [fp, #-72]
.L9:
	sub	r3, fp, #76
	ldmia	r3, {r2-r3}
	cmp	r2, #1000
	sbcs	r3, r3, #0
	blt	.L15
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-60]
	str	r3, [fp, #-56]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	mov	r2, #1
	mov	r3, #0
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
	b	.L16
.L18:
	ldr	r2, .L21
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	sub	r1, fp, #60
	ldmia	r1, {r0-r1}
	cmp	r0, r2
	sbcs	r3, r1, r3
	bge	.L17
	ldr	r2, .L21
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-60]
	str	r3, [fp, #-56]
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
.L17:
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	adds	r8, r2, #1
	adc	r9, r3, #0
	str	r8, [fp, #-44]
	str	r9, [fp, #-40]
.L16:
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	mov	r0, #1000
	mov	r1, #0
	cmp	r0, r2
	sbcs	r3, r1, r3
	bge	.L18
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	ldr	r0, .L21+4
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L22:
	.align	2
.L21:
	.word	tris
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
