	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_do_mode_ctrl_overrides ## -- Begin function cx231xx_do_mode_ctrl_overrides
	.p2align	4, 0x90
_cx231xx_do_mode_ctrl_overrides:        ## @cx231xx_do_mode_ctrl_overrides
	.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	%rdi, %r14
	movl	(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_cx231xx_info
	movq	_DFE_CTRL3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$-851508608, %edx               ## imm = 0xCD3F0280
	callq	_vid_blk_write_word
	movl	(%r14), %eax
	movq	_V4L2_STD_NTSC@GOTPCREL(%rip), %rcx
	movq	_V4L2_STD_PAL_M@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_cx231xx_info
	movq	_VID_BLK_I2C_ADDRESS@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_VERT_TIM_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	_FLD_VBLANK_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$24, %r8d
	callq	_cx231xx_read_modify_write_i2c_dword
	movl	(%r15), %esi
	movl	(%rbx), %edx
	movq	_FLD_VACTIVE_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$1994752, %r8d                  ## imm = 0x1E7000
	callq	_cx231xx_read_modify_write_i2c_dword
	movl	(%r15), %esi
	movl	(%rbx), %edx
	movq	_FLD_V656BLANK_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$469762048, %r8d                ## imm = 0x1C000000
	callq	_cx231xx_read_modify_write_i2c_dword
	movl	(%r15), %r15d
	movq	_HORIZ_TIM_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_FLD_HBLANK_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	movl	$121, %esi
	jmp	LBB0_2
LBB0_3:
	movq	_V4L2_STD_SECAM@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_5
LBB0_6:
	leaq	L_.str.3(%rip), %rdi
LBB0_5:
	xorl	%eax, %eax
	callq	_cx231xx_info
	movq	_VID_BLK_I2C_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rax, %rbx
	movq	_VERT_TIM_CTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	_FLD_VBLANK_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$32, %r8d
	callq	_cx231xx_read_modify_write_i2c_dword
	movl	(%rbx), %r12d
	movl	(%r13), %r15d
	movq	_FLD_VACTIVE_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	movl	$580, %esi                      ## imm = 0x244
	callq	_cx231xx_set_field
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_cx231xx_read_modify_write_i2c_dword
	movq	_VID_BLK_I2C_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	(%r13), %r15d
	movq	_FLD_V656BLANK_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	movl	$36, %esi
	callq	_cx231xx_set_field
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_cx231xx_read_modify_write_i2c_dword
	movq	_VID_BLK_I2C_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_HORIZ_TIM_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_FLD_HBLANK_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	movl	$133, %esi
LBB0_2:
	callq	_cx231xx_set_field
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cx231xx_read_modify_write_i2c_dword ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"do_mode_ctrl_overrides : 0x%x\n"

	.comm	_DFE_CTRL3,4,2                  ## @DFE_CTRL3
	.comm	_V4L2_STD_NTSC,4,2              ## @V4L2_STD_NTSC
	.comm	_V4L2_STD_PAL_M,4,2             ## @V4L2_STD_PAL_M
L_.str.1:                               ## @.str.1
	.asciz	"do_mode_ctrl_overrides NTSC\n"

	.comm	_VID_BLK_I2C_ADDRESS,4,2        ## @VID_BLK_I2C_ADDRESS
	.comm	_VERT_TIM_CTRL,4,2              ## @VERT_TIM_CTRL
	.comm	_FLD_VBLANK_CNT,4,2             ## @FLD_VBLANK_CNT
	.comm	_FLD_VACTIVE_CNT,4,2            ## @FLD_VACTIVE_CNT
	.comm	_FLD_V656BLANK_CNT,4,2          ## @FLD_V656BLANK_CNT
	.comm	_HORIZ_TIM_CTRL,4,2             ## @HORIZ_TIM_CTRL
	.comm	_FLD_HBLANK_CNT,4,2             ## @FLD_HBLANK_CNT
	.comm	_V4L2_STD_SECAM,4,2             ## @V4L2_STD_SECAM
L_.str.2:                               ## @.str.2
	.asciz	"do_mode_ctrl_overrides SECAM\n"

L_.str.3:                               ## @.str.3
	.asciz	"do_mode_ctrl_overrides PAL\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_do_mode_ctrl_overrides ; -- Begin function cx231xx_do_mode_ctrl_overrides
	.p2align	2
_cx231xx_do_mode_ctrl_overrides:        ; @cx231xx_do_mode_ctrl_overrides
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldr	w8, [x0]
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_cx231xx_info
Lloh2:
	adrp	x8, _DFE_CTRL3@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DFE_CTRL3@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #640
	movk	w2, #52543, lsl #16
	bl	_vid_blk_write_word
	ldr	w8, [x19]
Lloh5:
	adrp	x9, _V4L2_STD_NTSC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _V4L2_STD_NTSC@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _V4L2_STD_PAL_M@GOTPAGE
Lloh9:
	ldr	x10, [x10, _V4L2_STD_PAL_M@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_cx231xx_info
Lloh13:
	adrp	x20, _VID_BLK_I2C_ADDRESS@GOTPAGE
Lloh14:
	ldr	x20, [x20, _VID_BLK_I2C_ADDRESS@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh15:
	adrp	x21, _VERT_TIM_CTRL@GOTPAGE
Lloh16:
	ldr	x21, [x21, _VERT_TIM_CTRL@GOTPAGEOFF]
	ldr	w2, [x21]
Lloh17:
	adrp	x8, _FLD_VBLANK_CNT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _FLD_VBLANK_CNT@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w4, #24
	bl	_cx231xx_read_modify_write_i2c_dword
	ldr	w1, [x20]
	ldr	w2, [x21]
Lloh20:
	adrp	x8, _FLD_VACTIVE_CNT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FLD_VACTIVE_CNT@GOTPAGEOFF]
Lloh22:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w4, #28672
	movk	w4, #30, lsl #16
	bl	_cx231xx_read_modify_write_i2c_dword
	ldr	w1, [x20]
	ldr	w2, [x21]
Lloh23:
	adrp	x8, _FLD_V656BLANK_CNT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FLD_V656BLANK_CNT@GOTPAGEOFF]
Lloh25:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w4, #469762048
	bl	_cx231xx_read_modify_write_i2c_dword
	ldr	w20, [x20]
Lloh26:
	adrp	x8, _HORIZ_TIM_CTRL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _HORIZ_TIM_CTRL@GOTPAGEOFF]
