	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ov518_configure
LCPI0_0:
	.long	225                             ## 0xe1
	.long	70                              ## 0x46
	.long	0                               ## 0x0
	.long	93                              ## 0x5d
LCPI0_1:
	.long	1                               ## 0x1
	.long	49                              ## 0x31
	.long	15                              ## 0xf
	.long	93                              ## 0x5d
LCPI0_2:
	.long	3                               ## 0x3
	.long	36                              ## 0x24
	.long	159                             ## 0x9f
	.long	37                              ## 0x25
LCPI0_3:
	.long	144                             ## 0x90
	.long	32                              ## 0x20
	.long	0                               ## 0x0
	.long	81                              ## 0x51
LCPI0_4:
	.long	4                               ## 0x4
	.long	113                             ## 0x71
	.long	25                              ## 0x19
	.long	47                              ## 0x2f
LCPI0_5:
	.long	144                             ## 0x90
	.long	32                              ## 0x20
	.long	96                              ## 0x60
	.long	81                              ## 0x51
LCPI0_6:
	.long	2                               ## 0x2
	.long	113                             ## 0x71
	.long	25                              ## 0x19
	.long	64                              ## 0x40
LCPI0_7:
	.long	255                             ## 0xff
	.long	65                              ## 0x41
	.long	66                              ## 0x42
	.long	70                              ## 0x46
LCPI0_8:
	.long	0                               ## 0x0
	.long	51                              ## 0x33
	.long	4                               ## 0x4
	.long	33                              ## 0x21
