	.file	"extr_sn9c20x.c_mt9m001_init_sensor.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"MT9M001 color sensor detected"
.LC1:
	.string	"MT9M001 mono sensor detected"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"No MT9M001 chip detected, ID = %x\n"
	.align 8
.LC3:
	.string	"MT9M001 sensor initialization failed"
	.text
	.p2align 4
	.type	mt9m001_init_sensor, @function
mt9m001_init_sensor:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xor	esi, esi
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	rdx, 4[rsp]
	call	i2c_r2@PLT
	test	rax, rax
	js	.L17
	mov	esi, DWORD PTR 4[rsp]
	cmp	esi, 33825
	je	.L4
	cmp	esi, 33841
	je	.L5
	cmp	esi, 33809
	je	.L4
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	err@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L18
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	lea	rdi, .LC1[rip]
	call	info@PLT
.L8:
	xor	ebx, ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rax, QWORD PTR mt9m001_init[rip]
	mov	rdi, rbp
	lea	rax, [rax+rbx*8]
	add	rbx, 1
	mov	esi, DWORD PTR 4[rax]
	mov	edx, DWORD PTR [rax]
	call	i2c_w2@PLT
	test	rax, rax
	js	.L19
.L7:
	mov	rdi, QWORD PTR mt9m001_init[rip]
	call	ARRAY_SIZE@PLT
	cmp	eax, ebx
	jg	.L9
	movabs	rax, 4294967297
	mov	QWORD PTR 0[rbp], rax
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	lea	rdi, .LC0[rip]
	call	info@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L19:
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	err@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
	jmp	.L1
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mt9m001_init_sensor, .-mt9m001_init_sensor
	.comm	mt9m001_init,8,8
	.comm	VFLIP_IDX,4,4
	.comm	HFLIP_IDX,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,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_sn9c20x.c_mt9m001_init_sensor.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"MT9M001 color sensor detected\000"
	.align	2
.LC1:
	.ascii	"MT9M001 mono sensor detected\000"
	.align	2
.LC2:
	.ascii	"No MT9M001 chip detected, ID = %x\012\000"
	.align	2
.LC3:
	.ascii	"MT9M001 sensor initialization failed\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mt9m001_init_sensor, %function
mt9m001_init_sensor:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L17
	sub	sp, sp, #8
	mov	r2, sp
	mov	r1, #0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r6, r0
	bl	i2c_r2
	cmp	r0, #0
	blt	.L14
	ldr	r1, [sp]
	ldr	r3, .L17+4
	cmp	r1, r3
	beq	.L4
	add	r3, r3, #16
	cmp	r1, r3
	beq	.L5
	sub	r3, r3, #32
	cmp	r1, r3
	beq	.L4
	ldr	r0, .L17+8
	bl	err
	ldr	r3, .L17+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L5:
	ldr	r0, .L17+16
	bl	info
.L8:
	mov	r4, #0
	ldr	r5, .L17+20
	b	.L7
.L10:
	ldr	r3, [r5]
	mov	r0, r6
	add	r2, r3, r4, lsl #3
	ldr	r1, [r2, #4]
	ldr	r2, [r3, r4, lsl #3]
	bl	i2c_w2
	cmp	r0, #0
	blt	.L16
	add	r4, r4, #1
.L7:
	ldr	r0, [r5]
	bl	ARRAY_SIZE
	cmp	r0, r4
	bgt	.L10
	mov	r3, #1
	mov	r0, #0
	str	r3, [r6]
	str	r3, [r6, #4]
	b	.L1
.L14:
	ldr	r3, .L17+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L4:
	ldr	r0, .L17+28
	bl	info
	b	.L8
.L16:
	ldr	r0, .L17+32
	bl	err
	ldr	r3, .L17+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L15:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	.LC4
	.word	33825
	.word	.LC2
	.word	ENODEV
	.word	.LC1
	.word	mt9m001_init
	.word	EINVAL
	.word	.LC0
	.word	.LC3
	.size	mt9m001_init_sensor, .-mt9m001_init_sensor
	.comm	mt9m001_init,4,4
	.comm	VFLIP_IDX,4,4
	.comm	HFLIP_IDX,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
