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

	.comm	_KS_STAT,4,2                    ## @KS_STAT
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"

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	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x8, _reg_defaults@GOTPAGE
Lloh1:
	ldr	x8, [x8, _reg_defaults@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
Lloh3:
	adrp	x21, _debug@GOTPAGE
Lloh4:
	ldr	x21, [x21, _debug@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh5:
	adrp	x3, l_.str@PAGE
Lloh6:
	add	x3, x3, l_.str@PAGEOFF
	mov	w20, #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, [x22, x20, lsl #2]
	mov	x0, x19
	mov	x1, x20
	bl	_ks0127_write
	add	x20, x20, #1
	cmp	x20, #33
	b.ne	LBB0_1
; %bb.2:
	ldr	w2, [x22, #140]
	mov	x0, x19
	mov	w1, #35
	bl	_ks0127_write
	ldr	w2, [x22, #144]
	mov	x0, x19
	mov	w1, #36
	bl	_ks0127_write
	ldr	w2, [x22, #148]
	mov	x0, x19
	mov	w1, #37
	bl	_ks0127_write
	ldr	w2, [x22, #152]
	mov	x0, x19
	mov	w1, #38
	bl	_ks0127_write
	ldr	w2, [x22, #156]
	mov	x0, x19
	mov	w1, #39
	bl	_ks0127_write
	ldr	w2, [x22, #164]
	mov	x0, x19
	mov	w1, #41
	bl	_ks0127_write
	ldr	w2, [x22, #168]
	mov	x0, x19
	mov	w1, #42
	bl	_ks0127_write
	ldr	w2, [x22, #172]
	mov	x0, x19
	mov	w1, #43
	bl	_ks0127_write
	ldr	w2, [x22, #176]
	mov	x0, x19
	mov	w1, #44
	bl	_ks0127_write
	ldr	w2, [x22, #180]
	mov	x0, x19
	mov	w1, #45
	bl	_ks0127_write
	ldr	w2, [x22, #184]
	mov	x0, x19
	mov	w1, #46
	bl	_ks0127_write
	ldr	w2, [x22, #188]
	mov	x0, x19
	mov	w1, #47
	bl	_ks0127_write
	ldr	w2, [x22, #192]
	mov	x0, x19
	mov	w1, #48
	bl	_ks0127_write
	ldr	w2, [x22, #196]
	mov	x0, x19
	mov	w1, #49
	bl	_ks0127_write
	ldr	w2, [x22, #200]
	mov	x0, x19
	mov	w1, #50
	bl	_ks0127_write
	ldr	w2, [x22, #204]
	mov	x0, x19
	mov	w1, #51
	bl	_ks0127_write
	ldr	w2, [x22, #208]
	mov	x0, x19
	mov	w1, #52
	bl	_ks0127_write
	ldr	w2, [x22, #212]
	mov	x0, x19
	mov	w1, #53
	bl	_ks0127_write
	ldr	w2, [x22, #216]
	mov	x0, x19
	mov	w1, #54
	bl	_ks0127_write
	ldr	w2, [x22, #220]
	mov	x0, x19
	mov	w1, #55
	bl	_ks0127_write
	ldr	w2, [x22, #232]
	mov	x0, x19
	mov	w1, #58
	bl	_ks0127_write
	ldr	w2, [x22, #236]
	mov	x0, x19
	mov	w1, #59
	bl	_ks0127_write
	ldr	w2, [x22, #240]
	mov	x0, x19
	mov	w1, #60
	bl	_ks0127_write
	ldr	w2, [x22, #244]
	mov	x0, x19
	mov	w1, #61
	bl	_ks0127_write
	ldr	w2, [x22, #248]
	mov	x0, x19
	mov	w1, #62
	bl	_ks0127_write
	ldr	w2, [x22, #252]
	mov	x0, x19
	mov	w1, #63
	bl	_ks0127_write
Lloh7:
	adrp	x8, _KS_STAT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _KS_STAT@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ks0127_read
	tbnz	w0, #7, LBB0_4
; %bb.3:
Lloh10:
	adrp	x3, l_.str.1@PAGE
Lloh11:
	add	x3, x3, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x8, _KS_CMDE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _KS_CMDE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ks0127_read
Lloh15:
	adrp	x8, l_.str.4@PAGE
Lloh16:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh17:
	adrp	x9, l_.str.3@PAGE
Lloh18:
	add	x9, x9, l_.str.3@PAGEOFF
	ands	w10, w0, #0xf
	cmp	w10, #9
	csel	x8, x9, x8, eq
	tst	w0, #0xf
Lloh19:
	adrp	x9, l_.str.2@PAGE
Lloh20:
	add	x9, x9, l_.str.2@PAGEOFF
	csel	x3, x9, x8, eq
LBB0_5:
	ldr	w1, [x21]
	mov	w0, #1
	mov	x2, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_v4l2_dbg
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_reg_defaults,8,3               ; @reg_defaults
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset\n"

	.comm	_KS_STAT,4,2                    ; @KS_STAT
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"

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
