	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gp2ap020a00f_alter_opmode
_gp2ap020a00f_alter_opmode:             ## @gp2ap020a00f_alter_opmode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_GP2AP020A00F_OPMODE_ALS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_GP2AP020A00F_OPMODE_PS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%esi, %eax
	je	LBB0_2
## %bb.1:
	cmpl	%esi, %ecx
	je	LBB0_2
## %bb.10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_2:
	movq	_GP2AP020A00F_ADD_MODE@GOTPCREL(%rip), %r9
	movq	(%rdi), %r8
	cmpl	%edx, (%r9)
	jne	LBB0_5
## %bb.3:
	movq	_GP2AP020A00F_OPMODE_SHUTDOWN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r8
	je	LBB0_9
## %bb.4:
	movq	_GP2AP020A00F_OPMODE_ALS_AND_PS@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_5:
	movq	_GP2AP020A00F_OPMODE_ALS_AND_PS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %r8
	jne	LBB0_7
## %bb.6:
	cmpl	%esi, %eax
	cmovnel	%eax, %ecx
	movl	%ecx, %esi
	popq	%rbp
	jmp	_gp2ap020a00f_set_operation_mode ## TAILCALL
LBB0_7:
	movq	_GP2AP020A00F_OPMODE_SHUTDOWN@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %esi
LBB0_9:
	popq	%rbp
	jmp	_gp2ap020a00f_set_operation_mode ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GP2AP020A00F_OPMODE_ALS,4,2    ## @GP2AP020A00F_OPMODE_ALS
	.comm	_GP2AP020A00F_OPMODE_PS,4,2     ## @GP2AP020A00F_OPMODE_PS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GP2AP020A00F_ADD_MODE,4,2      ## @GP2AP020A00F_ADD_MODE
	.comm	_GP2AP020A00F_OPMODE_SHUTDOWN,8,3 ## @GP2AP020A00F_OPMODE_SHUTDOWN
	.comm	_GP2AP020A00F_OPMODE_ALS_AND_PS,8,3 ## @GP2AP020A00F_OPMODE_ALS_AND_PS
	.no_dead_strip	_gp2ap020a00f_alter_opmode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gp2ap020a00f_alter_opmode
_gp2ap020a00f_alter_opmode:             ; @gp2ap020a00f_alter_opmode
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _GP2AP020A00F_OPMODE_ALS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GP2AP020A00F_OPMODE_ALS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _GP2AP020A00F_OPMODE_PS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GP2AP020A00F_OPMODE_PS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w1
	ccmp	w9, w1, #4, ne
	b.ne	LBB0_4
; %bb.1:
Lloh6:
	adrp	x10, _GP2AP020A00F_ADD_MODE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _GP2AP020A00F_ADD_MODE@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x10]
	ldr	x10, [x0]
	cmp	w11, w2
	b.ne	LBB0_5
; %bb.2:
Lloh9:
	adrp	x8, _GP2AP020A00F_OPMODE_SHUTDOWN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GP2AP020A00F_OPMODE_SHUTDOWN@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x10, x8
	b.eq	LBB0_9
; %bb.3:
Lloh12:
	adrp	x8, _GP2AP020A00F_OPMODE_ALS_AND_PS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GP2AP020A00F_OPMODE_ALS_AND_PS@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_5:
Lloh17:
	adrp	x11, _GP2AP020A00F_OPMODE_ALS_AND_PS@GOTPAGE
Lloh18:
	ldr	x11, [x11, _GP2AP020A00F_OPMODE_ALS_AND_PS@GOTPAGEOFF]
Lloh19:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_7
; %bb.6:
	cmp	w8, w1
	csel	w1, w9, w8, eq
	b	_gp2ap020a00f_set_operation_mode
LBB0_7:
Lloh20:
	adrp	x8, _GP2AP020A00F_OPMODE_SHUTDOWN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _GP2AP020A00F_OPMODE_SHUTDOWN@GOTPAGEOFF]
LBB0_8:
	ldr	w1, [x8]
LBB0_9:
	b	_gp2ap020a00f_set_operation_mode
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_GP2AP020A00F_OPMODE_ALS,4,2    ; @GP2AP020A00F_OPMODE_ALS
	.comm	_GP2AP020A00F_OPMODE_PS,4,2     ; @GP2AP020A00F_OPMODE_PS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GP2AP020A00F_ADD_MODE,4,2      ; @GP2AP020A00F_ADD_MODE
	.comm	_GP2AP020A00F_OPMODE_SHUTDOWN,8,3 ; @GP2AP020A00F_OPMODE_SHUTDOWN
	.comm	_GP2AP020A00F_OPMODE_ALS_AND_PS,8,3 ; @GP2AP020A00F_OPMODE_ALS_AND_PS
	.no_dead_strip	_gp2ap020a00f_alter_opmode
.subsections_via_symbols
