	.file	"745014.c"
	.intel_syntax noprefix
	.text
	.globl	cv
	.bss
	.align 32
	.type	cv, @object
	.size	cv, 48
cv:
	.zero	48
	.globl	lock
	.align 32
	.type	lock, @object
	.size	lock, 40
lock:
	.zero	40
	.section	.rodata
	.align 8
.LC0:
	.string	"Locking and waiting. Type unlock to unlock me."
.LC1:
	.string	"I've been unlocked."
	.text
	.globl	thread
	.type	thread, @function
thread:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, lock[rip]
	call	pthread_mutex_lock@PLT
	lea	rsi, lock[rip]
	lea	rdi, cv[rip]
	call	pthread_cond_wait@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, lock[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	thread, .-thread
	.section	.rodata
	.align 8
.LC2:
	.string	"Type lock to run a thread that locks and waits."
	.align 8
.LC3:
	.string	"Type unlock to unlock the same thread."
.LC4:
	.string	"lock"
.LC5:
	.string	"unlock"
.LC6:
	.string	"%s"
	.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, 1056
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	jmp	.L4
.L6:
	lea	rax, -1040[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L5
	mov	edi, 8
	call	malloc@PLT
	mov	QWORD PTR -1048[rbp], rax
	mov	rax, QWORD PTR -1048[rbp]
	mov	ecx, 0
	lea	rdx, thread[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	jmp	.L4
.L5:
	lea	rax, -1040[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L4
	lea	rdi, cv[rip]
	call	pthread_cond_signal@PLT
.L4:
	mov	rax, QWORD PTR stdin[rip]
	lea	rdx, -1040[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	cmp	eax, -1
	jne	.L6
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	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	"745014.c"
	.text
	.comm	cv,48,8
	.comm	lock,24,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Locking and waiting. Type unlock to unlock me.\000"
	.align	2
.LC1:
	.ascii	"I've been unlocked.\000"
	.text
	.align	2
	.global	thread
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread, %function
thread:
	@ 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	puts
	ldr	r0, .L3+4
	bl	pthread_mutex_lock
	ldr	r1, .L3+4
	ldr	r0, .L3+8
	bl	pthread_cond_wait
	ldr	r0, .L3+12
	bl	puts
	ldr	r0, .L3+4
	bl	pthread_mutex_unlock
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.word	lock
	.word	cv
	.word	.LC1
	.size	thread, .-thread
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Type lock to run a thread that locks and waits.\000"
	.align	2
.LC3:
	.ascii	"Type unlock to unlock the same thread.\000"
	.align	2
.LC4:
	.ascii	"lock\000"
	.align	2
.LC5:
	.ascii	"unlock\000"
	.align	2
.LC6:
	.ascii	"%s\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1032
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1024
	sub	sp, sp, #8
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L11+4
	bl	puts
	ldr	r0, .L11+8
	bl	puts
	b	.L6
.L8:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L11+12
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L7
	mov	r0, #4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-1036]
	mov	r3, #0
	ldr	r2, .L11+16
	mov	r1, #0
	ldr	r0, [fp, #-1036]
	bl	pthread_create
	b	.L6
.L7:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L11+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L11+24
	bl	pthread_cond_signal
.L6:
	ldr	r3, .L11+28
	ldr	r0, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L11+32
	bl	__isoc99_fscanf
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	mov	r3, #0
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC7
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	thread
	.word	.LC5
	.word	cv
	.word	stdin
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
