	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iio_buffer_store_watermark
_iio_buffer_store_watermark:            ## @iio_buffer_store_watermark
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %rbx
	callq	_dev_to_iio_dev
	movq	%rax, %r15
	movq	8(%rax), %r12
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_kstrtouint
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	cmpl	$0, -36(%rbp)
	je	LBB0_2
## %bb.3:
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	-36(%rbp), %eax
	cmpl	(%r12), %eax
	jbe	LBB0_5
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_5:
	movq	8(%r15), %rdi
	callq	_iio_buffer_is_active
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.8:
	negl	%ebx
	movq	%rbx, %r14
	jmp	LBB0_10
LBB0_9:
	movl	-36(%rbp), %eax
	movl	%eax, 4(%r12)
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_10:
	movl	%r14d, %eax
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_iio_buffer_store_watermark
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iio_buffer_store_watermark
_iio_buffer_store_watermark:            ; @iio_buffer_store_watermark
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x3
	mov	x21, x2
	bl	_dev_to_iio_dev
	mov	x20, x0
	ldr	x22, [x0, #8]
	add	x2, sp, #12
	mov	x0, x21
	mov	w1, #10
	bl	_kstrtouint
	cbnz	w0, LBB0_11
; %bb.1:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	cmp	w8, w9
	b.ls	LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_5:
	ldr	x0, [x20, #8]
	bl	_iio_buffer_is_active
	cbz	x0, LBB0_9
; %bb.6:
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_7:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_mutex_unlock
	cbz	w21, LBB0_10
; %bb.8:
	neg	w19, w21
	b	LBB0_10
LBB0_9:
	ldr	w8, [sp, #12]
	str	w8, [x22, #4]
	mov	x0, x20
	bl	_mutex_unlock
LBB0_10:
	mov	x0, x19
LBB0_11:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_iio_buffer_store_watermark
.subsections_via_symbols
