	.file	"extr_userdlm.c_user_dlm_cluster_lock.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"lockres %.*s: invalid request!\n"
	.align 8
.LC1:
	.string	"lockres %.*s, level %d, flags = 0x%x\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"ocfs2_dlm_lock"
	.text
	.p2align 4
	.globl	user_dlm_cluster_lock
	.type	user_dlm_cluster_lock, @function
user_dlm_cluster_lock:
.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
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	cluster_connection_from_user_lockres@PLT
	cmp	DWORD PTR DLM_LOCK_EX[rip], r12d
	mov	ecx, DWORD PTR 20[rbp]
	mov	edx, DWORD PTR 16[rbp]
	mov	r15, rax
	je	.L3
	cmp	DWORD PTR DLM_LOCK_PR[rip], r12d
	jne	.L24
.L3:
	mov	edi, DWORD PTR ML_BASTS[rip]
	mov	r9d, ebx
	mov	r8d, r12d
	xor	eax, eax
	lea	rsi, .LC1[rip]
	lea	r14, 12[rbp]
	call	mlog@PLT
.L5:
	mov	edi, DWORD PTR current[rip]
	call	signal_pending@PLT
	test	rax, rax
	jne	.L25
.L6:
	mov	rdi, r14
	call	spin_lock@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR USER_LOCK_BUSY[rip], eax
	je	.L7
	cmp	DWORD PTR 4[rbp], r12d
	jl	.L26
	test	DWORD PTR USER_LOCK_BLOCKED[rip], eax
	je	.L11
.L15:
	mov	esi, r12d
	mov	rdi, rbp
	call	user_may_continue_on_blocked_lock@PLT
	test	eax, eax
	je	.L27
.L10:
	mov	eax, DWORD PTR 4[rbp]
	cmp	eax, r12d
	jge	.L11
	mov	r13d, DWORD PTR DLM_LKF_VALBLK[rip]
	or	r13d, ebx
	cmp	eax, DWORD PTR DLM_LOCK_IV[rip]
	je	.L12
	or	r13d, DWORD PTR DLM_LKF_CONVERT[rip]
.L12:
	mov	eax, DWORD PTR USER_LOCK_BUSY[rip]
	or	DWORD PTR 0[rbp], eax
	mov	rdi, r14
	mov	DWORD PTR 8[rbp], r12d
	call	spin_unlock@PLT
	xor	edi, edi
	cmp	DWORD PTR DLM_LOCK_IV[rip], r12d
	sete	dil
	call	BUG_ON@PLT
	xor	edi, edi
	cmp	DWORD PTR DLM_LOCK_NL[rip], r12d
	sete	dil
	call	BUG_ON@PLT
	mov	r9d, DWORD PTR 16[rbp]
	mov	r8d, DWORD PTR 20[rbp]
	mov	ecx, r13d
	lea	rdx, 24[rbp]
	mov	esi, r12d
	mov	rdi, r15
	call	ocfs2_dlm_lock@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L28
	mov	rdi, rbp
	call	user_wait_on_busy_lock@PLT
	mov	edi, DWORD PTR current[rip]
	call	signal_pending@PLT
	test	rax, rax
	je	.L6
.L25:
	mov	r13d, DWORD PTR ERESTARTSYS[rip]
	neg	r13d
.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
.L7:
	.cfi_restore_state
	test	DWORD PTR USER_LOCK_BLOCKED[rip], eax
	je	.L10
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rdi, r14
	call	spin_unlock@PLT
	mov	rdi, rbp
	call	user_wait_on_busy_lock@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rdi, r14
	call	spin_unlock@PLT
	mov	rdi, rbp
	call	user_wait_on_blocked_lock@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L24:
	mov	edi, DWORD PTR ML_ERROR[rip]
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	mlog@PLT
	mov	r13d, DWORD PTR EINVAL[rip]
	neg	r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
