	.file	"extr_cmx.c_cmx_open.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"open (flags=%b thread=%p)\n"
	.text
	.p2align 4
	.type	cmx_open, @function
cmx_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rbp, QWORD PTR [rdi]
	test	rbp, rbp
	je	.L2
	cmp	QWORD PTR 8[rbp], 0
	je	.L3
.L2:
	mov	r13d, DWORD PTR ENXIO[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	mov	eax, r13d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	rdi, rbp
	mov	r12d, esi
	mov	rbx, rcx
	call	CMX_LOCK@PLT
	mov	r13d, DWORD PTR 0[rbp]
	test	r13d, r13d
	jne	.L11
	mov	DWORD PTR 0[rbp], 1
	mov	rdi, rbp
	call	CMX_UNLOCK@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	r8, rbx
	mov	edx, r12d
	mov	ecx, DWORD PTR MODEBITS[rip]
	lea	rsi, .LC0[rip]
	call	DEBUG_printf@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdi, rbp
	call	CMX_UNLOCK@PLT
	mov	r13d, DWORD PTR EBUSY[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	mov	eax, r13d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	cmx_open, .-cmx_open
	.comm	MODEBITS,4,4
	.comm	ENXIO,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_cmx.c_cmx_open.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"open (flags=%b thread=%p)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmx_open, %function
cmx_open:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r4, [r0]
	sub	sp, sp, #12
	cmp	r4, #0
	beq	.L2
	mov	r6, r3
	ldr	r3, [r4, #8]
	cmp	r3, #0
	beq	.L3
.L2:
	ldr	r3, .L12
	ldr	r7, [r3]
	mov	r0, r7
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L3:
	mov	r0, r4
	mov	r5, r1
	bl	CMX_LOCK
	ldr	r7, [r4]
	cmp	r7, #0
	bne	.L11
	mov	r3, #1
	mov	r0, r4
	str	r3, [r4]
	bl	CMX_UNLOCK
	ldr	r3, .L12+4
	ldr	r0, [r4, #4]
	str	r6, [sp]
	mov	r2, r5
	ldr	r3, [r3]
	ldr	r1, .L12+8
	bl	DEBUG_printf
	mov	r0, r7
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L11:
	mov	r0, r4
	bl	CMX_UNLOCK
	ldr	r3, .L12+12
	ldr	r7, [r3]
	mov	r0, r7
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L13:
	.align	2
.L12:
	.word	ENXIO
	.word	MODEBITS
	.word	.LC0
	.word	EBUSY
	.size	cmx_open, .-cmx_open
	.comm	MODEBITS,4,4
	.comm	ENXIO,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
