	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap24xxcam_sensor_if_enable
_omap24xxcam_sensor_if_enable:          ## @omap24xxcam_sensor_if_enable
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	16(%rdi), %edi
	leaq	-64(%rbp), %rsi
	callq	_vidioc_int_g_ifparm
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_26
LBB0_2:
	movl	-64(%rbp), %edx
	movl	%edx, (%r14)
	movq	_CC_CTRL_CC_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	cmpl	$133, %edx
	jne	LBB0_23
## %bb.3:
	cmpl	$0, -24(%rbp)
	je	LBB0_5
## %bb.4:
	movq	_CC_CTRL_NOBT_SYNCHRO@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 12(%r14)
LBB0_5:
	cmpl	$0, -28(%rbp)
	je	LBB0_7
## %bb.6:
	movq	_CC_CTRL_BT_CORRECT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 12(%r14)
LBB0_7:
	cmpl	$0, -32(%rbp)
	je	LBB0_9
## %bb.8:
	movq	_CC_CTRL_PAR_ORDERCAM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 12(%r14)
LBB0_9:
	cmpl	$0, -36(%rbp)
	je	LBB0_11
## %bb.10:
	movq	_CC_CTRL_PAR_CLK_POL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 12(%r14)
LBB0_11:
	cmpl	$0, -40(%rbp)
	je	LBB0_13
## %bb.12:
	movq	_CC_CTRL_NOBT_HS_POL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 12(%r14)
LBB0_13:
	cmpl	$0, -44(%rbp)
	je	LBB0_15
## %bb.14:
	movq	_CC_CTRL_NOBT_VS_POL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 12(%r14)
LBB0_15:
	movl	-60(%rbp), %edx
	leal	-128(%rdx), %ecx
	cmpl	$5, %ecx
	jae	LBB0_16
