	.file	"216172.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"read"
.LC1:
	.string	"\177ELF"
.LC2:
	.string	"Not ELF\n"
	.text
	.globl	lelf
	.type	lelf, @function
lelf:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	rcx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 52
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	cmp	rax, 52
	je	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, 4
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	je	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	lelf, .-lelf
	.section	.rodata
	.align 8
.LC3:
	.string	"usage: elf-entry filename [entry]\n"
.LC4:
	.string	"open"
.LC5:
	.string	"Entry point (%s): 0x%x\n"
.LC6:
	.string	"lseek"
.LC7:
	.string	"write"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -84[rbp], 2
	je	.L6
	cmp	DWORD PTR -84[rbp], 3
	je	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 34
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	cmp	DWORD PTR -84[rbp], 2
	jne	.L7
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	jns	.L8
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	lea	rdx, -64[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	lelf
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L7:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	jns	.L10
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	lea	rdx, -64[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	lelf
	mov	eax, DWORD PTR -68[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	test	rax, rax
	jns	.L11
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -40[rbp], eax
	lea	rcx, -64[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	edx, 52
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	rax, 52
	je	.L12
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L9:
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"216172.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"read\000"
	.align	2
.LC1:
	.ascii	"\177ELF\000"
	.align	2
.LC2:
	.ascii	"Not ELF\012\000"
	.text
	.align	2
	.global	lelf
	.syntax unified
	.arm
	.fpu softvfp
	.type	lelf, %function
lelf:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	mov	r2, #52
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	read
	mov	r3, r0
	cmp	r3, #52
	beq	.L2
	ldr	r0, .L5
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-12]
	mov	r2, #4
	ldr	r1, .L5+4
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	ldr	r3, .L5+8
	ldr	r3, [r3]
	mov	r2, #8
	mov	r1, #1
	ldr	r0, .L5+12
	bl	fwrite
	mov	r0, #1
	bl	exit
.L4:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	.LC1
	.word	stderr
	.word	.LC2
	.size	lelf, .-lelf
	.section	.rodata
	.align	2
.LC3:
	.ascii	"usage: elf-entry filename [entry]\012\000"
	.align	2
.LC4:
	.ascii	"open\000"
	.align	2
.LC5:
	.ascii	"Entry point (%s): 0x%x\012\000"
	.align	2
.LC6:
	.ascii	"lseek\000"
	.align	2
.LC7:
	.ascii	"write\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-72]
	cmp	r3, #2
	beq	.L8
	ldr	r3, [fp, #-72]
	cmp	r3, #3
	beq	.L8
	ldr	r3, .L16+4
	ldr	r3, [r3]
	mov	r2, #34
	mov	r1, #1
	ldr	r0, .L16+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, [fp, #-72]
	cmp	r3, #2
	bne	.L9
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-64]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bge	.L10
	ldr	r0, .L16+12
	bl	perror
	mov	r0, #1
	bl	exit
.L10:
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, [fp, #-64]
	bl	lelf
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	mov	r1, r3
	ldr	r0, .L16+16
	bl	printf
	b	.L11
.L9:
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	open
	str	r0, [fp, #-64]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bge	.L12
	ldr	r0, .L16+12
	bl	perror
	mov	r0, #1
	bl	exit
.L12:
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, [fp, #-64]
	bl	lelf
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-64]
	bl	lseek
	mov	r3, r0
	cmp	r3, #0
	bge	.L13
	ldr	r0, .L16+20
	bl	perror
	mov	r0, #1
	bl	exit
.L13:
	ldr	r3, [fp, #-76]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	mov	r3, r0
	str	r3, [fp, #-36]
	sub	r3, fp, #60
	mov	r2, #52
	mov	r1, r3
	ldr	r0, [fp, #-64]
	bl	write
	mov	r3, r0
	cmp	r3, #52
	beq	.L14
	ldr	r0, .L16+24
	bl	perror
	mov	r0, #1
	bl	exit
.L14:
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	mov	r1, r3
	ldr	r0, .L16+16
	bl	printf
.L11:
	mov	r0, #0
	bl	exit
.L17:
	.align	2
.L16:
	.word	.LC8
	.word	stderr
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
