	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function veml6070_read
_veml6070_read:                         ## @veml6070_read
	.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, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	8(%rbx), %edi
	movq	_VEML6070_COMMAND_SD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	andl	(%rbx), %esi
	callq	_i2c_smbus_write_byte
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movl	$135, %edi
	callq	_msleep
	movl	12(%rbx), %edi
	callq	_i2c_smbus_read_byte
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_8
## %bb.2:
	movl	8(%rbx), %edi
	callq	_i2c_smbus_read_byte
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_6
## %bb.3:
	movl	(%rbx), %esi
	movl	8(%rbx), %edi
	callq	_i2c_smbus_write_byte
	testl	%eax, %eax
	js	LBB0_7
## %bb.4:
	shll	$8, %r15d
	orl	%r12d, %r15d
	jmp	LBB0_8
LBB0_7:
	movl	%eax, %r15d
	jmp	LBB0_8
LBB0_6:
	movl	%r12d, %r15d
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VEML6070_COMMAND_SD,4,2        ## @VEML6070_COMMAND_SD
	.no_dead_strip	_veml6070_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function veml6070_read
_veml6070_read:                         ; @veml6070_read
	.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	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w0, [x20, #8]
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _VEML6070_COMMAND_SD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VEML6070_COMMAND_SD@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	bic	w1, w8, w9
	bl	_i2c_smbus_write_byte
	tbnz	w0, #31, LBB0_4
; %bb.1:
	mov	w0, #135
	bl	_msleep
	ldr	w0, [x20, #12]
	bl	_i2c_smbus_read_byte
	mov	x21, x0
	tbnz	w0, #31, LBB0_6
; %bb.2:
	ldr	w0, [x20, #8]
	bl	_i2c_smbus_read_byte
	mov	x22, x0
	tbnz	w0, #31, LBB0_5
; %bb.3:
	ldr	w0, [x20, #8]
	ldr	w1, [x20]
	bl	_i2c_smbus_write_byte
	orr	w8, w22, w21, lsl #8
	tst	w0, #0x80000000
	csel	w21, w0, w8, ne
	b	LBB0_6
LBB0_4:
	mov	x21, x0
	b	LBB0_6
LBB0_5:
	mov	x21, x22
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_VEML6070_COMMAND_SD,4,2        ; @VEML6070_COMMAND_SD
	.no_dead_strip	_veml6070_read
.subsections_via_symbols
