	.file	"extr_device.c_add_client_context.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	add_client_context, @function
add_client_context:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	eax, DWORD PTR 12[rdi]
	test	eax, eax
	jne	.L2
	mov	r12d, DWORD PTR 20[rsi]
	test	r12d, r12d
	je	.L1
.L2:
	mov	rdi, rbp
	call	down_write@PLT
	lea	rdi, 16[r13]
	call	refcount_inc_not_zero@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L19
.L4:
	mov	rdi, rbp
	call	up_write@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	lea	rdi, 8[rbp]
	lea	r14, 4[rbp]
	xor	r12d, r12d
	call	refcount_inc@PLT
	mov	edx, DWORD PTR CLIENT_DATA_REGISTERED[rip]
	mov	esi, DWORD PTR 0[r13]
	mov	rdi, r14
	call	xa_get_mark@PLT
	test	rax, rax
	je	.L20
.L5:
	mov	rdi, rbp
	call	ib_device_put@PLT
	mov	rdi, r13
	call	ib_client_put@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L20:
	mov	ecx, DWORD PTR GFP_KERNEL[rip]
	mov	esi, DWORD PTR 0[r13]
	xor	edx, edx
	mov	rdi, r14
	call	xa_store@PLT
	mov	edi, eax
	call	xa_err@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L5
	mov	rdi, rbp
	call	downgrade_write@PLT
	mov	rax, QWORD PTR 8[r13]
	test	rax, rax
	je	.L6
	mov	rdi, rbp
	call	rax
.L6:
	mov	edx, DWORD PTR CLIENT_DATA_REGISTERED[rip]
	mov	esi, DWORD PTR 0[r13]
	mov	rdi, r14
	call	xa_set_mark@PLT
	mov	rdi, rbp
	call	up_read@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	add_client_context, .-add_client_context
	.comm	GFP_KERNEL,4,4
	.comm	CLIENT_DATA_REGISTERED,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_device.c_add_client_context.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_client_context, %function
add_client_context:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #12]
	push	{r4, r5, r6, r7, r8, lr}
	cmp	r3, #0
	mov	r4, r0
	mov	r6, r1
	bne	.L2
	ldr	r5, [r1, #12]
	cmp	r5, #0
	beq	.L1
.L2:
	mov	r0, r4
	bl	down_write
	add	r0, r6, #8
	bl	refcount_inc_not_zero
	subs	r5, r0, #0
	bne	.L19
.L4:
	mov	r0, r4
	bl	up_write
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L19:
	ldr	r8, .L21
	add	r0, r4, #8
	add	r7, r4, #4
	bl	refcount_inc
	ldr	r2, [r8]
	mov	r0, r7
	ldr	r1, [r6]
	bl	xa_get_mark
	subs	r2, r0, #0
	movne	r5, #0
	beq	.L20
.L5:
	mov	r0, r4
	bl	ib_device_put
	mov	r0, r6
	bl	ib_client_put
	b	.L4
.L20:
	ldr	r3, .L21+4
	ldr	r1, [r6]
	ldr	r3, [r3]
	mov	r0, r7
	bl	xa_store
	bl	xa_err
	subs	r5, r0, #0
	bne	.L5
	mov	r0, r4
	bl	downgrade_write
	ldr	r3, [r6, #4]
	cmp	r3, #0
	beq	.L6
	mov	r0, r4
	blx	r3
.L6:
	mov	r0, r7
	ldr	r2, [r8]
	ldr	r1, [r6]
	bl	xa_set_mark
	mov	r0, r4
	bl	up_read
	b	.L1
.L22:
	.align	2
.L21:
	.word	CLIENT_DATA_REGISTERED
	.word	GFP_KERNEL
	.size	add_client_context, .-add_client_context
	.comm	GFP_KERNEL,4,4
	.comm	CLIENT_DATA_REGISTERED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
