	.file	"extr_locks.c_generic_setlease.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	generic_setlease
	.type	generic_setlease, @function
generic_setlease:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	eax, eax
	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
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r14, QWORD PTR [rdi]
	mov	r15, QWORD PTR 8[r14]
	call	current_fsuid@PLT
	cmp	rax, QWORD PTR [r15]
	je	.L2
	mov	edi, DWORD PTR CAP_LEASE[rip]
	call	capable@PLT
	test	eax, eax
	je	.L45
.L2:
	mov	edi, DWORD PTR 24[r15]
	call	S_ISREG@PLT
	test	eax, eax
	jne	.L4
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L4:
	.cfi_restore_state
	mov	rdi, r12
	mov	rsi, rbp
	call	security_file_lock@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	rdi, r15
	call	time_out_leases@PLT
	mov	rax, QWORD PTR [rbx]
	xor	edi, edi
	mov	rax, QWORD PTR 8[rax]
	mov	ecx, DWORD PTR 16[rax]
	test	ecx, ecx
	sete	dil
	call	BUG_ON@PLT
	cmp	QWORD PTR F_UNLCK[rip], rbp
	mov	r13, QWORD PTR [rbx]
	mov	QWORD PTR 16[rsp], 0
	je	.L5
	mov	eax, DWORD PTR ENOMEM[rip]
	mov	DWORD PTR 8[rsp], eax
	xor	eax, eax
	call	locks_alloc_lock@PLT
	mov	QWORD PTR 16[rsp], rax
	test	rax, rax
	je	.L46
	mov	edx, DWORD PTR EAGAIN[rip]
	neg	edx
	cmp	QWORD PTR F_RDLCK[rip], rbp
	je	.L7
.L10:
	cmp	QWORD PTR F_WRLCK[rip], rbp
	je	.L47
.L5:
	lea	r14, 8[r15]
	mov	r15, QWORD PTR 8[r15]
	mov	DWORD PTR 28[rsp], 0
	mov	DWORD PTR 24[rsp], 0
	mov	QWORD PTR 8[rsp], 0
	test	r15, r15
	jne	.L11
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L49:
	mov	rax, QWORD PTR F_INPROGRESS[rip]
	or	rax, QWORD PTR F_UNLCK[rip]
	cmp	QWORD PTR [r15], rax
	je	.L48
	add	DWORD PTR 24[rsp], 1
.L13:
	lea	r14, 16[r15]
	mov	r15, QWORD PTR 16[r15]
	test	r15, r15
	je	.L15
