	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adts_write_packet
_adts_write_packet:                     ## @adts_write_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, %rbx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ADTS_HEADER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rsi
	xorl	%r14d, %r14d
	cmpl	$0, (%rbx)
	je	LBB0_15
## %bb.1:
	movq	16(%r15), %r12
	movq	(%r15), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movq	(%rax), %r13
	cmpl	$0, 4(%r13)
	jne	LBB0_7
## %bb.2:
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	$0, -52(%rbp)
	movq	_AV_PKT_DATA_NEW_EXTRADATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_av_packet_get_side_data
	movl	-52(%rbp), %ecx
	testl	%ecx, %ecx
	je	LBB0_6
## %bb.3:
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%rax, %r15
	movq	%rax, %rdx
	callq	_adts_decode_extradata
	testl	%eax, %eax
	js	LBB0_14
## %bb.4:
	movl	-52(%rbp), %esi
	movq	%r13, %rdi
	callq	_ff_alloc_extradata
	testl	%eax, %eax
	js	LBB0_14
## %bb.5:
	movl	(%r13), %edi
	movl	-52(%rbp), %edx
	movq	%r15, %rsi
	callq	_memcpy
LBB0_6:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
LBB0_7:
	cmpq	$0, 16(%r12)
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_11
## %bb.8:
	movl	(%rbx), %edx
	movl	(%r12), %ecx
	movq	%r12, %rdi
	movq	%rsi, %r13
	callq	_adts_write_frame_header
	testl	%eax, %eax
	js	LBB0_14
## %bb.9:
	movq	_ADTS_HEADER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_avio_write
	movl	(%r12), %edx
	testl	%edx, %edx
	je	LBB0_11
## %bb.10:
	movq	8(%r12), %rsi
	movq	%r15, %rdi
	callq	_avio_write
	movl	$0, (%r12)
LBB0_11:
	movq	8(%rbx), %rsi
	movl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_avio_write
	jmp	LBB0_15
LBB0_14:
	movl	%eax, %r14d
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ADTS_HEADER_SIZE,4,2           ## @ADTS_HEADER_SIZE
	.comm	_AV_PKT_DATA_NEW_EXTRADATA,4,2  ## @AV_PKT_DATA_NEW_EXTRADATA
	.no_dead_strip	_adts_write_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adts_write_packet
_adts_write_packet:                     ; @adts_write_packet
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x19, x1
	mov	x24, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldp	x8, x21, [x0, #8]
	ldr	x20, [x0]
	ldr	x8, [x8]
	ldr	x23, [x8]
Lloh3:
	adrp	x26, _ADTS_HEADER_SIZE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _ADTS_HEADER_SIZE@GOTPAGEOFF]
	ldr	w8, [x26]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	w8, [x1]
	cbz	w8, LBB0_7
; %bb.1:
	ldr	w8, [x23, #4]
	cbz	w8, LBB0_10
LBB0_2:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	w2, [x19]
	ldr	w3, [x21]
	mov	x0, x21
	mov	x1, x22
	bl	_adts_write_frame_header
	tbnz	w0, #31, LBB0_8
; %bb.4:
	ldr	w2, [x26]
	mov	x0, x20
	mov	x1, x22
	bl	_avio_write
	ldr	w2, [x21]
	cbz	w2, LBB0_6
; %bb.5:
	ldr	x1, [x21, #8]
	mov	x0, x20
	bl	_avio_write
	str	wzr, [x21]
LBB0_6:
	ldr	x1, [x19, #8]
	ldr	w2, [x19]
	mov	x0, x20
	bl	_avio_write
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldur	x8, [x29, #-72]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.9:
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
	stur	wzr, [x29, #-76]
Lloh10:
	adrp	x8, _AV_PKT_DATA_NEW_EXTRADATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AV_PKT_DATA_NEW_EXTRADATA@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	sub	x2, x29, #76
	mov	x0, x19
	bl	_av_packet_get_side_data
	ldur	w3, [x29, #-76]
	cbz	w3, LBB0_2
; %bb.11:
	mov	x25, x0
	mov	x0, x24
	mov	x1, x21
	mov	x2, x25
	bl	_adts_decode_extradata
	tbnz	w0, #31, LBB0_8
; %bb.12:
	ldur	w1, [x29, #-76]
	mov	x0, x23
	bl	_ff_alloc_extradata
	tbnz	w0, #31, LBB0_8
; %bb.13:
	ldr	w0, [x23]
	ldur	w2, [x29, #-76]
	mov	x1, x25
	bl	_memcpy
	b	LBB0_2
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ADTS_HEADER_SIZE,4,2           ; @ADTS_HEADER_SIZE
	.comm	_AV_PKT_DATA_NEW_EXTRADATA,4,2  ; @AV_PKT_DATA_NEW_EXTRADATA
	.no_dead_strip	_adts_write_packet
.subsections_via_symbols
