	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad5421_fault_handler
_ad5421_fault_handler:                  ## @ad5421_fault_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, -48(%rbp)                 ## 8-byte Spill
	movq	_AD5421_REG_FAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ad5421_read
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ad5421_update_ctrl
	movq	_AD5421_FAULT_TRIGGER_IRQ@GOTPCREL(%rip), %r14
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	testl	%ebx, %eax
	je	LBB0_12
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %r12d
	cmpl	$65535, %ebx                    ## imm = 0xFFFF
	movl	%ebx, %r13d
	movl	$0, %eax
	cmovel	%eax, %r13d
	notl	%r12d
	andl	%r13d, %r12d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	andl	(%rax), %r12d
	movq	_AD5421_FAULT_OVER_CURRENT@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_IIO_CURRENT@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
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_iio_get_time_ns
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_iio_push_event
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_AD5421_FAULT_UNDER_CURRENT@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_IIO_CURRENT@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
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_iio_get_time_ns
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_iio_push_event
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_AD5421_FAULT_TEMP_OVER_140@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_IIO_TEMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IIO_EV_TYPE_MAG@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
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_iio_get_time_ns
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_iio_push_event
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_AD5421_REG_FAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ad5421_read
	movl	%eax, %ebx
	movl	(%r14), %eax
	testl	%ebx, %eax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msleep
	movl	(%r14), %eax
	jmp	LBB0_11
LBB0_12:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AD5421_REG_FAULT,4,2           ## @AD5421_REG_FAULT
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_AD5421_FAULT_OVER_CURRENT,4,2  ## @AD5421_FAULT_OVER_CURRENT
	.comm	_IIO_CURRENT,4,2                ## @IIO_CURRENT
	.comm	_IIO_EV_TYPE_THRESH,4,2         ## @IIO_EV_TYPE_THRESH
	.comm	_IIO_EV_DIR_RISING,4,2          ## @IIO_EV_DIR_RISING
	.comm	_AD5421_FAULT_UNDER_CURRENT,4,2 ## @AD5421_FAULT_UNDER_CURRENT
	.comm	_IIO_EV_DIR_FALLING,4,2         ## @IIO_EV_DIR_FALLING
	.comm	_AD5421_FAULT_TEMP_OVER_140,4,2 ## @AD5421_FAULT_TEMP_OVER_140
	.comm	_IIO_TEMP,4,2                   ## @IIO_TEMP
	.comm	_IIO_EV_TYPE_MAG,4,2            ## @IIO_EV_TYPE_MAG
	.comm	_AD5421_FAULT_TRIGGER_IRQ,4,2   ## @AD5421_FAULT_TRIGGER_IRQ
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_ad5421_fault_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad5421_fault_handler
_ad5421_fault_handler:                  ; @ad5421_fault_handler
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x0
Lloh0:
	adrp	x8, _AD5421_REG_FAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AD5421_REG_FAULT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ad5421_read
	cbz	w0, LBB0_12
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_ad5421_update_ctrl
	mov	w8, #0
Lloh3:
	adrp	x27, _AD5421_FAULT_TEMP_OVER_140@GOTPAGE
Lloh4:
	ldr	x27, [x27, _AD5421_FAULT_TEMP_OVER_140@GOTPAGEOFF]
Lloh5:
	adrp	x28, _AD5421_FAULT_TRIGGER_IRQ@GOTPAGE
Lloh6:
	ldr	x28, [x28, _AD5421_FAULT_TRIGGER_IRQ@GOTPAGEOFF]
Lloh7:
	adrp	x23, _IIO_EV_DIR_RISING@GOTPAGE
Lloh8:
	ldr	x23, [x23, _IIO_EV_DIR_RISING@GOTPAGEOFF]
Lloh9:
	adrp	x22, _IIO_CURRENT@GOTPAGE
Lloh10:
	ldr	x22, [x22, _IIO_CURRENT@GOTPAGEOFF]
Lloh11:
	adrp	x24, _IIO_EV_TYPE_THRESH@GOTPAGE
Lloh12:
	ldr	x24, [x24, _IIO_EV_TYPE_THRESH@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x8, x25
	tst	w9, w21
	b.eq	LBB0_11
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w9, #65535
	cmp	w21, w9
	csel	w25, wzr, w21, eq
	bic	w8, w25, w8
	ldr	w9, [x20]
	and	w26, w8, w9
Lloh13:
	adrp	x8, _AD5421_FAULT_OVER_CURRENT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AD5421_FAULT_OVER_CURRENT@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w26, w8
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x22]
	ldr	w2, [x24]
	ldr	w3, [x23]
	mov	w1, #0
	bl	_IIO_UNMOD_EVENT_CODE
	mov	x21, x0
	mov	x0, x19
	bl	_iio_get_time_ns
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_iio_push_event
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh16:
	adrp	x8, _AD5421_FAULT_UNDER_CURRENT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AD5421_FAULT_UNDER_CURRENT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w26
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x22]
	ldr	w2, [x24]
Lloh19:
	adrp	x8, _IIO_EV_DIR_FALLING@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IIO_EV_DIR_FALLING@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
	mov	w1, #0
	bl	_IIO_UNMOD_EVENT_CODE
	mov	x21, x0
	mov	x0, x19
	bl	_iio_get_time_ns
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_iio_push_event
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x27]
	tst	w8, w26
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh22:
	adrp	x8, _IIO_TEMP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IIO_TEMP@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x8, _IIO_EV_TYPE_MAG@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IIO_EV_TYPE_MAG@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	ldr	w3, [x23]
	mov	w1, #0
	bl	_IIO_UNMOD_EVENT_CODE
	mov	x21, x0
	mov	x0, x19
	bl	_iio_get_time_ns
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_iio_push_event
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh28:
	adrp	x8, _AD5421_REG_FAULT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AD5421_REG_FAULT@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ad5421_read
	mov	x21, x0
	ldr	w9, [x28]
	tst	w9, w0
	b.eq	LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1000
	bl	_msleep
	ldr	w9, [x28]
	b	LBB0_2
LBB0_11:
Lloh31:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh32:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh33:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_AD5421_REG_FAULT,4,2           ; @AD5421_REG_FAULT
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_AD5421_FAULT_OVER_CURRENT,4,2  ; @AD5421_FAULT_OVER_CURRENT
	.comm	_IIO_CURRENT,4,2                ; @IIO_CURRENT
	.comm	_IIO_EV_TYPE_THRESH,4,2         ; @IIO_EV_TYPE_THRESH
	.comm	_IIO_EV_DIR_RISING,4,2          ; @IIO_EV_DIR_RISING
	.comm	_AD5421_FAULT_UNDER_CURRENT,4,2 ; @AD5421_FAULT_UNDER_CURRENT
	.comm	_IIO_EV_DIR_FALLING,4,2         ; @IIO_EV_DIR_FALLING
	.comm	_AD5421_FAULT_TEMP_OVER_140,4,2 ; @AD5421_FAULT_TEMP_OVER_140
	.comm	_IIO_TEMP,4,2                   ; @IIO_TEMP
	.comm	_IIO_EV_TYPE_MAG,4,2            ; @IIO_EV_TYPE_MAG
	.comm	_AD5421_FAULT_TRIGGER_IRQ,4,2   ; @AD5421_FAULT_TRIGGER_IRQ
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_ad5421_fault_handler
.subsections_via_symbols
