	.file	"extr_hp_sdc.c_hp_sdc_take.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	hp_sdc_take, @function
hp_sdc_take:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, edi
	lea	rdi, hp_sdc[rip+20]
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	read_lock@PLT
	mov	rdx, QWORD PTR hp_sdc[rip]
	mov	rax, QWORD PTR hp_sdc[rip+32]
	lea	rdi, hp_sdc[rip+20]
	mov	rbx, QWORD PTR [rax+rdx*8]
	call	read_unlock@PLT
	mov	rax, QWORD PTR 8[rbx]
	mov	rdx, QWORD PTR [rbx]
	lea	rcx, 2[rax]
	mov	DWORD PTR [rdx+rax*4], r12d
	mov	QWORD PTR 8[rbx], rcx
	mov	DWORD PTR 4[rdx+rax*4], r13d
	xor	eax, eax
	sub	QWORD PTR hp_sdc[rip+8], 2
	call	ktime_get@PLT
	cmp	QWORD PTR hp_sdc[rip+8], 0
	mov	DWORD PTR hp_sdc[rip+24], eax
	jle	.L19
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
	mov	rdx, QWORD PTR 16[rbx]
	mov	rax, QWORD PTR [rbx]
	mov	eax, DWORD PTR [rax+rdx*4]
	test	DWORD PTR HP_SDC_ACT_SEMAPHORE[rip], eax
	je	.L3
	mov	rdi, QWORD PTR 32[rbx]
	test	rdi, rdi
	jne	.L20
.L3:
	test	DWORD PTR HP_SDC_ACT_CALLBACK[rip], eax
	je	.L4
	mov	rax, QWORD PTR 24[rbx]
	test	rax, rax
	je	.L4
	mov	rcx, r13
	mov	rdx, r12
	mov	rsi, r14
	mov	edi, ebp
	call	rax
.L4:
	mov	rax, QWORD PTR 8[rbx]
	lea	rdi, hp_sdc[rip+20]
	mov	QWORD PTR 16[rbx], rax
	add	rax, 1
	mov	QWORD PTR 8[rbx], rax
	call	write_lock@PLT
	lea	rdi, hp_sdc[rip+20]
	mov	QWORD PTR hp_sdc[rip], -1
	mov	QWORD PTR hp_sdc[rip+8], 0
	call	write_unlock@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	lea	rdi, hp_sdc[rip+16]
	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
	jmp	tasklet_schedule@PLT
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	call	up@PLT
	mov	rdx, QWORD PTR 16[rbx]
	mov	rax, QWORD PTR [rbx]
	mov	eax, DWORD PTR [rax+rdx*4]
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	hp_sdc_take, .-hp_sdc_take
	.comm	hp_sdc,40,32
	.comm	HP_SDC_ACT_SEMAPHORE,4,4
	.comm	HP_SDC_ACT_CALLBACK,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_hp_sdc.c_hp_sdc_take.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hp_sdc_take, %function
hp_sdc_take:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r2
	mov	r8, r3
	ldr	r6, .L20
	mov	r9, r0
	sub	r5, r6, #12
	mov	r0, r6
	mov	r10, r1
	bl	read_lock
	ldr	r3, [r5, #20]
	ldr	r2, [r6, #-12]
	mov	r0, r6
	ldr	r4, [r3, r2, lsl #2]
	bl	read_unlock
	ldr	r2, [r4, #4]
	ldr	ip, [r4]
	ldr	r3, [r5, #4]
	add	r1, r2, #2
	str	r7, [ip, r2, lsl #2]
	add	ip, ip, r2, lsl #2
	str	r1, [r4, #4]
	sub	r3, r3, #2
	str	r8, [ip, #4]
	str	r3, [r5, #4]
	bl	ktime_get
	ldr	r3, [r5, #4]
	str	r0, [r5, #16]
	cmp	r3, #0
	popgt	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r1, [r4, #8]
	ldr	r3, [r4]
	ldr	r2, .L20+4
	ldr	r3, [r3, r1, lsl #2]
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L3
	ldr	r0, [r4, #16]
	cmp	r0, #0
	bne	.L19
.L3:
	ldr	r2, .L20+8
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L4
	ldr	fp, [r4, #12]
	cmp	fp, #0
	beq	.L4
	mov	r3, r8
	mov	r2, r7
	mov	r1, r10
	mov	r0, r9
	blx	fp
.L4:
	ldr	r3, [r4, #4]
	ldr	r0, .L20
	add	r2, r3, #1
	stmib	r4, {r2, r3}
	bl	write_lock
	mov	r3, #0
	mvn	r2, #0
	ldr	r0, .L20
	str	r2, [r6, #-12]
	str	r3, [r5, #4]
	bl	write_unlock
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r0, .L20+12
	b	tasklet_schedule
.L19:
	bl	up
	ldr	r2, [r4, #8]
	ldr	r3, [r4]
	ldr	r3, [r3, r2, lsl #2]
	b	.L3
.L21:
	.align	2
.L20:
	.word	hp_sdc+12
	.word	HP_SDC_ACT_SEMAPHORE
	.word	HP_SDC_ACT_CALLBACK
	.word	hp_sdc+8
	.size	hp_sdc_take, .-hp_sdc_take
	.comm	hp_sdc,24,4
	.comm	HP_SDC_ACT_SEMAPHORE,4,4
	.comm	HP_SDC_ACT_CALLBACK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
