	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ks0127_init
_ks0127_init:                           ## @ks0127_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_to_ks0127
	movq	%rax, %r14
	movq	_reg_defaults@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_V4L2_IDENT_KS0127@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	_debug@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%r15, %rdx
	callq	_v4l2_dbg
	movl	$1, %edi
	callq	_msleep
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%rbx,4), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_ks0127_write
	incq	%rbx
	cmpq	$33, %rbx
	jne	LBB0_1
## %bb.2:
	movl	140(%r13), %edx
	movq	%r15, %rdi
	movl	$35, %esi
	callq	_ks0127_write
	movl	144(%r13), %edx
	movq	%r15, %rdi
	movl	$36, %esi
	callq	_ks0127_write
	movl	148(%r13), %edx
	movq	%r15, %rdi
	movl	$37, %esi
	callq	_ks0127_write
	movl	152(%r13), %edx
	movq	%r15, %rdi
	movl	$38, %esi
	callq	_ks0127_write
	movl	156(%r13), %edx
	movq	%r15, %rdi
	movl	$39, %esi
	callq	_ks0127_write
	movl	164(%r13), %edx
	movq	%r15, %rdi
	movl	$41, %esi
	callq	_ks0127_write
	movl	168(%r13), %edx
	movq	%r15, %rdi
	movl	$42, %esi
	callq	_ks0127_write
	movl	172(%r13), %edx
	movq	%r15, %rdi
	movl	$43, %esi
	callq	_ks0127_write
	movl	176(%r13), %edx
	movq	%r15, %rdi
	movl	$44, %esi
	callq	_ks0127_write
	movl	180(%r13), %edx
	movq	%r15, %rdi
	movl	$45, %esi
	callq	_ks0127_write
	movl	184(%r13), %edx
	movq	%r15, %rdi
	movl	$46, %esi
	callq	_ks0127_write
	movl	188(%r13), %edx
	movq	%r15, %rdi
	movl	$47, %esi
	callq	_ks0127_write
	movl	192(%r13), %edx
	movq	%r15, %rdi
	movl	$48, %esi
	callq	_ks0127_write
	movl	196(%r13), %edx
	movq	%r15, %rdi
	movl	$49, %esi
	callq	_ks0127_write
	movl	200(%r13), %edx
	movq	%r15, %rdi
	movl	$50, %esi
	callq	_ks0127_write
	movl	204(%r13), %edx
	movq	%r15, %rdi
	movl	$51, %esi
	callq	_ks0127_write
	movl	208(%r13), %edx
	movq	%r15, %rdi
	movl	$52, %esi
	callq	_ks0127_write
	movl	212(%r13), %edx
	movq	%r15, %rdi
	movl	$53, %esi
	callq	_ks0127_write
	movl	216(%r13), %edx
	movq	%r15, %rdi
	movl	$54, %esi
	callq	_ks0127_write
	movl	220(%r13), %edx
	movq	%r15, %rdi
	movl	$55, %esi
	callq	_ks0127_write
	movl	232(%r13), %edx
	movq	%r15, %rdi
	movl	$58, %esi
	callq	_ks0127_write
	movl	236(%r13), %edx
	movq	%r15, %rdi
	movl	$59, %esi
	callq	_ks0127_write
	movl	240(%r13), %edx
	movq	%r15, %rdi
	movl	$60, %esi
	callq	_ks0127_write
	movl	244(%r13), %edx
	movq	%r15, %rdi
	movl	$61, %esi
	callq	_ks0127_write
	movl	248(%r13), %edx
	movq	%r15, %rdi
	movl	$62, %esi
	callq	_ks0127_write
	movl	252(%r13), %edx
	movq	%r15, %rdi
	movl	$63, %esi
	callq	_ks0127_write
	movq	_KS_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ks0127_read
	testb	$-128, %al
	jne	LBB0_4
## %bb.3:
	movq	_V4L2_IDENT_KS0122S@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	leaq	L_.str.1(%rip), %rcx
	jmp	LBB0_9
LBB0_4:
	movq	_KS_CMDE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ks0127_read
	andl	$15, %eax
	je	LBB0_5
