	.file	"extr_hci.c_nci_hci_send_cmd.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	nci_hci_send_cmd
	.type	nci_hci_send_cmd, @function
nci_hci_send_cmd:
.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
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 48
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rdi]
	mov	rdi, QWORD PTR [rax]
	mov	rdi, QWORD PTR [rdi+rsi*8]
	cmp	QWORD PTR NCI_HCI_INVALID_PIPE[rip], rdi
	je	.L14
	mov	r13, QWORD PTR 8[rax]
	test	r13, r13
	je	.L15
	mov	QWORD PTR [rsp], rdi
	mov	eax, DWORD PTR 8[r13]
	mov	rsi, rdx
	mov	r14, rcx
	mov	edi, DWORD PTR NCI_HCI_HCP_COMMAND[rip]
	mov	rbp, r8
	mov	rbx, r9
	mov	DWORD PTR 28[rsp], eax
	call	NCI_HCP_HEADER@PLT
	mov	edi, DWORD PTR NCI_DATA_TIMEOUT[rip]
	mov	QWORD PTR 8[rsp], r14
	mov	DWORD PTR 24[rsp], eax
	mov	QWORD PTR 16[rsp], rbp
	call	msecs_to_jiffies@PLT
	mov	esi, DWORD PTR nci_hci_send_data_req[rip]
	mov	rdi, r12
	mov	rdx, rsp
	mov	ecx, eax
	call	nci_request@PLT
	cmp	DWORD PTR NCI_STATUS_OK[rip], eax
	mov	r12d, eax
	je	.L16
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 48
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	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
.L15:
	.cfi_restore_state
	mov	r12d, DWORD PTR EPROTO[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	r12d, DWORD PTR EADDRNOTAVAIL[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rax, QWORD PTR 0[r13]
	mov	rax, QWORD PTR [rax]
	mov	edi, DWORD PTR [rax]
	call	NCI_HCP_MSG_GET_CMD@PLT
	mov	edi, eax
	call	nci_hci_result_to_errno@PLT
	mov	esi, DWORD PTR NCI_HCI_HCP_MESSAGE_HEADER_LEN[rip]
	mov	rdi, QWORD PTR 0[r13]
	mov	r12d, eax
	call	skb_pull@PLT
	test	r12d, r12d
	jne	.L1
	test	rbx, rbx
	je	.L1
	mov	rax, QWORD PTR 0[r13]
	mov	QWORD PTR [rbx], rax
	jmp	.L1
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	nci_hci_send_cmd, .-nci_hci_send_cmd
	.comm	nci_hci_send_data_req,4,4
	.comm	NCI_STATUS_OK,4,4
	.comm	NCI_HCI_INVALID_PIPE,8,8
	.comm	NCI_HCI_HCP_MESSAGE_HEADER_LEN,4,4
	.comm	NCI_HCI_HCP_COMMAND,4,4
	.comm	NCI_DATA_TIMEOUT,4,4
	.comm	EPROTO,4,4
	.comm	EADDRNOTAVAIL,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.c_nci_hci_send_cmd.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	nci_hci_send_cmd
	.syntax unified
	.arm
	.fpu softvfp
	.type	nci_hci_send_cmd, %function
nci_hci_send_cmd:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r0, [r0]
	ldr	lr, .L15
	ldr	ip, [r0]
	ldr	lr, [lr]
	ldr	ip, [ip, r1, lsl #2]
	mov	r7, r3
	ldr	r3, .L15+4
	sub	sp, sp, #24
	cmp	lr, ip
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	ldr	r5, [sp, #52]
	beq	.L11
	ldr	r6, [r0, #4]
	cmp	r6, #0
	beq	.L12
	mov	r1, r2
	ldr	r2, .L15+8
	ldr	r3, [r6, #4]
	ldr	r0, [r2]
	str	ip, [sp]
	str	r3, [sp, #16]
	bl	NCI_HCP_HEADER
	mov	r3, r0
	ldr	r2, .L15+12
	ldr	r1, .L15+16
	str	r3, [sp, #12]
	ldr	r3, [sp, #48]
	ldr	r0, [r2]
	ldr	r8, [r1]
	str	r3, [sp, #8]
	str	r7, [sp, #4]
	bl	msecs_to_jiffies
	mov	r2, sp
	mov	r3, r0
	mov	r1, r8
	mov	r0, r4
	bl	nci_request
	ldr	r3, .L15+20
	mov	r4, r0
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L13
.L1:
	ldr	r3, .L15+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r4
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r3, .L15+24
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L11:
	ldr	r3, .L15+28
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L13:
	ldr	r3, [r6]
	ldr	r3, [r3]
	ldr	r0, [r3]
	bl	NCI_HCP_MSG_GET_CMD
	bl	nci_hci_result_to_errno
	mov	r4, r0
	ldr	r3, .L15+32
	ldr	r0, [r6]
	ldr	r1, [r3]
	bl	skb_pull
	subs	r3, r5, #0
	movne	r3, #1
	cmp	r4, #0
	movne	r3, #0
	cmp	r3, #0
	ldrne	r3, [r6]
	strne	r3, [r5]
	b	.L1
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	NCI_HCI_INVALID_PIPE
	.word	.LC0
	.word	NCI_HCI_HCP_COMMAND
	.word	NCI_DATA_TIMEOUT
	.word	nci_hci_send_data_req
	.word	NCI_STATUS_OK
	.word	EPROTO
	.word	EADDRNOTAVAIL
	.word	NCI_HCI_HCP_MESSAGE_HEADER_LEN
	.size	nci_hci_send_cmd, .-nci_hci_send_cmd
	.comm	nci_hci_send_data_req,4,4
	.comm	NCI_STATUS_OK,4,4
	.comm	NCI_HCI_INVALID_PIPE,4,4
	.comm	NCI_HCI_HCP_MESSAGE_HEADER_LEN,4,4
	.comm	NCI_HCI_HCP_COMMAND,4,4
	.comm	NCI_DATA_TIMEOUT,4,4
	.comm	EPROTO,4,4
	.comm	EADDRNOTAVAIL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
