	.file	"extr_vl6180.c_vl6180_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"invalid model ID %02x\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"device is not fresh out of reset\n"
	.text
	.p2align 4
	.type	vl6180_init, @function
vl6180_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	r12, QWORD PTR 8[rdi]
	mov	esi, DWORD PTR VL6180_MODEL_ID[rip]
	mov	rdi, r12
	call	vl6180_read_byte@PLT
	test	eax, eax
	js	.L1
	cmp	DWORD PTR VL6180_MODEL_ID_VAL[rip], eax
	jne	.L10
	mov	esi, 1
	mov	rdi, rbp
	call	vl6180_hold@PLT
	test	eax, eax
	js	.L1
	mov	esi, DWORD PTR VL6180_OUT_OF_RESET[rip]
	mov	rdi, r12
	call	vl6180_read_byte@PLT
	test	eax, eax
	js	.L1
	cmp	eax, 1
	je	.L4
	lea	rsi, .LC1[rip]
	mov	rdi, r12
	call	dev_info@PLT
.L4:
	mov	esi, DWORD PTR VL6180_INTR_CONFIG[rip]
	mov	edx, DWORD PTR VL6180_ALS_READY[rip]
	mov	rdi, r12
	or	edx, DWORD PTR VL6180_RANGE_READY[rip]
	call	vl6180_write_byte@PLT
	test	eax, eax
	js	.L1
	mov	DWORD PTR 0[rbp], 100
	mov	edx, DWORD PTR VL6180_ALS_IT_100[rip]
	mov	rdi, r12
	mov	esi, DWORD PTR VL6180_ALS_IT[rip]
	call	vl6180_write_word@PLT
	test	eax, eax
	js	.L1
	mov	DWORD PTR 4[rbp], 1000
	mov	edx, DWORD PTR VL6180_ALS_GAIN_1[rip]
	mov	rdi, r12
	mov	esi, DWORD PTR VL6180_ALS_GAIN[rip]
	call	vl6180_write_byte@PLT
	test	eax, eax
	js	.L1
	mov	esi, DWORD PTR VL6180_OUT_OF_RESET[rip]
	xor	edx, edx
	mov	rdi, r12
	call	vl6180_write_byte@PLT
	test	eax, eax
	js	.L1
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	xor	esi, esi
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	vl6180_hold@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	edx, eax
	lea	rsi, .LC0[rip]
	mov	rdi, r12
	call	dev_err@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	vl6180_init, .-vl6180_init
	.comm	VL6180_RANGE_READY,4,4
	.comm	VL6180_OUT_OF_RESET,4,4
	.comm	VL6180_MODEL_ID_VAL,4,4
	.comm	VL6180_MODEL_ID,4,4
	.comm	VL6180_INTR_CONFIG,4,4
	.comm	VL6180_ALS_READY,4,4
	.comm	VL6180_ALS_IT_100,4,4
	.comm	VL6180_ALS_IT,4,4
	.comm	VL6180_ALS_GAIN_1,4,4
	.comm	VL6180_ALS_GAIN,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_vl6180.c_vl6180_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"invalid model ID %02x\012\000"
	.align	2
.LC1:
	.ascii	"device is not fresh out of reset\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vl6180_init, %function
vl6180_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L11
	ldr	r5, [r0, #8]
	mov	r4, r0
	ldr	r1, [r3]
	mov	r0, r5
	bl	vl6180_read_byte
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	ldr	r3, .L11+4
	ldr	r3, [r3]
	cmp	r3, r0
	bne	.L10
	mov	r1, #1
	mov	r0, r4
	bl	vl6180_hold
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	ldr	r6, .L11+8
	mov	r0, r5
	ldr	r1, [r6]
	bl	vl6180_read_byte
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	cmp	r0, #1
	beq	.L4
	mov	r0, r5
	ldr	r1, .L11+12
	bl	dev_info
.L4:
	ldr	r2, .L11+16
	ldr	r3, .L11+20
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, .L11+24
	orr	r2, r1, r2
	mov	r0, r5
	ldr	r1, [r3]
	bl	vl6180_write_byte
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	mov	r1, #100
	ldr	r3, .L11+28
	ldr	r2, .L11+32
	str	r1, [r4]
	mov	r0, r5
	ldr	r2, [r2]
	ldr	r1, [r3]
	bl	vl6180_write_word
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	mov	r1, #1000
	ldr	r3, .L11+36
	ldr	r2, .L11+40
	str	r1, [r4, #4]
	mov	r0, r5
	ldr	r2, [r2]
	ldr	r1, [r3]
	bl	vl6180_write_byte
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	mov	r0, r5
	mov	r2, #0
	ldr	r1, [r6]
	bl	vl6180_write_byte
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	mov	r1, #0
	b	vl6180_hold
.L10:
	mov	r2, r0
	ldr	r1, .L11+44
	mov	r0, r5
	bl	dev_err
	ldr	r3, .L11+48
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L12:
	.align	2
.L11:
	.word	VL6180_MODEL_ID
	.word	VL6180_MODEL_ID_VAL
	.word	VL6180_OUT_OF_RESET
	.word	.LC1
	.word	VL6180_ALS_READY
	.word	VL6180_RANGE_READY
	.word	VL6180_INTR_CONFIG
	.word	VL6180_ALS_IT
	.word	VL6180_ALS_IT_100
	.word	VL6180_ALS_GAIN
	.word	VL6180_ALS_GAIN_1
	.word	.LC0
	.word	ENODEV
	.size	vl6180_init, .-vl6180_init
	.comm	VL6180_RANGE_READY,4,4
	.comm	VL6180_OUT_OF_RESET,4,4
	.comm	VL6180_MODEL_ID_VAL,4,4
	.comm	VL6180_MODEL_ID,4,4
	.comm	VL6180_INTR_CONFIG,4,4
	.comm	VL6180_ALS_READY,4,4
	.comm	VL6180_ALS_IT_100,4,4
	.comm	VL6180_ALS_IT,4,4
	.comm	VL6180_ALS_GAIN_1,4,4
	.comm	VL6180_ALS_GAIN,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
