	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_config
_sd_config:                             ## @sd_config
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	_FREQ_DEF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_V4L2_CID_POWER_LINE_FREQUENCY_60HZ@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	sete	%dl
	movl	%edx, (%rdi)
	callq	_reset_camera_params
	movq	_D_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %r8d
	movl	4(%r14), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_gspca_dbg
	movq	_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 4(%rbx)
	callq	_ARRAY_SIZE
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_goto_low_power
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_gspca_err
LBB0_2:
	movl	$0, 20(%rbx)
	movq	%rbx, %rdi
	callq	_get_version_information
	movl	20(%rbx), %edx
	cmpl	$1, %edx
	jne	LBB0_3
## %bb.4:
	cmpl	$2, 24(%rbx)
	jg	LBB0_7
## %bb.5:
	cmpl	$3, 16(%rbx)
	jl	LBB0_7
## %bb.6:
	movl	$2, 16(%rbx)
LBB0_7:
	xorl	%eax, %eax
	cmpl	$2067, 4(%rbx)                  ## imm = 0x813
	movl	$0, %ecx
	jne	LBB0_9
## %bb.8:
	xorl	%ecx, %ecx
	cmpl	$1, 8(%rbx)
	sete	%cl
LBB0_9:
	movl	%ecx, 12(%rbx)
	jmp	LBB0_10
LBB0_3:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_gspca_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FREQ_DEF,8,3                   ## @FREQ_DEF
	.comm	_V4L2_CID_POWER_LINE_FREQUENCY_60HZ,8,3 ## @V4L2_CID_POWER_LINE_FREQUENCY_60HZ
	.comm	_D_PROBE,4,2                    ## @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cpia CPiA camera detected (vid/pid 0x%04X:0x%04X)\n"

	.comm	_mode,4,2                       ## @mode
L_.str.1:                               ## @.str.1
	.asciz	"Cannot go to low power mode: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"only firmware version 1 is supported (got: %d)\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_sd_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_config
_sd_config:                             ; @sd_config
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _FREQ_DEF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FREQ_DEF@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _V4L2_CID_POWER_LINE_FREQUENCY_60HZ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_CID_POWER_LINE_FREQUENCY_60HZ@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, eq
	str	w8, [x0]
	bl	_reset_camera_params
Lloh6:
	adrp	x8, _D_PROBE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _D_PROBE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldp	w4, w3, [x20]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_gspca_dbg
Lloh11:
	adrp	x8, _mode@GOTPAGE
Lloh12:
	ldr	x8, [x8, _mode@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	str	w0, [x19, #4]
	bl	_ARRAY_SIZE
	str	w0, [x19]
	mov	x0, x19
	bl	_goto_low_power
	cbz	w0, LBB0_2
; %bb.1:
	mov	x2, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_gspca_err
LBB0_2:
	str	wzr, [x19, #20]
	mov	x0, x19
	bl	_get_version_information
	ldr	w2, [x19, #20]
	cmp	w2, #1
	b.ne	LBB0_8
; %bb.3:
	ldr	w8, [x19, #24]
	cmp	w8, #2
	b.gt	LBB0_6
; %bb.4:
	ldr	w8, [x19, #16]
	cmp	w8, #3
	b.lt	LBB0_6
; %bb.5:
	mov	w8, #2
	str	w8, [x19, #16]
LBB0_6:
	ldr	w8, [x19, #4]
	cmp	w8, #2067
	b.ne	LBB0_9
; %bb.7:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	cset	w8, eq
	b	LBB0_10
LBB0_8:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_gspca_err
Lloh18:
	adrp	x8, _ENODEV@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_9:
	mov	w8, #0
LBB0_10:
	mov	w0, #0
	str	w8, [x19, #12]
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_FREQ_DEF,8,3                   ; @FREQ_DEF
	.comm	_V4L2_CID_POWER_LINE_FREQUENCY_60HZ,8,3 ; @V4L2_CID_POWER_LINE_FREQUENCY_60HZ
	.comm	_D_PROBE,4,2                    ; @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cpia CPiA camera detected (vid/pid 0x%04X:0x%04X)\n"

	.comm	_mode,4,2                       ; @mode
l_.str.1:                               ; @.str.1
	.asciz	"Cannot go to low power mode: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"only firmware version 1 is supported (got: %d)\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_sd_config
.subsections_via_symbols
