	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad5421_write_event_config
_ad5421_write_event_config:             ## @ad5421_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
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_1
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_11
## %bb.3:
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_4
## %bb.5:
	movq	_AD5421_FAULT_OVER_CURRENT@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_1:
	movq	_AD5421_FAULT_TEMP_OVER_140@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_4:
	movq	_AD5421_FAULT_UNDER_CURRENT@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_mutex_lock
	testl	%r14d, %r14d
	je	LBB0_8
## %bb.7:
	orl	%ebx, (%r15)
	jmp	LBB0_9
LBB0_8:
	notl	%ebx
	andl	%ebx, (%r15)
LBB0_9:
	movq	%r13, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
LBB0_10:
	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	_AD5421_FAULT_OVER_CURRENT,4,2  ## @AD5421_FAULT_OVER_CURRENT
	.comm	_AD5421_FAULT_UNDER_CURRENT,4,2 ## @AD5421_FAULT_UNDER_CURRENT
	.comm	_AD5421_FAULT_TEMP_OVER_140,4,2 ## @AD5421_FAULT_TEMP_OVER_140
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ad5421_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 ad5421_write_event_config
_ad5421_write_event_config:             ; @ad5421_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, x3
	mov	x23, x1
	mov	x19, x0
	bl	_iio_priv
	mov	x20, x0
	ldr	w8, [x23]
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _IIO_EV_DIR_RISING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IIO_EV_DIR_RISING@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AD5421_FAULT_UNDER_CURRENT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AD5421_FAULT_UNDER_CURRENT@GOTPAGEOFF]
Lloh5:
	adrp	x10, _AD5421_FAULT_OVER_CURRENT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _AD5421_FAULT_OVER_CURRENT@GOTPAGEOFF]
	cmp	w8, w22
	csel	x8, x10, x9, eq
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x8, _AD5421_FAULT_TEMP_OVER_140@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AD5421_FAULT_TEMP_OVER_140@GOTPAGEOFF]
LBB0_4:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_mutex_lock
	cbz	w21, LBB0_7
; %bb.5:
	ldr	w8, [x20]
	orr	w8, w8, w22
	b	LBB0_8
LBB0_6:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_7:
	ldr	w8, [x20]
	bic	w8, w8, w22
LBB0_8:
	str	w8, [x20]
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
LBB0_9:
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IIO_EV_DIR_RISING,4,2          ; @IIO_EV_DIR_RISING
	.comm	_AD5421_FAULT_OVER_CURRENT,4,2  ; @AD5421_FAULT_OVER_CURRENT
	.comm	_AD5421_FAULT_UNDER_CURRENT,4,2 ; @AD5421_FAULT_UNDER_CURRENT
	.comm	_AD5421_FAULT_TEMP_OVER_140,4,2 ; @AD5421_FAULT_TEMP_OVER_140
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ad5421_write_event_config
.subsections_via_symbols
