	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_machine_kexec                  ## -- Begin function machine_kexec
	.p2align	4, 0x90
_machine_kexec:                         ## @machine_kexec
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_PAGES_NR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	xorl	%eax, %eax
	callq	___ftrace_enabled_save
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_local_irq_disable
	movl	28(%r12), %edi
	callq	_page_address
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rbx
	addq	%rax, %rbx
	movq	_KEXEC_CONTROL_CODE_MAX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_relocate_kernel@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_memcpy
	movq	%rbx, %rdi
	callq	_virt_to_phys
	movq	_PA_CONTROL_PAGE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, (%r14,%rcx,8)
	movq	_VA_CONTROL_PAGE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rbx, (%r14,%rax,8)
	movl	28(%r12), %edi
	callq	_page_address
	movq	%rax, %rdi
	callq	___pa
	movq	_PA_TABLE_PAGE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, (%r14,%rcx,8)
	movq	(%r12), %rax
	movq	_KEXEC_TYPE_DEFAULT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	24(%r12), %edi
	callq	_page_to_pfn
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rax
	movq	_PA_SWAP_PAGE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, (%r14,%rcx,8)
LBB0_2:
	xorl	%eax, %eax
	callq	_load_segments
	xorl	%edi, %edi
	callq	_phys_to_virt
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_set_gdt
	xorl	%edi, %edi
	callq	_phys_to_virt
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_set_idt
	movq	16(%r12), %rdi
	movl	8(%r12), %ecx
	movl	12(%r12), %edx
	movq	%r14, %rsi
	callq	_relocate_kernel
	movl	%eax, 12(%r12)
	movl	%r15d, %edi
	callq	___ftrace_enabled_restore
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGES_NR,4,2                   ## @PAGES_NR
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_KEXEC_CONTROL_CODE_MAX_SIZE,4,2 ## @KEXEC_CONTROL_CODE_MAX_SIZE
	.comm	_PA_CONTROL_PAGE,8,3            ## @PA_CONTROL_PAGE
	.comm	_VA_CONTROL_PAGE,8,3            ## @VA_CONTROL_PAGE
	.comm	_PA_TABLE_PAGE,8,3              ## @PA_TABLE_PAGE
	.comm	_KEXEC_TYPE_DEFAULT,8,3         ## @KEXEC_TYPE_DEFAULT
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_PA_SWAP_PAGE,8,3               ## @PA_SWAP_PAGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_machine_kexec                  ; -- Begin function machine_kexec
	.p2align	2
_machine_kexec:                         ; @machine_kexec
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _PAGES_NR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGES_NR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x21, x9, x8
	mov	sp, x21
	bl	___ftrace_enabled_save
	mov	x20, x0
	bl	_local_irq_disable
	ldr	w0, [x19, #28]
	bl	_page_address
Lloh8:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh10:
	ldrsw	x8, [x8]
	add	x22, x0, x8
Lloh11:
	adrp	x8, _KEXEC_CONTROL_CODE_MAX_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _KEXEC_CONTROL_CODE_MAX_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x1, _relocate_kernel@GOTPAGE
Lloh15:
	ldr	x1, [x1, _relocate_kernel@GOTPAGEOFF]
	mov	x0, x22
	bl	_memcpy
	mov	x0, x22
	bl	_virt_to_phys
Lloh16:
	adrp	x8, _PA_CONTROL_PAGE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PA_CONTROL_PAGE@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x0, [x21, x8, lsl #3]
Lloh19:
	adrp	x8, _VA_CONTROL_PAGE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _VA_CONTROL_PAGE@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	str	x22, [x21, x8, lsl #3]
	ldr	w0, [x19, #28]
	bl	_page_address
	bl	___pa
Lloh22:
	adrp	x8, _PA_TABLE_PAGE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PA_TABLE_PAGE@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	str	x0, [x21, x8, lsl #3]
	ldr	x8, [x19]
Lloh25:
	adrp	x9, _KEXEC_TYPE_DEFAULT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _KEXEC_TYPE_DEFAULT@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x19, #24]
	bl	_page_to_pfn
Lloh28:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	lsl	x8, x0, x8
Lloh31:
	adrp	x9, _PA_SWAP_PAGE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _PA_SWAP_PAGE@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	str	x8, [x21, x9, lsl #3]
LBB0_2:
	bl	_load_segments
	mov	w0, #0
	bl	_phys_to_virt
	mov	w1, #0
	bl	_set_gdt
	mov	w0, #0
	bl	_phys_to_virt
	mov	w1, #0
	bl	_set_idt
	ldr	x0, [x19, #16]
	ldp	w3, w2, [x19, #8]
	mov	x1, x21
	bl	_relocate_kernel
	str	w0, [x19, #12]
	mov	x0, x20
	bl	___ftrace_enabled_restore
	ldur	x8, [x29, #-40]
Lloh34:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	sub	sp, x29, #32
	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:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGES_NR,4,2                   ; @PAGES_NR
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_KEXEC_CONTROL_CODE_MAX_SIZE,4,2 ; @KEXEC_CONTROL_CODE_MAX_SIZE
	.comm	_PA_CONTROL_PAGE,8,3            ; @PA_CONTROL_PAGE
	.comm	_VA_CONTROL_PAGE,8,3            ; @VA_CONTROL_PAGE
	.comm	_PA_TABLE_PAGE,8,3              ; @PA_TABLE_PAGE
	.comm	_KEXEC_TYPE_DEFAULT,8,3         ; @KEXEC_TYPE_DEFAULT
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_PA_SWAP_PAGE,8,3               ; @PA_SWAP_PAGE
.subsections_via_symbols
