	.file	"extr_vmur.c_ur_open.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"ur_open\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"ur_open: unsupported dev class (%d)\n"
	.text
	.p2align 4
	.type	ur_open, @function
ur_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	movzx	r13d, WORD PTR [rsi]
	and	r13w, WORD PTR O_ACCMODE[rip]
	cmp	WORD PTR O_RDWR[rip], r13w
	je	.L24
	mov	rbx, rsi
	xor	eax, eax
	call	lock_kernel@PLT
	mov	rax, QWORD PTR 16[rbx]
	mov	rax, QWORD PTR [rax]
	mov	edi, DWORD PTR [rax]
	call	MINOR@PLT
	mov	edi, eax
	call	urdev_get_from_devno@PLT
	mov	rbp, rax
	lea	r12, 16[rax]
	test	rax, rax
	jne	.L22
	mov	r13d, DWORD PTR ENXIO[rip]
	neg	r13d
.L5:
	xor	eax, eax
	call	unlock_kernel@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	rdi, r12
	call	spin_unlock@PLT
	movzx	eax, WORD PTR [rbx]
	test	DWORD PTR O_NONBLOCK[rip], eax
	jne	.L25
	xor	esi, esi
	mov	edi, DWORD PTR 24[rbp]
	cmp	QWORD PTR 0[rbp], 0
	sete	sil
	call	wait_event_interruptible@PLT
	test	rax, rax
	jne	.L26
.L22:
	mov	rdi, r12
	call	spin_lock@PLT
	cmp	QWORD PTR 0[rbp], 0
	jne	.L6
	mov	QWORD PTR 0[rbp], 1
	mov	rdi, r12
	call	spin_unlock@PLT
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	TRACE@PLT
	cmp	WORD PTR O_RDONLY[rip], r13w
	je	.L27
.L8:
	cmp	WORD PTR O_WRONLY[rip], r13w
	jne	.L14
	mov	rsi, QWORD PTR 8[rbp]
	cmp	rsi, QWORD PTR DEV_CLASS_UR_O[rip]
	je	.L14
.L13:
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	TRACE@PLT
	mov	r13d, DWORD PTR EACCES[rip]
	neg	r13d
.L15:
	mov	rdi, r12
	call	spin_lock@PLT
	sub	QWORD PTR 0[rbp], 1
	mov	rdi, r12
	call	spin_unlock@PLT
.L10:
	mov	rdi, rbp
	call	urdev_put@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L24:
	mov	r13d, DWORD PTR EACCES[rip]
	neg	r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdi, rbp
	call	verify_device@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L15
	mov	rdi, rbp
	call	urfile_alloc@PLT
	mov	r14, rax
	test	rax, rax
	je	.L28
	mov	eax, DWORD PTR 20[rbp]
	mov	rdi, rbp
	mov	DWORD PTR 4[r14], eax
	call	get_file_reclen@PLT
	mov	r15d, eax
	test	eax, eax
	js	.L29
	mov	DWORD PTR [r14], eax
	xor	eax, eax
	mov	QWORD PTR 8[rbx], r14
	call	unlock_kernel@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	mov	r13d, DWORD PTR EBUSY[rip]
	neg	r13d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L26:
	mov	r13d, DWORD PTR ERESTARTSYS[rip]
	neg	r13d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rsi, QWORD PTR 8[rbp]
	cmp	rsi, QWORD PTR DEV_CLASS_UR_I[rip]
	jne	.L13
	jmp	.L8
.L28:
	mov	r13d, DWORD PTR ENOMEM[rip]
	neg	r13d
	jmp	.L15
.L29:
	mov	rdi, r14
	mov	r13d, r15d
	call	urfile_free@PLT
	jmp	.L15
	.cfi_endproc
.LFE0:
	.size	ur_open, .-ur_open
	.comm	O_WRONLY,2,2
	.comm	O_RDWR,2,2
	.comm	O_RDONLY,2,2
	.comm	O_NONBLOCK,4,4
	.comm	O_ACCMODE,2,2
	.comm	ERESTARTSYS,4,4
	.comm	ENXIO,4,4
	.comm	ENOMEM,4,4
	.comm	EBUSY,4,4
	.comm	EACCES,4,4
	.comm	DEV_CLASS_UR_O,8,8
	.comm	DEV_CLASS_UR_I,8,8
	.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_vmur.c_ur_open.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ur_open\012\000"
	.align	2
.LC1:
	.ascii	"ur_open: unsupported dev class (%d)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ur_open, %function
