	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gp2ap020a00f_write_event_config
_gp2ap020a00f_write_event_config:       ## @gp2ap020a00f_write_event_config
	.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	%r8d, %r14d
	movl	%ecx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	callq	_iio_priv
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mutex_lock
	movl	(%rbx), %eax
	cmpl	$129, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_6
## %bb.2:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_gp2ap020a00f_write_prox_event_config
	jmp	LBB0_12
LBB0_3:
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_7
## %bb.4:
	testl	%r14d, %r14d
	jne	LBB0_9
## %bb.5:
	movq	_GP2AP020A00F_CMD_ALS_HIGH_EV_DIS@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_7:
	testl	%r14d, %r14d
	jne	LBB0_10
## %bb.8:
	movq	_GP2AP020A00F_CMD_ALS_LOW_EV_DIS@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	_GP2AP020A00F_CMD_ALS_HIGH_EV_EN@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	movq	_GP2AP020A00F_CMD_ALS_LOW_EV_EN@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_gp2ap020a00f_exec_cmd
LBB0_12:
	movl	%eax, %ebx
LBB0_13:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IIO_EV_DIR_RISING,4,2          ## @IIO_EV_DIR_RISING
	.comm	_GP2AP020A00F_CMD_ALS_HIGH_EV_EN,4,2 ## @GP2AP020A00F_CMD_ALS_HIGH_EV_EN
	.comm	_GP2AP020A00F_CMD_ALS_HIGH_EV_DIS,4,2 ## @GP2AP020A00F_CMD_ALS_HIGH_EV_DIS
	.comm	_GP2AP020A00F_CMD_ALS_LOW_EV_EN,4,2 ## @GP2AP020A00F_CMD_ALS_LOW_EV_EN
	.comm	_GP2AP020A00F_CMD_ALS_LOW_EV_DIS,4,2 ## @GP2AP020A00F_CMD_ALS_LOW_EV_DIS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_gp2ap020a00f_write_event_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gp2ap020a00f_write_event_config
_gp2ap020a00f_write_event_config:       ; @gp2ap020a00f_write_event_config
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x4
	mov	x22, x3
	mov	x23, x1
	mov	x21, x0
	bl	_iio_priv
	mov	x19, x0
	bl	_mutex_lock
	ldr	w8, [x23]
	cmp	w8, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.2:
	mov	x0, x21
	mov	x1, x20
	bl	_gp2ap020a00f_write_prox_event_config
	b	LBB0_8
LBB0_3:
Lloh0:
	adrp	x8, _IIO_EV_DIR_RISING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IIO_EV_DIR_RISING@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_6
; %bb.4:
Lloh3:
	adrp	x8, _GP2AP020A00F_CMD_ALS_HIGH_EV_EN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GP2AP020A00F_CMD_ALS_HIGH_EV_EN@GOTPAGEOFF]
Lloh5:
	adrp	x9, _GP2AP020A00F_CMD_ALS_HIGH_EV_DIS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _GP2AP020A00F_CMD_ALS_HIGH_EV_DIS@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_6:
Lloh10:
	adrp	x8, _GP2AP020A00F_CMD_ALS_LOW_EV_EN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GP2AP020A00F_CMD_ALS_LOW_EV_EN@GOTPAGEOFF]
Lloh12:
	adrp	x9, _GP2AP020A00F_CMD_ALS_LOW_EV_DIS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _GP2AP020A00F_CMD_ALS_LOW_EV_DIS@GOTPAGEOFF]
LBB0_7:
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gp2ap020a00f_exec_cmd
LBB0_8:
	mov	x20, x0
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IIO_EV_DIR_RISING,4,2          ; @IIO_EV_DIR_RISING
	.comm	_GP2AP020A00F_CMD_ALS_HIGH_EV_EN,4,2 ; @GP2AP020A00F_CMD_ALS_HIGH_EV_EN
	.comm	_GP2AP020A00F_CMD_ALS_HIGH_EV_DIS,4,2 ; @GP2AP020A00F_CMD_ALS_HIGH_EV_DIS
	.comm	_GP2AP020A00F_CMD_ALS_LOW_EV_EN,4,2 ; @GP2AP020A00F_CMD_ALS_LOW_EV_EN
	.comm	_GP2AP020A00F_CMD_ALS_LOW_EV_DIS,4,2 ; @GP2AP020A00F_CMD_ALS_LOW_EV_DIS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_gp2ap020a00f_write_event_config
.subsections_via_symbols
