	.file	"extr_gp2ap020a00f.c_gp2ap020a00f_alter_opmode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	gp2ap020a00f_alter_opmode, @function
gp2ap020a00f_alter_opmode:
.LFB0:
	.cfi_startproc
	endbr64
	mov	r8d, DWORD PTR GP2AP020A00F_OPMODE_ALS[rip]
	cmp	r8d, esi
	je	.L2
	cmp	DWORD PTR GP2AP020A00F_OPMODE_PS[rip], esi
	je	.L2
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	cmp	DWORD PTR GP2AP020A00F_ADD_MODE[rip], edx
	mov	rax, QWORD PTR [rdi]
	je	.L10
	cmp	QWORD PTR GP2AP020A00F_OPMODE_ALS_AND_PS[rip], rax
	je	.L11
	mov	r8d, DWORD PTR GP2AP020A00F_OPMODE_SHUTDOWN[rip]
	mov	esi, r8d
	jmp	gp2ap020a00f_set_operation_mode@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	cmp	QWORD PTR GP2AP020A00F_OPMODE_SHUTDOWN[rip], rax
	cmovne	esi, DWORD PTR GP2AP020A00F_OPMODE_ALS_AND_PS[rip]
	mov	r8d, esi
	mov	esi, r8d
	jmp	gp2ap020a00f_set_operation_mode@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	cmp	r8d, esi
	cmove	r8d, DWORD PTR GP2AP020A00F_OPMODE_PS[rip]
	mov	esi, r8d
	jmp	gp2ap020a00f_set_operation_mode@PLT
	.cfi_endproc
.LFE0:
	.size	gp2ap020a00f_alter_opmode, .-gp2ap020a00f_alter_opmode
	.comm	GP2AP020A00F_OPMODE_SHUTDOWN,8,8
	.comm	GP2AP020A00F_OPMODE_PS,4,4
	.comm	GP2AP020A00F_OPMODE_ALS_AND_PS,8,8
	.comm	GP2AP020A00F_OPMODE_ALS,4,4
	.comm	GP2AP020A00F_ADD_MODE,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_gp2ap020a00f.c_gp2ap020a00f_alter_opmode.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gp2ap020a00f_alter_opmode, %function
gp2ap020a00f_alter_opmode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, r1
	ldr	r1, .L14
	ldr	r1, [r1]
	cmp	r1, r3
	beq	.L2
	ldr	ip, .L14+4
	ldr	ip, [ip]
	cmp	ip, r3
	beq	.L2
	ldr	r3, .L14+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bx	lr
.L2:
	ldr	ip, .L14+12
	str	lr, [sp, #-4]!
	ldr	ip, [ip]
	ldr	lr, [r0]
	cmp	ip, r2
	beq	.L12
	ldr	r2, .L14+16
	ldr	r2, [r2]
	cmp	r2, lr
	beq	.L13
	ldr	r3, .L14+20
	ldr	r1, [r3]
.L6:
	ldr	lr, [sp], #4
	b	gp2ap020a00f_set_operation_mode
.L12:
	ldr	r2, .L14+20
	ldr	r2, [r2]
	cmp	r2, lr
	ldrne	r3, .L14+16
	moveq	r1, r3
	ldrne	r1, [r3]
	ldr	lr, [sp], #4
	b	gp2ap020a00f_set_operation_mode
.L13:
	cmp	r1, r3
	ldreq	r3, .L14+4
	ldreq	r1, [r3]
	b	.L6
.L15:
	.align	2
.L14:
	.word	GP2AP020A00F_OPMODE_ALS
	.word	GP2AP020A00F_OPMODE_PS
	.word	EINVAL
	.word	GP2AP020A00F_ADD_MODE
	.word	GP2AP020A00F_OPMODE_ALS_AND_PS
	.word	GP2AP020A00F_OPMODE_SHUTDOWN
	.size	gp2ap020a00f_alter_opmode, .-gp2ap020a00f_alter_opmode
	.comm	GP2AP020A00F_OPMODE_SHUTDOWN,4,4
	.comm	GP2AP020A00F_OPMODE_PS,4,4
	.comm	GP2AP020A00F_OPMODE_ALS_AND_PS,4,4
	.comm	GP2AP020A00F_OPMODE_ALS,4,4
	.comm	GP2AP020A00F_ADD_MODE,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
