	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_start_freeze_handling          ## -- Begin function start_freeze_handling
	.p2align	4, 0x90
_start_freeze_handling:                 ## @start_freeze_handling
	.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	%esi, %r15d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r13
	movq	_FREEZE_SELF@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_CCE_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CCE_CTRL_SPC_FREEZE_SMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_write_csr
LBB0_2:
	movq	_HFI1_FROZEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r13)
	movq	_FREEZE_LINK_DOWN@GOTPCREL(%rip), %rbx
	xorl	%esi, %esi
	movl	(%rbx), %eax
	andl	%r15d, %eax
	setne	%sil
	movq	%r13, %rdi
	callq	_sdma_freeze_notify
	movl	(%rbx), %ecx
	andl	%r15d, %ecx
	je	LBB0_4
## %bb.3:
	movq	_SCF_LINK_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_4:
	movl	(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_10
## %bb.5:
	movq	_SCF_HALTED@GOTPCREL(%rip), %rdx
	movq	_SCF_FROZEN@GOTPCREL(%rip), %rsi
	movl	(%rdx), %r12d
	orl	(%rsi), %r12d
	orl	%ecx, %r12d
	xorl	%ebx, %ebx
	movq	_SCF_ENABLED@GOTPCREL(%rip), %r14
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r14), %ecx
	testl	%ecx, (%rdi)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %esi
	callq	_sc_stop
	movl	(%r13), %eax
	jmp	LBB0_9
LBB0_10:
	movq	__HFI1_EVENT_FROZEN_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_hfi1_set_uevent_bits
	movq	_FREEZE_ABORT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_12
## %bb.11:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dd_dev_err                     ## TAILCALL
LBB0_12:
	movl	4(%rbx), %edi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_queue_work                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FREEZE_SELF,4,2                ## @FREEZE_SELF
	.comm	_CCE_CTRL,4,2                   ## @CCE_CTRL
	.comm	_CCE_CTRL_SPC_FREEZE_SMASK,4,2  ## @CCE_CTRL_SPC_FREEZE_SMASK
	.comm	_HFI1_FROZEN,4,2                ## @HFI1_FROZEN
	.comm	_FREEZE_LINK_DOWN,4,2           ## @FREEZE_LINK_DOWN
	.comm	_SCF_FROZEN,4,2                 ## @SCF_FROZEN
	.comm	_SCF_HALTED,4,2                 ## @SCF_HALTED
	.comm	_SCF_LINK_DOWN,4,2              ## @SCF_LINK_DOWN
	.comm	_SCF_ENABLED,4,2                ## @SCF_ENABLED
	.comm	__HFI1_EVENT_FROZEN_BIT,4,2     ## @_HFI1_EVENT_FROZEN_BIT
	.comm	_FREEZE_ABORT,4,2               ## @FREEZE_ABORT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Aborted freeze recovery. Please REBOOT system\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_start_freeze_handling          ; -- Begin function start_freeze_handling
	.p2align	2
_start_freeze_handling:                 ; @start_freeze_handling
	.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	x21, x1
	mov	x19, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x8, _FREEZE_SELF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FREEZE_SELF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _CCE_CTRL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CCE_CTRL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _CCE_CTRL_SPC_FREEZE_SMASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CCE_CTRL_SPC_FREEZE_SMASK@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_write_csr
LBB0_2:
Lloh9:
	adrp	x8, _HFI1_FROZEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HFI1_FROZEN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x20, #16]
	orr	w8, w9, w8
	str	w8, [x20, #16]
Lloh12:
	adrp	x22, _FREEZE_LINK_DOWN@GOTPAGE
Lloh13:
	ldr	x22, [x22, _FREEZE_LINK_DOWN@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w21
	cset	w1, ne
	mov	x0, x20
	bl	_sdma_freeze_notify
Lloh14:
	adrp	x8, _SCF_LINK_DOWN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SCF_LINK_DOWN@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh16:
	ldr	w8, [x8]
	tst	w9, w21
	csel	w9, wzr, w8, eq
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x23, #0
Lloh17:
	adrp	x10, _SCF_FROZEN@GOTPAGE
Lloh18:
	ldr	x10, [x10, _SCF_FROZEN@GOTPAGEOFF]
Lloh19:
	adrp	x11, _SCF_HALTED@GOTPAGE
Lloh20:
	ldr	x11, [x11, _SCF_HALTED@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
Lloh22:
	ldr	w11, [x11]
	orr	w10, w11, w10
	orr	w22, w10, w9
Lloh23:
	adrp	x24, _SCF_ENABLED@GOTPAGE
Lloh24:
	ldr	x24, [x24, _SCF_ENABLED@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	cmp	x23, w8, sxtw
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #8]
	ldr	x0, [x9, x23, lsl #3]
	cbz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x0]
	ldr	w10, [x24]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x22
	bl	_sc_stop
	ldr	w8, [x20]
	b	LBB0_4
LBB0_8:
Lloh25:
	adrp	x8, __HFI1_EVENT_FROZEN_BIT@GOTPAGE
Lloh26:
	ldr	x8, [x8, __HFI1_EVENT_FROZEN_BIT@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hfi1_set_uevent_bits
Lloh28:
	adrp	x8, _FREEZE_ABORT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _FREEZE_ABORT@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_10
; %bb.9:
Lloh31:
	adrp	x1, l_.str@PAGE
Lloh32:
	add	x1, x1, l_.str@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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_dd_dev_err
LBB0_10:
	ldr	w0, [x19, #4]
	mov	x1, 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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_queue_work
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_FREEZE_SELF,4,2                ; @FREEZE_SELF
	.comm	_CCE_CTRL,4,2                   ; @CCE_CTRL
	.comm	_CCE_CTRL_SPC_FREEZE_SMASK,4,2  ; @CCE_CTRL_SPC_FREEZE_SMASK
	.comm	_HFI1_FROZEN,4,2                ; @HFI1_FROZEN
	.comm	_FREEZE_LINK_DOWN,4,2           ; @FREEZE_LINK_DOWN
	.comm	_SCF_FROZEN,4,2                 ; @SCF_FROZEN
	.comm	_SCF_HALTED,4,2                 ; @SCF_HALTED
	.comm	_SCF_LINK_DOWN,4,2              ; @SCF_LINK_DOWN
	.comm	_SCF_ENABLED,4,2                ; @SCF_ENABLED
	.comm	__HFI1_EVENT_FROZEN_BIT,4,2     ; @_HFI1_EVENT_FROZEN_BIT
	.comm	_FREEZE_ABORT,4,2               ; @FREEZE_ABORT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Aborted freeze recovery. Please REBOOT system\n"

.subsections_via_symbols
