	.file	"247019484.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"usage: grok fn offset [cdata]+\n"
.LC1:
	.string	"cannot open %s, errno %d\n"
.LC2:
	.string	"cannot seek to %x, errno %d\n"
	.align 8
.LC3:
	.string	"cannot read %d bytes at %x, errno %d\n"
.LC4:
	.string	"read %d of %d bytes\n"
	.align 8
.LC5:
	.string	"cannot write %d bytes at %x, errno %d\n"
.LC6:
	.string	"wrote %d of %d bytes\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	DWORD PTR -52[rbp], 0
	cmp	DWORD PTR -68[rbp], 2
	jg	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 31
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -68[rbp]
	sub	eax, 2
	cdqe
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -56[rbp], 3
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -52[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -52[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -56[rbp], 1
.L3:
	mov	eax, DWORD PTR -56[rbp]
	cmp	eax, DWORD PTR -68[rbp]
	jl	.L4
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -44[rbp], eax
	cmp	DWORD PTR -44[rbp], 0
	jns	.L5
	call	__errno_location@PLT
	mov	ecx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -32[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 2
	call	exit@PLT
.L5:
	mov	eax, DWORD PTR -48[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -44[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	test	rax, rax
	jns	.L6
	call	__errno_location@PLT
	mov	ecx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -48[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 2
	call	exit@PLT
.L6:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], 0
	jns	.L7
	call	__errno_location@PLT
	mov	esi, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -48[rbp]
	mov	edx, DWORD PTR -52[rbp]
	mov	r8d, esi
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 3
	call	exit@PLT
.L7:
	mov	edx, DWORD PTR -52[rbp]
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -48[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -44[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	test	rax, rax
	jns	.L8
	call	__errno_location@PLT
	mov	ecx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -48[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 2
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR -40[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jns	.L9
	call	__errno_location@PLT
	mov	esi, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -48[rbp]
	mov	edx, DWORD PTR -40[rbp]
	mov	r8d, esi
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 4
	call	exit@PLT
.L9:
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.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	"247019484.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: grok fn offset [cdata]+\012\000"
	.align	2
.LC1:
	.ascii	"cannot open %s, errno %d\012\000"
	.align	2
.LC2:
	.ascii	"cannot seek to %x, errno %d\012\000"
	.align	2
.LC3:
	.ascii	"cannot read %d bytes at %x, errno %d\012\000"
	.align	2
.LC4:
	.ascii	"read %d of %d bytes\012\000"
	.align	2
.LC5:
	.ascii	"cannot write %d bytes at %x, errno %d\012\000"
	.align	2
.LC6:
	.ascii	"wrote %d of %d bytes\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #60
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-56]
	cmp	r3, #2
	bgt	.L2
	ldr	r3, .L10
	ldr	r3, [r3]
	mov	r2, #31
	mov	r1, #1
	ldr	r0, .L10+4
	bl	fwrite
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-56]
	sub	r3, r3, #2
	mov	r1, #1
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-36]
	mov	r3, #3
	str	r3, [fp, #-52]
	b	.L3
.L4:
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-48]
	add	r2, r3, #1
	str	r2, [fp, #-48]
	mov	r2, r3
	ldr	r3, [fp, #-36]
	add	r3, r3, r2
	ldr	r2, [fp, #-16]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L3:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	blt	.L4
	mov	r1, #2
	ldr	r0, [fp, #-44]
	bl	open
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L5
	ldr	r3, .L10
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	ldr	r2, [fp, #-44]
	ldr	r1, .L10+8
	mov	r0, r4
	bl	fprintf
	mov	r0, #2
	bl	exit
.L5:
	mov	r2, #0
	ldr	r1, [fp, #-40]
	ldr	r0, [fp, #-32]
	bl	lseek
	mov	r3, r0
	cmp	r3, #0
	bge	.L6
	ldr	r3, .L10
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	ldr	r1, .L10+12
	mov	r0, r4
	bl	fprintf
	mov	r0, #2
	bl	exit
.L6:
	ldr	r3, [fp, #-48]
	mov	r1, #1
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-48]
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-32]
	bl	read
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bge	.L7
	ldr	r3, .L10
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [sp]
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-48]
	ldr	r1, .L10+16
	mov	r0, r4
	bl	fprintf
	mov	r0, #3
	bl	exit
.L7:
	ldr	r2, [fp, #-48]
	ldr	r1, [fp, #-24]
	ldr	r0, .L10+20
	bl	printf
	mov	r2, #0
	ldr	r1, [fp, #-40]
	ldr	r0, [fp, #-32]
	bl	lseek
	mov	r3, r0
	cmp	r3, #0
	bge	.L8
	ldr	r3, .L10
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	ldr	r1, .L10+12
	mov	r0, r4
	bl	fprintf
	mov	r0, #2
	bl	exit
.L8:
	ldr	r3, [fp, #-24]
	mov	r2, r3
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	write
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bge	.L9
	ldr	r3, .L10
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [sp]
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-24]
	ldr	r1, .L10+24
	mov	r0, r4
	bl	fprintf
	mov	r0, #4
	bl	exit
.L9:
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, .L10+28
	bl	printf
	mov	r0, #0
	bl	exit
.L11:
	.align	2
.L10:
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