## %bb.17:
	movslq	%ecx, %rcx
	leaq	l_switch.table.omap24xxcam_sensor_if_enable(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	orl	(%rcx), %eax
	movl	%eax, 12(%r14)
	movl	-56(%rbp), %esi
	cmpl	8(%r14), %esi
	je	LBB0_22
## %bb.18:
	testl	%esi, %esi
	je	LBB0_25
## %bb.19:
	movq	_CAM_MCLK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %esi
	cmovgel	%ecx, %esi
	movl	%ecx, %eax
	cltd
	idivl	%esi
	imull	%eax, %esi
	xorl	%edi, %edi
	cmpl	%ecx, %esi
	setl	%dil
	addl	%eax, %edi
	movl	%ecx, %eax
	cltd
	idivl	%edi
	movl	-52(%rbp), %ebx
	cmpl	%ebx, %eax
	setl	%al
	cmpl	$2, %edi
	setge	%dl
	andb	%al, %dl
	movzbl	%dl, %eax
	subl	%eax, %edi
	cmpl	$30, %edi
	movl	$30, %esi
	cmovll	%edi, %esi
	movl	%ecx, %eax
	cltd
	idivl	%esi
	cmpl	%ebx, %eax
	jl	LBB0_25
## %bb.20:
	movl	%eax, %esi
	cmpl	-48(%rbp), %eax
	jg	LBB0_25
## %bb.21:
	movl	%esi, 8(%r14)
LBB0_22:
	movq	%r14, %rdi
	callq	_omap24xxcam_core_xclk_set
	xorl	%ebx, %ebx
	jmp	LBB0_26
LBB0_23:
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_24
LBB0_16:
	movl	4(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
LBB0_24:
	callq	_dev_err
LBB0_25:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_26:
	movl	%ebx, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vidioc_int_g_ifparm failed with %d\n"

	.comm	_CC_CTRL_CC_EN,4,2              ## @CC_CTRL_CC_EN
	.comm	_CC_CTRL_NOBT_SYNCHRO,4,2       ## @CC_CTRL_NOBT_SYNCHRO
	.comm	_CC_CTRL_BT_CORRECT,4,2         ## @CC_CTRL_BT_CORRECT
	.comm	_CC_CTRL_PAR_ORDERCAM,4,2       ## @CC_CTRL_PAR_ORDERCAM
	.comm	_CC_CTRL_PAR_CLK_POL,4,2        ## @CC_CTRL_PAR_CLK_POL
	.comm	_CC_CTRL_NOBT_HS_POL,4,2        ## @CC_CTRL_NOBT_HS_POL
	.comm	_CC_CTRL_NOBT_VS_POL,4,2        ## @CC_CTRL_NOBT_VS_POL
	.comm	_CC_CTRL_PAR_MODE_NOBT8,4,2     ## @CC_CTRL_PAR_MODE_NOBT8
	.comm	_CC_CTRL_PAR_MODE_NOBT10,4,2    ## @CC_CTRL_PAR_MODE_NOBT10
	.comm	_CC_CTRL_PAR_MODE_NOBT12,4,2    ## @CC_CTRL_PAR_MODE_NOBT12
	.comm	_CC_CTRL_PAR_MODE_BT8,4,2       ## @CC_CTRL_PAR_MODE_BT8
	.comm	_CC_CTRL_PAR_MODE_BT10,4,2      ## @CC_CTRL_PAR_MODE_BT10
L_.str.1:                               ## @.str.1
	.asciz	"bt656 interface mode %d not supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CAM_MCLK,4,2                   ## @CAM_MCLK
L_.str.2:                               ## @.str.2
	.asciz	"interface type %d not supported\n"

	.no_dead_strip	_omap24xxcam_sensor_if_enable
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.omap24xxcam_sensor_if_enable
l_switch.table.omap24xxcam_sensor_if_enable:
	.quad	_CC_CTRL_PAR_MODE_NOBT8
	.quad	_CC_CTRL_PAR_MODE_NOBT12
	.quad	_CC_CTRL_PAR_MODE_NOBT10
	.quad	_CC_CTRL_PAR_MODE_BT8
	.quad	_CC_CTRL_PAR_MODE_BT10

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap24xxcam_sensor_if_enable
_omap24xxcam_sensor_if_enable:          ; @omap24xxcam_sensor_if_enable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	ldr	w0, [x0, #16]
	mov	x1, sp
	bl	_vidioc_int_g_ifparm
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_25
LBB0_2:
	ldr	w2, [sp]
	str	w2, [x19]
Lloh2:
	adrp	x8, _CC_CTRL_CC_EN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CC_CTRL_CC_EN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	cmp	w2, #133
	b.ne	LBB0_21
; %bb.3:
	ldr	w9, [sp, #40]
	cbz	w9, LBB0_5
; %bb.4:
Lloh5:
	adrp	x9, _CC_CTRL_NOBT_SYNCHRO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CC_CTRL_NOBT_SYNCHRO@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #12]
LBB0_5:
	ldr	w9, [sp, #36]
	cbz	w9, LBB0_7
; %bb.6:
Lloh8:
	adrp	x9, _CC_CTRL_BT_CORRECT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CC_CTRL_BT_CORRECT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #12]
LBB0_7:
	ldr	w9, [sp, #32]
	cbz	w9, LBB0_9
; %bb.8:
Lloh11:
	adrp	x9, _CC_CTRL_PAR_ORDERCAM@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CC_CTRL_PAR_ORDERCAM@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #12]
LBB0_9:
	ldr	w9, [sp, #28]
	cbz	w9, LBB0_11
; %bb.10:
Lloh14:
	adrp	x9, _CC_CTRL_PAR_CLK_POL@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CC_CTRL_PAR_CLK_POL@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #12]
LBB0_11:
	ldr	w9, [sp, #24]
	cbz	w9, LBB0_13
; %bb.12:
Lloh17:
	adrp	x9, _CC_CTRL_NOBT_HS_POL@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CC_CTRL_NOBT_HS_POL@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #12]
LBB0_13:
	ldr	w9, [sp, #20]
	cbz	w9, LBB0_15
; %bb.14:
Lloh20:
	adrp	x9, _CC_CTRL_NOBT_VS_POL@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CC_CTRL_NOBT_VS_POL@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #12]
LBB0_15:
	ldr	w2, [sp, #4]
	sub	w9, w2, #128
	cmp	w9, #5
	b.hs	LBB0_22
; %bb.16:
Lloh23:
	adrp	x10, l_switch.table.omap24xxcam_sensor_if_enable@PAGE
Lloh24:
	add	x10, x10, l_switch.table.omap24xxcam_sensor_if_enable@PAGEOFF
	ldr	x9, [x10, w9, sxtw #3]
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #12]
	ldr	w1, [sp, #8]
	ldr	w8, [x19, #8]
	cmp	w1, w8
	b.eq	LBB0_20
; %bb.17:
	cbz	w1, LBB0_24
; %bb.18:
Lloh25:
	adrp	x8, _CAM_MCLK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CAM_MCLK@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmp	w1, w8
	csel	w9, w1, w8, lt
	sdiv	w10, w8, w9
	mul	w9, w10, w9
	cmp	w9, w8
	cinc	w9, w10, lt
	sdiv	w10, w8, w9
	ldp	w11, w12, [sp, #12]
	cmp	w10, w11
	ccmp	w9, #1, #4, lt
	cset	w10, gt
	sub	w9, w9, w10
	mov	w10, #30
	cmp	w9, #30
	csel	w9, w9, w10, lt
	sdiv	w1, w8, w9
	cmp	w1, w11
	ccmp	w1, w12, #0, ge
	b.gt	LBB0_24
; %bb.19:
	str	w1, [x19, #8]
LBB0_20:
	mov	x0, x19
	bl	_omap24xxcam_core_xclk_set
	mov	w20, #0
	b	LBB0_25
LBB0_21:
	ldr	w0, [x19, #4]
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_23
LBB0_22:
	ldr	w0, [x19, #4]
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_23:
	bl	_dev_err
LBB0_24:
Lloh32:
	adrp	x8, _EINVAL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_25:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vidioc_int_g_ifparm failed with %d\n"

	.comm	_CC_CTRL_CC_EN,4,2              ; @CC_CTRL_CC_EN
	.comm	_CC_CTRL_NOBT_SYNCHRO,4,2       ; @CC_CTRL_NOBT_SYNCHRO
	.comm	_CC_CTRL_BT_CORRECT,4,2         ; @CC_CTRL_BT_CORRECT
	.comm	_CC_CTRL_PAR_ORDERCAM,4,2       ; @CC_CTRL_PAR_ORDERCAM
	.comm	_CC_CTRL_PAR_CLK_POL,4,2        ; @CC_CTRL_PAR_CLK_POL
	.comm	_CC_CTRL_NOBT_HS_POL,4,2        ; @CC_CTRL_NOBT_HS_POL
	.comm	_CC_CTRL_NOBT_VS_POL,4,2        ; @CC_CTRL_NOBT_VS_POL
	.comm	_CC_CTRL_PAR_MODE_NOBT8,4,2     ; @CC_CTRL_PAR_MODE_NOBT8
	.comm	_CC_CTRL_PAR_MODE_NOBT10,4,2    ; @CC_CTRL_PAR_MODE_NOBT10
	.comm	_CC_CTRL_PAR_MODE_NOBT12,4,2    ; @CC_CTRL_PAR_MODE_NOBT12
	.comm	_CC_CTRL_PAR_MODE_BT8,4,2       ; @CC_CTRL_PAR_MODE_BT8
	.comm	_CC_CTRL_PAR_MODE_BT10,4,2      ; @CC_CTRL_PAR_MODE_BT10
l_.str.1:                               ; @.str.1
	.asciz	"bt656 interface mode %d not supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CAM_MCLK,4,2                   ; @CAM_MCLK
l_.str.2:                               ; @.str.2
	.asciz	"interface type %d not supported\n"

	.no_dead_strip	_omap24xxcam_sensor_if_enable
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.omap24xxcam_sensor_if_enable
l_switch.table.omap24xxcam_sensor_if_enable:
	.quad	_CC_CTRL_PAR_MODE_NOBT8
	.quad	_CC_CTRL_PAR_MODE_NOBT12
	.quad	_CC_CTRL_PAR_MODE_NOBT10
	.quad	_CC_CTRL_PAR_MODE_BT8
	.quad	_CC_CTRL_PAR_MODE_BT10

.subsections_via_symbols
