	.file	"extr_machine_kexec_64.c_machine_kexec.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	machine_kexec
	.type	machine_kexec, @function
machine_kexec:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR PAGES_NR[rip]
	mov	rsi, rsp
	lea	rax, 15[0+rax*8]
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L3
.L12:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L12
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L13
.L4:
	xor	eax, eax
	mov	r12, rsp
	call	__ftrace_enabled_save@PLT
	mov	r13d, eax
	xor	eax, eax
	call	local_irq_disable@PLT
	xor	eax, eax
	call	hw_breakpoint_disable@PLT
	mov	edi, DWORD PTR 28[rbx]
	call	page_address@PLT
	movsx	r14, DWORD PTR PAGE_SIZE[rip]
	mov	edx, DWORD PTR KEXEC_CONTROL_CODE_MAX_SIZE[rip]
	mov	rsi, QWORD PTR relocate_kernel@GOTPCREL[rip]
	add	r14, rax
	mov	rdi, r14
	call	memcpy@PLT
	mov	r15, QWORD PTR PA_CONTROL_PAGE[rip]
	mov	rdi, r14
	call	virt_to_phys@PLT
	mov	edi, DWORD PTR 28[rbx]
	mov	QWORD PTR [r12+r15*8], rax
	mov	rax, QWORD PTR VA_CONTROL_PAGE[rip]
	mov	QWORD PTR [r12+rax*8], r14
	call	page_address@PLT
	mov	rdi, rax
	call	__pa@PLT
	mov	rdx, QWORD PTR PA_TABLE_PAGE[rip]
	mov	QWORD PTR [r12+rdx*8], rax
	mov	rax, QWORD PTR KEXEC_TYPE_DEFAULT[rip]
	cmp	QWORD PTR [rbx], rax
	jne	.L5
	mov	edi, DWORD PTR 24[rbx]
	call	page_to_pfn@PLT
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	mov	rdx, QWORD PTR PA_SWAP_PAGE[rip]
	sal	rax, cl
	mov	QWORD PTR [r12+rdx*8], rax
.L5:
	xor	eax, eax
	call	load_segments@PLT
	xor	edi, edi
	call	phys_to_virt@PLT
	xor	esi, esi
	mov	edi, eax
	call	set_gdt@PLT
	xor	edi, edi
	call	phys_to_virt@PLT
	xor	esi, esi
	mov	edi, eax
	call	set_idt@PLT
	xor	eax, eax
	call	sme_active@PLT
	mov	ecx, DWORD PTR 8[rbx]
	mov	edx, DWORD PTR 12[rbx]
	mov	rsi, r12
	mov	rdi, QWORD PTR 16[rbx]
	mov	r8d, eax
	call	relocate_kernel@PLT
	mov	edi, r13d
	mov	DWORD PTR 12[rbx], eax
	call	__ftrace_enabled_restore@PLT
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	machine_kexec, .-machine_kexec
	.comm	VA_CONTROL_PAGE,8,8
	.comm	PA_TABLE_PAGE,8,8
	.comm	PA_SWAP_PAGE,8,8
	.comm	PA_CONTROL_PAGE,8,8
	.comm	PAGE_SIZE,4,4
	.comm	PAGE_SHIFT,8,8
	.comm	PAGES_NR,4,4
	.comm	KEXEC_TYPE_DEFAULT,8,8
	.comm	KEXEC_CONTROL_CODE_MAX_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_machine_kexec_64.c_machine_kexec.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	machine_kexec
	.syntax unified
	.arm
	.fpu softvfp
	.type	machine_kexec, %function
machine_kexec:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #16
	ldr	r3, .L8
	ldr	r2, .L8+4
	ldr	r3, [r3]
	ldr	r2, [r2]
	str	r2, [fp, #-32]
	mov	r2,#0
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r4, r0
	bl	__ftrace_enabled_save
	mov	r7, r0
	bl	local_irq_disable
	bl	hw_breakpoint_disable
	ldr	r0, [r4, #20]
	bl	page_address
	ldr	r3, .L8+8
	ldr	r2, .L8+12
	ldr	r3, [r3]
	ldr	r2, [r2]
	add	r5, r0, r3
	ldr	r1, .L8+16
	mov	r0, r5
	bl	memcpy
	ldr	r3, .L8+20
	mov	r0, r5
	ldr	r8, [r3]
	bl	virt_to_phys
	ldr	r3, .L8+24
	add	r6, sp, #8
	ldr	r3, [r3]
	str	r0, [r6, r8, lsl #2]
	ldr	r0, [r4, #20]
	str	r5, [r6, r3, lsl #2]
	bl	page_address
	bl	__pa
	ldr	r2, .L8+28
	ldr	r3, .L8+32
	ldr	r2, [r2]
	ldr	r1, [r4]
	ldr	r3, [r3]
	cmp	r1, r2
	str	r0, [r6, r3, lsl #2]
	beq	.L6
.L2:
	bl	load_segments
	mov	r0, #0
	bl	phys_to_virt
	mov	r1, #0
	bl	set_gdt
	mov	r0, #0
	bl	phys_to_virt
	mov	r1, #0
	bl	set_idt
	ldr	r5, [r4, #12]
	ldr	r8, [r4, #8]
	ldr	r9, [r4, #4]
	bl	sme_active
	mov	r2, r8
	mov	r3, r9
	mov	r1, r6
	str	r0, [sp]
	mov	r0, r5
	bl	relocate_kernel
	mov	r3, r0
	mov	r0, r7
	str	r3, [r4, #8]
	bl	__ftrace_enabled_restore
	ldr	r3, .L8+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L7
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L6:
	ldr	r0, [r4, #16]
	bl	page_to_pfn
	ldr	r2, .L8+36
	ldr	r3, .L8+40
	ldr	r2, [r2]
	ldr	r3, [r3]
	lsl	r0, r0, r2
	str	r0, [r6, r3, lsl #2]
	b	.L2
.L7:
	bl	__stack_chk_fail
.L9:
	.align	2
.L8:
	.word	PAGES_NR
	.word	.LC0
	.word	PAGE_SIZE
	.word	KEXEC_CONTROL_CODE_MAX_SIZE
	.word	relocate_kernel
	.word	PA_CONTROL_PAGE
	.word	VA_CONTROL_PAGE
	.word	KEXEC_TYPE_DEFAULT
	.word	PA_TABLE_PAGE
	.word	PAGE_SHIFT
	.word	PA_SWAP_PAGE
	.size	machine_kexec, .-machine_kexec
	.comm	VA_CONTROL_PAGE,4,4
	.comm	PA_TABLE_PAGE,4,4
	.comm	PA_SWAP_PAGE,4,4
	.comm	PA_CONTROL_PAGE,4,4
	.comm	PAGE_SIZE,4,4
	.comm	PAGE_SHIFT,4,4
	.comm	PAGES_NR,4,4
	.comm	KEXEC_TYPE_DEFAULT,4,4
	.comm	KEXEC_CONTROL_CODE_MAX_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
