	.file	"extr_hci_request.c_hci_req_start_scan.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	hci_req_start_scan, @function
hci_req_start_scan:
.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
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, ecx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 2136
	.cfi_def_cfa_offset 2192
	mov	r14, QWORD PTR [rdi]
	mov	QWORD PTR 8[rsp], rsi
	mov	QWORD PTR 16[rsp], r8
	mov	rdi, r14
	mov	QWORD PTR 24[rsp], r9
	mov	rbx, QWORD PTR fs:40
	mov	QWORD PTR 2120[rsp], rbx
	xor	ebx, ebx
	call	use_ext_scan@PLT
	test	rax, rax
	je	.L2
	lea	r15, 192[rsp]
	xor	esi, esi
	mov	edx, 80
	mov	rbx, QWORD PTR 264[rsp]
	mov	rdi, r15
	call	memset@PLT
	mov	rax, QWORD PTR 16[rsp]
	mov	rdi, r14
	mov	QWORD PTR 256[rsp], rax
	mov	rax, QWORD PTR 24[rsp]
	mov	QWORD PTR 208[rsp], rax
	call	scan_1m@PLT
	test	rax, rax
	je	.L3
.L5:
	mov	edx, 80
	xor	esi, esi
	mov	rdi, rbx
	mov	eax, DWORD PTR LE_SCAN_PHY_1M[rip]
	or	DWORD PTR 248[rsp], eax
	add	rbx, 80
	call	memset@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	edi, r13d
	mov	QWORD PTR -32[rbx], rax
	call	cpu_to_le16@PLT
	mov	edi, r12d
	mov	QWORD PTR -40[rbx], rax
	call	cpu_to_le16@PLT
	mov	r8d, 160
	mov	QWORD PTR -48[rbx], rax
.L4:
	mov	rdi, r14
	mov	DWORD PTR 16[rsp], r8d
	call	scan_coded@PLT
	mov	r8d, DWORD PTR 16[rsp]
	test	rax, rax
	jne	.L14
.L6:
	mov	esi, DWORD PTR HCI_OP_LE_SET_EXT_SCAN_PARAMS[rip]
	mov	rcx, r15
	mov	edx, r8d
	mov	rdi, rbp
	lea	r12, 112[rsp]
	call	hci_req_add@PLT
	xor	esi, esi
	mov	rdi, r12
	mov	edx, 80
	call	memset@PLT
	mov	rcx, r12
	mov	edx, 80
	mov	rdi, rbp
	mov	rax, QWORD PTR LE_SCAN_ENABLE[rip]
	mov	esi, DWORD PTR HCI_OP_LE_SET_EXT_SCAN_ENABLE[rip]
	mov	QWORD PTR 120[rsp], rax
	mov	rax, QWORD PTR LE_SCAN_FILTER_DUP_ENABLE[rip]
	mov	QWORD PTR 112[rsp], rax
	call	hci_req_add@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	lea	r14, 32[rsp]
	mov	edx, 80
	xor	esi, esi
	mov	rdi, r14
	call	memset@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	edi, r13d
	mov	QWORD PTR 80[rsp], rax
	call	cpu_to_le16@PLT
	mov	edi, r12d
	lea	r12, 112[rsp]
	mov	QWORD PTR 72[rsp], rax
	call	cpu_to_le16@PLT
	mov	rcx, r14
	mov	edx, 80
	mov	rdi, rbp
	mov	QWORD PTR 64[rsp], rax
	mov	rax, QWORD PTR 16[rsp]
	mov	esi, DWORD PTR HCI_OP_LE_SET_SCAN_PARAM[rip]
	mov	QWORD PTR 56[rsp], rax
	mov	rax, QWORD PTR 24[rsp]
	mov	QWORD PTR 48[rsp], rax
	call	hci_req_add@PLT
	mov	edx, 80
	xor	esi, esi
	mov	rdi, r12
	call	memset@PLT
	mov	rcx, r12
	mov	edx, 80
	mov	rdi, rbp
	mov	rax, QWORD PTR LE_SCAN_ENABLE[rip]
	mov	esi, DWORD PTR HCI_OP_LE_SET_SCAN_ENABLE[rip]
	mov	QWORD PTR 120[rsp], rax
	mov	rax, QWORD PTR LE_SCAN_FILTER_DUP_ENABLE[rip]
	mov	QWORD PTR 112[rsp], rax
	call	hci_req_add@PLT
