	.file	"extr_btmrvl_main.c_btmrvl_service_main_thread.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"main_thread: break from main thread"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"main_thread is sleeping..."
.LC2:
	.string	"main_thread woke up"
	.text
	.p2align 4
	.type	btmrvl_service_main_thread, @function
btmrvl_service_main_thread:
.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	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rbx, QWORD PTR 8[rdi]
	mov	esi, DWORD PTR current[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	r13, 4[rsp]
	mov	rbp, QWORD PTR 16[rbx]
	mov	rdi, r13
	call	init_waitqueue_entry@PLT
	lea	r14, 8[rbp]
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rsi, r13
	mov	rdi, r12
	call	add_wait_queue@PLT
	mov	edi, DWORD PTR TASK_INTERRUPTIBLE[rip]
	call	set_current_state@PLT
	xor	eax, eax
	call	kthread_should_stop@PLT
	test	rax, rax
	jne	.L4
	cmp	QWORD PTR 48[rbx], 0
	jne	.L4
	cmp	QWORD PTR 24[rbp], 0
	jne	.L8
	cmp	QWORD PTR 32[rbp], 0
	jne	.L6
	mov	edx, DWORD PTR 8[rbx]
	test	edx, edx
	jne	.L24
.L8:
	lea	rdi, .LC1[rip]
	call	BT_DBG@PLT
	xor	eax, eax
	call	schedule@PLT
.L6:
	mov	edi, DWORD PTR TASK_RUNNING[rip]
	call	set_current_state@PLT
	mov	rsi, r13
	mov	rdi, r12
	call	remove_wait_queue@PLT
	lea	rdi, .LC2[rip]
	call	BT_DBG@PLT
	xor	eax, eax
	call	kthread_should_stop@PLT
	test	rax, rax
	jne	.L4
	cmp	QWORD PTR 48[rbx], 0
	jne	.L4
	lea	r15, 24[rbx]
	xor	esi, esi
	mov	rdi, r15
	call	spin_lock_irqsave@PLT
	cmp	QWORD PTR 32[rbp], 0
	jne	.L25
	mov	rax, QWORD PTR PS_SLEEP[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L26
.L12:
	xor	esi, esi
	mov	rdi, r15
	call	spin_unlock_irqrestore@PLT
.L11:
	mov	rax, QWORD PTR PS_SLEEP[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L2
	mov	eax, DWORD PTR 8[rbx]
	test	eax, eax
	je	.L2
	mov	rax, QWORD PTR 16[rbx]
	cmp	QWORD PTR 16[rax], 0
	jne	.L2
	mov	rdi, r14
	call	skb_dequeue@PLT
	mov	r15, rax
	test	rax, rax
	je	.L2
	mov	rsi, rax
	mov	rdi, rbx
	call	btmrvl_tx_pkt@PLT
	test	rax, rax
	mov	rax, QWORD PTR [rbx]
	je	.L15
	add	DWORD PTR 4[rax], 1
.L16:
	mov	rdi, r15
	call	kfree_skb@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L25:
	mov	QWORD PTR 32[rbp], 0
	mov	rdi, r15
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	mov	rdi, rbx
	call	[QWORD PTR 40[rbx]]
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rdi, r14
	call	skb_queue_empty@PLT
	test	rax, rax
	jne	.L12
	mov	rdi, r15
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	add	QWORD PTR 24[rbp], 1
	mov	rdi, rbx
	call	[QWORD PTR 32[rbx]]
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	lea	rdi, .LC0[rip]
	call	BT_DBG@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L24:
	.cfi_restore_state
	mov	rdi, r14
	call	skb_queue_empty@PLT
	test	rax, rax
	jne	.L8
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdx, QWORD PTR [r15]
	add	DWORD PTR [rax], edx
	jmp	.L16
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	btmrvl_service_main_thread, .-btmrvl_service_main_thread
	.comm	current,4,4
	.comm	TASK_RUNNING,4,4
	.comm	TASK_INTERRUPTIBLE,4,4
	.comm	PS_SLEEP,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_btmrvl_main.c_btmrvl_service_main_thread.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"main_thread: break from main thread\000"
	.align	2
.LC1:
	.ascii	"main_thread is sleeping...\000"
	.align	2
.LC2:
	.ascii	"main_thread woke up\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	btmrvl_service_main_thread, %function
btmrvl_service_main_thread:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L34
	ldr	r4, [r0, #4]
	sub	sp, sp, #20
	ldr	r1, [r3]
	ldr	r5, [r4, #8]
	ldr	r3, .L34+4
	mov	r6, r0
	add	r0, sp, #8
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	fp, .L34+8
	bl	init_waitqueue_entry
	ldr	r10, .L34+12
	add	r3, r5, #4
	ldr	r8, .L34+16
	str	r3, [sp, #4]
	add	r7, r4, #12
.L2:
	add	r1, sp, #8
	mov	r0, r6
	bl	add_wait_queue
	ldr	r3, .L34+20
	ldr	r0, [r3]
	bl	set_current_state
	bl	kthread_should_stop
	cmp	r0, #0
	bne	.L4
	ldr	r3, [r4, #24]
	cmp	r3, #0
	bne	.L4
	ldr	r3, [r5, #12]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [r5, #16]
	cmp	r3, #0
	bne	.L6
	ldr	r3, [r4, #4]
	cmp	r3, #0
	bne	.L30
.L8:
	mov	r0, fp
	bl	BT_DBG
	bl	schedule
.L6:
	ldr	r3, .L34+24
	ldr	r0, [r3]
	bl	set_current_state
	add	r1, sp, #8
	mov	r0, r6
	bl	remove_wait_queue
	mov	r0, r10
	bl	BT_DBG
	bl	kthread_should_stop
	cmp	r0, #0
	bne	.L4
	ldr	r9, [r4, #24]
	cmp	r9, #0
	bne	.L4
	mov	r1, #0
	mov	r0, r7
	bl	spin_lock_irqsave
	ldr	r3, [r5, #16]
	cmp	r3, #0
	bne	.L31
	ldr	r2, [r5]
	ldr	r3, [r8]
	cmp	r2, r3
	beq	.L32
.L12:
	mov	r1, #0
	mov	r0, r7
	bl	spin_unlock_irqrestore
.L11:
	ldr	r2, [r5]
	ldr	r3, [r8]
	cmp	r2, r3
	beq	.L2
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [r4, #8]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L2
	ldr	r0, [sp, #4]
	bl	skb_dequeue
	subs	r9, r0, #0
	beq	.L2
	mov	r1, r9
	mov	r0, r4
	bl	btmrvl_tx_pkt
	ldr	r2, [r4]
	cmp	r0, #0
	ldrne	r3, [r2, #4]
	ldreq	r1, [r9]
	ldreq	r3, [r2]
	addne	r3, r3, #1
	addeq	r3, r3, r1
	mov	r0, r9
	strne	r3, [r2, #4]
	streq	r3, [r2]
	bl	kfree_skb
	b	.L2
.L31:
	mov	r1, #0
	mov	r0, r7
	str	r9, [r5, #16]
	bl	spin_unlock_irqrestore
	mov	r0, r4
	ldr	r3, [r4, #20]
	blx	r3
	b	.L11
.L32:
	ldr	r0, [sp, #4]
	bl	skb_queue_empty
	cmp	r0, #0
	bne	.L12
	mov	r1, #0
	mov	r0, r7
	bl	spin_unlock_irqrestore
	ldr	r3, [r5, #12]
	ldr	r2, [r4, #16]
	add	r3, r3, #1
	mov	r0, r4
	str	r3, [r5, #12]
	blx	r2
	b	.L2
.L4:
	ldr	r0, .L34+28
	bl	BT_DBG
	ldr	r3, .L34+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L33
	mov	r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L30:
	ldr	r0, [sp, #4]
	bl	skb_queue_empty
	cmp	r0, #0
	bne	.L8
	b	.L6
.L33:
	bl	__stack_chk_fail
.L35:
	.align	2
.L34:
	.word	current
	.word	.LC3
	.word	.LC1
	.word	.LC2
	.word	PS_SLEEP
	.word	TASK_INTERRUPTIBLE
	.word	TASK_RUNNING
	.word	.LC0
	.size	btmrvl_service_main_thread, .-btmrvl_service_main_thread
	.comm	current,4,4
	.comm	TASK_RUNNING,4,4
	.comm	TASK_INTERRUPTIBLE,4,4
	.comm	PS_SLEEP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
