	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad_sd_trigger_handler
_ad_sd_trigger_handler:                 ## @ad_sd_trigger_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	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	8(%rsi), %rbx
	movq	%rbx, %rdi
	callq	_iio_device_get_drvdata
	movq	%rax, %r14
	leaq	-96(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	8(%rbx), %rax
	movl	4(%rax), %edi
	addl	(%rax), %edi
	movl	$8, %esi
	callq	_DIV_ROUND_UP
                                        ## kill: def $eax killed $eax def $rax
	movq	16(%r14), %rcx
	movl	(%rcx), %esi
	testl	%esi, %esi
	jne	LBB0_2
## %bb.1:
	movq	_AD_SD_REG_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
LBB0_2:
	leal	-1(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_5
## %bb.3:
	cmpl	$3, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$4, %eax
	jne	LBB0_8
LBB0_5:
	leaq	-96(%rbp), %rcx
	movq	%r14, %rdi
	movl	%eax, %edx
	jmp	LBB0_7
LBB0_6:
	leaq	-92(%rbp), %rcx
	movq	%r14, %rdi
	movl	$3, %edx
LBB0_7:
	callq	_ad_sd_read_reg_raw
LBB0_8:
	movl	(%r15), %edx
	leaq	-96(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_iio_push_to_buffers_with_timestamp
	movl	(%rbx), %edi
	callq	_iio_trigger_notify_done
	movl	$0, (%r14)
	movq	8(%r14), %rax
	movl	(%rax), %edi
	callq	_enable_irq
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AD_SD_REG_DATA,4,2             ## @AD_SD_REG_DATA
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_ad_sd_trigger_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad_sd_trigger_handler
_ad_sd_trigger_handler:                 ; @ad_sd_trigger_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x21, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	x20, [x1, #8]
	mov	x0, x20
	bl	_iio_device_get_drvdata
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	x8, [x20, #8]
	ldp	w9, w8, [x8]
	add	w0, w8, w9
	mov	w1, #8
	bl	_DIV_ROUND_UP
	mov	x2, x0
	ldr	x8, [x19, #16]
Lloh3:
	adrp	x9, _AD_SD_REG_DATA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AD_SD_REG_DATA@GOTPAGEOFF]
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w1, w9, w8, eq
	sub	w8, w0, #1
	cmp	w8, #2
	b.lo	LBB0_3
; %bb.1:
	cmp	w2, #3
	b.eq	LBB0_4
; %bb.2:
	cmp	w2, #4
	b.ne	LBB0_6
LBB0_3:
	add	x3, sp, #8
	b	LBB0_5
LBB0_4:
	add	x8, sp, #8
	add	x3, x8, #4
LBB0_5:
	mov	x0, x19
	bl	_ad_sd_read_reg_raw
LBB0_6:
	ldr	w2, [x21]
	add	x1, sp, #8
	mov	x0, x20
	bl	_iio_push_to_buffers_with_timestamp
	ldr	w0, [x20]
	bl	_iio_trigger_notify_done
	str	wzr, [x19]
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_enable_irq
Lloh6:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldur	x8, [x29, #-40]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AD_SD_REG_DATA,4,2             ; @AD_SD_REG_DATA
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_ad_sd_trigger_handler
.subsections_via_symbols
