	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apds990x_refresh_pthres
_apds990x_refresh_pthres:               ## @apds990x_refresh_pthres
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	16(%rdi), %rdi
	callq	_pm_runtime_suspended
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_6
## %bb.1:
	movl	(%rbx), %r14d
	xorl	%edx, %edx
	cmpl	%r15d, %r14d
	jg	LBB0_5
## %bb.2:
	movq	_APDS_PROX_HYSTERESIS@GOTPCREL(%rip), %rax
	cmpq	$0, 8(%rbx)
	movl	%r14d, %ecx
	jne	LBB0_4
## %bb.3:
	movq	_APDS_RANGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_4:
	subl	(%rax), %r14d
	movl	%r14d, %edx
	movl	%ecx, %r14d
LBB0_5:
	movq	_APDS990X_PILTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_apds990x_write_word
	movl	%eax, %r15d
	movq	_APDS990X_PIHTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_apds990x_write_word
	orl	%r15d, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APDS_PROX_HYSTERESIS,4,2       ## @APDS_PROX_HYSTERESIS
	.comm	_APDS_RANGE,4,2                 ## @APDS_RANGE
	.comm	_APDS990X_PILTL,4,2             ## @APDS990X_PILTL
	.comm	_APDS990X_PIHTL,4,2             ## @APDS990X_PIHTL
	.no_dead_strip	_apds990x_refresh_pthres
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apds990x_refresh_pthres
_apds990x_refresh_pthres:               ; @apds990x_refresh_pthres
	.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	x21, x1
	mov	x19, x0
	ldr	x0, [x0, #16]
	bl	_pm_runtime_suspended
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_6
LBB0_2:
	ldr	w20, [x19]
	cmp	w20, w21
	b.le	LBB0_4
; %bb.3:
	mov	w2, #0
	b	LBB0_5
LBB0_4:
Lloh0:
	adrp	x8, _APDS_PROX_HYSTERESIS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APDS_PROX_HYSTERESIS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w2, w20, w8
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _APDS_RANGE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _APDS_RANGE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w20, w9, w20, eq
LBB0_5:
Lloh6:
	adrp	x8, _APDS990X_PILTL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _APDS990X_PILTL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_apds990x_write_word
	mov	x21, x0
Lloh9:
	adrp	x8, _APDS990X_PIHTL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _APDS990X_PIHTL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_apds990x_write_word
	orr	w0, w0, w21
LBB0_6:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_APDS_PROX_HYSTERESIS,4,2       ; @APDS_PROX_HYSTERESIS
	.comm	_APDS_RANGE,4,2                 ; @APDS_RANGE
	.comm	_APDS990X_PILTL,4,2             ; @APDS990X_PILTL
	.comm	_APDS990X_PIHTL,4,2             ; @APDS990X_PIHTL
	.no_dead_strip	_apds990x_refresh_pthres
.subsections_via_symbols
