	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sixel_gfx_frame
_sixel_gfx_frame:                       ## @sixel_gfx_frame
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_58
## %bb.1:
	testl	%edx, %edx
	je	LBB0_58
## %bb.2:
	testl	%ecx, %ecx
	je	LBB0_58
## %bb.3:
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	24(%rbp), %r11
	movq	_sixel_video_bits@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SIXEL_PIXELFORMAT_RGB565@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_sixel_video_width@GOTPCREL(%rip), %r10
	movq	_sixel_video_height@GOTPCREL(%rip), %rdi
	movl	(%rdi), %ebx
	movq	_sixel_video_pitch@GOTPCREL(%rip), %rax
	cmpl	%edx, (%r10)
	jne	LBB0_6
## %bb.4:
	cmpl	%ecx, %ebx
	jne	LBB0_6
## %bb.5:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	cmpl	%r9d, (%rax)
	je	LBB0_10
LBB0_6:
	cmpl	$5, %edx
	jb	LBB0_7
## %bb.8:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	cmpl	$5, %ecx
	jb	LBB0_10
## %bb.9:
	movl	%edx, (%r10)
	movl	%ecx, (%rdi)
	movl	%r9d, (%rax)
	movq	_sixel_video_scale@GOTPCREL(%rip), %r8
	movl	(%r8), %ebx
	imull	%edx, %ebx
	movl	%ebx, (%r14)
	movl	(%rdi), %ebx
	movl	(%r8), %edi
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	imull	%ebx, %edi
	movl	%edi, 4(%r14)
	jmp	LBB0_10
