	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function saa7111a_configure
LCPI0_0:
	.long	320                             ## 0x140
	.long	240                             ## 0xf0
	.long	1                               ## 0x1
	.long	8                               ## 0x8
LCPI0_1:
	.long	32768                           ## 0x8000
	.long	32768                           ## 0x8000
	.long	32768                           ## 0x8000
	.long	32768                           ## 0x8000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_saa7111a_configure:                    ## @saa7111a_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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	cmpq	$0, 80(%rdi)
	movl	$640, %eax                      ## imm = 0x280
	movl	$320, %ecx                      ## imm = 0x140
	cmovel	%eax, %ecx
	movl	$480, %eax                      ## imm = 0x1E0
	movl	$240, %edx
	cmovel	%eax, %edx
	movl	%ecx, (%rdi)
	movl	%edx, 4(%rdi)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [320,240,1,8]
	movups	%xmm0, 8(%rdi)
	movq	_VIDEO_MODE_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%rdi)
	movq	$0, 64(%rdi)
	movaps	LCPI0_1(%rip), %xmm0            ## xmm0 = [32768,32768,32768,32768]
	movups	%xmm0, 24(%rdi)
	leaq	L_.str(%rip), %rsi
	movl	$4, %edi
	callq	_PDEBUG
	leaq	_saa7111a_configure.aRegvalsNormSAA7111A(%rip), %rsi
	movq	%rbx, %rdi
	callq	_write_regvals
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_1
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_i2c_r
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	48(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_info
	movq	_SEN_SAA7111A@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	movq	40(%rbx), %rax
	movq	_BCL_OV511@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movl	$17, %esi
	xorl	%edx, %edx
	callq	_reg_w
	jmp	LBB0_6
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	callq	_err
	jmp	LBB0_6
LBB0_5:
	movq	48(%rbx), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_warn
	xorl	%r14d, %r14d
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	4                               ## @saa7111a_configure.aRegvalsNormSAA7111A
_saa7111a_configure.aRegvalsNormSAA7111A:
	.long	128                             ## 0x80
	.long	6                               ## 0x6
	.long	206                             ## 0xce
	.long	128                             ## 0x80
	.long	7                               ## 0x7
	.long	0                               ## 0x0
	.long	128                             ## 0x80
	.long	16                              ## 0x10
	.long	68                              ## 0x44
	.long	128                             ## 0x80
	.long	14                              ## 0xe
	.long	1                               ## 0x1
	.long	128                             ## 0x80
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	128                             ## 0x80
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	128                             ## 0x80
	.long	3                               ## 0x3
	.long	35                              ## 0x23
	.long	128                             ## 0x80
	.long	4                               ## 0x4
	.long	0                               ## 0x0
	.long	128                             ## 0x80
	.long	5                               ## 0x5
	.long	0                               ## 0x0
	.long	128                             ## 0x80
	.long	8                               ## 0x8
	.long	200                             ## 0xc8
	.long	128                             ## 0x80
	.long	9                               ## 0x9
	.long	1                               ## 0x1
	.long	128                             ## 0x80
	.long	10                              ## 0xa
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.long	11                              ## 0xb
	.long	64                              ## 0x40
	.long	128                             ## 0x80
	.long	12                              ## 0xc
	.long	64                              ## 0x40
	.long	128                             ## 0x80
	.long	13                              ## 0xd
	.long	0                               ## 0x0
	.long	128                             ## 0x80
	.long	15                              ## 0xf
	.long	0                               ## 0x0
	.long	128                             ## 0x80
	.long	17                              ## 0x11
	.long	12                              ## 0xc
	.long	128                             ## 0x80
	.long	18                              ## 0x12
	.long	0                               ## 0x0
	.long	128                             ## 0x80
	.long	19                              ## 0x13
	.long	0                               ## 0x0
	.long	128                             ## 0x80
	.long	20                              ## 0x14
	.long	0                               ## 0x0
	.long	128                             ## 0x80
	.long	21                              ## 0x15
	.long	0                               ## 0x0
	.long	128                             ## 0x80
	.long	22                              ## 0x16
	.long	0                               ## 0x0
	.long	128                             ## 0x80
	.long	23                              ## 0x17
	.long	0                               ## 0x0
	.long	128                             ## 0x80
	.long	2                               ## 0x2
	.long	192                             ## 0xc0
	.long	129                             ## 0x81
	.long	0                               ## 0x0
	.long	0                               ## 0x0

	.comm	_VIDEO_MODE_AUTO,4,2            ## @VIDEO_MODE_AUTO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Writing SAA7111A registers"

L_.str.1:                               ## @.str.1
	.asciz	"Error detecting sensor version"

L_.str.2:                               ## @.str.2
	.asciz	"Sensor is an SAA7111A (version 0x%x)\n"

	.comm	_SEN_SAA7111A,4,2               ## @SEN_SAA7111A
	.comm	_BCL_OV511,8,3                  ## @BCL_OV511
L_.str.3:                               ## @.str.3
	.asciz	"SAA7111A not yet supported with OV518/OV518+\n"

	.no_dead_strip	_saa7111a_configure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function saa7111a_configure
lCPI0_0:
	.long	320                             ; 0x140
	.long	240                             ; 0xf0
lCPI0_1:
	.long	640                             ; 0x280
	.long	480                             ; 0x1e0
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
lCPI0_2:
	.long	320                             ; 0x140
	.long	240                             ; 0xf0
	.long	1                               ; 0x1
	.long	8                               ; 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_saa7111a_configure:                    ; @saa7111a_configure
	.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
	mov	x19, x0
	ldr	x8, [x0, #80]
	cmp	x8, #0
	cset	w8, eq
	dup.2s	v0, w8
	shl.2s	v0, v0, #31
	cmlt.2s	v0, v0, #0
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d1, [x8, lCPI0_0@PAGEOFF]
Lloh2:
	adrp	x8, lCPI0_1@PAGE
Lloh3:
	ldr	d2, [x8, lCPI0_1@PAGEOFF]
	bsl.8b	v0, v2, v1
	str	d0, [x0]
Lloh4:
	adrp	x8, lCPI0_2@PAGE
Lloh5:
	ldr	q0, [x8, lCPI0_2@PAGEOFF]
Lloh6:
	adrp	x8, _VIDEO_MODE_AUTO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VIDEO_MODE_AUTO@GOTPAGEOFF]
	stur	q0, [x0, #8]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x0, #72]
	str	xzr, [x0, #64]
	movi.4s	v0, #128, lsl #8
	stur	q0, [x0, #24]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #4
	bl	_PDEBUG
Lloh11:
	adrp	x1, _saa7111a_configure.aRegvalsNormSAA7111A@PAGE
Lloh12:
	add	x1, x1, _saa7111a_configure.aRegvalsNormSAA7111A@PAGEOFF
	mov	x0, x19
	bl	_write_regvals
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_8
LBB0_2:
	mov	x0, x19
	mov	w1, #0
	bl	_i2c_r
	tbnz	w0, #31, LBB0_5
; %bb.3:
	mov	x2, x0
	ldr	x0, [x19, #48]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_info
Lloh15:
	adrp	x8, _SEN_SAA7111A@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SEN_SAA7111A@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x19, #56]
	ldr	x8, [x19, #40]
Lloh18:
	adrp	x9, _BCL_OV511@GOTPAGE
Lloh19:
	ldr	x9, [x9, _BCL_OV511@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x19
	mov	w1, #17
	mov	w2, #0
	bl	_reg_w
	b	LBB0_7
LBB0_5:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_err
	mov	w0, #-1
	b	LBB0_8
LBB0_6:
	ldr	x0, [x19, #48]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_warn
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdrp	Lloh4, Lloh6
	.loh AdrpLdr	Lloh4, Lloh5
	.loh AdrpAdrp	Lloh2, Lloh4
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @saa7111a_configure.aRegvalsNormSAA7111A
_saa7111a_configure.aRegvalsNormSAA7111A:
	.long	128                             ; 0x80
	.long	6                               ; 0x6
	.long	206                             ; 0xce
	.long	128                             ; 0x80
	.long	7                               ; 0x7
	.long	0                               ; 0x0
	.long	128                             ; 0x80
	.long	16                              ; 0x10
	.long	68                              ; 0x44
	.long	128                             ; 0x80
	.long	14                              ; 0xe
	.long	1                               ; 0x1
	.long	128                             ; 0x80
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	128                             ; 0x80
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	128                             ; 0x80
	.long	3                               ; 0x3
	.long	35                              ; 0x23
	.long	128                             ; 0x80
	.long	4                               ; 0x4
	.long	0                               ; 0x0
	.long	128                             ; 0x80
	.long	5                               ; 0x5
	.long	0                               ; 0x0
	.long	128                             ; 0x80
	.long	8                               ; 0x8
	.long	200                             ; 0xc8
	.long	128                             ; 0x80
	.long	9                               ; 0x9
	.long	1                               ; 0x1
	.long	128                             ; 0x80
	.long	10                              ; 0xa
	.long	128                             ; 0x80
	.long	128                             ; 0x80
	.long	11                              ; 0xb
	.long	64                              ; 0x40
	.long	128                             ; 0x80
	.long	12                              ; 0xc
	.long	64                              ; 0x40
	.long	128                             ; 0x80
	.long	13                              ; 0xd
	.long	0                               ; 0x0
	.long	128                             ; 0x80
	.long	15                              ; 0xf
	.long	0                               ; 0x0
	.long	128                             ; 0x80
	.long	17                              ; 0x11
	.long	12                              ; 0xc
	.long	128                             ; 0x80
	.long	18                              ; 0x12
	.long	0                               ; 0x0
	.long	128                             ; 0x80
	.long	19                              ; 0x13
	.long	0                               ; 0x0
	.long	128                             ; 0x80
	.long	20                              ; 0x14
	.long	0                               ; 0x0
	.long	128                             ; 0x80
	.long	21                              ; 0x15
	.long	0                               ; 0x0
	.long	128                             ; 0x80
	.long	22                              ; 0x16
	.long	0                               ; 0x0
	.long	128                             ; 0x80
	.long	23                              ; 0x17
	.long	0                               ; 0x0
	.long	128                             ; 0x80
	.long	2                               ; 0x2
	.long	192                             ; 0xc0
	.long	129                             ; 0x81
	.long	0                               ; 0x0
	.long	0                               ; 0x0

	.comm	_VIDEO_MODE_AUTO,4,2            ; @VIDEO_MODE_AUTO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Writing SAA7111A registers"

l_.str.1:                               ; @.str.1
	.asciz	"Error detecting sensor version"

l_.str.2:                               ; @.str.2
	.asciz	"Sensor is an SAA7111A (version 0x%x)\n"

	.comm	_SEN_SAA7111A,4,2               ; @SEN_SAA7111A
	.comm	_BCL_OV511,8,3                  ; @BCL_OV511
l_.str.3:                               ; @.str.3
	.asciz	"SAA7111A not yet supported with OV518/OV518+\n"

	.no_dead_strip	_saa7111a_configure
.subsections_via_symbols
