	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad7291_event_handler
_ad7291_event_handler:                  ## @ad7291_event_handler
	.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
	movq	%rsi, %r15
	movq	%rsi, %rdi
	callq	_iio_priv
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_iio_get_time_ns
	movl	%eax, %r14d
	movq	_AD7291_T_ALERT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ad7291_i2c_read
	testq	%rax, %rax
	jne	LBB0_16
## %bb.1:
	movq	_AD7291_VOLTAGE_ALERT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ad7291_i2c_read
	testq	%rax, %rax
	jne	LBB0_16
## %bb.2:
	movl	-48(%rbp), %eax
	orl	-44(%rbp), %eax
	je	LBB0_16
## %bb.3:
	movq	_AD7291_ALERT_CLEAR@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	orl	(%rbx), %edx
	movq	_AD7291_COMMAND@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_ad7291_i2c_write
	movl	(%r12), %edx
	notl	%edx
	andl	(%rbx), %edx
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_ad7291_i2c_write
	movl	-48(%rbp), %eax
	movq	_AD7291_T_LOW@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_5
## %bb.4:
	movq	_AD7291_T_AVG_LOW@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
LBB0_5:
	movq	_IIO_TEMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IIO_EV_TYPE_THRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IIO_EV_DIR_FALLING@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%esi, %esi
	callq	_IIO_UNMOD_EVENT_CODE
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	_iio_push_event
	movl	-48(%rbp), %eax
LBB0_6:
	movq	_AD7291_T_HIGH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_8
## %bb.7:
	movq	_AD7291_T_AVG_HIGH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
LBB0_8:
	movq	_IIO_TEMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IIO_EV_TYPE_THRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%esi, %esi
	callq	_IIO_UNMOD_EVENT_CODE
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	_iio_push_event
LBB0_9:
	movq	_AD7291_VOLTAGE_LIMIT_COUNT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_16
## %bb.10:
	xorl	%ebx, %ebx
	movq	_IIO_EV_TYPE_THRESH@GOTPCREL(%rip), %r12
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	incl	%ebx
	movq	_AD7291_VOLTAGE_LIMIT_COUNT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_16
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	-44(%rbp), %r13d
	movl	%ebx, %edi
	callq	_AD7291_V_LOW
	testl	%r13d, %eax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_IIO_VOLTAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %edx
	movq	_IIO_EV_DIR_FALLING@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ebx, %esi
	callq	_IIO_UNMOD_EVENT_CODE
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	_iio_push_event
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	-44(%rbp), %r13d
	movl	%ebx, %edi
	callq	_AD7291_V_HIGH
	testl	%r13d, %eax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_IIO_VOLTAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %edx
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ebx, %esi
	callq	_IIO_UNMOD_EVENT_CODE
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	_iio_push_event
	jmp	LBB0_15
LBB0_16:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AD7291_T_ALERT_STATUS,4,2      ## @AD7291_T_ALERT_STATUS
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_AD7291_VOLTAGE_ALERT_STATUS,4,2 ## @AD7291_VOLTAGE_ALERT_STATUS
	.comm	_AD7291_ALERT_CLEAR,4,2         ## @AD7291_ALERT_CLEAR
	.comm	_AD7291_COMMAND,4,2             ## @AD7291_COMMAND
	.comm	_AD7291_T_LOW,4,2               ## @AD7291_T_LOW
	.comm	_AD7291_T_AVG_LOW,4,2           ## @AD7291_T_AVG_LOW
	.comm	_IIO_TEMP,4,2                   ## @IIO_TEMP
	.comm	_IIO_EV_TYPE_THRESH,4,2         ## @IIO_EV_TYPE_THRESH
	.comm	_IIO_EV_DIR_FALLING,4,2         ## @IIO_EV_DIR_FALLING
	.comm	_AD7291_T_HIGH,4,2              ## @AD7291_T_HIGH
	.comm	_AD7291_T_AVG_HIGH,4,2          ## @AD7291_T_AVG_HIGH
	.comm	_IIO_EV_DIR_RISING,4,2          ## @IIO_EV_DIR_RISING
	.comm	_AD7291_VOLTAGE_LIMIT_COUNT,4,2 ## @AD7291_VOLTAGE_LIMIT_COUNT
	.comm	_IIO_VOLTAGE,4,2                ## @IIO_VOLTAGE
	.no_dead_strip	_ad7291_event_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad7291_event_handler
_ad7291_event_handler:                  ; @ad7291_event_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x0, x1
	bl	_iio_priv
	mov	x21, x0
	mov	x0, x19
	bl	_iio_get_time_ns
	mov	x20, x0
Lloh0:
	adrp	x8, _AD7291_T_ALERT_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AD7291_T_ALERT_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x21
	bl	_ad7291_i2c_read
	cbnz	x0, LBB0_16
; %bb.1:
Lloh3:
	adrp	x8, _AD7291_VOLTAGE_ALERT_STATUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AD7291_VOLTAGE_ALERT_STATUS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x21
	bl	_ad7291_i2c_read
	cbnz	x0, LBB0_16
