	.file	"extr_inotify_user.c_inotify_new_watch.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	inotify_new_watch, @function
inotify_new_watch:
.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
	mov	rbp, rdi
	mov	edi, edx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	QWORD PTR 8[rsp], rsi
	call	inotify_arg_to_mask@PLT
	xor	edi, edi
	test	eax, eax
	mov	DWORD PTR 4[rsp], eax
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	je	.L2
	mov	ebx, DWORD PTR EINVAL[rip]
	neg	ebx
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, ebx
	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
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR inotify_inode_mark_cachep[rip]
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	call	kmem_cache_alloc@PLT
	xor	edi, edi
	test	rax, rax
	mov	r13, rax
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	je	.L4
	mov	ebx, DWORD PTR ENOMEM[rip]
	neg	ebx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	esi, DWORD PTR inotify_free_mark[rip]
	lea	r12, 4[r13]
	lea	r14, 28[rbp]
	mov	rdi, r12
	lea	r15, 24[rbp]
	call	fsnotify_init_mark@PLT
	mov	eax, DWORD PTR 4[rsp]
	mov	rdi, QWORD PTR 16[rbp]
	mov	DWORD PTR 0[r13], -1
	mov	ebx, DWORD PTR ENOSPC[rip]
	mov	DWORD PTR 4[r13], eax
	call	atomic_read@PLT
	cmp	rax, QWORD PTR inotify_max_user_watches[rip]
	jl	.L7
	neg	ebx
.L6:
	test	ebx, ebx
	jns	.L1
	mov	edi, DWORD PTR inotify_inode_mark_cachep[rip]
	mov	rsi, r13
	call	kmem_cache_free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, r12
	call	fsnotify_get_mark@PLT
	mov	rdi, r15
	call	spin_lock@PLT
	mov	eax, DWORD PTR 8[rbp]
	mov	rdi, r14
	mov	rcx, r13
	mov	rsi, r12
	lea	edx, 1[rax]
	call	idr_get_new_above@PLT
	mov	rdi, r15
	mov	ebx, eax
	call	spin_unlock@PLT
	test	ebx, ebx
	je	.L9
	mov	rdi, r12
	call	fsnotify_put_mark@PLT
	mov	eax, ebx
	add	eax, DWORD PTR EAGAIN[rip]
	jne	.L6
.L7:
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	rdi, r14
	mov	ebx, DWORD PTR ENOMEM[rip]
	call	idr_pre_get@PLT
	xor	edi, edi
	test	eax, eax
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	je	.L8
	neg	ebx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdx, QWORD PTR 8[rsp]
	mov	rsi, rbp
	mov	rdi, r12
	call	fsnotify_add_mark@PLT
	mov	ebx, eax
	test	eax, eax
	jne	.L19
	mov	eax, DWORD PTR 0[r13]
	mov	rdi, QWORD PTR 16[rbp]
	mov	DWORD PTR 8[rbp], eax
	call	atomic_inc@PLT
	mov	rdi, r12
	mov	ebx, DWORD PTR 0[r13]
	call	fsnotify_put_mark@PLT
	mov	eax, DWORD PTR 0[rbp]
	not	eax
	test	DWORD PTR 4[rsp], eax
	je	.L6
	mov	rdi, rbp
	call	fsnotify_recalc_group_mask@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rsi, r13
	mov	rdi, rbp
	call	inotify_remove_from_idr@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	inotify_new_watch, .-inotify_new_watch
	.comm	inotify_max_user_watches,8,8
	.comm	inotify_inode_mark_cachep,4,4
	.comm	inotify_free_mark,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOSPC,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	EAGAIN,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_inotify_user.c_inotify_new_watch.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	inotify_new_watch, %function
inotify_new_watch:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	sub	sp, sp, #12
	mov	r0, r2
	str	r1, [sp, #4]
	bl	inotify_arg_to_mask
	mov	r3, r0
	clz	r0, r0
	lsr	r0, r0, #5
	str	r3, [sp]
	bl	unlikely
	cmp	r0, #0
	beq	.L2
	ldr	r3, .L19
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r3, .L19+4
	ldr	r10, .L19+8
	ldr	r0, [r3]
	ldr	r1, [r10]
	bl	kmem_cache_alloc
	mov	r7, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	unlikely
	cmp	r0, #0
	beq	.L4
	ldr	r3, .L19+12
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	ldr	r3, .L19+16
	add	r6, r7, #4
	ldr	r1, [r3]
	mov	r0, r6
	bl	fsnotify_init_mark
	mvn	r2, #0
	ldr	r1, [sp]
	ldr	r3, .L19+20
	ldr	r0, [r5, #8]
	str	r1, [r7, #4]
	str	r2, [r7]
	ldr	r4, [r3]
	bl	atomic_read
	ldr	r3, .L19+24
	ldr	r3, [r3]
	cmp	r0, r3
	bge	.L16
	ldr	fp, .L19+28
	add	r8, r5, #16
	add	r9, r5, #12
	b	.L7
.L8:
	mov	r0, r6
	bl	fsnotify_get_mark
	mov	r0, r9
	bl	spin_lock
	ldr	r2, [r5, #4]
	mov	r3, r7
	mov	r1, r6
	add	r2, r2, #1
	mov	r0, r8
	bl	idr_get_new_above
	mov	r4, r0
	mov	r0, r9
	bl	spin_unlock
	cmp	r4, #0
	beq	.L9
	mov	r0, r6
	bl	fsnotify_put_mark
	ldr	r3, [fp]
	cmn	r4, r3
	bne	.L6
.L7:
	ldr	r3, .L19+12
	ldr	r1, [r10]
	mov	r0, r8
	ldr	r4, [r3]
	bl	idr_pre_get
	clz	r0, r0
	lsr	r0, r0, #5
	bl	unlikely
	cmp	r0, #0
	beq	.L8
.L16:
	rsb	r4, r4, #0
.L6:
	cmp	r4, #0
	bge	.L1
	ldr	r3, .L19+4
	mov	r1, r7
	ldr	r0, [r3]
	bl	kmem_cache_free
	b	.L1
.L9:
	mov	r1, r5
	mov	r0, r6
	ldr	r2, [sp, #4]
	bl	fsnotify_add_mark
	subs	r4, r0, #0
	bne	.L18
	ldr	r3, [r7]
	ldr	r0, [r5, #8]
	str	r3, [r5, #4]
	bl	atomic_inc
	mov	r0, r6
	ldr	r4, [r7]
	bl	fsnotify_put_mark
	ldr	r3, [r5]
	ldr	r2, [sp]
	bics	r3, r2, r3
	beq	.L6
	mov	r0, r5
	bl	fsnotify_recalc_group_mask
	b	.L6
.L18:
	mov	r0, r5
	mov	r1, r7
	bl	inotify_remove_from_idr
	b	.L6
.L20:
	.align	2
.L19:
	.word	EINVAL
	.word	inotify_inode_mark_cachep
	.word	GFP_KERNEL
	.word	ENOMEM
	.word	inotify_free_mark
	.word	ENOSPC
	.word	inotify_max_user_watches
	.word	EAGAIN
	.size	inotify_new_watch, .-inotify_new_watch
	.comm	inotify_max_user_watches,4,4
	.comm	inotify_inode_mark_cachep,4,4
	.comm	inotify_free_mark,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOSPC,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
