	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ice_do_reset
_ice_do_reset:                          ## @ice_do_reset
	.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, %r14d
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	leaq	8(%rdi), %r12
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_dev_dbg
	xorl	%eax, %eax
	callq	_in_interrupt
	movl	%eax, %edi
	callq	_WARN_ON
	movq	%rbx, %rdi
	callq	_ice_prepare_for_reset
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_ice_reset
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_dev_err
	movq	___ICE_RESET_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_set_bit
	movq	___ICE_RESET_OICR_RECV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_clear_bit
	movq	___ICE_PREPARED_FOR_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_clear_bit
	movq	___ICE_PFR_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_clear_bit
	movq	___ICE_CORER_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_clear_bit
	movq	___ICE_GLOBR_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_clear_bit                      ## TAILCALL
LBB0_1:
	movq	_ICE_RESET_PFR@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_2
## %bb.4:
	incl	4(%rbx)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_ice_rebuild
	movq	___ICE_PREPARED_FOR_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_clear_bit
	movq	___ICE_PFR_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_clear_bit
	movq	%rbx, %rdi
	movl	$1, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ice_reset_all_vfs              ## TAILCALL
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset_type 0x%x requested\n"

L_.str.1:                               ## @.str.1
	.asciz	"reset %d failed\n"

	.comm	___ICE_RESET_FAILED,4,2         ## @__ICE_RESET_FAILED
	.comm	___ICE_RESET_OICR_RECV,4,2      ## @__ICE_RESET_OICR_RECV
	.comm	___ICE_PREPARED_FOR_RESET,4,2   ## @__ICE_PREPARED_FOR_RESET
	.comm	___ICE_PFR_REQ,4,2              ## @__ICE_PFR_REQ
	.comm	___ICE_CORER_REQ,4,2            ## @__ICE_CORER_REQ
	.comm	___ICE_GLOBR_REQ,4,2            ## @__ICE_GLOBR_REQ
	.comm	_ICE_RESET_PFR,4,2              ## @ICE_RESET_PFR
	.no_dead_strip	_ice_do_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ice_do_reset
_ice_do_reset:                          ; @ice_do_reset
	.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	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #16]
	add	x22, x0, #8
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_dev_dbg
	bl	_in_interrupt
	bl	_WARN_ON
	mov	x0, x19
	bl	_ice_prepare_for_reset
	mov	x0, x22
	mov	x1, x20
	bl	_ice_reset
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_dev_err
Lloh4:
	adrp	x8, ___ICE_RESET_FAILED@GOTPAGE
Lloh5:
	ldr	x8, [x8, ___ICE_RESET_FAILED@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_set_bit
Lloh7:
	adrp	x8, ___ICE_RESET_OICR_RECV@GOTPAGE
Lloh8:
	ldr	x8, [x8, ___ICE_RESET_OICR_RECV@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_clear_bit
Lloh10:
	adrp	x8, ___ICE_PREPARED_FOR_RESET@GOTPAGE
Lloh11:
	ldr	x8, [x8, ___ICE_PREPARED_FOR_RESET@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_clear_bit
Lloh13:
	adrp	x8, ___ICE_PFR_REQ@GOTPAGE
Lloh14:
	ldr	x8, [x8, ___ICE_PFR_REQ@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_clear_bit
Lloh16:
	adrp	x8, ___ICE_CORER_REQ@GOTPAGE
Lloh17:
	ldr	x8, [x8, ___ICE_CORER_REQ@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_clear_bit
Lloh19:
	adrp	x8, ___ICE_GLOBR_REQ@GOTPAGE
Lloh20:
	ldr	x8, [x8, ___ICE_GLOBR_REQ@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	ldr	w1, [x19]
	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
	b	_clear_bit
LBB0_2:
Lloh22:
	adrp	x8, _ICE_RESET_PFR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ICE_RESET_PFR@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_4
; %bb.3:
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
	mov	x0, x19
	mov	x1, x20
	bl	_ice_rebuild
Lloh25:
	adrp	x8, ___ICE_PREPARED_FOR_RESET@GOTPAGE
Lloh26:
	ldr	x8, [x8, ___ICE_PREPARED_FOR_RESET@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_clear_bit
Lloh28:
	adrp	x8, ___ICE_PFR_REQ@GOTPAGE
Lloh29:
	ldr	x8, [x8, ___ICE_PFR_REQ@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_clear_bit
	mov	x0, x19
	mov	w1, #1
	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
	b	_ice_reset_all_vfs
LBB0_4:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset_type 0x%x requested\n"

l_.str.1:                               ; @.str.1
	.asciz	"reset %d failed\n"

	.comm	___ICE_RESET_FAILED,4,2         ; @__ICE_RESET_FAILED
	.comm	___ICE_RESET_OICR_RECV,4,2      ; @__ICE_RESET_OICR_RECV
	.comm	___ICE_PREPARED_FOR_RESET,4,2   ; @__ICE_PREPARED_FOR_RESET
	.comm	___ICE_PFR_REQ,4,2              ; @__ICE_PFR_REQ
	.comm	___ICE_CORER_REQ,4,2            ; @__ICE_CORER_REQ
	.comm	___ICE_GLOBR_REQ,4,2            ; @__ICE_GLOBR_REQ
	.comm	_ICE_RESET_PFR,4,2              ; @ICE_RESET_PFR
	.no_dead_strip	_ice_do_reset
.subsections_via_symbols
