	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxf_get_d10_aes3_packet
_mxf_get_d10_aes3_packet:               ## @mxf_get_d10_aes3_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$61445, %ecx                    ## imm = 0xF005
	jl	LBB0_2
## %bb.1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_2:
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdx, %rsi
	movl	%ecx, %edx
	callq	_av_get_packet
	testl	%eax, %eax
	js	LBB0_16
## %bb.3:
	movq	(%r14), %rdx
	movq	%rdx, -56(%rbp)
	movl	%eax, %r8d
	leaq	16(%rdx), %rax
	movq	%rax, -48(%rbp)
	leaq	-16(,%r8,4), %rdi
	sarq	$2, %rdi
	movq	(%rbx), %rcx
	movslq	(%rcx), %rcx
	leaq	(,%rcx,4), %rsi
	cmpq	%rsi, %rdi
	jge	LBB0_5
## %bb.4:
	movq	%rdx, %rsi
	jmp	LBB0_15
LBB0_5:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	leaq	(%rdx,%r8,4), %r13
	leaq	-48(%rbp), %r15
	leaq	-56(%rbp), %r12
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %rax
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	leal	(,%rcx,4), %edx
	movl	$32, %esi
	subl	%edx, %esi
	movslq	%esi, %rsi
	leaq	(%rax,%rsi,4), %rax
	movq	%rax, -48(%rbp)
	movq	%r13, %rsi
	subq	%rax, %rsi
	sarq	$2, %rsi
	movslq	%edx, %rdx
	cmpq	%rdx, %rsi
	jl	LBB0_14
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	testl	%ecx, %ecx
	jle	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=2
	shrl	$12, %eax
	movzwl	%ax, %esi
	movq	%r12, %rdi
	callq	_bytestream_put_le16
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=2
	incl	%r14d
	movq	(%rbx), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %r14d
	jge	LBB0_12
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rdi
	callq	_bytestream_get_le32
	movq	(%rbx), %rcx
	cmpl	$24, 4(%rcx)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	shrl	$4, %eax
	andl	$16777215, %eax                 ## imm = 0xFFFFFF
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_bytestream_put_le24
	jmp	LBB0_11
LBB0_14:
	movq	-56(%rbp), %rsi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rdx
LBB0_15:
	subq	%rdx, %rsi
	shrq	$2, %rsi
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_av_shrink_packet
	xorl	%eax, %eax
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_mxf_get_d10_aes3_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxf_get_d10_aes3_packet
_mxf_get_d10_aes3_packet:               ; @mxf_get_d10_aes3_packet
	.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
	mov	w8, #61445
	cmp	w3, w8
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_15
LBB0_2:
	mov	x19, x2
	mov	x20, x1
	mov	x1, x2
	mov	x2, x3
	bl	_av_get_packet
	tbnz	w0, #31, LBB0_15
; %bb.3:
	ldr	x10, [x19]
	mov	w8, w0
	lsl	x11, x8, #2
	add	x9, x10, #16
	stp	x10, x9, [sp]
	sub	x8, x11, #16
	asr	x12, x8, #2
	ldr	x8, [x20]
	ldrsw	x8, [x8]
	cmp	x12, x8, lsl #2
	mov	x12, x10
	b.lt	LBB0_14
; %bb.4:
	add	x21, x10, x11
	mov	w22, #32
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [sp, #8]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	lsl	w10, w8, #2
	sub	w11, w22, w10
	add	x9, x9, w11, sxtw #2
	str	x9, [sp, #8]
	sub	x11, x21, x9
	sxtw	x10, w10
	cmp	x10, x11, asr #2
	b.gt	LBB0_13
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w23, #0
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=2
	ubfx	w1, w0, #12, #16
	mov	x0, sp
	bl	_bytestream_put_le16
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	add	w23, w23, #1
	ldr	x8, [x20]
	ldr	w8, [x8]
	cmp	w23, w8
	b.ge	LBB0_5
LBB0_11:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, sp, #8
	bl	_bytestream_get_le32
	ldr	x8, [x20]
	ldr	w8, [x8, #4]
	cmp	w8, #24
	b.ne	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	ubfx	w1, w0, #4, #24
	mov	x0, sp
	bl	_bytestream_put_le24
	b	LBB0_10
LBB0_13:
	ldr	x12, [sp]
	ldr	x10, [x19]
LBB0_14:
	sub	x8, x12, x10
	lsr	x1, x8, #2
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_av_shrink_packet
	mov	w0, #0
LBB0_15:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_mxf_get_d10_aes3_packet
.subsections_via_symbols
