	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ogm_packet
_ogm_packet:                            ## @ogm_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rax
	movq	(%rax), %rdi
	movslq	%esi, %rax
	leaq	(%rax,%rax,2), %rsi
	movq	(%rdi,%rsi,8), %rcx
	movslq	8(%rdi,%rsi,8), %rax
	leaq	(%rcx,%rax,4), %r8
	movl	(%rcx,%rax,4), %ecx
	testb	$8, %cl
	je	LBB0_2
## %bb.1:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 20(%rdi,%rsi,8)
	movl	(%r8), %ecx
LBB0_2:
	movl	%ecx, %edx
	andl	$2, %edx
	shrl	$6, %ecx
	andl	$3, %ecx
	leal	(%rcx,%rdx,2), %r14d
	movl	12(%rdi,%rsi,8), %ecx
	cmpl	%r14d, %ecx
	jle	LBB0_3
## %bb.4:
	leaq	(%rdi,%rsi,8), %rdx
	addq	$8, %rdx
	leal	1(%r14), %ebx
	addl	%r14d, %eax
	incl	%eax
	movl	%eax, (%rdx)
	subl	%ebx, %ecx
	movl	%ecx, 4(%rdx)
	xorl	%eax, %eax
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.5:
	movl	%r14d, %r10d
	leaq	-1(%r10), %rdx
	movl	(%r8,%r10,4), %r11d
	leal	(,%rdx,8), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r11d
	addl	16(%rdi,%rsi,8), %r11d
	movl	%r11d, 16(%rdi,%rsi,8)
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.6:
	leaq	-2(%r10), %rdx
	movl	-4(%r8,%r10,4), %ebx
	leal	(,%rdx,8), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	leaq	(%rdi,%rsi,8), %r9
	addq	$16, %r9
	addl	%ebx, %r11d
	movl	%r11d, (%r9)
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.7:
	leaq	-3(%r10), %rdx
	movl	-8(%r8,%r10,4), %esi
	leal	(,%rdx,8), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	addl	%esi, %r11d
	movl	%r11d, (%r9)
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.8:
	leaq	-4(%r10), %rdx
	movl	-12(%r8,%r10,4), %esi
	leal	(,%rdx,8), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	addl	%esi, %r11d
	movl	%r11d, (%r9)
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.9:
	leaq	-5(%r10), %rdx
	movl	-16(%r8,%r10,4), %esi
	leal	(,%rdx,8), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	addl	%esi, %r11d
	movl	%r11d, (%r9)
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.10:
	leaq	-6(%r10), %rdx
	movl	-20(%r8,%r10,4), %esi
	leal	(,%rdx,8), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	addl	%esi, %r11d
	movl	%r11d, (%r9)
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.11:
	movl	-24(%r8,%r10,4), %edx
	shll	$3, %r14d
	addb	$-56, %r14b
	movl	%r14d, %ecx
	shll	%cl, %edx
	addl	%edx, %r11d
	movl	%r11d, (%r9)
	jmp	LBB0_12
LBB0_3:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_ogm_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ogm_packet
_ogm_packet:                            ; @ogm_packet
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w1 killed $w1 def $x1
	ldr	x8, [x0]
	ldr	x10, [x8]
	sxtw	x11, w1
	mov	w8, #24
	smaddl	x12, w1, w8, x10
	smull	x8, w1, w8
	ldr	x8, [x10, x8]
	ldrsw	x13, [x12, #8]!
	add	x8, x8, x13, lsl #2
	ldr	w14, [x8]
	tbz	w14, #3, LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mov	w14, #24
	madd	x14, x11, x14, x10
	ldr	w15, [x14, #20]
	orr	w9, w15, w9
	str	w9, [x14, #20]
	ldr	w14, [x8]
LBB0_2:
	lsl	w9, w14, #1
	and	w9, w9, #0x4
	bfxil	w9, w14, #6, #2
	mov	w14, #24
	madd	x14, x11, x14, x10
	ldr	w15, [x14, #12]!
	cmp	w15, w9
	b.le	LBB0_12
; %bb.3:
	add	w16, w9, #1
	add	w13, w16, w13
	str	w13, [x12]
	sub	w12, w15, w16
	str	w12, [x14]
	cbz	w9, LBB0_13
; %bb.4:
	mov	w12, #24
	madd	x10, x11, x12, x10
	ldr	w11, [x10, #16]!
	ldr	w13, [x8, w9, uxtw #2]
	subs	x12, x9, #1
	lsl	w14, w12, #3
	lsl	w13, w13, w14
	add	w11, w11, w13
	str	w11, [x10]
	b.eq	LBB0_13
; %bb.5:
	ldr	w13, [x8, x12, lsl #2]
	subs	x12, x9, #2
	lsl	w14, w12, #3
	lsl	w13, w13, w14
	add	w11, w11, w13
	str	w11, [x10]
	b.eq	LBB0_13
; %bb.6:
	ldr	w13, [x8, x12, lsl #2]
	subs	x12, x9, #3
	lsl	w14, w12, #3
	lsl	w13, w13, w14
	add	w11, w11, w13
	str	w11, [x10]
	b.eq	LBB0_13
; %bb.7:
	ldr	w13, [x8, x12, lsl #2]
	subs	x12, x9, #4
	lsl	w14, w12, #3
	lsl	w13, w13, w14
	add	w11, w11, w13
	str	w11, [x10]
	b.eq	LBB0_13
; %bb.8:
	ldr	w13, [x8, x12, lsl #2]
	subs	x12, x9, #5
	lsl	w14, w12, #3
	lsl	w13, w13, w14
	add	w11, w11, w13
	str	w11, [x10]
	b.eq	LBB0_13
; %bb.9:
	ldr	w13, [x8, x12, lsl #2]
	subs	x12, x9, #6
	lsl	w14, w12, #3
	lsl	w13, w13, w14
	add	w11, w11, w13
	str	w11, [x10]
	mov	w0, #0
	b.eq	LBB0_11
; %bb.10:
	ldr	w8, [x8, x12, lsl #2]
	lsl	w9, w9, #3
	sub	w9, w9, #56
	lsl	w8, w8, w9
	add	w8, w11, w8
	str	w8, [x10]
LBB0_11:
	ret
LBB0_12:
Lloh3:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ret
LBB0_13:
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_ogm_packet
.subsections_via_symbols
