	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vcnl4000_measure
_vcnl4000_measure:                      ## @vcnl4000_measure
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movl	%esi, %ebx
	movq	%rdi, %r12
	callq	_mutex_lock
	movq	8(%r12), %rdi
	movq	_VCNL4000_COMMAND@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	%ebx, %edx
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	$20, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rdi
	movl	(%r14), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r13d, %ebx
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$20, %edi
	callq	_msleep
	decl	%r15d
	jne	LBB0_2
	jmp	LBB0_6
LBB0_5:
	testl	%r15d, %r15d
	jle	LBB0_6
## %bb.7:
	movq	8(%r12), %rdi
	leaq	-48(%rbp), %rcx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	$4, %edx
	callq	_i2c_smbus_read_i2c_block_data
	testl	%eax, %eax
	js	LBB0_8
## %bb.11:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	-48(%rbp), %edi
	callq	_be16_to_cpu
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_8:
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_6:
	movq	8(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_10:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VCNL4000_COMMAND,4,2           ## @VCNL4000_COMMAND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vcnl4000_measure() failed, data not ready\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_vcnl4000_measure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vcnl4000_measure
_vcnl4000_measure:                      ; @vcnl4000_measure
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	bl	_mutex_lock
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x24, _VCNL4000_COMMAND@GOTPAGE
Lloh1:
	ldr	x24, [x24, _VCNL4000_COMMAND@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x2, x23
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_8
; %bb.1:
	mov	w25, #20
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #8]
	ldr	w1, [x24]
	bl	_i2c_smbus_read_byte_data
	mov	x23, x0
	tbnz	w0, #31, LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	tst	w23, w22
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #20
	bl	_msleep
	subs	w25, w25, #1
	b.ne	LBB0_2
	b	LBB0_9
LBB0_5:
	cmp	w25, #0
	b.le	LBB0_9
; %bb.6:
	ldr	x0, [x19, #8]
	add	x3, sp, #12
	mov	x1, x21
	mov	w2, #4
	bl	_i2c_smbus_read_i2c_block_data
	tbnz	w0, #31, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_mutex_unlock
	ldr	w0, [sp, #12]
	bl	_be16_to_cpu
	mov	w23, #0
	str	w0, [x20]
	b	LBB0_11
LBB0_8:
	mov	x23, x0
	b	LBB0_10
LBB0_9:
	ldr	x0, [x19, #8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_11:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_VCNL4000_COMMAND,4,2           ; @VCNL4000_COMMAND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vcnl4000_measure() failed, data not ready\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_vcnl4000_measure
.subsections_via_symbols
