	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vcnl4200_init
_vcnl4200_init:                         ## @vcnl4200_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, %r14
	movq	72(%rdi), %rdi
	movq	_VCNL4200_DEV_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_word_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_10
## %bb.1:
	movl	$128, %r15d
	cmpb	$-128, %bl
	je	LBB0_4
## %bb.2:
	movq	72(%r14), %rdi
	movq	_VCNL4040_DEV_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_word_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_10
## %bb.3:
	movl	$129, %r15d
	cmpb	$-127, %bl
	jne	LBB0_8
LBB0_4:
	movq	72(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_dbg
	shrl	$8, %ebx
	andl	$15, %ebx
	movl	%ebx, (%r14)
	movq	72(%r14), %rdi
	movq	_VCNL4200_AL_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_i2c_smbus_write_word_data
	testl	%eax, %eax
	js	LBB0_9
## %bb.5:
	movq	72(%r14), %rdi
	movq	_VCNL4200_PS_CONF1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_i2c_smbus_write_word_data
	testl	%eax, %eax
	js	LBB0_9
## %bb.6:
	movl	$24000, 4(%r14)                 ## imm = 0x5DC0
	movq	_VCNL4200_AL_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	40(%r14), %r12
	movl	%eax, 64(%r14)
	movq	_VCNL4200_PS_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	8(%r14), %r13
	testb	$1, %r15b
	movl	$54000000, %esi                 ## imm = 0x337F980
	movl	$100000000, %ecx                ## imm = 0x5F5E100
	cmovnel	%ecx, %esi
	movl	%eax, 32(%r14)
	movl	$4200000, %r15d                 ## imm = 0x401640
	cmovnel	%ecx, %r15d
	xorl	%edi, %edi
	callq	_ktime_set
	movq	%rax, 56(%r14)
	xorl	%edi, %edi
	movl	%r15d, %esi
	callq	_ktime_set
	movq	%rax, 24(%r14)
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_ktime_set
	movq	%rax, 48(%r14)
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_ktime_set
	movq	%rax, 16(%r14)
	movq	%r12, %rdi
	callq	_mutex_init
	movq	%r13, %rdi
	callq	_mutex_init
	jmp	LBB0_10
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_8:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VCNL4200_DEV_ID,4,2            ## @VCNL4200_DEV_ID
	.comm	_VCNL4040_DEV_ID,4,2            ## @VCNL4040_DEV_ID
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device id 0x%x"

	.comm	_VCNL4200_AL_CONF,4,2           ## @VCNL4200_AL_CONF
	.comm	_VCNL4200_PS_CONF1,4,2          ## @VCNL4200_PS_CONF1
	.comm	_VCNL4200_AL_DATA,4,2           ## @VCNL4200_AL_DATA
	.comm	_VCNL4200_PS_DATA,4,2           ## @VCNL4200_PS_DATA
	.no_dead_strip	_vcnl4200_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vcnl4200_init
_vcnl4200_init:                         ; @vcnl4200_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
	ldr	x0, [x0, #72]
Lloh0:
	adrp	x8, _VCNL4200_DEV_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VCNL4200_DEV_ID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_word_data
	mov	x20, x0
	tbnz	w0, #31, LBB0_11
; %bb.1:
	and	w8, w20, #0xff
	cmp	w8, #128
	b.ne	LBB0_3
; %bb.2:
	mov	w21, #128
	b	LBB0_6
LBB0_3:
	ldr	x0, [x19, #72]
Lloh3:
	adrp	x8, _VCNL4040_DEV_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VCNL4040_DEV_ID@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_word_data
	mov	x20, x0
	tbnz	w0, #31, LBB0_11
; %bb.4:
	and	w8, w20, #0xff
	cmp	w8, #129
	b.ne	LBB0_10
; %bb.5:
	mov	w21, #129
LBB0_6:
	ldr	x0, [x19, #72]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
	ubfx	w8, w20, #8, #4
	str	w8, [x19]
	ldr	x0, [x19, #72]
Lloh8:
	adrp	x8, _VCNL4200_AL_CONF@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VCNL4200_AL_CONF@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_i2c_smbus_write_word_data
	tbnz	w0, #31, LBB0_9
; %bb.7:
	ldr	x0, [x19, #72]
Lloh11:
	adrp	x8, _VCNL4200_PS_CONF1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VCNL4200_PS_CONF1@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_i2c_smbus_write_word_data
	tbnz	w0, #31, LBB0_9
; %bb.8:
	mov	w8, #24000
	str	w8, [x19, #4]
Lloh14:
	adrp	x8, _VCNL4200_AL_DATA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VCNL4200_AL_DATA@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	add	x20, x19, #40
	str	w8, [x19, #64]
Lloh17:
	adrp	x8, _VCNL4200_PS_DATA@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VCNL4200_PS_DATA@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	add	x22, x19, #8
	str	w8, [x19, #32]
	tst	w21, #0x1
	mov	w8, #57600
	movk	w8, #1525, lsl #16
	mov	w9, #63872
	movk	w9, #823, lsl #16
	csel	w1, w9, w8, eq
	mov	w9, #5696
	movk	w9, #64, lsl #16
	csel	w21, w9, w8, eq
	mov	w0, #0
	bl	_ktime_set
	str	x0, [x19, #56]
	mov	w0, #0
	mov	x1, x21
	bl	_ktime_set
	str	x0, [x19, #24]
	mov	w0, #0
	mov	w1, #0
	bl	_ktime_set
	str	x0, [x19, #48]
	mov	w0, #0
	mov	w1, #0
	bl	_ktime_set
	str	x0, [x19, #16]
	mov	x0, x20
	bl	_mutex_init
	mov	x0, x22
	bl	_mutex_init
	mov	w20, #0
	b	LBB0_11
LBB0_9:
	mov	x20, x0
	b	LBB0_11
LBB0_10:
Lloh20:
	adrp	x8, _ENODEV@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_11:
	mov	x0, x20
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_VCNL4200_DEV_ID,4,2            ; @VCNL4200_DEV_ID
	.comm	_VCNL4040_DEV_ID,4,2            ; @VCNL4040_DEV_ID
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device id 0x%x"

	.comm	_VCNL4200_AL_CONF,4,2           ; @VCNL4200_AL_CONF
	.comm	_VCNL4200_PS_CONF1,4,2          ; @VCNL4200_PS_CONF1
	.comm	_VCNL4200_AL_DATA,4,2           ; @VCNL4200_AL_DATA
	.comm	_VCNL4200_PS_DATA,4,2           ; @VCNL4200_PS_DATA
	.no_dead_strip	_vcnl4200_init
.subsections_via_symbols
