	.file	"extr_kexec_elf.c_elf_read_phdrs.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	elf_read_phdrs, @function
elf_read_phdrs:
.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
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r14, QWORD PTR 8[rdx]
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	movsx	rdi, DWORD PTR [r14]
	sal	rdi, 2
	call	kzalloc@PLT
	mov	QWORD PTR [rbx], rax
	test	rax, rax
	je	.L2
	mov	eax, DWORD PTR [r14]
	xor	r15d, r15d
	test	eax, eax
	jne	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	movsx	rax, DWORD PTR [r14]
	add	r15, 1
	cmp	rax, r15
	jbe	.L4
.L3:
	mov	rcx, r15
	mov	rdx, rbx
	mov	rsi, r13
	mov	rdi, rbp
	call	elf_read_phdr@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L6
	mov	rdi, QWORD PTR [rbx]
	call	kfree@PLT
	mov	QWORD PTR [rbx], 0
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L4:
	.cfi_restore_state
	xor	r12d, r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	elf_read_phdrs, .-elf_read_phdrs
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_elf.c_elf_read_phdrs.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	elf_read_phdrs, %function
elf_read_phdrs:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r9, [r2, #4]
	ldr	r3, .L11
	mov	r7, r0
	ldr	r0, [r9]
	mov	r8, r1
	lsl	r0, r0, #2
	ldr	r1, [r3]
	mov	r6, r2
	bl	kzalloc
	cmp	r0, #0
	str	r0, [r6]
	beq	.L2
	ldr	r3, [r9]
	cmp	r3, #0
	movne	r5, #0
	bne	.L3
	b	.L4
.L6:
	ldr	r3, [r9]
	cmp	r3, r5
	bls	.L4
.L3:
	mov	r3, r5
	mov	r2, r6
	mov	r1, r8
	mov	r0, r7
	bl	elf_read_phdr
	subs	r4, r0, #0
	add	r5, r5, #1
	beq	.L6
	ldr	r0, [r6]
	bl	kfree
	mov	r3, #0
	mov	r0, r4
	str	r3, [r6]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	mov	r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	ldr	r3, .L11+4
	ldr	r0, [r3]
	rsb	r4, r0, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	.align	2
.L11:
	.word	GFP_KERNEL
	.word	ENOMEM
	.size	elf_read_phdrs, .-elf_read_phdrs
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
