	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gxf_packet
_gxf_packet:                            ## @gxf_packet
	.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, -64(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %rbx
	cmpl	$0, (%rbx)
	je	LBB0_1
LBB0_10:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_25:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	-56(%rbp), %r12
	leaq	-44(%rbp), %r13
	movq	_PKT_FLT@GOTPCREL(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %esi
	movq	%r15, %rdi
	callq	_gxf_read_index
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, (%rbx)
	jne	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_parse_packet_header
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-56(%rbp), %eax
	cmpl	(%r14), %eax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %esi
	movq	_PKT_MEDIA@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$15, %esi
	jg	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	leaq	L_.str.1(%rip), %rdx
	callq	_av_log
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_avio_skip
	jmp	LBB0_9
LBB0_3:
	movq	%rbx, %rdi
	callq	_avio_feof
	movl	$-1, %r12d
	testl	%eax, %eax
	jne	LBB0_25
## %bb.4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_av_log
	jmp	LBB0_25
LBB0_13:
	addl	$-16, %esi
	movl	%esi, -44(%rbp)
	movq	%rbx, %rdi
	callq	_avio_r8
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_avio_r8
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	_get_sindex
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_14
## %bb.15:
	movq	(%r15), %rax
	movl	%r13d, %ecx
	movq	(%rax,%rcx,8), %r12
	movq	%rbx, %rdi
	callq	_avio_rb32
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_avio_rb32
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_avio_rb32
	movq	%rbx, %rdi
	callq	_avio_r8
	movq	%rbx, %rdi
	callq	_avio_r8
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rax
	movq	(%rax), %rdi
	movq	_AV_CODEC_ID_PCM_S24LE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_17
## %bb.16:
	movq	_AV_CODEC_ID_PCM_S16LE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_20
LBB0_17:
	movl	%r14d, %eax
	sarl	$16, %r14d
	movzwl	%ax, %r12d
	callq	_av_get_bits_per_sample
	movl	%r12d, %ecx
	subl	%r14d, %r12d
	jl	LBB0_19
## %bb.18:
	sarl	$3, %eax
	imull	%eax, %ecx
	cmpl	-44(%rbp), %ecx
	jle	LBB0_21
LBB0_19:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	callq	_av_log
LBB0_20:
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_av_get_packet
	movl	%eax, %r12d
LBB0_23:
	movl	%r13d, (%r15)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r15)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_AV_CODEC_ID_DVVIDEO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_25
## %bb.24:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	jmp	LBB0_25
LBB0_14:
	movl	%r13d, %r12d
	jmp	LBB0_25
LBB0_21:
	imull	%eax, %r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %r15d
	callq	_avio_skip
	movl	-44(%rbp), %r14d
	imull	%r15d, %r12d
	movl	%r12d, -44(%rbp)
	movq	%rbx, %rdi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_av_get_packet
	movl	%eax, %r12d
	subl	-48(%rbp), %r14d                ## 4-byte Folded Reload
	je	LBB0_23
## %bb.22:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_avio_skip
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sync lost\n"

	.comm	_PKT_FLT,4,2                    ## @PKT_FLT
	.comm	_PKT_MEDIA,4,2                  ## @PKT_MEDIA
L_.str.1:                               ## @.str.1
	.asciz	"invalid media packet length\n"

	.comm	_AV_CODEC_ID_PCM_S24LE,8,3      ## @AV_CODEC_ID_PCM_S24LE
	.comm	_AV_CODEC_ID_PCM_S16LE,8,3      ## @AV_CODEC_ID_PCM_S16LE
L_.str.2:                               ## @.str.2
	.asciz	"invalid first and last sample values\n"

	.comm	_AV_CODEC_ID_DVVIDEO,8,3        ## @AV_CODEC_ID_DVVIDEO
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.no_dead_strip	_gxf_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gxf_packet
_gxf_packet:                            ; @gxf_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	x20, [x0, #16]
	ldr	w8, [x20]
	cbz	w8, LBB0_3
LBB0_1:
Lloh0:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
LBB0_2:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_3:
	mov	x19, x1
	mov	x21, x0
	ldr	x25, [x0, #8]
Lloh3:
	adrp	x23, _PKT_FLT@GOTPAGE
Lloh4:
	ldr	x23, [x23, _PKT_FLT@GOTPAGEOFF]
Lloh5:
	adrp	x24, _PKT_MEDIA@GOTPAGE
Lloh6:
	ldr	x24, [x24, _PKT_MEDIA@GOTPAGEOFF]
Lloh7:
	adrp	x22, l_.str.1@PAGE
Lloh8:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh9:
	adrp	x26, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x26, [x26, _AV_LOG_ERROR@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [sp, #8]
	mov	x0, x21
	bl	_gxf_read_index
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x20]
	cbnz	w8, LBB0_1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x20
	bl	_parse_packet_header
	cbz	w0, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [sp, #12]
	ldr	w9, [x23]
	cmp	w8, w9
	b.eq	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x24]
	ldr	w1, [sp, #8]
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w1, #15
	b.gt	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x26]
	mov	x0, x21
	mov	x2, x22
	bl	_av_log
	b	LBB0_5
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	bl	_avio_skip
	b	LBB0_5
LBB0_12:
	mov	x0, x20
	bl	_avio_feof
	cbz	w0, LBB0_14
; %bb.13:
	mov	w21, #-1
	b	LBB0_2
LBB0_14:
	ldr	w1, [x26]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
	mov	w21, #-1
	b	LBB0_2
LBB0_15:
	sub	w8, w1, #16
	str	w8, [sp, #8]
	mov	x0, x20
	bl	_avio_r8
	mov	x22, x0
	mov	x0, x20
	bl	_avio_r8
	mov	x1, x0
	mov	x0, x21
	mov	x2, x22
	bl	_get_sindex
	mov	x22, x0
	tbnz	w0, #31, LBB0_23
; %bb.16:
	ldr	x8, [x21]
	ldr	x27, [x8, w22, uxtw #3]
	mov	x0, x20
	bl	_avio_rb32
	mov	x23, x0
	mov	x0, x20
	bl	_avio_rb32
	mov	x24, x0
	mov	x0, x20
	bl	_avio_rb32
	mov	x0, x20
	bl	_avio_r8
	mov	x0, x20
	bl	_avio_r8
	ldr	x8, [x27]
	ldr	x0, [x8]
Lloh13:
	adrp	x8, _AV_CODEC_ID_PCM_S24LE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_CODEC_ID_PCM_S24LE@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
Lloh16:
	adrp	x9, _AV_CODEC_ID_PCM_S16LE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AV_CODEC_ID_PCM_S16LE@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x0, x9, #4, ne
	b.ne	LBB0_20
; %bb.17:
	str	w23, [sp, #4]                   ; 4-byte Folded Spill
	asr	w28, w24, #16
	and	w23, w24, #0xffff
	bl	_av_get_bits_per_sample
	subs	w10, w23, w28
	b.lt	LBB0_19
; %bb.18:
	asr	w24, w0, #3
	mul	w9, w24, w23
	ldr	w8, [sp, #8]
	cmp	w9, w8
	b.le	LBB0_24
LBB0_19:
	ldr	w1, [x26]
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_av_log
	ldr	w23, [sp, #4]                   ; 4-byte Folded Reload
LBB0_20:
	ldr	w2, [sp, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_av_get_packet
	mov	x21, x0
LBB0_21:
	stp	w22, w23, [x19]
	ldr	x8, [x27]
	ldr	x8, [x8]
Lloh21:
	adrp	x9, _AV_CODEC_ID_DVVIDEO@GOTPAGE
Lloh22:
	ldr	x9, [x9, _AV_CODEC_ID_DVVIDEO@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.22:
	ldr	w8, [x25]
	str	w8, [x19, #8]
	b	LBB0_2
LBB0_23:
	mov	x21, x22
	b	LBB0_2
LBB0_24:
	mul	w1, w24, w28
	mov	x0, x20
	mov	x26, x9
	mov	x21, x10
	bl	_avio_skip
	ldr	w23, [sp, #8]
	mul	w2, w24, w21
	str	w2, [sp, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_av_get_packet
	mov	x21, x0
	subs	w1, w23, w26
	b.eq	LBB0_26
; %bb.25:
	mov	x0, x20
	bl	_avio_skip
LBB0_26:
	ldr	w23, [sp, #4]                   ; 4-byte Folded Reload
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sync lost\n"

	.comm	_PKT_FLT,4,2                    ; @PKT_FLT
	.comm	_PKT_MEDIA,4,2                  ; @PKT_MEDIA
l_.str.1:                               ; @.str.1
	.asciz	"invalid media packet length\n"

	.comm	_AV_CODEC_ID_PCM_S24LE,8,3      ; @AV_CODEC_ID_PCM_S24LE
	.comm	_AV_CODEC_ID_PCM_S16LE,8,3      ; @AV_CODEC_ID_PCM_S16LE
l_.str.2:                               ; @.str.2
	.asciz	"invalid first and last sample values\n"

	.comm	_AV_CODEC_ID_DVVIDEO,8,3        ; @AV_CODEC_ID_DVVIDEO
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.no_dead_strip	_gxf_packet
.subsections_via_symbols
