	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gif_read_extension
_gif_read_extension:                    ## @gif_read_extension
	.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	%rdi, %r14
	leaq	12(%rdi), %r15
	movq	%r15, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$1, %eax
	jle	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	callq	_bytestream2_get_byteu
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_bytestream2_get_byteu
	movl	%eax, %ebx
	movl	8(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movl	%r13d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_ff_dlog
	cmpl	$128, %r13d
	jne	LBB0_8
## %bb.3:
	cmpl	$4, %ebx
	jne	LBB0_8
## %bb.4:
	movq	%r15, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$4, %eax
	jg	LBB0_5
LBB0_1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_12:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	callq	_bytestream2_get_byteu
	movl	%eax, %ebx
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_bytestream2_skipu
	movq	%r15, %rdi
	callq	_bytestream2_get_byteu
	movl	%ebx, %ecx
	andl	$1, %ecx
	cmpl	$1, %ecx
	movl	$0, %ecx
	sbbl	%ecx, %ecx
	orl	%eax, %ecx
	movl	%ecx, (%r14)
	movl	%ebx, %r8d
	shrl	$2, %r8d
	andl	$7, %r8d
	movl	%r8d, 4(%r14)
	movl	8(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_ff_dlog
	cmpl	$4, 4(%r14)
	jl	LBB0_7
## %bb.6:
	movq	_GCE_DISPOSAL_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movl	8(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	$4, %edx
	xorl	%eax, %eax
	callq	_ff_dlog
LBB0_7:
	movq	%r15, %rdi
	callq	_bytestream2_get_byteu
	movl	%eax, %ebx
LBB0_8:
	testl	%ebx, %ebx
	je	LBB0_12
## %bb.9:
	leaq	L_.str.3(%rip), %r13
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	%ebx, %eax
	jle	LBB0_1
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_bytestream2_skipu
	movq	%r15, %rdi
	callq	_bytestream2_get_byteu
	movl	%eax, %ebx
	movl	8(%r14), %edi
	movq	%r13, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_ff_dlog
	testl	%ebx, %ebx
	jne	LBB0_10
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ext_code=0x%x len=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"gce_flags=%x tcolor=%d disposal=%d\n"

	.comm	_GCE_DISPOSAL_NONE,4,2          ## @GCE_DISPOSAL_NONE
L_.str.2:                               ## @.str.2
	.asciz	"invalid value in gce_disposal (%d). Using default value of 0.\n"

L_.str.3:                               ## @.str.3
	.asciz	"ext_len1=%d\n"

	.no_dead_strip	_gif_read_extension
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gif_read_extension
_gif_read_extension:                    ; @gif_read_extension
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	add	x20, x0, #12
	mov	x0, x20
	bl	_bytestream2_get_bytes_left
	cmp	w0, #1
	b.le	LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_bytestream2_get_byteu
	mov	x22, x0
	mov	x0, x20
	bl	_bytestream2_get_byteu
	mov	x21, x0
	ldr	w0, [x19, #8]
	str	x21, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_ff_dlog
	cmp	w22, #128
	b.ne	LBB0_8
; %bb.2:
	cmp	w21, #4
	b.ne	LBB0_8
; %bb.3:
	mov	x0, x20
	bl	_bytestream2_get_bytes_left
	cmp	w0, #4
	b.gt	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	b	LBB0_13
LBB0_5:
	mov	x0, x20
	bl	_bytestream2_get_byteu
	mov	x21, x0
	mov	x0, x20
	mov	w1, #2
	bl	_bytestream2_skipu
	mov	x0, x20
	bl	_bytestream2_get_byteu
	tst	w21, #0x1
	csinv	w8, w0, wzr, ne
	ubfx	w9, w21, #2, #3
	stp	w8, w9, [x19]
	ldr	w0, [x19, #8]
	stp	x8, x9, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_ff_dlog
	ldr	w8, [x19, #4]
	cmp	w8, #4
	b.lt	LBB0_7
; %bb.6:
Lloh7:
	adrp	x8, _GCE_DISPOSAL_NONE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GCE_DISPOSAL_NONE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	ldr	w0, [x19, #8]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #4
	bl	_ff_dlog
LBB0_7:
	mov	x0, x20
	bl	_bytestream2_get_byteu
	mov	x21, x0
LBB0_8:
	cbz	w21, LBB0_12
; %bb.9:
Lloh12:
	adrp	x22, l_.str.3@PAGE
Lloh13:
	add	x22, x22, l_.str.3@PAGEOFF
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_bytestream2_get_bytes_left
	cmp	w0, w21
	b.le	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_bytestream2_skipu
	mov	x0, x20
	bl	_bytestream2_get_byteu
	mov	x21, x0
	ldr	w0, [x19, #8]
	mov	x1, x22
	mov	x2, x21
	bl	_ff_dlog
	cbnz	w21, LBB0_10
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ext_code=0x%x len=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"gce_flags=%x tcolor=%d disposal=%d\n"

	.comm	_GCE_DISPOSAL_NONE,4,2          ; @GCE_DISPOSAL_NONE
l_.str.2:                               ; @.str.2
	.asciz	"invalid value in gce_disposal (%d). Using default value of 0.\n"

l_.str.3:                               ; @.str.3
	.asciz	"ext_len1=%d\n"

	.no_dead_strip	_gif_read_extension
.subsections_via_symbols
