	.file	"extr_pnmtologo.c_write_logo_vga16.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Image must use the 16 console colors only\nUse ppmquant(1) -map clut_vga16.ppm to reduce the number of colors\n"
	.text
	.p2align 4
	.type	write_logo_vga16, @function
write_logo_vga16:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	r15, .LC0[rip]
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xor	r14d, r14d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR logo_height[rip]
	test	esi, esi
	je	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	mov	ecx, DWORD PTR logo_width[rip]
	mov	r12d, r14d
	xor	r13d, r13d
	sal	r12, 3
	test	ecx, ecx
	je	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	mov	ebp, r13d
	xor	ebx, ebx
	sal	rbp, 2
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR clut_vga16[rip]
	mov	esi, DWORD PTR [rax+rbx]
	mov	rax, QWORD PTR logo_data[rip]
	mov	rax, QWORD PTR [rax+r12]
	mov	edi, DWORD PTR [rax+rbp]
	call	is_equal@PLT
	test	rax, rax
	jne	.L4
	add	rbx, 4
	cmp	rbx, 64
	jne	.L5
	mov	rdi, r15
	call	die@PLT
.L4:
	add	r13d, 1
	cmp	DWORD PTR logo_width[rip], r13d
	ja	.L7
.L9:
	add	r14d, 1
	cmp	DWORD PTR logo_height[rip], r14d
	ja	.L2
.L3:
	xor	eax, eax
	xor	r13d, r13d
	call	write_header@PLT
	mov	edx, DWORD PTR logo_height[rip]
	test	edx, edx
	je	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	mov	eax, DWORD PTR logo_width[rip]
	mov	ebp, r13d
	xor	r12d, r12d
	sal	rbp, 3
	test	eax, eax
	je	.L21
	.p2align 4,,10
	.p2align 3
.L19:
	mov	r14d, r12d
	xor	ebx, ebx
	sal	r14, 2
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rax, QWORD PTR clut_vga16[rip]
	mov	esi, DWORD PTR [rax+rbx*4]
	mov	rax, QWORD PTR logo_data[rip]
	mov	rax, QWORD PTR [rax+rbp]
	mov	edi, DWORD PTR [rax+r14]
	call	is_equal@PLT
	test	rax, rax
	jne	.L12
	add	rbx, 1
	cmp	rbx, 16
	jne	.L13
	xor	ebx, ebx
	lea	r15d, 1[r12]
	cmp	DWORD PTR logo_width[rip], r15d
	ja	.L37
.L15:
	movzx	edi, bl
	add	r12d, 2
	call	write_hex@PLT
	cmp	DWORD PTR logo_width[rip], r12d
	ja	.L19
.L21:
	add	r13d, 1
	cmp	DWORD PTR logo_height[rip], r13d
	ja	.L10
.L11:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	write_footer@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	sal	ebx, 4
	lea	r15d, 1[r12]
	cmp	DWORD PTR logo_width[rip], r15d
	jbe	.L15
.L37:
	sal	r15, 2
	xor	r14d, r14d
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rax, QWORD PTR clut_vga16[rip]
	mov	esi, DWORD PTR [rax+r14*4]
	mov	rax, QWORD PTR logo_data[rip]
	mov	rax, QWORD PTR [rax+rbp]
	mov	edi, DWORD PTR [rax+r15]
	call	is_equal@PLT
	test	rax, rax
	jne	.L18
	add	r14, 1
	cmp	r14, 16
	jne	.L17
.L18:
	or	ebx, r14d
	jmp	.L15
	.cfi_endproc
.LFE0:
	.size	write_logo_vga16, .-write_logo_vga16
	.comm	logo_width,4,4
	.comm	logo_height,4,4
	.comm	logo_data,8,8
	.comm	clut_vga16,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_pnmtologo.c_write_logo_vga16.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Image must use the 16 console colors only\012Use pp"
	.ascii	"mquant(1) -map clut_vga16.ppm to reduce the number "
	.ascii	"of colors\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_logo_vga16, %function
write_logo_vga16:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L33
	sub	sp, sp, #12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L3
	mov	r9, #0
	ldr	r10, .L33+4
	ldr	r7, .L33+8
	ldr	r6, .L33+12
.L2:
	ldr	r3, [r10]
	cmp	r3, #0
	movne	r8, #0
	lslne	r5, r9, #2
	beq	.L9
.L7:
	mov	fp, #0
	lsl	r4, r8, #2
.L5:
	ldr	r2, [r6]
	ldr	r1, [r7]
	ldr	r2, [r2, r5]
	ldr	r1, [r1, fp]
	ldr	r0, [r2, r4]
	bl	is_equal
	cmp	r0, #0
	add	fp, fp, #4
	bne	.L4
	cmp	fp, #64
	bne	.L5
	ldr	r0, .L33+16
	bl	die
.L4:
	ldr	r3, [r10]
	add	r8, r8, #1
	cmp	r3, r8
	bhi	.L7
.L9:
	ldr	r3, .L33
	add	r9, r9, #1
	ldr	r3, [r3]
	cmp	r3, r9
	bhi	.L2
.L3:
	bl	write_header
	ldr	r3, .L33
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L11
	mov	r3, #0
	ldr	r10, .L33+4
	ldr	r8, .L33+8
	ldr	r7, .L33+12
	str	r3, [sp, #4]
.L10:
	ldr	r3, [r10]
	cmp	r3, #0
	beq	.L21
	mov	r9, #0
	ldr	r3, [sp, #4]
	lsl	r6, r3, #2
.L19:
	mov	r4, #0
	lsl	r5, r9, #2
.L13:
	ldr	r3, [r7]
	ldr	r2, [r8]
	ldr	r3, [r3, r6]
	ldr	r1, [r2, r4, lsl #2]
	ldr	r0, [r3, r5]
	bl	is_equal
	cmp	r0, #0
	bne	.L12
	add	r4, r4, #1
	cmp	r4, #16
	bne	.L13
	ldr	r2, [r10]
	add	r3, r9, #1
	cmp	r2, r3
	mov	r4, r0
	bhi	.L32
.L15:
	mov	r0, r4
	bl	write_hex
	ldr	r3, [r10]
	add	r9, r9, #2
	cmp	r3, r9
	bhi	.L19
.L21:
	ldr	r3, .L33
	ldr	r2, [sp, #4]
	ldr	r3, [r3]
	add	r2, r2, #1
	cmp	r3, r2
	str	r2, [sp, #4]
	bhi	.L10
.L11:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	write_footer
.L12:
	ldr	r2, [r10]
	add	r3, r9, #1
	lsl	r4, r4, #4
	cmp	r2, r3
	and	r4, r4, #255
	bls	.L15
.L32:
	mov	fp, #0
	add	r5, r5, #4
.L17:
	ldr	r2, [r7]
	ldr	r1, [r8]
	ldr	r2, [r2, r6]
	ldr	r1, [r1, fp, lsl #2]
	ldr	r0, [r2, r5]
	bl	is_equal
	cmp	r0, #0
	bne	.L16
	add	fp, fp, #1
	cmp	fp, #16
	bne	.L17
	mov	r3, fp
.L18:
	orr	r4, r4, r3
	b	.L15
.L16:
	and	r3, fp, #255
	b	.L18
.L34:
	.align	2
.L33:
	.word	logo_height
	.word	logo_width
	.word	clut_vga16
	.word	logo_data
	.word	.LC0
	.size	write_logo_vga16, .-write_logo_vga16
	.comm	logo_width,4,4
	.comm	logo_height,4,4
	.comm	logo_data,4,4
	.comm	clut_vga16,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
