	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gif_read_image
_gif_read_image:                        ## @gif_read_image
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	leaq	56(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$8, %eax
	jle	LBB0_30
## %bb.1:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_bytestream2_get_le16u
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_bytestream2_get_le16u
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_bytestream2_get_le16u
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_bytestream2_get_le16u
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_bytestream2_get_byteu
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movl	%eax, %ebx
	movl	64(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	%r14d, %edx
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movl	%r13d, %ecx
	movq	%r12, %r13
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %r8d
	movl	%r13d, %r9d
	callq	_ff_dlog
	movl	%ebx, %eax
	testb	$-128, %al
	jne	LBB0_4
## %bb.2:
	cmpq	$0, 96(%r15)
	movq	%r15, %r12
	je	LBB0_9
## %bb.3:
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	leaq	112(%r12), %r15
	jmp	LBB0_6
LBB0_4:
	movl	%eax, %ecx
	andb	$7, %cl
	movl	$2, %ebx
	shll	%cl, %ebx
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	%eax, %r12d
	callq	_bytestream2_get_bytes_left
	leal	(%rbx,%rbx,2), %ecx
	cmpl	%ecx, %eax
	jl	LBB0_30
## %bb.5:
	movl	%r12d, -92(%rbp)                ## 4-byte Spill
	movq	%r15, %r12
	addq	$120, %r15
	movq	120(%r12), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_gif_read_palette
LBB0_6:
	movq	(%r15), %rax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	cmpq	$0, 104(%r12)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_13
## %bb.7:
	cmpl	$-1, (%r12)
	je	LBB0_10
LBB0_8:
	leaq	92(%r12), %rax
	jmp	LBB0_12
LBB0_9:
	movl	64(%r12), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_30
LBB0_10:
	cmpq	$0, 96(%r12)
	je	LBB0_8
## %bb.11:
	leaq	84(%r12), %rax
LBB0_12:
	movl	(%rax), %esi
	callq	_gif_fill
LBB0_13:
	testl	%r14d, %r14d
	je	LBB0_15
## %bb.14:
	movl	4(%r12), %eax
	cmpl	%eax, %r14d
	jle	LBB0_16
LBB0_15:
	movl	64(%r12), %edi
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movl	4(%r12), %eax
	movl	%eax, %r14d
LBB0_16:
	cmpl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	jge	LBB0_27
## %bb.17:
	testl	%r13d, %r13d
	je	LBB0_19
## %bb.18:
	movl	8(%r12), %eax
	cmpl	%eax, %r13d
	jle	LBB0_20
LBB0_19:
	movl	64(%r12), %edi
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movl	8(%r12), %eax
	movl	%eax, %r13d
LBB0_20:
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	cmpl	%eax, %r8d
	jge	LBB0_28
## %bb.21:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addl	%r14d, %ecx
	movl	4(%r12), %ebx
	movl	%r14d, %edx
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	subl	%ebx, %ecx
	jle	LBB0_23
## %bb.22:
	subl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	movl	64(%r12), %edi
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movl	8(%r12), %eax
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
LBB0_23:
	leal	(%r8,%r13), %ecx
	subl	%eax, %ecx
	jle	LBB0_25
## %bb.24:
	movl	64(%r12), %edi
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.7(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movl	8(%r12), %r13d
	subl	%r8d, %r13d
LBB0_25:
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	16(%r12), %rax
	movq	_GCE_DISPOSAL_BACKGROUND@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_32
## %bb.26:
	movl	88(%r12), %esi
	movl	24(%r12), %edx
	movl	28(%r12), %ecx
	movl	32(%r12), %r8d
	movl	36(%r12), %r9d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_gif_fill_rect
	jmp	LBB0_34
LBB0_27:
	movl	64(%r12), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	jmp	LBB0_29
LBB0_28:
	movl	64(%r12), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	movl	%r8d, %ecx
LBB0_29:
	xorl	%eax, %eax
	callq	_av_log
LBB0_30:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_31:
	movl	%ebx, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	movq	_GCE_DISPOSAL_RESTORE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_35
## %bb.33:
	movq	72(%r12), %rdi
	movq	(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	(%rcx), %rsi
	movl	(%rax), %edx
	sarl	$2, %edx
	movl	24(%r12), %ecx
	movl	28(%r12), %r8d
	movl	32(%r12), %r9d
	movl	36(%r12), %eax
	movl	%eax, (%rsp)
	callq	_gif_copy_img_rect
LBB0_34:
	movq	-64(%rbp), %r8                  ## 8-byte Reload
LBB0_35:
	movq	40(%r12), %rax
	movq	%rax, 16(%r12)
	movq	_GCE_DISPOSAL_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_44
## %bb.36:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, 24(%r12)
	movl	%r8d, 28(%r12)
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 32(%r12)
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, 36(%r12)
	cmpq	(%r15), %rax
	jne	LBB0_39
## %bb.37:
	cmpl	$0, (%r12)
	js	LBB0_42
## %bb.38:
	movl	92(%r12), %eax
	jmp	LBB0_43
LBB0_39:
	movq	_GCE_DISPOSAL_RESTORE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_44
## %bb.40:
	leaq	72(%r12), %rdi
	leaq	80(%r12), %rsi
	movq	(%rbx), %rax
	movl	8(%rbx), %edx
	imull	(%rax), %edx
	callq	_av_fast_malloc
	movq	72(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_69
## %bb.41:
	movq	(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	(%rcx), %rdi
	movl	(%rax), %edx
	sarl	$2, %edx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, (%rsp)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	callq	_gif_copy_img_rect
	jmp	LBB0_44
LBB0_42:
	movl	84(%r12), %eax
LBB0_43:
	movl	%eax, 88(%r12)
LBB0_44:
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movq	%r15, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$1, %eax
	jle	LBB0_30
## %bb.45:
	movq	%r15, %rdi
	callq	_bytestream2_get_byteu
	movl	%eax, %ebx
	movl	56(%r12), %eax
	movl	%eax, -88(%rbp)                 ## 4-byte Spill
	movq	%r12, %r13
	movl	60(%r12), %r12d
	movq	%r15, %rdi
	callq	_bytestream2_get_bytes_left
	movq	_FF_LZW_GIF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	%r12d, %edi
	movl	%ebx, %esi
	movl	-88(%rbp), %edx                 ## 4-byte Reload
	movl	%eax, %ecx
	callq	_ff_lzw_decode_init
	testl	%eax, %eax
	js	LBB0_65
## %bb.46:
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	cmpl	$0, -80(%rbp)                   ## 4-byte Folded Reload
	movq	%r13, %r12
	jle	LBB0_68
## %bb.47:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	movq	16(%rcx), %rcx
	movl	(%rax), %edx
	movl	%edx, %esi
	sarl	$2, %esi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	imull	%esi, %r14d
	movslq	%r14d, %rax
	shlq	$2, %rax
	addq	(%rcx), %rax
	movslq	-48(%rbp), %rcx                 ## 4-byte Folded Reload
	leaq	(%rax,%rcx,4), %r15
	movslq	-52(%rbp), %rcx                 ## 4-byte Folded Reload
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	andl	$-4, %edx
	movl	%edx, -112(%rbp)                ## 4-byte Spill
	leal	(%rsi,%rsi), %ecx
	movl	%ecx, -108(%rbp)                ## 4-byte Spill
	leal	(,%rsi,8), %ecx
	movl	%ecx, -116(%rbp)                ## 4-byte Spill
	movq	%rsi, -136(%rbp)                ## 8-byte Spill
	movslq	%esi, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	48(%r12), %rsi
	xorl	%ecx, %ecx
	movq	%r15, -128(%rbp)                ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	jmp	LBB0_50
LBB0_48:                                ##   in Loop: Header=BB0_50 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%r15,%rax,4), %r15
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
LBB0_49:                                ##   in Loop: Header=BB0_50 Depth=1
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	incl	%ecx
	cmpl	%edx, %ecx
	je	LBB0_68
LBB0_50:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_54 Depth 2
                                        ##     Child Loop BB0_63 Depth 2
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	60(%r12), %edi
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_ff_lzw_decode
	cmpl	%ebx, %eax
	jne	LBB0_66
## %bb.51:                              ##   in Loop: Header=BB0_50 Depth=1
	movq	48(%r12), %rsi
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	movq	-144(%rbp), %r8                 ## 8-byte Reload
	jle	LBB0_56
## %bb.52:                              ##   in Loop: Header=BB0_50 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	(%r15,%rax,4), %rax
	movq	%rsi, %rcx
	movq	%r15, %rdx
	jmp	LBB0_54
	.p2align	4, 0x90
LBB0_53:                                ##   in Loop: Header=BB0_54 Depth=2
	addq	$4, %rdx
	addq	$8, %rcx
	cmpq	%rax, %rdx
	jae	LBB0_56
LBB0_54:                                ##   Parent Loop BB0_50 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rcx), %rdi
	movslq	(%r12), %rbx
	cmpq	%rbx, %rdi
	je	LBB0_53
## %bb.55:                              ##   in Loop: Header=BB0_54 Depth=2
	movl	(%r8,%rdi,4), %edi
	movl	%edi, (%rdx)
	jmp	LBB0_53
	.p2align	4, 0x90
LBB0_56:                                ##   in Loop: Header=BB0_50 Depth=1
	testb	$64, -92(%rbp)                  ## 1-byte Folded Reload
	je	LBB0_48
## %bb.57:                              ##   in Loop: Header=BB0_50 Depth=1
	cmpl	$3, %r14d
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	je	LBB0_60
## %bb.58:                              ##   in Loop: Header=BB0_50 Depth=1
	movl	$8, %eax
	movl	-116(%rbp), %ecx                ## 4-byte Reload
	cmpl	$2, %r14d
	jne	LBB0_61
## %bb.59:                              ##   in Loop: Header=BB0_50 Depth=1
	movl	$4, %eax
	movl	-112(%rbp), %ecx                ## 4-byte Reload
	jmp	LBB0_61
LBB0_60:                                ##   in Loop: Header=BB0_50 Depth=1
	movl	$2, %eax
	movl	-108(%rbp), %ecx                ## 4-byte Reload
LBB0_61:                                ##   in Loop: Header=BB0_50 Depth=1
	addl	%eax, %r13d
	cmpl	%edx, %r13d
	jge	LBB0_63
## %bb.62:                              ##   in Loop: Header=BB0_50 Depth=1
	movslq	%ecx, %rax
	leaq	(%r15,%rax,4), %r15
	jmp	LBB0_49
	.p2align	4, 0x90
LBB0_63:                                ##   Parent Loop BB0_50 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	$4, %r13d
	movl	%r14d, %ecx
	shrl	%cl, %r13d
	incl	%r14d
	cmpl	%edx, %r13d
	jge	LBB0_63
## %bb.64:                              ##   in Loop: Header=BB0_50 Depth=1
	movl	%r13d, %eax
	imull	-136(%rbp), %eax                ## 4-byte Folded Reload
	cltq
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rax,4), %r15
	jmp	LBB0_49
LBB0_65:
	movl	%eax, %ebx
	movl	64(%r13), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.8(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_31
LBB0_66:
	testl	%eax, %eax
	je	LBB0_68
## %bb.67:
	movl	64(%r12), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.9(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
LBB0_68:
	movl	60(%r12), %edi
	callq	_ff_lzw_decode_tail
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	%eax, %esi
	callq	_bytestream2_skipu
	movl	$-1, (%r12)
	movq	_GCE_DISPOSAL_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%r12)
	xorl	%ebx, %ebx
	jmp	LBB0_31
LBB0_69:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"image x=%d y=%d w=%d h=%d\n"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"picture doesn't have either global or local palette.\n"

	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.2:                               ## @.str.2
	.asciz	"Invalid image width: %d, truncating.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Invalid left position: %d.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Invalid image height: %d, truncating.\n"

L_.str.5:                               ## @.str.5
	.asciz	"Invalid top position: %d.\n"

L_.str.6:                               ## @.str.6
	.asciz	"Image too wide by %d, truncating.\n"

L_.str.7:                               ## @.str.7
	.asciz	"Image too high by %d, truncating.\n"

	.comm	_GCE_DISPOSAL_BACKGROUND,8,3    ## @GCE_DISPOSAL_BACKGROUND
	.comm	_GCE_DISPOSAL_RESTORE,8,3       ## @GCE_DISPOSAL_RESTORE
	.comm	_GCE_DISPOSAL_NONE,8,3          ## @GCE_DISPOSAL_NONE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_FF_LZW_GIF,4,2                 ## @FF_LZW_GIF
L_.str.8:                               ## @.str.8
	.asciz	"LZW init failed\n"

L_.str.9:                               ## @.str.9
	.asciz	"LZW decode failed\n"

	.no_dead_strip	_gif_read_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gif_read_image
_gif_read_image:                        ; @gif_read_image
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	mov	x28, x1
	mov	x19, x0
	add	x20, x0, #56
	mov	x0, x20
	bl	_bytestream2_get_bytes_left
	cmp	w0, #8
	b.le	LBB0_41
; %bb.1:
	mov	x0, x20
	bl	_bytestream2_get_le16u
	mov	x25, x0
	mov	x0, x20
	bl	_bytestream2_get_le16u
	mov	x26, x0
	mov	x0, x20
	bl	_bytestream2_get_le16u
	mov	x22, x0
	mov	x0, x20
	bl	_bytestream2_get_le16u
	mov	x23, x0
	mov	x0, x20
	bl	_bytestream2_get_byteu
	mov	x24, x0
	ldr	w0, [x19, #64]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x25
	mov	x3, x26
	mov	x4, x22
	mov	x5, x23
	bl	_ff_dlog
	tbnz	w24, #7, LBB0_4
; %bb.2:
	ldr	x8, [x19, #96]
	cbz	x8, LBB0_9
; %bb.3:
	add	x21, x19, #112
	b	LBB0_6
LBB0_4:
	and	w8, w24, #0x7
	mov	w9, #2
	lsl	w27, w9, w8
	mov	x0, x20
	bl	_bytestream2_get_bytes_left
	add	w8, w27, w27, lsl #1
	cmp	w0, w8
	b.lt	LBB0_41
; %bb.5:
	mov	x21, x19
	ldr	x1, [x21, #120]!
	mov	x0, x19
	mov	x2, x27
	bl	_gif_read_palette
LBB0_6:
	ldr	x27, [x21]
	ldr	x8, [x19, #104]
	cbz	x8, LBB0_13
; %bb.7:
	ldr	w8, [x19]
	cmn	w8, #1
	b.eq	LBB0_10
LBB0_8:
	add	x8, x19, #92
	b	LBB0_12
LBB0_9:
	ldr	w0, [x19, #64]
Lloh2:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_av_log
	b	LBB0_41
LBB0_10:
	ldr	x8, [x19, #96]
	cbz	x8, LBB0_8
; %bb.11:
	add	x8, x19, #84
LBB0_12:
	ldr	w1, [x8]
	mov	x0, x28
	bl	_gif_fill
LBB0_13:
Lloh7:
	adrp	x21, _AV_LOG_WARNING@GOTPAGE
Lloh8:
	ldr	x21, [x21, _AV_LOG_WARNING@GOTPAGEOFF]
	cbz	w22, LBB0_15
; %bb.14:
	ldr	w8, [x19, #4]
	cmp	w22, w8
	b.le	LBB0_16
LBB0_15:
	ldr	w0, [x19, #64]
	ldr	w1, [x21]
	str	x22, [sp]
Lloh9:
	adrp	x2, l_.str.2@PAGE
Lloh10:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_av_log
	ldr	w8, [x19, #4]
	mov	x22, x8
LBB0_16:
	cmp	w25, w8
	b.ge	LBB0_27
; %bb.17:
	cbz	w23, LBB0_19
; %bb.18:
	ldr	w8, [x19, #8]
	cmp	w23, w8
	b.le	LBB0_20
LBB0_19:
	ldr	w0, [x19, #64]
	ldr	w1, [x21]
	str	x23, [sp]
Lloh11:
	adrp	x2, l_.str.4@PAGE
Lloh12:
	add	x2, x2, l_.str.4@PAGEOFF
	bl	_av_log
	ldr	w8, [x19, #8]
	mov	x23, x8
LBB0_20:
	cmp	w26, w8
	b.ge	LBB0_28
; %bb.21:
	ldr	w10, [x19, #4]
	add	w9, w22, w25
	subs	w9, w9, w10
	mov	x11, x22
	str	x11, [sp, #72]                  ; 8-byte Folded Spill
	b.le	LBB0_23
; %bb.22:
	sub	w8, w10, w25
	str	x8, [sp, #72]                   ; 8-byte Folded Spill
	ldr	w0, [x19, #64]
	ldr	w1, [x21]
	str	x9, [sp]
Lloh13:
	adrp	x2, l_.str.6@PAGE
Lloh14:
	add	x2, x2, l_.str.6@PAGEOFF
	bl	_av_log
	ldr	w8, [x19, #8]
LBB0_23:
	add	w9, w23, w26
	subs	w8, w9, w8
	b.le	LBB0_25
; %bb.24:
	ldr	w0, [x19, #64]
	ldr	w1, [x21]
	str	x8, [sp]
Lloh15:
	adrp	x2, l_.str.7@PAGE
Lloh16:
	add	x2, x2, l_.str.7@PAGEOFF
	bl	_av_log
	ldr	w8, [x19, #8]
	sub	w23, w8, w26
LBB0_25:
	ldr	x8, [x19, #16]
Lloh17:
	adrp	x21, _GCE_DISPOSAL_BACKGROUND@GOTPAGE
Lloh18:
	ldr	x21, [x21, _GCE_DISPOSAL_BACKGROUND@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_29
; %bb.26:
	ldr	w1, [x19, #88]
	ldp	w2, w3, [x19, #24]
	ldp	w4, w5, [x19, #32]
	mov	x0, x28
	bl	_gif_fill_rect
	b	LBB0_31
LBB0_27:
	ldr	w0, [x19, #64]
Lloh19:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	str	x25, [sp]
Lloh22:
	adrp	x2, l_.str.3@PAGE
Lloh23:
	add	x2, x2, l_.str.3@PAGEOFF
	bl	_av_log
	b	LBB0_41
LBB0_28:
	ldr	w0, [x19, #64]
Lloh24:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	str	x26, [sp]
Lloh27:
	adrp	x2, l_.str.5@PAGE
Lloh28:
	add	x2, x2, l_.str.5@PAGEOFF
	bl	_av_log
	b	LBB0_41
LBB0_29:
Lloh29:
	adrp	x9, _GCE_DISPOSAL_RESTORE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _GCE_DISPOSAL_RESTORE@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_31
; %bb.30:
	ldr	x0, [x19, #72]
	ldr	x8, [x28, #16]
	ldr	x1, [x8]
	ldr	x8, [x28]
	ldr	w8, [x8]
	asr	w2, w8, #2
	ldp	w3, w4, [x19, #24]
	ldp	w5, w6, [x19, #32]
	bl	_gif_copy_img_rect
LBB0_31:
	ldr	x8, [x19, #40]
	str	x8, [x19, #16]
Lloh32:
	adrp	x9, _GCE_DISPOSAL_NONE@GOTPAGE
Lloh33:
	ldr	x9, [x9, _GCE_DISPOSAL_NONE@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_40
; %bb.32:
	stp	w25, w26, [x19, #24]
	ldr	x9, [sp, #72]                   ; 8-byte Folded Reload
	stp	w9, w23, [x19, #32]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_35
; %bb.33:
	ldr	w8, [x19]
	tbnz	w8, #31, LBB0_38
; %bb.34:
	ldr	w8, [x19, #92]
	b	LBB0_39
LBB0_35:
Lloh35:
	adrp	x9, _GCE_DISPOSAL_RESTORE@GOTPAGE
Lloh36:
	ldr	x9, [x9, _GCE_DISPOSAL_RESTORE@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_40
; %bb.36:
	add	x0, x19, #72
	add	x1, x19, #80
	ldr	x8, [x28]
	ldr	w8, [x8]
	ldr	w9, [x28, #8]
	mul	w2, w9, w8
	bl	_av_fast_malloc
	ldr	x1, [x19, #72]
	cbz	x1, LBB0_63
; %bb.37:
	ldr	x8, [x28, #16]
	ldr	x0, [x8]
	ldr	x8, [x28]
	ldr	w8, [x8]
	asr	w2, w8, #2
	mov	x3, x25
	mov	x4, x26
	ldr	x5, [sp, #72]                   ; 8-byte Folded Reload
                                        ; kill: def $w5 killed $w5 killed $x5
	mov	x6, x23
	bl	_gif_copy_img_rect
	b	LBB0_40
LBB0_38:
	ldr	w8, [x19, #84]
LBB0_39:
	str	w8, [x19, #88]
LBB0_40:
	mov	x0, x20
	bl	_bytestream2_get_bytes_left
	cmp	w0, #1
	b.gt	LBB0_43
LBB0_41:
Lloh38:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh40:
	ldr	w28, [x8]
LBB0_42:
	mov	x0, x28
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_43:
	str	x28, [sp, #56]                  ; 8-byte Folded Spill
	mov	x0, x20
	bl	_bytestream2_get_byteu
	mov	x21, x0
	ldp	w8, w28, [x19, #56]
	str	w8, [sp, #68]                   ; 4-byte Folded Spill
	mov	x0, x20
	bl	_bytestream2_get_bytes_left
	mov	x3, x0
Lloh41:
	adrp	x8, _FF_LZW_GIF@GOTPAGE
Lloh42:
	ldr	x8, [x8, _FF_LZW_GIF@GOTPAGEOFF]
Lloh43:
	ldr	w4, [x8]
	mov	x0, x28
	mov	x1, x21
	ldr	w2, [sp, #68]                   ; 4-byte Folded Reload
	bl	_ff_lzw_decode_init
	tbnz	w0, #31, LBB0_59
; %bb.44:
	str	w24, [sp, #68]                  ; 4-byte Folded Spill
	cmp	w23, #1
	b.lt	LBB0_62
; %bb.45:
	mov	w28, #0
	mov	w21, #0
	mov	w24, #0
	ldr	x9, [sp, #56]                   ; 8-byte Folded Reload
	ldr	x8, [x9]
	ldr	w8, [x8]
	asr	w11, w8, #2
	ldr	x9, [x9, #16]
	ldr	x9, [x9]
	mul	w10, w11, w26
	add	x9, x9, w10, sxtw #2
	add	x26, x9, w25, sxtw #2
	ldr	x9, [sp, #72]                   ; 8-byte Folded Reload
	sxtw	x9, w9
	str	x9, [sp, #56]                   ; 8-byte Folded Spill
	and	w9, w8, #0xfffffffc
	lsl	w8, w11, #1
	stp	w8, w9, [sp, #48]               ; 8-byte Folded Spill
	lsl	w8, w11, #3
	str	w8, [sp, #44]                   ; 4-byte Folded Spill
	sxtw	x8, w11
	stp	x11, x8, [sp, #24]              ; 16-byte Folded Spill
	ldr	x1, [x19, #48]
	mov	w25, #4
	str	x26, [sp, #16]                  ; 8-byte Folded Spill
	b	LBB0_48
LBB0_46:                                ;   in Loop: Header=BB0_48 Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	add	x26, x26, x8, lsl #2
LBB0_47:                                ;   in Loop: Header=BB0_48 Depth=1
	add	w28, w28, #1
	cmp	w28, w23
	b.eq	LBB0_62
LBB0_48:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_52 Depth 2
                                        ;     Child Loop BB0_57 Depth 2
	ldr	w0, [x19, #60]
	mov	x2, x22
	bl	_ff_lzw_decode
	cmp	w0, w22
	b.ne	LBB0_60
; %bb.49:                               ;   in Loop: Header=BB0_48 Depth=1
	ldr	x1, [x19, #48]
	ldr	x8, [sp, #72]                   ; 8-byte Folded Reload
	cmp	w8, #1
	b.lt	LBB0_54
; %bb.50:                               ;   in Loop: Header=BB0_48 Depth=1
	ldr	x8, [sp, #56]                   ; 8-byte Folded Reload
	add	x8, x26, x8, lsl #2
	mov	x9, x1
	mov	x10, x26
	b	LBB0_52
LBB0_51:                                ;   in Loop: Header=BB0_52 Depth=2
	add	x10, x10, #4
	add	x9, x9, #8
	cmp	x10, x8
	b.hs	LBB0_54
LBB0_52:                                ;   Parent Loop BB0_48 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x11, [x9]
	ldrsw	x12, [x19]
	cmp	x11, x12
	b.eq	LBB0_51
; %bb.53:                               ;   in Loop: Header=BB0_52 Depth=2
	ldr	w11, [x27, x11, lsl #2]
	str	w11, [x10]
	b	LBB0_51
LBB0_54:                                ;   in Loop: Header=BB0_48 Depth=1
	ldr	w8, [sp, #68]                   ; 4-byte Folded Reload
	tbz	w8, #6, LBB0_46
; %bb.55:                               ;   in Loop: Header=BB0_48 Depth=1
	cmp	w21, #2
	mov	w8, #8
	csel	w8, w8, w25, ne
	ldr	w9, [sp, #52]                   ; 4-byte Folded Reload
	ldr	w10, [sp, #44]                  ; 4-byte Folded Reload
	csel	w9, w10, w9, ne
	cmp	w21, #3
	mov	w10, #2
	csel	w10, w10, w8, eq
	ldr	w8, [sp, #48]                   ; 4-byte Folded Reload
	csel	w8, w8, w9, eq
	add	w24, w24, w10
	cmp	w24, w23
	b.ge	LBB0_57
; %bb.56:                               ;   in Loop: Header=BB0_48 Depth=1
	add	x26, x26, w8, sxtw #2
	b	LBB0_47
LBB0_57:                                ;   Parent Loop BB0_48 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsr	w24, w25, w21
	add	w21, w21, #1
	cmp	w24, w23
	b.ge	LBB0_57
; %bb.58:                               ;   in Loop: Header=BB0_48 Depth=1
	ldp	x9, x8, [sp, #16]               ; 16-byte Folded Reload
	mul	w8, w24, w8
	add	x26, x9, w8, sxtw #2
	b	LBB0_47
LBB0_59:
	mov	x28, x0
	ldr	w0, [x19, #64]
Lloh44:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh45:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
Lloh47:
	adrp	x2, l_.str.8@PAGE
Lloh48:
	add	x2, x2, l_.str.8@PAGEOFF
	bl	_av_log
	b	LBB0_42
LBB0_60:
	cbz	w0, LBB0_62
; %bb.61:
	ldr	w0, [x19, #64]
Lloh49:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh50:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
Lloh52:
	adrp	x2, l_.str.9@PAGE
Lloh53:
	add	x2, x2, l_.str.9@PAGEOFF
	bl	_av_log
LBB0_62:
	ldr	w0, [x19, #60]
	bl	_ff_lzw_decode_tail
	mov	x1, x0
	mov	x0, x20
	bl	_bytestream2_skipu
	mov	w28, #0
	mov	w8, #-1
	str	w8, [x19]
Lloh54:
	adrp	x8, _GCE_DISPOSAL_NONE@GOTPAGE
Lloh55:
	ldr	x8, [x8, _GCE_DISPOSAL_NONE@GOTPAGEOFF]
Lloh56:
	ldr	x8, [x8]
	str	x8, [x19, #40]
	b	LBB0_42
LBB0_63:
Lloh57:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh58:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh59:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	b	_AVERROR
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"image x=%d y=%d w=%d h=%d\n"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"picture doesn't have either global or local palette.\n"

	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.2:                               ; @.str.2
	.asciz	"Invalid image width: %d, truncating.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Invalid left position: %d.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Invalid image height: %d, truncating.\n"

l_.str.5:                               ; @.str.5
	.asciz	"Invalid top position: %d.\n"

l_.str.6:                               ; @.str.6
	.asciz	"Image too wide by %d, truncating.\n"

l_.str.7:                               ; @.str.7
	.asciz	"Image too high by %d, truncating.\n"

	.comm	_GCE_DISPOSAL_BACKGROUND,8,3    ; @GCE_DISPOSAL_BACKGROUND
	.comm	_GCE_DISPOSAL_RESTORE,8,3       ; @GCE_DISPOSAL_RESTORE
	.comm	_GCE_DISPOSAL_NONE,8,3          ; @GCE_DISPOSAL_NONE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_FF_LZW_GIF,4,2                 ; @FF_LZW_GIF
l_.str.8:                               ; @.str.8
	.asciz	"LZW init failed\n"

l_.str.9:                               ; @.str.9
	.asciz	"LZW decode failed\n"

	.no_dead_strip	_gif_read_image
.subsections_via_symbols
