	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov965x_set_banding_filter
_ov965x_set_banding_filter:             ## @ov965x_set_banding_filter
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_REG_COM8@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-32(%rbp), %rdx
	callq	_ov965x_read
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	_V4L2_CID_POWER_LINE_FREQUENCY_DISABLED@GOTPCREL(%rip), %rax
	movq	_COM8_BFILT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	cmpl	%ebx, (%rax)
	jne	LBB0_3
## %bb.2:
	notq	%rdx
	andq	-32(%rbp), %rdx
	jmp	LBB0_4
LBB0_3:
	orq	-32(%rbp), %rdx
LBB0_4:
	movq	%rdx, -32(%rbp)
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_ov965x_write
LBB0_5:
	movq	_V4L2_CID_POWER_LINE_FREQUENCY_DISABLED@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	%ebx, (%rcx)
	je	LBB0_15
## %bb.6:
	xorl	%edi, %edi
	cmpq	$0, (%r14)
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_15
LBB0_8:
	movq	_V4L2_CID_POWER_LINE_FREQUENCY_50HZ@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	movl	$100, %eax
	movl	$120, %ecx
	cmoveq	%rax, %rcx
	movq	(%r14), %rax
	movq	8(%r14), %rdx
	movq	(%rax), %rdi
	imulq	(%rdx), %rdi
	movq	8(%rax), %rsi
	imulq	$1000, %rdi, %rax               ## imm = 0x3E8
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_9
## %bb.10:
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_11
LBB0_9:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
LBB0_11:
	movq	%rax, %rdx
	shrq	$32, %rdx
	je	LBB0_12
## %bb.13:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_14
LBB0_12:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_14:
	addq	$500, %rax                      ## imm = 0x1F4
	shrq	$3, %rax
	movabsq	$2361183241434822607, %rcx      ## imm = 0x20C49BA5E353F7CF
	mulq	%rcx
	shrq	$4, %rdx
	movq	_REG_MBD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ov965x_write
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_COM8,4,2                   ## @REG_COM8
	.comm	_V4L2_CID_POWER_LINE_FREQUENCY_DISABLED,4,2 ## @V4L2_CID_POWER_LINE_FREQUENCY_DISABLED
	.comm	_COM8_BFILT,8,3                 ## @COM8_BFILT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_CID_POWER_LINE_FREQUENCY_50HZ,4,2 ## @V4L2_CID_POWER_LINE_FREQUENCY_50HZ
	.comm	_REG_MBD,4,2                    ## @REG_MBD
	.no_dead_strip	_ov965x_set_banding_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov965x_set_banding_filter
_ov965x_set_banding_filter:             ; @ov965x_set_banding_filter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x21, _REG_COM8@GOTPAGE
Lloh1:
	ldr	x21, [x21, _REG_COM8@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #8
	bl	_ov965x_read
Lloh2:
	adrp	x22, _V4L2_CID_POWER_LINE_FREQUENCY_DISABLED@GOTPAGE
Lloh3:
	ldr	x22, [x22, _V4L2_CID_POWER_LINE_FREQUENCY_DISABLED@GOTPAGEOFF]
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w9, [x22]
Lloh4:
	adrp	x8, _COM8_BFILT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _COM8_BFILT@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	w9, w20
	b.ne	LBB0_3
; %bb.2:
	ldr	x9, [sp, #8]
	bic	x2, x9, x8
	b	LBB0_4
LBB0_3:
	ldr	x9, [sp, #8]
	orr	x2, x9, x8
LBB0_4:
	str	x2, [sp, #8]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_ov965x_write
LBB0_5:
	ldr	w8, [x22]
	cmp	w8, w20
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #0
	b	LBB0_10
LBB0_7:
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_9
; %bb.8:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
Lloh10:
	adrp	x8, _V4L2_CID_POWER_LINE_FREQUENCY_50HZ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _V4L2_CID_POWER_LINE_FREQUENCY_50HZ@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, w20
	mov	w8, #120
	mov	w9, #100
	csel	x8, x9, x8, eq
	ldp	x9, x10, [x19]
	ldr	x10, [x10]
	ldp	x11, x9, [x9]
	mul	x10, x11, x10
	mov	w11, #1000
	mul	x10, x10, x11
	udiv	x9, x10, x9
	udiv	x8, x9, x8
	add	x8, x8, #500
	lsr	x8, x8, #3
	mov	x9, #63439
	movk	x9, #58195, lsl #16
	movk	x9, #39845, lsl #32
	movk	x9, #8388, lsl #48
	umulh	x8, x8, x9
	lsr	x2, x8, #4
Lloh13:
	adrp	x8, _REG_MBD@GOTPAGE
Lloh14:
	ldr	x8, [x8, _REG_MBD@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ov965x_write
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_COM8,4,2                   ; @REG_COM8
	.comm	_V4L2_CID_POWER_LINE_FREQUENCY_DISABLED,4,2 ; @V4L2_CID_POWER_LINE_FREQUENCY_DISABLED
	.comm	_COM8_BFILT,8,3                 ; @COM8_BFILT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_CID_POWER_LINE_FREQUENCY_50HZ,4,2 ; @V4L2_CID_POWER_LINE_FREQUENCY_50HZ
	.comm	_REG_MBD,4,2                    ; @REG_MBD
	.no_dead_strip	_ov965x_set_banding_filter
.subsections_via_symbols
