	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vcnl4000_init
_vcnl4000_init:                         ## @vcnl4000_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	16(%rdi), %rdi
	movq	_VCNL4000_PROD_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movl	%ebx, %eax
	shrl	$4, %eax
	cmpl	$128, %eax
	je	LBB0_5
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_10
## %bb.3:
	movl	24(%r14), %eax
	movq	_VCNL4000@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.4:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_7
LBB0_5:
	movl	24(%r14), %eax
	movq	_VCNL4010@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
LBB0_7:
	movq	16(%r14), %rdi
	callq	_dev_warn
LBB0_8:
	andl	$15, %ebx
	movl	%ebx, (%r14)
	movl	$250000, 4(%r14)                ## imm = 0x3D090
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_mutex_init
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_10:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VCNL4000_PROD_REV,4,2          ## @VCNL4000_PROD_REV
	.comm	_VCNL4000,4,2                   ## @VCNL4000
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wrong device id, use vcnl4000"

	.comm	_VCNL4010,4,2                   ## @VCNL4010
L_.str.1:                               ## @.str.1
	.asciz	"wrong device id, use vcnl4010/4020"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vcnl4000_init
_vcnl4000_init:                         ; @vcnl4000_init
	.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	x19, x0
	ldr	x0, [x0, #16]
Lloh0:
	adrp	x8, _VCNL4000_PROD_REV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VCNL4000_PROD_REV@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_byte_data
	mov	x20, x0
	tbnz	w0, #31, LBB0_10
; %bb.1:
	lsr	w8, w20, #4
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_9
; %bb.3:
	ldr	w8, [x19, #24]
Lloh3:
	adrp	x9, _VCNL4000@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VCNL4000@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_8
; %bb.4:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:
	ldr	w8, [x19, #24]
Lloh8:
	adrp	x9, _VCNL4010@GOTPAGE
Lloh9:
	ldr	x9, [x9, _VCNL4010@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_8
; %bb.6:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	ldr	x0, [x19, #16]
	bl	_dev_warn
LBB0_8:
	and	w8, w20, #0xf
	mov	w9, #53392
	movk	w9, #3, lsl #16
	stp	w8, w9, [x19]
	add	x0, x19, #8
	bl	_mutex_init
	mov	w20, #0
	b	LBB0_10
LBB0_9:
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_VCNL4000_PROD_REV,4,2          ; @VCNL4000_PROD_REV
	.comm	_VCNL4000,4,2                   ; @VCNL4000
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wrong device id, use vcnl4000"

	.comm	_VCNL4010,4,2                   ; @VCNL4010
l_.str.1:                               ; @.str.1
	.asciz	"wrong device id, use vcnl4010/4020"

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