	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov51x_restart
_ov51x_restart:                         ## @ov51x_restart
	.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
	cmpq	$0, 8(%rdi)
	je	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	movl	$4, %edi
	callq	_PDEBUG
	movq	$0, 8(%rbx)
	movq	(%rbx), %rax
	movq	_BCL_OV518@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	movl	$47, %esi
	movl	$128, %edx
	callq	_reg_w
LBB0_3:
	movq	_R51x_SYS_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_reg_w                          ## TAILCALL
LBB0_4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"restarting"

	.comm	_BCL_OV518,8,3                  ## @BCL_OV518
	.comm	_R51x_SYS_RESET,4,2             ## @R51x_SYS_RESET
	.no_dead_strip	_ov51x_restart
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov51x_restart
_ov51x_restart:                         ; @ov51x_restart
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #4
	bl	_PDEBUG
	str	xzr, [x19, #8]
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _BCL_OV518@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BCL_OV518@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w1, #47
	mov	w2, #128
	bl	_reg_w
LBB0_3:
Lloh5:
	adrp	x8, _R51x_SYS_RESET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _R51x_SYS_RESET@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_reg_w
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"restarting"

	.comm	_BCL_OV518,8,3                  ; @BCL_OV518
	.comm	_R51x_SYS_RESET,4,2             ; @R51x_SYS_RESET
	.no_dead_strip	_ov51x_restart
.subsections_via_symbols
