	.file	"extr_controls.c_ctrl_set_metering_mode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ctrl_set_metering_mode, @function
ctrl_set_metering_mode:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 24
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rsi]
	cmp	eax, 129
	je	.L2
	cmp	eax, 130
	je	.L3
	cmp	eax, 128
	je	.L11
.L5:
	mov	rcx, QWORD PTR V4L2_SCENE_MODE_NONE[rip]
	xor	eax, eax
	cmp	QWORD PTR [rdi], rcx
	je	.L12
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L13
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR MMAL_PARAM_EXPOSUREMETERINGMODE_BACKLIT[rip]
	mov	rcx, QWORD PTR V4L2_SCENE_MODE_NONE[rip]
	mov	DWORD PTR 24[rdi], eax
	xor	eax, eax
	cmp	QWORD PTR [rdi], rcx
	jne	.L1
.L12:
	mov	eax, DWORD PTR 24[rdi]
	mov	edx, DWORD PTR [rdx]
	lea	rcx, 4[rsp]
	mov	r8d, 4
	mov	rsi, QWORD PTR COMP_CAMERA[rip]
	mov	DWORD PTR 4[rsp], eax
	mov	rax, QWORD PTR 16[rdi]
	mov	edi, DWORD PTR 8[rdi]
	mov	rsi, QWORD PTR [rax+rsi*8]
	call	vchiq_mmal_port_parameter_set@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	eax, DWORD PTR MMAL_PARAM_EXPOSUREMETERINGMODE_SPOT[rip]
	mov	DWORD PTR 24[rdi], eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	eax, DWORD PTR MMAL_PARAM_EXPOSUREMETERINGMODE_AVERAGE[rip]
	mov	DWORD PTR 24[rdi], eax
	jmp	.L5
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ctrl_set_metering_mode, .-ctrl_set_metering_mode
	.comm	V4L2_SCENE_MODE_NONE,8,8
	.comm	MMAL_PARAM_EXPOSUREMETERINGMODE_SPOT,4,4
	.comm	MMAL_PARAM_EXPOSUREMETERINGMODE_BACKLIT,4,4
	.comm	MMAL_PARAM_EXPOSUREMETERINGMODE_AVERAGE,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_controls.c_ctrl_set_metering_mode.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ctrl_set_metering_mode, %function
ctrl_set_metering_mode:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	str	lr, [sp, #-4]!
	ldr	r3, [r1]
	ldr	r1, .L14
	sub	sp, sp, #20
	cmp	r3, #129
	ldr	r1, [r1]
	str	r1, [sp, #12]
	mov	r1,#0
	beq	.L2
	cmp	r3, #130
	beq	.L3
	cmp	r3, #128
	beq	.L11
.L5:
	ldr	r3, .L14+4
	ldr	r1, [r0]
	ldr	r3, [r3]
	cmp	r1, r3
	movne	r0, #0
	beq	.L12
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	add	sp, sp, #20
	@ sp needed
	ldr	pc, [sp], #4
.L2:
	ldr	r3, .L14+8
	ldr	r3, [r3]
	str	r3, [r0, #12]
	b	.L5
.L11:
	ldr	r3, .L14+12
	ldr	r3, [r3]
	str	r3, [r0, #12]
	b	.L5
.L3:
	ldr	r3, .L14+16
	ldr	r3, [r3]
	str	r3, [r0, #12]
	b	.L5
.L12:
	mov	r3, #4
	ldr	ip, .L14+20
	ldr	r1, [r0, #8]
	ldr	ip, [ip]
	ldr	r2, [r2]
	ldr	r1, [r1, ip, lsl #2]
	ldr	ip, [r0, #12]
	str	r3, [sp]
	ldr	r0, [r0, #4]
	add	r3, sp, #8
	str	ip, [sp, #8]
	bl	vchiq_mmal_port_parameter_set
	b	.L1
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	V4L2_SCENE_MODE_NONE
	.word	MMAL_PARAM_EXPOSUREMETERINGMODE_BACKLIT
	.word	MMAL_PARAM_EXPOSUREMETERINGMODE_SPOT
	.word	MMAL_PARAM_EXPOSUREMETERINGMODE_AVERAGE
	.word	COMP_CAMERA
	.size	ctrl_set_metering_mode, .-ctrl_set_metering_mode
	.comm	V4L2_SCENE_MODE_NONE,4,4
	.comm	MMAL_PARAM_EXPOSUREMETERINGMODE_SPOT,4,4
	.comm	MMAL_PARAM_EXPOSUREMETERINGMODE_BACKLIT,4,4
	.comm	MMAL_PARAM_EXPOSUREMETERINGMODE_AVERAGE,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
