	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smiapp_update_mode
_smiapp_update_mode:                    ## @smiapp_update_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	40(%rdi), %rdi
	callq	_v4l2_get_subdevdata
	movq	%rax, %r14
	movl	(%rbx), %eax
	movl	4(%rbx), %edx
	cmpl	$1, %eax
	jne	LBB0_2
## %bb.1:
	xorl	%ecx, %ecx
	cmpl	$1, %edx
	je	LBB0_3
LBB0_2:
	shll	$4, %eax
	orl	%eax, %edx
	movq	_SMIAPP_REG_U8_BINNING_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_smiapp_write
	movl	$1, %ecx
	testl	%eax, %eax
	js	LBB0_7
LBB0_3:
	movq	_SMIAPP_REG_U8_BINNING_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%ecx, %edx
	callq	_smiapp_write
	testl	%eax, %eax
	js	LBB0_7
## %bb.4:
	movq	%rbx, %rdi
	callq	_smiapp_get_limits_binning
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	callq	_smiapp_pll_update
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_smiapp_update_blanking
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	movq	24(%rbx), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	movl	32(%rbx), %eax
	movq	16(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	_SMIAPP_PA_PAD_SRC@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	24(%rbx), %rsi
	movl	(%rsi), %esi
	addl	(%rcx,%rdx,8), %esi
	movq	8(%rbx), %rdi
	movl	(%rdi), %edi
	addl	4(%rcx,%rdx,8), %edi
	imull	%esi, %edi
	movslq	%edi, %rcx
	imulq	$1374389535, %rcx, %rcx         ## imm = 0x51EB851F
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$37, %rcx
	addl	%edx, %ecx
	cltd
	idivl	%ecx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMIAPP_REG_U8_BINNING_TYPE,4,2 ## @SMIAPP_REG_U8_BINNING_TYPE
	.comm	_SMIAPP_REG_U8_BINNING_MODE,4,2 ## @SMIAPP_REG_U8_BINNING_MODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vblank\t\t%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"hblank\t\t%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"real timeperframe\t100/%d\n"

	.comm	_SMIAPP_PA_PAD_SRC,8,3          ## @SMIAPP_PA_PAD_SRC
	.no_dead_strip	_smiapp_update_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smiapp_update_mode
_smiapp_update_mode:                    ; @smiapp_update_mode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	ldr	x0, [x0, #40]
	bl	_v4l2_get_subdevdata
	mov	x19, x0
	ldp	w8, w9, [x20]
	cmp	w8, #1
	ccmp	w9, #1, #0, eq
	b.eq	LBB0_3
; %bb.1:
	orr	w2, w9, w8, lsl #4
Lloh0:
	adrp	x8, _SMIAPP_REG_U8_BINNING_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMIAPP_REG_U8_BINNING_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_smiapp_write
	tbnz	w0, #31, LBB0_8
; %bb.2:
	mov	w2, #1
	b	LBB0_4
LBB0_3:
	mov	w2, #0
LBB0_4:
Lloh3:
	adrp	x8, _SMIAPP_REG_U8_BINNING_MODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMIAPP_REG_U8_BINNING_MODE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_smiapp_write
	tbnz	w0, #31, LBB0_8
; %bb.5:
	mov	x0, x20
	bl	_smiapp_get_limits_binning
	tbnz	w0, #31, LBB0_8
; %bb.6:
	mov	x0, x20
	bl	_smiapp_pll_update
	tbnz	w0, #31, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_smiapp_update_blanking
	ldr	x8, [x20, #8]
	ldr	w2, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	x8, [x20, #24]
	ldr	w2, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	w8, [x20, #32]
	ldp	x10, x9, [x20, #8]
	ldr	x9, [x9]
Lloh10:
	adrp	x11, _SMIAPP_PA_PAD_SRC@GOTPAGE
Lloh11:
	ldr	x11, [x11, _SMIAPP_PA_PAD_SRC@GOTPAGEOFF]
Lloh12:
	ldr	x11, [x11]
	add	x9, x9, x11, lsl #3
	ldr	x11, [x20, #24]
	ldr	w11, [x11]
	ldp	w12, w9, [x9]
	add	w11, w11, w12
	ldr	w10, [x10]
	add	w9, w10, w9
	mul	w9, w9, w11
	mov	w10, #34079
	movk	w10, #20971, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #32
	lsr	x9, x9, #63
	add	w9, w9, w10, asr #5
	sdiv	w2, w8, w9
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SMIAPP_REG_U8_BINNING_TYPE,4,2 ; @SMIAPP_REG_U8_BINNING_TYPE
	.comm	_SMIAPP_REG_U8_BINNING_MODE,4,2 ; @SMIAPP_REG_U8_BINNING_MODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vblank\t\t%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"hblank\t\t%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"real timeperframe\t100/%d\n"

	.comm	_SMIAPP_PA_PAD_SRC,8,3          ; @SMIAPP_PA_PAD_SRC
	.no_dead_strip	_smiapp_update_mode
.subsections_via_symbols
