	.file	"154829077.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 4
	.type	BUFFER_COPIES, @object
	.size	BUFFER_COPIES, 4
BUFFER_COPIES:
	.long	8
	.text
	.type	get_head, @function
get_head:
.LFB6:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	shr	rax, 32
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_head, .-get_head
	.type	get_tail, @function
get_tail:
.LFB7:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get_tail, .-get_tail
	.type	create_position, @function
create_position:
.LFB8:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 32
	mov	rdx, rax
	mov	eax, DWORD PTR -8[rbp]
	or	rax, rdx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	create_position, .-create_position
	.type	is_empty, @function
is_empty:
.LFB9:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 24
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	get_head
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	get_tail
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	sete	al
	movzx	eax, al
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	is_empty, .-is_empty
	.type	is_full, @function
is_full:
.LFB10:
	.cfi_startproc
	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	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	get_head
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	get_tail
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	mov	eax, eax
	mov	edx, 0
	div	QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -4[rbp]
	cmp	rdx, rax
	sete	al
	movzx	eax, al
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	is_full, .-is_full
	.globl	shmem_read
	.type	shmem_read, @function
shmem_read:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	QWORD PTR -72[rbp], rdi
	mov	QWORD PTR -80[rbp], rsi
	mov	QWORD PTR -88[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L13:
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	is_empty
	test	eax, eax
	je	.L12
	jmp	.L13
.L12:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	get_tail
	mov	DWORD PTR -56[rbp], eax
	mov	rax, QWORD PTR -72[rbp]
	lea	rdx, 64[rax]
	mov	eax, DWORD PTR -56[rbp]
	imul	rax, QWORD PTR -88[rbp]
	lea	rcx, [rdx+rax]
	mov	rdx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -80[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
.L17:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	get_head
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -56[rbp]
	add	eax, 1
	mov	edx, 8
	mov	ecx, edx
	mov	edx, 0
	div	ecx
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, edx
	mov	edi, eax
	call	create_position
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	rcx, QWORD PTR -40[rbp]
	mov	rsi, QWORD PTR -16[rbp]
	lea	rdx, -48[rbp]
	mov	rax, QWORD PTR [rdx]
	lock cmpxchg	QWORD PTR [rsi], rcx
	mov	rcx, rax
	sete	al
	test	al, al
	jne	.L14
	mov	QWORD PTR [rdx], rcx
.L14:
	test	al, al
	je	.L17
	nop
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	shmem_read, .-shmem_read
	.globl	shmem_write
	.type	shmem_write, @function
shmem_write:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	QWORD PTR -72[rbp], rdi
	mov	QWORD PTR -80[rbp], rsi
	mov	QWORD PTR -88[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L22:
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	eax, 8
	movsx	rdx, eax
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	is_full
	test	eax, eax
	je	.L21
	jmp	.L22
.L21:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	get_head
	mov	DWORD PTR -56[rbp], eax
	mov	rax, QWORD PTR -72[rbp]
	lea	rdx, 64[rax]
	mov	eax, DWORD PTR -56[rbp]
	imul	rax, QWORD PTR -88[rbp]
	lea	rcx, [rdx+rax]
	mov	rdx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -80[rbp]
	mov	rsi, rax
	mov	rdi, rcx
	call	memcpy@PLT
.L26:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	get_tail
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -56[rbp]
	add	eax, 1
	mov	edx, 8
	mov	ecx, edx
	mov	edx, 0
	div	ecx
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, eax
	mov	edi, edx
	call	create_position
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	rcx, QWORD PTR -40[rbp]
	mov	rsi, QWORD PTR -16[rbp]
	lea	rdx, -48[rbp]
	mov	rax, QWORD PTR [rdx]
	lock cmpxchg	QWORD PTR [rsi], rcx
	mov	rcx, rax
	sete	al
	test	al, al
	jne	.L23
	mov	QWORD PTR [rdx], rcx
.L23:
	test	al, al
	je	.L26
	nop
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	shmem_write, .-shmem_write
	.section	.rodata
	.align 8
.LC0:
	.string	"usage: pipe_lat <message-size> <roundtrip-count>"
.LC1:
	.string	"malloc"
.LC2:
	.string	"mmap shared_buf1"
.LC3:
	.string	"mmap shared_buf2"
.LC4:
	.string	"message size: %li octets\n"
.LC5:
	.string	"message count: %li\n"
.LC6:
	.string	"clock_gettime"
.LC7:
	.string	"average latency: %li ns\n"
.LC8:
	.string	"munmap"
	.text
	.globl	main
	.type	main, @function
main:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 144
	mov	DWORD PTR -132[rbp], edi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -132[rbp], 3
	je	.L30
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L47
.L30:
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	cdqe
	mov	QWORD PTR -104[rbp], rax
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atol@PLT
	mov	QWORD PTR -96[rbp], rax
	mov	eax, 8
	cdqe
	imul	rax, QWORD PTR -104[rbp]
	add	rax, 64
	mov	QWORD PTR -88[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -80[rbp], rax
	cmp	QWORD PTR -80[rbp], 0
	jne	.L32
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L47
.L32:
	mov	rax, QWORD PTR -88[rbp]
	mov	r9d, 0
	mov	r8d, -1
	mov	ecx, 33
	mov	edx, 3
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -72[rbp], rax
	mov	rax, QWORD PTR -88[rbp]
	mov	r9d, 0
	mov	r8d, -1
	mov	ecx, 33
	mov	edx, 3
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -64[rbp], rax
	cmp	QWORD PTR -72[rbp], -1
	jne	.L33
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L47
.L33:
	cmp	QWORD PTR -64[rbp], -1
	jne	.L34
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L47
.L34:
	mov	QWORD PTR -128[rbp], 0
	mov	rdx, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR -72[rbp]
	xchg	rdx, QWORD PTR [rax]
	mov	QWORD PTR -120[rbp], 0
	mov	rdx, QWORD PTR -120[rbp]
	mov	rax, QWORD PTR -64[rbp]
	xchg	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	QWORD PTR -112[rbp], 0
	jmp	.L35
.L36:
	mov	rdx, QWORD PTR -104[rbp]
	mov	rcx, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	shmem_write
	mov	rdx, QWORD PTR -104[rbp]
	mov	rcx, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	shmem_write
	add	QWORD PTR -112[rbp], 1
.L35:
	mov	eax, 8
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	cdqe
	cmp	QWORD PTR -112[rbp], rax
	jl	.L36
	call	fork@PLT
	test	eax, eax
	jne	.L37
	mov	QWORD PTR -112[rbp], 0
	jmp	.L38
.L39:
	mov	rdx, QWORD PTR -104[rbp]
	mov	rcx, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	shmem_read
	mov	rdx, QWORD PTR -104[rbp]
	mov	rcx, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	shmem_write
	add	QWORD PTR -112[rbp], 1
.L38:
	mov	rax, QWORD PTR -112[rbp]
	cmp	rax, QWORD PTR -96[rbp]
	jl	.L39
	jmp	.L40
.L37:
	lea	rax, -48[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	clock_gettime@PLT
	cmp	eax, -1
	jne	.L41
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L47
.L41:
	mov	QWORD PTR -112[rbp], 0
	jmp	.L42
.L43:
	mov	rdx, QWORD PTR -104[rbp]
	mov	rcx, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	shmem_write
	mov	rdx, QWORD PTR -104[rbp]
	mov	rcx, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	shmem_read
	add	QWORD PTR -112[rbp], 1
.L42:
	mov	rax, QWORD PTR -112[rbp]
	cmp	rax, QWORD PTR -96[rbp]
	jl	.L43
	lea	rax, -32[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	clock_gettime@PLT
	cmp	eax, -1
	jne	.L44
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L47
.L44:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	sub	rax, rdx
	imul	rdx, rax, 1000000000
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -40[rbp]
	sub	rax, rcx
	add	rax, rdx
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -96[rbp]
	lea	rsi, [rax+rax]
	mov	rax, QWORD PTR -56[rbp]
	cqo
	idiv	rsi
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	wait@PLT
.L40:
	mov	rdx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	cmp	eax, -1
	jne	.L45
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L47
.L45:
	mov	rdx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	cmp	eax, -1
	jne	.L46
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L47
.L46:
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
.L47:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L48
	call	__stack_chk_fail@PLT
.L48:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.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	"154829077.c"
	.text
	.section	.rodata
	.align	2
	.type	BUFFER_COPIES, %object
	.size	BUFFER_COPIES, 4
BUFFER_COPIES:
	.word	8
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_head, %function
get_head:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-12]
	str	r1, [fp, #-8]
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	mov	r2, #0
	mov	r3, #0
	mov	r2, r1
	mov	r3, #0
	mov	r3, r2
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	get_head, .-get_head
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_tail, %function
get_tail:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-12]
	str	r1, [fp, #-8]
	ldr	r3, [fp, #-12]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	get_tail, .-get_tail
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_position, %function
create_position:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	push	{r4, r5, fp}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	mov	r3, r0
	mov	r2, #0
	ldr	r1, [fp, #-20]
	mov	r0, r1
	mov	r1, #0
	orr	r4, r2, r0
	orr	r5, r3, r1
	mov	r2, r4
	mov	r3, r5
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, r5, fp}
	bx	lr
	.size	create_position, .-create_position
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_empty, %function
is_empty:
	@ 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, #-20]
	str	r1, [fp, #-16]
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	get_head
	str	r0, [fp, #-12]
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	get_tail
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	is_empty, .-is_empty
	.global	__aeabi_uidivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_full, %function
is_full:
	@ 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, #-20]
	str	r1, [fp, #-16]
	str	r2, [fp, #-24]
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	get_head
	str	r0, [fp, #-12]
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	get_tail
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	__aeabi_uidivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, [fp, #-8]
	cmp	r3, r2
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	is_full, .-is_full
	.global	__sync_synchronize
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	shmem_read
	.syntax unified
	.arm
	.fpu softvfp
	.type	shmem_read, %function
shmem_read:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	str	r2, [fp, #-64]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L13:
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-52]
	mov	r1, #5
	ldr	r0, [fp, #-52]
	bl	__atomic_load_8
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	is_empty
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	b	.L13
.L12:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	get_tail
	str	r0, [fp, #-48]
	bl	__sync_synchronize
	ldr	r3, [fp, #-56]
	add	r2, r3, #64
	ldr	r3, [fp, #-48]
	ldr	r1, [fp, #-64]
	mul	r3, r1, r3
	add	r3, r2, r3
	ldr	r2, [fp, #-64]
	mov	r1, r3
	ldr	r0, [fp, #-60]
	bl	memcpy
.L16:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	get_head
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	mov	r2, #8
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_uidivmod
	mov	r3, r1
	mov	r1, r3
	ldr	r0, [fp, #-44]
	bl	create_position
	str	r0, [fp, #-20]
	str	r1, [fp, #-16]
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-40]
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	sub	r1, fp, #36
	mov	r0, #5
	str	r0, [sp, #4]
	mov	r0, #5
	str	r0, [sp]
	ldr	r0, [fp, #-40]
	bl	__atomic_compare_exchange_8
	mov	r3, r0
	cmp	r3, #0
	beq	.L16
	nop
	nop
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC0
	.size	shmem_read, .-shmem_read
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	shmem_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	shmem_write, %function
shmem_write:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	str	r2, [fp, #-64]
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L23:
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-52]
	mov	r1, #5
	ldr	r0, [fp, #-52]
	bl	__atomic_load_8
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	mov	r3, #8
	mov	r2, r3
	bl	is_full
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	b	.L23
.L22:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	get_head
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-56]
	add	r2, r3, #64
	ldr	r3, [fp, #-48]
	ldr	r1, [fp, #-64]
	mul	r3, r1, r3
	add	r3, r2, r3
	ldr	r2, [fp, #-64]
	ldr	r1, [fp, #-60]
	mov	r0, r3
	bl	memcpy
	bl	__sync_synchronize
.L26:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	get_tail
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	mov	r2, #8
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_uidivmod
	mov	r3, r1
	ldr	r1, [fp, #-44]
	mov	r0, r3
	bl	create_position
	str	r0, [fp, #-20]
	str	r1, [fp, #-16]
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-40]
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	sub	r1, fp, #36
	mov	r0, #5
	str	r0, [sp, #4]
	mov	r0, #5
	str	r0, [sp]
	ldr	r0, [fp, #-40]
	bl	__atomic_compare_exchange_8
	mov	r3, r0
	cmp	r3, #0
	beq	.L26
	nop
	nop
	ldr	r3, .L29
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L27
	bl	__stack_chk_fail
.L27:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC1
	.size	shmem_write, .-shmem_write
	.section	.rodata
	.align	2
.LC2:
	.ascii	"usage: pipe_lat <message-size> <roundtrip-count>\000"
	.align	2
.LC3:
	.ascii	"malloc\000"
	.align	2
.LC4:
	.ascii	"mmap shared_buf1\000"
	.align	2
.LC5:
	.ascii	"mmap shared_buf2\000"
	.align	2
.LC6:
	.ascii	"message size: %li octets\012\000"
	.align	2
.LC7:
	.ascii	"message count: %li\012\000"
	.align	2
.LC8:
	.ascii	"clock_gettime\000"
	.global	__aeabi_ldivmod
	.align	2
.LC9:
	.ascii	"average latency: %li ns\012\000"
	.align	2
.LC10:
	.ascii	"munmap\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #112
	str	r0, [fp, #-120]
	str	r1, [fp, #-124]
	ldr	r3, .L51
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	ldr	r3, [fp, #-120]
	cmp	r3, #3
	beq	.L32
	ldr	r0, .L51+4
	bl	puts
	mov	r3, #1
	b	.L49
.L32:
	ldr	r3, [fp, #-124]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-124]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atol
	mov	r3, r0
	mov	r2, r3
	asr	r3, r2, #31
	str	r2, [fp, #-68]
	str	r3, [fp, #-64]
	mov	r3, #8
	mov	r2, r3
	ldr	r3, [fp, #-112]
	mul	r3, r2, r3
	add	r3, r3, #64
	str	r3, [fp, #-108]
	ldr	r0, [fp, #-112]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	bne	.L34
	ldr	r0, .L51+8
	bl	perror
	mov	r3, #1
	b	.L49
.L34:
	mov	r3, #0
	str	r3, [sp, #4]
	mvn	r3, #0
	str	r3, [sp]
	mov	r3, #33
	mov	r2, #3
	ldr	r1, [fp, #-108]
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-100]
	mov	r3, #0
	str	r3, [sp, #4]
	mvn	r3, #0
	str	r3, [sp]
	mov	r3, #33
	mov	r2, #3
	ldr	r1, [fp, #-108]
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-100]
	cmn	r3, #1
	bne	.L35
	ldr	r0, .L51+12
	bl	perror
	mov	r3, #1
	b	.L49
.L35:
	ldr	r3, [fp, #-96]
	cmn	r3, #1
	bne	.L36
	ldr	r0, .L51+16
	bl	perror
	mov	r3, #1
	b	.L49
.L36:
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-92]
	str	r3, [fp, #-88]
	ldr	r1, [fp, #-100]
	sub	r3, fp, #92
	ldmia	r3, {r2-r3}
	mov	r0, #5
	str	r0, [sp]
	mov	r0, r1
	bl	__atomic_store_8
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-84]
	str	r3, [fp, #-80]
	ldr	r1, [fp, #-96]
	sub	r3, fp, #84
	ldmia	r3, {r2-r3}
	mov	r0, #5
	str	r0, [sp]
	mov	r0, r1
	bl	__atomic_store_8
	ldr	r1, [fp, #-112]
	ldr	r0, .L51+20
	bl	printf
	sub	r3, fp, #68
	ldmia	r3, {r2-r3}
	ldr	r0, .L51+24
	bl	printf
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-76]
	str	r3, [fp, #-72]
	b	.L37
.L38:
	ldr	r2, [fp, #-112]
	ldr	r1, [fp, #-104]
	ldr	r0, [fp, #-100]
	bl	shmem_write
	ldr	r2, [fp, #-112]
	ldr	r1, [fp, #-104]
	ldr	r0, [fp, #-96]
	bl	shmem_write
	sub	r3, fp, #76
	ldmia	r3, {r2-r3}
	adds	r8, r2, #1
	adc	r9, r3, #0
	str	r8, [fp, #-76]
	str	r9, [fp, #-72]
.L37:
	mov	r3, #8
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	asr	r3, r2, #31
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	cmp	r0, r2
	sbcs	r3, r1, r3
	blt	.L38
	bl	fork
	mov	r3, r0
	cmp	r3, #0
	bne	.L39
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-76]
	str	r3, [fp, #-72]
	b	.L40
.L41:
	ldr	r2, [fp, #-112]
	ldr	r1, [fp, #-104]
	ldr	r0, [fp, #-100]
	bl	shmem_read
	ldr	r2, [fp, #-112]
	ldr	r1, [fp, #-104]
	ldr	r0, [fp, #-96]
	bl	shmem_write
	sub	r3, fp, #76
	ldmia	r3, {r2-r3}
	adds	r6, r2, #1
	adc	r7, r3, #0
	str	r6, [fp, #-76]
	str	r7, [fp, #-72]
.L40:
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	sub	r3, fp, #68
	ldmia	r3, {r2-r3}
	cmp	r0, r2
	sbcs	r3, r1, r3
	blt	.L41
	b	.L42
.L39:
	sub	r3, fp, #48
	mov	r1, r3
	mov	r0, #1
	bl	clock_gettime
	mov	r3, r0
	cmn	r3, #1
	bne	.L43
	ldr	r0, .L51+28
	bl	perror
	mov	r3, #1
	b	.L49
.L43:
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-76]
	str	r3, [fp, #-72]
	b	.L44
.L45:
	ldr	r2, [fp, #-112]
	ldr	r1, [fp, #-104]
	ldr	r0, [fp, #-100]
	bl	shmem_write
	ldr	r2, [fp, #-112]
	ldr	r1, [fp, #-104]
	ldr	r0, [fp, #-96]
	bl	shmem_read
	sub	r3, fp, #76
	ldmia	r3, {r2-r3}
	adds	r4, r2, #1
	adc	r5, r3, #0
	str	r4, [fp, #-76]
	str	r5, [fp, #-72]
.L44:
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	sub	r3, fp, #68
	ldmia	r3, {r2-r3}
	cmp	r0, r2
	sbcs	r3, r1, r3
	blt	.L45
	sub	r3, fp, #40
	mov	r1, r3
	mov	r0, #1
	bl	clock_gettime
	mov	r3, r0
	cmn	r3, #1
	bne	.L46
	ldr	r0, .L51+28
	bl	perror
	mov	r3, #1
	b	.L49
.L46:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-48]
	sub	r3, r2, r3
	ldr	r2, .L51+32
	mul	r2, r3, r2
	ldr	r1, [fp, #-36]
	ldr	r3, [fp, #-44]
	sub	r3, r1, r3
	add	r3, r2, r3
	mov	r2, r3
	asr	r3, r2, #31
	str	r2, [fp, #-60]
	str	r3, [fp, #-56]
	sub	r3, fp, #68
	ldmia	r3, {r2-r3}
	adds	r1, r2, r2
	str	r1, [fp, #-132]
	adc	r3, r3, r3
	str	r3, [fp, #-128]
	sub	r3, fp, #132
	ldmia	r3, {r2-r3}
	sub	r1, fp, #60
	ldmia	r1, {r0-r1}
	bl	__aeabi_ldivmod
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L51+36
	bl	printf
	mov	r0, #0
	bl	wait
.L42:
	ldr	r1, [fp, #-108]
	ldr	r0, [fp, #-100]
	bl	munmap
	mov	r3, r0
	cmn	r3, #1
	bne	.L47
	ldr	r0, .L51+40
	bl	perror
	mov	r3, #1
	b	.L49
.L47:
	ldr	r1, [fp, #-108]
	ldr	r0, [fp, #-96]
	bl	munmap
	mov	r3, r0
	cmn	r3, #1
	bne	.L48
	ldr	r0, .L51+40
	bl	perror
	mov	r3, #1
	b	.L49
.L48:
	ldr	r0, [fp, #-104]
	bl	free
	mov	r3, #0
.L49:
	ldr	r2, .L51
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L50
	bl	__stack_chk_fail
.L50:
	mov	r0, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L52:
	.align	2
.L51:
	.word	.LC11
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	1000000000
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
