	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apds9300_get_adc_val
_apds9300_get_adc_val:                  ## @apds9300_get_adc_val
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 8(%rdi)
	je	LBB0_1
## %bb.2:
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_APDS9300_CMD@GOTPCREL(%rip), %rax
	movq	_APDS9300_WORD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	testl	%r14d, %r14d
	jne	LBB0_3
## %bb.4:
	movq	_APDS9300_DATA0LOW@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_3:
	movq	_APDS9300_DATA1LOW@GOTPCREL(%rip), %rax
LBB0_5:
	orl	(%rax), %esi
	movq	(%r15), %rdi
	callq	_i2c_smbus_read_word_data
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_7
## %bb.6:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APDS9300_CMD,4,2               ## @APDS9300_CMD
	.comm	_APDS9300_WORD,4,2              ## @APDS9300_WORD
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_APDS9300_DATA1LOW,4,2          ## @APDS9300_DATA1LOW
	.comm	_APDS9300_DATA0LOW,4,2          ## @APDS9300_DATA0LOW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to read ADC%d value\n"

	.no_dead_strip	_apds9300_get_adc_val
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apds9300_get_adc_val
_apds9300_get_adc_val:                  ; @apds9300_get_adc_val
	.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
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _APDS9300_CMD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APDS9300_CMD@GOTPAGEOFF]
Lloh2:
	adrp	x9, _APDS9300_WORD@GOTPAGE
Lloh3:
	ldr	x9, [x9, _APDS9300_WORD@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _APDS9300_DATA1LOW@GOTPAGE
Lloh7:
	ldr	x10, [x10, _APDS9300_DATA1LOW@GOTPAGEOFF]
Lloh8:
	adrp	x11, _APDS9300_DATA0LOW@GOTPAGE
Lloh9:
	ldr	x11, [x11, _APDS9300_DATA0LOW@GOTPAGEOFF]
	orr	w8, w9, w8
	cmp	w1, #0
	csel	x9, x11, x10, eq
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	x0, [x0]
	bl	_i2c_smbus_read_word_data
	mov	x21, x0
	tbz	w0, #31, LBB0_4
; %bb.2:
	ldr	x0, [x20]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
	b	LBB0_4
LBB0_3:
Lloh12:
	adrp	x8, _EBUSY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_4:
	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 AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_APDS9300_CMD,4,2               ; @APDS9300_CMD
	.comm	_APDS9300_WORD,4,2              ; @APDS9300_WORD
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_APDS9300_DATA1LOW,4,2          ; @APDS9300_DATA1LOW
	.comm	_APDS9300_DATA0LOW,4,2          ; @APDS9300_DATA0LOW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to read ADC%d value\n"

	.no_dead_strip	_apds9300_get_adc_val
.subsections_via_symbols