LCPI0_9:
	.long	25                              ## 0x19
	.long	63                              ## 0x3f
	.long	16                              ## 0x10
	.long	47                              ## 0x2f
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_ov518_configure:                       ## @ov518_configure
	.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
	subq	$288, %rsp                      ## imm = 0x120
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_R51x_SYS_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movl	$64, -92(%rbp)
	movq	_R51x_SYS_INIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -88(%rbp)
	movl	$225, -84(%rbp)
	movl	%eax, -80(%rbp)
	movl	$62, -76(%rbp)
	movl	%ecx, -72(%rbp)
	movl	$225, -68(%rbp)
	movl	%eax, -64(%rbp)
	movl	$0, -60(%rbp)
	movl	%ecx, -56(%rbp)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [225,70,0,93]
	movups	%xmm0, -52(%rbp)
	movl	$3, -36(%rbp)
	movq	_R51x_SYS_SNAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -176(%rbp)
	movl	$2, -172(%rbp)
	movl	%eax, -168(%rbp)
	movaps	LCPI0_1(%rip), %xmm0            ## xmm0 = [1,49,15,93]
	movups	%xmm0, -164(%rbp)
	movaps	LCPI0_2(%rip), %xmm1            ## xmm1 = [3,36,159,37]
	movups	%xmm1, -148(%rbp)
	movaps	LCPI0_3(%rip), %xmm2            ## xmm2 = [144,32,0,81]
	movups	%xmm2, -132(%rbp)
	movaps	LCPI0_4(%rip), %xmm2            ## xmm2 = [4,113,25,47]
	movups	%xmm2, -116(%rbp)
	movl	$128, -100(%rbp)
	movl	%eax, -304(%rbp)
	movl	$2, -300(%rbp)
	movl	%eax, -296(%rbp)
	movups	%xmm0, -292(%rbp)
	movups	%xmm1, -276(%rbp)
	movaps	LCPI0_5(%rip), %xmm0            ## xmm0 = [144,32,96,81]
	movups	%xmm0, -260(%rbp)
	movaps	LCPI0_6(%rip), %xmm0            ## xmm0 = [2,113,25,64]
	movups	%xmm0, -244(%rbp)
	movaps	LCPI0_7(%rip), %xmm0            ## xmm0 = [255,65,66,70]
	movups	%xmm0, -228(%rbp)
	movaps	LCPI0_8(%rip), %xmm0            ## xmm0 = [0,51,4,33]
	movups	%xmm0, -212(%rbp)
	movaps	LCPI0_9(%rip), %xmm0            ## xmm0 = [25,63,16,47]
	movups	%xmm0, -196(%rbp)
	movl	$128, -180(%rbp)
	movq	_D_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_R51x_SYS_CUST_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_reg_r
	andl	$31, %eax
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_PDEBUG
	leaq	-96(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_write_regvals
	movq	_R518_GPIO_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	movl	$2, %ecx
	callq	_reg_w_mask
	movl	(%r14), %eax
	cmpl	$128, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_5
## %bb.2:
	leaq	-176(%rbp), %rbx
	jmp	LBB0_4
LBB0_3:
	leaq	-304(%rbp), %rbx
LBB0_4:
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_write_regvals
LBB0_5:
	movq	%r14, %rdi
	callq	_ov51x_upload_quan_tables
	movq	%r14, %rdi
	movl	$47, %esi
	movl	$128, %edx
	callq	_reg_w
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	addq	$288, %rsp                      ## imm = 0x120
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_R51x_SYS_RESET,4,2             ## @R51x_SYS_RESET
	.comm	_R51x_SYS_INIT,4,2              ## @R51x_SYS_INIT
	.comm	_R51x_SYS_SNAP,4,2              ## @R51x_SYS_SNAP
	.comm	_D_PROBE,4,2                    ## @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Device revision %d"

	.comm	_R51x_SYS_CUST_ID,4,2           ## @R51x_SYS_CUST_ID
	.comm	_R518_GPIO_CTL,4,2              ## @R518_GPIO_CTL
	.no_dead_strip	_ov518_configure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function ov518_configure
lCPI0_0:
	.long	225                             ; 0xe1
	.long	70                              ; 0x46
	.long	0                               ; 0x0
	.long	93                              ; 0x5d
lCPI0_1:
	.long	1                               ; 0x1
	.long	49                              ; 0x31
	.long	15                              ; 0xf
	.long	93                              ; 0x5d
lCPI0_2:
	.long	3                               ; 0x3
	.long	36                              ; 0x24
	.long	159                             ; 0x9f
	.long	37                              ; 0x25
lCPI0_3:
	.long	144                             ; 0x90
	.long	32                              ; 0x20
	.long	0                               ; 0x0
	.long	81                              ; 0x51
lCPI0_4:
	.long	4                               ; 0x4
	.long	113                             ; 0x71
	.long	25                              ; 0x19
	.long	47                              ; 0x2f
lCPI0_5:
	.long	144                             ; 0x90
	.long	32                              ; 0x20
	.long	96                              ; 0x60
	.long	81                              ; 0x51
lCPI0_6:
	.long	2                               ; 0x2
	.long	113                             ; 0x71
	.long	25                              ; 0x19
	.long	64                              ; 0x40
lCPI0_7:
	.long	255                             ; 0xff
	.long	65                              ; 0x41
	.long	66                              ; 0x42
	.long	70                              ; 0x46
lCPI0_8:
	.long	0                               ; 0x0
	.long	51                              ; 0x33
	.long	4                               ; 0x4
	.long	33                              ; 0x21
lCPI0_9:
	.long	25                              ; 0x19
	.long	63                              ; 0x3f
	.long	16                              ; 0x10
	.long	47                              ; 0x2f
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ov518_configure:                       ; @ov518_configure
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #336
	.cfi_def_cfa_offset 336
	stp	x28, x27, [sp, #288]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #304]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #320]            ; 16-byte Folded Spill
	add	x29, sp, #320
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w27, -40
	.cfi_offset w28, -48
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _R51x_SYS_RESET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _R51x_SYS_RESET@GOTPAGEOFF]
	add	x9, sp, #136
Lloh5:
	ldr	w8, [x8]
	mov	w10, #64
Lloh6:
	adrp	x11, _R51x_SYS_INIT@GOTPAGE
Lloh7:
	ldr	x11, [x11, _R51x_SYS_INIT@GOTPAGEOFF]
	stp	w8, w10, [x29, #-104]
Lloh8:
	ldr	w10, [x11]
	mov	w11, #225
	stp	w10, w11, [x29, #-96]
	mov	w12, #62
	stp	w8, w12, [x29, #-88]
	stp	w10, w11, [x29, #-80]
	stp	w8, wzr, [x29, #-72]
Lloh9:
	adrp	x8, lCPI0_0@PAGE
Lloh10:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	stur	q0, [x9, #124]
	mov	w8, #3
	stur	w10, [x29, #-64]
	stur	w8, [x29, #-44]
Lloh11:
	adrp	x8, _R51x_SYS_SNAP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _R51x_SYS_SNAP@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	mov	w10, #2
	stp	w8, w10, [sp, #136]
Lloh14:
	adrp	x11, lCPI0_1@PAGE
Lloh15:
	ldr	q0, [x11, lCPI0_1@PAGEOFF]
	stur	q0, [x9, #12]
Lloh16:
	adrp	x11, lCPI0_2@PAGE
Lloh17:
	ldr	q1, [x11, lCPI0_2@PAGEOFF]
	stur	q1, [x9, #28]
Lloh18:
	adrp	x11, lCPI0_3@PAGE
Lloh19:
	ldr	q2, [x11, lCPI0_3@PAGEOFF]
	stur	q2, [x9, #44]
Lloh20:
	adrp	x11, lCPI0_4@PAGE
Lloh21:
	ldr	q2, [x11, lCPI0_4@PAGEOFF]
	stur	q2, [x9, #60]
	mov	w9, #128
	str	w8, [sp, #144]
	str	w9, [sp, #212]
	stp	w8, w10, [sp, #8]
	str	w8, [sp, #16]
	stur	q0, [sp, #20]
	stur	q1, [sp, #36]
Lloh22:
	adrp	x8, lCPI0_5@PAGE
Lloh23:
	ldr	q0, [x8, lCPI0_5@PAGEOFF]
	stur	q0, [sp, #52]
Lloh24:
	adrp	x8, lCPI0_6@PAGE
Lloh25:
	ldr	q0, [x8, lCPI0_6@PAGEOFF]
	stur	q0, [sp, #68]
Lloh26:
	adrp	x8, lCPI0_7@PAGE
Lloh27:
	ldr	q0, [x8, lCPI0_7@PAGEOFF]
	stur	q0, [sp, #84]
Lloh28:
	adrp	x8, lCPI0_8@PAGE
Lloh29:
	ldr	q0, [x8, lCPI0_8@PAGEOFF]
	stur	q0, [sp, #100]
Lloh30:
	adrp	x8, lCPI0_9@PAGE
Lloh31:
	ldr	q0, [x8, lCPI0_9@PAGEOFF]
	stur	q0, [sp, #116]
	str	w9, [sp, #132]
Lloh32:
	adrp	x8, _D_PROBE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _D_PROBE@GOTPAGEOFF]
Lloh34:
	ldr	w20, [x8]
Lloh35:
	adrp	x8, _R51x_SYS_CUST_ID@GOTPAGE
Lloh36:
	ldr	x8, [x8, _R51x_SYS_CUST_ID@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	bl	_reg_r
	and	w2, w0, #0x1f
Lloh38:
	adrp	x1, l_.str@PAGE
Lloh39:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_PDEBUG
	sub	x0, x29, #104
	bl	_ARRAY_SIZE
	mov	x2, x0
	sub	x1, x29, #104
	mov	x0, x19
	bl	_write_regvals
Lloh40:
	adrp	x8, _R518_GPIO_CTL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _R518_GPIO_CTL@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #2
	bl	_reg_w_mask
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_5
; %bb.2:
	add	x20, sp, #136
	b	LBB0_4
LBB0_3:
	add	x20, sp, #8
LBB0_4:
	mov	x0, x20
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_write_regvals
LBB0_5:
	mov	x0, x19
	bl	_ov51x_upload_quan_tables
	mov	x0, x19
	mov	w1, #47
	mov	w2, #128
	bl	_reg_w
	ldur	x8, [x29, #-40]
Lloh43:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh44:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #320]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #304]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #288]            ; 16-byte Folded Reload
	add	sp, sp, #336
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdrp	Lloh30, Lloh32
	.loh AdrpLdr	Lloh30, Lloh31
	.loh AdrpAdrp	Lloh28, Lloh30
	.loh AdrpLdr	Lloh28, Lloh29
	.loh AdrpAdrp	Lloh26, Lloh28
	.loh AdrpLdr	Lloh26, Lloh27
	.loh AdrpAdrp	Lloh24, Lloh26
	.loh AdrpLdr	Lloh24, Lloh25
	.loh AdrpAdrp	Lloh22, Lloh24
	.loh AdrpLdr	Lloh22, Lloh23
	.loh AdrpLdr	Lloh20, Lloh21
	.loh AdrpAdrp	Lloh18, Lloh20
	.loh AdrpLdr	Lloh18, Lloh19
	.loh AdrpAdrp	Lloh16, Lloh18
	.loh AdrpLdr	Lloh16, Lloh17
	.loh AdrpAdrp	Lloh14, Lloh16
	.loh AdrpLdr	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdr	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_R51x_SYS_RESET,4,2             ; @R51x_SYS_RESET
	.comm	_R51x_SYS_INIT,4,2              ; @R51x_SYS_INIT
	.comm	_R51x_SYS_SNAP,4,2              ; @R51x_SYS_SNAP
	.comm	_D_PROBE,4,2                    ; @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Device revision %d"

	.comm	_R51x_SYS_CUST_ID,4,2           ; @R51x_SYS_CUST_ID
	.comm	_R518_GPIO_CTL,4,2              ; @R518_GPIO_CTL
	.no_dead_strip	_ov518_configure
.subsections_via_symbols