.L4:
	endbr64
	mov	esi, r12d
	mov	rdi, rbp
	xor	r13d, r13d
	call	user_dlm_inc_holders@PLT
	mov	rdi, r14
	call	spin_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L28:
	test	DWORD PTR DLM_LKF_NOQUEUE[rip], ebx
	je	.L14
	add	eax, DWORD PTR EAGAIN[rip]
	je	.L14
	mov	rdx, rbp
	mov	esi, r13d
	lea	rdi, .LC2[rip]
	call	user_log_dlm_error@PLT
.L14:
	mov	rdi, rbp
	call	user_recover_from_dlm_error@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	user_dlm_cluster_lock, .-user_dlm_cluster_lock
	.comm	current,4,4
	.comm	USER_LOCK_BUSY,4,4
	.comm	USER_LOCK_BLOCKED,4,4
	.comm	ML_ERROR,4,4
	.comm	ML_BASTS,4,4
	.comm	ERESTARTSYS,4,4
	.comm	EINVAL,4,4
	.comm	EAGAIN,4,4
	.comm	DLM_LOCK_PR,4,4
	.comm	DLM_LOCK_NL,4,4
	.comm	DLM_LOCK_IV,4,4
	.comm	DLM_LOCK_EX,4,4
	.comm	DLM_LKF_VALBLK,4,4
	.comm	DLM_LKF_NOQUEUE,4,4
	.comm	DLM_LKF_CONVERT,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_userdlm.c_user_dlm_cluster_lock.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"lockres %.*s: invalid request!\012\000"
	.align	2
.LC1:
	.ascii	"lockres %.*s, level %d, flags = 0x%x\012\000"
	.align	2
.LC2:
	.ascii	"ocfs2_dlm_lock\000"
	.text
	.align	2
	.global	user_dlm_cluster_lock
	.syntax unified
	.arm
	.fpu softvfp
	.type	user_dlm_cluster_lock, %function
