	.file	"extr_mgmt.c_set_connectable.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"request for %s"
	.text
	.p2align 4
	.type	set_connectable, @function
set_connectable:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	lea	rdi, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR 24[rsi]
	call	BT_DBG@PLT
	mov	esi, DWORD PTR HCI_LE_ENABLED[rip]
	mov	rdi, rbp
	call	hci_dev_test_flag@PLT
	test	eax, eax
	je	.L15
.L2:
	cmp	DWORD PTR [rbx], 1
	ja	.L16
	mov	rdi, rbp
	call	hci_dev_lock@PLT
	mov	rdi, rbp
	call	hdev_is_powered@PLT
	test	eax, eax
	je	.L17
	mov	edi, DWORD PTR MGMT_OP_SET_DISCOVERABLE[rip]
	mov	rsi, rbp
	call	pending_find@PLT
	test	rax, rax
	jne	.L7
	mov	edi, DWORD PTR MGMT_OP_SET_CONNECTABLE[rip]
	mov	rsi, rbp
	call	pending_find@PLT
	test	rax, rax
	je	.L18
.L7:
	mov	esi, DWORD PTR 20[rbp]
	mov	ecx, DWORD PTR MGMT_STATUS_BUSY[rip]
	mov	rdi, r12
	mov	edx, DWORD PTR MGMT_OP_SET_CONNECTABLE[rip]
	call	mgmt_cmd_status@PLT
	mov	r12d, eax
.L5:
	mov	rdi, rbp
	call	hci_dev_unlock@PLT
	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
.L16:
	.cfi_restore_state
	mov	esi, DWORD PTR 20[rbp]
	mov	ecx, DWORD PTR MGMT_STATUS_INVALID_PARAMS[rip]
