	.file	"210218.c"
	.intel_syntax noprefix
	.text
	.globl	totalSum
	.bss
	.align 8
	.type	totalSum, @object
	.size	totalSum, 8
totalSum:
	.zero	8
	.section	.rodata
.LC0:
	.string	"totalSum at the end: %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -112[rbp], 1
	mov	DWORD PTR -108[rbp], 1000
	mov	DWORD PTR -104[rbp], 1001
	mov	DWORD PTR -100[rbp], 2000
	lea	rdx, -112[rbp]
	lea	rax, -128[rbp]
	mov	rcx, rdx
	lea	rdx, sumNumbers[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -136[rbp], eax
	lea	rdx, -104[rbp]
	lea	rax, -120[rbp]
	mov	rcx, rdx
	lea	rdx, sumNumbers[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -132[rbp], eax
	mov	DWORD PTR -144[rbp], 0
	jmp	.L2
.L3:
	lea	rdx, -96[rbp]
	mov	eax, DWORD PTR -144[rbp]
	cdqe
	sal	rax, 3
	lea	rdi, [rdx+rax]
	lea	rax, -112[rbp]
	mov	rcx, rax
	lea	rdx, sumNumbers[rip]
	mov	esi, 0
	call	pthread_create@PLT
	add	DWORD PTR -144[rbp], 1
.L2:
	cmp	DWORD PTR -144[rbp], 9
	jle	.L3
	mov	rax, QWORD PTR -128[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	movsx	rdx, eax
	mov	rax, QWORD PTR totalSum[rip]
	add	rax, rdx
	mov	QWORD PTR totalSum[rip], rax
	mov	rax, QWORD PTR -120[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	movsx	rdx, eax
	mov	rax, QWORD PTR totalSum[rip]
	add	rax, rdx
	mov	QWORD PTR totalSum[rip], rax
	mov	DWORD PTR -140[rbp], 0
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -140[rbp]
	cdqe
	mov	rax, QWORD PTR -96[rbp+rax*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -140[rbp], 1
.L4:
	cmp	DWORD PTR -140[rbp], 9
	jle	.L5
	lea	rsi, totalSum[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	"totalsum: %ld\n"
.LC2:
	.string	"sum: %d\n"
	.text
	.globl	sumNumbers
	.type	sumNumbers, @function
sumNumbers:
.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	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -24[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L9
.L10:
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	mov	DWORD PTR -24[rbp], eax
	add	DWORD PTR -20[rbp], 1
.L9:
	cmp	DWORD PTR -20[rbp], 1000
	jle	.L10
	lea	rsi, totalSum[rip]
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR totalSum[rip]
	add	rax, rdx
	mov	QWORD PTR totalSum[rip], rax
	nop
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sumNumbers, .-sumNumbers
	.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	"210218.c"
	.text
	.global	totalSum
	.bss
	.align	2
	.type	totalSum, %object
	.size	totalSum, 4
totalSum:
	.space	4
	.section	.rodata
	.align	2
.LC2:
	.ascii	"totalSum at the end: %d\012\000"
	.align	2
.LC0:
	.word	1
	.word	1000
	.align	2
.LC1:
	.word	1001
	.word	2000
	.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 = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L8+4
	sub	r3, fp, #64
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	ldr	r2, .L8+8
	sub	r3, fp, #56
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	sub	r3, fp, #64
	sub	r0, fp, #88
	ldr	r2, .L8+12
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-72]
	sub	r3, fp, #56
	sub	r0, fp, #84
	ldr	r2, .L8+12
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-68]
	mov	r3, #0
	str	r3, [fp, #-80]
	b	.L2
.L3:
	sub	r2, fp, #48
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #2
	add	r0, r2, r3
	sub	r3, fp, #64
	ldr	r2, .L8+12
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	str	r3, [fp, #-80]
.L2:
	ldr	r3, [fp, #-80]
	cmp	r3, #9
	ble	.L3
	ldr	r3, [fp, #-88]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r2, r0
	ldr	r3, .L8+16
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, .L8+16
	str	r3, [r2]
	ldr	r3, [fp, #-84]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r2, r0
	ldr	r3, .L8+16
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, .L8+16
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L4
.L5:
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-44]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L4:
	ldr	r3, [fp, #-76]
	cmp	r3, #9
	ble	.L5
	ldr	r1, .L8+16
	ldr	r0, .L8+20
	bl	printf
	mov	r3, #0
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	sumNumbers
	.word	totalSum
	.word	.LC2
	.size	main, .-main
	.section	.rodata
	.align	2
.LC4:
	.ascii	"totalsum: %ld\012\000"
	.align	2
.LC5:
	.ascii	"sum: %d\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sumNumbers
	.syntax unified
	.arm
	.fpu softvfp
	.type	sumNumbers, %function
sumNumbers:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L11
.L12:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L11:
	ldr	r3, [fp, #-16]
	cmp	r3, #1000
	ble	.L12
	ldr	r1, .L14+4
	ldr	r0, .L14+8
	bl	printf
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L14+12
	bl	printf
	ldr	r3, .L14+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, .L14+4
	str	r3, [r2]
	nop
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC6
	.word	totalSum
	.word	.LC4
	.word	.LC5
	.size	sumNumbers, .-sumNumbers
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