LBB0_7:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
LBB0_10:
	movq	_sixel_menu_frame@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rbx
	movq	(%r11), %rdi
	testq	%rbx, %rbx
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	je	LBB0_13
## %bb.11:
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.59:
	movq	_sixel_menu_width@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_sixel_menu_height@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_sixel_menu_bits@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_sixel_menu_pitch@GOTPCREL(%rip), %rax
	movl	$1, -52(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, %r15
	jmp	LBB0_14
LBB0_12:
	xorl	%edi, %edi
LBB0_13:
	movl	(%r10), %r13d
	xorl	$4, %edx
	xorl	$4, %ecx
	cmpl	$5, %r13d
	setb	%bl
	orl	%edx, %ecx
	setne	%cl
	orb	%bl, %cl
	cmpl	$5, -44(%rbp)                   ## 4-byte Folded Reload
	setb	%dl
	orb	%cl, %dl
	testq	%rdi, %rdi
	sete	%cl
	andb	%dl, %cl
	movzbl	%cl, %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
LBB0_14:
	movl	(%rax), %ecx
	cmpl	%r13d, 8(%r14)
	jne	LBB0_16
## %bb.15:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, 12(%r14)
	je	LBB0_19
LBB0_16:
	movl	%esi, %r12d
	movl	%ecx, %ebx
	movl	4(%r14), %edi
	callq	_scroll_on_demand
	movl	%r13d, 8(%r14)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 12(%r14)
	movq	_sixel_temp_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.17:
	callq	_free
LBB0_18:
	movl	(%r14), %edi
	imull	4(%r14), %edi
	shll	$2, %edi
	callq	_malloc
	movq	_sixel_temp_buf@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	%ebx, %ecx
	movl	%r12d, %esi
LBB0_19:
	cmpl	$16, %esi
	jne	LBB0_20
## %bb.22:
	movq	_sixel_temp_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	testq	%r8, %r8
	je	LBB0_23
## %bb.24:
	movl	4(%r14), %r11d
	movq	_sixel_menu_frame@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_29
## %bb.25:
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	testl	%r11d, %r11d
	je	LBB0_41
## %bb.26:
	shrl	-48(%rbp)                       ## 4-byte Folded Spill
	movl	(%r14), %ecx
	xorl	%r10d, %r10d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_27
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_27 Depth=1
	xorl	%ecx, %ecx
	movq	%r8, %r15
LBB0_40:                                ##   in Loop: Header=BB0_27 Depth=1
	incl	%r10d
	cmpl	%r11d, %r10d
	movq	%r15, %r8
	jae	LBB0_41
LBB0_27:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_39 Depth 2
	testl	%ecx, %ecx
	je	LBB0_28
## %bb.38:                              ##   in Loop: Header=BB0_27 Depth=1
	movl	%r10d, %r9d
	imull	-44(%rbp), %r9d                 ## 4-byte Folded Reload
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	movq	%r8, %r15
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_39:                                ##   Parent Loop BB0_27 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %edi
	movl	%r9d, %eax
	xorl	%edx, %edx
	divl	%r11d
                                        ## kill: def $eax killed $eax def $rax
	imull	%r8d, %eax
	addl	%edi, %eax
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movzwl	(%rdx,%rax,2), %edx
	leal	(,%rdx,8), %eax
	movzbl	%al, %r11d
	movl	%edx, %edi
	shrl	$2, %edi
	andl	$7, %edi
	orl	%r11d, %edi
	movl	%edx, %esi
	andl	$458752, %eax                   ## imm = 0x70000
	orl	%edi, %eax
	movl	%edx, %edi
	shll	$8, %edx
	andl	$16252928, %edx                 ## imm = 0xF80000
	orl	%edx, %eax
	shrl	%edi
	andl	$768, %edi                      ## imm = 0x300
	orl	%edi, %eax
	shll	$5, %esi
	andl	$64512, %esi                    ## imm = 0xFC00
	addl	%esi, %eax
	addl	$-16777216, %eax                ## imm = 0xFF000000
	imull	%r10d, %ecx
	addl	%ebx, %ecx
	movl	%eax, (%r15,%rcx,4)
	incl	%ebx
	movl	(%r14), %ecx
	movl	4(%r14), %r11d
	addl	%r13d, %r12d
	cmpl	%ecx, %ebx
	jb	LBB0_39
	jmp	LBB0_40
LBB0_20:
	movl	4(%r14), %edi
	testl	%edi, %edi
	je	LBB0_21
## %bb.42:
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	shrl	$3, %esi
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	movq	_sixel_temp_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movl	(%r14), %ecx
	xorl	%r9d, %r9d
	jmp	LBB0_43
	.p2align	4, 0x90
LBB0_44:                                ##   in Loop: Header=BB0_43 Depth=1
	xorl	%ecx, %ecx
LBB0_47:                                ##   in Loop: Header=BB0_43 Depth=1
	incl	%r9d
	cmpl	%edi, %r9d
	jae	LBB0_48
LBB0_43:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_46 Depth 2
	testl	%ecx, %ecx
	je	LBB0_44
## %bb.45:                              ##   in Loop: Header=BB0_43 Depth=1
	movl	%r9d, %r10d
	imull	-44(%rbp), %r10d                ## 4-byte Folded Reload
	xorl	%esi, %esi
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	xorl	%edx, %edx
	divl	-56(%rbp)                       ## 4-byte Folded Reload
	movl	%eax, %r11d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_46:                                ##   Parent Loop BB0_43 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %ebx
	movl	%r10d, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $eax killed $eax def $rax
	imull	%r11d, %eax
	addl	%ebx, %eax
	movl	(%r15,%rax,4), %eax
	imull	%r9d, %ecx
	addl	%r12d, %ecx
	movl	%eax, (%r8,%rcx,4)
	incl	%r12d
	movl	(%r14), %ecx
	movl	4(%r14), %edi
	addl	%r13d, %esi
	cmpl	%ecx, %r12d
	jb	LBB0_46
	jmp	LBB0_47
LBB0_48:
	movq	%r8, %r15
	jmp	LBB0_49
LBB0_41:
	movq	_SIXEL_PIXELFORMAT_BGRA8888@GOTPCREL(%rip), %rax
	jmp	LBB0_37
LBB0_23:
	movq	24(%rbp), %rbx
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_51
LBB0_21:
	movq	_sixel_temp_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
LBB0_49:
	movq	_SIXEL_PIXELFORMAT_BGRA8888@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_50
LBB0_29:
	testl	%r11d, %r11d
	je	LBB0_36
## %bb.30:
	movl	(%r14), %ecx
	xorl	%r9d, %r9d
	jmp	LBB0_31
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_31 Depth=1
	xorl	%ecx, %ecx
LBB0_35:                                ##   in Loop: Header=BB0_31 Depth=1
	incl	%r9d
	cmpl	%r11d, %r9d
	jae	LBB0_36
LBB0_31:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_34 Depth 2
	testl	%ecx, %ecx
	je	LBB0_32
## %bb.33:                              ##   in Loop: Header=BB0_31 Depth=1
	movl	%r9d, %r10d
	imull	-44(%rbp), %r10d                ## 4-byte Folded Reload
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_34:                                ##   Parent Loop BB0_31 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %edi
	movl	%r10d, %eax
	xorl	%edx, %edx
	divl	%r11d
                                        ## kill: def $eax killed $eax def $rax
	imull	%r13d, %eax
	addl	%edi, %eax
	movzwl	(%r15,%rax,2), %eax
	movl	%eax, %edx
	andl	$61440, %edx                    ## imm = 0xF000
	imull	$272, %edx, %r11d               ## imm = 0x110
	movl	%eax, %edx
	andl	$3840, %edx                     ## imm = 0xF00
	movl	%edx, %edi
	shll	$4, %edi
	orl	%edx, %edi
	andl	$240, %eax
	movl	%eax, %edx
	shrl	$4, %edx
	orl	%eax, %edx
	orl	%edi, %edx
	leal	(%r11,%rdx), %eax
	addl	$-16777216, %eax                ## imm = 0xFF000000
	imull	%r9d, %ecx
	addl	%ebx, %ecx
	movl	%eax, (%r8,%rcx,4)
	incl	%ebx
	movl	(%r14), %ecx
	movl	4(%r14), %r11d
	addl	%r13d, %esi
	cmpl	%ecx, %ebx
	jb	LBB0_34
	jmp	LBB0_35
LBB0_36:
	movq	_SIXEL_PIXELFORMAT_RGBA8888@GOTPCREL(%rip), %rax
LBB0_37:
	movl	(%rax), %r13d
	movq	%r8, %r15
LBB0_50:
	movq	24(%rbp), %rbx
	movl	-52(%rbp), %eax                 ## 4-byte Reload
LBB0_51:
	movq	16(%rbp), %r12
	testl	%eax, %eax
	je	LBB0_56
## %bb.52:
	cmpl	$0, (%r14)
	je	LBB0_56
## %bb.53:
	cmpl	$0, 4(%r14)
	je	LBB0_56
## %bb.54:
	leaq	L_.str(%rip), %rdi
	callq	_printf
	movl	(%r14), %esi
	movl	4(%r14), %edx
	movq	_SIXEL_COLORS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r13d, %r8d
	callq	_output_sixel
	movl	%eax, 16(%r14)
	movl	%eax, %edi
	callq	_SIXEL_FAILED
	testq	%rax, %rax
	je	LBB0_56
## %bb.55:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	16(%r14), %edi
	callq	_sixel_helper_format_error
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_sixel_helper_get_additional_message
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edi
	movq	%r14, %rdx
	movq	%rax, %rcx
	callq	_fprintf
LBB0_56:
	testq	%r12, %r12
	je	LBB0_58
## %bb.57:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_font_driver_render_msg
LBB0_58:
	movl	$1, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sixel_video_bits,4,2           ## @sixel_video_bits
	.comm	_SIXEL_PIXELFORMAT_RGB565,4,2   ## @SIXEL_PIXELFORMAT_RGB565
	.comm	_sixel_video_width,4,2          ## @sixel_video_width
	.comm	_sixel_video_height,4,2         ## @sixel_video_height
	.comm	_sixel_video_pitch,4,2          ## @sixel_video_pitch
	.comm	_sixel_video_scale,4,2          ## @sixel_video_scale
	.comm	_sixel_menu_frame,8,3           ## @sixel_menu_frame
	.comm	_sixel_menu_width,4,2           ## @sixel_menu_width
	.comm	_sixel_menu_height,4,2          ## @sixel_menu_height
	.comm	_sixel_menu_pitch,4,2           ## @sixel_menu_pitch
	.comm	_sixel_menu_bits,4,2            ## @sixel_menu_bits
	.comm	_sixel_temp_buf,8,3             ## @sixel_temp_buf
	.comm	_SIXEL_PIXELFORMAT_RGBA8888,4,2 ## @SIXEL_PIXELFORMAT_RGBA8888
	.comm	_SIXEL_PIXELFORMAT_BGRA8888,4,2 ## @SIXEL_PIXELFORMAT_BGRA8888
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\0338"

	.comm	_SIXEL_COLORS,4,2               ## @SIXEL_COLORS
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"%s\n%s\n"

	.no_dead_strip	_sixel_gfx_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sixel_gfx_frame
_sixel_gfx_frame:                       ; @sixel_gfx_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	cbz	x1, LBB0_50
; %bb.1:
	cbz	w2, LBB0_50
; %bb.2:
	cbz	w3, LBB0_50
; %bb.3:
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _sixel_video_bits@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sixel_video_bits@GOTPAGEOFF]
Lloh2:
	ldr	w27, [x8]
