	.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	_webcam@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	movq	_NWEBCAMS@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jb	LBB0_2
## %bb.1:
	movl	$0, (%rcx)
	xorl	%eax, %eax
LBB0_2:
	movl	%eax, (%rbx)
	movl	$1, 16(%rbx)
	movl	$-1, 4(%rbx)
	movq	%rbx, %rdi
	movl	$1280, %esi                     ## imm = 0x500
	movl	$85, %edx
	callq	_nw802_test_reg
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	movq	%rbx, %rdi
	movl	$4251, %esi                     ## imm = 0x109B
	movl	$170, %edx
	callq	_nw802_test_reg
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	cmpl	$1701, (%r14)                   ## imm = 0x6A5
	jne	LBB0_20
## %bb.8:
	cmpl	$55296, 4(%r14)                 ## imm = 0xD800
	jne	LBB0_20
## %bb.9:
	movq	%rbx, %rdi
	movl	$1027, %esi                     ## imm = 0x403
	movl	$1, %edx
	callq	_reg_r
	movq	_D_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rax
	movslq	(%rax), %rcx
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_gspca_dbg
	movq	(%rbx), %rax
	movl	(%rax), %ecx
	sarl	%ecx
	cmpl	$10, %ecx
	je	LBB0_16
## %bb.10:
	cmpl	$1, %ecx
	je	LBB0_14
## %bb.11:
	testl	%ecx, %ecx
	jne	LBB0_20
## %bb.12:
	movq	_Generic800@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jne	LBB0_20
## %bb.13:
	movq	_SpaceCam@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_3:
	movq	_BRIDGE_NW802@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movl	(%rbx), %eax
	movq	_Generic800@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_20
## %bb.4:
	movq	_Generic802@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %eax
	jmp	LBB0_19
LBB0_6:
	movq	_BRIDGE_NW801@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movl	(%rbx), %ecx
	movq	_Generic800@GOTPCREL(%rip), %rdx
	movl	$129, %eax
	cmpl	(%rdx), %ecx
	jne	LBB0_20
LBB0_19:
	movl	%eax, (%rbx)
LBB0_20:
	movq	_webcam_chip@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rbx), %r8
	movq	(%rax,%r8,8), %rcx
	movq	8(%rbx), %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_21
## %bb.22:
	movq	_D_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
                                        ## kill: def $r8d killed $r8d killed $r8
	xorl	%eax, %eax
	callq	_gspca_dbg
	movq	8(%rbx), %rax
	movq	_BRIDGE_NW800@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_25
## %bb.23:
	xorl	%ecx, %ecx
	cmpl	$131, (%rbx)
	setne	%cl
	movq	_cif_mode@GOTPCREL(%rip), %rdx
	shlq	$2, %rcx
	addq	(%rdx), %rcx
	movq	%rcx, 24(%rbx)
	jmp	LBB0_24
LBB0_21:
	leaq	L_.str.1(%rip), %rdi
	movq	%r8, %rsi
	callq	_pr_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	movl	%eax, 8(%rbx)
	jmp	LBB0_27
LBB0_25:
	movq	_vga_mode@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	movq	%rdi, 24(%rbx)
	movl	(%rbx), %ecx
	addl	$-128, %ecx
	cmpl	$2, %ecx
	ja	LBB0_24
## %bb.26:
	callq	_ARRAY_SIZE
	movl	%eax, 20(%rbx)
	movl	8(%rbx), %eax
	jmp	LBB0_27
LBB0_24:
	movl	$1, 20(%rbx)
LBB0_27:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_16:
	movq	_Generic800@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jne	LBB0_20
## %bb.17:
	movq	_SpaceCam2@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_14:
	movq	_Generic800@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jne	LBB0_20
## %bb.15:
	movq	_Twinkle@GOTPCREL(%rip), %rax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_webcam,4,2                     ## @webcam
	.comm	_NWEBCAMS,4,2                   ## @NWEBCAMS
	.comm	_BRIDGE_NW802,8,3               ## @BRIDGE_NW802
	.comm	_Generic800,4,2                 ## @Generic800
	.comm	_Generic802,4,2                 ## @Generic802
	.comm	_BRIDGE_NW801,8,3               ## @BRIDGE_NW801
	.comm	_D_PROBE,4,2                    ## @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"et31x110 sensor type %02x\n"

	.comm	_SpaceCam,4,2                   ## @SpaceCam
	.comm	_Twinkle,4,2                    ## @Twinkle
	.comm	_SpaceCam2,4,2                  ## @SpaceCam2
	.comm	_webcam_chip,8,3                ## @webcam_chip
