	.file	"extr_inode.c_dev_open.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	dev_open, @function
dev_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
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rbp, QWORD PTR [rdi]
	mov	r12d, DWORD PTR EBUSY[rip]
	lea	r13, 8[rbp]
	neg	r12d
	mov	rdi, r13
	call	spin_lock_irq@PLT
	mov	rax, QWORD PTR STATE_DEV_DISABLED[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L5
.L2:
	mov	rdi, r13
	call	spin_unlock_irq@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L5:
	.cfi_restore_state
	mov	rax, QWORD PTR STATE_DEV_OPENED[rip]
	mov	QWORD PTR 16[rbp], 0
	mov	rdi, rbp
	xor	r12d, r12d
	mov	QWORD PTR 0[rbp], rax
	mov	QWORD PTR [rbx], rbp
	call	get_dev@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	dev_open, .-dev_open
	.comm	STATE_DEV_OPENED,8,8
	.comm	STATE_DEV_DISABLED,8,8
	.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_inode.c_dev_open.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dev_open, %function
dev_open:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r5, [r0]
	ldr	r3, .L7
	add	r7, r5, #4
	mov	r0, r7
	ldr	r4, [r3]
	mov	r6, r1
	bl	spin_lock_irq
	ldr	r3, .L7+4
	ldr	r2, [r5]
	ldr	r3, [r3]
	cmp	r2, r3
	rsbne	r4, r4, #0
	beq	.L6
.L2:
	mov	r0, r7
	bl	spin_unlock_irq
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	mov	r4, #0
	ldr	r3, .L7+8
	str	r4, [r5, #8]
	ldr	r3, [r3]
	mov	r0, r5
	str	r3, [r5]
	str	r5, [r6]
	bl	get_dev
	b	.L2
.L8:
	.align	2
.L7:
	.word	EBUSY
	.word	STATE_DEV_DISABLED
	.word	STATE_DEV_OPENED
	.size	dev_open, .-dev_open
	.comm	STATE_DEV_OPENED,4,4
	.comm	STATE_DEV_DISABLED,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
