	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function load_c8sectpfe_fw
_load_c8sectpfe_fw:                     ## @load_c8sectpfe_fw
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	16(%rdi), %edi
	movq	_FIRMWARE_MEMDMA@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_info
	movl	(%rbx), %esi
	movl	16(%r14), %edx
	leaq	-24(%rbp), %rdi
	callq	_request_firmware
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movq	-24(%rbp), %rsi
	movq	%r14, %rdi
	callq	_c8sectpfe_elf_sanity_check
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	movl	16(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	-24(%rbp), %rdi
	callq	_release_firmware
	jmp	LBB0_9
LBB0_3:
	movq	-24(%rbp), %rdi
	movq	%r14, %rsi
	callq	_load_slim_core_fw
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %ebx
	movl	16(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_5
LBB0_6:
	movq	%r14, %rdi
	callq	_configure_channels
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	movl	16(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_5:
	movl	%ebx, %edx
	callq	_dev_err
LBB0_9:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	movq	_DMA_PER_STBUS_SYNC@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r14), %rsi
	movl	$1, %edi
	callq	_writel
	movl	16(%r14), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_info
	movq	_DMA_CPU_RUN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r14), %rsi
	movl	$1, %edi
	callq	_writel
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_atomic_set
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Loading firmware: %s\n"

	.comm	_FIRMWARE_MEMDMA,4,2            ## @FIRMWARE_MEMDMA
L_.str.1:                               ## @.str.1
	.asciz	"c8sectpfe_elf_sanity_check failed err=(%d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"load_slim_core_fw failed err=(%d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"configure_channels failed err=(%d)\n"

	.comm	_DMA_PER_STBUS_SYNC,8,3         ## @DMA_PER_STBUS_SYNC
L_.str.4:                               ## @.str.4
	.asciz	"Boot the memdma SLIM core\n"

	.comm	_DMA_CPU_RUN,8,3                ## @DMA_CPU_RUN
	.no_dead_strip	_load_c8sectpfe_fw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function load_c8sectpfe_fw
_load_c8sectpfe_fw:                     ; @load_c8sectpfe_fw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #16]
Lloh0:
	adrp	x20, _FIRMWARE_MEMDMA@GOTPAGE
Lloh1:
	ldr	x20, [x20, _FIRMWARE_MEMDMA@GOTPAGEOFF]
	ldr	w8, [x20]
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	ldr	w1, [x20]
	ldr	w2, [x19, #16]
	add	x0, sp, #8
	bl	_request_firmware
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.1:
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_c8sectpfe_elf_sanity_check
	cbz	w0, LBB0_3
; %bb.2:
	mov	x20, x0
	ldr	w0, [x19, #16]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	ldr	x0, [sp, #8]
	bl	_release_firmware
	b	LBB0_8
LBB0_3:
	ldr	x0, [sp, #8]
	mov	x1, x19
	bl	_load_slim_core_fw
	cbz	w0, LBB0_5
; %bb.4:
	mov	x20, x0
	ldr	w0, [x19, #16]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_configure_channels
	mov	x20, x0
	cbz	w0, LBB0_9
; %bb.6:
	ldr	w0, [x19, #16]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_7:
	mov	x2, x20
	bl	_dev_err
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_9:
	ldr	x8, [x19, #8]
Lloh10:
	adrp	x9, _DMA_PER_STBUS_SYNC@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DMA_PER_STBUS_SYNC@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #1
	bl	_writel
	ldr	w0, [x19, #16]
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_info
	ldr	x8, [x19, #8]
Lloh15:
	adrp	x9, _DMA_CPU_RUN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DMA_CPU_RUN@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #1
	bl	_writel
	mov	x0, x19
	mov	w1, #1
	bl	_atomic_set
	b	LBB0_8
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Loading firmware: %s\n"

	.comm	_FIRMWARE_MEMDMA,4,2            ; @FIRMWARE_MEMDMA
l_.str.1:                               ; @.str.1
	.asciz	"c8sectpfe_elf_sanity_check failed err=(%d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"load_slim_core_fw failed err=(%d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"configure_channels failed err=(%d)\n"

	.comm	_DMA_PER_STBUS_SYNC,8,3         ; @DMA_PER_STBUS_SYNC
l_.str.4:                               ; @.str.4
	.asciz	"Boot the memdma SLIM core\n"

	.comm	_DMA_CPU_RUN,8,3                ; @DMA_CPU_RUN
	.no_dead_strip	_load_c8sectpfe_fw
.subsections_via_symbols
