	.file	"346732.c"
	.intel_syntax noprefix
	.text
	.globl	malloc
	.type	malloc, @function
malloc:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	edi, 0
	call	sbrk@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	sbrk@PLT
	cmp	rax, -1
	jne	.L2
	mov	eax, 0
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -8[rbp]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	malloc, .-malloc
	.section	.rodata
.LC0:
	.string	"img.bmp"
.LC1:
	.string	"IT IS: %lu, %lu\n"
.LC2:
	.string	"printing: %d\n"
	.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 16
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR -44[rbp], eax
	mov	DWORD PTR -56[rbp], 0
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, 0
	mov	esi, 10
	mov	edi, eax
	call	lseek@PLT
	lea	rcx, -56[rbp]
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	eax, DWORD PTR -56[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	mov	eax, DWORD PTR -44[rbp]
	mov	edx, DWORD PTR -56[rbp]
	sub	eax, edx
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	mov	rdi, rax
	call	malloc
	mov	QWORD PTR -16[rbp], rax
	mov	edx, DWORD PTR -40[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -48[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -52[rbp], 0
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rcx, 1[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	edx, eax
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rcx, 2[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	eax, edx
	movsx	rdx, eax
	imul	rdx, rdx, 1431655766
	shr	rdx, 32
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -36[rbp]
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -36[rbp]
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 2[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -36[rbp]
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -52[rbp], 3
.L5:
	mov	eax, DWORD PTR -52[rbp]
	cmp	DWORD PTR -40[rbp], eax
	ja	.L6
	mov	eax, DWORD PTR -56[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	mov	edx, DWORD PTR -40[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -48[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -48[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"346732.c"
	.text
	.align	2
	.global	malloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	malloc, %function
malloc:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r0, #0
	bl	sbrk
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	sbrk
	mov	r3, r0
	cmn	r3, #1
	bne	.L2
	mov	r3, #0
	b	.L3
.L2:
	ldr	r3, [fp, #-8]
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	malloc, .-malloc
	.section	.rodata
	.align	2
.LC0:
	.ascii	"img.bmp\000"
	.align	2
.LC1:
	.ascii	"IT IS: %lu, %lu\012\000"
	.align	2
.LC2:
	.ascii	"printing: %d\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #2
	ldr	r0, .L9+4
	bl	open
	str	r0, [fp, #-36]
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-36]
	bl	lseek
	mov	r3, r0
	str	r3, [fp, #-32]
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-36]
	bl	lseek
	mov	r3, r0
	str	r3, [fp, #-28]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-36]
	bl	lseek
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-32]
	ldr	r0, .L9+8
	bl	printf
	mov	r1, #16
	ldr	r0, .L9+12
	bl	printf
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r2, #0
	mov	r1, #10
	ldr	r0, [fp, #-36]
	bl	lseek
	sub	r3, fp, #44
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	read
	ldr	r3, [fp, #-44]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	lseek
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-44]
	sub	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-36]
	bl	read
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L5
.L6:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r3, r1, r3
	ldr	r2, [fp, #-40]
	add	r2, r2, #2
	ldr	r1, [fp, #-16]
	add	r2, r1, r2
	ldrb	r2, [r2]	@ zero_extendqisi2
	add	r3, r3, r2
	ldr	r2, .L9+16
	smull	r1, r2, r3, r2
	asr	r3, r3, #31
	sub	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r3, #3
	str	r3, [fp, #-40]
.L5:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bhi	.L6
	ldr	r3, [fp, #-44]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	lseek
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-36]
	bl	write
	ldr	r0, [fp, #-36]
	bl	close
	mov	r3, #0
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	1431655766
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
