	.file	"29824666.c"
	.intel_syntax noprefix
	.text
	.type	pabort, @function
pabort:
.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	perror@PLT
	call	abort@PLT
	.cfi_endproc
.LFE6:
	.size	pabort, .-pabort
	.section	.rodata
.LC0:
	.string	"/dev/spidev0.1"
	.section	.data.rel.local,"aw"
	.align 8
	.type	device, @object
	.size	device, 8
device:
	.quad	.LC0
	.local	mode
	.comm	mode,1,1
	.data
	.type	bits, @object
	.size	bits, 1
bits:
	.byte	8
	.align 4
	.type	speed, @object
	.size	speed, 4
speed:
	.long	16000000
	.local	delay
	.comm	delay,2,2
	.globl	lepton_frame_packet
	.bss
	.align 32
	.type	lepton_frame_packet, @object
	.size	lepton_frame_packet, 164
lepton_frame_packet:
	.zero	164
	.local	lepton_image
	.comm	lepton_image,25600,32
	.section	.rodata
	.align 8
.LC1:
	.string	"/home/pi/LeptonModule/fire.jpg"
.LC2:
	.string	"w"
.LC3:
	.string	"Error opening file!"
	.align 8
.LC4:
	.string	"Calculating min/max values for proper scaling..."
.LC5:
	.string	"maxval = %u\n"
.LC6:
	.string	"minval = %u\n"
.LC7:
	.string	"P2\n80 60\n%u\n"
.LC8:
	.string	"%d "
.LC9:
	.string	"\n\n"
	.text
	.type	save_pgm_file, @function
save_pgm_file:
.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, 304
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -288[rbp], 0
	mov	DWORD PTR -284[rbp], -1