L_.str.1:                               ## @.str.1
	.asciz	"Bad webcam type %d for NW80%d\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"Bridge nw80%d - type: %d\n"

	.comm	_BRIDGE_NW800,8,3               ## @BRIDGE_NW800
	.comm	_cif_mode,8,3                   ## @cif_mode
	.comm	_vga_mode,8,3                   ## @vga_mode
	.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:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x9, _webcam@GOTPAGE
Lloh1:
	ldr	x9, [x9, _webcam@GOTPAGEOFF]
	ldr	w8, [x9]
Lloh2:
	adrp	x10, _NWEBCAMS@GOTPAGE
Lloh3:
	ldr	x10, [x10, _NWEBCAMS@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	cmp	w8, w10
	b.lo	LBB0_2
; %bb.1:
	mov	w8, #0
	str	wzr, [x9]
LBB0_2:
	mov	w9, #1
	str	w9, [x19, #16]
	mov	w9, #-1
	stp	w8, w9, [x19]
	mov	x0, x19
	mov	w1, #1280
	mov	w2, #85
	bl	_nw802_test_reg
	cbz	w0, LBB0_11
; %bb.3:
	mov	x0, x19
	mov	w1, #4251
	mov	w2, #170
	bl	_nw802_test_reg
	cbz	w0, LBB0_14
; %bb.4:
	ldr	w8, [x20]
	cmp	w8, #1701
	b.ne	LBB0_17
; %bb.5:
	ldr	w8, [x20, #4]
	mov	w9, #55296
	cmp	w8, w9
	b.ne	LBB0_17
; %bb.6:
	mov	x0, x19
	mov	w1, #1027
	mov	w2, #1
	bl	_reg_r
Lloh5:
	adrp	x8, _D_PROBE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _D_PROBE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	x8, [x19]
	ldrsw	x3, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_gspca_dbg
	ldr	x8, [x19]
	ldr	w9, [x8]
	asr	w9, w9, #1
	cmp	w9, #10
	b.eq	LBB0_25
; %bb.7:
	cmp	w9, #1
	b.eq	LBB0_27
; %bb.8:
	cbnz	w9, LBB0_17
; %bb.9:
Lloh10:
	adrp	x9, _Generic800@GOTPAGE
Lloh11:
	ldr	x9, [x9, _Generic800@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w9, w8
	b.ne	LBB0_17
; %bb.10:
Lloh13:
	adrp	x8, _SpaceCam@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SpaceCam@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
Lloh15:
	adrp	x8, _BRIDGE_NW802@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BRIDGE_NW802@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	ldr	w8, [x19]
Lloh18:
	adrp	x9, _Generic800@GOTPAGE
Lloh19:
	ldr	x9, [x9, _Generic800@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_17
; %bb.12:
Lloh21:
	adrp	x8, _Generic802@GOTPAGE
Lloh22:
	ldr	x8, [x8, _Generic802@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	b	LBB0_16
LBB0_14:
Lloh23:
	adrp	x8, _BRIDGE_NW801@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BRIDGE_NW801@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	ldr	w8, [x19]
Lloh26:
	adrp	x9, _Generic800@GOTPAGE
Lloh27:
	ldr	x9, [x9, _Generic800@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_17
; %bb.15:
	mov	w8, #129
LBB0_16:
	str	w8, [x19]
LBB0_17:
Lloh29:
	adrp	x8, _webcam_chip@GOTPAGE
Lloh30:
	ldr	x8, [x8, _webcam_chip@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	ldrsw	x1, [x19]
	ldr	x3, [x8, x1, lsl #3]
	ldr	x2, [x19, #8]
	cmp	x3, x2
	b.ne	LBB0_20
; %bb.18:
Lloh32:
	adrp	x8, _D_PROBE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _D_PROBE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	str	x1, [sp]
Lloh35:
	adrp	x2, l_.str.2@PAGE
Lloh36:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x1, x8
	bl	_gspca_dbg
	ldr	x0, [x19, #8]
Lloh37:
	adrp	x8, _BRIDGE_NW800@GOTPAGE
Lloh38:
	ldr	x8, [x8, _BRIDGE_NW800@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_21
; %bb.19:
	ldr	w8, [x19]
	cmp	w8, #131
Lloh40:
	adrp	x8, _cif_mode@GOTPAGE
Lloh41:
	ldr	x8, [x8, _cif_mode@GOTPAGEOFF]
	cset	w9, ne
Lloh42:
	ldr	x8, [x8]
	add	x8, x8, w9, uxtw #2
	str	x8, [x19, #24]
	b	LBB0_23
LBB0_20:
Lloh43:
	adrp	x0, l_.str.1@PAGE
Lloh44:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
Lloh45:
	adrp	x8, _ENODEV@GOTPAGE
Lloh46:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	neg	w0, w8
	str	w0, [x19, #8]
	b	LBB0_24
LBB0_21:
Lloh48:
	adrp	x8, _vga_mode@GOTPAGE
Lloh49:
	ldr	x8, [x8, _vga_mode@GOTPAGEOFF]
Lloh50:
	ldr	x8, [x8]
	str	x8, [x19, #24]
	ldr	w9, [x19]
	sub	w9, w9, #128
	cmp	w9, #2
	b.hi	LBB0_23
; %bb.22:
	mov	x0, x8
	bl	_ARRAY_SIZE
	str	w0, [x19, #20]
	ldr	w0, [x19, #8]
	b	LBB0_24
LBB0_23:
	mov	w8, #1
	str	w8, [x19, #20]
LBB0_24:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_25:
Lloh51:
	adrp	x9, _Generic800@GOTPAGE
Lloh52:
	ldr	x9, [x9, _Generic800@GOTPAGEOFF]
Lloh53:
	ldr	w9, [x9]
	cmp	w9, w8
	b.ne	LBB0_17
; %bb.26:
Lloh54:
	adrp	x8, _SpaceCam2@GOTPAGE
Lloh55:
	ldr	x8, [x8, _SpaceCam2@GOTPAGEOFF]
	b	LBB0_13
LBB0_27:
Lloh56:
	adrp	x9, _Generic800@GOTPAGE
Lloh57:
	ldr	x9, [x9, _Generic800@GOTPAGEOFF]
Lloh58:
	ldr	w9, [x9]
	cmp	w9, w8
	b.ne	LBB0_17
; %bb.28:
Lloh59:
	adrp	x8, _Twinkle@GOTPAGE
Lloh60:
	ldr	x8, [x8, _Twinkle@GOTPAGEOFF]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh59, Lloh60
	.cfi_endproc
                                        ; -- End function
	.comm	_webcam,4,2                     ; @webcam
	.comm	_NWEBCAMS,4,2                   ; @NWEBCAMS
	.comm	_BRIDGE_NW802,8,3               ; @BRIDGE_NW802
	.comm	_Generic800,4,2                 ; @Generic800
	.comm	_Generic802,4,2                 ; @Generic802
	.comm	_BRIDGE_NW801,8,3               ; @BRIDGE_NW801
	.comm	_D_PROBE,4,2                    ; @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"et31x110 sensor type %02x\n"

	.comm	_SpaceCam,4,2                   ; @SpaceCam
	.comm	_Twinkle,4,2                    ; @Twinkle
	.comm	_SpaceCam2,4,2                  ; @SpaceCam2
	.comm	_webcam_chip,8,3                ; @webcam_chip
l_.str.1:                               ; @.str.1
	.asciz	"Bad webcam type %d for NW80%d\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"Bridge nw80%d - type: %d\n"

	.comm	_BRIDGE_NW800,8,3               ; @BRIDGE_NW800
	.comm	_cif_mode,8,3                   ; @cif_mode
	.comm	_vga_mode,8,3                   ; @vga_mode
	.no_dead_strip	_sd_config
.subsections_via_symbols
