	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gif_read_ext
_gif_read_ext:                          ## @gif_read_ext
	.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	%r12
	pushq	%rbx
	subq	$1040, %rsp                     ## imm = 0x410
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	(%rdi), %r15
	movq	8(%rdi), %r12
	movq	%r15, %rdi
	callq	_avio_r8
	movq	_GIF_GCE_EXT_LABEL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
## %bb.1:
	movq	%r15, %rdi
	callq	_avio_r8
	cmpl	$3, %eax
	jg	LBB0_3
## %bb.2:
	movq	_AV_LOG_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_17
LBB0_7:
	movq	_GIF_APP_EXT_LABEL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_16
## %bb.8:
	movq	%r15, %rdi
	callq	_avio_r8
	movl	%eax, %ebx
	leaq	-1072(%rbp), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_avio_read
	testl	%ebx, %ebx
	je	LBB0_17
## %bb.9:
	testl	%eax, %eax
	js	LBB0_17
## %bb.10:
	movq	_NETSCAPE_EXT_STR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strlen
	cmpl	%eax, %ebx
	jne	LBB0_16
## %bb.11:
	movq	%r15, %rdi
	callq	_avio_r8
	movl	%eax, %ebx
	leaq	-1072(%rbp), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_avio_read
	testl	%ebx, %ebx
	je	LBB0_17
## %bb.12:
	testl	%eax, %eax
	js	LBB0_17
## %bb.13:
	cmpl	$3, %ebx
	jne	LBB0_16
## %bb.14:
	cmpl	$1, -1072(%rbp)
	jne	LBB0_16
## %bb.15:
	leaq	-1068(%rbp), %rdi
	callq	_AV_RL16
	xorl	%ecx, %ecx
	cmpl	$1, %eax
	sbbl	%ecx, %ecx
	orl	%eax, %ecx
	movl	%ecx, 24(%r12)
	jmp	LBB0_16
LBB0_3:
	movl	%eax, %r14d
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_avio_skip
	testl	%eax, %eax
	js	LBB0_17
## %bb.4:
	movq	%r15, %rdi
	callq	_avio_rl16
	movq	%rax, (%r12)
	cmpq	8(%r12), %rax
	jge	LBB0_6
## %bb.5:
	movq	16(%r12), %rax
	movq	%rax, (%r12)
LBB0_6:
	movl	28(%r12), %esi
	movq	%rax, %rdi
	callq	_FFMIN
	movq	%rax, (%r12)
	addl	$-3, %r14d
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_avio_skip
	testl	%eax, %eax
	js	LBB0_17
LBB0_16:
	movq	%r15, %rdi
	callq	_gif_skip_subblocks
	movl	%eax, %ecx
	sarl	$31, %eax
	andl	%ecx, %eax
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_19
## %bb.18:
	addq	$1040, %rsp                     ## imm = 0x410
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GIF_GCE_EXT_LABEL,4,2          ## @GIF_GCE_EXT_LABEL
	.comm	_AV_LOG_FATAL,4,2               ## @AV_LOG_FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Graphic Control Extension block's size less than 4.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_GIF_APP_EXT_LABEL,4,2          ## @GIF_APP_EXT_LABEL
	.comm	_NETSCAPE_EXT_STR,4,2           ## @NETSCAPE_EXT_STR
	.no_dead_strip	_gif_read_ext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gif_read_ext
_gif_read_ext:                          ; @gif_read_ext
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #1040
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldp	x19, x22, [x0]
	mov	x0, x19
	bl	_avio_r8
Lloh3:
	adrp	x8, _GIF_GCE_EXT_LABEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GIF_GCE_EXT_LABEL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_avio_r8
	subs	w20, w0, #3
	b.gt	LBB0_12
; %bb.2:
Lloh6:
	adrp	x8, _AV_LOG_FATAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_LOG_FATAL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
Lloh11:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	b	LBB0_17
LBB0_3:
Lloh14:
	adrp	x8, _GIF_APP_EXT_LABEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GIF_APP_EXT_LABEL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_16
; %bb.4:
	mov	x0, x19
	bl	_avio_r8
	mov	x20, x0
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x20
	bl	_avio_read
	cbz	w20, LBB0_17
; %bb.5:
	tbnz	w0, #31, LBB0_17
; %bb.6:
Lloh17:
	adrp	x8, _NETSCAPE_EXT_STR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NETSCAPE_EXT_STR@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_strlen
	cmp	w20, w0
	b.ne	LBB0_16
; %bb.7:
	mov	x0, x19
	bl	_avio_r8
	mov	x20, x0
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x20
	bl	_avio_read
	cbz	w20, LBB0_17
; %bb.8:
	tbnz	w0, #31, LBB0_17
; %bb.9:
	cmp	w20, #3
	b.ne	LBB0_16
; %bb.10:
	ldr	w8, [sp, #8]
	cmp	w8, #1
	b.ne	LBB0_16
; %bb.11:
	add	x8, sp, #8
	add	x0, x8, #4
	bl	_AV_RL16
	cmp	w0, #0
	csinv	w8, w0, wzr, ne
	str	w8, [x22, #24]
	b	LBB0_16
LBB0_12:
	mov	x0, x19
	mov	w1, #1
	bl	_avio_skip
	tbnz	w0, #31, LBB0_17
; %bb.13:
	mov	x0, x19
	bl	_avio_rl16
	str	x0, [x22]
	ldr	x8, [x22, #8]
	cmp	x0, x8
	b.ge	LBB0_15
; %bb.14:
	ldr	x0, [x22, #16]
	str	x0, [x22]
LBB0_15:
	ldr	w1, [x22, #28]
	bl	_FFMIN
	str	x0, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_avio_skip
	tbnz	w0, #31, LBB0_17
LBB0_16:
	mov	x0, x19
	bl	_gif_skip_subblocks
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_17:
	ldur	x8, [x29, #-56]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	add	sp, sp, #1040
	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
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_GIF_GCE_EXT_LABEL,4,2          ; @GIF_GCE_EXT_LABEL
	.comm	_AV_LOG_FATAL,4,2               ; @AV_LOG_FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Graphic Control Extension block's size less than 4.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_GIF_APP_EXT_LABEL,4,2          ; @GIF_APP_EXT_LABEL
	.comm	_NETSCAPE_EXT_STR,4,2           ; @NETSCAPE_EXT_STR
	.no_dead_strip	_gif_read_ext
.subsections_via_symbols
