	.file	"634836.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/dmce_buffer0"
	.section	.data.rel.local,"aw"
	.align 8
	.type	dmce_probe_buffer_name, @object
	.size	dmce_probe_buffer_name, 8
dmce_probe_buffer_name:
	.quad	.LC0
	.local	dmce_probe_buffer_fd
	.comm	dmce_probe_buffer_fd,4,4
	.globl	dmce_probe_buffer_p
	.bss
	.align 8
	.type	dmce_probe_buffer_p, @object
	.size	dmce_probe_buffer_p, 8
dmce_probe_buffer_p:
	.zero	8
	.globl	dmce_probe_buffers_ready
	.align 4
	.type	dmce_probe_buffers_ready, @object
	.size	dmce_probe_buffers_ready, 4
dmce_probe_buffers_ready:
	.zero	4
	.text
	.type	dmce_create_or_just_map_buffers, @function
dmce_create_or_just_map_buffers:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L9:
	cmp	DWORD PTR -20[rbp], 0
	je	.L3
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, dmce_probe_buffer_name[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	edx, 384
	mov	esi, 194
	mov	rdi, rax
	call	shm_open@PLT
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, dmce_probe_buffer_fd[rip]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dmce_probe_buffer_fd[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	eax, -1
	jne	.L4
	mov	eax, 1
	jmp	.L5
.L4:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dmce_probe_buffer_fd[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, 323584
	mov	edi, eax
	call	ftruncate@PLT
	cmp	eax, -1
	jne	.L6
	mov	eax, 2
	jmp	.L5
.L3:
	mov	eax, DWORD PTR dmce_probe_buffers_ready[rip]
	test	eax, eax
	je	.L7
	mov	eax, 5
	jmp	.L5
.L7:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, dmce_probe_buffer_name[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	edx, 384
	mov	esi, 2
	mov	rdi, rax
	call	shm_open@PLT
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, dmce_probe_buffer_fd[rip]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dmce_probe_buffer_fd[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	eax, -1
	jne	.L6
	mov	eax, 4
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dmce_probe_buffer_fd[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 2
	mov	esi, 323584
	mov	edi, 0
	call	mmap@PLT
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	lea	rdx, dmce_probe_buffer_p[rip]
	mov	QWORD PTR [rcx+rdx], rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, dmce_probe_buffer_p[rip]
	mov	rax, QWORD PTR [rdx+rax]
	cmp	rax, -1
	jne	.L8
	mov	eax, 3
	jmp	.L5
.L8:
	add	DWORD PTR -4[rbp], 1
.L2:
	cmp	DWORD PTR -4[rbp], 0
	jle	.L9
	mov	DWORD PTR dmce_probe_buffers_ready[rip], 1
	mov	eax, 5
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dmce_create_or_just_map_buffers, .-dmce_create_or_just_map_buffers
	.type	dmce_probe_body, @function
dmce_probe_body:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR dmce_probe_buffers_ready[rip]
	test	eax, eax
	jne	.L11
	mov	edi, 1
	call	dmce_create_or_just_map_buffers
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 5
	je	.L14
	cmp	DWORD PTR -12[rbp], 1
	jne	.L14
	mov	edi, 0
	call	dmce_create_or_just_map_buffers
.L14:
	nop
.L13:
	mov	eax, DWORD PTR dmce_probe_buffers_ready[rip]
	test	eax, eax
	je	.L13
.L11:
	mov	rax, QWORD PTR dmce_probe_buffer_p[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -20[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rcx
	add	edx, 1
	mov	DWORD PTR [rax], edx
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	dmce_probe_body, .-dmce_probe_body
	.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	"634836.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dmce_buffer0\000"
	.data
	.align	2
	.type	dmce_probe_buffer_name, %object
	.size	dmce_probe_buffer_name, 4
dmce_probe_buffer_name:
	.word	.LC0
	.local	dmce_probe_buffer_fd
	.comm	dmce_probe_buffer_fd,4,4
	.comm	dmce_probe_buffer_p,4,4
	.comm	dmce_probe_buffers_ready,4,4
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dmce_create_or_just_map_buffers, %function
dmce_create_or_just_map_buffers:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L9:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L3
	ldr	r2, .L10
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, #384
	mov	r1, #194
	mov	r0, r3
	bl	shm_open
	mov	r2, r0
	ldr	r1, .L10+4
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r2, .L10+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmn	r3, #1
	bne	.L4
	mov	r3, #1
	b	.L5
.L4:
	ldr	r2, .L10+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, #323584
	mov	r0, r3
	bl	ftruncate
	mov	r3, r0
	cmn	r3, #1
	bne	.L6
	mov	r3, #2
	b	.L5
.L3:
	ldr	r3, .L10+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L7
	mov	r3, #5
	b	.L5
.L7:
	ldr	r2, .L10
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, #384
	mov	r1, #2
	mov	r0, r3
	bl	shm_open
	mov	r2, r0
	ldr	r1, .L10+4
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r2, .L10+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmn	r3, #1
	bne	.L6
	mov	r3, #4
	b	.L5
.L6:
	ldr	r2, .L10+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, #0
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #2
	mov	r1, #323584
	mov	r0, #0
	bl	mmap
	mov	r2, r0
	ldr	r1, .L10+12
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r2, .L10+12
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmn	r3, #1
	bne	.L8
	mov	r3, #3
	b	.L5
.L8:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L9
	ldr	r3, .L10+8
	mov	r2, #1
	str	r2, [r3]
	mov	r3, #5
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	dmce_probe_buffer_name
	.word	dmce_probe_buffer_fd
	.word	dmce_probe_buffers_ready
	.word	dmce_probe_buffer_p
	.size	dmce_create_or_just_map_buffers, .-dmce_create_or_just_map_buffers
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dmce_probe_body, %function
dmce_probe_body:
	@ 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, .L17
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L13
	mov	r0, #1
	bl	dmce_create_or_just_map_buffers
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #5
	beq	.L16
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	bne	.L16
	mov	r0, #0
	bl	dmce_create_or_just_map_buffers
.L16:
	nop
.L15:
	ldr	r3, .L17
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L15
.L13:
	ldr	r3, .L17+4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-8]
	add	r3, r1, r3
	add	r2, r2, #1
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	dmce_probe_buffers_ready
	.word	dmce_probe_buffer_p
	.size	dmce_probe_body, .-dmce_probe_body
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
