	.file	"745290.c"
	.intel_syntax noprefix
	.text
	.globl	microseconds
	.data
	.align 4
	.type	microseconds, @object
	.size	microseconds, 4
microseconds:
	.long	100
	.globl	input_info
	.bss
	.align 32
	.type	input_info, @object
	.size	input_info, 112
input_info:
	.zero	112
	.globl	output_info
	.align 32
	.type	output_info, @object
	.size	output_info, 112
output_info:
	.zero	112
	.globl	cal_input_info
	.align 32
	.type	cal_input_info, @object
	.size	cal_input_info, 112
cal_input_info:
	.zero	112
	.globl	cal_output_info
	.align 32
	.type	cal_output_info, @object
	.size	cal_output_info, 112
cal_output_info:
	.zero	112
	.globl	read_buffer_a
	.align 32
	.type	read_buffer_a, @object
	.size	read_buffer_a, 40
read_buffer_a:
	.zero	40
	.globl	read_buffer_b
	.align 32
	.type	read_buffer_b, @object
	.size	read_buffer_b, 40
read_buffer_b:
	.zero	40
	.globl	write_buffer_a
	.align 32
	.type	write_buffer_a, @object
	.size	write_buffer_a, 40
write_buffer_a:
	.zero	40
	.globl	write_buffer_b
	.align 32
	.type	write_buffer_b, @object
	.size	write_buffer_b, 40
write_buffer_b:
	.zero	40
	.text
	.globl	init_resources
	.type	init_resources, @function
init_resources:
.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, 240
	mov	DWORD PTR -228[rbp], edi
	mov	QWORD PTR -168[rbp], rsi
	mov	QWORD PTR -160[rbp], rdx
	mov	QWORD PTR -152[rbp], rcx
	mov	QWORD PTR -144[rbp], r8
	mov	QWORD PTR -136[rbp], r9
	test	al, al
	je	.L2
	movaps	XMMWORD PTR -128[rbp], xmm0
	movaps	XMMWORD PTR -112[rbp], xmm1
	movaps	XMMWORD PTR -96[rbp], xmm2
	movaps	XMMWORD PTR -80[rbp], xmm3
	movaps	XMMWORD PTR -64[rbp], xmm4
	movaps	XMMWORD PTR -48[rbp], xmm5
	movaps	XMMWORD PTR -32[rbp], xmm6
	movaps	XMMWORD PTR -16[rbp], xmm7
