	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xadc_trigger_set_state
_xadc_trigger_set_state:                ## @xadc_trigger_set_state
	.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	%esi, %r15d
	movq	%rdi, %rbx
	callq	_iio_trigger_get_drvdata
	movq	%rax, %r12
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mutex_lock
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.1:
	cmpq	$0, 8(%r14)
	je	LBB0_3
## %bb.2:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_4:
	movq	$0, 8(%r14)
LBB0_5:
	addq	$4, %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	_XADC_AXI_REG_IPIER@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_xadc_read_reg
	movq	_XADC_AXI_REG_IPISR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_XADC_AXI_INT_EOS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	andl	-44(%rbp), %edx
	movq	%r14, %rdi
	callq	_xadc_write_reg
	movl	(%rbx), %edx
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.6:
	orl	-44(%rbp), %edx
	jmp	LBB0_8
LBB0_3:
	movq	%rbx, 8(%r14)
	xorl	%ecx, %ecx
	cmpq	%rbx, 16(%r14)
	movq	_XADC_CONF0_EC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmovel	%edx, %ecx
	movq	_XADC_REG_CONF1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	__xadc_update_adc_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
	jmp	LBB0_5
LBB0_7:
	notl	%edx
	andl	-44(%rbp), %edx
LBB0_8:
	movl	%edx, -44(%rbp)
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_xadc_write_reg
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%ebx, %ebx
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_XADC_CONF0_EC,4,2              ## @XADC_CONF0_EC
	.comm	_XADC_REG_CONF1,4,2             ## @XADC_REG_CONF1
	.comm	_XADC_AXI_REG_IPIER,4,2         ## @XADC_AXI_REG_IPIER
	.comm	_XADC_AXI_REG_IPISR,4,2         ## @XADC_AXI_REG_IPISR
	.comm	_XADC_AXI_INT_EOS,4,2           ## @XADC_AXI_INT_EOS
	.no_dead_strip	_xadc_trigger_set_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xadc_trigger_set_state
_xadc_trigger_set_state:                ; @xadc_trigger_set_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	mov	x21, x0
	bl	_iio_trigger_get_drvdata
	mov	x19, x0
	bl	_mutex_lock
	cbz	w20, LBB0_3
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_3:
	str	xzr, [x19, #8]
LBB0_4:
	add	x21, x19, #4
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh3:
	adrp	x22, _XADC_AXI_REG_IPIER@GOTPAGE
Lloh4:
	ldr	x22, [x22, _XADC_AXI_REG_IPIER@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	mov	x0, x19
	bl	_xadc_read_reg
Lloh5:
	adrp	x8, _XADC_AXI_REG_IPISR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _XADC_AXI_REG_IPISR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w8, [sp, #12]
Lloh8:
	adrp	x23, _XADC_AXI_INT_EOS@GOTPAGE
Lloh9:
	ldr	x23, [x23, _XADC_AXI_INT_EOS@GOTPAGEOFF]
	ldr	w9, [x23]
	and	w2, w9, w8
	mov	x0, x19
	bl	_xadc_write_reg
	ldr	w8, [x23]
	cbz	w20, LBB0_7
; %bb.5:
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	b	LBB0_8
LBB0_6:
	str	x21, [x19, #8]
	ldr	x8, [x19, #16]
Lloh10:
	adrp	x9, _XADC_CONF0_EC@GOTPAGE
Lloh11:
	ldr	x9, [x9, _XADC_CONF0_EC@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x9]
	cmp	x8, x21
	csel	w3, w2, wzr, eq
Lloh13:
	adrp	x8, _XADC_REG_CONF1@GOTPAGE
Lloh14:
	ldr	x8, [x8, _XADC_REG_CONF1@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	__xadc_update_adc_reg
	mov	x21, x0
	cbnz	w0, LBB0_9
	b	LBB0_4
LBB0_7:
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
LBB0_8:
	str	w2, [sp, #12]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_xadc_write_reg
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	w21, #0
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_XADC_CONF0_EC,4,2              ; @XADC_CONF0_EC
	.comm	_XADC_REG_CONF1,4,2             ; @XADC_REG_CONF1
	.comm	_XADC_AXI_REG_IPIER,4,2         ; @XADC_AXI_REG_IPIER
	.comm	_XADC_AXI_REG_IPISR,4,2         ; @XADC_AXI_REG_IPISR
	.comm	_XADC_AXI_INT_EOS,4,2           ; @XADC_AXI_INT_EOS
	.no_dead_strip	_xadc_trigger_set_state
.subsections_via_symbols
