	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_interleaved_write_frame     ## -- Begin function av_interleaved_write_frame
	.p2align	4, 0x90
_av_interleaved_write_frame:            ## @av_interleaved_write_frame
	.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
	movq	%rsi, %r12
	movq	%rdi, %r14
	callq	_prepare_input_packet
	testl	%eax, %eax
	js	LBB0_10
## %bb.1:
	testq	%r12, %r12
	je	LBB0_13
## %bb.2:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_do_packet_auto_bsf
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	js	LBB0_10
## %bb.5:
	movq	_FF_FDEBUG_TS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_7
## %bb.6:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	24(%r12), %r15d
	movq	8(%r12), %rdi
	callq	_av_ts2str
	movl	%eax, %ebx
	movq	16(%r12), %rdi
	callq	_av_ts2str
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_av_log
LBB0_7:
	movq	8(%r12), %rax
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.8:
	movq	24(%r14), %rax
	movq	_AVFMT_NOTIMESTAMPS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_14
## %bb.9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_10:
	movl	%eax, %ebx
	movq	%r12, %rdi
	jmp	LBB0_11
LBB0_13:
	movq	_AV_LOG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	$1, %r15d
LBB0_14:
	leaq	-72(%rbp), %r13
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_15 Depth=1
	xorl	%r12d, %r12d
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movl	%r15d, %ecx
	callq	_interleave_packet
	movl	%eax, %ebx
	testq	%r12, %r12
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	%r12, %rdi
	callq	_av_init_packet
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	testl	%ebx, %ebx
	jle	LBB0_12
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_write_packet
	testl	%eax, %eax
	js	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	16(%r14), %rax
	movq	-72(%rbp), %rcx
	movq	(%rax,%rcx,8), %rax
	incl	(%rax)
	movq	%r13, %rdi
	callq	_av_packet_unref
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_22
	jmp	LBB0_12
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_19:
	movl	%eax, %ebx
	leaq	-72(%rbp), %rdi
LBB0_11:
	callq	_av_packet_unref
LBB0_12:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FF_FDEBUG_TS,4,2               ## @FF_FDEBUG_TS
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"av_interleaved_write_frame size:%d dts:%s pts:%s\n"

	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_AVFMT_NOTIMESTAMPS,4,2         ## @AVFMT_NOTIMESTAMPS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AV_LOG_TRACE,4,2               ## @AV_LOG_TRACE
L_.str.1:                               ## @.str.1
	.asciz	"av_interleaved_write_frame FLUSH\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_interleaved_write_frame     ; -- Begin function av_interleaved_write_frame
	.p2align	2
_av_interleaved_write_frame:            ; @av_interleaved_write_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x20, x1
	mov	x19, x0
	bl	_prepare_input_packet
	tbnz	w0, #31, LBB0_20
; %bb.1:
	cbz	x20, LBB0_9
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	_do_packet_auto_bsf
	mov	x22, x0
	cbz	w0, LBB0_23
; %bb.3:
	tbnz	w22, #31, LBB0_21
; %bb.4:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _FF_FDEBUG_TS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FF_FDEBUG_TS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	ldr	x0, [x20, #8]
	ldr	w23, [x20, #24]
	bl	_av_ts2str
	mov	x22, x0
	ldr	x0, [x20, #16]
	bl	_av_ts2str
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp, #8]
	str	x23, [sp]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_av_log
LBB0_6:
	ldr	x8, [x20, #8]
Lloh8:
	adrp	x9, _AV_NOPTS_VALUE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.7:
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _AVFMT_NOTIMESTAMPS@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AVFMT_NOTIMESTAMPS@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.8:
	mov	w21, #0
	b	LBB0_12
LBB0_9:
Lloh14:
	adrp	x8, _AV_LOG_TRACE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_TRACE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w21, #1
	b	LBB0_12
LBB0_10:
	mov	w21, #0
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x20, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #32
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	bl	_interleave_packet
	mov	x22, x0
	cbz	x20, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x20
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	mov	x0, x20
	bl	_av_init_packet
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	cmp	w22, #1
	b.lt	LBB0_23
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x1, sp, #32
	mov	x0, x19
	bl	_write_packet
	tbnz	w0, #31, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x19, #16]
	ldr	x9, [sp, #32]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	add	x0, sp, #32
	bl	_av_packet_unref
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_11
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w22, [x8]
	cbz	w22, LBB0_11
	b	LBB0_23
LBB0_18:
	mov	x22, x0
	add	x0, sp, #32
	b	LBB0_22
LBB0_19:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_20:
	mov	x22, x0
LBB0_21:
	mov	x0, x20
LBB0_22:
	bl	_av_packet_unref
LBB0_23:
	mov	x0, x22
	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
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_FF_FDEBUG_TS,4,2               ; @FF_FDEBUG_TS
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"av_interleaved_write_frame size:%d dts:%s pts:%s\n"

	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_AVFMT_NOTIMESTAMPS,4,2         ; @AVFMT_NOTIMESTAMPS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AV_LOG_TRACE,4,2               ; @AV_LOG_TRACE
l_.str.1:                               ; @.str.1
	.asciz	"av_interleaved_write_frame FLUSH\n"

.subsections_via_symbols