.L13:
	mov	edx, DWORD PTR MGMT_OP_SET_CONNECTABLE[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, r12
	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
	jmp	mgmt_cmd_status@PLT
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	esi, DWORD PTR HCI_BREDR_ENABLED[rip]
	mov	rdi, rbp
	call	hci_dev_test_flag@PLT
	test	eax, eax
	jne	.L2
	mov	esi, DWORD PTR 20[rbp]
	mov	ecx, DWORD PTR MGMT_STATUS_REJECTED[rip]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edx, DWORD PTR [rbx]
	mov	rsi, r12
	mov	rdi, rbp
	call	set_connectable_update_settings@PLT
	mov	r12d, eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L18:
	mov	esi, DWORD PTR MGMT_OP_SET_CONNECTABLE[rip]
	mov	rdi, r12
	mov	r8d, r13d
	mov	rcx, rbx
	mov	rdx, rbp
	call	mgmt_pending_add@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	test	rax, rax
	je	.L5
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	jne	.L19
	cmp	QWORD PTR 0[rbp], 0
	jg	.L20
.L11:
	mov	esi, DWORD PTR HCI_LIMITED_DISCOVERABLE[rip]
	mov	rdi, rbp
	call	hci_dev_clear_flag@PLT
	mov	esi, DWORD PTR HCI_DISCOVERABLE[rip]
	mov	rdi, rbp
	call	hci_dev_clear_flag@PLT
	mov	esi, DWORD PTR HCI_CONNECTABLE[rip]
	mov	rdi, rbp
	call	hci_dev_clear_flag@PLT
.L10:
	mov	edi, DWORD PTR 12[rbp]
	lea	rsi, 8[rbp]
	xor	r12d, r12d
	call	queue_work@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L20:
	lea	rdi, 16[rbp]
	call	cancel_delayed_work@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L19:
	mov	esi, DWORD PTR HCI_CONNECTABLE[rip]
	mov	rdi, rbp
	call	hci_dev_set_flag@PLT
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	set_connectable, .-set_connectable
	.comm	MGMT_STATUS_REJECTED,4,4
	.comm	MGMT_STATUS_INVALID_PARAMS,4,4
	.comm	MGMT_STATUS_BUSY,4,4
	.comm	MGMT_OP_SET_DISCOVERABLE,4,4
	.comm	MGMT_OP_SET_CONNECTABLE,4,4
	.comm	HCI_LIMITED_DISCOVERABLE,4,4
	.comm	HCI_LE_ENABLED,4,4
	.comm	HCI_DISCOVERABLE,4,4
	.comm	HCI_CONNECTABLE,4,4
	.comm	HCI_BREDR_ENABLED,4,4
	.comm	ENOMEM,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_mgmt.c_set_connectable.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"request for %s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_connectable, %function
set_connectable:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r1
	sub	sp, sp, #12
	ldr	r1, [r1, #20]
	mov	r6, r0
	ldr	r0, .L22
	mov	r5, r2
	mov	r8, r3
	bl	BT_DBG
	ldr	r2, .L22+4
	mov	r0, r4
	ldr	r1, [r2]
	bl	hci_dev_test_flag
	cmp	r0, #0
	beq	.L15
.L2:
	ldr	r3, [r5]
	cmp	r3, #1
	bhi	.L16
	mov	r0, r4
	bl	hci_dev_lock
	mov	r0, r4
	bl	hdev_is_powered
	cmp	r0, #0
	beq	.L17
	ldr	r3, .L22+8
	mov	r1, r4
	ldr	r0, [r3]
	bl	pending_find
	cmp	r0, #0
	ldr	r9, .L22+12
	bne	.L7
	mov	r1, r4
	ldr	r0, [r9]
	bl	pending_find
	subs	r7, r0, #0
	beq	.L18
.L7:
	ldr	r3, .L22+16
	mov	r0, r6
	ldr	r2, [r9]
	ldr	r3, [r3]
	ldr	r1, [r4, #16]
	bl	mgmt_cmd_status
	mov	r7, r0
.L5:
	mov	r0, r4
	bl	hci_dev_unlock
	mov	r0, r7
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L16:
	ldr	r3, .L22+20
.L13:
	mov	r0, r6
	ldr	r2, .L22+12
	ldr	r1, [r4, #16]
	ldr	r3, [r3]
	ldr	r2, [r2]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, lr}
	b	mgmt_cmd_status
.L15:
	ldr	r3, .L22+24
	mov	r0, r4
	ldr	r1, [r3]
	bl	hci_dev_test_flag
	cmp	r0, #0
	ldreq	r3, .L22+28
	bne	.L2
	b	.L13
.L17:
	mov	r1, r6
	mov	r0, r4
	ldr	r2, [r5]
	bl	set_connectable_update_settings
	mov	r7, r0
	b	.L5
.L18:
	mov	r0, r6
	mov	r3, r5
	mov	r2, r4
	ldr	r1, [r9]
	str	r8, [sp]
	bl	mgmt_pending_add
	cmp	r0, #0
	beq	.L19
	ldr	r3, [r5]
	cmp	r3, #0
	bne	.L20
	ldr	r3, [r4]
	cmp	r3, #0
	bgt	.L21
.L11:
	ldr	r3, .L22+32
	mov	r0, r4
	ldr	r1, [r3]
	bl	hci_dev_clear_flag
	ldr	r3, .L22+36
	mov	r0, r4
	ldr	r1, [r3]
	bl	hci_dev_clear_flag
	ldr	r3, .L22+40
	mov	r0, r4
	ldr	r1, [r3]
	bl	hci_dev_clear_flag
.L10:
	ldr	r0, [r4, #8]
	add	r1, r4, #4
	bl	queue_work
	b	.L5
.L21:
	add	r0, r4, #12
	bl	cancel_delayed_work
	b	.L11
.L20:
	ldr	r3, .L22+40
	mov	r0, r4
	ldr	r1, [r3]
	bl	hci_dev_set_flag
	b	.L10
.L19:
	ldr	r3, .L22+44
	ldr	r7, [r3]
	rsb	r7, r7, #0
	b	.L5
.L23:
	.align	2
.L22:
	.word	.LC0
	.word	HCI_LE_ENABLED
	.word	MGMT_OP_SET_DISCOVERABLE
	.word	MGMT_OP_SET_CONNECTABLE
	.word	MGMT_STATUS_BUSY
	.word	MGMT_STATUS_INVALID_PARAMS
	.word	HCI_BREDR_ENABLED
	.word	MGMT_STATUS_REJECTED
	.word	HCI_LIMITED_DISCOVERABLE
	.word	HCI_DISCOVERABLE
	.word	HCI_CONNECTABLE
	.word	ENOMEM
	.size	set_connectable, .-set_connectable
	.comm	MGMT_STATUS_REJECTED,4,4
	.comm	MGMT_STATUS_INVALID_PARAMS,4,4
	.comm	MGMT_STATUS_BUSY,4,4
	.comm	MGMT_OP_SET_DISCOVERABLE,4,4
	.comm	MGMT_OP_SET_CONNECTABLE,4,4
	.comm	HCI_LIMITED_DISCOVERABLE,4,4
	.comm	HCI_LE_ENABLED,4,4
	.comm	HCI_DISCOVERABLE,4,4
	.comm	HCI_CONNECTABLE,4,4
	.comm	HCI_BREDR_ENABLED,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
