	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ice_rebuild
_ice_rebuild:                           ## @ice_rebuild
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	movq	___ICE_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_20
## %bb.1:
	leaq	16(%r12), %r15
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_ice_init_all_ctrlq
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_3
LBB0_4:
	movq	%r12, %rdi
	callq	_ice_is_safe_mode
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movq	_ICE_RESET_PFR@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_ice_fill_blk_tbls
	jmp	LBB0_8
LBB0_7:
	xorl	%edi, %edi
	movq	%r12, %rsi
	callq	_ice_load_pkg
LBB0_8:
	movq	%r15, %rdi
	callq	_ice_clear_pf_cfg
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_3
LBB0_10:
	movq	%r15, %rdi
	callq	_ice_clear_pxe_mode
	movq	%r15, %rdi
	callq	_ice_get_caps
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.3(%rip), %rsi
LBB0_3:
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_19:
	movq	%r15, %rdi
	callq	_ice_shutdown_all_ctrlq
	movq	___ICE_RESET_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_set_bit
LBB0_20:
	movq	___ICE_NEEDS_RESTART@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_set_bit
	leaq	L_.str.9(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_12:
	movl	(%r15), %edi
	callq	_ice_sched_init_port
	testl	%eax, %eax
	jne	LBB0_18
## %bb.13:
	movl	(%r15), %edi
	callq	_ice_update_link_info
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movq	8(%r12), %rdi
	leaq	L_.str.4(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_15:
	movq	%r12, %rdi
	callq	_ice_req_irq_msix_misc
	testl	%eax, %eax
	je	LBB0_21
## %bb.16:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_17
LBB0_21:
	movq	_ICE_FLAG_DCB_ENA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r12), %esi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movq	%r12, %rdi
	callq	_ice_dcb_rebuild
LBB0_23:
	movq	_ICE_VSI_PF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ice_vsi_rebuild_by_type
	testl	%eax, %eax
	je	LBB0_25
## %bb.24:
	leaq	L_.str.6(%rip), %rsi
LBB0_17:
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_18:
	movq	%r15, %rdi
	callq	_ice_sched_cleanup_all
	jmp	LBB0_19
LBB0_25:
	movq	_ICE_FLAG_SRIOV_ENA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r12), %esi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_28
## %bb.26:
	movq	_ICE_VSI_VF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ice_vsi_rebuild_by_type
	testl	%eax, %eax
	je	LBB0_28
## %bb.27:
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_17
LBB0_28:
	movq	%r12, %rdi
	callq	_ice_update_pf_netdev_link
	movq	%r12, %rdi
	callq	_ice_send_version
	testl	%eax, %eax
	je	LBB0_30
## %bb.29:
	leaq	L_.str.8(%rip), %rsi
	jmp	LBB0_17
LBB0_30:
	movq	%r15, %rdi
	callq	_ice_replay_post
	movq	___ICE_RESET_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_clear_bit                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	___ICE_DOWN,4,2                 ## @__ICE_DOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rebuilding PF after reset_type=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"control queues init failed %d\n"

	.comm	_ICE_RESET_PFR,4,2              ## @ICE_RESET_PFR
L_.str.2:                               ## @.str.2
	.asciz	"clear PF configuration failed %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"ice_get_caps failed %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Get link status error %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"misc vector setup failed: %d\n"

	.comm	_ICE_FLAG_DCB_ENA,4,2           ## @ICE_FLAG_DCB_ENA
	.comm	_ICE_VSI_PF,4,2                 ## @ICE_VSI_PF
L_.str.6:                               ## @.str.6
	.asciz	"PF VSI rebuild failed: %d\n"

	.comm	_ICE_FLAG_SRIOV_ENA,4,2         ## @ICE_FLAG_SRIOV_ENA
	.comm	_ICE_VSI_VF,4,2                 ## @ICE_VSI_VF
L_.str.7:                               ## @.str.7
	.asciz	"VF VSI rebuild failed: %d\n"

L_.str.8:                               ## @.str.8
	.asciz	"Rebuild failed due to error sending driver version: %d\n"

	.comm	___ICE_RESET_FAILED,4,2         ## @__ICE_RESET_FAILED
	.comm	___ICE_NEEDS_RESTART,4,2        ## @__ICE_NEEDS_RESTART
L_.str.9:                               ## @.str.9
	.asciz	"Rebuild failed, unload and reload driver\n"

	.no_dead_strip	_ice_rebuild
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ice_rebuild
_ice_rebuild:                           ; @ice_rebuild
	.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	x22, x1
	mov	x19, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x8, ___ICE_DOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___ICE_DOWN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_test_bit
	cbnz	x0, LBB0_13
; %bb.1:
	add	x21, x19, #16
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	bl	_dev_dbg
	mov	x0, x21
	bl	_ice_init_all_ctrlq
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_3
; %bb.2:
	str	x0, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_3:
	mov	x0, x19
	bl	_ice_is_safe_mode
	cbnz	w0, LBB0_7
; %bb.4:
Lloh7:
	adrp	x8, _ICE_RESET_PFR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ICE_RESET_PFR@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_ice_fill_blk_tbls
	b	LBB0_7
LBB0_6:
	mov	x0, #0
	mov	x1, x19
	bl	_ice_load_pkg