; %bb.2:
	ldp	w9, w8, [sp, #8]
	orr	w8, w8, w9
	cbz	w8, LBB0_16
; %bb.3:
Lloh6:
	adrp	x22, _AD7291_ALERT_CLEAR@GOTPAGE
Lloh7:
	ldr	x22, [x22, _AD7291_ALERT_CLEAR@GOTPAGEOFF]
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w2, w9, w8
Lloh8:
	adrp	x23, _AD7291_COMMAND@GOTPAGE
Lloh9:
	ldr	x23, [x23, _AD7291_COMMAND@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x21
	bl	_ad7291_i2c_write
	ldr	w8, [x21]
	ldr	w9, [x22]
	bic	w2, w8, w9
	ldr	w1, [x23]
	mov	x0, x21
	bl	_ad7291_i2c_write
	ldr	w8, [sp, #12]
Lloh10:
	adrp	x9, _AD7291_T_LOW@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AD7291_T_LOW@GOTPAGEOFF]
Lloh12:
	adrp	x21, _IIO_TEMP@GOTPAGE
Lloh13:
	ldr	x21, [x21, _IIO_TEMP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x22, _IIO_EV_TYPE_THRESH@GOTPAGE
Lloh16:
	ldr	x22, [x22, _IIO_EV_TYPE_THRESH@GOTPAGEOFF]
Lloh17:
	adrp	x23, _IIO_EV_DIR_FALLING@GOTPAGE
Lloh18:
	ldr	x23, [x23, _IIO_EV_DIR_FALLING@GOTPAGEOFF]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.4:
Lloh19:
	adrp	x9, _AD7291_T_AVG_LOW@GOTPAGE
Lloh20:
	ldr	x9, [x9, _AD7291_T_AVG_LOW@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
LBB0_5:
	ldr	w0, [x21]
	ldr	w2, [x22]
	ldr	w3, [x23]
	mov	w1, #0
	bl	_IIO_UNMOD_EVENT_CODE
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_iio_push_event
	ldr	w8, [sp, #12]
LBB0_6:
Lloh22:
	adrp	x9, _AD7291_T_HIGH@GOTPAGE
Lloh23:
	ldr	x9, [x9, _AD7291_T_HIGH@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
Lloh25:
	adrp	x24, _IIO_EV_DIR_RISING@GOTPAGE
Lloh26:
	ldr	x24, [x24, _IIO_EV_DIR_RISING@GOTPAGEOFF]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.7:
Lloh27:
	adrp	x9, _AD7291_T_AVG_HIGH@GOTPAGE
Lloh28:
	ldr	x9, [x9, _AD7291_T_AVG_HIGH@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
LBB0_8:
	ldr	w0, [x21]
	ldr	w2, [x22]
	ldr	w3, [x24]
	mov	w1, #0
	bl	_IIO_UNMOD_EVENT_CODE
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_iio_push_event
LBB0_9:
Lloh30:
	adrp	x25, _AD7291_VOLTAGE_LIMIT_COUNT@GOTPAGE
Lloh31:
	ldr	x25, [x25, _AD7291_VOLTAGE_LIMIT_COUNT@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.10:
	mov	w21, #0
Lloh32:
	adrp	x26, _IIO_VOLTAGE@GOTPAGE
Lloh33:
	ldr	x26, [x26, _IIO_VOLTAGE@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w21, w21, #1
	ldr	w8, [x25]
	cmp	w21, w8
	b.ge	LBB0_16
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w27, [sp, #8]
	mov	x0, x21
	bl	_AD7291_V_LOW
	tst	w0, w27
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x26]
	ldr	w2, [x22]
	ldr	w3, [x23]
	mov	x1, x21
	bl	_IIO_UNMOD_EVENT_CODE
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_iio_push_event
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w27, [sp, #8]
	mov	x0, x21
	bl	_AD7291_V_HIGH
	tst	w0, w27
	b.eq	LBB0_11
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x26]
	ldr	w2, [x22]
	ldr	w3, [x24]
	mov	x1, x21
	bl	_IIO_UNMOD_EVENT_CODE
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_iio_push_event
	b	LBB0_11
LBB0_16:
Lloh34:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh35:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_AD7291_T_ALERT_STATUS,4,2      ; @AD7291_T_ALERT_STATUS
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_AD7291_VOLTAGE_ALERT_STATUS,4,2 ; @AD7291_VOLTAGE_ALERT_STATUS
	.comm	_AD7291_ALERT_CLEAR,4,2         ; @AD7291_ALERT_CLEAR
	.comm	_AD7291_COMMAND,4,2             ; @AD7291_COMMAND
	.comm	_AD7291_T_LOW,4,2               ; @AD7291_T_LOW
	.comm	_AD7291_T_AVG_LOW,4,2           ; @AD7291_T_AVG_LOW
	.comm	_IIO_TEMP,4,2                   ; @IIO_TEMP
	.comm	_IIO_EV_TYPE_THRESH,4,2         ; @IIO_EV_TYPE_THRESH
	.comm	_IIO_EV_DIR_FALLING,4,2         ; @IIO_EV_DIR_FALLING
	.comm	_AD7291_T_HIGH,4,2              ; @AD7291_T_HIGH
	.comm	_AD7291_T_AVG_HIGH,4,2          ; @AD7291_T_AVG_HIGH
	.comm	_IIO_EV_DIR_RISING,4,2          ; @IIO_EV_DIR_RISING
	.comm	_AD7291_VOLTAGE_LIMIT_COUNT,4,2 ; @AD7291_VOLTAGE_LIMIT_COUNT
	.comm	_IIO_VOLTAGE,4,2                ; @IIO_VOLTAGE
	.no_dead_strip	_ad7291_event_handler
.subsections_via_symbols
