	.file	"196279.c"
	.intel_syntax noprefix
	.text
	.globl	copy
	.type	copy, @function
copy:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -32[rbp], rdx
	mov	QWORD PTR -40[rbp], rcx
	mov	DWORD PTR -8[rbp], 0
	jmp	.L2
.L5:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -4[rbp]
	imul	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	imul	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR [rcx]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -4[rbp], 1
.L3:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jl	.L4
	add	DWORD PTR -8[rbp], 1
.L2:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L5
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	copy, .-copy
	.globl	light
	.type	light, @function
light:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -32[rbp], rdx
	mov	eax, ecx
	mov	BYTE PTR -36[rbp], al
	mov	DWORD PTR -8[rbp], 0
	jmp	.L7
.L10:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -4[rbp]
	imul	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -9[rbp], al
	movzx	edx, BYTE PTR -9[rbp]
	movzx	eax, BYTE PTR -36[rbp]
	add	eax, edx
	mov	edx, 255
	cmp	eax, 255
	cmovle	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	imul	eax, DWORD PTR -20[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -8[rbp]
	add	eax, ecx
	movsx	rcx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -4[rbp], 1
.L8:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jl	.L9
	add	DWORD PTR -8[rbp], 1
.L7:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L10
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	light, .-light
	.globl	curve
	.type	curve, @function
curve:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -32[rbp], rdx
	mov	QWORD PTR -40[rbp], rcx
	mov	DWORD PTR -8[rbp], 0
	jmp	.L12
.L15:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L13
.L14:
	mov	eax, DWORD PTR -4[rbp]
	imul	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -9[rbp], al
	movzx	edx, BYTE PTR -9[rbp]
	mov	rax, QWORD PTR -40[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	imul	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR [rcx]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -4[rbp], 1
.L13:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jl	.L14
	add	DWORD PTR -8[rbp], 1
.L12:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L15
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	curve, .-curve
	.globl	transfo
	.type	transfo, @function
transfo:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 40
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	QWORD PTR -16[rbp], rdx
	mov	QWORD PTR -24[rbp], rcx
	mov	QWORD PTR -32[rbp], r8
	mov	eax, r9d
	mov	BYTE PTR -36[rbp], al
	mov	rcx, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	esi, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	copy
	mov	rcx, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	esi, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	curve
	movzx	ecx, BYTE PTR -36[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	esi, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	light
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	transfo, .-transfo
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage: light infile.pgm mapfile.amp outfile.pgm"
.LC1:
	.string	"r"
.LC2:
	.string	"fopen"
.LC3:
	.string	"%c"
.LC4:
	.string	"Error, input file is not PGM\n"
.LC5:
	.string	"%d %d"
.LC6:
	.string	"%d"
.LC7:
	.string	"w=%d, h=%d, max=%d\n"
.LC8:
	.string	"malloc"
.LC9:
	.string	"fread"
.LC10:
	.string	"%ld us\n"
.LC11:
	.string	"w"
.LC12:
	.string	"P5\n"
.LC13:
	.string	"%d %d\n"
.LC14:
	.string	"%d\n"
.LC15:
	.string	"fwrite"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	sub	rsp, 272
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	DWORD PTR -228[rbp], edi
	mov	QWORD PTR -240[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -228[rbp], 4
	je	.L18
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	mov	rax, QWORD PTR -240[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -184[rbp], rax
	cmp	QWORD PTR -184[rbp], 0
	jne	.L19
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L19:
	mov	rax, QWORD PTR -240[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -192[rbp], rax
	cmp	QWORD PTR -192[rbp], 0
	jne	.L20
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L20:
	lea	rax, -210[rbp]
	mov	rcx, QWORD PTR -184[rbp]
	mov	rdx, rax
	lea	rsi, .LC3[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	lea	rax, -209[rbp]
	mov	rcx, QWORD PTR -184[rbp]
	mov	rdx, rax
	lea	rsi, .LC3[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	movzx	eax, BYTE PTR -210[rbp]
	cmp	al, 80
	jne	.L21
	movzx	eax, BYTE PTR -209[rbp]
	cmp	al, 53
	je	.L22
.L21:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 29
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L22:
	lea	rax, -204[rbp]
	lea	rdx, -208[rbp]
	mov	rdi, QWORD PTR -184[rbp]
	mov	rcx, rax
	lea	rsi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	lea	rax, -200[rbp]
	mov	rcx, QWORD PTR -184[rbp]
	mov	rdx, rax
	lea	rsi, .LC6[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	eax, DWORD PTR -200[rbp]
	mov	edx, DWORD PTR -208[rbp]
	mov	esi, DWORD PTR -204[rbp]
	mov	ecx, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -208[rbp]
	mov	eax, DWORD PTR -204[rbp]
	imul	eax, edx
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -168[rbp], rdx
	cdqe
	mov	QWORD PTR -256[rbp], rax
	mov	QWORD PTR -248[rbp], 0
	mov	edx, DWORD PTR -208[rbp]
	mov	eax, DWORD PTR -204[rbp]
	imul	eax, edx
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -160[rbp], rdx
	cdqe
	mov	QWORD PTR -272[rbp], rax
	mov	QWORD PTR -264[rbp], 0
	mov	edx, DWORD PTR -208[rbp]
	mov	eax, DWORD PTR -204[rbp]
	imul	eax, edx
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -152[rbp], rdx
	cdqe
	mov	QWORD PTR -288[rbp], rax
	mov	QWORD PTR -280[rbp], 0
	mov	edx, DWORD PTR -204[rbp]
	mov	eax, DWORD PTR -208[rbp]
	imul	eax, edx
	cdqe
	mov	QWORD PTR -144[rbp], rax
	mov	edx, DWORD PTR -208[rbp]
	mov	eax, DWORD PTR -204[rbp]
	imul	eax, edx
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -136[rbp], rdx
	cdqe
	mov	QWORD PTR -304[rbp], rax
	mov	QWORD PTR -296[rbp], 0
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -128[rbp], rax
	cmp	QWORD PTR -128[rbp], 0
	jne	.L23
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	mov	edx, DWORD PTR -208[rbp]
	mov	eax, DWORD PTR -204[rbp]
	imul	eax, edx
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -120[rbp], rdx
	cdqe
	mov	r14, rax
	mov	r15d, 0
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -112[rbp], rax
	cmp	QWORD PTR -112[rbp], 0
	jne	.L24
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L24:
	mov	edx, DWORD PTR -208[rbp]
	mov	eax, DWORD PTR -204[rbp]
	imul	eax, edx
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -104[rbp], rdx
	cdqe
	mov	r12, rax
	mov	r13d, 0
	mov	edi, 256
	call	malloc@PLT
	mov	QWORD PTR -96[rbp], rax
	cmp	QWORD PTR -96[rbp], 0
	jne	.L25
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L25:
	mov	DWORD PTR -196[rbp], 0
	jmp	.L26
.L27:
	movzx	ecx, BYTE PTR -64[rbp]
	mov	rdx, QWORD PTR -96[rbp]
	mov	eax, DWORD PTR -196[rbp]
	cdqe
	mov	BYTE PTR [rdx+rax], cl
	add	DWORD PTR -196[rbp], 1
.L26:
	mov	rdx, QWORD PTR -192[rbp]
	lea	rax, -64[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	test	rax, rax
	jne	.L27
	mov	rax, QWORD PTR -184[rbp]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fseek@PLT
	mov	QWORD PTR -176[rbp], 0
	jmp	.L28
.L30:
	mov	rdx, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR -128[rbp]
	lea	rdi, [rdx+rax]
	mov	rax, QWORD PTR -184[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 1
	call	fread@PLT
	test	rax, rax
	jne	.L29
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L29:
	add	QWORD PTR -176[rbp], 1
.L28:
	mov	rax, QWORD PTR -176[rbp]
	cmp	rax, QWORD PTR -144[rbp]
	jl	.L30
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rax, -80[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	esi, DWORD PTR -208[rbp]
	mov	eax, DWORD PTR -204[rbp]
	mov	rdi, QWORD PTR -96[rbp]
	mov	rcx, QWORD PTR -112[rbp]
	mov	rdx, QWORD PTR -128[rbp]
	mov	r9d, 5
	mov	r8, rdi
	mov	edi, eax
	call	transfo
	lea	rax, -64[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -80[rbp]
	sub	rax, rdx
	imul	rdx, rax, 1000000
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR -72[rbp]
	sub	rax, rcx
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -240[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -88[rbp], rax
	cmp	QWORD PTR -88[rbp], 0
	jne	.L31
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L31:
	mov	rax, QWORD PTR -88[rbp]
	mov	rcx, rax
	mov	edx, 3
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	mov	ecx, DWORD PTR -204[rbp]
	mov	edx, DWORD PTR -208[rbp]
	mov	rax, QWORD PTR -88[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edx, DWORD PTR -200[rbp]
	mov	rax, QWORD PTR -88[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	QWORD PTR -176[rbp], 0
	jmp	.L32
.L34:
	mov	rdx, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR -112[rbp]
	lea	rdi, [rdx+rax]
	mov	rax, QWORD PTR -88[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 1
	call	fwrite@PLT
	cmp	rax, -1
	jne	.L33
	lea	rdi, .LC15[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L33:
	add	QWORD PTR -176[rbp], 1
.L32:
	mov	rax, QWORD PTR -176[rbp]
	cmp	rax, QWORD PTR -144[rbp]
	jl	.L34
	mov	rax, QWORD PTR -88[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -40[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L36
	call	__stack_chk_fail@PLT
.L36:
	add	rsp, 272
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	"196279.c"
	.text
	.align	2
	.global	copy
	.syntax unified
	.arm
	.fpu softvfp
	.type	copy, %function
copy:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L5:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L3
.L4:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	mul	r2, r3, r2
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r2, r3, r2
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-16]
	mul	r1, r3, r1
	ldr	r3, [fp, #-12]
	add	r3, r1, r3
	mov	r1, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, r1
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L3:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L4
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L5
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	copy, .-copy
	.align	2
	.global	light
	.syntax unified
	.arm
	.fpu softvfp
	.type	light, %function
light:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #36
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	strb	r3, [fp, #-33]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L7
.L10:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L8
.L9:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-24]
	mul	r2, r3, r2
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r3, r3, r2
	ldrb	r3, [r3]
	strb	r3, [fp, #-13]
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	ldrb	r3, [fp, #-33]	@ zero_extendqisi2
	add	r3, r2, r3
	cmp	r3, #255
	movlt	r2, r3
	movge	r2, #255
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-24]
	mul	r1, r3, r1
	ldr	r3, [fp, #-12]
	add	r3, r1, r3
	mov	r1, r3
	ldr	r3, [fp, #-32]
	add	r3, r3, r1
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L8:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L9
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L7:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L10
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	light, .-light
	.align	2
	.global	curve
	.syntax unified
	.arm
	.fpu softvfp
	.type	curve, %function
curve:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #36
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L12
.L15:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L13
.L14:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-24]
	mul	r2, r3, r2
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r3, r3, r2
	ldrb	r3, [r3]
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	ldr	r2, [fp, #-36]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-24]
	mul	r1, r3, r1
	ldr	r3, [fp, #-12]
	add	r3, r1, r3
	mov	r1, r3
	ldr	r3, [fp, #-32]
	add	r3, r3, r1
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L13:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L14
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L12:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L15
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	curve, .-curve
	.align	2
	.global	transfo
	.syntax unified
	.arm
	.fpu softvfp
	.type	transfo, %function
transfo:
	@ args = 8, 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	copy
	ldr	r3, [fp, #4]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	curve
	ldrb	r3, [fp, #8]	@ zero_extendqisi2
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	light
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	transfo, .-transfo
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: light infile.pgm mapfile.amp outfile.pgm\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"fopen\000"
	.align	2
.LC3:
	.ascii	"%c\000"
	.align	2
.LC4:
	.ascii	"Error, input file is not PGM\012\000"
	.align	2
.LC5:
	.ascii	"%d %d\000"
	.align	2
.LC6:
	.ascii	"%d\000"
	.align	2
.LC7:
	.ascii	"w=%d, h=%d, max=%d\012\000"
	.align	2
.LC8:
	.ascii	"malloc\000"
	.align	2
.LC9:
	.ascii	"fread\000"
	.align	2
.LC10:
	.ascii	"%ld us\012\000"
	.align	2
.LC11:
	.ascii	"w\000"
	.align	2
.LC12:
	.ascii	"P5\012\000"
	.align	2
.LC13:
	.ascii	"%d %d\012\000"
	.align	2
.LC14:
	.ascii	"%d\012\000"
	.align	2
.LC15:
	.ascii	"fwrite\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-104]
	str	r1, [fp, #-108]
	ldr	r3, .L37
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-104]
	cmp	r3, #4
	beq	.L18
	ldr	r0, .L37+4
	bl	puts
	mov	r0, #1
	bl	exit
.L18:
	ldr	r3, [fp, #-108]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L37+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-80]
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	bne	.L19
	ldr	r0, .L37+12
	bl	perror
	mov	r0, #1
	bl	exit
.L19:
	ldr	r3, [fp, #-108]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L37+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-84]
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bne	.L20
	ldr	r0, .L37+12
	bl	perror
	mov	r0, #1
	bl	exit
.L20:
	sub	r3, fp, #98
	mov	r2, r3
	ldr	r1, .L37+16
	ldr	r0, [fp, #-80]
	bl	__isoc99_fscanf
	sub	r3, fp, #97
	mov	r2, r3
	ldr	r1, .L37+16
	ldr	r0, [fp, #-80]
	bl	__isoc99_fscanf
	ldrb	r3, [fp, #-98]	@ zero_extendqisi2
	cmp	r3, #80
	bne	.L21
	ldrb	r3, [fp, #-97]	@ zero_extendqisi2
	cmp	r3, #53
	beq	.L22
.L21:
	ldr	r3, .L37+20
	ldr	r3, [r3]
	mov	r2, #29
	mov	r1, #1
	ldr	r0, .L37+24
	bl	fwrite
	mov	r0, #1
	bl	exit
.L22:
	sub	r3, fp, #92
	sub	r2, fp, #96
	ldr	r1, .L37+28
	ldr	r0, [fp, #-80]
	bl	__isoc99_fscanf
	sub	r3, fp, #88
	mov	r2, r3
	ldr	r1, .L37+32
	ldr	r0, [fp, #-80]
	bl	__isoc99_fscanf
	ldr	r1, [fp, #-92]
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-88]
	ldr	r0, .L37+36
	bl	printf
	ldr	r3, [fp, #-96]
	ldr	r2, [fp, #-92]
	mul	r3, r2, r3
	sub	r2, r3, #1
	str	r2, [fp, #-68]
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	ldr	r3, [fp, #-96]
	ldr	r2, [fp, #-92]
	mul	r3, r2, r3
	sub	r2, r3, #1
	str	r2, [fp, #-64]
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	ldr	r3, [fp, #-96]
	ldr	r2, [fp, #-92]
	mul	r3, r2, r3
	sub	r2, r3, #1
	str	r2, [fp, #-60]
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	ldr	r3, [fp, #-92]
	ldr	r2, [fp, #-96]
	mul	r3, r2, r3
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-96]
	ldr	r2, [fp, #-92]
	mul	r3, r2, r3
	sub	r2, r3, #1
	str	r2, [fp, #-52]
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	ldr	r3, [fp, #-56]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L23
	ldr	r0, .L37+40
	bl	perror
	mov	r0, #1
	bl	exit
.L23:
	ldr	r3, [fp, #-96]
	ldr	r2, [fp, #-92]
	mul	r3, r2, r3
	sub	r2, r3, #1
	str	r2, [fp, #-44]
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	ldr	r3, [fp, #-56]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L24
	ldr	r0, .L37+40
	bl	perror
	mov	r0, #1
	bl	exit
.L24:
	ldr	r3, [fp, #-96]
	ldr	r2, [fp, #-92]
	mul	r3, r2, r3
	sub	r2, r3, #1
	str	r2, [fp, #-36]
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r0, #256
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L25
	ldr	r0, .L37+40
	bl	perror
	mov	r0, #1
	bl	exit
.L25:
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L26
.L27:
	ldrb	r1, [fp, #-16]	@ zero_extendqisi2
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L26:
	sub	r0, fp, #16
	ldr	r3, [fp, #-84]
	mov	r2, #1
	mov	r1, #1
	bl	fread
	mov	r3, r0
	cmp	r3, #0
	bne	.L27
	mov	r2, #1
	mov	r1, #1
	ldr	r0, [fp, #-80]
	bl	fseek
	mov	r3, #0
	str	r3, [fp, #-72]
	b	.L28
.L30:
	ldr	r3, [fp, #-72]
	ldr	r2, [fp, #-48]
	add	r0, r2, r3
	ldr	r3, [fp, #-80]
	mov	r2, #1
	mov	r1, #1
	bl	fread
	mov	r3, r0
	cmp	r3, #0
	bne	.L29
	ldr	r0, .L37+44
	bl	perror
	mov	r0, #1
	bl	exit
.L29:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L28:
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	blt	.L30
	ldr	r0, [fp, #-80]
	bl	fclose
	sub	r3, fp, #24
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r0, [fp, #-92]
	ldr	r1, [fp, #-96]
	mov	r3, #5
	str	r3, [sp, #4]
	ldr	r3, [fp, #-32]
	str	r3, [sp]
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-48]
	bl	transfo
	sub	r3, fp, #16
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r3, .L37+20
	ldr	r0, [r3]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	sub	r1, r2, r3
	mov	r2, r1
	lsl	r2, r2, #5
	sub	r2, r2, r1
	lsl	r3, r2, #6
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #6
	mov	r2, r3
	ldr	r3, [fp, #-12]
	add	r2, r2, r3
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r1, .L37+48
	bl	fprintf
	ldr	r3, [fp, #-108]
	add	r3, r3, #12
	ldr	r3, [r3]
	ldr	r1, .L37+52
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L31
	ldr	r0, .L37+12
	bl	perror
	mov	r0, #1
	bl	exit
.L31:
	ldr	r3, [fp, #-28]
	mov	r2, #3
	mov	r1, #1
	ldr	r0, .L37+56
	bl	fwrite
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-92]
	ldr	r1, .L37+60
	ldr	r0, [fp, #-28]
	bl	fprintf
	ldr	r3, [fp, #-88]
	mov	r2, r3
	ldr	r1, .L37+64
	ldr	r0, [fp, #-28]
	bl	fprintf
	mov	r3, #0
	str	r3, [fp, #-72]
	b	.L32
.L34:
	ldr	r3, [fp, #-72]
	ldr	r2, [fp, #-40]
	add	r0, r2, r3
	ldr	r3, [fp, #-28]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	mov	r3, r0
	cmn	r3, #1
	bne	.L33
	ldr	r0, .L37+68
	bl	perror
	mov	r0, #1
	bl	exit
.L33:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L32:
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	blt	.L34
	ldr	r0, [fp, #-28]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L37
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L36
	bl	__stack_chk_fail
.L36:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	.LC16
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	stderr
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
