	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iio_event_getfd                ## -- Begin function iio_event_getfd
	.p2align	4, 0x90
_iio_event_getfd:                       ## @iio_event_getfd
	.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	8(%rdi), %r15
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	callq	_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movq	_IIO_BUSY_BIT_POS@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	4(%r15), %r12
	movq	%r12, %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_5:
	movq	%r14, %rdi
	callq	_iio_device_get
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movq	_O_CLOEXEC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	L_.str(%rip), %rdi
	movq	_iio_event_chrdev_fileops@GOTPCREL(%rip), %rsi
	movq	%r14, %rdx
	callq	_anon_inode_getfd
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	%r15, %rdi
	callq	_kfifo_reset_out
	jmp	LBB0_8
LBB0_6:
	movl	(%r13), %edi
	movq	%r12, %rsi
	callq	_clear_bit
	movq	%r14, %rdi
	callq	_iio_device_put
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_9:
	movl	%ebx, %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
	.comm	_IIO_BUSY_BIT_POS,4,2           ## @IIO_BUSY_BIT_POS
	.comm	_EBUSY,4,2                      ## @EBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"iio:event"

	.comm	_iio_event_chrdev_fileops,4,2   ## @iio_event_chrdev_fileops
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_CLOEXEC,4,2                  ## @O_CLOEXEC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iio_event_getfd                ; -- Begin function iio_event_getfd
	.p2align	2
_iio_event_getfd:                       ; @iio_event_getfd
	.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
	ldr	x20, [x0, #8]
	cbz	x20, LBB0_4
; %bb.1:
	mov	x19, x0
	bl	_mutex_lock_interruptible
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.2:
Lloh0:
	adrp	x23, _IIO_BUSY_BIT_POS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _IIO_BUSY_BIT_POS@GOTPAGEOFF]
	ldr	w0, [x23]
	add	x22, x20, #4
	mov	x1, x22
	bl	_test_and_set_bit
	cbz	x0, LBB0_5
; %bb.3:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_4:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_5:
	mov	x0, x19
	bl	_iio_device_get
Lloh8:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _O_CLOEXEC@GOTPAGE
Lloh12:
	ldr	x9, [x9, _O_CLOEXEC@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w3, w9, w8
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
Lloh16:
	adrp	x1, _iio_event_chrdev_fileops@GOTPAGE
Lloh17:
	ldr	x1, [x1, _iio_event_chrdev_fileops@GOTPAGEOFF]
	mov	x2, x19
	bl	_anon_inode_getfd
	mov	x21, x0
	tbnz	w0, #31, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_kfifo_reset_out
	b	LBB0_8
LBB0_7:
	ldr	w0, [x23]
	mov	x1, x22
	bl	_clear_bit
	mov	x0, x19
	bl	_iio_device_put
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_9:
	mov	x0, x21
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_IIO_BUSY_BIT_POS,4,2           ; @IIO_BUSY_BIT_POS
	.comm	_EBUSY,4,2                      ; @EBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"iio:event"

	.comm	_iio_event_chrdev_fileops,4,2   ; @iio_event_chrdev_fileops
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_CLOEXEC,4,2                  ; @O_CLOEXEC
.subsections_via_symbols