## %bb.6:
	cmpl	$9, %eax
	jne	LBB0_8
## %bb.7:
	movq	_V4L2_IDENT_KS0127B@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	leaq	L_.str.3(%rip), %rcx
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str.2(%rip), %rcx
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.4(%rip), %rcx
LBB0_9:
	movl	(%r12), %esi
	movl	$1, %edi
	movq	%r15, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_v4l2_dbg                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_reg_defaults,8,3               ## @reg_defaults
	.comm	_V4L2_IDENT_KS0127,4,2          ## @V4L2_IDENT_KS0127
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset\n"

	.comm	_KS_STAT,4,2                    ## @KS_STAT
	.comm	_V4L2_IDENT_KS0122S,4,2         ## @V4L2_IDENT_KS0122S
L_.str.1:                               ## @.str.1
	.asciz	"ks0122s found\n"

	.comm	_KS_CMDE,4,2                    ## @KS_CMDE
L_.str.2:                               ## @.str.2
	.asciz	"ks0127 found\n"

	.comm	_V4L2_IDENT_KS0127B,4,2         ## @V4L2_IDENT_KS0127B
L_.str.3:                               ## @.str.3
	.asciz	"ks0127B Revision A found\n"

L_.str.4:                               ## @.str.4
	.asciz	"unknown revision\n"

	.no_dead_strip	_ks0127_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ks0127_init
_ks0127_init:                           ; @ks0127_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_to_ks0127
	mov	x20, x0
Lloh0:
	adrp	x8, _reg_defaults@GOTPAGE
Lloh1:
	ldr	x8, [x8, _reg_defaults@GOTPAGEOFF]
Lloh2:
	adrp	x9, _V4L2_IDENT_KS0127@GOTPAGE
Lloh3:
	ldr	x9, [x9, _V4L2_IDENT_KS0127@GOTPAGEOFF]
Lloh4:
	ldr	x23, [x8]
Lloh5:
	ldr	w8, [x9]
	str	w8, [x0]
Lloh6:
	adrp	x22, _debug@GOTPAGE
