	.file	"extr_kexec_image.c_image_load.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Loaded kernel at 0x%lx bufsz=0x%lx memsz=0x%lx\n"
	.text
	.p2align 4
	.type	image_load, @function
image_load:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 104
	.cfi_def_cfa_offset 160
	mov	QWORD PTR [rsp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 88[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR KEXEC_TYPE_CRASH[rip]
	cmp	QWORD PTR [rdi], rax
	je	.L24
	mov	eax, DWORD PTR 4[rsi]
	mov	rbx, rsi
	test	eax, eax
	je	.L12
	mov	rbp, rdi
	mov	edi, DWORD PTR 8[rsi]
	mov	r12, rcx
	mov	r13, r8
	mov	r14, r9
	call	le64_to_cpu@PLT
	mov	esi, DWORD PTR ARM64_IMAGE_FLAG_BE[rip]
	mov	rdi, rax
	mov	r15, rax
	call	arm64_image_flag_field@PLT
	mov	edi, DWORD PTR CONFIG_CPU_BIG_ENDIAN[rip]
	mov	QWORD PTR 8[rsp], rax
	call	IS_ENABLED@PLT
	cmp	eax, DWORD PTR 8[rsp]
	je	.L5
	xor	eax, eax
	call	system_supports_mixed_endian@PLT
	test	eax, eax
	je	.L12
.L5:
	mov	esi, DWORD PTR ARM64_IMAGE_FLAG_PAGE_SIZE[rip]
	mov	rdi, r15
	call	arm64_image_flag_field@PLT
	cmp	QWORD PTR ARM64_IMAGE_FLAG_PAGE_SIZE_4K[rip], rax
	mov	r15, rax
	je	.L6
.L9:
	cmp	QWORD PTR ARM64_IMAGE_FLAG_PAGE_SIZE_64K[rip], r15
	je	.L25
.L8:
	cmp	QWORD PTR ARM64_IMAGE_FLAG_PAGE_SIZE_16K[rip], r15
	je	.L26
.L11:
	mov	eax, DWORD PTR ULONG_MAX[rip]
	mov	edi, DWORD PTR 4[rbx]
	mov	QWORD PTR 24[rsp], rbx
	mov	QWORD PTR 72[rsp], rbp
	mov	DWORD PTR 56[rsp], eax
	mov	rax, QWORD PTR [rsp]
	mov	QWORD PTR 64[rsp], 0
	mov	QWORD PTR 32[rsp], rax
	mov	eax, DWORD PTR KEXEC_BUF_MEM_UNKNOWN[rip]
	mov	DWORD PTR 16[rsp], 0
	mov	DWORD PTR 52[rsp], eax
	call	le64_to_cpu@PLT
	mov	edi, DWORD PTR [rbx]
	mov	QWORD PTR 40[rsp], rax
	call	le64_to_cpu@PLT
	lea	rdi, 16[rsp]
	mov	rbx, rax
	mov	eax, DWORD PTR MIN_KIMG_ALIGN[rip]
	add	QWORD PTR 40[rsp], rbx
	mov	DWORD PTR 48[rsp], eax
	call	kexec_add_buffer@PLT
	test	eax, eax
	jne	.L22
	movsx	rax, DWORD PTR 8[rbp]
	mov	rdx, QWORD PTR 24[rbp]
	lea	rdi, .LC0[rip]
	sal	rax, 4
	lea	r15, -16[rdx+rax]
	mov	rdx, QWORD PTR 32[rsp]
	mov	rsi, QWORD PTR [r15]
	mov	rcx, QWORD PTR 8[r15]
	add	rsi, rbx
	sub	rcx, rbx
	mov	QWORD PTR [r15], rsi
	mov	QWORD PTR 8[r15], rcx
	mov	QWORD PTR 16[rbp], rsi
	call	pr_debug@PLT
	mov	rdx, QWORD PTR 8[r15]
	mov	rsi, QWORD PTR [r15]
	mov	r9, r14
	mov	r8, r13
	mov	rcx, r12
	mov	rdi, rbp
	call	load_other_segments@PLT
.L22:
	mov	edi, eax
	call	ERR_PTR@PLT
.L1:
	mov	rcx, QWORD PTR 88[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L27
	add	rsp, 104
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	xor	eax, eax
	call	system_supports_4kb_granule@PLT
	test	eax, eax
	jne	.L9
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edi, DWORD PTR EINVAL[rip]
	neg	edi
	call	ERR_PTR@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L26:
	xor	eax, eax
	call	system_supports_16kb_granule@PLT
	test	eax, eax
	jne	.L11
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L24:
	mov	edi, DWORD PTR EOPNOTSUPP[rip]
	neg	edi
	call	ERR_PTR@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	xor	eax, eax
	call	system_supports_64kb_granule@PLT
	test	eax, eax
	jne	.L8
	jmp	.L12
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	image_load, .-image_load
	.comm	ULONG_MAX,4,4
	.comm	MIN_KIMG_ALIGN,4,4
	.comm	KEXEC_TYPE_CRASH,8,8
	.comm	KEXEC_BUF_MEM_UNKNOWN,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	EINVAL,4,4
	.comm	CONFIG_CPU_BIG_ENDIAN,4,4
	.comm	ARM64_IMAGE_FLAG_PAGE_SIZE_64K,8,8
	.comm	ARM64_IMAGE_FLAG_PAGE_SIZE_4K,8,8
	.comm	ARM64_IMAGE_FLAG_PAGE_SIZE_16K,8,8
	.comm	ARM64_IMAGE_FLAG_PAGE_SIZE,4,4
	.comm	ARM64_IMAGE_FLAG_BE,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_kexec_image.c_image_load.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Loaded kernel at 0x%lx bufsz=0x%lx memsz=0x%lx\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	image_load, %function
image_load:
	@ args = 12, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	ldr	r0, .L28
	ldr	ip, [r5]
	ldr	r0, [r0]
	mov	r7, r3
	ldr	r3, .L28+4
	sub	sp, sp, #48
	cmp	ip, r0
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	ldr	r9, [sp, #84]
	beq	.L24
	ldr	r3, [r1, #4]
	mov	r4, r1
	cmp	r3, #0
	beq	.L12
	ldr	r0, [r1, #8]
	mov	r6, r2
	bl	le64_to_cpu
	ldr	r3, .L28+8
	mov	r10, r0
	ldr	r1, [r3]
	bl	arm64_image_flag_field
	ldr	r3, .L28+12
	mov	r8, r0
	ldr	r0, [r3]
	bl	IS_ENABLED
	cmp	r8, r0
	beq	.L5
	bl	system_supports_mixed_endian
	cmp	r0, #0
	beq	.L12
.L5:
	ldr	r3, .L28+16
	mov	r0, r10
	ldr	r1, [r3]
	bl	arm64_image_flag_field
	ldr	r3, .L28+20
	mov	r8, r0
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L6
.L9:
	ldr	r3, .L28+24
	ldr	r3, [r3]
	cmp	r3, r8
	beq	.L25
.L8:
	ldr	r3, .L28+28
	ldr	r3, [r3]
	cmp	r3, r8
	beq	.L26
.L11:
	mov	r3, #0
	ldr	r1, .L28+32
	ldr	r2, .L28+36
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	r0, [r4, #4]
	str	r1, [sp, #32]
	str	r2, [sp, #28]
	str	r4, [sp, #12]
	str	r3, [sp, #36]
	str	r3, [sp, #8]
	str	r5, [sp, #40]
	str	r6, [sp, #16]
	bl	le64_to_cpu
	mov	r3, r0
	ldr	r0, [r4]
	str	r3, [sp, #20]
	bl	le64_to_cpu
	ldr	r2, .L28+40
	ldr	r3, [sp, #20]
	ldr	r2, [r2]
	add	r3, r3, r0
	mov	r4, r0
	add	r0, sp, #8
	str	r3, [sp, #20]
	str	r2, [sp, #24]
	bl	kexec_add_buffer
	cmp	r0, #0
	bne	.L22
	ldr	r6, [r5, #4]
	ldr	r8, [r5, #12]
	sub	r6, r6, #-536870911
	add	r10, r8, r6, lsl #3
	ldr	r3, [r10, #4]
	ldr	r1, [r8, r6, lsl #3]
	sub	r3, r3, r4
	add	r1, r4, r1
	str	r1, [r8, r6, lsl #3]
	ldr	r2, [sp, #16]
	str	r3, [r10, #4]
	ldr	r0, .L28+44
	str	r1, [r5, #8]
	bl	pr_debug
	ldr	r3, [sp, #80]
	ldr	r2, [r10, #4]
	ldr	r1, [r8, r6, lsl #3]
	mov	r0, r5
	str	r3, [sp]
	str	r9, [sp, #4]
	mov	r3, r7
	bl	load_other_segments
.L22:
	bl	ERR_PTR
.L1:
	ldr	r3, .L28+4
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L27
	add	sp, sp, #48
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L6:
	bl	system_supports_4kb_granule
	cmp	r0, #0
	bne	.L9
.L12:
	ldr	r3, .L28+48
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bl	ERR_PTR
	b	.L1
.L26:
	bl	system_supports_16kb_granule
	cmp	r0, #0
	bne	.L11
	b	.L12
.L24:
	ldr	r3, .L28+52
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bl	ERR_PTR
	b	.L1
.L25:
	bl	system_supports_64kb_granule
	cmp	r0, #0
	bne	.L8
	b	.L12
.L27:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	KEXEC_TYPE_CRASH
	.word	.LC1
	.word	ARM64_IMAGE_FLAG_BE
	.word	CONFIG_CPU_BIG_ENDIAN
	.word	ARM64_IMAGE_FLAG_PAGE_SIZE
	.word	ARM64_IMAGE_FLAG_PAGE_SIZE_4K
	.word	ARM64_IMAGE_FLAG_PAGE_SIZE_64K
	.word	ARM64_IMAGE_FLAG_PAGE_SIZE_16K
	.word	ULONG_MAX
	.word	KEXEC_BUF_MEM_UNKNOWN
	.word	MIN_KIMG_ALIGN
	.word	.LC0
	.word	EINVAL
	.word	EOPNOTSUPP
	.size	image_load, .-image_load
	.comm	ULONG_MAX,4,4
	.comm	MIN_KIMG_ALIGN,4,4
	.comm	KEXEC_TYPE_CRASH,4,4
	.comm	KEXEC_BUF_MEM_UNKNOWN,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	EINVAL,4,4
	.comm	CONFIG_CPU_BIG_ENDIAN,4,4
	.comm	ARM64_IMAGE_FLAG_PAGE_SIZE_64K,4,4
	.comm	ARM64_IMAGE_FLAG_PAGE_SIZE_4K,4,4
	.comm	ARM64_IMAGE_FLAG_PAGE_SIZE_16K,4,4
	.comm	ARM64_IMAGE_FLAG_PAGE_SIZE,4,4
	.comm	ARM64_IMAGE_FLAG_BE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
