	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iio_update_buffers             ## -- Begin function iio_update_buffers
	.p2align	4, 0x90
_iio_update_buffers:                    ## @iio_update_buffers
	.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
	cmpq	%rdx, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_mutex_lock
	leaq	4(%r15), %rdi
	movq	%rdi, %r12
	callq	_mutex_lock
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_iio_buffer_is_active
	xorl	%r13d, %r13d
	testq	%rax, %rax
	cmoveq	%rbx, %r13
	jmp	LBB0_5
LBB0_1:
	xorl	%r12d, %r12d
	jmp	LBB0_13
LBB0_3:
	xorl	%r13d, %r13d
LBB0_5:
	movq	%r12, %rbx
	xorl	%r12d, %r12d
	testq	%r14, %r14
	je	LBB0_6
## %bb.7:
	movq	%r14, %rdi
	callq	_iio_buffer_is_active
	testq	%rax, %rax
	cmoveq	%rax, %r14
	jmp	LBB0_8
LBB0_6:
	xorl	%r14d, %r14d
LBB0_8:
	movq	%r13, %rax
	orq	%r14, %rax
	je	LBB0_12
## %bb.9:
	cmpq	$0, 8(%r15)
	je	LBB0_10
## %bb.11:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	___iio_update_buffers
	movl	%eax, %r12d
	jmp	LBB0_12
LBB0_10:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_12:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_13:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iio_update_buffers             ; -- Begin function iio_update_buffers
	.p2align	2
_iio_update_buffers:                    ; @iio_update_buffers
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cmp	x1, x2
	b.eq	LBB0_7
; %bb.1:
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_mutex_lock
	add	x20, x19, #4
	mov	x0, x20
	bl	_mutex_lock
	cbz	x22, LBB0_3
; %bb.2:
	mov	x0, x22
	bl	_iio_buffer_is_active
	cmp	x0, #0
	csel	x22, x22, xzr, eq
LBB0_3:
	cbz	x21, LBB0_8
; %bb.4:
	mov	x0, x21
	bl	_iio_buffer_is_active
	cmp	x0, #0
	csel	x2, xzr, x21, eq
	orr	x8, x22, x2
	cbz	x8, LBB0_9
LBB0_5:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
; %bb.6:
	mov	x0, x19
	mov	x1, x22
	bl	___iio_update_buffers
	mov	x21, x0
	b	LBB0_11
LBB0_7:
	mov	w21, #0
	b	LBB0_12
LBB0_8:
	mov	x2, #0
	orr	x8, x22, x2
	cbnz	x8, LBB0_5
LBB0_9:
	mov	w21, #0
	b	LBB0_11
LBB0_10:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_11:
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	bl	_mutex_unlock
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
.subsections_via_symbols