.L2:
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -184[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -208[rbp], 8
	mov	DWORD PTR -204[rbp], 48
	lea	rax, 16[rbp]
	mov	QWORD PTR -200[rbp], rax
	lea	rax, -176[rbp]
	mov	QWORD PTR -192[rbp], rax
	mov	QWORD PTR -216[rbp], 0
	mov	DWORD PTR -220[rbp], 0
	jmp	.L3
.L6:
	mov	eax, DWORD PTR -208[rbp]
	cmp	eax, 47
	ja	.L4
	mov	rax, QWORD PTR -192[rbp]
	mov	edx, DWORD PTR -208[rbp]
	mov	edx, edx
	add	rax, rdx
	mov	edx, DWORD PTR -208[rbp]
	add	edx, 8
	mov	DWORD PTR -208[rbp], edx
	jmp	.L5
.L4:
	mov	rax, QWORD PTR -200[rbp]
	lea	rdx, 8[rax]
	mov	QWORD PTR -200[rbp], rdx
.L5:
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -216[rbp], rax
	mov	rax, QWORD PTR -216[rbp]
	add	rax, 8
	mov	esi, 0
	mov	rdi, rax
	call	pthread_mutex_init@PLT
	mov	rax, QWORD PTR -216[rbp]
	add	rax, 48
	mov	esi, 0
	mov	rdi, rax
	call	pthread_cond_init@PLT
	add	DWORD PTR -220[rbp], 1
.L3:
	mov	eax, DWORD PTR -220[rbp]
	cmp	eax, DWORD PTR -228[rbp]
	jl	.L6
	nop
	mov	rax, QWORD PTR -184[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	init_resources, .-init_resources
	.globl	free_resources
	.type	free_resources, @function
free_resources:
.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, 240
	mov	DWORD PTR -228[rbp], edi
	mov	QWORD PTR -168[rbp], rsi
	mov	QWORD PTR -160[rbp], rdx
	mov	QWORD PTR -152[rbp], rcx
	mov	QWORD PTR -144[rbp], r8
	mov	QWORD PTR -136[rbp], r9
	test	al, al
	je	.L9
	movaps	XMMWORD PTR -128[rbp], xmm0
	movaps	XMMWORD PTR -112[rbp], xmm1
	movaps	XMMWORD PTR -96[rbp], xmm2
	movaps	XMMWORD PTR -80[rbp], xmm3
	movaps	XMMWORD PTR -64[rbp], xmm4
	movaps	XMMWORD PTR -48[rbp], xmm5
	movaps	XMMWORD PTR -32[rbp], xmm6
	movaps	XMMWORD PTR -16[rbp], xmm7
.L9:
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -184[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -208[rbp], 8
	mov	DWORD PTR -204[rbp], 48
	lea	rax, 16[rbp]
	mov	QWORD PTR -200[rbp], rax
	lea	rax, -176[rbp]
	mov	QWORD PTR -192[rbp], rax
	mov	QWORD PTR -216[rbp], 0
	mov	DWORD PTR -220[rbp], 0
	jmp	.L10
.L13:
	mov	eax, DWORD PTR -208[rbp]
	cmp	eax, 47
	ja	.L11
	mov	rax, QWORD PTR -192[rbp]
	mov	edx, DWORD PTR -208[rbp]
	mov	edx, edx
	add	rax, rdx
	mov	edx, DWORD PTR -208[rbp]
	add	edx, 8
	mov	DWORD PTR -208[rbp], edx
	jmp	.L12
.L11:
	mov	rax, QWORD PTR -200[rbp]
	lea	rdx, 8[rax]
	mov	QWORD PTR -200[rbp], rdx
.L12:
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -216[rbp], rax
	mov	rax, QWORD PTR -216[rbp]
	add	rax, 8
	mov	rdi, rax
	call	pthread_mutex_destroy@PLT
	mov	rax, QWORD PTR -216[rbp]
	add	rax, 48
	mov	rdi, rax
	call	pthread_cond_destroy@PLT
	add	DWORD PTR -220[rbp], 1
.L10:
	mov	eax, DWORD PTR -220[rbp]
	cmp	eax, DWORD PTR -228[rbp]
	jl	.L13
	nop
	mov	rax, QWORD PTR -184[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	free_resources, .-free_resources
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	input_task
	.type	input_task, @function
input_task:
.LFB8:
	.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
.L27:
	lea	rdi, input_info[rip+8]
	call	pthread_mutex_lock@PLT
	jmp	.L16
.L18:
	lea	rsi, input_info[rip+8]
	lea	rdi, input_info[rip+48]
	call	pthread_cond_wait@PLT
.L16:
	mov	eax, DWORD PTR input_info[rip+96]
	test	eax, eax
	jne	.L17
	mov	eax, DWORD PTR input_info[rip+104]
	test	eax, eax
	je	.L18
.L17:
	mov	eax, DWORD PTR input_info[rip+104]
	test	eax, eax
	jne	.L30
	mov	DWORD PTR input_info[rip+96], 0
	mov	edx, DWORD PTR input_info[rip+100]
	mov	eax, 1
	sub	eax, edx
	mov	DWORD PTR input_info[rip+100], eax
	lea	rdi, input_info[rip+8]
	call	pthread_mutex_unlock@PLT
	mov	eax, DWORD PTR input_info[rip+100]
	test	eax, eax
	je	.L21
	mov	DWORD PTR -12[rbp], 0
	jmp	.L22
.L23:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, read_buffer_a[rip]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	add	DWORD PTR -12[rbp], 1
.L22:
	cmp	DWORD PTR -12[rbp], 9
	jle	.L23
	jmp	.L24
.L21:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L25
.L26:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, read_buffer_b[rip]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	add	DWORD PTR -12[rbp], 1
.L25:
	cmp	DWORD PTR -12[rbp], 9
	jle	.L26
.L24:
	lea	rdi, cal_input_info[rip+8]
	call	pthread_mutex_lock@PLT
	mov	DWORD PTR cal_input_info[rip+96], 1
	lea	rdi, cal_input_info[rip+48]
	call	pthread_cond_signal@PLT
	lea	rdi, cal_input_info[rip+8]
	call	pthread_mutex_unlock@PLT
	jmp	.L27
.L30:
	nop
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	input_task, .-input_task
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	output_task
	.type	output_task, @function
output_task:
.LFB9:
	.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
.L43:
	lea	rdi, output_info[rip+8]
	call	pthread_mutex_lock@PLT
	jmp	.L32
.L34:
	lea	rsi, output_info[rip+8]
	lea	rdi, output_info[rip+48]
	call	pthread_cond_wait@PLT
.L32:
	mov	eax, DWORD PTR output_info[rip+96]
	test	eax, eax
	jne	.L33
	mov	eax, DWORD PTR output_info[rip+104]
	test	eax, eax
	je	.L34
.L33:
	mov	eax, DWORD PTR output_info[rip+104]
	test	eax, eax
	jne	.L46
	mov	DWORD PTR output_info[rip+96], 0
	mov	edx, DWORD PTR output_info[rip+100]
	mov	eax, 1
	sub	eax, edx
	mov	DWORD PTR output_info[rip+100], eax
	lea	rdi, output_info[rip+8]
	call	pthread_mutex_unlock@PLT
	mov	eax, DWORD PTR output_info[rip+100]
	test	eax, eax
	je	.L37
	mov	DWORD PTR -12[rbp], 0
	jmp	.L38
.L39:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, write_buffer_a[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR microseconds[rip]
	mov	edi, eax
	call	usleep@PLT
	add	DWORD PTR -12[rbp], 1
.L38:
	cmp	DWORD PTR -12[rbp], 9
	jle	.L39
	jmp	.L40
.L37:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L41
.L42:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, write_buffer_b[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR microseconds[rip]
	mov	edi, eax
	call	usleep@PLT
	add	DWORD PTR -12[rbp], 1
.L41:
	cmp	DWORD PTR -12[rbp], 9
	jle	.L42
.L40:
	lea	rdi, cal_output_info[rip+8]
	call	pthread_mutex_lock@PLT
	mov	DWORD PTR cal_output_info[rip+96], 1
	lea	rdi, cal_output_info[rip+48]
	call	pthread_cond_signal@PLT
	lea	rdi, cal_output_info[rip+8]
	call	pthread_mutex_unlock@PLT
	jmp	.L43
.L46:
	nop
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	output_task, .-output_task
	.section	.rodata
.LC2:
	.string	"input.txt"
.LC3:
	.string	"output.txt"
.LC4:
	.string	"r"
.LC5:
	.string	"can't load input file"
.LC6:
	.string	"w+"
.LC7:
	.string	"can't load output file"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC2[rip]
	mov	QWORD PTR -40[rbp], rax
	lea	rax, .LC3[rip]
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -64[rbp], 100
	mov	eax, DWORD PTR -64[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx, 2
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -60[rbp], eax
	mov	DWORD PTR -72[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L48
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L48:
	mov	rax, QWORD PTR -32[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L49
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L49:
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -48[rbp], rax
	lea	r8, cal_output_info[rip]
	lea	rcx, cal_input_info[rip]
	lea	rdx, output_info[rip]
	lea	rsi, input_info[rip]
	mov	edi, 4
	mov	eax, 0
	call	init_resources
	mov	DWORD PTR cal_input_info[rip+100], 0
	mov	eax, DWORD PTR cal_input_info[rip+100]
	mov	DWORD PTR output_info[rip+100], eax
	mov	eax, DWORD PTR output_info[rip+100]
	mov	DWORD PTR input_info[rip+100], eax
	mov	DWORD PTR cal_output_info[rip+96], 1
	mov	eax, DWORD PTR cal_output_info[rip+96]
	mov	DWORD PTR input_info[rip+96], eax
	mov	DWORD PTR cal_input_info[rip+96], 0
	mov	eax, DWORD PTR cal_input_info[rip+96]
	mov	DWORD PTR output_info[rip+96], eax
	mov	DWORD PTR output_info[rip+104], 0
	mov	eax, DWORD PTR output_info[rip+104]
	mov	DWORD PTR input_info[rip+104], eax
	lea	rax, -56[rbp]
	mov	rcx, rax
	lea	rdx, input_task[rip]
	mov	esi, 0
	lea	rdi, input_info[rip]
	call	pthread_create@PLT
	lea	rax, -48[rbp]
	mov	rcx, rax
	lea	rdx, output_task[rip]
	mov	esi, 0
	lea	rdi, output_info[rip]
	call	pthread_create@PLT
.L63:
	lea	rdi, cal_input_info[rip+8]
	call	pthread_mutex_lock@PLT
	jmp	.L50
.L51:
	lea	rsi, cal_input_info[rip+8]
	lea	rdi, cal_input_info[rip+48]
	call	pthread_cond_wait@PLT
.L50:
	mov	eax, DWORD PTR cal_input_info[rip+96]
	test	eax, eax
	je	.L51
	mov	edx, DWORD PTR cal_input_info[rip+100]
	mov	eax, 1
	sub	eax, edx
	mov	DWORD PTR cal_input_info[rip+100], eax
	mov	DWORD PTR cal_input_info[rip+96], 0
	lea	rdi, cal_input_info[rip+8]
	call	pthread_mutex_unlock@PLT
	lea	rdi, input_info[rip+8]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR -60[rbp]
	sub	eax, 1
	cmp	DWORD PTR -72[rbp], eax
	jne	.L52
	mov	DWORD PTR input_info[rip+104], 1
.L52:
	mov	DWORD PTR input_info[rip+96], 1
	lea	rdi, input_info[rip+48]
	call	pthread_cond_signal@PLT
	lea	rdi, input_info[rip+8]
	call	pthread_mutex_unlock@PLT
	mov	eax, DWORD PTR cal_input_info[rip+100]
	test	eax, eax
	je	.L53
	mov	DWORD PTR -68[rbp], 0
	jmp	.L54
.L55:
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, read_buffer_a[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, write_buffer_a[rip]
	mov	DWORD PTR [rdx+rax], ecx
	add	DWORD PTR -68[rbp], 1
.L54:
	cmp	DWORD PTR -68[rbp], 9
	jle	.L55
	jmp	.L56
.L53:
	mov	DWORD PTR -68[rbp], 0
	jmp	.L57
.L58:
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, read_buffer_b[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, write_buffer_b[rip]
	mov	DWORD PTR [rdx+rax], ecx
	add	DWORD PTR -68[rbp], 1
.L57:
	cmp	DWORD PTR -68[rbp], 9
	jle	.L58
.L56:
	lea	rdi, cal_output_info[rip+8]
	call	pthread_mutex_lock@PLT
	jmp	.L59
.L60:
	lea	rsi, cal_output_info[rip+8]
	lea	rdi, cal_output_info[rip+48]
	call	pthread_cond_wait@PLT
.L59:
	mov	eax, DWORD PTR cal_output_info[rip+96]
	test	eax, eax
	je	.L60
	mov	DWORD PTR cal_output_info[rip+96], 0
	lea	rdi, cal_output_info[rip+8]
	call	pthread_mutex_unlock@PLT
	lea	rdi, output_info[rip+8]
	call	pthread_mutex_lock@PLT
	mov	DWORD PTR output_info[rip+96], 1
	lea	rdi, output_info[rip+48]
	call	pthread_cond_signal@PLT
	lea	rdi, output_info[rip+8]
	call	pthread_mutex_unlock@PLT
	mov	eax, DWORD PTR -60[rbp]
	sub	eax, 1
	cmp	DWORD PTR -72[rbp], eax
	je	.L69
	add	DWORD PTR -72[rbp], 1
	jmp	.L63
.L69:
	nop
	lea	rdi, cal_output_info[rip+8]
	call	pthread_mutex_lock@PLT
	jmp	.L64
.L65:
	lea	rsi, cal_output_info[rip+8]
	lea	rdi, cal_output_info[rip+48]
	call	pthread_cond_wait@PLT
.L64:
	mov	eax, DWORD PTR cal_output_info[rip+96]
	test	eax, eax
	je	.L65
	mov	DWORD PTR cal_output_info[rip+96], 0
	lea	rdi, cal_output_info[rip+8]
	call	pthread_mutex_unlock@PLT
	lea	rdi, output_info[rip+8]
	call	pthread_mutex_lock@PLT
	mov	DWORD PTR output_info[rip+96], 1
	mov	DWORD PTR output_info[rip+104], 1
	lea	rdi, output_info[rip+48]
	call	pthread_cond_signal@PLT
	lea	rdi, output_info[rip+8]
	call	pthread_mutex_unlock@PLT
	mov	rax, QWORD PTR input_info[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR output_info[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	lea	r8, cal_output_info[rip]
	lea	rcx, cal_input_info[rip]
	lea	rdx, output_info[rip]
	lea	rsi, input_info[rip]
	mov	edi, 4
	mov	eax, 0
	call	free_resources
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L67
	call	__stack_chk_fail@PLT
.L67:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"745290.c"
	.text
	.global	microseconds
	.data
	.align	2
	.type	microseconds, %object
	.size	microseconds, 4
microseconds:
	.word	100
	.comm	input_info,96,8
	.comm	output_info,96,8
	.comm	cal_input_info,96,8
	.comm	cal_output_info,96,8
	.comm	read_buffer_a,40,4
	.comm	read_buffer_b,40,4
	.comm	write_buffer_a,40,4
	.comm	write_buffer_b,40,4
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	init_resources
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_resources, %function
init_resources:
	@ args = 4, pretend = 16, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 1
	push	{r0, r1, r2, r3}
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	add	r3, fp, #8
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L2
.L3:
	ldr	r3, [fp, #-20]
	add	r2, r3, #4
	str	r2, [fp, #-20]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	mov	r1, #0
	mov	r0, r3
	bl	pthread_mutex_init
	ldr	r3, [fp, #-12]
	add	r3, r3, #32
	mov	r1, #0
	mov	r0, r3
	bl	pthread_cond_init
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L2:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #4]
	cmp	r2, r3
	blt	.L3
	nop
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #16
	bx	lr
.L6:
	.align	2
.L5:
	.word	.LC0
	.size	init_resources, .-init_resources
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	free_resources
	.syntax unified
	.arm
	.fpu softvfp
	.type	free_resources, %function
free_resources:
	@ args = 4, pretend = 16, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 1
	push	{r0, r1, r2, r3}
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	add	r3, fp, #8
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L8
.L9:
	ldr	r3, [fp, #-20]
	add	r2, r3, #4
	str	r2, [fp, #-20]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	mov	r0, r3
	bl	pthread_mutex_destroy
	ldr	r3, [fp, #-12]
	add	r3, r3, #32
	mov	r0, r3
	bl	pthread_cond_destroy
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L8:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #4]
	cmp	r2, r3
	blt	.L9
	nop
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #16
	bx	lr
.L12:
	.align	2
.L11:
	.word	.LC1
	.size	free_resources, .-free_resources
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%d\000"
	.text
	.align	2
	.global	input_task
	.syntax unified
	.arm
	.fpu softvfp
	.type	input_task, %function
input_task:
	@ 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]
.L25:
	ldr	r0, .L29
	bl	pthread_mutex_lock
	b	.L14
.L16:
	ldr	r1, .L29
	ldr	r0, .L29+4
	bl	pthread_cond_wait
.L14:
	ldr	r3, .L29+8
	ldr	r3, [r3, #80]
	cmp	r3, #0
	bne	.L15
	ldr	r3, .L29+8
	ldr	r3, [r3, #88]
	cmp	r3, #0
	beq	.L16
.L15:
	ldr	r3, .L29+8
	ldr	r3, [r3, #88]
	cmp	r3, #0
	bne	.L28
	ldr	r3, .L29+8
	mov	r2, #0
	str	r2, [r3, #80]
	ldr	r3, .L29+8
	ldr	r3, [r3, #84]
	rsb	r3, r3, #1
	ldr	r2, .L29+8
	str	r3, [r2, #84]
	ldr	r0, .L29
	bl	pthread_mutex_unlock
	ldr	r3, .L29+8
	ldr	r3, [r3, #84]
	cmp	r3, #0
	beq	.L19
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L20
.L21:
	ldr	r3, [fp, #-8]
	ldr	r0, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, .L29+12
	add	r3, r3, r2
	mov	r2, r3
	ldr	r1, .L29+16
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L20:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	ble	.L21
	b	.L22
.L19:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L23
.L24:
	ldr	r3, [fp, #-8]
	ldr	r0, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, .L29+20
	add	r3, r3, r2
	mov	r2, r3
	ldr	r1, .L29+16
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L23:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	ble	.L24
.L22:
	ldr	r0, .L29+24
	bl	pthread_mutex_lock
	ldr	r3, .L29+28
	mov	r2, #1
	str	r2, [r3, #80]
	ldr	r0, .L29+32
	bl	pthread_cond_signal
	ldr	r0, .L29+24
	bl	pthread_mutex_unlock
	b	.L25
.L28:
	nop
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	input_info+4
	.word	input_info+32
	.word	input_info
	.word	read_buffer_a
	.word	.LC2
	.word	read_buffer_b
	.word	cal_input_info+4
	.word	cal_input_info
	.word	cal_input_info+32
	.size	input_task, .-input_task
	.section	.rodata
	.align	2
.LC3:
	.ascii	"%d\012\000"
	.text
	.align	2
	.global	output_task
	.syntax unified
	.arm
	.fpu softvfp
	.type	output_task, %function
output_task:
	@ 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]
.L43:
	ldr	r0, .L47
	bl	pthread_mutex_lock
	b	.L32
.L34:
	ldr	r1, .L47
	ldr	r0, .L47+4
	bl	pthread_cond_wait
.L32:
	ldr	r3, .L47+8
	ldr	r3, [r3, #80]
	cmp	r3, #0
	bne	.L33
	ldr	r3, .L47+8
	ldr	r3, [r3, #88]
	cmp	r3, #0
	beq	.L34
.L33:
	ldr	r3, .L47+8
	ldr	r3, [r3, #88]
	cmp	r3, #0
	bne	.L46
	ldr	r3, .L47+8
	mov	r2, #0
	str	r2, [r3, #80]
	ldr	r3, .L47+8
	ldr	r3, [r3, #84]
	rsb	r3, r3, #1
	ldr	r2, .L47+8
	str	r3, [r2, #84]
	ldr	r0, .L47
	bl	pthread_mutex_unlock
	ldr	r3, .L47+8
	ldr	r3, [r3, #84]
	cmp	r3, #0
	beq	.L37
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L38
.L39:
	ldr	r3, [fp, #-8]
	ldr	r0, [r3]
	ldr	r2, .L47+12
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, r3
	ldr	r1, .L47+16
	bl	fprintf
	ldr	r3, .L47+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	usleep
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L38:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	ble	.L39
	b	.L40
.L37:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L41
.L42:
	ldr	r3, [fp, #-8]
	ldr	r0, [r3]
	ldr	r2, .L47+24
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, r3
	ldr	r1, .L47+16
	bl	fprintf
	ldr	r3, .L47+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	usleep
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L41:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	ble	.L42
.L40:
	ldr	r0, .L47+28
	bl	pthread_mutex_lock
	ldr	r3, .L47+32
	mov	r2, #1
	str	r2, [r3, #80]
	ldr	r0, .L47+36
	bl	pthread_cond_signal
	ldr	r0, .L47+28
	bl	pthread_mutex_unlock
	b	.L43
.L46:
	nop
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L48:
	.align	2
.L47:
	.word	output_info+4
	.word	output_info+32
	.word	output_info
	.word	write_buffer_a
	.word	.LC3
	.word	microseconds
	.word	write_buffer_b
	.word	cal_output_info+4
	.word	cal_output_info
	.word	cal_output_info+32
	.size	output_task, .-output_task
	.section	.rodata
	.align	2
.LC4:
	.ascii	"input.txt\000"
	.align	2
.LC5:
	.ascii	"output.txt\000"
	.align	2
.LC6:
	.ascii	"r\000"
	.align	2
.LC7:
	.ascii	"can't load input file\000"
	.align	2
.LC8:
	.ascii	"w+\000"
	.align	2
.LC9:
	.ascii	"can't load output file\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	ldr	r3, .L72
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L72+4
	str	r3, [fp, #-32]
	ldr	r3, .L72+8
	str	r3, [fp, #-28]
	mov	r3, #100
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	ldr	r2, .L72+12
	smull	r1, r2, r3, r2
	asr	r2, r2, #2
	asr	r3, r3, #31
	sub	r3, r2, r3
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-40]
	ldr	r1, .L72+16
	ldr	r0, [fp, #-32]
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L50
	ldr	r0, .L72+20
	bl	puts
	mov	r0, #1
	bl	exit
.L50:
	ldr	r1, .L72+24
	ldr	r0, [fp, #-28]
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L51
	ldr	r0, .L72+28
	bl	puts
	mov	r0, #1
	bl	exit
.L51:
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-44]
	ldr	r3, .L72+32
	str	r3, [sp]
	ldr	r3, .L72+36
	ldr	r2, .L72+40
	ldr	r1, .L72+44
	mov	r0, #4
	bl	init_resources
	ldr	r3, .L72+36
	mov	r2, #0
	str	r2, [r3, #84]
	ldr	r3, .L72+36
	ldr	r3, [r3, #84]
	ldr	r2, .L72+40
	str	r3, [r2, #84]
	ldr	r3, .L72+40
	ldr	r3, [r3, #84]
	ldr	r2, .L72+44
	str	r3, [r2, #84]
	ldr	r3, .L72+32
	mov	r2, #1
	str	r2, [r3, #80]
	ldr	r3, .L72+32
	ldr	r3, [r3, #80]
	ldr	r2, .L72+44
	str	r3, [r2, #80]
	ldr	r3, .L72+36
	mov	r2, #0
	str	r2, [r3, #80]
	ldr	r3, .L72+36
	ldr	r3, [r3, #80]
	ldr	r2, .L72+40
	str	r3, [r2, #80]
	ldr	r3, .L72+40
	mov	r2, #0
	str	r2, [r3, #88]
	ldr	r3, .L72+40
	ldr	r3, [r3, #88]
	ldr	r2, .L72+44
	str	r3, [r2, #88]
	sub	r3, fp, #48
	ldr	r2, .L72+48
	mov	r1, #0
	ldr	r0, .L72+44
	bl	pthread_create
	sub	r3, fp, #44
	ldr	r2, .L72+52
	mov	r1, #0
	ldr	r0, .L72+40
	bl	pthread_create
.L65:
	ldr	r0, .L72+56
	bl	pthread_mutex_lock
	b	.L52
.L53:
	ldr	r1, .L72+56
	ldr	r0, .L72+60
	bl	pthread_cond_wait
.L52:
	ldr	r3, .L72+36
	ldr	r3, [r3, #80]
	cmp	r3, #0
	beq	.L53
	ldr	r3, .L72+36
	ldr	r3, [r3, #84]
	rsb	r3, r3, #1
	ldr	r2, .L72+36
	str	r3, [r2, #84]
	ldr	r3, .L72+36
	mov	r2, #0
	str	r2, [r3, #80]
	ldr	r0, .L72+56
	bl	pthread_mutex_unlock
	ldr	r0, .L72+64
	bl	pthread_mutex_lock
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	bne	.L54
	ldr	r3, .L72+44
	mov	r2, #1
	str	r2, [r3, #88]
.L54:
	ldr	r3, .L72+44
	mov	r2, #1
	str	r2, [r3, #80]
	ldr	r0, .L72+68
	bl	pthread_cond_signal
	ldr	r0, .L72+64
	bl	pthread_mutex_unlock
	ldr	r3, .L72+36
	ldr	r3, [r3, #84]
	cmp	r3, #0
	beq	.L55
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L56
.L57:
	ldr	r2, .L72+72
	ldr	r3, [fp, #-36]
	ldr	r3, [r2, r3, lsl #2]
	add	r2, r3, #1
	ldr	r1, .L72+76
	ldr	r3, [fp, #-36]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L56:
	ldr	r3, [fp, #-36]
	cmp	r3, #9
	ble	.L57
	b	.L58
.L55:
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L59
.L60:
	ldr	r2, .L72+80
	ldr	r3, [fp, #-36]
	ldr	r3, [r2, r3, lsl #2]
	add	r2, r3, #1
	ldr	r1, .L72+84
	ldr	r3, [fp, #-36]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L59:
	ldr	r3, [fp, #-36]
	cmp	r3, #9
	ble	.L60
.L58:
	ldr	r0, .L72+88
	bl	pthread_mutex_lock
	b	.L61
.L62:
	ldr	r1, .L72+88
	ldr	r0, .L72+92
	bl	pthread_cond_wait
.L61:
	ldr	r3, .L72+32
	ldr	r3, [r3, #80]
	cmp	r3, #0
	beq	.L62
	ldr	r3, .L72+32
	mov	r2, #0
	str	r2, [r3, #80]
	ldr	r0, .L72+88
	bl	pthread_mutex_unlock
	ldr	r0, .L72+96
	bl	pthread_mutex_lock
	ldr	r3, .L72+40
	mov	r2, #1
	str	r2, [r3, #80]
	ldr	r0, .L72+100
	bl	pthread_cond_signal
	ldr	r0, .L72+96
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	beq	.L71
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
	b	.L65
.L71:
	nop
	ldr	r0, .L72+88
	bl	pthread_mutex_lock
	b	.L66
.L67:
	ldr	r1, .L72+88
	ldr	r0, .L72+92
	bl	pthread_cond_wait
.L66:
	ldr	r3, .L72+32
	ldr	r3, [r3, #80]
	cmp	r3, #0
	beq	.L67
	ldr	r3, .L72+32
	mov	r2, #0
	str	r2, [r3, #80]
	ldr	r0, .L72+88
	bl	pthread_mutex_unlock
	ldr	r0, .L72+96
	bl	pthread_mutex_lock
	ldr	r3, .L72+40
	mov	r2, #1
	str	r2, [r3, #80]
	ldr	r3, .L72+40
	mov	r2, #1
	str	r2, [r3, #88]
	ldr	r0, .L72+100
	bl	pthread_cond_signal
	ldr	r0, .L72+96
	bl	pthread_mutex_unlock
	ldr	r3, .L72+44
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, .L72+40
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, .L72+32
	str	r3, [sp]
	ldr	r3, .L72+36
	ldr	r2, .L72+40
	ldr	r1, .L72+44
	mov	r0, #4
	bl	free_resources
	ldr	r0, [fp, #-16]
	bl	fclose
	ldr	r0, [fp, #-12]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L72
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L69
	bl	__stack_chk_fail
.L69:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L73:
	.align	2
.L72:
	.word	.LC10
	.word	.LC4
	.word	.LC5
	.word	1717986919
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	cal_output_info
	.word	cal_input_info
	.word	output_info
	.word	input_info
	.word	input_task
	.word	output_task
	.word	cal_input_info+4
	.word	cal_input_info+32
	.word	input_info+4
	.word	input_info+32
	.word	read_buffer_a
	.word	write_buffer_a
	.word	read_buffer_b
	.word	write_buffer_b
	.word	cal_output_info+4
	.word	cal_output_info+32
	.word	output_info+4
	.word	output_info+32
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
