	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nxp_nci_fw_send
_nxp_nci_fw_send:                       ## @nxp_nci_fw_send
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	28(%rdi), %r14
	movq	%r14, %rdi
	callq	_reinit_completion
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.1:
	movl	8(%rbx), %eax
	movl	24(%rbx), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_5
LBB0_4:
	movq	_EMSGSIZE@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_12
LBB0_2:
	movq	16(%rbx), %rdi
	callq	_get_unaligned_be16
	movq	_NXP_NCI_FW_FRAME_LEN_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, 8(%rbx)
	movq	_NXP_NCI_FW_HDR_LEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	leaq	(,%rdx,8), %rcx
	addq	%rcx, 16(%rbx)
	movl	24(%rbx), %ecx
	subl	%edx, %ecx
	movl	%ecx, 24(%rbx)
	cmpl	%ecx, %eax
	jg	LBB0_4
LBB0_5:
	movq	%rbx, %rdi
	callq	_nxp_nci_fw_send_chunk
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_12
## %bb.6:
	movl	%r15d, %eax
	addq	%rax, (%rbx)
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movq	_NXP_NCI_FW_CMD_RESET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.7:
	movq	$0, 48(%rbx)
	xorl	%r15d, %r15d
	cmpq	$0, 40(%rbx)
	je	LBB0_12
## %bb.8:
	addq	$32, %rbx
	movq	%rbx, %rdi
	callq	_schedule_work
	jmp	LBB0_12
LBB0_9:
	movq	_NXP_NCI_FW_ANSWER_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_wait_for_completion_interruptible_timeout
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_10
LBB0_12:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_NXP_NCI_FW_FRAME_LEN_MASK,4,2  ## @NXP_NCI_FW_FRAME_LEN_MASK
	.comm	_NXP_NCI_FW_HDR_LEN,8,3         ## @NXP_NCI_FW_HDR_LEN
	.comm	_EMSGSIZE,4,2                   ## @EMSGSIZE
	.comm	_NXP_NCI_FW_CMD_RESET,8,3       ## @NXP_NCI_FW_CMD_RESET
	.comm	_NXP_NCI_FW_ANSWER_TIMEOUT,4,2  ## @NXP_NCI_FW_ANSWER_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_nxp_nci_fw_send
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nxp_nci_fw_send
_nxp_nci_fw_send:                       ; @nxp_nci_fw_send
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x20, x0, #28
	mov	x0, x20
	bl	_reinit_completion
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w8, [x19, #8]
	ldr	w9, [x19, #24]
	cmp	w8, w9
	b.le	LBB0_5
LBB0_2:
Lloh0:
	adrp	x8, _EMSGSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EMSGSIZE@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_4:
	ldr	x0, [x19, #16]
	bl	_get_unaligned_be16
Lloh2:
	adrp	x8, _NXP_NCI_FW_FRAME_LEN_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NXP_NCI_FW_FRAME_LEN_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	and	w8, w8, w0
	str	w8, [x19, #8]
Lloh5:
	adrp	x9, _NXP_NCI_FW_HDR_LEN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NXP_NCI_FW_HDR_LEN@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ldr	x10, [x19, #16]
	add	x10, x10, x9, lsl #3
	str	x10, [x19, #16]
	ldr	w10, [x19, #24]
	sub	w9, w10, w9
	str	w9, [x19, #24]
	cmp	w8, w9
	b.gt	LBB0_2
LBB0_5:
	mov	x0, x19
	bl	_nxp_nci_fw_send_chunk
	tbnz	w0, #31, LBB0_11
; %bb.6:
	ldr	x8, [x19]
	add	x8, x8, w0, uxtw
	str	x8, [x19]
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _NXP_NCI_FW_CMD_RESET@GOTPAGE
Lloh9:
	ldr	x9, [x9, _NXP_NCI_FW_CMD_RESET@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
	str	xzr, [x19, #48]
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_10
; %bb.8:
	add	x0, x19, #32
	bl	_schedule_work
	b	LBB0_10
LBB0_9:
Lloh11:
	adrp	x8, _NXP_NCI_FW_ANSWER_TIMEOUT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NXP_NCI_FW_ANSWER_TIMEOUT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_wait_for_completion_interruptible_timeout
	cbz	x0, LBB0_12
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh14:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_NXP_NCI_FW_FRAME_LEN_MASK,4,2  ; @NXP_NCI_FW_FRAME_LEN_MASK
	.comm	_NXP_NCI_FW_HDR_LEN,8,3         ; @NXP_NCI_FW_HDR_LEN
	.comm	_EMSGSIZE,4,2                   ; @EMSGSIZE
	.comm	_NXP_NCI_FW_CMD_RESET,8,3       ; @NXP_NCI_FW_CMD_RESET
	.comm	_NXP_NCI_FW_ANSWER_TIMEOUT,4,2  ; @NXP_NCI_FW_ANSWER_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_nxp_nci_fw_send
.subsections_via_symbols