.L3:
	lea	rax, -272[rbp]
	mov	edx, 0
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -272[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	access@PLT
	test	eax, eax
	je	.L3
	lea	rax, -272[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -280[rbp], rax
	cmp	QWORD PTR -280[rbp], 0
	jne	.L4
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	DWORD PTR -296[rbp], 0
	jmp	.L5
.L10:
	mov	DWORD PTR -292[rbp], 0
	jmp	.L6
.L9:
	mov	eax, DWORD PTR -292[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -296[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, lepton_image[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -288[rbp], eax
	jnb	.L7
	mov	eax, DWORD PTR -292[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -296[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, lepton_image[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -288[rbp], eax
.L7:
	mov	eax, DWORD PTR -292[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -296[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, lepton_image[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -284[rbp], eax
	jbe	.L8
	mov	eax, DWORD PTR -292[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -296[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, lepton_image[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -284[rbp], eax
.L8:
	add	DWORD PTR -292[rbp], 1
.L6:
	cmp	DWORD PTR -292[rbp], 79
	jle	.L9
	add	DWORD PTR -296[rbp], 1
.L5:
	cmp	DWORD PTR -296[rbp], 59
	jle	.L10
	mov	eax, DWORD PTR -288[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -284[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -288[rbp]
	sub	eax, DWORD PTR -284[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -280[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -296[rbp], 0
	jmp	.L11
.L14:
	mov	DWORD PTR -292[rbp], 0
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -292[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -296[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, lepton_image[rip]
	mov	eax, DWORD PTR [rdx+rax]
	sub	eax, DWORD PTR -284[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -280[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -292[rbp], 1
.L12:
	cmp	DWORD PTR -292[rbp], 79
	jle	.L13
	mov	rax, QWORD PTR -280[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	add	DWORD PTR -296[rbp], 1
.L11:
	cmp	DWORD PTR -296[rbp], 59
	jle	.L14
	mov	rax, QWORD PTR -280[rbp]
	mov	rcx, rax
	mov	edx, 2
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -280[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	save_pgm_file, .-save_pgm_file
	.section	.rodata
	.align 8
.LC11:
	.string	"current max temp in view <= %f\n"
	.align 8
.LC13:
	.string	"current max temp in view = %f\n"
	.text
	.globl	print_max_temp
	.type	print_max_temp, @function
print_max_temp:
.LFB8:
	.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	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], -1
	mov	DWORD PTR -32[rbp], 0
	jmp	.L17
.L22:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L18
.L21:
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, lepton_image[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -24[rbp], eax
	jnb	.L19
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, lepton_image[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -24[rbp], eax
.L19:
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, lepton_image[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -20[rbp], eax
	jbe	.L20
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 4
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, lepton_image[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -20[rbp], eax
.L20:
	add	DWORD PTR -28[rbp], 1
.L18:
	cmp	DWORD PTR -28[rbp], 79
	jle	.L21
	add	DWORD PTR -32[rbp], 1
.L17:
	cmp	DWORD PTR -32[rbp], 59
	jle	.L22
	cmp	DWORD PTR -24[rbp], 8191
	ja	.L23
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	movsd	xmm0, QWORD PTR .LC10[rip]
	movsd	QWORD PTR -8[rbp], xmm0
	mov	rax, QWORD PTR -8[rbp]
	movq	xmm0, rax
	lea	rdi, .LC11[rip]
	mov	eax, 1
	call	printf@PLT
	mov	eax, DWORD PTR -24[rbp]
	jmp	.L24
.L23:
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, 8192
	mov	eax, eax
	test	rax, rax
	js	.L25
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	jmp	.L26
.L25:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
.L26:
	movsd	xmm1, QWORD PTR .LC12[rip]
	mulsd	xmm1, xmm0
	movsd	xmm0, QWORD PTR .LC10[rip]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -16[rbp], xmm0
	mov	rax, QWORD PTR -16[rbp]
	movq	xmm0, rax
	lea	rdi, .LC13[rip]
	mov	eax, 1
	call	printf@PLT
	mov	eax, DWORD PTR -24[rbp]
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	print_max_temp, .-print_max_temp
	.section	.rodata
.LC14:
	.string	"can't send spi message"
	.text
	.globl	transfer
	.type	transfer, @function
transfer:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 240
	mov	DWORD PTR -228[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -176[rbp], 0
	mov	QWORD PTR -168[rbp], 0
	mov	QWORD PTR -160[rbp], 0
	mov	QWORD PTR -152[rbp], 0
	mov	QWORD PTR -144[rbp], 0
	mov	QWORD PTR -136[rbp], 0
	mov	QWORD PTR -128[rbp], 0
	mov	QWORD PTR -120[rbp], 0
	mov	QWORD PTR -112[rbp], 0
	mov	QWORD PTR -104[rbp], 0
	mov	QWORD PTR -96[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	mov	QWORD PTR -208[rbp], 0
	mov	QWORD PTR -200[rbp], 0
	mov	QWORD PTR -192[rbp], 0
	mov	QWORD PTR -184[rbp], 0
	lea	rax, -176[rbp]
	mov	QWORD PTR -208[rbp], rax
	lea	rax, lepton_frame_packet[rip]
	mov	QWORD PTR -200[rbp], rax
	mov	DWORD PTR -192[rbp], 164
	mov	eax, DWORD PTR speed[rip]
	mov	DWORD PTR -188[rbp], eax
	movzx	eax, WORD PTR delay[rip]
	mov	WORD PTR -184[rbp], ax
	movzx	eax, BYTE PTR bits[rip]
	mov	BYTE PTR -182[rbp], al
	lea	rdx, -208[rbp]
	mov	eax, DWORD PTR -228[rbp]
	mov	esi, 1075866368
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -212[rbp], eax
	cmp	DWORD PTR -212[rbp], 0
	jg	.L28
	lea	rdi, .LC14[rip]
	call	pabort
.L28:
	movzx	eax, BYTE PTR lepton_frame_packet[rip]
	movzx	eax, al
	and	eax, 15
	cmp	eax, 15
	je	.L29
	movzx	eax, BYTE PTR lepton_frame_packet[rip+1]
	movzx	eax, al
	mov	DWORD PTR -216[rbp], eax
	cmp	DWORD PTR -216[rbp], 59
	jg	.L29
	mov	DWORD PTR -220[rbp], 0
	jmp	.L30
.L31:
	mov	eax, DWORD PTR -220[rbp]
	add	eax, 2
	add	eax, eax
	cdqe
	lea	rdx, lepton_frame_packet[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	eax, al
	sal	eax, 8
	mov	ecx, eax
	mov	eax, DWORD PTR -220[rbp]
	add	eax, eax
	add	eax, 5
	cdqe
	lea	rdx, lepton_frame_packet[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	eax, al
	or	eax, ecx
	mov	ecx, eax
	mov	eax, DWORD PTR -220[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -216[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 4
	add	rax, rsi
	lea	rdx, 0[0+rax*4]
	lea	rax, lepton_image[rip]
	mov	DWORD PTR [rdx+rax], ecx
	add	DWORD PTR -220[rbp], 1
.L30:
	cmp	DWORD PTR -220[rbp], 79
	jle	.L31
.L29:
	mov	eax, DWORD PTR -216[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	transfer, .-transfer
	.section	.rodata
.LC15:
	.string	"can't open device"
.LC16:
	.string	"can't set spi mode"
.LC17:
	.string	"can't get spi mode"
.LC18:
	.string	"can't set bits per word"
.LC19:
	.string	"can't get bits per word"
.LC20:
	.string	"can't set max speed hz"
.LC21:
	.string	"can't get max speed hz"
.LC22:
	.string	"spi mode: %d\n"
.LC23:
	.string	"bits per word: %d\n"
.LC24:
	.string	"max speed: %d Hz (%d KHz)\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR device[rip]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], 0
	jns	.L35
	lea	rdi, .LC15[rip]
	call	pabort
.L35:
	mov	eax, DWORD PTR -8[rbp]
	lea	rdx, mode[rip]
	mov	esi, 1073834753
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	jne	.L36
	lea	rdi, .LC16[rip]
	call	pabort
.L36:
	mov	eax, DWORD PTR -8[rbp]
	lea	rdx, mode[rip]
	mov	esi, 2147576577
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	jne	.L37
	lea	rdi, .LC17[rip]
	call	pabort
.L37:
	mov	eax, DWORD PTR -8[rbp]
	lea	rdx, bits[rip]
	mov	esi, 1073834755
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	jne	.L38
	lea	rdi, .LC18[rip]
	call	pabort
.L38:
	mov	eax, DWORD PTR -8[rbp]
	lea	rdx, bits[rip]
	mov	esi, 2147576579
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	jne	.L39
	lea	rdi, .LC19[rip]
	call	pabort
.L39:
	mov	eax, DWORD PTR -8[rbp]
	lea	rdx, speed[rip]
	mov	esi, 1074031364
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	jne	.L40
	lea	rdi, .LC20[rip]
	call	pabort
.L40:
	mov	eax, DWORD PTR -8[rbp]
	lea	rdx, speed[rip]
	mov	esi, 2147773188
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	jne	.L41
	lea	rdi, .LC21[rip]
	call	pabort
.L41:
	movzx	eax, BYTE PTR mode[rip]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	movzx	eax, BYTE PTR bits[rip]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR speed[rip]
	mov	eax, eax
	imul	rax, rax, 274877907
	shr	rax, 32
	mov	edx, eax
	shr	edx, 6
	mov	eax, DWORD PTR speed[rip]
	mov	esi, eax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 0
	mov	DWORD PTR -16[rbp], 0
.L45:
	nop
.L42:
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	transfer
	cmp	eax, 59
	jne	.L42
	call	print_max_temp
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 10000
	jle	.L43
	add	DWORD PTR -16[rbp], 1
.L43:
	cmp	DWORD PTR -16[rbp], 10
	jle	.L44
	mov	DWORD PTR -16[rbp], 0
	call	save_pgm_file
.L44:
	mov	edi, 500000
	call	usleep@PLT
	jmp	.L45
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC10:
	.long	0
	.long	1077477376
	.align 8
.LC12:
	.long	-1381261482
	.long	1068916696
	.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	"29824666.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pabort, %function
pabort:
	@ 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]
	ldr	r0, [fp, #-8]
	bl	perror
	bl	abort
	.size	pabort, .-pabort
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/spidev0.1\000"
	.data
	.align	2
	.type	device, %object
	.size	device, 4
device:
	.word	.LC0
	.local	mode
	.comm	mode,1,1
	.type	bits, %object
	.size	bits, 1
bits:
	.byte	8
	.align	2
	.type	speed, %object
	.size	speed, 4
speed:
	.word	16000000
	.local	delay
	.comm	delay,2,2
	.comm	lepton_frame_packet,164,4
	.local	lepton_image
	.comm	lepton_image,25600,4
	.section	.rodata
	.align	2
.LC1:
	.ascii	"/home/pi/LeptonModule/fire.jpg\000"
	.align	2
.LC2:
	.ascii	"w\000"
	.align	2
.LC3:
	.ascii	"Error opening file!\000"
	.align	2
.LC4:
	.ascii	"Calculating min/max values for proper scaling...\000"
	.align	2
.LC5:
	.ascii	"maxval = %u\012\000"
	.align	2
.LC6:
	.ascii	"minval = %u\012\000"
	.align	2
.LC7:
	.ascii	"P2\01280 60\012%u\012\000"
	.align	2
.LC8:
	.ascii	"%d \000"
	.align	2
.LC9:
	.ascii	"\012\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	save_pgm_file, %function
save_pgm_file:
	@ args = 0, pretend = 0, frame = 280
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #280
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-276]
	mvn	r3, #0
	str	r3, [fp, #-272]
.L3:
	sub	r3, fp, #264
	mov	r2, #0
	ldr	r1, .L16+4
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #264
	mov	r1, #0
	mov	r0, r3
	bl	access
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
	sub	r3, fp, #264
	ldr	r1, .L16+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-268]
	ldr	r3, [fp, #-268]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L16+12
	bl	puts
	mov	r0, #1
	bl	exit
.L4:
	ldr	r0, .L16+16
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-284]
	b	.L5
.L10:
	mov	r3, #0
	str	r3, [fp, #-280]
	b	.L6
.L9:
	ldr	r1, .L16+20
	ldr	r2, [fp, #-284]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-280]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	ldr	r2, [fp, #-276]
	cmp	r2, r3
	bcs	.L7
	ldr	r1, .L16+20
	ldr	r2, [fp, #-284]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-280]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	str	r3, [fp, #-276]
.L7:
	ldr	r1, .L16+20
	ldr	r2, [fp, #-284]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-280]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	ldr	r2, [fp, #-272]
	cmp	r2, r3
	bls	.L8
	ldr	r1, .L16+20
	ldr	r2, [fp, #-284]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-280]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	str	r3, [fp, #-272]
.L8:
	ldr	r3, [fp, #-280]
	add	r3, r3, #1
	str	r3, [fp, #-280]
.L6:
	ldr	r3, [fp, #-280]
	cmp	r3, #79
	ble	.L9
	ldr	r3, [fp, #-284]
	add	r3, r3, #1
	str	r3, [fp, #-284]
.L5:
	ldr	r3, [fp, #-284]
	cmp	r3, #59
	ble	.L10
	ldr	r1, [fp, #-276]
	ldr	r0, .L16+24
	bl	printf
	ldr	r1, [fp, #-272]
	ldr	r0, .L16+28
	bl	printf
	ldr	r2, [fp, #-276]
	ldr	r3, [fp, #-272]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r1, .L16+32
	ldr	r0, [fp, #-268]
	bl	fprintf
	mov	r3, #0
	str	r3, [fp, #-284]
	b	.L11
.L14:
	mov	r3, #0
	str	r3, [fp, #-280]
	b	.L12
.L13:
	ldr	r1, .L16+20
	ldr	r2, [fp, #-284]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-280]
	add	r3, r3, r2
	ldr	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-272]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r1, .L16+36
	ldr	r0, [fp, #-268]
	bl	fprintf
	ldr	r3, [fp, #-280]
	add	r3, r3, #1
	str	r3, [fp, #-280]
.L12:
	ldr	r3, [fp, #-280]
	cmp	r3, #79
	ble	.L13
	ldr	r1, [fp, #-268]
	mov	r0, #10
	bl	fputc
	ldr	r3, [fp, #-284]
	add	r3, r3, #1
	str	r3, [fp, #-284]
.L11:
	ldr	r3, [fp, #-284]
	cmp	r3, #59
	ble	.L14
	ldr	r3, [fp, #-268]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, .L16+40
	bl	fwrite
	ldr	r0, [fp, #-268]
	bl	fclose
	nop
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC10
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	lepton_image
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	save_pgm_file, .-save_pgm_file
	.section	.rodata
	.align	2
.LC11:
	.ascii	"current max temp in view <= %f\012\000"
	.global	__aeabi_ui2d
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.align	2
.LC12:
	.ascii	"current max temp in view = %f\012\000"
	.text
	.align	2
	.global	print_max_temp
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_max_temp, %function
print_max_temp:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	mov	r3, #0
	str	r3, [fp, #-28]
	mvn	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L19
.L24:
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L20
.L23:
	ldr	r1, .L27
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-32]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bcs	.L21
	ldr	r1, .L27
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-32]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	str	r3, [fp, #-28]
.L21:
	ldr	r1, .L27
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-32]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bls	.L22
	ldr	r1, .L27
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-32]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	str	r3, [fp, #-24]
.L22:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L20:
	ldr	r3, [fp, #-32]
	cmp	r3, #79
	ble	.L23
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L19:
	ldr	r3, [fp, #-36]
	cmp	r3, #59
	ble	.L24
	ldr	r3, [fp, #-28]
	cmp	r3, #8192
	bcs	.L25
	ldr	r1, [fp, #-28]
	ldr	r0, .L27+4
	bl	printf
	mov	r2, #0
	ldr	r3, .L27+8
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	ldr	r0, .L27+12
	bl	printf
	ldr	r3, [fp, #-28]
	b	.L26
.L25:
	ldr	r1, [fp, #-28]
	ldr	r0, .L27+4
	bl	printf
	ldr	r3, [fp, #-28]
	sub	r3, r3, #8192
	mov	r0, r3
	bl	__aeabi_ui2d
	ldr	r2, .L27+16
	ldr	r3, .L27+20
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L27+8
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	ldr	r0, .L27+24
	bl	printf
	ldr	r3, [fp, #-28]
.L26:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	lepton_image
	.word	.LC5
	.word	1077477376
	.word	.LC11
	.word	-1381261482
	.word	1068916696
	.word	.LC12
	.size	print_max_temp, .-print_max_temp
	.section	.rodata
	.align	2
.LC13:
	.ascii	"can't send spi message\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	transfer
	.syntax unified
	.arm
	.fpu softvfp
	.type	transfer, %function
transfer:
	@ args = 0, pretend = 0, frame = 224
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #224
	str	r0, [fp, #-224]
	ldr	r3, .L36
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-172]
	sub	r3, fp, #168
	mov	r2, #160
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #204
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #172
	mov	r2, r3
	mov	r3, #0
	str	r2, [fp, #-204]
	str	r3, [fp, #-200]
	ldr	r3, .L36+4
	mov	r2, r3
	mov	r3, #0
	str	r2, [fp, #-196]
	str	r3, [fp, #-192]
	mov	r3, #164
	str	r3, [fp, #-188]
	ldr	r3, .L36+8
	ldr	r3, [r3]
	str	r3, [fp, #-184]
	ldr	r3, .L36+12
	ldrh	r3, [r3]
	strh	r3, [fp, #-180]	@ movhi
	ldr	r3, .L36+16
	ldrb	r3, [r3]	@ zero_extendqisi2
	strb	r3, [fp, #-178]
	sub	r3, fp, #204
	mov	r2, r3
	ldr	r1, .L36+20
	ldr	r0, [fp, #-224]
	bl	ioctl
	str	r0, [fp, #-208]
	ldr	r3, [fp, #-208]
	cmp	r3, #0
	bgt	.L30
	ldr	r0, .L36+24
	bl	pabort
.L30:
	ldr	r3, .L36+4
	ldrb	r3, [r3]	@ zero_extendqisi2
	and	r3, r3, #15
	cmp	r3, #15
	beq	.L31
	ldr	r3, .L36+4
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	str	r3, [fp, #-212]
	ldr	r3, [fp, #-212]
	cmp	r3, #59
	bgt	.L31
	mov	r3, #0
	str	r3, [fp, #-216]
	b	.L32
.L33:
	ldr	r3, [fp, #-216]
	add	r3, r3, #2
	lsl	r3, r3, #1
	ldr	r2, .L36+4
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	lsl	r3, r3, #8
	ldr	r2, [fp, #-216]
	lsl	r2, r2, #1
	add	r2, r2, #5
	ldr	r1, .L36+4
	ldrb	r2, [r1, r2]	@ zero_extendqisi2
	orr	r3, r3, r2
	mov	r0, r3
	ldr	r1, .L36+28
	ldr	r2, [fp, #-212]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-216]
	add	r3, r3, r2
	str	r0, [r1, r3, lsl #2]
	ldr	r3, [fp, #-216]
	add	r3, r3, #1
	str	r3, [fp, #-216]
.L32:
	ldr	r3, [fp, #-216]
	cmp	r3, #79
	ble	.L33
.L31:
	ldr	r3, [fp, #-212]
	ldr	r2, .L36
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L35
	bl	__stack_chk_fail
.L35:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L37:
	.align	2
.L36:
	.word	.LC14
	.word	lepton_frame_packet
	.word	speed
	.word	delay
	.word	bits
	.word	1075866368
	.word	.LC13
	.word	lepton_image
	.size	transfer, .-transfer
	.section	.rodata
	.align	2
.LC15:
	.ascii	"can't open device\000"
	.align	2
.LC16:
	.ascii	"can't set spi mode\000"
	.align	2
.LC17:
	.ascii	"can't get spi mode\000"
	.align	2
.LC18:
	.ascii	"can't set bits per word\000"
	.align	2
.LC19:
	.ascii	"can't get bits per word\000"
	.align	2
.LC20:
	.ascii	"can't set max speed hz\000"
	.align	2
.LC21:
	.ascii	"can't get max speed hz\000"
	.align	2
.LC22:
	.ascii	"spi mode: %d\012\000"
	.align	2
.LC23:
	.ascii	"bits per word: %d\012\000"
	.align	2
.LC24:
	.ascii	"max speed: %d Hz (%d KHz)\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, .L50
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L39
	ldr	r0, .L50+4
	bl	pabort
.L39:
	ldr	r2, .L50+8
	ldr	r1, .L50+12
	ldr	r0, [fp, #-12]
	bl	ioctl
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L40
	ldr	r0, .L50+16
	bl	pabort
.L40:
	ldr	r2, .L50+8
	ldr	r1, .L50+20
	ldr	r0, [fp, #-12]
	bl	ioctl
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L41
	ldr	r0, .L50+24
	bl	pabort
.L41:
	ldr	r2, .L50+28
	ldr	r1, .L50+32
	ldr	r0, [fp, #-12]
	bl	ioctl
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L42
	ldr	r0, .L50+36
	bl	pabort
.L42:
	ldr	r2, .L50+28
	ldr	r1, .L50+40
	ldr	r0, [fp, #-12]
	bl	ioctl
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L43
	ldr	r0, .L50+44
	bl	pabort
.L43:
	ldr	r2, .L50+48
	ldr	r1, .L50+52
	ldr	r0, [fp, #-12]
	bl	ioctl
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L44
	ldr	r0, .L50+56
	bl	pabort
.L44:
	ldr	r2, .L50+48
	ldr	r1, .L50+60
	ldr	r0, [fp, #-12]
	bl	ioctl
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L45
	ldr	r0, .L50+64
	bl	pabort
.L45:
	ldr	r3, .L50+8
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L50+68
	bl	printf
	ldr	r3, .L50+28
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L50+72
	bl	printf
	ldr	r3, .L50+48
	ldr	r1, [r3]
	ldr	r3, .L50+48
	ldr	r3, [r3]
	ldr	r2, .L50+76
	umull	r0, r3, r2, r3
	lsr	r3, r3, #6
	mov	r2, r3
	ldr	r0, .L50+80
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-20]
.L49:
	nop
.L46:
	ldr	r0, [fp, #-12]
	bl	transfer
	mov	r3, r0
	cmp	r3, #59
	bne	.L46
	bl	print_max_temp
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, .L50+84
	cmp	r3, r2
	ble	.L47
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L47:
	ldr	r3, [fp, #-20]
	cmp	r3, #10
	ble	.L48
	mov	r3, #0
	str	r3, [fp, #-20]
	bl	save_pgm_file
.L48:
	ldr	r0, .L50+88
	bl	usleep
	b	.L49
.L51:
	.align	2
.L50:
	.word	device
	.word	.LC15
	.word	mode
	.word	1073834753
	.word	.LC16
	.word	-2147390719
	.word	.LC17
	.word	bits
	.word	1073834755
	.word	.LC18
	.word	-2147390717
	.word	.LC19
	.word	speed
	.word	1074031364
	.word	.LC20
	.word	-2147194108
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	274877907
	.word	.LC24
	.word	10000
	.word	500000
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
