	.file	"extr_btmrvl_main.c_btmrvl_add_card.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Can not allocate priv"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Allocate buffer for btmrvl_adapter failed!"
	.section	.rodata.str1.1
.LC2:
	.string	"Can not allocate HCI device"
.LC3:
	.string	"Starting kthread..."
.LC4:
	.string	"btmrvl_main_service"
.LC5:
	.string	"Can not register HCI device"
	.text
	.p2align 4
	.globl	btmrvl_add_card
	.type	btmrvl_add_card, @function
btmrvl_add_card:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	edi, 56
	call	kzalloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L10
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 1
	call	kzalloc@PLT
	mov	QWORD PTR 48[r12], rax
	test	rax, rax
	je	.L11
	mov	rdi, r12
	call	btmrvl_init_adapter@PLT
	xor	eax, eax
	call	hci_alloc_dev@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L12
	lea	rdi, .LC3[rip]
	call	BT_DBG@PLT
	mov	QWORD PTR 8[r12], r12
	lea	rdi, 40[r12]
	call	spin_lock_init@PLT
	lea	rdi, 4[r12]
	call	init_waitqueue_head@PLT
	mov	edi, DWORD PTR btmrvl_service_main_thread[rip]
	lea	rdx, .LC4[rip]
	mov	rsi, r12
	call	kthread_run@PLT
	mov	QWORD PTR 32[r12], rbp
	mov	rdi, rbp
	mov	DWORD PTR [r12], eax
	mov	eax, DWORD PTR HCI_SDIO[rip]
	mov	QWORD PTR 24[r12], rbx
	mov	QWORD PTR 32[rbp], r12
	mov	DWORD PTR 16[r12], 1
	mov	DWORD PTR 28[rbp], eax
	mov	eax, DWORD PTR btmrvl_open[rip]
	mov	DWORD PTR 24[rbp], eax
	mov	eax, DWORD PTR btmrvl_close[rip]
	mov	DWORD PTR 20[rbp], eax
	mov	eax, DWORD PTR btmrvl_flush[rip]
	mov	DWORD PTR 16[rbp], eax
	mov	eax, DWORD PTR btmrvl_send_frame[rip]
	mov	DWORD PTR 12[rbp], eax
	mov	eax, DWORD PTR btmrvl_destruct[rip]
	mov	DWORD PTR 8[rbp], eax
	mov	eax, DWORD PTR btmrvl_ioctl[rip]
	mov	DWORD PTR 4[rbp], eax
	mov	eax, DWORD PTR THIS_MODULE[rip]
	mov	DWORD PTR 0[rbp], eax
	call	hci_register_dev@PLT
	test	eax, eax
	js	.L13
.L1:
	mov	rax, r12
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	call	BT_ERR@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	lea	rdi, .LC1[rip]
	call	BT_ERR@PLT
.L5:
	mov	rdi, r12
	xor	r12d, r12d
	call	kfree@PLT
	mov	rax, r12
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	lea	rdi, .LC2[rip]
	call	BT_ERR@PLT
.L7:
	mov	rdi, r12
	call	btmrvl_free_adapter@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L13:
	lea	rdi, .LC5[rip]
	call	BT_ERR@PLT
	mov	edi, DWORD PTR [r12]
	call	kthread_stop@PLT
	mov	rdi, rbp
	call	hci_free_dev@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	btmrvl_add_card, .-btmrvl_add_card
	.comm	btmrvl_service_main_thread,4,4
	.comm	btmrvl_send_frame,4,4
	.comm	btmrvl_open,4,4
	.comm	btmrvl_ioctl,4,4
	.comm	btmrvl_flush,4,4
	.comm	btmrvl_destruct,4,4
	.comm	btmrvl_close,4,4
	.comm	THIS_MODULE,4,4
	.comm	HCI_SDIO,4,4
	.comm	GFP_KERNEL,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_btmrvl_main.c_btmrvl_add_card.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Can not allocate priv\000"
	.align	2
.LC1:
	.ascii	"Allocate buffer for btmrvl_adapter failed!\000"
	.align	2
