	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rm_write_audio
_rm_write_audio:                        ## @rm_write_audio
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	(%rdi), %r13
	movq	8(%rdi), %rax
	movq	(%rax), %r14
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	andl	(%rdx), %ecx
	setne	%al
	movq	%r14, %rsi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_write_packet_header
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movq	_AV_CODEC_ID_AC3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	testl	%r15d, %r15d
	jle	LBB0_5
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r12,%rbx,4), %esi
	movq	%r13, %rdi
	callq	_avio_w8
	movl	(%r12,%rbx,4), %esi
	movq	%r13, %rdi
	callq	_avio_w8
	addq	$2, %rbx
	cmpl	%r15d, %ebx
	jl	LBB0_3
	jmp	LBB0_5
LBB0_4:
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_avio_write
LBB0_5:
	incl	(%r14)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.comm	_AV_CODEC_ID_AC3,8,3            ## @AV_CODEC_ID_AC3
	.no_dead_strip	_rm_write_audio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rm_write_audio
_rm_write_audio:                        ; @rm_write_audio
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x2
	mov	x21, x1
	ldp	x22, x8, [x0]
	ldr	x19, [x8]
Lloh0:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w3
	cset	w3, ne
	mov	x1, x19
	bl	_write_packet_header
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _AV_CODEC_ID_AC3@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_CODEC_ID_AC3@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	cmp	w20, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x23, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x24, x21, x23, lsl #2
	ldr	w1, [x24, #4]
	mov	x0, x22
	bl	_avio_w8
	ldr	w1, [x24]
	mov	x0, x22
	bl	_avio_w8
	add	x23, x23, #2
	cmp	w23, w20
	b.lt	LBB0_3
	b	LBB0_5
LBB0_4:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_avio_write
LBB0_5:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.comm	_AV_CODEC_ID_AC3,8,3            ; @AV_CODEC_ID_AC3
	.no_dead_strip	_rm_write_audio
.subsections_via_symbols
