	.file	"256015.c"
	.intel_syntax noprefix
	.text
	.globl	MTX
	.bss
	.align 32
	.type	MTX, @object
	.size	MTX, 40
MTX:
	.zero	40
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 48
c:
	.zero	48
	.globl	ping
	.data
	.align 4
	.type	ping, @object
	.size	ping, 4
ping:
	.long	1
	.globl	count
	.bss
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.globl	arg
	.align 4
	.type	arg, @object
	.size	arg, 4
arg:
	.zero	4
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L2
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	atoi@PLT
	mov	DWORD PTR arg[rip], eax
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L3
	mov	eax, -1
	jmp	.L4
.L3:
	lea	rax, -32[rbp]
	lea	rcx, c[rip]
	lea	rdx, pingPong[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -32[rbp]
	add	rax, 8
	lea	rcx, c[rip]
	lea	rdx, pingPong[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	eax, 0
.L4:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC0:
	.string	"Ping"
.LC1:
	.string	"\tPong"
	.text
	.globl	pingPong
	.type	pingPong, @function
pingPong:
.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	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L7
.L10:
	lea	rdi, MTX[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR ping[rip]
	cmp	eax, 1
	jne	.L8
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	DWORD PTR ping[rip], 0
	jmp	.L9
.L8:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	DWORD PTR ping[rip], 1
.L9:
	mov	eax, DWORD PTR count[rip]
	add	eax, 1
	mov	DWORD PTR count[rip], eax
	lea	rdi, c[rip]
	call	pthread_cond_signal@PLT
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, MTX[rip]
	mov	rdi, rax
	call	pthread_cond_wait@PLT
	lea	rdi, MTX[rip]
	call	pthread_mutex_unlock@PLT
.L7:
	mov	edx, DWORD PTR count[rip]
	mov	eax, DWORD PTR arg[rip]
	cmp	edx, eax
	jl	.L10
	lea	rdi, c[rip]
	call	pthread_cond_signal@PLT
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE1:
	.size	pingPong, .-pingPong
	.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	"256015.c"
	.text
	.global	MTX
	.bss
	.align	2
	.type	MTX, %object
	.size	MTX, 24
MTX:
	.space	24
	.global	c
	.align	3
	.type	c, %object
	.size	c, 48
c:
	.space	48
	.global	ping
	.data
	.align	2
	.type	ping, %object
	.size	ping, 4
ping:
	.word	1
	.global	count
	.bss
	.align	2
	.type	count, %object
	.size	count, 4
count:
	.space	4
	.comm	arg,4,4
	.section	.rodata
	.align	2
.LC0:
	.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
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L6+4
	str	r3, [r2]
	b	.L3
.L2:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L3
	mvn	r3, #0
	b	.L4
.L3:
	sub	r0, fp, #16
	ldr	r3, .L6+8
	ldr	r2, .L6+12
	mov	r1, #0
	bl	pthread_create
	sub	r3, fp, #16
	add	r0, r3, #4
	ldr	r3, .L6+8
	ldr	r2, .L6+12
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-12]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, #0
.L4:
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	arg
	.word	c
	.word	pingPong
	.size	main, .-main
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Ping\000"
	.align	2
.LC2:
	.ascii	"\011Pong\000"
	.text
	.align	2
	.global	pingPong
	.syntax unified
	.arm
	.fpu softvfp
	.type	pingPong, %function
pingPong:
	@ 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, [fp, #-16]
	str	r3, [fp, #-8]
	b	.L9
.L12:
	ldr	r0, .L13
	bl	pthread_mutex_lock
	ldr	r3, .L13+4
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L10
	ldr	r0, .L13+8
	bl	puts
	ldr	r3, .L13+4
	mov	r2, #0
	str	r2, [r3]
	b	.L11
.L10:
	ldr	r0, .L13+12
	bl	puts
	ldr	r3, .L13+4
	mov	r2, #1
	str	r2, [r3]
.L11:
	ldr	r3, .L13+16
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L13+16
	str	r3, [r2]
	ldr	r0, .L13+20
	bl	pthread_cond_signal
	ldr	r1, .L13
	ldr	r0, [fp, #-8]
	bl	pthread_cond_wait
	ldr	r0, .L13
	bl	pthread_mutex_unlock
.L9:
	ldr	r3, .L13+16
	ldr	r2, [r3]
	ldr	r3, .L13+24
	ldr	r3, [r3]
	cmp	r2, r3
	blt	.L12
	ldr	r0, .L13+20
	bl	pthread_cond_signal
	mov	r0, #0
	bl	pthread_exit
.L14:
	.align	2
.L13:
	.word	MTX
	.word	ping
	.word	.LC1
	.word	.LC2
	.word	count
	.word	c
	.word	arg
	.size	pingPong, .-pingPong
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
