	.file	"extr_hci_core.c_hci_register_dev.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"hci%d"
.LC1:
	.string	"%p name %s bus %d"
.LC2:
	.string	"%s"
	.text
	.p2align 4
	.globl	hci_register_dev
	.type	hci_register_dev, @function
hci_register_dev:
.LFB0:
	.cfi_startproc
	endbr64
	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
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	ecx, DWORD PTR 72[rdi]
	test	ecx, ecx
	je	.L31
	mov	edx, DWORD PTR 68[rdi]
	mov	rbx, rdi
	test	edx, edx
	je	.L31
	mov	eax, DWORD PTR 64[rdi]
	test	eax, eax
	je	.L31
	mov	eax, DWORD PTR [rdi]
	cmp	eax, 128
	je	.L5
	cmp	eax, 129
	jne	.L31
	mov	ecx, DWORD PTR GFP_KERNEL[rip]
	xor	edx, edx
	mov	esi, 1
	lea	rdi, hci_index_ida[rip]
	call	ida_simple_get@PLT
	mov	r12d, eax
.L8:
	test	r12d, r12d
	js	.L1
	mov	edi, DWORD PTR 52[rbx]
	mov	edx, r12d
	lea	rsi, .LC0[rip]
	call	sprintf@PLT
	mov	DWORD PTR 4[rbx], r12d
	mov	ecx, DWORD PTR 60[rbx]
	mov	rsi, rbx
	mov	edx, DWORD PTR 52[rbx]
	lea	rdi, .LC1[rip]
	call	BT_DBG@PLT
	mov	edx, DWORD PTR 52[rbx]
	mov	esi, DWORD PTR WQ_HIGHPRI[rip]
	lea	rdi, .LC2[rip]
	call	alloc_ordered_workqueue@PLT
	mov	QWORD PTR 16[rbx], rax
	test	rax, rax
	je	.L33
	mov	edx, DWORD PTR 52[rbx]
	mov	esi, DWORD PTR WQ_HIGHPRI[rip]
	lea	rdi, .LC2[rip]
	call	alloc_ordered_workqueue@PLT
	mov	QWORD PTR 8[rbx], rax
	test	rax, rax
	je	.L35
	mov	edi, DWORD PTR bt_debugfs[rip]
	call	IS_ERR_OR_NULL@PLT
	test	eax, eax
	je	.L36
.L12:
	mov	edx, DWORD PTR 52[rbx]
	lea	r13, 48[rbx]
	lea	rsi, .LC2[rip]
	mov	rdi, r13
	call	dev_set_name@PLT
	mov	rdi, r13
	call	device_add@PLT
	mov	ebp, eax
	test	eax, eax
	js	.L37
	mov	rdi, rbx
	call	hci_leds_init@PLT
	mov	edi, DWORD PTR 52[rbx]
	mov	r8, rbx
	mov	rsi, r13
	mov	edx, DWORD PTR RFKILL_TYPE_BLUETOOTH[rip]
	lea	rcx, hci_rfkill_ops[rip]
	call	rfkill_alloc@PLT
	mov	QWORD PTR 40[rbx], rax
	mov	rdi, rax
	test	rax, rax
	je	.L18
	call	rfkill_register@PLT
	mov	rdi, QWORD PTR 40[rbx]
	test	rax, rax
	js	.L38
	test	rdi, rdi
	je	.L18
	call	rfkill_blocked@PLT
	test	rax, rax
	jne	.L39
.L18:
	mov	esi, DWORD PTR HCI_SETUP[rip]
	mov	rdi, rbx
	call	hci_dev_set_flag@PLT
	mov	esi, DWORD PTR HCI_AUTO_OFF[rip]
	mov	rdi, rbx
	call	hci_dev_set_flag@PLT
	cmp	DWORD PTR [rbx], 128
	je	.L40
.L16:
	lea	rdi, hci_dev_list_lock[rip]
	call	write_lock@PLT
	lea	rsi, hci_dev_list[rip]
	lea	rdi, 32[rbx]
	call	list_add@PLT
	lea	rdi, hci_dev_list_lock[rip]
	call	write_unlock@PLT
	mov	edi, DWORD PTR HCI_QUIRK_RAW_DEVICE[rip]
	lea	rsi, 28[rbx]
	call	test_bit@PLT
	test	rax, rax
	jne	.L41