user_dlm_cluster_lock:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r1
	sub	sp, sp, #28
	mov	r4, r0
	str	r2, [sp, #12]
	bl	cluster_connection_from_user_lockres
	ldr	r3, .L30
	str	r0, [sp, #16]
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L2
	ldr	r3, .L30+4
	ldr	r2, [r4, #16]
	ldr	r1, [r3]
	ldr	r3, [r4, #20]
	cmp	r1, r6
	bne	.L25
.L3:
	ldr	r0, [sp, #12]
	ldr	r1, .L30+8
	str	r0, [sp, #4]
	str	r6, [sp]
	ldr	r0, [r1]
	ldr	r1, .L30+12
	bl	mlog
	ldr	r7, .L30+16
	ldr	fp, .L30+20
	ldr	r8, .L30+24
	ldr	r9, .L30+28
.L5:
	ldr	r3, .L30+32
	ldr	r0, [r3]
	bl	signal_pending
	subs	r5, r0, #0
	bne	.L26
	add	r10, r4, #12
	mov	r0, r10
	bl	spin_lock
	ldr	r2, [r4]
	ldr	r1, [r7]
	tst	r2, r1
	beq	.L7
	ldr	r1, [r4, #4]
	cmp	r1, r6
	blt	.L27
	ldr	r1, [r9]
	tst	r2, r1
	beq	.L11
.L15:
	mov	r1, r6
	mov	r0, r4
	bl	user_may_continue_on_blocked_lock
	cmp	r0, #0
	beq	.L28
.L10:
	ldr	r2, [r4, #4]
	cmp	r2, r6
	bge	.L11
	ldr	r1, [r8]
	ldr	r3, [sp, #12]
	ldr	r5, [fp]
	cmp	r2, r1
	orr	r5, r3, r5
	ldrne	r3, .L30+36
	ldr	r0, [r7]
	ldrne	r2, [r3]
	ldr	r1, [r4]
	orrne	r5, r5, r2
	mov	r2, r4
	orr	r1, r1, r0
	str	r6, [r4, #8]
	mov	r0, r10
	str	r1, [r2], #24
	str	r2, [sp, #8]
	str	r2, [sp, #20]
	bl	spin_unlock
	ldr	r0, [r8]
	sub	r0, r0, r6
	clz	r0, r0
	lsr	r0, r0, #5
	bl	BUG_ON
	ldr	r3, .L30+40
	ldr	r0, [r3]
	sub	r0, r0, r6
	clz	r0, r0
	lsr	r0, r0, #5
	bl	BUG_ON
	ldr	r0, [r4, #16]
	ldr	r1, [r4, #20]
	mov	r3, r5
	str	r0, [sp, #4]
	str	r1, [sp]
	ldr	r2, [sp, #8]
	mov	r1, r6
	ldr	r0, [sp, #16]
	bl	ocfs2_dlm_lock
	subs	r5, r0, #0
	bne	.L29
	mov	r0, r4
	bl	user_wait_on_busy_lock
	b	.L5
.L7:
	ldr	r1, [r9]
	tst	r2, r1
	beq	.L10
	b	.L15
.L27:
	mov	r0, r10
	bl	spin_unlock
	mov	r0, r4
	bl	user_wait_on_busy_lock
	b	.L5
.L28:
	mov	r0, r10
	bl	spin_unlock
	mov	r0, r4
	bl	user_wait_on_blocked_lock
	b	.L5
.L26:
	ldr	r3, .L30+44
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L25:
	ldr	r1, .L30+48
	ldr	r0, [r1]
	ldr	r1, .L30+52
	bl	mlog
	ldr	r3, .L30+56
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
.L4:
	mov	r1, r6
	mov	r0, r4
	bl	user_dlm_inc_holders
	mov	r0, r10
	bl	spin_unlock
	mov	r0, r5
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L29:
	ldr	r3, .L30+60
	ldr	r2, [sp, #12]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L14
	ldr	r3, .L30+64
	ldr	r3, [r3]
	cmn	r5, r3
	beq	.L14
	mov	r2, r4
	mov	r1, r5
	ldr	r0, .L30+68
	bl	user_log_dlm_error
.L14:
	mov	r0, r4
	bl	user_recover_from_dlm_error
	mov	r0, r5
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r2, [r4, #16]
	ldr	r3, [r4, #20]
	b	.L3
.L31:
	.align	2
.L30:
	.word	DLM_LOCK_EX
	.word	DLM_LOCK_PR
	.word	ML_BASTS
	.word	.LC1
	.word	USER_LOCK_BUSY
	.word	DLM_LKF_VALBLK
	.word	DLM_LOCK_IV
	.word	USER_LOCK_BLOCKED
	.word	current
	.word	DLM_LKF_CONVERT
	.word	DLM_LOCK_NL
	.word	ERESTARTSYS
	.word	ML_ERROR
	.word	.LC0
	.word	EINVAL
	.word	DLM_LKF_NOQUEUE
	.word	EAGAIN
	.word	.LC2
	.size	user_dlm_cluster_lock, .-user_dlm_cluster_lock
	.comm	current,4,4
	.comm	USER_LOCK_BUSY,4,4
	.comm	USER_LOCK_BLOCKED,4,4
	.comm	ML_ERROR,4,4
	.comm	ML_BASTS,4,4
	.comm	ERESTARTSYS,4,4
	.comm	EINVAL,4,4
	.comm	EAGAIN,4,4
	.comm	DLM_LOCK_PR,4,4
	.comm	DLM_LOCK_NL,4,4
	.comm	DLM_LOCK_IV,4,4
	.comm	DLM_LOCK_EX,4,4
	.comm	DLM_LKF_VALBLK,4,4
	.comm	DLM_LKF_NOQUEUE,4,4
	.comm	DLM_LKF_CONVERT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
