	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen_mpeg1hdr_to_package
_gen_mpeg1hdr_to_package:               ## @gen_mpeg1hdr_to_package
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movl	%edx, %r14d
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$5120, %edi                     ## imm = 0x1400
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movq	_PFRAME@GOTPCREL(%rip), %r14
	movl	(%r14), %r8d
	movq	%r12, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_mpeg1_frame_header
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, (%r13)
	cmpq	$0, (%r12)
	je	LBB0_4
## %bb.3:
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rax
	leaq	(%rbx,%rax,4), %rsi
	movl	(%r14), %r8d
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	$2, %ecx
	callq	_mpeg1_frame_header
                                        ## kill: def $eax killed $eax def $rax
	addl	(%r13), %eax
	movl	%eax, (%r13)
LBB0_4:
	movzbl	%al, %eax
	movl	%eax, (%rbx)
	movl	(%r13), %eax
	sarl	$8, %eax
	movl	%eax, 4(%rbx)
	leaq	1472(%rbx), %r15
	movq	_BFRAME_PRE@GOTPCREL(%rip), %r14
	movl	(%r14), %r8d
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_mpeg1_frame_header
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, 4(%r13)
	cmpq	$0, (%r12)
	je	LBB0_6
## %bb.5:
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rax
	leaq	(%r15,%rax,4), %rsi
	movl	(%r14), %r8d
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	$2, %ecx
	callq	_mpeg1_frame_header
                                        ## kill: def $eax killed $eax def $rax
	addl	4(%r13), %eax
	movl	%eax, 4(%r13)
LBB0_6:
	movzbl	%al, %eax
	movl	%eax, 1472(%rbx)
	movl	4(%r13), %eax
	sarl	$8, %eax
	movl	%eax, 1476(%rbx)
	leaq	8000(%rbx), %r15
	movq	_BFRAME_POST@GOTPCREL(%rip), %r14
	movl	(%r14), %r8d
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_mpeg1_frame_header
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, 8(%r13)
	cmpq	$0, (%r12)
	je	LBB0_8
## %bb.7:
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rax
	leaq	(%r15,%rax,4), %rsi
	movl	(%r14), %r8d
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	$2, %ecx
	callq	_mpeg1_frame_header
                                        ## kill: def $eax killed $eax def $rax
	addl	8(%r13), %eax
	movl	%eax, 8(%r13)
LBB0_8:
	movzbl	%al, %eax
	movl	%eax, 8000(%rbx)
	movl	8(%r13), %eax
	sarl	$8, %eax
	movl	%eax, 8004(%rbx)
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	addq	$13728, %rbx                    ## imm = 0x35A0
	movq	_BFRAME_BIDIR@GOTPCREL(%rip), %r15
	movl	(%r15), %r8d
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_mpeg1_frame_header
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, 12(%r13)
	cmpq	$0, (%r12)
	je	LBB0_10
## %bb.9:
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rax
	leaq	(%rbx,%rax,4), %rsi
	movl	(%r15), %r8d
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	$2, %ecx
	callq	_mpeg1_frame_header
                                        ## kill: def $eax killed $eax def $rax
	addl	12(%r13), %eax
	movl	%eax, 12(%r13)
LBB0_10:
	movzbl	%al, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 13728(%rcx)
	movl	12(%r13), %eax
	sarl	$8, %eax
	movl	%eax, 13732(%rcx)
	leaq	20320(%rcx), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_mpeg1_sequence_header
	movslq	-48(%rbp), %rax                 ## 4-byte Folded Reload
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	leaq	16(%rbx), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	$15872, %ecx                    ## imm = 0x3E00
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	$25, %r12d
	xorl	%r15d, %r15d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_11 Depth=1
	addl	$28, %r14d
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	$4124, %edi                     ## imm = 0x101C
	callq	___cpu_to_le16
	movq	%rax, (%rbx,%r15,8)
	movq	$0, 248(%rbx,%r15,8)