.L17:
	mov	esi, DWORD PTR HCI_DEV_REG[rip]
	mov	rdi, rbx
	call	hci_sock_dev_event@PLT
	mov	rdi, rbx
	call	hci_dev_hold@PLT
	mov	rdi, QWORD PTR 8[rbx]
	lea	rsi, 24[rbx]
	call	queue_work@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L31:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L5:
	.cfi_restore_state
	mov	ecx, DWORD PTR GFP_KERNEL[rip]
	xor	edx, edx
	xor	esi, esi
	lea	rdi, hci_index_ida[rip]
	call	ida_simple_get@PLT
	mov	r12d, eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L36:
	mov	edi, DWORD PTR 52[rbx]
	mov	esi, DWORD PTR bt_debugfs[rip]
	call	debugfs_create_dir@PLT
	mov	DWORD PTR 56[rbx], eax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L37:
	mov	rdi, QWORD PTR 16[rbx]
	mov	r12d, ebp
	call	destroy_workqueue@PLT
	mov	rdi, QWORD PTR 8[rbx]
	call	destroy_workqueue@PLT
.L10:
	mov	esi, DWORD PTR 4[rbx]
	lea	rdi, hci_index_ida[rip]
	call	ida_simple_remove@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L35:
	mov	rdi, QWORD PTR 16[rbx]
	call	destroy_workqueue@PLT
.L33:
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L41:
	mov	esi, DWORD PTR HCI_UNCONFIGURED[rip]
	mov	rdi, rbx
	call	hci_dev_set_flag@PLT
	jmp	.L17
.L40:
	mov	esi, DWORD PTR HCI_BREDR_ENABLED[rip]
	mov	rdi, rbx
	call	hci_dev_set_flag@PLT
	jmp	.L16
.L39:
	mov	esi, DWORD PTR HCI_RFKILLED[rip]
	mov	rdi, rbx
	call	hci_dev_set_flag@PLT
	jmp	.L18
.L38:
	call	rfkill_destroy@PLT
	mov	QWORD PTR 40[rbx], 0
	jmp	.L18
	.cfi_endproc
.LFE0:
	.size	hci_register_dev, .-hci_register_dev
	.comm	hci_rfkill_ops,4,4
	.comm	hci_index_ida,4,4
	.comm	hci_dev_list_lock,4,4
	.comm	hci_dev_list,4,4
	.comm	bt_debugfs,4,4
	.comm	WQ_HIGHPRI,4,4
	.comm	RFKILL_TYPE_BLUETOOTH,4,4
	.comm	HCI_UNCONFIGURED,4,4
	.comm	HCI_SETUP,4,4
	.comm	HCI_RFKILLED,4,4
	.comm	HCI_QUIRK_RAW_DEVICE,4,4
	.comm	HCI_DEV_REG,4,4
	.comm	HCI_BREDR_ENABLED,4,4
	.comm	HCI_AUTO_OFF,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,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_hci_core.c_hci_register_dev.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"hci%d\000"
	.align	2
.LC1:
	.ascii	"%p name %s bus %d\000"
	.align	2
.LC2:
	.ascii	"%s\000"
	.text
	.align	2
	.global	hci_register_dev
	.syntax unified
	.arm
	.fpu softvfp
	.type	hci_register_dev, %function
