	.file	"extr_bcm2835-camera.c_enable_camera.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Failed setting camera num, ret %d\n"
	.align 8
.LC1:
	.string	"Failed enabling camera, ret %d\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"enabled camera (refcount %d)\n"
	.text
	.p2align 4
	.type	enable_camera, @function
enable_camera:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	r12, 4[rdi]
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	r8d, DWORD PTR [rdi]
	test	r8d, r8d
	jne	.L2
	mov	rax, QWORD PTR 8[rdi]
	lea	rcx, 20[rdi]
	mov	edi, DWORD PTR 16[rdi]
	mov	r8d, 4
	mov	rdx, QWORD PTR COMP_CAMERA[rip]
	mov	rsi, QWORD PTR [rax+rdx*8]
	mov	edx, DWORD PTR MMAL_PARAMETER_CAMERA_NUM[rip]
	call	vchiq_mmal_port_parameter_set@PLT
	test	eax, eax
	js	.L8
	mov	rax, QWORD PTR 8[rbx]
	mov	rdx, QWORD PTR COMP_CAMERA[rip]
	mov	edi, DWORD PTR 16[rbx]
	mov	rsi, QWORD PTR [rax+rdx*8]
	call	vchiq_mmal_component_enable@PLT
	test	eax, eax
	js	.L5
	mov	r8d, DWORD PTR [rbx]
.L2:
	add	r8d, 1
	mov	esi, DWORD PTR bcm2835_v4l2_debug[rip]
	mov	rdx, r12
	mov	edi, 1
	mov	DWORD PTR [rbx], r8d
	lea	rcx, .LC2[rip]
	call	v4l2_dbg@PLT
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	rdi, r12
	mov	edx, eax
	lea	rsi, .LC0[rip]
	call	v4l2_err@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	edx, eax
	lea	rsi, .LC1[rip]
	mov	rdi, r12
	call	v4l2_err@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	enable_camera, .-enable_camera
	.comm	bcm2835_v4l2_debug,4,4
	.comm	MMAL_PARAMETER_CAMERA_NUM,4,4
	.comm	EINVAL,4,4
	.comm	COMP_CAMERA,8,8
	.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_bcm2835-camera.c_enable_camera.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed setting camera num, ret %d\012\000"
	.align	2
.LC1:
	.ascii	"Failed enabling camera, ret %d\012\000"
	.align	2
.LC2:
	.ascii	"enabled camera (refcount %d)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	enable_camera, %function
enable_camera:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	ldr	r3, [r5], #4
	mov	r4, r0
	cmp	r3, #0
	sub	sp, sp, #8
	bne	.L2
	mov	r3, #4
	ldr	r6, .L9
	ldr	r1, [r0, #8]
	ldr	r2, .L9+4
	ldr	r0, [r6]
	ldr	r2, [r2]
	ldr	r1, [r1, r0, lsl #2]
	str	r3, [sp]
	ldr	r0, [r4, #12]
	add	r3, r4, #16
	bl	vchiq_mmal_port_parameter_set
	subs	r2, r0, #0
	blt	.L8
	ldr	r2, [r6]
	ldr	r3, [r4, #8]
	ldr	r0, [r4, #12]
	ldr	r1, [r3, r2, lsl #2]
	bl	vchiq_mmal_component_enable
	subs	r2, r0, #0
	blt	.L5
	ldr	r3, [r4]
.L2:
	add	r3, r3, #1
	ldr	r1, .L9+8
	str	r3, [r4]
	str	r3, [sp]
	mov	r2, r5
	mov	r0, #1
	ldr	r1, [r1]
	ldr	r3, .L9+12
	bl	v4l2_dbg
	mov	r0, #0
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L8:
	mov	r0, r5
	ldr	r1, .L9+16
	bl	v4l2_err
	ldr	r3, .L9+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L5:
	mov	r0, r5
	ldr	r1, .L9+24
	bl	v4l2_err
	ldr	r3, .L9+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L10:
	.align	2
.L9:
	.word	COMP_CAMERA
	.word	MMAL_PARAMETER_CAMERA_NUM
	.word	bcm2835_v4l2_debug
	.word	.LC2
	.word	.LC0
	.word	EINVAL
	.word	.LC1
	.size	enable_camera, .-enable_camera
	.comm	bcm2835_v4l2_debug,4,4
	.comm	MMAL_PARAMETER_CAMERA_NUM,4,4
	.comm	EINVAL,4,4
	.comm	COMP_CAMERA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
