	.file	"extr_mgmt.c_set_privacy.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"request for %s"
	.text
	.p2align 4
	.type	set_privacy, @function
set_privacy:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	lea	rdi, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	esi, DWORD PTR 8[rsi]
	mov	rbx, rdx
	call	BT_DBG@PLT
	mov	rdi, rbp
	call	lmp_le_capable@PLT
	test	eax, eax
	je	.L16
	cmp	DWORD PTR [rbx], 2
	ja	.L17
	mov	rdi, rbp
	call	hdev_is_powered@PLT
	test	rax, rax
	jne	.L18
	mov	rdi, rbp
	call	hci_dev_lock@PLT
	mov	esi, DWORD PTR HCI_RPA_RESOLVING[rip]
	mov	rdi, rbp
	call	hci_dev_set_flag@PLT
	mov	eax, DWORD PTR [rbx]
	mov	esi, DWORD PTR HCI_PRIVACY[rip]
	mov	rdi, rbp
	test	eax, eax
	jne	.L19
	call	hci_dev_test_and_clear_flag@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, 4
	xor	esi, esi
	mov	r14d, eax
	call	memset@PLT
	mov	esi, DWORD PTR HCI_RPA_EXPIRED[rip]
	mov	rdi, rbp
	call	hci_dev_clear_flag@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	hci_adv_instances_set_rpa_expired@PLT
	mov	esi, DWORD PTR HCI_LIMITED_PRIVACY[rip]
	mov	rdi, rbp
.L13:
	call	hci_dev_clear_flag@PLT
.L7:
	mov	esi, DWORD PTR MGMT_OP_SET_PRIVACY[rip]
	mov	rdx, rbp
	mov	rdi, r12
	call	send_settings_rsp@PLT
	mov	r13d, eax
	test	r14d, r14d
	je	.L8
	test	eax, eax
	js	.L8
	mov	rsi, r12
	mov	rdi, rbp
	call	new_settings@PLT
	mov	r13d, eax
.L8:
	mov	rdi, rbp
	call	hci_dev_unlock@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	esi, DWORD PTR 4[rbp]
	mov	ecx, DWORD PTR MGMT_STATUS_INVALID_PARAMS[rip]
