	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_83xx_restart_hw
_qlcnic_83xx_restart_hw:                ## @qlcnic_83xx_restart_hw
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_EIO@GOTPCREL(%rip), %r15
	xorl	%r14d, %r14d
	subl	(%r15), %r14d
	callq	_qlcnic_83xx_stop_hw
	movl	(%rbx), %edi
	movq	_QLC_83XX_IDC_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_QLCRDX
	movq	_QLC_83XX_IDC_GRACEFULL_RESET@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_qlcnic_dump_fw
LBB0_2:
	movq	%rbx, %rdi
	callq	_qlcnic_83xx_init_hw
	movq	%rbx, %rdi
	callq	_qlcnic_83xx_copy_bootloader
	testq	%rax, %rax
	je	LBB0_3
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_qlcnic_load_fw_file@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_qlcnic_83xx_load_fw_image_from_host
	testq	%rax, %rax
	jne	LBB0_8
	jmp	LBB0_6
LBB0_5:
	movq	_QLCNIC_FW_IMG_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_QLC_83XX_BOOT_FROM_FLASH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_QLC_SHARED_REG_WR32
LBB0_6:
	movq	%rbx, %rdi
	callq	_qlcnic_83xx_start_hw
	movq	%rbx, %rdi
	callq	_qlcnic_83xx_check_hw_status
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	subl	(%r15), %r14d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_QLC_83XX_IDC_CTRL,4,2          ## @QLC_83XX_IDC_CTRL
	.comm	_QLC_83XX_IDC_GRACEFULL_RESET,4,2 ## @QLC_83XX_IDC_GRACEFULL_RESET
	.comm	_qlcnic_load_fw_file,8,3        ## @qlcnic_load_fw_file
	.comm	_QLCNIC_FW_IMG_VALID,4,2        ## @QLCNIC_FW_IMG_VALID
	.comm	_QLC_83XX_BOOT_FROM_FLASH,4,2   ## @QLC_83XX_BOOT_FROM_FLASH
	.no_dead_strip	_qlcnic_83xx_restart_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qlcnic_83xx_restart_hw
_qlcnic_83xx_restart_hw:                ; @qlcnic_83xx_restart_hw
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x21, _EIO@GOTPAGE
Lloh1:
	ldr	x21, [x21, _EIO@GOTPAGEOFF]
	ldr	w8, [x21]
	neg	w20, w8
	bl	_qlcnic_83xx_stop_hw
	ldr	w0, [x19]
Lloh2:
	adrp	x8, _QLC_83XX_IDC_CTRL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _QLC_83XX_IDC_CTRL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_QLCRDX
Lloh5:
	adrp	x8, _QLC_83XX_IDC_GRACEFULL_RESET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _QLC_83XX_IDC_GRACEFULL_RESET@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_qlcnic_dump_fw
LBB0_2:
	mov	x0, x19
	bl	_qlcnic_83xx_init_hw
	mov	x0, x19
	bl	_qlcnic_83xx_copy_bootloader
	cbz	x0, LBB0_4
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh8:
	adrp	x8, _qlcnic_load_fw_file@GOTPAGE
Lloh9:
	ldr	x8, [x8, _qlcnic_load_fw_file@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_qlcnic_83xx_load_fw_image_from_host
	cbnz	x0, LBB0_3
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _QLCNIC_FW_IMG_VALID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _QLCNIC_FW_IMG_VALID@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _QLC_83XX_BOOT_FROM_FLASH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _QLC_83XX_BOOT_FROM_FLASH@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_QLC_SHARED_REG_WR32
LBB0_7:
	mov	x0, x19
	bl	_qlcnic_83xx_start_hw
	mov	x0, x19
	bl	_qlcnic_83xx_check_hw_status
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w8, [x21]
	neg	w20, w8
	b	LBB0_3
LBB0_9:
	mov	w20, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_QLC_83XX_IDC_CTRL,4,2          ; @QLC_83XX_IDC_CTRL
	.comm	_QLC_83XX_IDC_GRACEFULL_RESET,4,2 ; @QLC_83XX_IDC_GRACEFULL_RESET
	.comm	_qlcnic_load_fw_file,8,3        ; @qlcnic_load_fw_file
	.comm	_QLCNIC_FW_IMG_VALID,4,2        ; @QLCNIC_FW_IMG_VALID
	.comm	_QLC_83XX_BOOT_FROM_FLASH,4,2   ; @QLC_83XX_BOOT_FROM_FLASH
	.no_dead_strip	_qlcnic_83xx_restart_hw
.subsections_via_symbols
