	.file	"3263886.c"
	.intel_syntax noprefix
	.text
	.globl	g1
	.bss
	.align 4
	.type	g1, @object
	.size	g1, 4
g1:
	.zero	4
	.globl	g2
	.align 4
	.type	g2, @object
	.size	g2, 4
g2:
	.zero	4
	.globl	g3
	.align 4
	.type	g3, @object
	.size	g3, 4
g3:
	.zero	4
	.globl	mutex1
	.align 32
	.type	mutex1, @object
	.size	mutex1, 40
mutex1:
	.zero	40
	.globl	mutex2
	.align 32
	.type	mutex2, @object
	.size	mutex2, 40
mutex2:
	.zero	40
	.globl	mutex3
	.align 32
	.type	mutex3, @object
	.size	mutex3, 40
mutex3:
	.zero	40
	.text
	.globl	t1
	.type	t1, @function
t1:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	lea	rdi, mutex1[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, mutex2[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR g2[rip]
	add	eax, 1
	mov	DWORD PTR g1[rip], eax
	lea	rdi, mutex2[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, mutex1[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	t1, .-t1
	.globl	t2
	.type	t2, @function
t2:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	lea	rdi, mutex2[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, mutex3[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR g3[rip]
	sub	eax, 1
	mov	DWORD PTR g2[rip], eax
	lea	rdi, mutex3[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, mutex2[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	t2, .-t2
	.globl	t3
	.type	t3, @function
t3:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	lea	rdi, mutex1[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, mutex3[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR g1[rip]
	add	eax, 1
	mov	DWORD PTR g3[rip], eax
	lea	rdi, mutex3[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, mutex1[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	t3, .-t3
	.section	.rodata
	.align 8
.LC0:
	.string	"%d: g1 = %d, g2 = %d, g3 = %d.\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.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	DWORD PTR -36[rbp], 0
	jmp	.L8
.L9:
	lea	rax, -32[rbp]
	mov	ecx, 0
	lea	rdx, t1[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, t2[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -16[rbp]
	mov	ecx, 0
	lea	rdx, t3[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	esi, DWORD PTR g3[rip]
	mov	ecx, DWORD PTR g2[rip]
	mov	edx, DWORD PTR g1[rip]
	mov	eax, DWORD PTR -36[rbp]
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -36[rbp], 1
.L8:
	cmp	DWORD PTR -36[rbp], 999999
	jle	.L9
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	"3263886.c"
	.text
	.comm	g1,4,4
	.comm	g2,4,4
	.comm	g3,4,4
	.global	mutex1
	.bss
	.align	2
	.type	mutex1, %object
	.size	mutex1, 24
mutex1:
	.space	24
	.global	mutex2
	.align	2
	.type	mutex2, %object
	.size	mutex2, 24
mutex2:
	.space	24
	.global	mutex3
	.align	2
	.type	mutex3, %object
	.size	mutex3, 24
mutex3:
	.space	24
	.text
	.align	2
	.global	t1
	.syntax unified
	.arm
	.fpu softvfp
	.type	t1, %function
t1:
	@ 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	r0, .L3
	bl	pthread_mutex_lock
	ldr	r0, .L3+4
	bl	pthread_mutex_lock
	ldr	r3, .L3+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L3+12
	str	r3, [r2]
	ldr	r0, .L3+4
	bl	pthread_mutex_unlock
	ldr	r0, .L3
	bl	pthread_mutex_unlock
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	mutex1
	.word	mutex2
	.word	g2
	.word	g1
	.size	t1, .-t1
	.align	2
	.global	t2
	.syntax unified
	.arm
	.fpu softvfp
	.type	t2, %function
t2:
	@ 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	r0, .L7
	bl	pthread_mutex_lock
	ldr	r0, .L7+4
	bl	pthread_mutex_lock
	ldr	r3, .L7+8
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L7+12
	str	r3, [r2]
	ldr	r0, .L7+4
	bl	pthread_mutex_unlock
	ldr	r0, .L7
	bl	pthread_mutex_unlock
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	mutex2
	.word	mutex3
	.word	g3
	.word	g2
	.size	t2, .-t2
	.align	2
	.global	t3
	.syntax unified
	.arm
	.fpu softvfp
	.type	t3, %function
t3:
	@ 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	r0, .L11
	bl	pthread_mutex_lock
	ldr	r0, .L11+4
	bl	pthread_mutex_lock
	ldr	r3, .L11+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L11+12
	str	r3, [r2]
	ldr	r0, .L11+4
	bl	pthread_mutex_unlock
	ldr	r0, .L11
	bl	pthread_mutex_unlock
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	mutex1
	.word	mutex3
	.word	g1
	.word	g3
	.size	t3, .-t3
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d: g1 = %d, g2 = %d, g3 = %d.\012\000"
	.align	2
.LC1:
	.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, #32
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L14
.L15:
	sub	r0, fp, #24
	mov	r3, #0
	ldr	r2, .L18+4
	mov	r1, #0
	bl	pthread_create
	sub	r0, fp, #20
	mov	r3, #0
	ldr	r2, .L18+8
	mov	r1, #0
	bl	pthread_create
	sub	r0, fp, #16
	mov	r3, #0
	ldr	r2, .L18+12
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-24]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-20]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, .L18+16
	ldr	r2, [r3]
	ldr	r3, .L18+20
	ldr	r1, [r3]
	ldr	r3, .L18+24
	ldr	r3, [r3]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, [fp, #-12]
	ldr	r0, .L18+28
	bl	printf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L14:
	ldr	r3, [fp, #-12]
	ldr	r2, .L18+32
	cmp	r3, r2
	blt	.L15
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC1
	.word	t1
	.word	t2
	.word	t3
	.word	g1
	.word	g2
	.word	g3
	.word	.LC0
	.word	1000000
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
