	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad799x_write_event_config
_ad799x_write_event_config:             ## @ad799x_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r15d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_iio_priv
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_iio_device_claim_direct_mode
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movl	(%r12), %edi
	callq	_BIT
	movq	_AD799X_CHANNEL_SHIFT@GOTPCREL(%rip), %rdx
	movb	(%rdx), %cl
	shll	%cl, %eax
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.2:
	orl	(%r14), %eax
	jmp	LBB0_4
LBB0_3:
	notl	%eax
	andl	(%r14), %eax
LBB0_4:
	movl	%eax, (%r14)
	movb	(%rdx), %cl
	movl	%eax, %edx
	sarl	%cl, %edx
	movq	_AD7998_ALERT_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%esi, %ecx
	notl	%ecx
	andl	%eax, %ecx
	orl	%eax, %esi
	testl	%edx, %edx
	cmovel	%ecx, %esi
	movl	%esi, (%r14)
	movq	%r14, %rdi
	callq	_ad799x_write_config
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_iio_device_release_direct_mode
	movl	%r14d, %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AD799X_CHANNEL_SHIFT,4,2       ## @AD799X_CHANNEL_SHIFT
	.comm	_AD7998_ALERT_EN,4,2            ## @AD7998_ALERT_EN
	.no_dead_strip	_ad799x_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 ad799x_write_event_config
_ad799x_write_event_config:             ; @ad799x_write_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	x21, x4
	mov	x22, x1
	mov	x19, x0
	bl	_iio_priv
	mov	x20, x0
	mov	x0, x19
	bl	_iio_device_claim_direct_mode
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x22]
	bl	_BIT
Lloh0:
	adrp	x8, _AD799X_CHANNEL_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AD799X_CHANNEL_SHIFT@GOTPAGEOFF]
	ldr	w9, [x8]
	lsl	w9, w0, w9
	cbz	w21, LBB0_3
; %bb.2:
	ldr	w10, [x20]
	orr	w9, w10, w9
	b	LBB0_4
LBB0_3:
	ldr	w10, [x20]
	bic	w9, w10, w9
LBB0_4:
	str	w9, [x20]
	ldr	w8, [x8]
	asr	w8, w9, w8
Lloh2:
	adrp	x10, _AD7998_ALERT_EN@GOTPAGE
Lloh3:
	ldr	x10, [x10, _AD7998_ALERT_EN@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	bic	w11, w9, w10
	orr	w9, w10, w9
	cmp	w8, #0
	csel	w1, w11, w9, eq
	str	w1, [x20]
	mov	x0, x20
	bl	_ad799x_write_config
	mov	x20, x0
	mov	x0, x19
	bl	_iio_device_release_direct_mode
	mov	x0, x20
LBB0_5:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AD799X_CHANNEL_SHIFT,4,2       ; @AD799X_CHANNEL_SHIFT
	.comm	_AD7998_ALERT_EN,4,2            ; @AD7998_ALERT_EN
	.no_dead_strip	_ad799x_write_event_config
.subsections_via_symbols
