	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ads1015_write_event_config
_ads1015_write_event_config:            ## @ads1015_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	callq	_iio_priv
	movq	%rax, %r14
	movq	_IIO_EV_DIR_EITHER@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	_ADS1015_CFG_COMP_MODE_WINDOW@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_ADS1015_CFG_COMP_MODE_TRAD@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r13d
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	callq	_iio_device_claim_direct_mode
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_ads1015_enable_event_config
	jmp	LBB0_7
LBB0_6:
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_ads1015_disable_event_config
LBB0_7:
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_iio_device_release_direct_mode
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IIO_EV_DIR_EITHER,4,2          ## @IIO_EV_DIR_EITHER
	.comm	_ADS1015_CFG_COMP_MODE_WINDOW,4,2 ## @ADS1015_CFG_COMP_MODE_WINDOW
	.comm	_ADS1015_CFG_COMP_MODE_TRAD,4,2 ## @ADS1015_CFG_COMP_MODE_TRAD
	.no_dead_strip	_ads1015_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 ads1015_write_event_config
_ads1015_write_event_config:            ; @ads1015_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	x22, x4
	mov	x23, x3
	mov	x21, x1
	mov	x20, x0
	bl	_iio_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _IIO_EV_DIR_EITHER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IIO_EV_DIR_EITHER@GOTPAGEOFF]
Lloh2:
	adrp	x9, _ADS1015_CFG_COMP_MODE_WINDOW@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ADS1015_CFG_COMP_MODE_WINDOW@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x10, _ADS1015_CFG_COMP_MODE_TRAD@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ADS1015_CFG_COMP_MODE_TRAD@GOTPAGEOFF]
	cmp	w8, w23
	csel	x8, x9, x10, eq
	ldr	w23, [x8]
	bl	_mutex_lock
	mov	x0, x20
	bl	_iio_device_claim_direct_mode
	mov	x24, x0
	cbnz	w0, LBB0_5
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	cbz	w22, LBB0_3
; %bb.2:
	bl	_ads1015_enable_event_config
	b	LBB0_4
LBB0_3:
	bl	_ads1015_disable_event_config
LBB0_4:
	mov	x24, x0
	mov	x0, x20
	bl	_iio_device_release_direct_mode
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x24
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IIO_EV_DIR_EITHER,4,2          ; @IIO_EV_DIR_EITHER
	.comm	_ADS1015_CFG_COMP_MODE_WINDOW,4,2 ; @ADS1015_CFG_COMP_MODE_WINDOW
	.comm	_ADS1015_CFG_COMP_MODE_TRAD,4,2 ; @ADS1015_CFG_COMP_MODE_TRAD
	.no_dead_strip	_ads1015_write_event_config
.subsections_via_symbols
