	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad7291_write_event_config
_ad7291_write_event_config:             ## @ad7291_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, %r12d
	movq	%rsi, %rbx
	callq	_iio_priv
	movq	%rax, %r15
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%r15), %r13d
	movl	$15, %edi
	subq	8(%rbx), %rdi
	callq	_BIT
	cmpl	$128, (%rbx)
	jne	LBB0_9
## %bb.1:
	movl	4(%r15), %ecx
	testl	%r12d, %r12d
	je	LBB0_2
## %bb.5:
	xorl	%ebx, %ebx
	testl	%eax, %ecx
	jne	LBB0_10
## %bb.6:
	orl	%eax, %ecx
	jmp	LBB0_7
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_2:
	testl	%eax, %ecx
	je	LBB0_3
## %bb.4:
	notl	%eax
	andl	%eax, %ecx
LBB0_7:
	movl	%ecx, 4(%r15)
	movq	_AD7291_AUTOCYCLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r12d, %eax
	notl	%eax
	andl	%r13d, %eax
	orl	%ecx, %r12d
	orl	%r13d, %r12d
	testl	%ecx, %ecx
	cmovel	%eax, %r12d
	movq	_AD7291_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_ad7291_i2c_write
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_10
## %bb.8:
	movl	%r12d, (%r15)
	jmp	LBB0_10
LBB0_3:
	xorl	%ebx, %ebx
LBB0_10:
	movq	%r14, %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	_AD7291_AUTOCYCLE,4,2           ## @AD7291_AUTOCYCLE
	.comm	_AD7291_COMMAND,4,2             ## @AD7291_COMMAND
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ad7291_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 ad7291_write_event_config
_ad7291_write_event_config:             ; @ad7291_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	x21, x4
	mov	x22, x1
	bl	_iio_priv
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	w23, [x20]
	ldr	x8, [x22, #8]
	mov	w9, #15
	sub	x0, x9, x8
	bl	_BIT
	ldr	w8, [x22]
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.1:
	ldr	w8, [x20, #4]
	and	w9, w8, w0
	cbz	w21, LBB0_5
; %bb.2:
	cbnz	w9, LBB0_9
; %bb.3:
	orr	w8, w8, w0
	b	LBB0_7
LBB0_4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_5:
	cbz	w9, LBB0_9
; %bb.6:
	bic	w8, w8, w0
LBB0_7:
	str	w8, [x20, #4]
Lloh3:
	adrp	x9, _AD7291_AUTOCYCLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AD7291_AUTOCYCLE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	bic	w10, w23, w9
	orr	w9, w8, w9
	orr	w9, w9, w23
	cmp	w8, #0
	csel	w22, w10, w9, eq
Lloh6:
	adrp	x8, _AD7291_COMMAND@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AD7291_COMMAND@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	bl	_ad7291_i2c_write
	mov	x21, x0
	tbnz	w0, #31, LBB0_10
; %bb.8:
	str	w22, [x20]
	b	LBB0_10
LBB0_9:
	mov	w21, #0
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AD7291_AUTOCYCLE,4,2           ; @AD7291_AUTOCYCLE
	.comm	_AD7291_COMMAND,4,2             ; @AD7291_COMMAND
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ad7291_write_event_config
.subsections_via_symbols
