	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mip4_execute_fw_update
_mip4_execute_fw_update:                ## @mip4_execute_fw_update
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	-40(%rbp), %rdx
	leaq	-36(%rbp), %rcx
	leaq	-48(%rbp), %r8
	callq	_mip4_parse_firmware
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movq	8(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_disable_irq
LBB0_4:
	movl	$-2, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movl	-36(%rbp), %edx
	movl	-40(%rbp), %ecx
	movq	%r14, %rdi
	callq	_mip4_flash_fw
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leal	1(%rbx), %eax
	testl	%ebx, %ebx
	movl	%eax, %ebx
	jne	LBB0_5
LBB0_7:
	testl	%r12d, %r12d
	je	LBB0_9
## %bb.8:
	movq	(%r14), %rdi
	addq	$4, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_dev_err
LBB0_9:
	movq	8(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.10:
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_enable_irq
	jmp	LBB0_12
LBB0_3:
	movq	%r14, %rdi
	callq	_mip4_power_on
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_12
	jmp	LBB0_4
LBB0_11:
	movq	%r14, %rdi
	callq	_mip4_power_off
LBB0_12:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to flash firmware: %d\n"

	.no_dead_strip	_mip4_execute_fw_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mip4_execute_fw_update
_mip4_execute_fw_update:                ; @mip4_execute_fw_update
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x19, x0
	add	x2, sp, #4
	mov	x3, sp
	add	x4, sp, #8
	bl	_mip4_parse_firmware
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.2:
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_disable_irq
LBB0_3:
	ldr	w1, [x21]
	ldp	w2, w3, [sp]
	mov	x0, x19
	bl	_mip4_flash_fw
	cmp	w0, #0
	cset	w8, eq
	cbz	w0, LBB0_6
; %bb.4:
	ldr	w1, [x21]
	ldp	w2, w3, [sp]
	mov	x0, x19
	bl	_mip4_flash_fw
	cmp	w0, #0
	cset	w8, eq
	cbz	w0, LBB0_6
; %bb.5:
	ldr	w1, [x21]
	ldp	w2, w3, [sp]
	mov	x0, x19
	bl	_mip4_flash_fw
	mov	x20, x0
	cmp	w0, #0
	cset	w8, eq
	tbz	w8, #0, LBB0_7
	b	LBB0_8
LBB0_6:
	mov	x20, x0
	tbnz	w8, #0, LBB0_8
LBB0_7:
	ldr	x8, [x19]
	add	x0, x8, #4
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
LBB0_8:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.9:
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_enable_irq
	b	LBB0_12
LBB0_10:
	mov	x0, x19
	bl	_mip4_power_on
	mov	x20, x0
	cbnz	w0, LBB0_12
	b	LBB0_3
LBB0_11:
	mov	x0, x19
	bl	_mip4_power_off
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to flash firmware: %d\n"

	.no_dead_strip	_mip4_execute_fw_update
.subsections_via_symbols
