	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avi_write_counters
_avi_write_counters:                    ## @avi_write_counters
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	24(%rdi), %r13
	movq	%r13, %rdi
	callq	_avio_tell
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	cmpl	$0, (%rbx)
	jle	LBB0_1
## %bb.2:
	xorl	%r15d, %r15d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movslq	(%rbx), %rax
	cmpq	%rax, %r15
	jge	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movq	(%rax,%r15,8), %rax
	movq	8(%rax), %r14
	movl	8(%r14), %edi
	callq	_av_assert0
	movq	8(%rbx), %rax
	movq	(%rax,%r15,8), %rax
	movq	(%rax), %r12
	movl	8(%r14), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_avio_seek
	movq	8(%rbx), %rax
	movq	(%rax,%r15,8), %rdi
	leaq	-72(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	leaq	-68(%rbp), %rcx
	callq	_ff_parse_specific_params
	movl	-56(%rbp), %ecx
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	4(%r14), %eax
	cltd
	idivl	%ecx
	movl	%eax, %esi
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %esi
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	callq	_avio_wl32
	movq	(%r12), %rax
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_FFMAX
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_8
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_9:
	cmpl	$1, -48(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_11
## %bb.10:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	callq	_av_assert0
	movl	(%rbx), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_avio_seek
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_avio_wl32
LBB0_11:
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_avio_seek
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
	.no_dead_strip	_avi_write_counters
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avi_write_counters
_avi_write_counters:                    ; @avi_write_counters
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x1
	mov	x23, x0
	ldp	x8, x19, [x0, #16]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	mov	x0, x19
	bl	_avio_tell
	str	w0, [sp, #16]                   ; 4-byte Folded Spill
	ldr	w8, [x23]
Lloh0:
	adrp	x24, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SEEK_SET@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x26, #0
	mov	w22, #0
Lloh2:
	adrp	x27, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh3:
	ldr	x27, [x27, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x26, x26, #1
	ldrsw	x8, [x23]
	cmp	x26, x8
	b.ge	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #8]
	lsl	x25, x26, #3
	ldr	x8, [x8, x25]
	ldr	x28, [x8, #8]
	ldr	w0, [x28, #8]
	bl	_av_assert0
	ldr	x8, [x23, #8]
	ldr	x8, [x8, x25]
	ldr	x20, [x8]
	ldr	w1, [x28, #8]
	ldr	w2, [x24]
	mov	x0, x19
	bl	_avio_seek
	ldr	x8, [x23, #8]
	ldr	x0, [x8, x25]
	add	x1, sp, #28
	add	x2, sp, #24
	add	x3, sp, #20
	bl	_ff_parse_specific_params
	ldr	w8, [sp, #24]
	cbz	w8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x28, #4]
	sdiv	w1, w9, w8
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x28]
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_avio_wl32
	ldr	x8, [x20]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x28]
	mov	x0, x22
	bl	_FFMAX
	mov	x22, x0
	b	LBB0_2
LBB0_8:
	mov	w22, #0
LBB0_9:
	cmp	w21, #1
	b.ne	LBB0_11
; %bb.10:
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
	ldr	w0, [x20]
	bl	_av_assert0
	ldr	w1, [x20]
	ldr	w2, [x24]
	mov	x0, x19
	bl	_avio_seek
	mov	x0, x19
	mov	x1, x22
	bl	_avio_wl32
LBB0_11:
	ldr	w2, [x24]
	mov	x0, x19
	ldr	w1, [sp, #16]                   ; 4-byte Folded Reload
	bl	_avio_seek
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
	.no_dead_strip	_avi_write_counters
.subsections_via_symbols
