	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avi_read_tag
_avi_read_tag:                          ## @avi_read_tag
	.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
	movq	8(%rdi), %r13
	movb	$0, -44(%rbp)
	movl	$0, -48(%rbp)
	movl	%ecx, %ebx
	andl	$1, %ebx
	addl	%ecx, %ebx
	movq	_UINT_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	leal	1(%rbx), %edi
	callq	_av_malloc
	movq	%rax, -64(%rbp)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	%r13, %rdi
	movq	%rax, %rsi
	movl	%ebx, %edx
	callq	_avio_read
	cmpl	%ebx, %eax
	jne	LBB0_6
## %bb.7:
	movslq	%ebx, %rax
	movb	$0, (%r15,%rax)
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_AV_WL32
	testq	%r14, %r14
	cmovneq	%r14, %r12
	movq	-64(%rbp), %rdx
	movq	_AV_DICT_DONT_STRDUP_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_av_dict_set
	jmp	LBB0_8
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_6:
	leaq	-64(%rbp), %rdi
	callq	_av_freep
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UINT_MAX,4,2                   ## @UINT_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_DICT_DONT_STRDUP_VAL,4,2    ## @AV_DICT_DONT_STRDUP_VAL
	.no_dead_strip	_avi_read_tag
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avi_read_tag
_avi_read_tag:                          ; @avi_read_tag
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x23, [x0, #8]
	strb	wzr, [sp, #12]
	str	wzr, [sp, #8]
	and	w8, w3, #0x1
Lloh0:
	adrp	x9, _UINT_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _UINT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	w22, w8, w3
	cmp	w22, w9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	add	w0, w22, #1
	bl	_av_malloc
	str	x0, [sp]
	cbz	x0, LBB0_5
; %bb.3:
	mov	x24, x0
	mov	x0, x23
	mov	x1, x24
	mov	x2, x22
	bl	_avio_read
	cmp	w0, w22
	b.ne	LBB0_7
; %bb.4:
	strb	wzr, [x24, w22, sxtw]
	add	x0, sp, #8
	mov	x1, x21
	bl	_AV_WL32
	cmp	x19, #0
	csel	x0, x20, x19, eq
	ldr	x2, [sp]
Lloh5:
	adrp	x8, _AV_DICT_DONT_STRDUP_VAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_DICT_DONT_STRDUP_VAL@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	add	x1, sp, #8
	bl	_av_dict_set
	b	LBB0_8
LBB0_5:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_AVERROR
LBB0_7:
	mov	x0, sp
	bl	_av_freep
Lloh10:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_UINT_MAX,4,2                   ; @UINT_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_DICT_DONT_STRDUP_VAL,4,2    ; @AV_DICT_DONT_STRDUP_VAL
	.no_dead_strip	_avi_read_tag
.subsections_via_symbols
