	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function envelope_store_invert
_envelope_store_invert:                 ## @envelope_store_invert
	.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	%r8, %r14
	movq	%rcx, %rbx
	callq	_iio_priv
	movq	%rax, %r15
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_kstrtoul
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	movq	-48(%rbp), %rax
	cmpq	$2, %rax
	jb	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_3:
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	16(%r15,%rcx,4), %r13d
	movq	%r15, %r12
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	-48(%rbp), %rax
	cmpq	(%r15), %rax
	je	LBB0_5
## %bb.4:
	movl	12(%r15), %edi
	movl	%r13d, %esi
	callq	_irq_set_irq_type
	movl	%eax, %ebx
LBB0_5:
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.6:
	movq	-48(%rbp), %rax
	movq	%rax, (%r15)
	movl	%r14d, %ebx
LBB0_7:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_envelope_store_invert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function envelope_store_invert
_envelope_store_invert:                 ; @envelope_store_invert
	.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	x19, x4
	mov	x21, x3
	bl	_iio_priv
	mov	x20, x0
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #0
	bl	_kstrtoul
	mov	x21, x0
	tbnz	w0, #31, LBB0_8
; %bb.1:
	ldr	x8, [sp, #8]
	cmp	x8, #2
	b.lo	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_3:
	mov	w9, #20
	mov	w10, #16
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w23, [x20, x8]
	add	x22, x20, #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [sp, #8]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
	ldr	w0, [x20, #12]
	mov	x1, x23
	bl	_irq_set_irq_type
	mov	x21, x0
LBB0_5:
	cbnz	w21, LBB0_7
; %bb.6:
	ldr	x8, [sp, #8]
	str	x8, [x20]
	mov	x21, x19
LBB0_7:
	mov	x0, x22
	bl	_mutex_unlock
LBB0_8:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_envelope_store_invert
.subsections_via_symbols
