	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad799x_event_handler
_ad799x_event_handler:                  ## @ad799x_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
	movl	(%rax), %edi
	movq	_AD7998_ALERT_STAT_REG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_i2c_smbus_read_byte_data
	testl	%eax, %eax
	jle	LBB0_8
## %bb.1:
	movl	%eax, %r14d
	movl	(%rbx), %edi
	movl	(%r12), %esi
	movq	_AD7998_ALERT_STAT_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_i2c_smbus_write_byte_data
	testq	%rax, %rax
	js	LBB0_8
## %bb.2:
	xorl	%ebx, %ebx
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_IIO_VOLTAGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_IIO_EV_TYPE_THRESH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%rax), %ecx
	callq	_IIO_UNMOD_EVENT_CODE
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_iio_get_time_ns
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_iio_push_event
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	cmpl	$8, %ebx
	je	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_BIT
	testl	%r14d, %eax
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %esi
	shrl	%esi
	movq	%r13, %rax
	testb	$1, %bl
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_IIO_EV_DIR_FALLING@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_8:
	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	_AD7998_ALERT_STAT_REG,4,2      ## @AD7998_ALERT_STAT_REG
	.comm	_AD7998_ALERT_STAT_CLEAR,4,2    ## @AD7998_ALERT_STAT_CLEAR
	.comm	_IIO_VOLTAGE,4,2                ## @IIO_VOLTAGE
	.comm	_IIO_EV_TYPE_THRESH,4,2         ## @IIO_EV_TYPE_THRESH
	.comm	_IIO_EV_DIR_RISING,4,2          ## @IIO_EV_DIR_RISING
	.comm	_IIO_EV_DIR_FALLING,4,2         ## @IIO_EV_DIR_FALLING
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_ad799x_event_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad799x_event_handler
_ad799x_event_handler:                  ; @ad799x_event_handler
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x0, x1
	bl	_iio_priv
	mov	x21, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x22, _AD7998_ALERT_STAT_REG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AD7998_ALERT_STAT_REG@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_i2c_smbus_read_byte_data
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	w0, [x21]
	ldr	w1, [x22]
Lloh2:
	adrp	x8, _AD7998_ALERT_STAT_CLEAR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AD7998_ALERT_STAT_CLEAR@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_i2c_smbus_write_byte_data
	tbnz	x0, #63, LBB0_6
; %bb.2:
	mov	w21, #0
Lloh5:
	adrp	x23, _IIO_VOLTAGE@GOTPAGE
Lloh6:
	ldr	x23, [x23, _IIO_VOLTAGE@GOTPAGEOFF]
Lloh7:
	adrp	x24, _IIO_EV_TYPE_THRESH@GOTPAGE
Lloh8:
	ldr	x24, [x24, _IIO_EV_TYPE_THRESH@GOTPAGEOFF]
Lloh9:
	adrp	x25, _IIO_EV_DIR_FALLING@GOTPAGE
Lloh10:
	ldr	x25, [x25, _IIO_EV_DIR_FALLING@GOTPAGEOFF]
Lloh11:
	adrp	x26, _IIO_EV_DIR_RISING@GOTPAGE
Lloh12:
	ldr	x26, [x26, _IIO_EV_DIR_RISING@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w21, w21, #1
	cmp	w21, #8
	b.eq	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_BIT
	tst	w0, w20
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x23]
	lsr	w1, w21, #1
	ldr	w2, [x24]
	tst	w21, #0x1
	csel	x8, x25, x26, eq
	ldr	w3, [x8]
	bl	_IIO_UNMOD_EVENT_CODE
	mov	x22, x0
	mov	x0, x19
	bl	_iio_get_time_ns
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_iio_push_event
	b	LBB0_3
LBB0_6:
Lloh13:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_AD7998_ALERT_STAT_REG,4,2      ; @AD7998_ALERT_STAT_REG
	.comm	_AD7998_ALERT_STAT_CLEAR,4,2    ; @AD7998_ALERT_STAT_CLEAR
	.comm	_IIO_VOLTAGE,4,2                ; @IIO_VOLTAGE
	.comm	_IIO_EV_TYPE_THRESH,4,2         ; @IIO_EV_TYPE_THRESH
	.comm	_IIO_EV_DIR_RISING,4,2          ; @IIO_EV_DIR_RISING
	.comm	_IIO_EV_DIR_FALLING,4,2         ; @IIO_EV_DIR_FALLING
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_ad799x_event_handler
.subsections_via_symbols