LBB0_18:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movslq	%ebx, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rsi
	leal	(%r13,%r13), %edx
	movq	%r14, %rdi
	callq	_memcpy
	addq	$32, %r15
	leal	(%rbx,%r13,2), %ebx
	addq	$256, %r14                      ## imm = 0x100
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	addq	$-32, %rax
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	cmpl	$5120, %ebx                     ## imm = 0x1400
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	jge	LBB0_19
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$32, %rax
	jl	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %edi
	orl	$32768, %edi                    ## imm = 0x8000
	callq	___cpu_to_le16
	movq	%rax, 8(%rbx,%r15,8)
	movl	$16384, %eax                    ## imm = 0x4000
	subl	%r14d, %eax
	cmpl	$16357, %r14d                   ## imm = 0x3FE5
	movl	$28, %ecx
	cmovll	%ecx, %eax
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	leal	(%rdx,%rax,2), %ecx
	movl	$5120, %r13d                    ## imm = 0x1400
	subl	%edx, %r13d
	shrl	%r13d
	cmpl	$5121, %ecx                     ## imm = 0x1401
	cmovll	%eax, %r13d
	cmpl	$27, %r13d
	jg	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	%r13d, %edi
	orl	$16384, %edi                    ## imm = 0x4000
	callq	___cpu_to_le16
	movq	%rax, (%rbx,%r15,8)
	movl	%r12d, %edi
	callq	___cpu_to_le16
	movq	%rax, 248(%rbx,%r15,8)
	leal	(%r14,%r13), %edx
	xorl	%eax, %eax
	movl	$15872, %ecx                    ## imm = 0x3E00
	cmpl	$16384, %edx                    ## imm = 0x4000
	sete	%dl
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	%r14d, %ecx
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	movb	%dl, %al
	addl	%eax, %r12d
	movl	%ecx, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_18
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_20
LBB0_12:
	movl	$-1, %r15d
LBB0_19:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
LBB0_20:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PFRAME,4,2                     ## @PFRAME
	.comm	_BFRAME_PRE,4,2                 ## @BFRAME_PRE
	.comm	_BFRAME_POST,4,2                ## @BFRAME_POST
	.comm	_BFRAME_BIDIR,4,2               ## @BFRAME_BIDIR
	.no_dead_strip	_gen_mpeg1hdr_to_package
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen_mpeg1hdr_to_package
_gen_mpeg1hdr_to_package:               ; @gen_mpeg1hdr_to_package
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x23, x3
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #5120
	bl	_kzalloc
	cbz	x0, LBB0_15
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x24, _PFRAME@GOTPAGE
Lloh4:
	ldr	x24, [x24, _PFRAME@GOTPAGEOFF]
	ldr	w4, [x24]
	mov	x0, x22
	mov	x1, x19
	mov	w2, #0
	mov	w3, #1
	bl	_mpeg1_frame_header
	str	w0, [x23]
	ldr	x8, [x22]
	cbz	x8, LBB0_3
; %bb.2:
	add	w8, w0, #7
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w8, w8, #3
	add	x1, x19, w8, sxtw #2
	ldr	w4, [x24]
	mov	x0, x22
	mov	w2, #0
	mov	w3, #2
	bl	_mpeg1_frame_header
	ldr	w8, [x23]
	add	w0, w8, w0
	str	w0, [x23]