.LC2:
	.ascii	"Can not allocate HCI device\000"
	.align	2
.LC3:
	.ascii	"Starting kthread...\000"
	.align	2
.LC4:
	.ascii	"btmrvl_main_service\000"
	.align	2
.LC5:
	.ascii	"Can not register HCI device\000"
	.text
	.align	2
	.global	btmrvl_add_card
	.syntax unified
	.arm
	.fpu softvfp
	.type	btmrvl_add_card, %function
btmrvl_add_card:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r5, .L14
	mov	r6, r0
	ldr	r1, [r5]
	mov	r0, #32
	bl	kzalloc
	subs	r4, r0, #0
	beq	.L10
	mov	r0, #1
	ldr	r1, [r5]
	bl	kzalloc
	cmp	r0, #0
	str	r0, [r4, #28]
	beq	.L11
	mov	r0, r4
	bl	btmrvl_init_adapter
	bl	hci_alloc_dev
	subs	r5, r0, #0
	beq	.L12
	ldr	r0, .L14+4
	bl	BT_DBG
	str	r4, [r4, #8]
	add	r0, r4, #24
	bl	spin_lock_init
	add	r0, r4, #4
	bl	init_waitqueue_head
	ldr	r3, .L14+8
	mov	r1, r4
	ldr	r2, .L14+12
	ldr	r0, [r3]
	bl	kthread_run
	mov	r3, #1
	ldr	r1, .L14+16
	ldr	ip, .L14+20
	ldr	lr, [r1]
	ldr	r2, .L14+24
	ldr	r1, .L14+28
	str	r5, [r4, #20]
	str	r6, [r4, #16]
	ldr	r2, [r2]
	ldr	r7, [ip]
	str	r0, [r4]
	ldr	ip, [r1]
	str	r4, [r5, #32]
	ldr	r1, .L14+32
	str	r3, [r4, #12]
	ldr	r3, .L14+36
	ldr	r0, [r1]
	str	r2, [r5, #28]
	ldr	r1, .L14+40
	ldr	r2, [r3]
	ldr	r3, .L14+44
	ldr	r1, [r1]
	ldr	r3, [r3]
	str	r0, [r5, #12]
	str	r7, [r5, #24]
	mov	r0, r5
	str	lr, [r5, #20]
	str	ip, [r5, #16]
	str	r1, [r5, #8]
	str	r2, [r5, #4]
	str	r3, [r5]
	bl	hci_register_dev
	cmp	r0, #0
	blt	.L13
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	ldr	r0, .L14+48
	bl	BT_ERR
	b	.L1
.L11:
	ldr	r0, .L14+52
	bl	BT_ERR
.L5:
	mov	r0, r4
	mov	r4, #0
	bl	kfree
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r0, .L14+56
	bl	BT_ERR
.L7:
	mov	r0, r4
	bl	btmrvl_free_adapter
	b	.L5
.L13:
	ldr	r0, .L14+60
	bl	BT_ERR
	ldr	r0, [r4]
	bl	kthread_stop
	mov	r0, r5
	bl	hci_free_dev
	b	.L7
.L15:
	.align	2
.L14:
	.word	GFP_KERNEL
	.word	.LC3
	.word	btmrvl_service_main_thread
	.word	.LC4
	.word	btmrvl_close
	.word	btmrvl_open
	.word	HCI_SDIO
	.word	btmrvl_flush
	.word	btmrvl_send_frame
	.word	btmrvl_ioctl
	.word	btmrvl_destruct
	.word	THIS_MODULE
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC5
	.size	btmrvl_add_card, .-btmrvl_add_card
	.comm	btmrvl_service_main_thread,4,4
	.comm	btmrvl_send_frame,4,4
	.comm	btmrvl_open,4,4
	.comm	btmrvl_ioctl,4,4
	.comm	btmrvl_flush,4,4
	.comm	btmrvl_destruct,4,4
	.comm	btmrvl_close,4,4
	.comm	THIS_MODULE,4,4
	.comm	HCI_SDIO,4,4
	.comm	GFP_KERNEL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