hci_register_dev:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, [r0, #56]
	sub	sp, sp, #12
	cmp	r3, #0
	beq	.L37
	ldr	r3, [r0, #52]
	mov	r4, r0
	cmp	r3, #0
	beq	.L37
	ldr	r3, [r0, #48]
	cmp	r3, #0
	beq	.L37
	ldr	r3, [r0]
	cmp	r3, #128
	beq	.L5
	cmp	r3, #129
	bne	.L37
	ldr	r3, .L48
	mov	r2, #0
	mov	r1, #1
	ldr	r3, [r3]
	ldr	r0, .L48+4
	bl	ida_simple_get
	mov	r5, r0
.L8:
	cmp	r5, #0
	blt	.L1
	mov	r2, r5
	ldr	r1, .L48+8
	ldr	r0, [r4, #36]
	ldr	r6, .L48+12
	bl	sprintf
	mov	r1, r4
	ldr	r3, [r4, #44]
	ldr	r2, [r4, #36]
	ldr	r0, .L48+16
	str	r5, [r4, #4]
	bl	BT_DBG
	ldr	r1, [r6]
	ldr	r2, [r4, #36]
	ldr	r0, .L48+20
	bl	alloc_ordered_workqueue
	cmp	r0, #0
	str	r0, [r4, #12]
	beq	.L39
	ldr	r1, [r6]
	ldr	r2, [r4, #36]
	ldr	r0, .L48+20
	bl	alloc_ordered_workqueue
	cmp	r0, #0
	str	r0, [r4, #8]
	beq	.L41
	ldr	r6, .L48+24
	ldr	r0, [r6]
	bl	IS_ERR_OR_NULL
	cmp	r0, #0
	beq	.L42
.L12:
	add	r7, r4, #32
	ldr	r2, [r4, #36]
	ldr	r1, .L48+20
	mov	r0, r7
	bl	dev_set_name
	mov	r0, r7
	bl	device_add
	subs	r6, r0, #0
	blt	.L43
	mov	r0, r4
	bl	hci_leds_init
	ldr	r3, .L48+28
	str	r4, [sp]
	ldr	r2, [r3]
	mov	r1, r7
	ldr	r3, .L48+32
	ldr	r0, [r4, #36]
	bl	rfkill_alloc
	cmp	r0, #0
	str	r0, [r4, #28]
	beq	.L18
	bl	rfkill_register
	cmp	r0, #0
	ldr	r0, [r4, #28]
	blt	.L44
	cmp	r0, #0
	beq	.L18
	bl	rfkill_blocked
	cmp	r0, #0
	bne	.L45
.L18:
	ldr	r3, .L48+36
	mov	r0, r4
	ldr	r1, [r3]
	bl	hci_dev_set_flag
	ldr	r3, .L48+40
	mov	r0, r4
	ldr	r1, [r3]
	bl	hci_dev_set_flag
	ldr	r3, [r4]
	cmp	r3, #128
	beq	.L46
.L16:
	ldr	r0, .L48+44
	bl	write_lock
	ldr	r1, .L48+48
	add	r0, r4, #24
	bl	list_add
	ldr	r0, .L48+44
	bl	write_unlock
	ldr	r3, .L48+52
	add	r1, r4, #20
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	bne	.L47
.L17:
	ldr	r3, .L48+56
	mov	r0, r4
	ldr	r1, [r3]
	bl	hci_sock_dev_event
	mov	r0, r4
	bl	hci_dev_hold
	ldr	r0, [r4, #8]
	add	r1, r4, #16
	bl	queue_work
	b	.L1
.L37:
	ldr	r3, .L48+60
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L1:
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L5:
	mov	r2, #0
	ldr	r3, .L48
	mov	r1, r2
	ldr	r3, [r3]
	ldr	r0, .L48+4
	bl	ida_simple_get
	mov	r5, r0
	b	.L8
.L42:
	ldr	r1, [r6]
	ldr	r0, [r4, #36]
	bl	debugfs_create_dir
	str	r0, [r4, #40]
	b	.L12
.L43:
	ldr	r0, [r4, #12]
	bl	destroy_workqueue
	ldr	r0, [r4, #8]
	mov	r5, r6
	bl	destroy_workqueue
.L10:
	ldr	r1, [r4, #4]
	ldr	r0, .L48+4
	bl	ida_simple_remove
	b	.L1
.L41:
	ldr	r0, [r4, #12]
	bl	destroy_workqueue
.L39:
	ldr	r3, .L48+64
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L10
.L47:
	ldr	r3, .L48+68
	mov	r0, r4
	ldr	r1, [r3]
	bl	hci_dev_set_flag
	b	.L17
.L46:
	ldr	r3, .L48+72
	mov	r0, r4
	ldr	r1, [r3]
	bl	hci_dev_set_flag
	b	.L16
.L45:
	ldr	r3, .L48+76
	mov	r0, r4
	ldr	r1, [r3]
	bl	hci_dev_set_flag
	b	.L18
.L44:
	bl	rfkill_destroy
	mov	r3, #0
	str	r3, [r4, #28]
	b	.L18
.L49:
	.align	2
.L48:
	.word	GFP_KERNEL
	.word	hci_index_ida
	.word	.LC0
	.word	WQ_HIGHPRI
	.word	.LC1
	.word	.LC2
	.word	bt_debugfs
	.word	RFKILL_TYPE_BLUETOOTH
	.word	hci_rfkill_ops
	.word	HCI_SETUP
	.word	HCI_AUTO_OFF
	.word	hci_dev_list_lock
	.word	hci_dev_list
	.word	HCI_QUIRK_RAW_DEVICE
	.word	HCI_DEV_REG
	.word	EINVAL
	.word	ENOMEM
	.word	HCI_UNCONFIGURED
	.word	HCI_BREDR_ENABLED
	.word	HCI_RFKILLED
	.size	hci_register_dev, .-hci_register_dev
	.comm	hci_rfkill_ops,4,4
	.comm	hci_index_ida,4,4
	.comm	hci_dev_list_lock,4,4
	.comm	hci_dev_list,4,4
	.comm	bt_debugfs,4,4
	.comm	WQ_HIGHPRI,4,4
	.comm	RFKILL_TYPE_BLUETOOTH,4,4
	.comm	HCI_UNCONFIGURED,4,4
	.comm	HCI_SETUP,4,4
	.comm	HCI_RFKILLED,4,4
	.comm	HCI_QUIRK_RAW_DEVICE,4,4
	.comm	HCI_DEV_REG,4,4
	.comm	HCI_BREDR_ENABLED,4,4
	.comm	HCI_AUTO_OFF,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