Lloh28:
	ldr	w21, [x8]
Lloh29:
	adrp	x8, _FLD_HBLANK_CNT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _FLD_HBLANK_CNT@GOTPAGEOFF]
Lloh31:
	ldr	w22, [x8]
	mov	x0, x22
	mov	w1, #121
	b	LBB0_6
LBB0_2:
Lloh32:
	adrp	x9, _V4L2_STD_SECAM@GOTPAGE
Lloh33:
	ldr	x9, [x9, _V4L2_STD_SECAM@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh35:
	adrp	x0, l_.str.2@PAGE
Lloh36:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh37:
	adrp	x0, l_.str.3@PAGE
Lloh38:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_5:
	bl	_cx231xx_info
Lloh39:
	adrp	x23, _VID_BLK_I2C_ADDRESS@GOTPAGE
Lloh40:
	ldr	x23, [x23, _VID_BLK_I2C_ADDRESS@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh41:
	adrp	x24, _VERT_TIM_CTRL@GOTPAGE
Lloh42:
	ldr	x24, [x24, _VERT_TIM_CTRL@GOTPAGEOFF]
	ldr	w2, [x24]
Lloh43:
	adrp	x8, _FLD_VBLANK_CNT@GOTPAGE
Lloh44:
	ldr	x8, [x8, _FLD_VBLANK_CNT@GOTPAGEOFF]
Lloh45:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w4, #32
	bl	_cx231xx_read_modify_write_i2c_dword
	ldr	w20, [x23]
	ldr	w21, [x24]
Lloh46:
	adrp	x8, _FLD_VACTIVE_CNT@GOTPAGE
Lloh47:
	ldr	x8, [x8, _FLD_VACTIVE_CNT@GOTPAGEOFF]
Lloh48:
	ldr	w22, [x8]
	mov	x0, x22
	mov	w1, #580
	bl	_cx231xx_set_field
	mov	x4, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_cx231xx_read_modify_write_i2c_dword
	ldr	w20, [x23]
	ldr	w21, [x24]
Lloh49:
	adrp	x8, _FLD_V656BLANK_CNT@GOTPAGE
Lloh50:
	ldr	x8, [x8, _FLD_V656BLANK_CNT@GOTPAGEOFF]
Lloh51:
	ldr	w22, [x8]
	mov	x0, x22
	mov	w1, #36
	bl	_cx231xx_set_field
	mov	x4, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_cx231xx_read_modify_write_i2c_dword
	ldr	w20, [x23]
Lloh52:
	adrp	x8, _HORIZ_TIM_CTRL@GOTPAGE
Lloh53:
	ldr	x8, [x8, _HORIZ_TIM_CTRL@GOTPAGEOFF]
Lloh54:
	ldr	w21, [x8]
Lloh55:
	adrp	x8, _FLD_HBLANK_CNT@GOTPAGE
Lloh56:
	ldr	x8, [x8, _FLD_HBLANK_CNT@GOTPAGEOFF]
Lloh57:
	ldr	w22, [x8]
	mov	x0, x22
	mov	w1, #133
LBB0_6:
	bl	_cx231xx_set_field
	mov	x4, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	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
	add	sp, sp, #80
	b	_cx231xx_read_modify_write_i2c_dword
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"do_mode_ctrl_overrides : 0x%x\n"

	.comm	_DFE_CTRL3,4,2                  ; @DFE_CTRL3
	.comm	_V4L2_STD_NTSC,4,2              ; @V4L2_STD_NTSC
	.comm	_V4L2_STD_PAL_M,4,2             ; @V4L2_STD_PAL_M
l_.str.1:                               ; @.str.1
	.asciz	"do_mode_ctrl_overrides NTSC\n"

	.comm	_VID_BLK_I2C_ADDRESS,4,2        ; @VID_BLK_I2C_ADDRESS
	.comm	_VERT_TIM_CTRL,4,2              ; @VERT_TIM_CTRL
	.comm	_FLD_VBLANK_CNT,4,2             ; @FLD_VBLANK_CNT
	.comm	_FLD_VACTIVE_CNT,4,2            ; @FLD_VACTIVE_CNT
	.comm	_FLD_V656BLANK_CNT,4,2          ; @FLD_V656BLANK_CNT
	.comm	_HORIZ_TIM_CTRL,4,2             ; @HORIZ_TIM_CTRL
	.comm	_FLD_HBLANK_CNT,4,2             ; @FLD_HBLANK_CNT
	.comm	_V4L2_STD_SECAM,4,2             ; @V4L2_STD_SECAM
l_.str.2:                               ; @.str.2
	.asciz	"do_mode_ctrl_overrides SECAM\n"

l_.str.3:                               ; @.str.3
	.asciz	"do_mode_ctrl_overrides PAL\n"

.subsections_via_symbols
