	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx2341x_calc_audio_properties
_cx2341x_calc_audio_properties:         ## @cx2341x_calc_audio_properties
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	8(%rdi), %eax
	movl	12(%rdi), %ecx
	shll	$8, %eax
	orl	4(%rdi), %eax
	shll	$10, %ecx
	orl	%eax, %ecx
	movl	16(%rdi), %eax
	movq	_V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17@GOTPCREL(%rip), %rdx
	movl	%eax, %esi
	shll	$12, %esi
	cmpl	(%rdx), %eax
	movl	$12288, %edx                    ## imm = 0x3000
	cmovnel	%esi, %edx
	orl	%ecx, %edx
	movl	20(%rdi), %eax
	shll	$14, %eax
	orl	%edx, %eax
	movl	%eax, (%rdi)
	movq	_CX2341X_CAP_HAS_AC3@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	28(%rdi), %ecx
	testl	%edx, 24(%rdi)
	je	LBB0_3
## %bb.1:
	movq	_V4L2_MPEG_AUDIO_ENCODING_AC3@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_3
## %bb.2:
	movq	_V4L2_MPEG_AUDIO_ENCODING_LAYER_2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$2, %ecx
	movl	$12, %edx
	subl	%ecx, %edx
	movl	32(%rdi), %esi
	shll	$4, %esi
	movq	_CX2341X_AUDIO_ENCODING_METHOD_AC3@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$28, %ecx
	orl	%esi, %ecx
	jmp	LBB0_4
LBB0_3:
	shll	$2, %ecx
	movl	$12, %edx
	subl	%ecx, %edx
	movl	36(%rdi), %ecx
	shll	$4, %ecx
	addl	$16, %ecx
LBB0_4:
	orl	%edx, %ecx
	orl	%eax, %ecx
	movl	%ecx, (%rdi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17,4,2 ## @V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17
	.comm	_CX2341X_CAP_HAS_AC3,4,2        ## @CX2341X_CAP_HAS_AC3
	.comm	_V4L2_MPEG_AUDIO_ENCODING_AC3,4,2 ## @V4L2_MPEG_AUDIO_ENCODING_AC3
	.comm	_V4L2_MPEG_AUDIO_ENCODING_LAYER_2,4,2 ## @V4L2_MPEG_AUDIO_ENCODING_LAYER_2
	.comm	_CX2341X_AUDIO_ENCODING_METHOD_AC3,4,2 ## @CX2341X_AUDIO_ENCODING_METHOD_AC3
	.no_dead_strip	_cx2341x_calc_audio_properties
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx2341x_calc_audio_properties
_cx2341x_calc_audio_properties:         ; @cx2341x_calc_audio_properties
	.cfi_startproc
; %bb.0:
	ldp	w8, w9, [x0, #4]
	orr	w8, w8, w9, lsl #8
	ldp	w9, w10, [x0, #12]
	orr	w8, w8, w9, lsl #10
Lloh0:
	adrp	x9, _V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsl	w11, w10, #12
	mov	w12, #12288
	cmp	w10, w9
	csel	w9, w12, w11, eq
	orr	w8, w8, w9
	ldp	w9, w10, [x0, #20]
	orr	w8, w8, w9, lsl #14
	str	w8, [x0]
Lloh3:
	adrp	x9, _CX2341X_CAP_HAS_AC3@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CX2341X_CAP_HAS_AC3@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w10, w9, w10
	ldr	w9, [x0, #28]
Lloh6:
	adrp	x11, _V4L2_MPEG_AUDIO_ENCODING_AC3@GOTPAGE
Lloh7:
	ldr	x11, [x11, _V4L2_MPEG_AUDIO_ENCODING_AC3@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	cmp	w10, #0
	ccmp	w9, w11, #0, ne
	b.eq	LBB0_2
; %bb.1:
	mov	w10, #12
	sub	w9, w10, w9, lsl #2
	ldr	w10, [x0, #36]
	lsl	w10, w10, #4
	add	w10, w10, #16
	orr	w9, w10, w9
	b	LBB0_3
LBB0_2:
Lloh9:
	adrp	x9, _V4L2_MPEG_AUDIO_ENCODING_LAYER_2@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V4L2_MPEG_AUDIO_ENCODING_LAYER_2@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	mov	w10, #12
	sub	w9, w10, w9, lsl #2
	ldr	w10, [x0, #32]
	orr	w9, w9, w10, lsl #4
Lloh12:
	adrp	x10, _CX2341X_AUDIO_ENCODING_METHOD_AC3@GOTPAGE
Lloh13:
	ldr	x10, [x10, _CX2341X_AUDIO_ENCODING_METHOD_AC3@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w9, w9, w10, lsl #28
LBB0_3:
	orr	w8, w9, w8
	str	w8, [x0]
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17,4,2 ; @V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17
	.comm	_CX2341X_CAP_HAS_AC3,4,2        ; @CX2341X_CAP_HAS_AC3
	.comm	_V4L2_MPEG_AUDIO_ENCODING_AC3,4,2 ; @V4L2_MPEG_AUDIO_ENCODING_AC3
	.comm	_V4L2_MPEG_AUDIO_ENCODING_LAYER_2,4,2 ; @V4L2_MPEG_AUDIO_ENCODING_LAYER_2
	.comm	_CX2341X_AUDIO_ENCODING_METHOD_AC3,4,2 ; @CX2341X_AUDIO_ENCODING_METHOD_AC3
	.no_dead_strip	_cx2341x_calc_audio_properties
.subsections_via_symbols
