	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bfa_ioc_boot
_bfa_ioc_boot:                          ## @bfa_ioc_boot
	.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
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	_ioc_boots@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bfa_ioc_stats
	movq	%r12, %rdi
	callq	_bfa_ioc_pll_init
	movq	_BFA_STATUS_OK@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_1
## %bb.2:
	movq	_BFI_FWBOOT_ENV_OS@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_6
## %bb.3:
	movq	_BFI_FWBOOT_TYPE_NORMAL@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_6
## %bb.4:
	movq	%r12, %rdi
	callq	_bfa_ioc_asic_gen
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_bfa_cb_image_get_chunk
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_bfa_ioc_flash_fwver_cmp
	movq	_BFI_IOC_IMG_VER_BETTER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_BFI_FWBOOT_TYPE_FLASH@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_6:
	movq	_BFI_FWBOOT_TYPE_MEMTEST@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_7
## %bb.8:
	movq	_BFI_IOC_MEMTEST@GOTPCREL(%rip), %rbx
	jmp	LBB0_9
LBB0_1:
	movq	_BFA_STATUS_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_12
LBB0_7:
	movq	_BFI_IOC_INITING@GOTPCREL(%rip), %rbx
LBB0_9:
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_bfa_ioc_set_cur_ioc_fwstate
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_bfa_ioc_set_alt_ioc_fwstate
	movq	%r12, %rdi
	callq	_bfa_ioc_msgflush
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_bfa_ioc_download_fw
	movl	%eax, %ebx
	movl	%eax, %eax
	cmpq	%rax, (%r13)
	jne	LBB0_11
## %bb.10:
	movq	%r12, %rdi
	callq	_bfa_ioc_lpu_start
	jmp	LBB0_12
LBB0_11:
	movq	_IOCPF_E_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_bfa_fsm_send_event
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ioc_boots,4,2                  ## @ioc_boots
	.comm	_BFA_STATUS_OK,8,3              ## @BFA_STATUS_OK
	.comm	_BFA_STATUS_FAILED,4,2          ## @BFA_STATUS_FAILED
	.comm	_BFI_FWBOOT_ENV_OS,4,2          ## @BFI_FWBOOT_ENV_OS
	.comm	_BFI_FWBOOT_TYPE_NORMAL,4,2     ## @BFI_FWBOOT_TYPE_NORMAL
	.comm	_BFI_IOC_IMG_VER_BETTER,8,3     ## @BFI_IOC_IMG_VER_BETTER
	.comm	_BFI_FWBOOT_TYPE_FLASH,4,2      ## @BFI_FWBOOT_TYPE_FLASH
	.comm	_BFI_FWBOOT_TYPE_MEMTEST,4,2    ## @BFI_FWBOOT_TYPE_MEMTEST
	.comm	_BFI_IOC_MEMTEST,4,2            ## @BFI_IOC_MEMTEST
	.comm	_BFI_IOC_INITING,4,2            ## @BFI_IOC_INITING
	.comm	_IOCPF_E_TIMEOUT,4,2            ## @IOCPF_E_TIMEOUT
	.no_dead_strip	_bfa_ioc_boot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bfa_ioc_boot
_bfa_ioc_boot:                          ; @bfa_ioc_boot
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _ioc_boots@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ioc_boots@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_bfa_ioc_stats
	mov	x0, x19
	bl	_bfa_ioc_pll_init
Lloh3:
	adrp	x22, _BFA_STATUS_OK@GOTPAGE
Lloh4:
	ldr	x22, [x22, _BFA_STATUS_OK@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.1:
Lloh5:
	adrp	x8, _BFI_FWBOOT_ENV_OS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BFI_FWBOOT_ENV_OS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _BFI_FWBOOT_TYPE_NORMAL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BFI_FWBOOT_TYPE_NORMAL@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w20
	ccmp	w9, w21, #0, eq
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_bfa_ioc_asic_gen
	mov	w1, #0
	bl	_bfa_cb_image_get_chunk
	mov	x1, x0
	mov	x0, x19
	bl	_bfa_ioc_flash_fwver_cmp
Lloh11:
	adrp	x8, _BFI_IOC_IMG_VER_BETTER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BFI_IOC_IMG_VER_BETTER@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
Lloh14:
	adrp	x9, _BFI_FWBOOT_TYPE_FLASH@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BFI_FWBOOT_TYPE_FLASH@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	x0, x8
	csel	w21, w9, w21, eq
LBB0_3:
Lloh17:
	adrp	x8, _BFI_FWBOOT_TYPE_MEMTEST@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BFI_FWBOOT_TYPE_MEMTEST@GOTPAGEOFF]
Lloh19:
	adrp	x9, _BFI_IOC_INITING@GOTPAGE
Lloh20:
	ldr	x9, [x9, _BFI_IOC_INITING@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x10, _BFI_IOC_MEMTEST@GOTPAGE
Lloh23:
	ldr	x10, [x10, _BFI_IOC_MEMTEST@GOTPAGEOFF]
	cmp	w21, w8
	csel	x23, x10, x9, eq
	ldr	w1, [x23]
	mov	x0, x19
	bl	_bfa_ioc_set_cur_ioc_fwstate
	ldr	w1, [x23]
	mov	x0, x19
	bl	_bfa_ioc_set_alt_ioc_fwstate
	mov	x0, x19
	bl	_bfa_ioc_msgflush
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_bfa_ioc_download_fw
	mov	x20, x0
	ldr	x8, [x22]
	cmp	x8, w0, uxtw
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_bfa_ioc_lpu_start
	b	LBB0_7
LBB0_5:
Lloh24:
	adrp	x8, _BFA_STATUS_FAILED@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BFA_STATUS_FAILED@GOTPAGEOFF]
Lloh26:
	ldr	w20, [x8]
	b	LBB0_7
LBB0_6:
Lloh27:
	adrp	x8, _IOCPF_E_TIMEOUT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IOCPF_E_TIMEOUT@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bfa_fsm_send_event
LBB0_7:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_ioc_boots,4,2                  ; @ioc_boots
	.comm	_BFA_STATUS_OK,8,3              ; @BFA_STATUS_OK
	.comm	_BFA_STATUS_FAILED,4,2          ; @BFA_STATUS_FAILED
	.comm	_BFI_FWBOOT_ENV_OS,4,2          ; @BFI_FWBOOT_ENV_OS
	.comm	_BFI_FWBOOT_TYPE_NORMAL,4,2     ; @BFI_FWBOOT_TYPE_NORMAL
	.comm	_BFI_IOC_IMG_VER_BETTER,8,3     ; @BFI_IOC_IMG_VER_BETTER
	.comm	_BFI_FWBOOT_TYPE_FLASH,4,2      ; @BFI_FWBOOT_TYPE_FLASH
	.comm	_BFI_FWBOOT_TYPE_MEMTEST,4,2    ; @BFI_FWBOOT_TYPE_MEMTEST
	.comm	_BFI_IOC_MEMTEST,4,2            ; @BFI_IOC_MEMTEST
	.comm	_BFI_IOC_INITING,4,2            ; @BFI_IOC_INITING
	.comm	_IOCPF_E_TIMEOUT,4,2            ; @IOCPF_E_TIMEOUT
	.no_dead_strip	_bfa_ioc_boot
.subsections_via_symbols
