	.file	"12351.c"
	.intel_syntax noprefix
	.text
	.globl	buffer
	.bss
	.align 32
	.type	buffer, @object
	.size	buffer, 128
buffer:
	.zero	128
	.globl	buffer_data
	.align 4
	.type	buffer_data, @object
	.size	buffer_data, 4
buffer_data:
	.zero	4
	.globl	mutex
	.align 32
	.type	mutex, @object
	.size	mutex, 40
mutex:
	.zero	40
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.globl	write_buffer
	.type	write_buffer, @function
write_buffer:
.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, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR buffer_data[rip]
	test	eax, eax
	jne	.L2
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	lea	rsi, .LC0[rip]
	lea	rdi, buffer[rip]
	mov	eax, 0
	call	sprintf@PLT
	mov	DWORD PTR buffer_data[rip], 1
.L2:
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	write_buffer, .-write_buffer
	.section	.rodata
.LC1:
	.string	"readbuffer data =[%s]\n"
	.text
	.globl	read_buffer
	.type	read_buffer, @function
read_buffer:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
.L5:
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR buffer_data[rip]
	cmp	eax, 1
	jne	.L4
	lea	rsi, buffer[rip]
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR buffer_data[rip], 0
.L4:
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	edi, 1
	mov	eax, 0
	call	sleep@PLT
	jmp	.L5
	.cfi_endproc
.LFE7:
	.size	read_buffer, .-read_buffer
	.globl	main
	.type	main, @function
main:
.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, 160
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 0
	lea	rdi, mutex[rip]
	call	pthread_mutex_init@PLT
	lea	rax, -152[rbp]
	mov	ecx, 0
	lea	rdx, read_buffer[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
.L7:
	lea	rax, -144[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	scanf@PLT
	lea	rax, -144[rbp]
	mov	rdi, rax
	call	write_buffer
	jmp	.L7
	.cfi_endproc
.LFE8:
	.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	"12351.c"
	.text
	.comm	buffer,128,4
	.global	buffer_data
	.bss
	.align	2
	.type	buffer_data, %object
	.size	buffer_data, 4
buffer_data:
	.space	4
	.comm	mutex,24,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s\000"
	.text
	.align	2
	.global	write_buffer
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_buffer, %function
write_buffer:
	@ 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	r3, .L3+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
	ldr	r2, [fp, #-8]
	ldr	r1, .L3+8
	ldr	r0, .L3+12
	bl	sprintf
	ldr	r3, .L3+4
	mov	r2, #1
	str	r2, [r3]
.L2:
	ldr	r0, .L3
	bl	pthread_mutex_unlock
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	mutex
	.word	buffer_data
	.word	.LC0
	.word	buffer
	.size	write_buffer, .-write_buffer
	.section	.rodata
	.align	2
.LC1:
	.ascii	"readbuffer data =[%s]\012\000"
	.text
	.align	2
	.global	read_buffer
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_buffer, %function
read_buffer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
.L7:
	ldr	r0, .L8
	bl	pthread_mutex_lock
	ldr	r3, .L8+4
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L6
	ldr	r1, .L8+8
	ldr	r0, .L8+12
	bl	printf
	ldr	r3, .L8+4
	mov	r2, #0
	str	r2, [r3]
.L6:
	ldr	r0, .L8
	bl	pthread_mutex_unlock
	mov	r0, #1
	bl	sleep
	b	.L7
.L9:
	.align	2
.L8:
	.word	mutex
	.word	buffer_data
	.word	buffer
	.word	.LC1
	.size	read_buffer, .-read_buffer
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #136
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #0
	ldr	r0, .L13+4
	bl	pthread_mutex_init
	sub	r0, fp, #140
	mov	r3, #0
	ldr	r2, .L13+8
	mov	r1, #0
	bl	pthread_create
.L11:
	sub	r3, fp, #136
	mov	r1, r3
	ldr	r0, .L13+12
	bl	scanf
	sub	r3, fp, #136
	mov	r0, r3
	bl	write_buffer
	b	.L11
.L14:
	.align	2
.L13:
	.word	.LC2
	.word	mutex
	.word	read_buffer
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
