	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gp2ap020a00f_write_prox_event_config
_gp2ap020a00f_write_prox_event_config:  ## @gp2ap020a00f_write_prox_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_iio_priv
	movq	%rax, %rbx
	movq	_GP2AP020A00F_CMD_PROX_HIGH_EV_EN@GOTPCREL(%rip), %rax
	testl	%r15d, %r15d
	cmoveq	_GP2AP020A00F_CMD_PROX_HIGH_EV_DIS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GP2AP020A00F_CMD_PROX_LOW_EV_EN@GOTPCREL(%rip), %rax
	cmoveq	_GP2AP020A00F_CMD_PROX_LOW_EV_DIS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	je	LBB0_5
## %bb.1:
	movq	(%rbx), %rax
	movq	_GP2AP020A00F_THRESH_PL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_2
## %bb.4:
	movq	_GP2AP020A00F_THRESH_PH@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_2
LBB0_5:
	movq	%rbx, %rdi
	callq	_gp2ap020a00f_exec_cmd
	testl	%eax, %eax
	js	LBB0_3
## %bb.6:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_gp2ap020a00f_exec_cmd
	testl	%eax, %eax
	js	LBB0_3
## %bb.7:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_free_irq
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	testl	%r15d, %r15d
	je	LBB0_9
## %bb.8:
	movq	_IRQF_TRIGGER_RISING@GOTPCREL(%rip), %rax
	movq	_IRQF_TRIGGER_FALLING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_gp2ap020a00f_prox_sensing_handler@GOTPCREL(%rip), %rdx
	leaq	L_.str(%rip), %r8
	jmp	LBB0_10
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_IRQF_TRIGGER_FALLING@GOTPCREL(%rip), %rax
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_gp2ap020a00f_thresh_event_handler@GOTPCREL(%rip), %rdx
	leaq	L_.str.1(%rip), %r8
LBB0_10:
	xorl	%esi, %esi
	movq	%r14, %r9
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_request_threaded_irq           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GP2AP020A00F_CMD_PROX_HIGH_EV_EN,4,2 ## @GP2AP020A00F_CMD_PROX_HIGH_EV_EN
	.comm	_GP2AP020A00F_CMD_PROX_HIGH_EV_DIS,4,2 ## @GP2AP020A00F_CMD_PROX_HIGH_EV_DIS
	.comm	_GP2AP020A00F_CMD_PROX_LOW_EV_EN,4,2 ## @GP2AP020A00F_CMD_PROX_LOW_EV_EN
	.comm	_GP2AP020A00F_CMD_PROX_LOW_EV_DIS,4,2 ## @GP2AP020A00F_CMD_PROX_LOW_EV_DIS
	.comm	_GP2AP020A00F_THRESH_PL,8,3     ## @GP2AP020A00F_THRESH_PL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GP2AP020A00F_THRESH_PH,8,3     ## @GP2AP020A00F_THRESH_PH
	.comm	_gp2ap020a00f_prox_sensing_handler,4,2 ## @gp2ap020a00f_prox_sensing_handler
	.comm	_IRQF_TRIGGER_RISING,4,2        ## @IRQF_TRIGGER_RISING
	.comm	_IRQF_TRIGGER_FALLING,4,2       ## @IRQF_TRIGGER_FALLING
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gp2ap020a00f_prox_sensing"

	.comm	_gp2ap020a00f_thresh_event_handler,4,2 ## @gp2ap020a00f_thresh_event_handler
L_.str.1:                               ## @.str.1
	.asciz	"gp2ap020a00f_thresh_event"

	.no_dead_strip	_gp2ap020a00f_write_prox_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_prox_event_config
_gp2ap020a00f_write_prox_event_config:  ; @gp2ap020a00f_write_prox_event_config
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_iio_priv
	mov	x21, x0
Lloh0:
	adrp	x8, _GP2AP020A00F_CMD_PROX_HIGH_EV_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GP2AP020A00F_CMD_PROX_HIGH_EV_EN@GOTPAGEOFF]
Lloh2:
	adrp	x9, _GP2AP020A00F_CMD_PROX_HIGH_EV_DIS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GP2AP020A00F_CMD_PROX_HIGH_EV_DIS@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
Lloh4:
	adrp	x8, _GP2AP020A00F_CMD_PROX_LOW_EV_EN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GP2AP020A00F_CMD_PROX_LOW_EV_EN@GOTPAGEOFF]
