	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxfw_firmware_flash           ## -- Begin function mlxfw_firmware_flash
	.p2align	4, 0x90
_mlxfw_firmware_flash:                  ## @mlxfw_firmware_flash
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_mlxfw_mfa2_check
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_mlxfw_mfa2_file_init
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.14:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_NL_SET_ERR_MSG_MOD
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_info
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_mlxfw_status_notify
	movq	(%r12), %rax
	leaq	-44(%rbp), %rsi
	movq	%r12, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rdi
	callq	_pr_err
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_NL_SET_ERR_MSG_MOD
	jmp	LBB0_12
LBB0_5:
	movl	-44(%rbp), %esi
	movq	_MLXFW_FSM_STATE_LOCKED@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r12, %rdi
	movq	%r15, %rcx
	callq	_mlxfw_fsm_state_wait
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	movq	%r15, %rcx
	callq	_mlxfw_flash_components
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	leaq	L_.str.6(%rip), %rdi
	callq	_pr_debug
	leaq	L_.str.7(%rip), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_mlxfw_status_notify
	movq	(%r12), %rax
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	callq	*8(%rax)
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.8(%rip), %rdi
	callq	_pr_err
	leaq	L_.str.9(%rip), %rsi
	movq	%r15, %rdi
	callq	_NL_SET_ERR_MSG_MOD
	jmp	LBB0_9
LBB0_10:
	movl	-44(%rbp), %esi
	movl	(%r13), %edx
	movq	%r12, %rdi
	movq	%r15, %rcx
	callq	_mlxfw_fsm_state_wait
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_11
LBB0_9:
	movq	(%r12), %rax
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	callq	*16(%rax)
LBB0_12:
	movq	%r14, %rdi
	callq	_mlxfw_mfa2_file_fini
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leaq	L_.str.10(%rip), %rdi
	callq	_pr_debug
	movq	(%r12), %rax
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	callq	*16(%rax)
	leaq	L_.str.11(%rip), %rdi
	callq	_pr_info
	leaq	L_.str.12(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_mlxfw_status_notify
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Firmware file is not MFA2\n"

L_.str.1:                               ## @.str.1
	.asciz	"Firmware file is not MFA2"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"Initialize firmware flash process\n"

L_.str.3:                               ## @.str.3
	.asciz	"Initializing firmware flash process"

L_.str.4:                               ## @.str.4
	.asciz	"Could not lock the firmware FSM\n"

L_.str.5:                               ## @.str.5
	.asciz	"Could not lock the firmware FSM"

	.comm	_MLXFW_FSM_STATE_LOCKED,4,2     ## @MLXFW_FSM_STATE_LOCKED
L_.str.6:                               ## @.str.6
	.asciz	"Activate image\n"

L_.str.7:                               ## @.str.7
	.asciz	"Activating image"

L_.str.8:                               ## @.str.8
	.asciz	"Could not activate the downloaded image\n"

L_.str.9:                               ## @.str.9
	.asciz	"Could not activate the downloaded image"

L_.str.10:                              ## @.str.10
	.asciz	"Handle release\n"

L_.str.11:                              ## @.str.11
	.asciz	"Firmware flash done.\n"

L_.str.12:                              ## @.str.12
	.asciz	"Firmware flash done"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxfw_firmware_flash           ; -- Begin function mlxfw_firmware_flash
	.p2align	2
_mlxfw_firmware_flash:                  ; @mlxfw_firmware_flash
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_mlxfw_mfa2_check
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_mlxfw_mfa2_file_init
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_NL_SET_ERR_MSG_MOD
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_13
LBB0_4:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_mlxfw_status_notify
	ldr	x8, [x20]
	ldr	x8, [x8]
	add	x1, sp, #12
	mov	x0, x20
	blr	x8
	cbz	w0, LBB0_6
; %bb.5:
	mov	x22, x0
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_err
Lloh13:
	adrp	x1, l_.str.5@PAGE
Lloh14:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_NL_SET_ERR_MSG_MOD
	b	LBB0_12
LBB0_6:
	ldr	w1, [sp, #12]
Lloh15:
	adrp	x23, _MLXFW_FSM_STATE_LOCKED@GOTPAGE
Lloh16:
	ldr	x23, [x23, _MLXFW_FSM_STATE_LOCKED@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x20
	mov	x3, x21
	bl	_mlxfw_fsm_state_wait
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.7:
	ldr	w1, [sp, #12]
	mov	x0, x20
	mov	x2, x19
	mov	x3, x21
	bl	_mlxfw_flash_components
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.8:
Lloh17:
	adrp	x0, l_.str.6@PAGE
Lloh18:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_pr_debug
Lloh19:
	adrp	x1, l_.str.7@PAGE
Lloh20:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_mlxfw_status_notify
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	ldr	w1, [sp, #12]
	mov	x0, x20
	blr	x8
	cbz	w0, LBB0_10
; %bb.9:
	mov	x22, x0
Lloh21:
	adrp	x0, l_.str.8@PAGE
Lloh22:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_pr_err
Lloh23:
	adrp	x1, l_.str.9@PAGE
Lloh24:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x21
	bl	_NL_SET_ERR_MSG_MOD
	b	LBB0_11
LBB0_10:
	ldr	w1, [sp, #12]
	ldr	w2, [x23]
	mov	x0, x20
	mov	x3, x21
	bl	_mlxfw_fsm_state_wait
	mov	x22, x0
	cbz	w0, LBB0_14
LBB0_11:
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	ldr	w1, [sp, #12]
	mov	x0, x20
	blr	x8
LBB0_12:
	mov	x0, x19
	bl	_mlxfw_mfa2_file_fini
LBB0_13:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_14:
Lloh25:
	adrp	x0, l_.str.10@PAGE
Lloh26:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_pr_debug
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	ldr	w1, [sp, #12]
	mov	x0, x20
	blr	x8
Lloh27:
	adrp	x0, l_.str.11@PAGE
Lloh28:
	add	x0, x0, l_.str.11@PAGEOFF
	bl	_pr_info
Lloh29:
	adrp	x1, l_.str.12@PAGE
Lloh30:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	x0, x20
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_mlxfw_status_notify
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Firmware file is not MFA2\n"

l_.str.1:                               ; @.str.1
	.asciz	"Firmware file is not MFA2"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"Initialize firmware flash process\n"

l_.str.3:                               ; @.str.3
	.asciz	"Initializing firmware flash process"

l_.str.4:                               ; @.str.4
	.asciz	"Could not lock the firmware FSM\n"

l_.str.5:                               ; @.str.5
	.asciz	"Could not lock the firmware FSM"

	.comm	_MLXFW_FSM_STATE_LOCKED,4,2     ; @MLXFW_FSM_STATE_LOCKED
l_.str.6:                               ; @.str.6
	.asciz	"Activate image\n"

l_.str.7:                               ; @.str.7
	.asciz	"Activating image"

l_.str.8:                               ; @.str.8
	.asciz	"Could not activate the downloaded image\n"

l_.str.9:                               ; @.str.9
	.asciz	"Could not activate the downloaded image"

l_.str.10:                              ; @.str.10
	.asciz	"Handle release\n"

l_.str.11:                              ; @.str.11
	.asciz	"Firmware flash done.\n"

l_.str.12:                              ; @.str.12
	.asciz	"Firmware flash done"

.subsections_via_symbols
