	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iio_trigger_write_current
_iio_trigger_write_current:             ## @iio_trigger_write_current
	.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	%rcx, %r14
	movq	%rdx, %r12
	callq	_dev_to_iio_dev
	movq	%rax, %r13
	movq	16(%rax), %r15
	leaq	32(%rax), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	(%r13), %rax
	movq	_INDIO_BUFFER_TRIGGERED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	40(%r13), %r15
	movq	%rbx, %rdi
	callq	_mutex_unlock
	testq	%r15, %r15
	je	LBB0_5
## %bb.3:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%r14d, %r14d
	subq	(%rax), %r14
LBB0_22:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r12, %rdi
	callq	_iio_trigger_acquire_by_name
	movq	%rax, %r12
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpq	%rax, %rbx
	je	LBB0_19
## %bb.6:
	testq	%r12, %r12
	je	LBB0_12
## %bb.7:
	movq	24(%r13), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	*%rax
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_20
LBB0_9:
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	*%rax
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_20
LBB0_12:
	movq	%r12, 16(%r13)
	testq	%rbx, %rbx
	je	LBB0_16
## %bb.13:
	movq	_INDIO_EVENT_TRIGGERED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r13)
	je	LBB0_15
## %bb.14:
	movl	12(%r13), %esi
	movq	%rbx, %rdi
	callq	_iio_trigger_detach_poll_func
LBB0_15:
	movq	%rbx, %rdi
	callq	_iio_trigger_put
	movq	16(%r13), %r12
LBB0_16:
	testq	%r12, %r12
	je	LBB0_22
## %bb.17:
	movq	_INDIO_EVENT_TRIGGERED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r13)
	je	LBB0_22
## %bb.18:
	movl	12(%r13), %esi
	movq	%r12, %rdi
	callq	_iio_trigger_attach_poll_func
	jmp	LBB0_22
LBB0_19:
	movl	%r14d, %r15d
	testq	%rbx, %rbx
	je	LBB0_21
LBB0_20:
	movq	%r12, %rdi
	callq	_iio_trigger_put
LBB0_21:
	movslq	%r15d, %r14
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_INDIO_BUFFER_TRIGGERED,8,3     ## @INDIO_BUFFER_TRIGGERED
	.comm	_EBUSY,8,3                      ## @EBUSY
	.comm	_EPERM,8,3                      ## @EPERM
	.comm	_INDIO_EVENT_TRIGGERED,4,2      ## @INDIO_EVENT_TRIGGERED
	.no_dead_strip	_iio_trigger_write_current
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iio_trigger_write_current
_iio_trigger_write_current:             ; @iio_trigger_write_current
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x3
	mov	x22, x2
	bl	_dev_to_iio_dev
	mov	x20, x0
	ldr	x21, [x0, #16]
	add	x23, x0, #32
	mov	x0, x23
	bl	_mutex_lock
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _INDIO_BUFFER_TRIGGERED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INDIO_BUFFER_TRIGGERED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x23
	bl	_mutex_unlock
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	ldr	x24, [x20, #40]
	mov	x0, x23
	bl	_mutex_unlock
	cbz	x24, LBB0_6
; %bb.3:
Lloh5:
	adrp	x8, _EPERM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_4:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x22
	bl	_iio_trigger_acquire_by_name
	mov	x22, x0
	cmp	x21, x0
	b.eq	LBB0_20
; %bb.7:
	cbz	x22, LBB0_13
; %bb.8:
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x20
	mov	x1, x22
	blr	x8
	mov	x23, x0
	cbnz	w0, LBB0_21
LBB0_10:
	ldr	x8, [x22]
	cbz	x8, LBB0_13
; %bb.11:
	ldr	x8, [x8]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x22
	mov	x1, x20
	blr	x8
	mov	x23, x0
	cbnz	w0, LBB0_21
LBB0_13:
	str	x22, [x20, #16]
Lloh7:
	adrp	x23, _INDIO_EVENT_TRIGGERED@GOTPAGE
Lloh8:
	ldr	x23, [x23, _INDIO_EVENT_TRIGGERED@GOTPAGEOFF]
	cbz	x21, LBB0_17
; %bb.14:
	ldr	w8, [x20, #8]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.15:
	ldr	w1, [x20, #12]
	mov	x0, x21
	bl	_iio_trigger_detach_poll_func
LBB0_16:
	mov	x0, x21
	bl	_iio_trigger_put
	ldr	x22, [x20, #16]
LBB0_17:
	cbz	x22, LBB0_5
; %bb.18:
	ldr	w8, [x20, #8]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.19:
	ldr	w1, [x20, #12]
	mov	x0, x22
	bl	_iio_trigger_attach_poll_func
	b	LBB0_5
LBB0_20:
	mov	x23, x19
	cbz	x21, LBB0_22
LBB0_21:
	mov	x0, x22
	bl	_iio_trigger_put
LBB0_22:
	sxtw	x19, w23
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_INDIO_BUFFER_TRIGGERED,8,3     ; @INDIO_BUFFER_TRIGGERED
	.comm	_EBUSY,8,3                      ; @EBUSY
	.comm	_EPERM,8,3                      ; @EPERM
	.comm	_INDIO_EVENT_TRIGGERED,4,2      ; @INDIO_EVENT_TRIGGERED
	.no_dead_strip	_iio_trigger_write_current
.subsections_via_symbols
