	.file	"extr_winbond-cir.c_wbcir_txmask.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	wbcir_txmask, @function
wbcir_txmask:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, 4
	cmp	esi, 15
	jg	.L15
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	cmp	esi, 4
	je	.L9
	jg	.L4
	cmp	esi, 1
	je	.L10
	cmp	esi, 2
	jne	.L5
	mov	r12d, 1
.L3:
	mov	rbp, QWORD PTR [rdi]
	xor	esi, esi
	lea	r13, 12[rbp]
	mov	rdi, r13
	call	spin_lock_irqsave@PLT
	mov	rax, QWORD PTR WBCIR_TXSTATE_INACTIVE[rip]
	cmp	QWORD PTR 0[rbp], rax
	jne	.L19
	cmp	DWORD PTR 8[rbp], ebx
	je	.L7
	mov	rdi, QWORD PTR WBCIR_REG_ECEIR_CTS[rip]
	mov	edx, 12
	add	rdi, QWORD PTR 16[rbp]
	mov	esi, r12d
	call	wbcir_set_bits@PLT
	mov	DWORD PTR 8[rbp], ebx
.L7:
	mov	rdi, r13
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	r12d, 3
	cmp	esi, 8
	je	.L3
.L5:
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	xor	r12d, r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, r13
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	mov	eax, DWORD PTR EBUSY[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -40
	.cfi_offset 6, -32
	.cfi_offset 12, -24
	.cfi_offset 13, -16
	mov	r12d, 2
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	wbcir_txmask, .-wbcir_txmask
	.comm	WBCIR_TXSTATE_INACTIVE,8,8
	.comm	WBCIR_REG_ECEIR_CTS,8,8
	.comm	EINVAL,4,4
	.comm	EBUSY,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_winbond-cir.c_wbcir_txmask.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wbcir_txmask, %function
wbcir_txmask:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #15
	bgt	.L11
	sub	r3, r1, #1
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	cmp	r3, #7
	ldrls	pc, [pc, r3, asl #2]
	b	.L3
.L5:
	.word	.L8
	.word	.L7
	.word	.L3
	.word	.L12
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L4
.L12:
	mov	r6, #2
.L6:
	ldr	r5, [r0]
	mov	r1, #0
	add	r7, r5, #8
	mov	r0, r7
	bl	spin_lock_irqsave
	ldr	r3, .L19
	ldr	r2, [r5]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L18
	ldr	r3, [r5, #4]
	cmp	r3, r4
	beq	.L10
	ldr	r3, .L19+4
	ldr	r0, [r5, #12]
	ldr	r3, [r3]
	mov	r1, r6
	mov	r2, #12
	add	r0, r0, r3
	bl	wbcir_set_bits
	str	r4, [r5, #4]
.L10:
	mov	r0, r7
	mov	r1, #0
	bl	spin_unlock_irqrestore
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	mov	r6, #1
	b	.L6
.L18:
	mov	r0, r7
	mov	r1, #0
	bl	spin_unlock_irqrestore
	ldr	r3, .L19+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	mov	r0, #4
	bx	lr
.L4:
	mov	r6, #3
	b	.L6
.L3:
	ldr	r3, .L19+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	mov	r6, #0
	b	.L6
.L20:
	.align	2
.L19:
	.word	WBCIR_TXSTATE_INACTIVE
	.word	WBCIR_REG_ECEIR_CTS
	.word	EBUSY
	.word	EINVAL
	.size	wbcir_txmask, .-wbcir_txmask
	.comm	WBCIR_TXSTATE_INACTIVE,4,4
	.comm	WBCIR_REG_ECEIR_CTS,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