.L11:
	mov	rdi, r15
	call	IS_LEASE@PLT
	test	rax, rax
	je	.L15
	mov	rax, QWORD PTR 8[r13]
	mov	rsi, r13
	mov	rdi, r15
	call	[QWORD PTR 8[rax]]
	test	rax, rax
	je	.L49
	mov	QWORD PTR 8[rsp], r14
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L45:
	mov	r12d, DWORD PTR EACCES[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L48:
	add	DWORD PTR 28[rsp], 1
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L15:
	mov	eax, DWORD PTR EAGAIN[rip]
	neg	eax
	cmp	QWORD PTR F_RDLCK[rip], rbp
	jne	.L29
	mov	edx, DWORD PTR 28[rsp]
	test	edx, edx
	jne	.L28
.L29:
	cmp	QWORD PTR F_WRLCK[rip], rbp
	je	.L50
.L19:
	mov	rdi, QWORD PTR 8[rsp]
	test	rdi, rdi
	je	.L12
	mov	rax, QWORD PTR [rdi]
	mov	rsi, rbp
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR 8[r13]
	call	[QWORD PTR [rax]]
	mov	r12d, eax
.L17:
	cmp	QWORD PTR 16[rsp], 0
	je	.L1
.L9:
	mov	rdi, QWORD PTR 16[rsp]
	call	locks_free_lock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	cmp	QWORD PTR F_UNLCK[rip], rbp
	je	.L17
	mov	eax, DWORD PTR leases_enable[rip]
	test	eax, eax
	jne	.L20
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L50:
	mov	ecx, DWORD PTR 28[rsp]
	add	ecx, DWORD PTR 24[rsp]
	je	.L19
.L28:
	mov	r12d, eax
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L20:
	mov	r15, QWORD PTR 16[rsp]
	mov	rsi, r13
	mov	rdi, r15
	call	locks_copy_lock@PLT
	mov	rsi, r15
	mov	rdi, r14
	call	locks_insert_lock@PLT
	mov	QWORD PTR [rbx], r15
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L46:
	mov	r12d, DWORD PTR 8[rsp]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	lea	rdi, 20[r15]
	mov	DWORD PTR 8[rsp], edx
	call	atomic_read@PLT
	mov	edx, DWORD PTR 8[rsp]
	test	eax, eax
	jle	.L10
.L24:
	mov	r12d, edx
	jmp	.L9
.L47:
	mov	rdi, r14
	mov	DWORD PTR 8[rsp], edx
	call	atomic_read@PLT
	mov	edx, DWORD PTR 8[rsp]
	cmp	eax, 1
	jg	.L24
	lea	rdi, 16[r15]
	call	atomic_read@PLT
	mov	edx, DWORD PTR 8[rsp]
	cmp	eax, 1
	jle	.L5
	jmp	.L24
	.cfi_endproc
.LFE0:
	.size	generic_setlease, .-generic_setlease
	.comm	leases_enable,4,4
	.comm	F_WRLCK,8,8
	.comm	F_UNLCK,8,8
	.comm	F_RDLCK,8,8
	.comm	F_INPROGRESS,8,8
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	EAGAIN,4,4
	.comm	EACCES,4,4
	.comm	CAP_LEASE,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_locks.c_generic_setlease.c"
	.text
	.align	2
	.global	generic_setlease
	.syntax unified
	.arm
	.fpu softvfp
	.type	generic_setlease, %function
generic_setlease:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r10, [r0]
	sub	sp, sp, #20
	ldr	r4, [r10, #4]
	mov	r5, r0
	mov	r6, r1
	mov	r7, r2
	bl	current_fsuid
	ldr	r3, [r4]
	cmp	r0, r3
	beq	.L2
	ldr	r3, .L43
	ldr	r0, [r3]
	bl	capable
	cmp	r0, #0
	beq	.L40
.L2:
	ldr	r0, [r4, #16]
	bl	S_ISREG
	cmp	r0, #0
	bne	.L4
	ldr	r3, .L43+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L1:
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mov	r0, r5
	mov	r1, r6
	bl	security_file_lock
	subs	r5, r0, #0
	bne	.L1
	mov	r0, r4
	bl	time_out_leases
	ldr	r3, [r7]
	ldr	r9, .L43+8
	ldr	r3, [r3, #4]
	ldr	r0, [r3, #8]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	BUG_ON
	ldr	r3, [r9]
	ldr	r8, [r7]
	cmp	r3, r6
	streq	r5, [sp, #4]
	beq	.L5
	ldr	r3, .L43+12
	ldr	fp, [r3]
	bl	locks_alloc_lock
	subs	r3, r0, #0
	str	r3, [sp, #4]
	rsbeq	r5, fp, #0
	beq	.L1
	ldr	r2, .L43+16
	ldr	r3, .L43+20
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r6
	rsb	fp, r3, #0
	beq	.L7
.L10:
	ldr	r3, .L43+24
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L41
.L5:
	ldr	r10, [r4, #4]
	add	r4, r4, #4
	cmp	r10, #0
	beq	.L12
	mov	r2, #0
	str	r5, [sp, #8]
	str	r6, [sp, #12]
	mov	r5, r2
	mov	r6, r8
	ldr	fp, .L43+28
	mov	r8, r7
	str	r2, [sp]
	mov	r7, r10
	mov	r10, r2
	b	.L11
.L16:
	ldr	r2, [r6, #4]
	mov	r1, r6
	mov	r0, r7
	ldr	r2, [r2, #4]
	blx	r2
	cmp	r0, #0
	movne	r5, r4
	bne	.L13
	ldr	r2, [fp]
	ldr	ip, [r9]
	ldr	r0, [r7]
	orr	r2, r2, ip
	cmp	r0, r2
	ldreq	r3, [sp]
	addne	r10, r10, #1
	addeq	r3, r3, #1
	streq	r3, [sp]
.L13:
	add	r4, r7, #8
	ldr	r7, [r7, #8]
	cmp	r7, #0
	beq	.L38
.L11:
	mov	r0, r7
	bl	IS_LEASE
	cmp	r0, #0
	bne	.L16
.L38:
	ldr	r3, .L43+16
	mov	r7, r8
	ldr	r3, [r3]
	mov	r8, r6
	ldr	r6, [sp, #12]
	ldr	r1, [sp]
	sub	r3, r3, r6
	clz	r3, r3
	cmp	r1, #0
	lsr	r3, r3, #5
	moveq	r3, #0
	ldr	r2, .L43+20
	cmp	r3, #0
	ldr	r2, [r2]
	mov	r0, r5
	rsb	r2, r2, #0
	ldr	r5, [sp, #8]
	bne	.L27
	ldr	r3, .L43+24
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L42
.L18:
	cmp	r0, #0
	beq	.L12
	ldr	r3, [r8, #4]
	ldr	r2, [r0]
	ldr	r3, [r3]
	mov	r1, r6
	str	r2, [r7]
	blx	r3
	mov	r5, r0
.L17:
	ldr	r3, [sp, #4]
	cmp	r3, #0
	beq	.L1
.L9:
	ldr	r0, [sp, #4]
	bl	locks_free_lock
	b	.L1
.L40:
	ldr	r3, .L43+32
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	ldr	r3, [r9]
	cmp	r3, r6
	beq	.L17
	ldr	r3, .L43+36
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L19
	ldr	r3, .L43+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L17
.L42:
	cmn	r1, r10
	beq	.L18
.L27:
	mov	r5, r2
	b	.L17
.L19:
	ldr	r6, [sp, #4]
	mov	r1, r8
	mov	r0, r6
	bl	locks_copy_lock
	mov	r1, r6
	mov	r0, r4
	bl	locks_insert_lock
	str	r6, [r7]
	b	.L1
.L7:
	add	r0, r4, #12
	bl	atomic_read
	cmp	r0, #0
	ble	.L10
.L23:
	mov	r5, fp
	b	.L9
.L41:
	mov	r0, r10
	bl	atomic_read
	cmp	r0, #1
	bgt	.L23
	add	r0, r4, #8
	bl	atomic_read
	cmp	r0, #1
	ble	.L5
	b	.L23
.L44:
	.align	2
.L43:
	.word	CAP_LEASE
	.word	EINVAL
	.word	F_UNLCK
	.word	ENOMEM
	.word	F_RDLCK
	.word	EAGAIN
	.word	F_WRLCK
	.word	F_INPROGRESS
	.word	EACCES
	.word	leases_enable
	.size	generic_setlease, .-generic_setlease
	.comm	leases_enable,4,4
	.comm	F_WRLCK,4,4
	.comm	F_UNLCK,4,4
	.comm	F_RDLCK,4,4
	.comm	F_INPROGRESS,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	EAGAIN,4,4
	.comm	EACCES,4,4
	.comm	CAP_LEASE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
