	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxf_write_generic_sound_common
_mxf_write_generic_sound_common:        ## @mxf_write_generic_sound_common
	.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
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	8(%rdi), %r13
	movq	16(%rdi), %rbx
	movl	12(%r13), %r14d
	callq	_mxf_write_generic_desc
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%r12), %rax
	cmpq	_ff_mxf_opatom_muxer@GOTPCREL(%rip), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	$12290, %edx                    ## imm = 0x3002
	callq	_mxf_write_local_tag
	movl	(%r13), %eax
	cltd
	idivl	4(%r13)
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_avio_wb64
LBB0_2:
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$15618, %edx                    ## imm = 0x3D02
	callq	_mxf_write_local_tag
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_avio_w8
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	$15619, %edx                    ## imm = 0x3D03
	callq	_mxf_write_local_tag
	movq	(%r15), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_avio_wb32
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_avio_wb32
	movq	(%r12), %rax
	cmpq	_ff_mxf_d10_muxer@GOTPCREL(%rip), %rax
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$15620, %edx                    ## imm = 0x3D04
	callq	_mxf_write_local_tag
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_w8
LBB0_4:
	movq	%rbx, %rdi
	movl	$4, %esi
	movl	$15623, %edx                    ## imm = 0x3D07
	callq	_mxf_write_local_tag
	movl	8(%r13), %esi
	cmpl	$-1, %esi
	je	LBB0_5
## %bb.11:
	movq	(%r12), %rax
	cmpq	_ff_mxf_d10_muxer@GOTPCREL(%rip), %rax
	jne	LBB0_10
## %bb.12:
	testl	%r14d, %r14d
	je	LBB0_14
## %bb.13:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_20
LBB0_5:
	testl	%r14d, %r14d
	jne	LBB0_10
## %bb.6:
	movq	(%r12), %rax
	cmpq	_ff_mxf_d10_muxer@GOTPCREL(%rip), %rax
	je	LBB0_7
LBB0_10:
	movq	(%r15), %r13
	addq	$4, %r13
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_19:
	movl	(%r13), %esi
LBB0_20:
	movq	%rbx, %rdi
	callq	_avio_wb32
	movq	%rbx, %rdi
	movl	$4, %esi
	movl	$15617, %edx                    ## imm = 0x3D01
	callq	_mxf_write_local_tag
	movq	(%r15), %rax
	movl	8(%rax), %edi
	callq	_av_get_bits_per_sample
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_avio_wb32
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	addq	$8, %r13
	movq	(%r15), %rax
	cmpl	4(%rax), %esi
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jge	LBB0_16
## %bb.15:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	callq	_av_log
	movl	(%r13), %esi
LBB0_16:
	cmpl	$4, %esi
	je	LBB0_20
## %bb.17:
	cmpl	$8, %esi
	je	LBB0_20
## %bb.18:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	callq	_av_log
	jmp	LBB0_19
LBB0_7:
	movq	(%r15), %rax
	movl	4(%rax), %eax
	cmpl	$4, %eax
	je	LBB0_10
## %bb.8:
	cmpl	$8, %eax
	je	LBB0_10
## %bb.9:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_av_log
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_mxf_opatom_muxer,4,2        ## @ff_mxf_opatom_muxer
	.comm	_ff_mxf_d10_muxer,4,2           ## @ff_mxf_d10_muxer
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"the number of audio channels shall be 4 or 8 : the output will not comply to MXF D-10 specs, use -d10_channelcount to fix this\n"

L_.str.1:                               ## @.str.1
	.asciz	"d10_channelcount < actual number of audio channels : some channels will be discarded\n"