Lloh7:
	ldr	x22, [x22, _debug@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh8:
	adrp	x3, l_.str@PAGE
Lloh9:
	add	x3, x3, l_.str@PAGEOFF
	mov	w21, #1
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
	mov	w0, #1
	bl	_msleep
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x23, x21, lsl #2]
	mov	x0, x19
	mov	x1, x21
	bl	_ks0127_write
	add	x21, x21, #1
	cmp	x21, #33
	b.ne	LBB0_1
; %bb.2:
	ldr	w2, [x23, #140]
	mov	x0, x19
	mov	w1, #35
	bl	_ks0127_write
	ldr	w2, [x23, #144]
	mov	x0, x19
	mov	w1, #36
	bl	_ks0127_write
	ldr	w2, [x23, #148]
	mov	x0, x19
	mov	w1, #37
	bl	_ks0127_write
	ldr	w2, [x23, #152]
	mov	x0, x19
	mov	w1, #38
	bl	_ks0127_write
	ldr	w2, [x23, #156]
	mov	x0, x19
	mov	w1, #39
	bl	_ks0127_write
	ldr	w2, [x23, #164]
	mov	x0, x19
	mov	w1, #41
	bl	_ks0127_write
	ldr	w2, [x23, #168]
	mov	x0, x19
	mov	w1, #42
	bl	_ks0127_write
	ldr	w2, [x23, #172]
	mov	x0, x19
	mov	w1, #43
	bl	_ks0127_write
	ldr	w2, [x23, #176]
	mov	x0, x19
	mov	w1, #44
	bl	_ks0127_write
	ldr	w2, [x23, #180]
	mov	x0, x19
	mov	w1, #45
	bl	_ks0127_write
	ldr	w2, [x23, #184]
	mov	x0, x19
	mov	w1, #46
	bl	_ks0127_write
	ldr	w2, [x23, #188]
	mov	x0, x19
	mov	w1, #47
	bl	_ks0127_write
	ldr	w2, [x23, #192]
	mov	x0, x19
	mov	w1, #48
	bl	_ks0127_write
	ldr	w2, [x23, #196]
	mov	x0, x19
	mov	w1, #49
	bl	_ks0127_write
	ldr	w2, [x23, #200]
	mov	x0, x19
	mov	w1, #50
	bl	_ks0127_write
	ldr	w2, [x23, #204]
	mov	x0, x19
	mov	w1, #51
	bl	_ks0127_write
	ldr	w2, [x23, #208]
	mov	x0, x19
	mov	w1, #52
	bl	_ks0127_write
	ldr	w2, [x23, #212]
	mov	x0, x19
	mov	w1, #53
	bl	_ks0127_write
	ldr	w2, [x23, #216]
	mov	x0, x19
	mov	w1, #54
	bl	_ks0127_write
	ldr	w2, [x23, #220]
	mov	x0, x19
	mov	w1, #55
	bl	_ks0127_write
	ldr	w2, [x23, #232]
	mov	x0, x19
	mov	w1, #58
	bl	_ks0127_write
	ldr	w2, [x23, #236]
	mov	x0, x19
	mov	w1, #59
	bl	_ks0127_write
	ldr	w2, [x23, #240]
	mov	x0, x19
	mov	w1, #60
	bl	_ks0127_write
	ldr	w2, [x23, #244]
	mov	x0, x19
	mov	w1, #61
	bl	_ks0127_write
	ldr	w2, [x23, #248]
	mov	x0, x19
	mov	w1, #62
	bl	_ks0127_write
	ldr	w2, [x23, #252]
	mov	x0, x19
	mov	w1, #63
	bl	_ks0127_write
Lloh10:
	adrp	x8, _KS_STAT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _KS_STAT@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ks0127_read
	tbnz	w0, #7, LBB0_4
; %bb.3:
Lloh13:
	adrp	x8, _V4L2_IDENT_KS0122S@GOTPAGE
Lloh14:
	ldr	x8, [x8, _V4L2_IDENT_KS0122S@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x20]
Lloh16:
	adrp	x3, l_.str.1@PAGE
Lloh17:
	add	x3, x3, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_4:
Lloh18:
	adrp	x8, _KS_CMDE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _KS_CMDE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ks0127_read
	ands	w8, w0, #0xf
	b.eq	LBB0_7
; %bb.5:
	cmp	w8, #9
	b.ne	LBB0_8
; %bb.6:
Lloh21:
	adrp	x8, _V4L2_IDENT_KS0127B@GOTPAGE
Lloh22:
	ldr	x8, [x8, _V4L2_IDENT_KS0127B@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [x20]
Lloh24:
	adrp	x3, l_.str.3@PAGE
Lloh25:
	add	x3, x3, l_.str.3@PAGEOFF
	b	LBB0_9
LBB0_7:
Lloh26:
	adrp	x3, l_.str.2@PAGE
Lloh27:
	add	x3, x3, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh28:
	adrp	x3, l_.str.4@PAGE
Lloh29:
	add	x3, x3, l_.str.4@PAGEOFF
LBB0_9:
	ldr	w1, [x22]
	mov	w0, #1
	mov	x2, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_v4l2_dbg
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_reg_defaults,8,3               ; @reg_defaults
	.comm	_V4L2_IDENT_KS0127,4,2          ; @V4L2_IDENT_KS0127
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset\n"

	.comm	_KS_STAT,4,2                    ; @KS_STAT
	.comm	_V4L2_IDENT_KS0122S,4,2         ; @V4L2_IDENT_KS0122S
l_.str.1:                               ; @.str.1
	.asciz	"ks0122s found\n"

	.comm	_KS_CMDE,4,2                    ; @KS_CMDE
l_.str.2:                               ; @.str.2
	.asciz	"ks0127 found\n"

	.comm	_V4L2_IDENT_KS0127B,4,2         ; @V4L2_IDENT_KS0127B
l_.str.3:                               ; @.str.3
	.asciz	"ks0127B Revision A found\n"

l_.str.4:                               ; @.str.4
	.asciz	"unknown revision\n"

	.no_dead_strip	_ks0127_init
.subsections_via_symbols
