	.file	"extr_bluecard_cs.c_bluecard_write_wakeup.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Unknown device"
	.text
	.p2align 4
	.type	bluecard_write_wakeup, @function
bluecard_write_wakeup:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	je	.L41
	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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	lea	rbp, 4[rdi]
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	mov	rsi, rbp
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rdi, QWORD PTR XMIT_SENDING_READY[rip]
	call	test_bit@PLT
	test	rax, rax
	jne	.L42
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L42:
	.cfi_restore_state
	mov	rdi, QWORD PTR XMIT_SENDING[rip]
	mov	rsi, rbp
	call	test_and_set_bit@PLT
	test	rax, rax
	je	.L5
	jmp	.L43
	.p2align 4,,10
	.p2align 3
.L47:
	mov	rdi, QWORD PTR XMIT_BUF_TWO_READY[rip]
	call	test_bit@PLT
	test	rax, rax
	je	.L10
	movzx	eax, BYTE PTR REG_COMMAND_TX_BUF_TWO[rip]
	mov	r15d, 16
	mov	BYTE PTR 23[rsp], al
	mov	rax, QWORD PTR XMIT_BUF_TWO_READY[rip]
	mov	QWORD PTR 24[rsp], rax
.L9:
	lea	r14, 16[rbx]
	mov	rdi, r14
	call	skb_dequeue@PLT
	mov	r12, rax
	test	rax, rax
	je	.L10
	mov	rdi, rax
	call	hci_skb_pkt_type@PLT
	mov	ecx, r13d
	mov	QWORD PTR 8[rsp], rcx
	test	al, -128
	jne	.L44
.L11:
	mov	rdi, rbx
	call	bluecard_enable_activity_led@PLT
	mov	edx, DWORD PTR 4[r12]
	mov	edi, r13d
	mov	esi, r15d
	mov	ecx, DWORD PTR [r12]
	call	bluecard_write@PLT
	movzx	edi, BYTE PTR 23[rsp]
	mov	rsi, QWORD PTR 8[rsp]
	add	rsi, QWORD PTR REG_COMMAND[rip]
	mov	r13d, eax
	call	outb_p@PLT
	mov	rdi, QWORD PTR 24[rsp]
	mov	rsi, rbp
	call	clear_bit@PLT
	mov	rdi, r12
	call	hci_skb_pkt_type@PLT
	test	al, -128
	jne	.L45
.L12:
	cmp	DWORD PTR [r12], r13d
	je	.L46
	mov	esi, r13d
	mov	rdi, r12
	call	skb_pull@PLT
	mov	rsi, r12
	mov	rdi, r14
	call	skb_queue_head@PLT
.L18:
	mov	rax, QWORD PTR 8[rbx]
	mov	rdi, QWORD PTR XMIT_BUFFER_NUMBER[rip]
	mov	rsi, rbp
	add	DWORD PTR [rax], r13d
	call	change_bit@PLT
	mov	rdi, QWORD PTR XMIT_WAKEUP[rip]
	mov	rsi, rbp
	call	test_bit@PLT
	test	rax, rax
	je	.L10
.L5:
	mov	rax, QWORD PTR 24[rbx]
	mov	rdi, QWORD PTR XMIT_WAKEUP[rip]
	mov	rsi, rbp
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	mov	r13d, DWORD PTR [rax]
	call	clear_bit@PLT
	mov	rdi, QWORD PTR 24[rbx]
	call	pcmcia_dev_present@PLT
	test	eax, eax
	je	.L1
	mov	rdi, QWORD PTR XMIT_BUFFER_NUMBER[rip]
	mov	rsi, rbp
	call	test_bit@PLT
	mov	rsi, rbp
	test	rax, rax
	jne	.L47
	mov	rdi, QWORD PTR XMIT_BUF_ONE_READY[rip]
	call	test_bit@PLT
	test	rax, rax
	je	.L10
	movzx	eax, BYTE PTR REG_COMMAND_TX_BUF_ONE[rip]
	xor	r15d, r15d
	mov	BYTE PTR 23[rsp], al
	mov	rax, QWORD PTR XMIT_BUF_ONE_READY[rip]
	mov	QWORD PTR 24[rsp], rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L46:
	mov	rdi, r12
	call	kfree_skb@PLT
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L45:
	mov	edi, DWORD PTR wq[rip]
	call	DECLARE_WAIT_QUEUE_HEAD_ONSTACK@PLT
	mov	edi, DWORD PTR wait[rip]
	call	DEFINE_WAIT@PLT
	mov	rdi, r12
	call	hci_skb_pkt_type@PLT
	cmp	eax, 130
	je	.L13
	movzx	r15d, BYTE PTR REG_CONTROL_BAUD_RATE_115200[rip]
	cmp	eax, 131
	je	.L16
	movzx	r15d, BYTE PTR REG_CONTROL_BAUD_RATE_460800[rip]
	movzx	edi, BYTE PTR REG_CONTROL_BAUD_RATE_57600[rip]
	cmp	eax, 129
	cmovne	r15d, edi
