	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_logo_vga16
_write_logo_vga16:                      ## @write_logo_vga16
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_logo_height@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_11
## %bb.1:
	movq	_logo_width@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	movq	_logo_data@GOTPCREL(%rip), %r12
	movq	_clut_vga16@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_logo_height@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movl	%ecx, %edx
	cmpq	%rdx, %rbx
	jae	LBB0_11
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_5 Depth 3
	testl	%eax, %eax
	movl	$0, %eax
	je	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	incq	%r14
	movq	_logo_width@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpq	%rax, %r14
	jae	LBB0_9
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_5 Depth 3
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax,%r14,4), %edi
	movq	(%r13), %rax
	movl	(%rax,%r15,4), %esi
	callq	_is_equal
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=3
	incq	%r15
	cmpq	$16, %r15
	jne	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	leaq	L_.str(%rip), %rdi
	callq	_die
	jmp	LBB0_8
LBB0_11:
	xorl	%eax, %eax
	callq	_write_header
	movq	_logo_height@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_28
## %bb.12:
	movq	_logo_width@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	xorl	%ebx, %ebx
	movq	_logo_data@GOTPCREL(%rip), %r13
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	_logo_height@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_27:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%rbx
	movl	%eax, %edx
	cmpq	%rdx, %rbx
	jae	LBB0_28
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
                                        ##       Child Loop BB0_16 Depth 3
                                        ##       Child Loop BB0_21 Depth 3
	testl	%ecx, %ecx
	movl	$0, %ecx
	je	LBB0_27
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_15 Depth=2
	orb	%r12b, %r15b
	movq	_logo_width@GOTPCREL(%rip), %r12
	movq	_logo_data@GOTPCREL(%rip), %r13
LBB0_25:                                ##   in Loop: Header=BB0_15 Depth=2
	movzbl	%r15b, %edi
	callq	_write_hex
	addl	$2, %r14d
	movl	(%r12), %ecx
	cmpl	%ecx, %r14d
	jae	LBB0_26
LBB0_15:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_16 Depth 3
                                        ##       Child Loop BB0_21 Depth 3
	movl	%r14d, %r14d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_13 Depth=1
                                        ##     Parent Loop BB0_15 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax,%r14,4), %edi
	movq	_clut_vga16@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r15,4), %esi
	callq	_is_equal
	testq	%rax, %rax
	jne	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=3
	incq	%r15
	cmpq	$16, %r15
	jne	LBB0_16
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=2
	movb	$16, %r15b
LBB0_19:                                ##   in Loop: Header=BB0_15 Depth=2
	shlb	$4, %r15b
	movl	%r14d, %eax
	orl	$1, %eax
	cmpl	(%r12), %eax
	jae	LBB0_25
## %bb.20:                              ##   in Loop: Header=BB0_15 Depth=2
	movl	%eax, %r13d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_13 Depth=1
                                        ##     Parent Loop BB0_15 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	_logo_data@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax,%r13,4), %edi
	movq	_clut_vga16@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r12,4), %esi
	callq	_is_equal
	testq	%rax, %rax
	jne	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=3
	incq	%r12
	cmpq	$16, %r12
	jne	LBB0_21
## %bb.23:                              ##   in Loop: Header=BB0_15 Depth=2
	movb	$16, %r12b
	jmp	LBB0_24
LBB0_28:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_write_footer                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_logo_height,4,2                ## @logo_height
	.comm	_logo_width,4,2                 ## @logo_width
	.comm	_logo_data,8,3                  ## @logo_data
	.comm	_clut_vga16,8,3                 ## @clut_vga16
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Image must use the 16 console colors only\nUse ppmquant(1) -map clut_vga16.ppm to reduce the number of colors\n"

	.no_dead_strip	_write_logo_vga16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_logo_vga16
