	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apds9960_chip_init
_apds9960_chip_init:                    ## @apds9960_chip_init
	.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
	movl	$28000, %esi                    ## imm = 0x6D60
	callq	_apds9960_set_it_time
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movl	24(%rbx), %edi
	xorl	%esi, %esi
	callq	_regmap_field_write
	testl	%eax, %eax
	jne	LBB0_11
## %bb.2:
	movl	20(%rbx), %edi
	xorl	%esi, %esi
	callq	_regmap_field_write
	testl	%eax, %eax
	jne	LBB0_11
## %bb.3:
	movl	16(%rbx), %edi
	xorl	%esi, %esi
	callq	_regmap_field_write
	testl	%eax, %eax
	jne	LBB0_11
## %bb.4:
	movl	12(%rbx), %edi
	movl	$1, %esi
	callq	_regmap_field_write
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:
	movl	8(%rbx), %edi
	xorl	%esi, %esi
	callq	_regmap_field_write
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	movl	4(%rbx), %edi
	movl	$1, %esi
	callq	_regmap_field_write
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	movl	(%rbx), %edi
	movq	_APDS9960_REG_PERS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_APDS9960_DEFAULT_PERS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movl	(%rbx), %r14d
	movq	_APDS9960_REG_GCONF_1@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_APDS9960_REG_GCONF_1_GFIFO_THRES_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	xorl	%edi, %edi
	callq	_BIT
	movq	_APDS9960_REG_GCONF_1_GFIFO_THRES_MASK_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movl	(%rbx), %edi
	movq	_APDS9960_REG_GPENTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_APDS9960_DEFAULT_GPENTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movl	(%rbx), %edi
	movq	_APDS9960_REG_GEXTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_APDS9960_DEFAULT_GEXTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	testl	%eax, %eax
	je	LBB0_12
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%rbx, %rdi
	movl	$1, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_apds9960_set_powermode         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_APDS9960_REG_PERS,4,2          ## @APDS9960_REG_PERS
	.comm	_APDS9960_DEFAULT_PERS,4,2      ## @APDS9960_DEFAULT_PERS
	.comm	_APDS9960_REG_GCONF_1,4,2       ## @APDS9960_REG_GCONF_1
	.comm	_APDS9960_REG_GCONF_1_GFIFO_THRES_MASK,4,2 ## @APDS9960_REG_GCONF_1_GFIFO_THRES_MASK
	.comm	_APDS9960_REG_GCONF_1_GFIFO_THRES_MASK_SHIFT,4,2 ## @APDS9960_REG_GCONF_1_GFIFO_THRES_MASK_SHIFT
	.comm	_APDS9960_REG_GPENTH,4,2        ## @APDS9960_REG_GPENTH
	.comm	_APDS9960_DEFAULT_GPENTH,4,2    ## @APDS9960_DEFAULT_GPENTH
	.comm	_APDS9960_REG_GEXTH,4,2         ## @APDS9960_REG_GEXTH
	.comm	_APDS9960_DEFAULT_GEXTH,4,2     ## @APDS9960_DEFAULT_GEXTH
	.no_dead_strip	_apds9960_chip_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apds9960_chip_init
_apds9960_chip_init:                    ; @apds9960_chip_init
	.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	x19, x0
	mov	w1, #28000
	bl	_apds9960_set_it_time
	cbnz	w0, LBB0_11
; %bb.1:
	ldr	w0, [x19, #24]
	mov	w1, #0
	bl	_regmap_field_write
	cbnz	w0, LBB0_11
; %bb.2:
	ldr	w0, [x19, #20]
	mov	w1, #0
	bl	_regmap_field_write
	cbnz	w0, LBB0_11
; %bb.3:
	ldr	w0, [x19, #16]
	mov	w1, #0
	bl	_regmap_field_write
	cbnz	w0, LBB0_11
; %bb.4:
	ldr	w0, [x19, #12]
	mov	w1, #1
	bl	_regmap_field_write
	cbnz	w0, LBB0_11
; %bb.5:
	ldr	w0, [x19, #8]
	mov	w1, #0
	bl	_regmap_field_write
	cbnz	w0, LBB0_11
; %bb.6:
	ldr	w0, [x19, #4]
	mov	w1, #1
	bl	_regmap_field_write
	cbnz	w0, LBB0_11
; %bb.7:
	ldr	w0, [x19]
Lloh0:
	adrp	x8, _APDS9960_REG_PERS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APDS9960_REG_PERS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _APDS9960_DEFAULT_PERS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _APDS9960_DEFAULT_PERS@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_regmap_write
	cbnz	w0, LBB0_11
; %bb.8:
	ldr	w20, [x19]
Lloh6:
	adrp	x8, _APDS9960_REG_GCONF_1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _APDS9960_REG_GCONF_1@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
Lloh9:
	adrp	x8, _APDS9960_REG_GCONF_1_GFIFO_THRES_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _APDS9960_REG_GCONF_1_GFIFO_THRES_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w22, [x8]
	bl	_BIT
Lloh12:
	adrp	x8, _APDS9960_REG_GCONF_1_GFIFO_THRES_MASK_SHIFT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _APDS9960_REG_GCONF_1_GFIFO_THRES_MASK_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	lsl	w3, w0, w8
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_regmap_update_bits
	cbnz	w0, LBB0_11
; %bb.9:
	ldr	w0, [x19]
Lloh15:
	adrp	x8, _APDS9960_REG_GPENTH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _APDS9960_REG_GPENTH@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _APDS9960_DEFAULT_GPENTH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _APDS9960_DEFAULT_GPENTH@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	bl	_regmap_write
	cbnz	w0, LBB0_11
; %bb.10:
	ldr	w0, [x19]
Lloh21:
	adrp	x8, _APDS9960_REG_GEXTH@GOTPAGE
Lloh22:
	ldr	x8, [x8, _APDS9960_REG_GEXTH@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _APDS9960_DEFAULT_GEXTH@GOTPAGE
Lloh25:
	ldr	x8, [x8, _APDS9960_DEFAULT_GEXTH@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	bl	_regmap_write
	cbz	w0, LBB0_12
LBB0_11:
	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
LBB0_12:
	mov	x0, x19
	mov	w1, #1
	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
	b	_apds9960_set_powermode
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_APDS9960_REG_PERS,4,2          ; @APDS9960_REG_PERS
	.comm	_APDS9960_DEFAULT_PERS,4,2      ; @APDS9960_DEFAULT_PERS
	.comm	_APDS9960_REG_GCONF_1,4,2       ; @APDS9960_REG_GCONF_1
	.comm	_APDS9960_REG_GCONF_1_GFIFO_THRES_MASK,4,2 ; @APDS9960_REG_GCONF_1_GFIFO_THRES_MASK
	.comm	_APDS9960_REG_GCONF_1_GFIFO_THRES_MASK_SHIFT,4,2 ; @APDS9960_REG_GCONF_1_GFIFO_THRES_MASK_SHIFT
	.comm	_APDS9960_REG_GPENTH,4,2        ; @APDS9960_REG_GPENTH
	.comm	_APDS9960_DEFAULT_GPENTH,4,2    ; @APDS9960_DEFAULT_GPENTH
	.comm	_APDS9960_REG_GEXTH,4,2         ; @APDS9960_REG_GEXTH
	.comm	_APDS9960_DEFAULT_GEXTH,4,2     ; @APDS9960_DEFAULT_GEXTH
	.no_dead_strip	_apds9960_chip_init
.subsections_via_symbols