LBB0_7:
	mov	x0, x21
	bl	_ice_clear_pf_cfg
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_9
; %bb.8:
	str	x0, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_9:
	mov	x0, x21
	bl	_ice_clear_pxe_mode
	mov	x0, x21
	bl	_ice_get_caps
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_14
; %bb.10:
	str	x0, [sp]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_11:
	mov	x0, x20
	bl	_dev_err
LBB0_12:
	mov	x0, x21
	bl	_ice_shutdown_all_ctrlq
Lloh14:
	adrp	x8, ___ICE_RESET_FAILED@GOTPAGE
Lloh15:
	ldr	x8, [x8, ___ICE_RESET_FAILED@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_set_bit
LBB0_13:
Lloh17:
	adrp	x8, ___ICE_NEEDS_RESTART@GOTPAGE
Lloh18:
	ldr	x8, [x8, ___ICE_NEEDS_RESTART@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_set_bit
Lloh20:
	adrp	x1, l_.str.9@PAGE
Lloh21:
	add	x1, x1, l_.str.9@PAGEOFF
	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
	b	_dev_err
LBB0_14:
	ldr	w0, [x21]
	bl	_ice_sched_init_port
	cbnz	w0, LBB0_24
; %bb.15:
	ldr	w0, [x21]
	bl	_ice_update_link_info
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_17
; %bb.16:
	ldr	x8, [x19, #8]
	str	x0, [sp]
Lloh22:
	adrp	x1, l_.str.4@PAGE
Lloh23:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x8
	bl	_dev_err
LBB0_17:
	mov	x0, x19
	bl	_ice_req_irq_msix_misc
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_19
; %bb.18:
	str	x0, [sp]
Lloh24:
	adrp	x1, l_.str.5@PAGE
Lloh25:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_23
LBB0_19:
Lloh26:
	adrp	x8, _ICE_FLAG_DCB_ENA@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ICE_FLAG_DCB_ENA@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	_test_bit
	cbz	x0, LBB0_21
; %bb.20:
	mov	x0, x19
	bl	_ice_dcb_rebuild
LBB0_21:
Lloh29:
	adrp	x8, _ICE_VSI_PF@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ICE_VSI_PF@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ice_vsi_rebuild_by_type
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_25
; %bb.22:
	str	x0, [sp]
Lloh32:
	adrp	x1, l_.str.6@PAGE
Lloh33:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_23:
	mov	x0, x20
	bl	_dev_err
LBB0_24:
	mov	x0, x21
	bl	_ice_sched_cleanup_all
	b	LBB0_12
LBB0_25:
Lloh34:
	adrp	x8, _ICE_FLAG_SRIOV_ENA@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ICE_FLAG_SRIOV_ENA@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	_test_bit
	cbz	x0, LBB0_28
; %bb.26:
Lloh37:
	adrp	x8, _ICE_VSI_VF@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ICE_VSI_VF@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ice_vsi_rebuild_by_type
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_28
; %bb.27:
	str	x0, [sp]
Lloh40:
	adrp	x1, l_.str.7@PAGE
Lloh41:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_23
LBB0_28:
	mov	x0, x19
	bl	_ice_update_pf_netdev_link
	mov	x0, x19
	bl	_ice_send_version
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_30
; %bb.29:
	str	x0, [sp]
Lloh42:
	adrp	x1, l_.str.8@PAGE
Lloh43:
	add	x1, x1, l_.str.8@PAGEOFF
	b	LBB0_23
LBB0_30:
	mov	x0, x21
	bl	_ice_replay_post
Lloh44:
	adrp	x8, ___ICE_RESET_FAILED@GOTPAGE
Lloh45:
	ldr	x8, [x8, ___ICE_RESET_FAILED@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
	ldr	w1, [x19]
	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
	b	_clear_bit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	___ICE_DOWN,4,2                 ; @__ICE_DOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rebuilding PF after reset_type=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"control queues init failed %d\n"

	.comm	_ICE_RESET_PFR,4,2              ; @ICE_RESET_PFR
l_.str.2:                               ; @.str.2
	.asciz	"clear PF configuration failed %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"ice_get_caps failed %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Get link status error %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"misc vector setup failed: %d\n"

	.comm	_ICE_FLAG_DCB_ENA,4,2           ; @ICE_FLAG_DCB_ENA
	.comm	_ICE_VSI_PF,4,2                 ; @ICE_VSI_PF
l_.str.6:                               ; @.str.6
	.asciz	"PF VSI rebuild failed: %d\n"

	.comm	_ICE_FLAG_SRIOV_ENA,4,2         ; @ICE_FLAG_SRIOV_ENA
	.comm	_ICE_VSI_VF,4,2                 ; @ICE_VSI_VF
l_.str.7:                               ; @.str.7
	.asciz	"VF VSI rebuild failed: %d\n"

l_.str.8:                               ; @.str.8
	.asciz	"Rebuild failed due to error sending driver version: %d\n"

	.comm	___ICE_RESET_FAILED,4,2         ; @__ICE_RESET_FAILED
	.comm	___ICE_NEEDS_RESTART,4,2        ; @__ICE_NEEDS_RESTART
l_.str.9:                               ; @.str.9
	.asciz	"Rebuild failed, unload and reload driver\n"

	.no_dead_strip	_ice_rebuild
.subsections_via_symbols