LBB0_3:
	and	w8, w0, #0xff
	str	w8, [x19]
	ldr	w8, [x23]
	asr	w8, w8, #8
	str	w8, [x19, #4]
	add	x24, x19, #1472
Lloh5:
	adrp	x25, _BFRAME_PRE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _BFRAME_PRE@GOTPAGEOFF]
	ldr	w4, [x25]
	mov	x0, x22
	mov	x1, x24
	mov	w2, #0
	mov	w3, #1
	bl	_mpeg1_frame_header
	str	w0, [x23, #4]
	ldr	x8, [x22]
	cbz	x8, LBB0_5
; %bb.4:
	add	w8, w0, #7
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w8, w8, #3
	add	x1, x24, w8, sxtw #2
	ldr	w4, [x25]
	mov	x0, x22
	mov	w2, #0
	mov	w3, #2
	bl	_mpeg1_frame_header
	ldr	w8, [x23, #4]
	add	w0, w8, w0
	str	w0, [x23, #4]
LBB0_5:
	and	w8, w0, #0xff
	str	w8, [x19, #1472]
	ldr	w8, [x23, #4]
	asr	w8, w8, #8
	str	w8, [x19, #1476]
	mov	w8, #8000
	add	x24, x19, x8
Lloh7:
	adrp	x25, _BFRAME_POST@GOTPAGE
Lloh8:
	ldr	x25, [x25, _BFRAME_POST@GOTPAGEOFF]
	ldr	w4, [x25]
	mov	x0, x22
	mov	x1, x24
	mov	w2, #0
	mov	w3, #1
	bl	_mpeg1_frame_header
	str	w0, [x23, #8]
	ldr	x8, [x22]
	cbz	x8, LBB0_7
; %bb.6:
	add	w8, w0, #7
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w8, w8, #3
	add	x1, x24, w8, sxtw #2
	ldr	w4, [x25]
	mov	x0, x22
	mov	w2, #0
	mov	w3, #2
	bl	_mpeg1_frame_header
	ldr	w8, [x23, #8]
	add	w0, w8, w0
	str	w0, [x23, #8]
LBB0_7:
	and	w8, w0, #0xff
	str	w8, [x19, #8000]
	ldr	w8, [x23, #8]
	asr	w8, w8, #8
	str	w8, [x19, #8004]
	mov	w8, #13728
	add	x24, x19, x8
Lloh9:
	adrp	x25, _BFRAME_BIDIR@GOTPAGE
Lloh10:
	ldr	x25, [x25, _BFRAME_BIDIR@GOTPAGEOFF]
	ldr	w4, [x25]
	mov	x0, x22
	mov	x1, x24
	mov	w2, #0
	mov	w3, #1
	bl	_mpeg1_frame_header
	str	w0, [x23, #12]
	ldr	x8, [x22]
	cbz	x8, LBB0_9
; %bb.8:
	add	w8, w0, #7
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w8, w8, #3
	add	x1, x24, w8, sxtw #2
	ldr	w4, [x25]
	mov	x0, x22
	mov	w2, #0
	mov	w3, #2
	bl	_mpeg1_frame_header
	ldr	w8, [x23, #12]
	add	w0, w8, w0
	str	w0, [x23, #12]
LBB0_9:
	and	w8, w0, #0xff
	str	w8, [x19, #13728]
	ldr	w8, [x23, #12]
	asr	w8, w8, #8
	str	w8, [x19, #13732]
	mov	w8, #20320
	add	x1, x19, x8
	mov	x0, x22
	mov	w2, #0
	bl	_mpeg1_sequence_header
	mov	x23, #0
	mov	w24, #0
	sxtw	x25, w21
	mov	w21, #25
	mov	w26, #28
	mov	w27, #5120
	mov	w28, #15872
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w28, w28, #28
	mov	w0, #4124
	bl	___cpu_to_le16
	str	x0, [x20]
	str	xzr, [x20, #248]
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x0, x20, #16
	lsl	w22, w22, #1
	add	x1, x19, w24, sxtw #2
	mov	x2, x22
	bl	_memcpy
	add	x20, x20, #256
	sub	x23, x23, #32
	add	w24, w22, w24
	cmp	w24, w27
	b.ge	LBB0_16
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	x8, x25, x23
	cmp	x8, #32
	b.lt	LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	orr	w0, w28, #0x8000
	bl	___cpu_to_le16
	str	x0, [x20, #8]
	mov	w8, #16384
	sub	w8, w8, w28
	mov	w9, #16356
	cmp	w28, w9
	csel	w8, w8, w26, gt
	add	w9, w24, w8, lsl #1
	sub	w10, w27, w24
	lsr	w10, w10, #1
	cmp	w9, w27
	csel	w22, w10, w8, gt
	cmp	w22, #27
	b.gt	LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	orr	w0, w22, #0x4000
	bl	___cpu_to_le16
	str	x0, [x20]
	mov	x0, x21
	bl	___cpu_to_le16
	str	x0, [x20, #248]
	add	w8, w22, w28
	cmp	w8, #4, lsl #12                 ; =16384
	mov	w8, #15872
	csel	w28, w8, w28, eq
	cinc	w21, w21, eq
	b	LBB0_11
LBB0_15:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_19
LBB0_16:
	neg	w20, w23
	b	LBB0_18
LBB0_17:
	mov	w20, #-1
LBB0_18:
	mov	x0, x19
	bl	_kfree
LBB0_19:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PFRAME,4,2                     ; @PFRAME
	.comm	_BFRAME_PRE,4,2                 ; @BFRAME_PRE
	.comm	_BFRAME_POST,4,2                ; @BFRAME_POST
	.comm	_BFRAME_BIDIR,4,2               ; @BFRAME_BIDIR
	.no_dead_strip	_gen_mpeg1hdr_to_package
.subsections_via_symbols
