	.file	"extr_cnl-sst.c_cnl_load_base_firmware.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"request firmware failed: %d\n"
.LC1:
	.string	"prepare firmware failed: %d\n"
.LC2:
	.string	"transfer firmware failed: %d\n"
.LC3:
	.string	"FW ready timed-out\n"
	.text
	.p2align 4
	.type	cnl_load_base_firmware, @function
cnl_load_base_firmware:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rsi, QWORD PTR [rdi]
	mov	rbx, QWORD PTR 16[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	test	rsi, rsi
	je	.L13
.L2:
	cmp	QWORD PTR 16[rbx], 0
	je	.L5
	mov	edx, DWORD PTR CNL_ADSP_FW_HDR_OFFSET[rip]
	xor	ecx, ecx
	mov	rdi, rbp
	call	snd_skl_parse_uuids@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L4
	mov	rsi, QWORD PTR 0[rbp]
.L5:
	mov	eax, DWORD PTR 4[rsi]
	mov	rdi, rsp
	mov	DWORD PTR 4[rsp], eax
	mov	eax, DWORD PTR [rsi]
	mov	DWORD PTR [rsp], eax
	call	skl_dsp_strip_extended_manifest@PLT
	mov	edx, DWORD PTR [rsp]
	mov	esi, DWORD PTR 4[rsp]
	mov	rdi, rbp
	call	cnl_prepare_fw@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L14
	mov	rdi, rbp
	call	sst_transfer_fw_host_dma@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L15
	mov	edi, DWORD PTR SKL_IPC_BOOT_MSECS[rip]
	call	msecs_to_jiffies@PLT
	mov	esi, DWORD PTR 4[rbx]
	mov	edi, DWORD PTR 8[rbx]
	mov	edx, eax
	call	wait_event_timeout@PLT
	test	eax, eax
	je	.L16
	mov	DWORD PTR [rbx], 1
	xor	r12d, r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	edi, DWORD PTR 8[rbp]
	mov	edx, eax
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	dev_err@PLT
	mov	esi, DWORD PTR SKL_DSP_CORE0_MASK[rip]
	mov	rdi, rbp
	call	cnl_dsp_disable_core@PLT
.L4:
	mov	rdi, QWORD PTR 0[rbp]
	call	release_firmware@PLT
	mov	QWORD PTR 0[rbp], 0
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edi, DWORD PTR 8[rbp]
	mov	edx, eax
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edx, DWORD PTR 8[rdi]
	mov	esi, DWORD PTR 12[rdi]
	call	request_firmware@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L3
	mov	rsi, QWORD PTR 0[rbp]
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	mov	edi, DWORD PTR 8[rbp]
	lea	rsi, .LC3[rip]
	call	dev_err@PLT
	mov	esi, DWORD PTR SKL_DSP_CORE0_MASK[rip]
	mov	rdi, rbp
	call	cnl_dsp_disable_core@PLT
	mov	r12d, DWORD PTR EIO[rip]
	neg	r12d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, DWORD PTR 8[rbp]
	mov	edx, eax
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L4
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cnl_load_base_firmware, .-cnl_load_base_firmware
	.comm	SKL_IPC_BOOT_MSECS,4,4
	.comm	SKL_DSP_CORE0_MASK,4,4
	.comm	EIO,4,4
	.comm	CNL_ADSP_FW_HDR_OFFSET,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_cnl-sst.c_cnl_load_base_firmware.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"request firmware failed: %d\012\000"
	.align	2
.LC1:
	.ascii	"prepare firmware failed: %d\012\000"
	.align	2
.LC2:
	.ascii	"transfer firmware failed: %d\012\000"
	.align	2
.LC3:
	.ascii	"FW ready timed-out\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cnl_load_base_firmware, %function
cnl_load_base_firmware:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r1, [r0]
	ldr	r3, .L21
	sub	sp, sp, #20
	cmp	r1, #0
	mov	r5, r0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r6, [r0, #12]
	beq	.L16
.L2:
	ldr	r3, [r6, #12]
	cmp	r3, #0
	beq	.L5
	ldr	r3, .L21+4
	mov	r0, r5
	ldr	r2, [r3]
	mov	r3, #0
	bl	snd_skl_parse_uuids
	subs	r4, r0, #0
	blt	.L4
	ldr	r1, [r5]
.L5:
	ldr	r3, [r1]
	ldr	r2, [r1, #4]
	add	r0, sp, #4
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	bl	skl_dsp_strip_extended_manifest
	mov	r0, r5
	ldr	r2, [sp, #4]
	ldr	r1, [sp, #8]
	bl	cnl_prepare_fw
	subs	r4, r0, #0
	blt	.L17
	mov	r0, r5
	bl	sst_transfer_fw_host_dma
	subs	r4, r0, #0
	blt	.L18
	ldr	r3, .L21+8
	ldr	r4, [r6, #8]
	ldr	r0, [r3]
	ldr	r7, [r6, #4]
	bl	msecs_to_jiffies
	mov	r1, r7
	mov	r2, r0
	mov	r0, r4
	bl	wait_event_timeout
	cmp	r0, #0
	movne	r3, #1
	movne	r4, #0
	strne	r3, [r6]
	beq	.L19
.L1:
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L18:
	ldr	r1, .L21+12
	mov	r2, r4
	ldr	r0, [r5, #4]
	bl	dev_err
	ldr	r3, .L21+16
	mov	r0, r5
	ldr	r1, [r3]
	bl	cnl_dsp_disable_core
.L4:
	ldr	r0, [r5]
	bl	release_firmware
	mov	r3, #0
	str	r3, [r5]
	b	.L1
.L17:
	mov	r2, r4
	ldr	r1, .L21+20
	ldr	r0, [r5, #4]
	bl	dev_err
	ldr	r0, [r5]
	bl	release_firmware
	mov	r3, #0
	str	r3, [r5]
	b	.L1
.L16:
	ldr	r2, [r0, #4]
	ldr	r1, [r0, #8]
	bl	request_firmware
	subs	r4, r0, #0
	blt	.L3
	ldr	r1, [r5]
	b	.L2
.L19:
	ldr	r1, .L21+24
	ldr	r0, [r5, #4]
	bl	dev_err
	ldr	r3, .L21+16
	mov	r0, r5
	ldr	r1, [r3]
	bl	cnl_dsp_disable_core
	ldr	r3, .L21+28
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L4
.L3:
	mov	r2, r4
	ldr	r1, .L21+32
	ldr	r0, [r5, #4]
	bl	dev_err
	b	.L4
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	.LC4
	.word	CNL_ADSP_FW_HDR_OFFSET
	.word	SKL_IPC_BOOT_MSECS
	.word	.LC2
	.word	SKL_DSP_CORE0_MASK
	.word	.LC1
	.word	.LC3
	.word	EIO
	.word	.LC0
	.size	cnl_load_base_firmware, .-cnl_load_base_firmware
	.comm	SKL_IPC_BOOT_MSECS,4,4
	.comm	SKL_DSP_CORE0_MASK,4,4
	.comm	EIO,4,4
	.comm	CNL_ADSP_FW_HDR_OFFSET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
