	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isl29501_register_read
_isl29501_register_read:                ## @isl29501_register_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	%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	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	_isl29501_registers@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	%esi, %r14d
	callq	_mutex_lock
	shlq	$4, %r14
	movq	8(%r13,%r14), %rsi
	xorl	%r12d, %r12d
	movl	$0, %eax
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.1:
	movl	4(%r15), %edi
	callq	_i2c_smbus_read_byte_data
	movq	%rax, %rbx
	testq	%rax, %rax
	js	LBB0_7
## %bb.2:
	shll	$8, %ebx
	movl	%ebx, %eax
LBB0_3:
	movq	(%r13,%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.4:
	movl	%eax, %r14d
	movl	4(%r15), %edi
	callq	_i2c_smbus_read_byte_data
	movq	%rax, %rbx
	testq	%rax, %rax
	js	LBB0_7
## %bb.5:
	movl	%ebx, %r12d
	movl	%r14d, %eax
LBB0_6:
	addl	%eax, %r12d
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%r12d, (%rax)
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_7:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_isl29501_registers,8,3         ## @isl29501_registers
	.no_dead_strip	_isl29501_register_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isl29501_register_read
_isl29501_register_read:                ; @isl29501_register_read
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _isl29501_registers@GOTPAGE
Lloh1:
	ldr	x8, [x8, _isl29501_registers@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
	bl	_mutex_lock
	add	x8, x24, w22, uxtw #4
	ldr	x1, [x8, #8]
	cbz	x1, LBB0_3
; %bb.1:
	ldr	w0, [x19, #4]
	bl	_i2c_smbus_read_byte_data
	mov	x21, x0
	tbnz	x0, #63, LBB0_6
; %bb.2:
	lsl	w23, w21, #8
	b	LBB0_4
LBB0_3:
	mov	w23, #0
LBB0_4:
	mov	w8, w22
	lsl	x8, x8, #4
	ldr	x1, [x24, x8]
	cbz	x1, LBB0_7
; %bb.5:
	ldr	w0, [x19, #4]
	bl	_i2c_smbus_read_byte_data
	mov	x21, x0
	tbz	x0, #63, LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_9
LBB0_7:
	mov	w21, #0
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
	add	w8, w21, w23
	mov	w21, #0
	str	w8, [x20]
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_isl29501_registers,8,3         ; @isl29501_registers
	.no_dead_strip	_isl29501_register_read
.subsections_via_symbols