.L14:
	mov	edx, DWORD PTR MGMT_OP_SET_PRIVACY[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, r12
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	mgmt_cmd_status@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	esi, DWORD PTR 4[rbp]
	mov	ecx, DWORD PTR MGMT_STATUS_NOT_SUPPORTED[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L18:
	mov	esi, DWORD PTR 4[rbp]
	mov	ecx, DWORD PTR MGMT_STATUS_REJECTED[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L19:
	call	hci_dev_test_and_set_flag@PLT
	mov	esi, DWORD PTR 4[rbx]
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, 4
	xor	r14d, r14d
	test	eax, eax
	sete	r14b
	call	memcpy@PLT
	mov	esi, DWORD PTR HCI_RPA_EXPIRED[rip]
	mov	rdi, rbp
	call	hci_dev_set_flag@PLT
	mov	esi, 1
	mov	rdi, rbp
	call	hci_adv_instances_set_rpa_expired@PLT
	cmp	DWORD PTR [rbx], 2
	mov	esi, DWORD PTR HCI_LIMITED_PRIVACY[rip]
	mov	rdi, rbp
	jne	.L13
	call	hci_dev_set_flag@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	set_privacy, .-set_privacy
	.comm	MGMT_STATUS_REJECTED,4,4
	.comm	MGMT_STATUS_NOT_SUPPORTED,4,4
	.comm	MGMT_STATUS_INVALID_PARAMS,4,4
	.comm	MGMT_OP_SET_PRIVACY,4,4
	.comm	HCI_RPA_RESOLVING,4,4
	.comm	HCI_RPA_EXPIRED,4,4
	.comm	HCI_PRIVACY,4,4
	.comm	HCI_LIMITED_PRIVACY,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_privacy.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_privacy, %function
set_privacy:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	mov	r6, r0
	ldr	r1, [r1, #8]
	ldr	r0, .L19
	mov	r5, r2
	bl	BT_DBG
	mov	r0, r4
	bl	lmp_le_capable
	cmp	r0, #0
	ldreq	r3, .L19+4
	beq	.L14
	ldr	r3, [r5]
	cmp	r3, #2
	ldrhi	r3, .L19+8
	bhi	.L14
	mov	r0, r4
	bl	hdev_is_powered
	cmp	r0, #0
	bne	.L16
	mov	r0, r4
	bl	hci_dev_lock
	ldr	r3, .L19+12
	mov	r0, r4
	ldr	r1, [r3]
	bl	hci_dev_set_flag
	ldr	r8, [r5]
	ldr	r3, .L19+16
	cmp	r8, #0
	mov	r0, r4
	ldr	r1, [r3]
	bne	.L17
	bl	hci_dev_test_and_clear_flag
	mov	r2, #4
	mov	r1, r8
	mov	r7, r0
	ldr	r0, [r4]
	bl	memset
	ldr	r3, .L19+20
	mov	r0, r4
	ldr	r1, [r3]
	bl	hci_dev_clear_flag
	mov	r1, r8
	mov	r0, r4
	bl	hci_adv_instances_set_rpa_expired
	mov	r0, r4
	ldr	r3, .L19+24
	ldr	r1, [r3]
.L13:
	bl	hci_dev_clear_flag
.L7:
	ldr	r3, .L19+28
	mov	r2, r4
	mov	r0, r6
	ldr	r1, [r3]
	bl	send_settings_rsp
	mov	r5, r0
	mvn	r0, r0
	cmp	r7, #0
	lsr	r0, r0, #31
	movne	r7, r0
	moveq	r7, #0
	cmp	r7, #0
	bne	.L18
.L8:
	mov	r0, r4
	bl	hci_dev_unlock
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	ldr	r3, .L19+32
.L14:
	ldr	r2, .L19+28
	mov	r0, r6
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	ldr	r2, [r2]
	pop	{r4, r5, r6, r7, r8, lr}
	b	mgmt_cmd_status
.L17:
	bl	hci_dev_test_and_set_flag
	clz	r7, r0
	mov	r2, #4
	ldr	r1, [r5, #4]
	ldr	r0, [r4]
	bl	memcpy
	ldr	r3, .L19+20
	mov	r0, r4
	ldr	r1, [r3]
	bl	hci_dev_set_flag
	mov	r1, #1
	mov	r0, r4
	bl	hci_adv_instances_set_rpa_expired
	ldr	r3, [r5]
	mov	r0, r4
	cmp	r3, #2
	ldr	r3, .L19+24
	lsr	r7, r7, #5
	ldr	r1, [r3]
	bne	.L13
	bl	hci_dev_set_flag
	b	.L7
.L18:
	mov	r1, r6
	mov	r0, r4
	bl	new_settings
	mov	r5, r0
	b	.L8
.L20:
	.align	2
.L19:
	.word	.LC0
	.word	MGMT_STATUS_NOT_SUPPORTED
	.word	MGMT_STATUS_INVALID_PARAMS
	.word	HCI_RPA_RESOLVING
	.word	HCI_PRIVACY
	.word	HCI_RPA_EXPIRED
	.word	HCI_LIMITED_PRIVACY
	.word	MGMT_OP_SET_PRIVACY
	.word	MGMT_STATUS_REJECTED
	.size	set_privacy, .-set_privacy
	.comm	MGMT_STATUS_REJECTED,4,4
	.comm	MGMT_STATUS_NOT_SUPPORTED,4,4
	.comm	MGMT_STATUS_INVALID_PARAMS,4,4
	.comm	MGMT_OP_SET_PRIVACY,4,4
	.comm	HCI_RPA_RESOLVING,4,4
	.comm	HCI_RPA_EXPIRED,4,4
	.comm	HCI_PRIVACY,4,4
	.comm	HCI_LIMITED_PRIVACY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
