	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov5640_get_light_freq
_ov5640_get_light_freq:                 ## @ov5640_get_light_freq
	.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
	movq	%rdi, %rbx
	movq	_OV5640_REG_HZ5060_CTRL01@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-16(%rbp), %rdx
	callq	_ov5640_read_reg
	testl	%eax, %eax
	je	LBB0_1
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	testb	$-128, -16(%rbp)
	jne	LBB0_2
## %bb.4:
	movq	_OV5640_REG_SIGMADELTA_CTRL0C@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ov5640_read_reg
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movl	-12(%rbp), %eax
	andl	$1, %eax
	negl	%eax
	andl	$50, %eax
	jmp	LBB0_6
LBB0_2:
	movq	_OV5640_REG_HZ5060_CTRL00@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ov5640_read_reg
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	testb	$4, -12(%rbp)
	movl	$60, %ecx
	movl	$50, %eax
	cmovel	%ecx, %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_OV5640_REG_HZ5060_CTRL01,4,2   ## @OV5640_REG_HZ5060_CTRL01
	.comm	_OV5640_REG_HZ5060_CTRL00,4,2   ## @OV5640_REG_HZ5060_CTRL00
	.comm	_OV5640_REG_SIGMADELTA_CTRL0C,4,2 ## @OV5640_REG_SIGMADELTA_CTRL0C
	.no_dead_strip	_ov5640_get_light_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov5640_get_light_freq
_ov5640_get_light_freq:                 ; @ov5640_get_light_freq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _OV5640_REG_HZ5060_CTRL01@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OV5640_REG_HZ5060_CTRL01@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_ov5640_read_reg
	cbz	w0, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_2:
	ldrb	w8, [sp, #12]
	tbnz	w8, #7, LBB0_5
; %bb.3:
Lloh3:
	adrp	x8, _OV5640_REG_SIGMADELTA_CTRL0C@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OV5640_REG_SIGMADELTA_CTRL0C@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ov5640_read_reg
	cbnz	w0, LBB0_1
; %bb.4:
	ldrb	w8, [sp, #8]
	sbfx	w8, w8, #0, #1
	mov	w9, #50
	and	w0, w8, w9
	b	LBB0_1
LBB0_5:
Lloh6:
	adrp	x8, _OV5640_REG_HZ5060_CTRL00@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OV5640_REG_HZ5060_CTRL00@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ov5640_read_reg
	cbnz	w0, LBB0_1
; %bb.6:
	ldrb	w8, [sp, #8]
	tst	w8, #0x4
	mov	w8, #50
	mov	w9, #60
	csel	w0, w9, w8, eq
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_OV5640_REG_HZ5060_CTRL01,4,2   ; @OV5640_REG_HZ5060_CTRL01
	.comm	_OV5640_REG_HZ5060_CTRL00,4,2   ; @OV5640_REG_HZ5060_CTRL00
	.comm	_OV5640_REG_SIGMADELTA_CTRL0C,4,2 ; @OV5640_REG_SIGMADELTA_CTRL0C
	.no_dead_strip	_ov5640_get_light_freq
.subsections_via_symbols
