	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_set_mode               ## -- Begin function cx231xx_set_mode
	.p2align	4, 0x90
_cx231xx_set_mode:                      ## @cx231xx_set_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	(%rdi), %eax
	xorl	%ebx, %ebx
	cmpl	%esi, %eax
	je	LBB0_15
## %bb.1:
	movq	_CX231XX_SUSPEND@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ecx
	cmpl	%esi, %ecx
	jne	LBB0_3
## %bb.2:
	movl	%esi, (%rdi)
	movl	(%rdx), %ecx
	movl	%esi, %eax
LBB0_3:
	cmpl	%ecx, %eax
	jne	LBB0_4
## %bb.5:
	movl	%esi, (%rdi)
	movslq	%esi, %rcx
	movq	_CX231XX_DIGITAL_MODE@GOTPCREL(%rip), %rdx
	movl	4(%rdi), %eax
	cmpq	%rcx, (%rdx)
	jne	LBB0_11
## %bb.6:
	addl	$-129, %eax
	cmpl	$6, %eax
	ja	LBB0_15
## %bb.7:
	movl	$106, %ecx
	btl	%eax, %ecx
	jb	LBB0_13
## %bb.8:
	movl	$20, %ecx
	btl	%eax, %ecx
	jb	LBB0_9
## %bb.10:
	movq	_POLARIS_AVMODE_DIGITAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_cx231xx_set_power_mode
	jmp	LBB0_15
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_11:
	addl	$-128, %eax
	cmpl	$7, %eax
	ja	LBB0_15
## %bb.12:
	movl	$43, %ecx
	btl	%eax, %ecx
	jae	LBB0_9
LBB0_13:
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	jmp	LBB0_14
LBB0_9:
	movl	$1, %esi
LBB0_14:
	callq	_cx231xx_set_agc_analog_digital_mux_select
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CX231XX_SUSPEND,4,2            ## @CX231XX_SUSPEND
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CX231XX_DIGITAL_MODE,8,3       ## @CX231XX_DIGITAL_MODE
	.comm	_POLARIS_AVMODE_DIGITAL,4,2     ## @POLARIS_AVMODE_DIGITAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_set_mode               ; -- Begin function cx231xx_set_mode
	.p2align	2
_cx231xx_set_mode:                      ; @cx231xx_set_mode
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	w8, [x0]
	cmp	w8, w1
	b.eq	LBB0_15
; %bb.1:
Lloh0:
	adrp	x10, _CX231XX_SUSPEND@GOTPAGE
Lloh1:
	ldr	x10, [x10, _CX231XX_SUSPEND@GOTPAGEOFF]
	ldr	w9, [x10]
	cmp	w9, w1
	b.ne	LBB0_3
; %bb.2:
	str	w1, [x0]
	ldr	w9, [x10]
	mov	x8, x1
LBB0_3:
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.4:
	str	w1, [x0]
Lloh2:
	adrp	x8, _CX231XX_DIGITAL_MODE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CX231XX_DIGITAL_MODE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x8]
	ldr	w8, [x0, #4]
	cmp	x9, w1, sxtw
	b.ne	LBB0_10
; %bb.5:
	sub	w8, w8, #129
	cmp	w8, #6
	b.hi	LBB0_15
; %bb.6:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #106
	tst	w8, w9
	b.ne	LBB0_12
; %bb.7:
	mov	w9, #20
	tst	w8, w9
	b.ne	LBB0_13
; %bb.8:
Lloh5:
	adrp	x8, _POLARIS_AVMODE_DIGITAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _POLARIS_AVMODE_DIGITAL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_cx231xx_set_power_mode
	b	LBB0_15
LBB0_9:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_10:
	sub	w8, w8, #128
	cmp	w8, #7
	b.hi	LBB0_15
; %bb.11:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #43
	tst	w8, w9
	b.eq	LBB0_13
LBB0_12:
	mov	w1, #0
	b	LBB0_14
LBB0_13:
	mov	w1, #1
LBB0_14:
	bl	_cx231xx_set_agc_analog_digital_mux_select
LBB0_15:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CX231XX_SUSPEND,4,2            ; @CX231XX_SUSPEND
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CX231XX_DIGITAL_MODE,8,3       ; @CX231XX_DIGITAL_MODE
	.comm	_POLARIS_AVMODE_DIGITAL,4,2     ; @POLARIS_AVMODE_DIGITAL
.subsections_via_symbols
