	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gp2ap020a00f_set_operation_mode
_gp2ap020a00f_set_operation_mode:       ## @gp2ap020a00f_set_operation_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_GP2AP020A00F_OPMODE_SHUTDOWN@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_2
## %bb.1:
	movl	%r15d, %ebx
LBB0_9:
	movl	4(%r14), %edi
	movq	_GP2AP020A00F_OP_MASK@GOTPCREL(%rip), %rax
	movq	_GP2AP020A00F_OP2_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_GP2AP020A00F_OP_REG@GOTPCREL(%rip), %rax
	movq	_GP2AP020A00F_OP3_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	_GP2AP020A00F_TYPE_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_opmode_regs_settings@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	shlq	$4, %rbx
	movl	(%rax,%rbx), %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_11
## %bb.10:
	movl	%r15d, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_2:
	movl	4(%r14), %edi
	movq	_GP2AP020A00F_OP_REG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_11
## %bb.3:
	movq	_opmode_regs_settings@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r15d, %ebx
	movq	%rbx, %r13
	shlq	$4, %r13
	movq	_GP2AP020A00F_OP_MASK@GOTPCREL(%rip), %rcx
	movl	-44(%rbp), %edx
	xorl	(%rax,%r13), %edx
	testl	%edx, (%rcx)
	je	LBB0_6
## %bb.4:
	movl	4(%r14), %edi
	movl	(%r12), %esi
	movq	_GP2AP020A00F_OP3_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_GP2AP020A00F_OP3_SHUTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_11
## %bb.5:
	movq	_opmode_regs_settings@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_6:
	movl	4(%r14), %edi
	movq	_GP2AP020A00F_ALS_REG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_GP2AP020A00F_PRST_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	4(%rax,%r13), %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_11
## %bb.7:
	movl	4(%r14), %edi
	movq	_GP2AP020A00F_PS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GP2AP020A00F_INTTYPE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_opmode_regs_settings@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	8(%rax,%r13), %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_11
## %bb.8:
	movl	4(%r14), %edi
	movq	_GP2AP020A00F_LED_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GP2AP020A00F_PIN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%r12), %rax
	movl	12(%rax,%r13), %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	jns	LBB0_9
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GP2AP020A00F_OPMODE_SHUTDOWN,4,2 ## @GP2AP020A00F_OPMODE_SHUTDOWN
	.comm	_GP2AP020A00F_OP_REG,4,2        ## @GP2AP020A00F_OP_REG
	.comm	_opmode_regs_settings,8,3       ## @opmode_regs_settings
	.comm	_GP2AP020A00F_OP_MASK,4,2       ## @GP2AP020A00F_OP_MASK
	.comm	_GP2AP020A00F_OP3_MASK,4,2      ## @GP2AP020A00F_OP3_MASK
	.comm	_GP2AP020A00F_OP3_SHUTDOWN,4,2  ## @GP2AP020A00F_OP3_SHUTDOWN
	.comm	_GP2AP020A00F_ALS_REG,4,2       ## @GP2AP020A00F_ALS_REG
	.comm	_GP2AP020A00F_PRST_MASK,4,2     ## @GP2AP020A00F_PRST_MASK
	.comm	_GP2AP020A00F_PS_REG,4,2        ## @GP2AP020A00F_PS_REG
	.comm	_GP2AP020A00F_INTTYPE_MASK,4,2  ## @GP2AP020A00F_INTTYPE_MASK
	.comm	_GP2AP020A00F_LED_REG,4,2       ## @GP2AP020A00F_LED_REG
	.comm	_GP2AP020A00F_PIN_MASK,4,2      ## @GP2AP020A00F_PIN_MASK
	.comm	_GP2AP020A00F_OP2_MASK,4,2      ## @GP2AP020A00F_OP2_MASK
	.comm	_GP2AP020A00F_TYPE_MASK,4,2     ## @GP2AP020A00F_TYPE_MASK
	.no_dead_strip	_gp2ap020a00f_set_operation_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gp2ap020a00f_set_operation_mode
_gp2ap020a00f_set_operation_mode:       ; @gp2ap020a00f_set_operation_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GP2AP020A00F_OPMODE_SHUTDOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GP2AP020A00F_OPMODE_SHUTDOWN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x21, _GP2AP020A00F_OP_REG@GOTPAGE
Lloh4:
	ldr	x21, [x21, _GP2AP020A00F_OP_REG@GOTPAGEOFF]
	cmp	w8, w1
	b.ne	LBB0_4
; %bb.1:
	mov	w22, w19
