	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bh1770_chip_on
_bh1770_chip_on:                        ## @bh1770_chip_on
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	32(%rdi), %edi
	callq	_ARRAY_SIZE
	movl	32(%rbx), %esi
	movl	%eax, %edi
	callq	_regulator_bulk_enable
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	_BH1770_STARTUP_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leal	(%rdi,%rdi), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_usleep_range
	movl	12(%rbx), %edi
	movq	_BH1770_ALS_CONTROL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_BH1770_SWRESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_i2c_smbus_write_byte_data
	movq	_BH1770_RESET_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leal	(%rdi,%rdi), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_usleep_range
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rbx)
	movl	12(%rbx), %edi
	movl	(%r14), %esi
	movq	_BH1770_STANDALONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_i2c_smbus_write_byte_data
	movq	_BH1770_LUX_RANGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rbx)
	movq	$0, (%rbx)
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BH1770_STARTUP_DELAY,4,2       ## @BH1770_STARTUP_DELAY
	.comm	_BH1770_ALS_CONTROL,4,2         ## @BH1770_ALS_CONTROL
	.comm	_BH1770_SWRESET,4,2             ## @BH1770_SWRESET
	.comm	_BH1770_RESET_TIME,4,2          ## @BH1770_RESET_TIME
	.comm	_BH1770_STANDALONE,4,2          ## @BH1770_STANDALONE
	.comm	_BH1770_LUX_RANGE,4,2           ## @BH1770_LUX_RANGE
	.no_dead_strip	_bh1770_chip_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bh1770_chip_on
_bh1770_chip_on:                        ; @bh1770_chip_on
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #32]
	bl	_ARRAY_SIZE
	ldr	w1, [x19, #32]
	bl	_regulator_bulk_enable
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _BH1770_STARTUP_DELAY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BH1770_STARTUP_DELAY@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	lsl	w1, w0, #1
	bl	_usleep_range
	ldr	w0, [x19, #12]
Lloh3:
	adrp	x20, _BH1770_ALS_CONTROL@GOTPAGE
Lloh4:
	ldr	x20, [x20, _BH1770_ALS_CONTROL@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh5:
	adrp	x8, _BH1770_SWRESET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BH1770_SWRESET@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	bl	_i2c_smbus_write_byte_data
Lloh8:
	adrp	x8, _BH1770_RESET_TIME@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BH1770_RESET_TIME@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	lsl	w1, w0, #1
	bl	_usleep_range
	stp	xzr, xzr, [x19, #16]
	ldr	w0, [x19, #12]
	ldr	w1, [x20]
Lloh11:
	adrp	x8, _BH1770_STANDALONE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BH1770_STANDALONE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_i2c_smbus_write_byte_data
Lloh14:
	adrp	x8, _BH1770_LUX_RANGE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BH1770_LUX_RANGE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	str	xzr, [x19]
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BH1770_STARTUP_DELAY,4,2       ; @BH1770_STARTUP_DELAY
	.comm	_BH1770_ALS_CONTROL,4,2         ; @BH1770_ALS_CONTROL
	.comm	_BH1770_SWRESET,4,2             ; @BH1770_SWRESET
	.comm	_BH1770_RESET_TIME,4,2          ; @BH1770_RESET_TIME
	.comm	_BH1770_STANDALONE,4,2          ; @BH1770_STANDALONE
	.comm	_BH1770_LUX_RANGE,4,2           ; @BH1770_LUX_RANGE
	.no_dead_strip	_bh1770_chip_on
.subsections_via_symbols
