	.file	"595692.c"
	.intel_syntax noprefix
	.text
	.globl	num_prints
	.data
	.align 4
	.type	num_prints, @object
	.size	num_prints, 4
num_prints:
	.long	10000
	.globl	mut
	.bss
	.align 32
	.type	mut, @object
	.size	mut, 40
mut:
	.zero	40
	.section	.rodata
.LC0:
	.string	"Starting thread %s\n"
	.text
	.globl	thrfunc
	.type	thrfunc, @function
thrfunc:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -12[rbp], 1
	jmp	.L2
.L3:
	lea	rdi, mut[rip]
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 2
	call	write@PLT
	mov	eax, DWORD PTR num_prints[rip]
	sub	eax, 1
	mov	DWORD PTR num_prints[rip], eax
	lea	rdi, mut[rip]
	call	pthread_mutex_unlock@PLT
	add	DWORD PTR -12[rbp], 1
.L2:
	mov	eax, DWORD PTR num_prints[rip]
	cmp	DWORD PTR -12[rbp], eax
	jle	.L3
	mov	edi, 4
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -12[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	thrfunc, .-thrfunc
	.section	.rodata
.LC1:
	.string	"1"
.LC2:
	.string	"2"
.LC3:
	.string	"\nThread 1: %d, Thread 2: %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
	sub	rsp, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -40[rbp]
	lea	rcx, .LC1[rip]
	lea	rdx, thrfunc[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -32[rbp]
	lea	rcx, .LC2[rip]
	lea	rdx, thrfunc[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC3[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
.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	"595692.c"
	.text
	.global	num_prints
	.data
	.align	2
	.type	num_prints, %object
	.size	num_prints, 4
num_prints:
	.word	10000
	.global	mut
	.bss
	.align	2
	.type	mut, %object
	.size	mut, 24
mut:
	.space	24
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Starting thread %s\012\000"
	.text
	.align	2
	.global	thrfunc
	.syntax unified
	.arm
	.fpu softvfp
	.type	thrfunc, %function
thrfunc:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, .L5
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L5+4
	mov	r0, r3
	bl	fprintf
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L2
.L3:
	ldr	r0, .L5+8
	bl	pthread_mutex_lock
	mov	r2, #1
	ldr	r1, [fp, #-16]
	mov	r0, #2
	bl	write
	ldr	r3, .L5+12
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L5+12
	str	r3, [r2]
	ldr	r0, .L5+8
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, .L5+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	ble	.L3
	mov	r0, #4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	stderr
	.word	.LC0
	.word	mut
	.word	num_prints
	.size	thrfunc, .-thrfunc
	.section	.rodata
	.align	2
.LC1:
	.ascii	"1\000"
	.align	2
.LC2:
	.ascii	"2\000"
	.align	2
.LC3:
	.ascii	"\012Thread 1: %d, Thread 2: %d\012\000"
	.align	2
.LC4:
	.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, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r0, fp, #24
	ldr	r3, .L10+4
	ldr	r2, .L10+8
	mov	r1, #0
	bl	pthread_create
	sub	r0, fp, #20
	ldr	r3, .L10+12
	ldr	r2, .L10+8
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-24]
	sub	r2, fp, #16
	mov	r1, r2
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-20]
	sub	r2, fp, #12
	mov	r1, r2
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r0, .L10+16
	bl	printf
	mov	r3, #0
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC4
	.word	.LC1
	.word	thrfunc
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
