	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function guest_reset
_guest_reset:                           ## @guest_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	%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
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rdi
	callq	_pr_devel
	leaq	4(%r12), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	movq	_CXL_ERROR_DETECTED_EVENT@GOTPCREL(%rip), %r15
	movq	_pci_channel_io_frozen@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rcx
	movq	(%rcx,%rbx,8), %r14
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %esi
	movl	(%r13), %edx
	movq	%r14, %rdi
	callq	_pci_error_handlers
	movq	%r14, %rdi
	callq	_cxl_context_detach_all
	movl	(%r12), %eax
	jmp	LBB0_4
LBB0_5:
	movq	16(%r12), %rax
	movl	(%rax), %edi
	callq	_cxl_h_reset_adapter
	movl	%eax, %r15d
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.6:
	xorl	%ebx, %ebx
	movq	_CXL_RESUME_EVENT@GOTPCREL(%rip), %r14
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	testl	%r15d, %r15d
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r12), %rcx
	movq	(%rcx,%rbx,8), %r13
	testq	%r13, %r13
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_CXL_SLOT_RESET_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_pci_channel_io_normal@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_pci_error_handlers
	movl	(%r14), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_pci_error_handlers
	movl	(%r12), %eax
	jmp	LBB0_10
LBB0_11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Adapter reset request\n"

	.comm	_CXL_ERROR_DETECTED_EVENT,4,2   ## @CXL_ERROR_DETECTED_EVENT
	.comm	_pci_channel_io_frozen,4,2      ## @pci_channel_io_frozen
	.comm	_CXL_SLOT_RESET_EVENT,4,2       ## @CXL_SLOT_RESET_EVENT
	.comm	_pci_channel_io_normal,4,2      ## @pci_channel_io_normal
	.comm	_CXL_RESUME_EVENT,4,2           ## @CXL_RESUME_EVENT
	.no_dead_strip	_guest_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function guest_reset
_guest_reset:                           ; @guest_reset
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_devel
	add	x20, x19, #4
	mov	x0, x20
	bl	_spin_lock
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, #0
Lloh2:
	adrp	x23, _CXL_ERROR_DETECTED_EVENT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _CXL_ERROR_DETECTED_EVENT@GOTPAGEOFF]
Lloh4:
	adrp	x24, _pci_channel_io_frozen@GOTPAGE
Lloh5:
	ldr	x24, [x24, _pci_channel_io_frozen@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	ldr	x21, [x9, x22, lsl #3]
	cbz	x21, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x23]
	ldr	w2, [x24]
	mov	x0, x21
	bl	_pci_error_handlers
	mov	x0, x21
	bl	_cxl_context_detach_all
	ldr	w8, [x19]
	b	LBB0_2
LBB0_5:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	bl	_cxl_h_reset_adapter
	mov	x21, x0
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.6:
	mov	x23, #0
Lloh6:
	adrp	x24, _CXL_SLOT_RESET_EVENT@GOTPAGE
Lloh7:
	ldr	x24, [x24, _CXL_SLOT_RESET_EVENT@GOTPAGEOFF]
Lloh8:
	adrp	x25, _pci_channel_io_normal@GOTPAGE
Lloh9:
	ldr	x25, [x25, _pci_channel_io_normal@GOTPAGEOFF]
Lloh10:
	adrp	x26, _CXL_RESUME_EVENT@GOTPAGE
Lloh11:
	ldr	x26, [x26, _CXL_RESUME_EVENT@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x23, x23, #1
	cmp	x23, w8, sxtw
	b.ge	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	cbnz	w21, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x19, #8]
	ldr	x22, [x9, x23, lsl #3]
	cbz	x22, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x24]
	ldr	w2, [x25]
	mov	x0, x22
	bl	_pci_error_handlers
	ldr	w1, [x26]
	mov	x0, x22
	mov	w2, #0
	bl	_pci_error_handlers
	ldr	w8, [x19]
	b	LBB0_7
LBB0_11:
	mov	x0, x20
	bl	_spin_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Adapter reset request\n"

	.comm	_CXL_ERROR_DETECTED_EVENT,4,2   ; @CXL_ERROR_DETECTED_EVENT
	.comm	_pci_channel_io_frozen,4,2      ; @pci_channel_io_frozen
	.comm	_CXL_SLOT_RESET_EVENT,4,2       ; @CXL_SLOT_RESET_EVENT
	.comm	_pci_channel_io_normal,4,2      ; @pci_channel_io_normal
	.comm	_CXL_RESUME_EVENT,4,2           ; @CXL_RESUME_EVENT
	.no_dead_strip	_guest_reset
.subsections_via_symbols
