	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa6752hs_set_bitrate
_saa6752hs_set_bitrate:                 ## @saa6752hs_set_bitrate
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rsi), %rax
	movq	_V4L2_MPEG_VIDEO_BITRATE_MODE_VBR@GOTPCREL(%rip), %rbx
	xorl	%edx, %edx
	cmpq	(%rbx), %rax
	setne	%dl
	movl	$113, %esi
	callq	_set_reg8
	movq	(%r15), %rax
	movl	8(%r15), %edx
	cmpq	(%rbx), %rax
	jne	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	movl	$128, %esi
	callq	_set_reg16
	leaq	12(%r15), %rbx
	movl	12(%r15), %edx
	jmp	LBB0_3
LBB0_1:
	leaq	8(%r15), %rbx
LBB0_3:
	movq	%r14, %rdi
	movl	$129, %esi
	callq	_set_reg16
	movl	(%rbx), %r12d
	movq	16(%r15), %rax
	movq	_V4L2_MPEG_AUDIO_ENCODING_AC3@GOTPCREL(%rip), %rbx
	xorl	%edx, %edx
	cmpq	(%rbx), %rax
	sete	%dl
	movq	%r14, %rdi
	movl	$147, %esi
	callq	_set_reg8
	movq	16(%r15), %rcx
	xorl	%eax, %eax
	cmpq	(%rbx), %rcx
	setne	%al
	jne	LBB0_4
## %bb.5:
	movq	_V4L2_MPEG_AUDIO_AC3_BITRATE_384K@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_4:
	movq	_V4L2_MPEG_AUDIO_L2_BITRATE_384K@GOTPCREL(%rip), %rcx
LBB0_6:
	movq	(%rcx), %rcx
	xorl	%ebx, %ebx
	cmpq	24(%r15,%rax,8), %rcx
	sete	%bl
	movq	%r14, %rdi
	movl	$148, %esi
	movl	%ebx, %edx
	callq	_set_reg8
	shll	$7, %ebx
	leal	(%rbx,%r12), %eax
	addl	$1024, %eax                     ## imm = 0x400
	movq	_MPEG_TOTAL_TARGET_BITRATE_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	cmpl	%edx, %eax
	cmovll	%eax, %edx
	movq	%r14, %rdi
	movl	$177, %esi
	callq	_set_reg16
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_MPEG_VIDEO_BITRATE_MODE_VBR,8,3 ## @V4L2_MPEG_VIDEO_BITRATE_MODE_VBR
	.comm	_V4L2_MPEG_AUDIO_ENCODING_AC3,8,3 ## @V4L2_MPEG_AUDIO_ENCODING_AC3
	.comm	_V4L2_MPEG_AUDIO_AC3_BITRATE_384K,8,3 ## @V4L2_MPEG_AUDIO_AC3_BITRATE_384K
	.comm	_V4L2_MPEG_AUDIO_L2_BITRATE_384K,8,3 ## @V4L2_MPEG_AUDIO_L2_BITRATE_384K
	.comm	_MPEG_TOTAL_TARGET_BITRATE_MAX,4,2 ## @MPEG_TOTAL_TARGET_BITRATE_MAX
	.no_dead_strip	_saa6752hs_set_bitrate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa6752hs_set_bitrate
_saa6752hs_set_bitrate:                 ; @saa6752hs_set_bitrate
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x21, _V4L2_MPEG_VIDEO_BITRATE_MODE_VBR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _V4L2_MPEG_VIDEO_BITRATE_MODE_VBR@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	cset	w2, ne
	mov	w1, #113
	bl	_set_reg8
	ldr	x8, [x20]
	ldr	x9, [x21]
	mov	x21, x20
	ldr	w2, [x21, #8]!
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #128
	bl	_set_reg16
	mov	x21, x20
	ldr	w2, [x21, #12]!
LBB0_2:
	mov	x0, x19
	mov	w1, #129
	bl	_set_reg16
	ldr	w21, [x21]
	ldr	x8, [x20, #16]
Lloh2:
	adrp	x22, _V4L2_MPEG_AUDIO_ENCODING_AC3@GOTPAGE
Lloh3:
	ldr	x22, [x22, _V4L2_MPEG_AUDIO_ENCODING_AC3@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w2, eq
	mov	x0, x19
	mov	w1, #147
	bl	_set_reg8
	ldr	x8, [x20, #16]
	ldr	x9, [x22]
Lloh4:
	adrp	x10, _V4L2_MPEG_AUDIO_L2_BITRATE_384K@GOTPAGE
Lloh5:
	ldr	x10, [x10, _V4L2_MPEG_AUDIO_L2_BITRATE_384K@GOTPAGEOFF]
Lloh6:
	adrp	x11, _V4L2_MPEG_AUDIO_AC3_BITRATE_384K@GOTPAGE
Lloh7:
	ldr	x11, [x11, _V4L2_MPEG_AUDIO_AC3_BITRATE_384K@GOTPAGEOFF]
	mov	w12, #32
	mov	w13, #24
	cmp	x8, x9
	csel	x8, x13, x12, eq
	csel	x9, x11, x10, eq
	ldr	x9, [x9]
	ldr	x8, [x20, x8]
	cmp	x9, x8
	cset	w2, eq
	mov	w8, #256
	mov	w9, #384
	csel	w20, w9, w8, eq
	mov	x0, x19
	mov	w1, #148
	bl	_set_reg8
	add	w8, w21, w20
	add	w8, w8, #768
Lloh8:
	adrp	x9, _MPEG_TOTAL_TARGET_BITRATE_MAX@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MPEG_TOTAL_TARGET_BITRATE_MAX@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w2, w8, w9, lt
	mov	x0, x19
	mov	w1, #177
	bl	_set_reg16
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MPEG_VIDEO_BITRATE_MODE_VBR,8,3 ; @V4L2_MPEG_VIDEO_BITRATE_MODE_VBR
	.comm	_V4L2_MPEG_AUDIO_ENCODING_AC3,8,3 ; @V4L2_MPEG_AUDIO_ENCODING_AC3
	.comm	_V4L2_MPEG_AUDIO_AC3_BITRATE_384K,8,3 ; @V4L2_MPEG_AUDIO_AC3_BITRATE_384K
	.comm	_V4L2_MPEG_AUDIO_L2_BITRATE_384K,8,3 ; @V4L2_MPEG_AUDIO_L2_BITRATE_384K
	.comm	_MPEG_TOTAL_TARGET_BITRATE_MAX,4,2 ; @MPEG_TOTAL_TARGET_BITRATE_MAX
	.no_dead_strip	_saa6752hs_set_bitrate
.subsections_via_symbols