LBB0_2:
	ldr	w0, [x20, #4]
	ldr	w1, [x21]
Lloh5:
	adrp	x8, _GP2AP020A00F_OP_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GP2AP020A00F_OP_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _GP2AP020A00F_OP2_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GP2AP020A00F_OP2_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _GP2AP020A00F_OP3_MASK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _GP2AP020A00F_OP3_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh14:
	adrp	x9, _GP2AP020A00F_TYPE_MASK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _GP2AP020A00F_TYPE_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w2, w8, w9
Lloh17:
	adrp	x8, _opmode_regs_settings@GOTPAGE
Lloh18:
	ldr	x8, [x8, _opmode_regs_settings@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	lsl	x9, x22, #4
	ldr	w3, [x8, x9]
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_11
; %bb.3:
	mov	w0, #0
	str	w19, [x20]
	b	LBB0_11
LBB0_4:
	ldr	w0, [x20, #4]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_11
; %bb.5:
Lloh20:
	adrp	x23, _opmode_regs_settings@GOTPAGE
Lloh21:
	ldr	x23, [x23, _opmode_regs_settings@GOTPAGEOFF]
	ldr	x8, [x23]
	mov	w22, w19
	lsl	x9, x22, #4
	ldr	w9, [x8, x9]
Lloh22:
	adrp	x10, _GP2AP020A00F_OP_MASK@GOTPAGE
Lloh23:
	ldr	x10, [x10, _GP2AP020A00F_OP_MASK@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	ldr	w11, [sp, #12]
	eor	w9, w11, w9
	tst	w9, w10
	b.eq	LBB0_8
; %bb.6:
	ldr	w0, [x20, #4]
	ldr	w1, [x21]
Lloh25:
	adrp	x8, _GP2AP020A00F_OP3_MASK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _GP2AP020A00F_OP3_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
Lloh28:
	adrp	x8, _GP2AP020A00F_OP3_SHUTDOWN@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GP2AP020A00F_OP3_SHUTDOWN@GOTPAGEOFF]
Lloh30:
	ldr	w3, [x8]
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_11
; %bb.7:
	ldr	x8, [x23]
LBB0_8:
	ldr	w0, [x20, #4]
Lloh31:
	adrp	x9, _GP2AP020A00F_ALS_REG@GOTPAGE
Lloh32:
	ldr	x9, [x9, _GP2AP020A00F_ALS_REG@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x9]
Lloh34:
	adrp	x9, _GP2AP020A00F_PRST_MASK@GOTPAGE
Lloh35:
	ldr	x9, [x9, _GP2AP020A00F_PRST_MASK@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x9]
	add	x8, x8, x22, lsl #4
	ldr	w3, [x8, #4]
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_11
; %bb.9:
	ldr	w0, [x20, #4]
Lloh37:
	adrp	x8, _GP2AP020A00F_PS_REG@GOTPAGE
Lloh38:
	ldr	x8, [x8, _GP2AP020A00F_PS_REG@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
Lloh40:
	adrp	x8, _GP2AP020A00F_INTTYPE_MASK@GOTPAGE
Lloh41:
	ldr	x8, [x8, _GP2AP020A00F_INTTYPE_MASK@GOTPAGEOFF]
Lloh42:
	ldr	w2, [x8]
	ldr	x8, [x23]
	add	x8, x8, x22, lsl #4
	ldr	w3, [x8, #8]
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_11
; %bb.10:
	ldr	w0, [x20, #4]
Lloh43:
	adrp	x8, _GP2AP020A00F_LED_REG@GOTPAGE
Lloh44:
	ldr	x8, [x8, _GP2AP020A00F_LED_REG@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
Lloh46:
	adrp	x8, _GP2AP020A00F_PIN_MASK@GOTPAGE
Lloh47:
	ldr	x8, [x8, _GP2AP020A00F_PIN_MASK@GOTPAGEOFF]
Lloh48:
	ldr	w2, [x8]
	ldr	x8, [x23]
	add	x8, x8, x22, lsl #4
	ldr	w3, [x8, #12]
	bl	_regmap_update_bits
	tbz	w0, #31, LBB0_2
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_GP2AP020A00F_OPMODE_SHUTDOWN,4,2 ; @GP2AP020A00F_OPMODE_SHUTDOWN
	.comm	_GP2AP020A00F_OP_REG,4,2        ; @GP2AP020A00F_OP_REG
	.comm	_opmode_regs_settings,8,3       ; @opmode_regs_settings
	.comm	_GP2AP020A00F_OP_MASK,4,2       ; @GP2AP020A00F_OP_MASK
	.comm	_GP2AP020A00F_OP3_MASK,4,2      ; @GP2AP020A00F_OP3_MASK
	.comm	_GP2AP020A00F_OP3_SHUTDOWN,4,2  ; @GP2AP020A00F_OP3_SHUTDOWN
	.comm	_GP2AP020A00F_ALS_REG,4,2       ; @GP2AP020A00F_ALS_REG
	.comm	_GP2AP020A00F_PRST_MASK,4,2     ; @GP2AP020A00F_PRST_MASK
	.comm	_GP2AP020A00F_PS_REG,4,2        ; @GP2AP020A00F_PS_REG
	.comm	_GP2AP020A00F_INTTYPE_MASK,4,2  ; @GP2AP020A00F_INTTYPE_MASK
	.comm	_GP2AP020A00F_LED_REG,4,2       ; @GP2AP020A00F_LED_REG
	.comm	_GP2AP020A00F_PIN_MASK,4,2      ; @GP2AP020A00F_PIN_MASK
	.comm	_GP2AP020A00F_OP2_MASK,4,2      ; @GP2AP020A00F_OP2_MASK
	.comm	_GP2AP020A00F_TYPE_MASK,4,2     ; @GP2AP020A00F_TYPE_MASK
	.no_dead_strip	_gp2ap020a00f_set_operation_mode
.subsections_via_symbols