L_.str.2:                               ## @.str.2
	.asciz	"d10_channelcount shall be set to 4 or 8 : the output will not comply to MXF D-10 specs\n"

	.no_dead_strip	_mxf_write_generic_sound_common
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxf_write_generic_sound_common
_mxf_write_generic_sound_common:        ; @mxf_write_generic_sound_common
	.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
	mov	x20, x1
	mov	x22, x0
	ldp	x23, x19, [x0, #8]
	ldr	w24, [x23, #12]
	bl	_mxf_write_generic_desc
	mov	x21, x0
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _ff_mxf_opatom_muxer@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ff_mxf_opatom_muxer@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #8
	mov	w2, #12290
	bl	_mxf_write_local_tag
	ldp	w8, w9, [x23]
	sdiv	w1, w8, w9
	mov	x0, x19
	bl	_avio_wb64
LBB0_2:
	mov	x0, x19
	mov	w1, #1
	mov	w2, #15618
	bl	_mxf_write_local_tag
	mov	x0, x19
	mov	w1, #1
	bl	_avio_w8
	mov	x0, x19
	mov	w1, #8
	mov	w2, #15619
	bl	_mxf_write_local_tag
	ldr	x8, [x20]
	ldr	w1, [x8]
	mov	x0, x19
	bl	_avio_wb32
	mov	x0, x19
	mov	w1, #1
	bl	_avio_wb32
	ldr	x8, [x22]
Lloh2:
	adrp	x25, _ff_mxf_d10_muxer@GOTPAGE
Lloh3:
	ldr	x25, [x25, _ff_mxf_d10_muxer@GOTPAGEOFF]
	cmp	x8, x25
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #1
	mov	w2, #15620
	bl	_mxf_write_local_tag
	mov	x0, x19
	mov	w1, #0
	bl	_avio_w8
LBB0_4:
	mov	x0, x19
	mov	w1, #4
	mov	w2, #15623
	bl	_mxf_write_local_tag
	ldr	w1, [x23, #8]!
	cmn	w1, #1
	b.eq	LBB0_12
; %bb.5:
	ldr	x8, [x22]
	cmp	x8, x25
	b.ne	LBB0_14
; %bb.6:
	cbnz	w24, LBB0_16
; %bb.7:
	ldr	x8, [x20]
	ldr	w8, [x8, #4]
	cmp	w1, w8
	b.ge	LBB0_9
; %bb.8:
Lloh4:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_av_log
	ldr	w1, [x23]
LBB0_9:
	cmp	w1, #4
	b.eq	LBB0_16
; %bb.10:
	cmp	w1, #8
	b.eq	LBB0_16
; %bb.11:
Lloh9:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str.2@PAGE
Lloh13:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_av_log
	b	LBB0_15
LBB0_12:
	cbnz	w24, LBB0_14
; %bb.13:
	ldr	x8, [x22]
	cmp	x8, x25
	b.eq	LBB0_17
LBB0_14:
	ldr	x8, [x20]
	add	x23, x8, #4
LBB0_15:
	ldr	w1, [x23]
LBB0_16:
	mov	x0, x19
	bl	_avio_wb32
	mov	x0, x19
	mov	w1, #4
	mov	w2, #15617
	bl	_mxf_write_local_tag
	ldr	x8, [x20]
	ldr	w0, [x8, #8]
	bl	_av_get_bits_per_sample
	mov	x1, x0
	mov	x0, x19
	bl	_avio_wb32
	mov	x0, x21
	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_17:
	ldr	x8, [x20]
	ldr	w8, [x8, #4]
	cmp	w8, #4
	b.eq	LBB0_14
; %bb.18:
	cmp	w8, #8
	b.eq	LBB0_14
; %bb.19:
Lloh14:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	bl	_av_log
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_mxf_opatom_muxer,4,2        ; @ff_mxf_opatom_muxer
	.comm	_ff_mxf_d10_muxer,4,2           ; @ff_mxf_d10_muxer
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"the number of audio channels shall be 4 or 8 : the output will not comply to MXF D-10 specs, use -d10_channelcount to fix this\n"

l_.str.1:                               ; @.str.1
	.asciz	"d10_channelcount < actual number of audio channels : some channels will be discarded\n"

l_.str.2:                               ; @.str.2
	.asciz	"d10_channelcount shall be set to 4 or 8 : the output will not comply to MXF D-10 specs\n"

	.no_dead_strip	_mxf_write_generic_sound_common
.subsections_via_symbols