.L1:
	mov	rax, QWORD PTR 2120[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L15
	add	rsp, 2136
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L3:
	.cfi_restore_state
	mov	rdi, r14
	call	scan_2m@PLT
	test	rax, rax
	jne	.L5
	mov	r8d, 80
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edx, 80
	xor	esi, esi
	mov	rdi, rbx
	mov	eax, DWORD PTR LE_SCAN_PHY_CODED[rip]
	or	DWORD PTR 248[rsp], eax
	call	memset@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	edi, r13d
	mov	QWORD PTR 48[rbx], rax
	call	cpu_to_le16@PLT
	mov	edi, r12d
	mov	QWORD PTR 40[rbx], rax
	call	cpu_to_le16@PLT
	mov	r8d, DWORD PTR 16[rsp]
	mov	QWORD PTR 32[rbx], rax
	add	r8d, 80
	jmp	.L6
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	hci_req_start_scan, .-hci_req_start_scan
	.comm	LE_SCAN_PHY_CODED,4,4
	.comm	LE_SCAN_PHY_1M,4,4
	.comm	LE_SCAN_FILTER_DUP_ENABLE,8,8
	.comm	LE_SCAN_ENABLE,8,8
	.comm	HCI_OP_LE_SET_SCAN_PARAM,4,4
	.comm	HCI_OP_LE_SET_SCAN_ENABLE,4,4
	.comm	HCI_OP_LE_SET_EXT_SCAN_PARAMS,4,4
	.comm	HCI_OP_LE_SET_EXT_SCAN_ENABLE,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_request.c_hci_req_start_scan.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hci_req_start_scan, %function
hci_req_start_scan:
	@ args = 8, pretend = 0, frame = 568
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r8, [r0]
	mov	r5, r3
	ldr	r3, .L17
	sub	sp, sp, #572
	mov	r4, r0
	mov	r0, r8
	mov	r6, r1
	mov	r7, r2
	ldr	r3, [r3]
	str	r3, [sp, #564]
	mov	r3,#0
	ldr	r10, [sp, #608]
	ldr	r9, [sp, #612]
	bl	use_ext_scan
	subs	fp, r0, #0
	beq	.L2
	mov	r2, #40
	mov	r1, #0
	add	r0, sp, #84
	ldr	fp, [sp, #120]
	bl	memset
	mov	r0, r8
	str	r10, [sp, #116]
	str	r9, [sp, #92]
	bl	scan_1m
	cmp	r0, #0
	beq	.L3
.L5:
	ldr	r2, .L17+4
	ldr	r3, [sp, #112]
	ldr	r1, [r2]
	mov	r0, fp
	orr	r3, r3, r1
	mov	r2, #40
	mov	r1, #0
	str	r3, [sp, #112]
	bl	memset
	str	r6, [fp, #24]
	mov	r0, r7
	bl	cpu_to_le16
	mov	r3, r0
	mov	r0, r5
	str	r3, [fp, #20]
	bl	cpu_to_le16
	str	r0, [fp, #16]
	mov	r0, r8
	bl	scan_coded
	cmp	r0, #0
	mov	r9, #80
	add	fp, fp, #40
	bne	.L15
.L6:
	ldr	r1, .L17+8
	add	r3, sp, #84
	mov	r2, r9
	ldr	r1, [r1]
	mov	r0, r4
	bl	hci_req_add
	mov	r2, #32
	mov	r1, #0
	add	r0, sp, #52
	bl	memset
	ldr	r1, .L17+12
	ldr	r2, .L17+16
	ldr	r3, .L17+20
	b	.L13
.L2:
	mov	r2, #40
	mov	r1, fp
	add	r0, sp, #4
	bl	memset
	mov	r0, r7
	str	r6, [sp, #28]
	bl	cpu_to_le16
	mov	r3, r0
	mov	r0, r5
	str	r3, [sp, #24]
	bl	cpu_to_le16
	mov	ip, r0
	ldr	r2, .L17+24
	add	r3, sp, #4
	ldr	r1, [r2]
	mov	r0, r4
	mov	r2, #40
	str	ip, [sp, #20]
	str	r10, [sp, #16]
	str	r9, [sp, #12]
	bl	hci_req_add
	mov	r1, fp
	mov	r2, #32
	add	r0, sp, #52
	bl	memset
	ldr	r1, .L17+12
	ldr	r2, .L17+16
	ldr	r3, .L17+28
.L13:
	ldr	lr, [r1]
	ldr	ip, [r2]
	ldr	r1, [r3]
	mov	r2, #40
	add	r3, sp, #44
	mov	r0, r4
	str	lr, [sp, #48]
	str	ip, [sp, #44]
	bl	hci_req_add
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [sp, #564]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	add	sp, sp, #572
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	mov	r0, r8
	bl	scan_2m
	cmp	r0, #0
	bne	.L5
	mov	r0, r8
	bl	scan_coded
	cmp	r0, #0
	mov	r9, #40
	beq	.L6
.L15:
	ldr	r2, .L17+32
	ldr	r3, [sp, #112]
	ldr	r1, [r2]
	mov	r0, fp
	orr	r3, r3, r1
	mov	r2, #40
	mov	r1, #0
	str	r3, [sp, #112]
	bl	memset
	mov	r0, r7
	str	r6, [fp, #24]
	bl	cpu_to_le16
	mov	r3, r0
	mov	r0, r5
	str	r3, [fp, #20]
	bl	cpu_to_le16
	add	r9, r9, #40
	str	r0, [fp, #16]
	b	.L6
.L16:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	.LC0
	.word	LE_SCAN_PHY_1M
	.word	HCI_OP_LE_SET_EXT_SCAN_PARAMS
	.word	LE_SCAN_ENABLE
	.word	LE_SCAN_FILTER_DUP_ENABLE
	.word	HCI_OP_LE_SET_EXT_SCAN_ENABLE
	.word	HCI_OP_LE_SET_SCAN_PARAM
	.word	HCI_OP_LE_SET_SCAN_ENABLE
	.word	LE_SCAN_PHY_CODED
	.size	hci_req_start_scan, .-hci_req_start_scan
	.comm	LE_SCAN_PHY_CODED,4,4
	.comm	LE_SCAN_PHY_1M,4,4
	.comm	LE_SCAN_FILTER_DUP_ENABLE,4,4
	.comm	LE_SCAN_ENABLE,4,4
	.comm	HCI_OP_LE_SET_SCAN_PARAM,4,4
	.comm	HCI_OP_LE_SET_SCAN_ENABLE,4,4
	.comm	HCI_OP_LE_SET_EXT_SCAN_PARAMS,4,4
	.comm	HCI_OP_LE_SET_EXT_SCAN_ENABLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