.L16:
	mov	edi, 100
	call	mdelay@PLT
	mov	eax, DWORD PTR [rbx]
	movzx	edi, r15b
	mov	rsi, QWORD PTR REG_CONTROL[rip]
	mov	r15, QWORD PTR 8[rsp]
	and	eax, -4
	or	edi, eax
	add	rsi, r15
	mov	DWORD PTR [rbx], edi
	call	outb@PLT
	mov	edi, DWORD PTR REG_CONTROL_RTS[rip]
	mov	rsi, QWORD PTR REG_CONTROL[rip]
	not	edi
	and	edi, DWORD PTR [rbx]
	add	rsi, r15
	mov	DWORD PTR [rbx], edi
	call	outb@PLT
	mov	edi, 1000
	call	mdelay@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L44:
	mov	edi, DWORD PTR [rbx]
	or	edi, DWORD PTR REG_CONTROL_RTS[rip]
	mov	esi, r13d
	mov	DWORD PTR [rbx], edi
	add	rsi, QWORD PTR REG_CONTROL[rip]
	call	outb@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L13:
	movzx	r15d, BYTE PTR REG_CONTROL_BAUD_RATE_230400[rip]
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, QWORD PTR XMIT_SENDING[rip]
	add	rsp, 40
	.cfi_def_cfa_offset 56
	mov	rsi, rbp
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_restore 15
	.cfi_def_cfa_offset 8
	jmp	clear_bit@PLT
	.p2align 4,,10
	.p2align 3
.L41:
	lea	rdi, .LC0[rip]
	jmp	BT_ERR@PLT
	.p2align 4,,10
	.p2align 3
.L43:
	.cfi_def_cfa_offset 96
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	mov	rdi, QWORD PTR XMIT_WAKEUP[rip]
	add	rsp, 40
	.cfi_def_cfa_offset 56
	mov	rsi, rbp
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_restore 15
	.cfi_def_cfa_offset 8
	jmp	set_bit@PLT
	.cfi_endproc
.LFE0:
	.size	bluecard_write_wakeup, .-bluecard_write_wakeup
	.comm	wq,4,4
	.comm	wait,4,4
	.comm	XMIT_WAKEUP,8,8
	.comm	XMIT_SENDING_READY,8,8
	.comm	XMIT_SENDING,8,8
	.comm	XMIT_BUF_TWO_READY,8,8
	.comm	XMIT_BUF_ONE_READY,8,8
	.comm	XMIT_BUFFER_NUMBER,8,8
	.comm	REG_CONTROL_RTS,4,4
	.comm	REG_CONTROL_BAUD_RATE_57600,1,1
	.comm	REG_CONTROL_BAUD_RATE_460800,1,1
	.comm	REG_CONTROL_BAUD_RATE_230400,1,1
	.comm	REG_CONTROL_BAUD_RATE_115200,1,1
	.comm	REG_CONTROL,8,8
	.comm	REG_COMMAND_TX_BUF_TWO,1,1
	.comm	REG_COMMAND_TX_BUF_ONE,1,1
	.comm	REG_COMMAND,8,8
	.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_bluecard_cs.c_bluecard_write_wakeup.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Unknown device\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bluecard_write_wakeup, %function
bluecard_write_wakeup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r5, r0, #0
	beq	.L41
	ldr	r3, .L48
	add	r6, r5, #4
	mov	r1, r6
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r3, .L48+4
	mov	r1, r6
	ldr	r0, [r3]
	bl	test_and_set_bit
	cmp	r0, #0
	beq	.L5
	b	.L42
.L46:
	ldr	r4, .L48+8
	ldr	r0, [r4]
	bl	test_bit
	cmp	r0, #0
	beq	.L8
	mov	r7, #16
	ldr	r3, .L48+12
	ldr	r10, [r4]
	ldrb	fp, [r3]	@ zero_extendqisi2
.L9:
	add	r9, r5, #12
	mov	r0, r9
	bl	skb_dequeue
	subs	r4, r0, #0
	beq	.L8
	bl	hci_skb_pkt_type
	tst	r0, #128
	bne	.L43
