	.file	"501103.c"
	.intel_syntax noprefix
	.text
	.globl	request_mutex
	.bss
	.align 32
	.type	request_mutex, @object
	.size	request_mutex, 40
request_mutex:
	.zero	40
	.globl	got_request
	.align 32
	.type	got_request, @object
	.size	got_request, 48
got_request:
	.zero	48
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	response_mutex
	.align 32
	.type	response_mutex, @object
	.size	response_mutex, 40
response_mutex:
	.zero	40
	.globl	got_response
	.align 32
	.type	got_response, @object
	.size	got_response, 48
got_response:
	.zero	48
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.section	.rodata
.LC0:
	.string	"d = %d\n"
	.text
	.globl	do_loop
	.type	do_loop, @function
do_loop:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L2
.L3:
	lea	rdi, request_mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	DWORD PTR f[rip], 1
	lea	rsi, request_mutex[rip]
	lea	rdi, got_request[rip]
	call	pthread_cond_wait@PLT
	mov	eax, DWORD PTR d[rip]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, request_mutex[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, response_mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR d[rip]
	add	eax, 10
	mov	DWORD PTR r[rip], eax
	lea	rdi, response_mutex[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, got_response[rip]
	call	pthread_cond_signal@PLT
.L2:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L3
	lea	rdi, request_mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE0:
	.size	do_loop, .-do_loop
	.section	.rodata
.LC1:
	.string	"timeout"
.LC2:
	.string	""
.LC3:
	.string	"timedwaid rc=%d %s\n"
	.text
	.globl	send_req
	.type	send_req, @function
send_req:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, request_mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR f[rip]
	test	eax, eax
	jne	.L5
	lea	rdi, request_mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, -1
	jmp	.L10
.L5:
	mov	eax, DWORD PTR -52[rbp]
	mov	DWORD PTR d[rip], eax
	lea	rdi, request_mutex[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, got_request[rip]
	call	pthread_cond_signal@PLT
	lea	rax, -32[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	clock_gettime@PLT
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 3
	mov	QWORD PTR -32[rbp], rax
	lea	rdi, response_mutex[rip]
	call	pthread_mutex_lock@PLT
	lea	rax, -32[rbp]
	mov	rdx, rax
	lea	rsi, response_mutex[rip]
	lea	rdi, got_response[rip]
	call	pthread_cond_timedwait@PLT
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR r[rip]
	mov	DWORD PTR -36[rbp], eax
	lea	rdi, response_mutex[rip]
	call	pthread_mutex_unlock@PLT
	cmp	DWORD PTR -40[rbp], 0
	je	.L7
	cmp	DWORD PTR -40[rbp], 110
	jne	.L8
	lea	rax, .LC1[rip]
	jmp	.L9
.L8:
	lea	rax, .LC2[rip]
.L9:
	mov	ecx, DWORD PTR -40[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L10
.L7:
	mov	eax, DWORD PTR -36[rbp]
.L10:
	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
.LFE1:
	.size	send_req, .-send_req
	.section	.rodata
.LC4:
	.string	"rc(%d) = %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 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	DWORD PTR -32[rbp], 0
	lea	rdx, -32[rbp]
	lea	rax, -16[rbp]
	mov	rcx, rdx
	lea	rdx, do_loop[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -24[rbp], eax
	mov	DWORD PTR -28[rbp], 0
	jmp	.L13
.L15:
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	send_req
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	jne	.L14
	mov	edi, 1
	mov	eax, 0
	call	usleep@PLT
.L14:
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -28[rbp], 1
.L13:
	cmp	DWORD PTR -28[rbp], 9
	jle	.L15
	mov	DWORD PTR -32[rbp], 1
	mov	edi, 14
	call	send_req
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"501103.c"
	.text
	.global	request_mutex
	.bss
	.align	2
	.type	request_mutex, %object
	.size	request_mutex, 24
request_mutex:
	.space	24
	.global	got_request
	.align	3
	.type	got_request, %object
	.size	got_request, 48
got_request:
	.space	48
	.comm	d,4,4
	.comm	f,4,4
	.global	response_mutex
	.align	2
	.type	response_mutex, %object
	.size	response_mutex, 24
response_mutex:
	.space	24
	.global	got_response
	.align	3
	.type	got_response, %object
	.size	got_response, 48
got_response:
	.space	48
	.comm	r,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"d = %d\012\000"
	.text
	.align	2
	.global	do_loop
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_loop, %function
do_loop:
	@ 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	.L2
.L3:
	ldr	r0, .L4
	bl	pthread_mutex_lock
	ldr	r3, .L4+4
	mov	r2, #1
	str	r2, [r3]
	ldr	r1, .L4
	ldr	r0, .L4+8
	bl	pthread_cond_wait
	ldr	r3, .L4+12
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L4+16
	bl	printf
	ldr	r0, .L4
	bl	pthread_mutex_unlock
	ldr	r0, .L4+20
	bl	pthread_mutex_lock
	ldr	r3, .L4+12
	ldr	r3, [r3]
	add	r3, r3, #10
	ldr	r2, .L4+24
	str	r3, [r2]
	ldr	r0, .L4+20
	bl	pthread_mutex_unlock
	ldr	r0, .L4+28
	bl	pthread_cond_signal
.L2:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L3
	ldr	r0, .L4
	bl	pthread_mutex_unlock
	mov	r0, #0
	bl	pthread_exit
.L5:
	.align	2
.L4:
	.word	request_mutex
	.word	f
	.word	got_request
	.word	d
	.word	.LC0
	.word	response_mutex
	.word	r
	.word	got_response
	.size	do_loop, .-do_loop
	.section	.rodata
	.align	2
.LC1:
	.ascii	"timeout\000"
	.align	2
.LC2:
	.ascii	"\000"
	.align	2
.LC3:
	.ascii	"timedwaid rc=%d %s\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	send_req
	.syntax unified
	.arm
	.fpu softvfp
	.type	send_req, %function
send_req:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L14+4
	bl	pthread_mutex_lock
	ldr	r3, .L14+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L7
	ldr	r0, .L14+4
	bl	pthread_mutex_unlock
	mvn	r3, #0
	b	.L12
.L7:
	ldr	r2, .L14+12
	ldr	r3, [fp, #-32]
	str	r3, [r2]
	ldr	r0, .L14+4
	bl	pthread_mutex_unlock
	ldr	r0, .L14+16
	bl	pthread_cond_signal
	sub	r3, fp, #16
	mov	r1, r3
	mov	r0, #0
	bl	clock_gettime
	ldr	r3, [fp, #-16]
	add	r3, r3, #3
	str	r3, [fp, #-16]
	ldr	r0, .L14+20
	bl	pthread_mutex_lock
	sub	r3, fp, #16
	mov	r2, r3
	ldr	r1, .L14+20
	ldr	r0, .L14+24
	bl	pthread_cond_timedwait
	str	r0, [fp, #-24]
	ldr	r3, .L14+28
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r0, .L14+20
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L9
	ldr	r3, [fp, #-24]
	cmp	r3, #110
	bne	.L10
	ldr	r3, .L14+32
	b	.L11
.L10:
	ldr	r3, .L14+36
.L11:
	mov	r2, r3
	ldr	r1, [fp, #-24]
	ldr	r0, .L14+40
	bl	printf
	mvn	r3, #0
	b	.L12
.L9:
	ldr	r3, [fp, #-20]
.L12:
	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	.LC4
	.word	request_mutex
	.word	f
	.word	d
	.word	got_request
	.word	response_mutex
	.word	got_response
	.word	r
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	send_req, .-send_req
	.section	.rodata
	.align	2
.LC5:
	.ascii	"rc(%d) = %d\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-24]
	sub	r3, fp, #24
	sub	r0, fp, #28
	ldr	r2, .L22+4
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L17
.L19:
	ldr	r0, [fp, #-20]
	bl	send_req
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L18
	mov	r0, #1
	bl	usleep
.L18:
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-20]
	ldr	r0, .L22+8
	bl	printf
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L17:
	ldr	r3, [fp, #-20]
	cmp	r3, #9
	ble	.L19
	mov	r3, #1
	str	r3, [fp, #-24]
	mov	r0, #14
	bl	send_req
	ldr	r3, [fp, #-28]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, #0
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC6
	.word	do_loop
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