ur_open:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L28
	ldr	r3, .L28+4
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldrh	r2, [r2]
	ldrh	r8, [r1]
	ldrh	r3, [r3]
	and	r8, r8, r2
	cmp	r3, r8
	beq	.L22
	mov	r6, r1
	bl	lock_kernel
	ldr	r3, [r6, #8]
	ldr	r3, [r3]
	ldr	r0, [r3]
	bl	MINOR
	bl	urdev_get_from_devno
	subs	r4, r0, #0
	beq	.L23
	add	r5, r4, #8
	mov	r0, r5
	bl	spin_lock
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L12
	ldr	r7, .L28+8
	b	.L6
.L9:
	ldr	r1, [r4]
	ldr	r0, [r4, #16]
	clz	r1, r1
	lsr	r1, r1, #5
	bl	wait_event_interruptible
	cmp	r0, #0
	bne	.L24
	mov	r0, r5
	bl	spin_lock
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L12
.L6:
	mov	r0, r5
	bl	spin_unlock
	ldrh	r2, [r6]
	ldr	r3, [r7]
	tst	r2, r3
	beq	.L9
	ldr	r3, .L28+12
	ldr	r7, [r3]
	rsb	r7, r7, #0
.L10:
	mov	r0, r4
	bl	urdev_put
	b	.L5
.L23:
	ldr	r3, .L28+16
	ldr	r7, [r3]
	rsb	r7, r7, #0
.L5:
	bl	unlock_kernel
.L1:
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L22:
	ldr	r3, .L28+20
	ldr	r7, [r3]
	rsb	r7, r7, #0
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	mov	r3, #1
	mov	r0, r5
	str	r3, [r4]
	bl	spin_unlock
	ldr	r0, .L28+24
	bl	TRACE
	ldr	r3, .L28+28
	ldrh	r3, [r3]
	cmp	r3, r8
	beq	.L25
.L8:
	ldr	r3, .L28+32
	ldrh	r3, [r3]
	cmp	r3, r8
	bne	.L14
	ldr	r3, .L28+36
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	cmp	r1, r3
	beq	.L14
.L13:
	ldr	r0, .L28+40
	bl	TRACE
	ldr	r3, .L28+20
	ldr	r7, [r3]
	rsb	r7, r7, #0
.L15:
	mov	r0, r5
	bl	spin_lock
	ldr	r3, [r4]
	mov	r0, r5
	sub	r3, r3, #1
	str	r3, [r4]
	bl	spin_unlock
	b	.L10
.L14:
	mov	r0, r4
	bl	verify_device
	subs	r7, r0, #0
	bne	.L15
	mov	r0, r4
	bl	urfile_alloc
	subs	r8, r0, #0
	beq	.L26
	ldr	r3, [r4, #12]
	mov	r0, r4
	str	r3, [r8, #4]
	bl	get_file_reclen
	subs	r9, r0, #0
	blt	.L27
	str	r9, [r8]
	str	r8, [r6, #4]
	bl	unlock_kernel
	b	.L1
.L24:
	ldr	r3, .L28+44
	ldr	r7, [r3]
	rsb	r7, r7, #0
	b	.L10
.L25:
	ldr	r3, .L28+48
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	cmp	r1, r3
	bne	.L13
	b	.L8
.L26:
	ldr	r3, .L28+52
	ldr	r7, [r3]
	rsb	r7, r7, #0
	b	.L15
.L27:
	mov	r0, r8
	bl	urfile_free
	mov	r7, r9
	b	.L15
.L29:
	.align	2
.L28:
	.word	O_ACCMODE
	.word	O_RDWR
	.word	O_NONBLOCK
	.word	EBUSY
	.word	ENXIO
	.word	EACCES
	.word	.LC0
	.word	O_RDONLY
	.word	O_WRONLY
	.word	DEV_CLASS_UR_O
	.word	.LC1
	.word	ERESTARTSYS
	.word	DEV_CLASS_UR_I
	.word	ENOMEM
	.size	ur_open, .-ur_open
	.comm	O_WRONLY,2,2
	.comm	O_RDWR,2,2
	.comm	O_RDONLY,2,2
	.comm	O_NONBLOCK,4,4
	.comm	O_ACCMODE,2,2
	.comm	ERESTARTSYS,4,4
	.comm	ENXIO,4,4
	.comm	ENOMEM,4,4
	.comm	EBUSY,4,4
	.comm	EACCES,4,4
	.comm	DEV_CLASS_UR_O,4,4
	.comm	DEV_CLASS_UR_I,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
