	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov51x_reset
_ov51x_reset:                           ## @ov51x_reset
	.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
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_BCL_OV518@GOTPCREL(%rip), %rcx
	movl	%esi, %edx
	andb	$-2, %dl
	cmpq	(%rcx), %rax
	movzbl	%dl, %eax
	cmovnel	%esi, %eax
	movzbl	%al, %ebx
	leaq	L_.str(%rip), %rsi
	movl	$4, %edi
	movl	%ebx, %edx
	callq	_PDEBUG
	movq	_R51x_SYS_RESET@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_reg_w
	movl	(%r15), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_reg_w
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_err
LBB0_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BCL_OV518,8,3                  ## @BCL_OV518
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reset: type=0x%02X"

	.comm	_R51x_SYS_RESET,4,2             ## @R51x_SYS_RESET
L_.str.1:                               ## @.str.1
	.asciz	"reset: command failed"

	.no_dead_strip	_ov51x_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov51x_reset
_ov51x_reset:                           ; @ov51x_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _BCL_OV518@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BCL_OV518@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	and	w10, w1, #0xfe
	cmp	x8, x9
	csel	w20, w10, w1, eq
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #4
	mov	x2, x20
	bl	_PDEBUG
Lloh5:
	adrp	x21, _R51x_SYS_RESET@GOTPAGE
Lloh6:
	ldr	x21, [x21, _R51x_SYS_RESET@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_reg_w
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_reg_w
	mov	x19, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_err
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_BCL_OV518,8,3                  ; @BCL_OV518
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reset: type=0x%02X"

	.comm	_R51x_SYS_RESET,4,2             ; @R51x_SYS_RESET
l_.str.1:                               ; @.str.1
	.asciz	"reset: command failed"

	.no_dead_strip	_ov51x_reset
.subsections_via_symbols