Lloh3:
	adrp	x9, _SIXEL_PIXELFORMAT_RGB565@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SIXEL_PIXELFORMAT_RGB565@GOTPAGEOFF]
Lloh5:
	adrp	x8, _sixel_video_width@GOTPAGE
Lloh6:
	ldr	x8, [x8, _sixel_video_width@GOTPAGEOFF]
Lloh7:
	ldr	w14, [x9]
	ldr	w12, [x8]
Lloh8:
	adrp	x9, _sixel_video_height@GOTPAGE
Lloh9:
	ldr	x9, [x9, _sixel_video_height@GOTPAGEOFF]
Lloh10:
	adrp	x10, _sixel_video_pitch@GOTPAGE
Lloh11:
	ldr	x10, [x10, _sixel_video_pitch@GOTPAGEOFF]
	ldr	w11, [x9]
	ldr	w13, [x10]
	cmp	w12, w2
	ccmp	w11, w3, #0, eq
	ccmp	w13, w5, #0, eq
	mov	x24, x3
	b.eq	LBB0_7
; %bb.4:
	mov	x24, x11
	cmp	w2, #5
	b.lo	LBB0_7
; %bb.5:
	cmp	w3, #5
	b.lo	LBB0_7
; %bb.6:
	str	w2, [x8]
	str	w3, [x9]
	str	w5, [x10]