Lloh6:
	adrp	x9, _GP2AP020A00F_CMD_PROX_LOW_EV_DIS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GP2AP020A00F_CMD_PROX_LOW_EV_DIS@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w22, [x8]
	cbz	w20, LBB0_3
; %bb.1:
	ldr	x8, [x21]
Lloh8:
	adrp	x9, _GP2AP020A00F_THRESH_PL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GP2AP020A00F_THRESH_PL@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	x9, [x8, x9, lsl #3]
	cbz	x9, LBB0_7
; %bb.2:
Lloh11:
	adrp	x9, _GP2AP020A00F_THRESH_PH@GOTPAGE
Lloh12:
	ldr	x9, [x9, _GP2AP020A00F_THRESH_PH@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_7
LBB0_3:
	mov	x0, x21
	bl	_gp2ap020a00f_exec_cmd
	tbnz	w0, #31, LBB0_8
; %bb.4:
	mov	x0, x21
	mov	x1, x22
	bl	_gp2ap020a00f_exec_cmd
	tbnz	w0, #31, LBB0_8
; %bb.5:
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	mov	x1, x19
	bl	_free_irq
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	cbz	w20, LBB0_9
; %bb.6:
Lloh14:
	adrp	x8, _IRQF_TRIGGER_RISING@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IRQF_TRIGGER_RISING@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _IRQF_TRIGGER_FALLING@GOTPAGE
Lloh18:
	ldr	x9, [x9, _IRQF_TRIGGER_FALLING@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh20:
	adrp	x9, _IRQF_ONESHOT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w3, w8, w9
Lloh23:
	adrp	x2, _gp2ap020a00f_prox_sensing_handler@GOTPAGE
Lloh24:
	ldr	x2, [x2, _gp2ap020a00f_prox_sensing_handler@GOTPAGEOFF]
Lloh25:
	adrp	x4, l_.str@PAGE
Lloh26:
	add	x4, x4, l_.str@PAGEOFF
	b	LBB0_10
LBB0_7:
Lloh27:
	adrp	x8, _EINVAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh30:
	adrp	x8, _IRQF_TRIGGER_FALLING@GOTPAGE
Lloh31:
	ldr	x8, [x8, _IRQF_TRIGGER_FALLING@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	adrp	x9, _IRQF_ONESHOT@GOTPAGE
Lloh34:
	ldr	x9, [x9, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w3, w9, w8
Lloh36:
	adrp	x2, _gp2ap020a00f_thresh_event_handler@GOTPAGE
Lloh37:
	ldr	x2, [x2, _gp2ap020a00f_thresh_event_handler@GOTPAGEOFF]
Lloh38:
	adrp	x4, l_.str.1@PAGE
Lloh39:
	add	x4, x4, l_.str.1@PAGEOFF
LBB0_10:
	mov	x1, #0
	mov	x5, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_request_threaded_irq
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_GP2AP020A00F_CMD_PROX_HIGH_EV_EN,4,2 ; @GP2AP020A00F_CMD_PROX_HIGH_EV_EN
	.comm	_GP2AP020A00F_CMD_PROX_HIGH_EV_DIS,4,2 ; @GP2AP020A00F_CMD_PROX_HIGH_EV_DIS
	.comm	_GP2AP020A00F_CMD_PROX_LOW_EV_EN,4,2 ; @GP2AP020A00F_CMD_PROX_LOW_EV_EN
	.comm	_GP2AP020A00F_CMD_PROX_LOW_EV_DIS,4,2 ; @GP2AP020A00F_CMD_PROX_LOW_EV_DIS
	.comm	_GP2AP020A00F_THRESH_PL,8,3     ; @GP2AP020A00F_THRESH_PL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GP2AP020A00F_THRESH_PH,8,3     ; @GP2AP020A00F_THRESH_PH
	.comm	_gp2ap020a00f_prox_sensing_handler,4,2 ; @gp2ap020a00f_prox_sensing_handler
	.comm	_IRQF_TRIGGER_RISING,4,2        ; @IRQF_TRIGGER_RISING
	.comm	_IRQF_TRIGGER_FALLING,4,2       ; @IRQF_TRIGGER_FALLING
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gp2ap020a00f_prox_sensing"

	.comm	_gp2ap020a00f_thresh_event_handler,4,2 ; @gp2ap020a00f_thresh_event_handler
l_.str.1:                               ; @.str.1
	.asciz	"gp2ap020a00f_thresh_event"

	.no_dead_strip	_gp2ap020a00f_write_prox_event_config
.subsections_via_symbols