.L10:
	mov	r0, r5
	bl	bluecard_enable_activity_led
	ldr	r2, [r4, #4]
	mov	r1, r7
	ldr	r3, [r4]
	mov	r0, r8
	bl	bluecard_write
	ldr	r3, .L48+16
	mov	r7, r0
	ldr	r1, [r3]
	mov	r0, fp
	add	r1, r8, r1
	bl	outb_p
	mov	r1, r6
	mov	r0, r10
	bl	clear_bit
	mov	r0, r4
	bl	hci_skb_pkt_type
	tst	r0, #128
	bne	.L44
.L11:
	ldr	r3, [r4]
	cmp	r3, r7
	beq	.L45
	mov	r1, r7
	mov	r0, r4
	bl	skb_pull
	mov	r1, r4
	mov	r0, r9
	bl	skb_queue_head
.L17:
	ldr	r2, [r5, #8]
	mov	r1, r6
	ldr	r3, [r2]
	add	r7, r3, r7
	ldr	r3, .L48+20
	str	r7, [r2]
	ldr	r0, [r3]
	bl	change_bit
	ldr	r3, .L48+24
	mov	r1, r6
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	beq	.L8
.L5:
	ldr	r3, [r5, #16]
	ldr	r2, .L48+24
	ldr	r3, [r3]
	mov	r1, r6
	ldr	r3, [r3]
	ldr	r0, [r2]
	ldr	r8, [r3]
	bl	clear_bit
	ldr	r0, [r5, #16]
	bl	pcmcia_dev_present
	cmp	r0, #0
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r3, .L48+20
	mov	r1, r6
	ldr	r0, [r3]
	bl	test_bit
	subs	r7, r0, #0
	mov	r1, r6
	bne	.L46
	ldr	r4, .L48+28
	ldr	r0, [r4]
	bl	test_bit
	cmp	r0, #0
	beq	.L8
	ldr	r3, .L48+32
	ldr	r10, [r4]
	ldrb	fp, [r3]	@ zero_extendqisi2
	b	.L9
.L45:
	mov	r0, r4
	bl	kfree_skb
	b	.L17
.L44:
	ldr	r3, .L48+36
	ldr	r0, [r3]
	bl	DECLARE_WAIT_QUEUE_HEAD_ONSTACK
	ldr	r3, .L48+40
	ldr	r0, [r3]
	bl	DEFINE_WAIT
	mov	r0, r4
	bl	hci_skb_pkt_type
	cmp	r0, #130
	beq	.L12
	cmp	r0, #131
	beq	.L13
	cmp	r0, #129
	beq	.L47
	ldr	r3, .L48+44
	ldrb	fp, [r3]	@ zero_extendqisi2
.L15:
	mov	r0, #100
	bl	mdelay
	ldr	r10, .L48+48
	ldr	r0, [r5]
	ldr	r1, [r10]
	bic	r0, r0, #3
	orr	r0, r0, fp
	add	r1, r8, r1
	str	r0, [r5]
	bl	outb
	ldr	r3, .L48+52
	ldr	r0, [r5]
	ldr	r3, [r3]
	ldr	r1, [r10]
	bic	r0, r0, r3
	add	r1, r8, r1
	str	r0, [r5]
	bl	outb
	mov	r0, #1000
	bl	mdelay
	b	.L11
.L43:
	ldr	r3, .L48+52
	ldr	r2, .L48+48
	ldr	r0, [r5]
	ldr	r3, [r3]
	ldr	r1, [r2]
	orr	r0, r0, r3
	add	r1, r8, r1
	str	r0, [r5]
	bl	outb
	b	.L10
.L47:
	ldr	r3, .L48+56
	ldrb	fp, [r3]	@ zero_extendqisi2
	b	.L15
.L13:
	ldr	r3, .L48+60
	ldrb	fp, [r3]	@ zero_extendqisi2
	b	.L15
.L12:
	ldr	r3, .L48+64
	ldrb	fp, [r3]	@ zero_extendqisi2
	b	.L15
.L8:
	ldr	r3, .L48+4
	mov	r1, r6
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	clear_bit
.L41:
	ldr	r0, .L48+68
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	BT_ERR
.L42:
	ldr	r3, .L48+24
	mov	r1, r6
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	set_bit
.L49:
	.align	2
.L48:
	.word	XMIT_SENDING_READY
	.word	XMIT_SENDING
	.word	XMIT_BUF_TWO_READY
	.word	REG_COMMAND_TX_BUF_TWO
	.word	REG_COMMAND
	.word	XMIT_BUFFER_NUMBER
	.word	XMIT_WAKEUP
	.word	XMIT_BUF_ONE_READY
	.word	REG_COMMAND_TX_BUF_ONE
	.word	wq
	.word	wait
	.word	REG_CONTROL_BAUD_RATE_57600
	.word	REG_CONTROL
	.word	REG_CONTROL_RTS
	.word	REG_CONTROL_BAUD_RATE_460800
	.word	REG_CONTROL_BAUD_RATE_115200
	.word	REG_CONTROL_BAUD_RATE_230400
	.word	.LC0
	.size	bluecard_write_wakeup, .-bluecard_write_wakeup
	.comm	wq,4,4
	.comm	wait,4,4
	.comm	XMIT_WAKEUP,4,4
	.comm	XMIT_SENDING_READY,4,4
	.comm	XMIT_SENDING,4,4
	.comm	XMIT_BUF_TWO_READY,4,4
	.comm	XMIT_BUF_ONE_READY,4,4
	.comm	XMIT_BUFFER_NUMBER,4,4
	.comm	REG_CONTROL_RTS,4,4
	.comm	REG_CONTROL_BAUD_RATE_57600,1,1
	.comm	REG_CONTROL_BAUD_RATE_460800,1,1
	.comm	REG_CONTROL_BAUD_RATE_230400,1,1
	.comm	REG_CONTROL_BAUD_RATE_115200,1,1
	.comm	REG_CONTROL,4,4
	.comm	REG_COMMAND_TX_BUF_TWO,1,1
	.comm	REG_COMMAND_TX_BUF_ONE,1,1
	.comm	REG_COMMAND,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