_write_logo_vga16:                      ; @write_logo_vga16
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x20, _logo_height@GOTPAGE
Lloh1:
	ldr	x20, [x20, _logo_height@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh2:
	adrp	x21, _logo_width@GOTPAGE
Lloh3:
	ldr	x21, [x21, _logo_width@GOTPAGEOFF]
Lloh4:
	adrp	x22, _logo_data@GOTPAGE
Lloh5:
	ldr	x22, [x22, _logo_data@GOTPAGEOFF]
Lloh6:
	adrp	x23, _clut_vga16@GOTPAGE
Lloh7:
	ldr	x23, [x23, _clut_vga16@GOTPAGEOFF]
	cbz	w8, LBB0_11
; %bb.1:
	mov	x24, #0
	ldr	w9, [x21]
Lloh8:
	adrp	x19, l_.str@PAGE
Lloh9:
	add	x19, x19, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	cmp	x24, w8, uxtw
	b.hs	LBB0_11
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;       Child Loop BB0_8 Depth 3
	cbz	w9, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x25, x25, #1
	ldr	w9, [x21]
	cmp	x25, x9
	b.hs	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_8 Depth 3
	mov	x26, #0
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x8, [x22]
	ldr	x8, [x8, x24, lsl #3]
	ldr	w0, [x8, x25, lsl #2]
	ldr	x8, [x23]
	ldr	w1, [x8, x26]
	bl	_is_equal
	cbnz	x0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=3
	add	x26, x26, #4
	cmp	x26, #64
	b.ne	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=2
	mov	x0, x19
	bl	_die
	b	LBB0_6
LBB0_11:
	bl	_write_header
	ldr	w8, [x20]
	cbz	w8, LBB0_26
; %bb.12:
	mov	x19, #0
	ldr	w9, [x21]
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w8, [x20]
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x19, x19, #1
	cmp	x19, w8, uxtw
	b.hs	LBB0_26
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_19 Depth 2
                                        ;       Child Loop BB0_20 Depth 3
                                        ;       Child Loop BB0_24 Depth 3
	cbz	w9, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	w8, #0
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_19 Depth=2
	orr	w25, w25, w27
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=2
	and	w0, w25, #0xff
	bl	_write_hex
	add	w8, w24, #2
	ldr	w9, [x21]
	cmp	w8, w9
	b.hs	LBB0_13
LBB0_19:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_20 Depth 3
                                        ;       Child Loop BB0_24 Depth 3
	mov	x25, #0
	mov	w24, w8
LBB0_20:                                ;   Parent Loop BB0_15 Depth=1
                                        ;     Parent Loop BB0_19 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x8, [x22]
	ldr	x8, [x8, x19, lsl #3]
	ldr	w0, [x8, x24, lsl #2]
	ldr	x8, [x23]
	ldr	w1, [x8, x25, lsl #2]
	bl	_is_equal
	cbnz	x0, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=3
	add	x25, x25, #1
	cmp	x25, #16
	b.ne	LBB0_20
LBB0_22:                                ;   in Loop: Header=BB0_19 Depth=2
	lsl	w25, w25, #4
	orr	w26, w24, #0x1
	ldr	w8, [x21]
	cmp	w26, w8
	b.hs	LBB0_18
; %bb.23:                               ;   in Loop: Header=BB0_19 Depth=2
	mov	x27, #0
LBB0_24:                                ;   Parent Loop BB0_15 Depth=1
                                        ;     Parent Loop BB0_19 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x8, [x22]
	ldr	x8, [x8, x19, lsl #3]
	ldr	w0, [x8, x26, lsl #2]
	ldr	x8, [x23]
	ldr	w1, [x8, x27, lsl #2]
	bl	_is_equal
	cbnz	x0, LBB0_17
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=3
	add	x27, x27, #1
	cmp	x27, #16
	b.ne	LBB0_24
	b	LBB0_17
LBB0_26:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_write_footer
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_logo_height,4,2                ; @logo_height
	.comm	_logo_width,4,2                 ; @logo_width
	.comm	_logo_data,8,3                  ; @logo_data
	.comm	_clut_vga16,8,3                 ; @clut_vga16
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Image must use the 16 console colors only\nUse ppmquant(1) -map clut_vga16.ppm to reduce the number of colors\n"

	.no_dead_strip	_write_logo_vga16
.subsections_via_symbols