Lloh12:
	adrp	x10, _sixel_video_scale@GOTPAGE
Lloh13:
	ldr	x10, [x10, _sixel_video_scale@GOTPAGEOFF]
	ldr	w11, [x10]
	mul	w11, w11, w2
	str	w11, [x21]
	ldr	w24, [x9]
	ldr	w9, [x10]
	mul	w9, w9, w24
	str	w9, [x21, #4]
LBB0_7:
Lloh14:
	adrp	x9, _sixel_menu_frame@GOTPAGE
Lloh15:
	ldr	x9, [x9, _sixel_menu_frame@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	ldr	x10, [x7]
	str	w14, [sp, #12]                  ; 4-byte Folded Spill
	cbz	x9, LBB0_10
; %bb.8:
	cbz	x10, LBB0_10
; %bb.9:
	mov	x28, x7
	mov	x20, x6
Lloh17:
	adrp	x8, _sixel_menu_width@GOTPAGE
Lloh18:
	ldr	x8, [x8, _sixel_menu_width@GOTPAGEOFF]
Lloh19:
	ldr	w26, [x8]
Lloh20:
	adrp	x8, _sixel_menu_height@GOTPAGE
Lloh21:
	ldr	x8, [x8, _sixel_menu_height@GOTPAGEOFF]
Lloh22:
	adrp	x10, _sixel_menu_bits@GOTPAGE
Lloh23:
	ldr	x10, [x10, _sixel_menu_bits@GOTPAGEOFF]
Lloh24:
	ldr	w24, [x8]
Lloh25:
	ldr	w27, [x10]
Lloh26:
	adrp	x8, _sixel_menu_pitch@GOTPAGE
Lloh27:
	ldr	x8, [x8, _sixel_menu_pitch@GOTPAGEOFF]
	mov	w3, #1
	mov	x22, x9
	b	LBB0_11
LBB0_10:
	mov	x28, x7
	mov	x20, x6
	ldr	w26, [x8]
	cmp	w2, #4
	ccmp	w3, #4, #0, eq
	ccmp	w26, #5, #0, eq
	ccmp	w24, #5, #0, hs
	ccmp	x10, #0, #0, lo
	cset	w3, eq
Lloh28:
	adrp	x8, _sixel_video_pitch@GOTPAGE
Lloh29:
	ldr	x8, [x8, _sixel_video_pitch@GOTPAGEOFF]
LBB0_11:
	ldr	w25, [x8]
	ldr	w8, [x21, #8]
Lloh30:
	adrp	x19, _sixel_temp_buf@GOTPAGE
Lloh31:
	ldr	x19, [x19, _sixel_temp_buf@GOTPAGEOFF]
	cmp	w8, w26
	b.ne	LBB0_13
; %bb.12:
	ldr	w8, [x21, #12]
	cmp	w8, w24
	b.eq	LBB0_16
LBB0_13:
	mov	x23, x3
	ldr	w0, [x21, #4]
	bl	_scroll_on_demand
	stp	w26, w24, [x21, #8]
	ldr	x0, [x19]
	cbz	x0, LBB0_15
; %bb.14:
	bl	_free
LBB0_15:
	ldp	w8, w9, [x21]
	mul	w8, w8, w9
	lsl	w0, w8, #2
	bl	_malloc
	str	x0, [x19]
	mov	x3, x23
LBB0_16:
	cmp	w27, #16
	b.ne	LBB0_25
; %bb.17:
	ldr	x8, [x19]
	cbz	x8, LBB0_33
; %bb.18:
Lloh32:
	adrp	x9, _sixel_menu_frame@GOTPAGE
Lloh33:
	ldr	x9, [x9, _sixel_menu_frame@GOTPAGEOFF]
Lloh34:
	ldr	x10, [x9]
	ldr	w9, [x21, #4]
	mov	x19, x20
	cmp	x22, x10
	b.eq	LBB0_36
; %bb.19:
	cbz	w9, LBB0_32
; %bb.20:
	mov	w10, #0
	lsr	w11, w25, #1
	ldr	w12, [x21]
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	add	w10, w10, #1
	cmp	w10, w9
	b.hs	LBB0_32
LBB0_22:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_24 Depth 2
	cbz	w12, LBB0_21
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	w13, #0
	mov	w14, #0
	mul	w15, w10, w24
LBB0_24:                                ;   Parent Loop BB0_22 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	udiv	w16, w13, w12
	udiv	w9, w15, w9
	madd	w9, w9, w11, w16
	ldrh	w9, [x22, w9, uxtw #1]
	lsr	w16, w9, #5
	lsr	w17, w9, #11
	lsr	w0, w9, #13
	ubfiz	w1, w9, #3, #5
	lsr	w2, w9, #1
	and	w2, w2, #0x300
	bfxil	w1, w9, #2, #3
	bfi	w1, w0, #16, #3
	bfi	w1, w17, #19, #5
	orr	w9, w1, w2
	bfi	w9, w16, #10, #6
	orr	w9, w9, #0xff000000
	madd	w12, w10, w12, w14
	str	w9, [x8, w12, uxtw #2]
	add	w14, w14, #1
	ldp	w12, w9, [x21]
	add	w13, w13, w26
	cmp	w14, w12
	b.lo	LBB0_24
	b	LBB0_21
LBB0_25:
	ldr	w10, [x21, #4]
	cbz	w10, LBB0_34
; %bb.26:
	mov	w8, #0
	lsr	w11, w27, #3
	ldr	x9, [x19]
	ldr	w12, [x21]
	udiv	w11, w25, w11
	mov	x19, x20
	b	LBB0_28
LBB0_27:                                ;   in Loop: Header=BB0_28 Depth=1
	add	w8, w8, #1
	cmp	w8, w10
	b.hs	LBB0_31
LBB0_28:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_30 Depth 2
	cbz	w12, LBB0_27
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	mov	w13, #0
	mov	w14, #0
	mul	w15, w8, w24
LBB0_30:                                ;   Parent Loop BB0_28 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	udiv	w16, w13, w12
	udiv	w10, w15, w10
	madd	w10, w11, w10, w16
	ldr	w10, [x22, w10, uxtw #2]
	madd	w12, w8, w12, w14
	str	w10, [x9, w12, uxtw #2]
	add	w14, w14, #1
	ldp	w12, w10, [x21]
	add	w13, w13, w26
	cmp	w14, w12
	b.lo	LBB0_30
	b	LBB0_27
LBB0_31:
	mov	x22, x9
	b	LBB0_35
LBB0_32:
Lloh35:
	adrp	x9, _SIXEL_PIXELFORMAT_BGRA8888@GOTPAGE
Lloh36:
	ldr	x9, [x9, _SIXEL_PIXELFORMAT_BGRA8888@GOTPAGEOFF]
	b	LBB0_43
LBB0_33:
	mov	x19, x20
	ldr	w23, [sp, #12]                  ; 4-byte Folded Reload
	cbnz	w3, LBB0_44
	b	LBB0_48
LBB0_34:
	ldr	x22, [x19]
	mov	x19, x20
LBB0_35:
Lloh37:
	adrp	x8, _SIXEL_PIXELFORMAT_BGRA8888@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SIXEL_PIXELFORMAT_BGRA8888@GOTPAGEOFF]
Lloh39:
	ldr	w23, [x8]
	cbnz	w3, LBB0_44
	b	LBB0_48
LBB0_36:
	cbz	w9, LBB0_42
; %bb.37:
	mov	w10, #0
	ldr	w11, [x21]
	b	LBB0_39
LBB0_38:                                ;   in Loop: Header=BB0_39 Depth=1
	add	w10, w10, #1
	cmp	w10, w9
	b.hs	LBB0_42
LBB0_39:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_41 Depth 2
	cbz	w11, LBB0_38
; %bb.40:                               ;   in Loop: Header=BB0_39 Depth=1
	mov	w12, #0
	mov	w13, #0
	mul	w14, w10, w24
LBB0_41:                                ;   Parent Loop BB0_39 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	udiv	w15, w12, w11
	udiv	w9, w14, w9
	madd	w9, w9, w26, w15
	ldrh	w9, [x22, w9, uxtw #1]
	and	w15, w9, #0xf000
	lsr	w16, w15, #12
	bfi	w15, w16, #16, #4
	lsr	w15, w15, #12
	and	w16, w9, #0xf00
	lsr	w17, w16, #8
	bfi	w16, w17, #12, #4
	and	w17, w9, #0xf0
	bfxil	w17, w9, #4, #4
	orr	w9, w17, w16
	bfi	w9, w15, #16, #8
	orr	w9, w9, #0xff000000
	madd	w11, w10, w11, w13
	str	w9, [x8, w11, uxtw #2]
	add	w13, w13, #1
	ldp	w11, w9, [x21]
	add	w12, w12, w26
	cmp	w13, w11
	b.lo	LBB0_41
	b	LBB0_38
LBB0_42:
Lloh40:
	adrp	x9, _SIXEL_PIXELFORMAT_RGBA8888@GOTPAGE
Lloh41:
	ldr	x9, [x9, _SIXEL_PIXELFORMAT_RGBA8888@GOTPAGEOFF]
LBB0_43:
	ldr	w23, [x9]
	mov	x22, x8
	cbz	w3, LBB0_48
LBB0_44:
	ldr	w8, [x21]
	cbz	w8, LBB0_48
; %bb.45:
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_48
; %bb.46:
Lloh42:
	adrp	x0, l_.str@PAGE
Lloh43:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	ldp	w1, w2, [x21]
Lloh44:
	adrp	x8, _SIXEL_COLORS@GOTPAGE
Lloh45:
	ldr	x8, [x8, _SIXEL_COLORS@GOTPAGEOFF]
Lloh46:
	ldr	w3, [x8]
	mov	x0, x22
	mov	x4, x23
	bl	_output_sixel
	str	w0, [x21, #16]
	bl	_SIXEL_FAILED
	cbz	x0, LBB0_48
; %bb.47:
Lloh47:
	adrp	x8, _stderr@GOTPAGE
Lloh48:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh49:
	ldr	w22, [x8]
	ldr	w0, [x21, #16]
	bl	_sixel_helper_format_error
	mov	x21, x0
	bl	_sixel_helper_get_additional_message
	mov	x3, x0
Lloh50:
	adrp	x1, l_.str.1@PAGE
Lloh51:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x2, x21
	bl	_fprintf
LBB0_48:
	cbz	x19, LBB0_50
; %bb.49:
	mov	x0, x28
	mov	x1, #0
	mov	x2, x19
	mov	x3, #0
	bl	_font_driver_render_msg
LBB0_50:
	mov	w0, #1
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_sixel_video_bits,4,2           ; @sixel_video_bits
	.comm	_SIXEL_PIXELFORMAT_RGB565,4,2   ; @SIXEL_PIXELFORMAT_RGB565
	.comm	_sixel_video_width,4,2          ; @sixel_video_width
	.comm	_sixel_video_height,4,2         ; @sixel_video_height
	.comm	_sixel_video_pitch,4,2          ; @sixel_video_pitch
	.comm	_sixel_video_scale,4,2          ; @sixel_video_scale
	.comm	_sixel_menu_frame,8,3           ; @sixel_menu_frame
	.comm	_sixel_menu_width,4,2           ; @sixel_menu_width
	.comm	_sixel_menu_height,4,2          ; @sixel_menu_height
	.comm	_sixel_menu_pitch,4,2           ; @sixel_menu_pitch
	.comm	_sixel_menu_bits,4,2            ; @sixel_menu_bits
	.comm	_sixel_temp_buf,8,3             ; @sixel_temp_buf
	.comm	_SIXEL_PIXELFORMAT_RGBA8888,4,2 ; @SIXEL_PIXELFORMAT_RGBA8888
	.comm	_SIXEL_PIXELFORMAT_BGRA8888,4,2 ; @SIXEL_PIXELFORMAT_BGRA8888
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\0338"

	.comm	_SIXEL_COLORS,4,2               ; @SIXEL_COLORS
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"%s\n%s\n"

	.no_dead_strip	_sixel_gfx_frame
.subsections_via_symbols
