	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sca3000_read_av_freq
_sca3000_read_av_freq:                  ## @sca3000_read_av_freq
	.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	%rdx, %r14
	callq	_dev_to_iio_dev
	movq	%rax, %rdi
	callq	_iio_priv
	movq	%rax, %r15
	leaq	16(%rax), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_SCA3000_REG_MODE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_sca3000_read_data_short
	movl	%eax, %r12d
	movq	(%r15), %rax
	movl	(%rax), %r13d
	movq	%rbx, %rdi
	callq	_mutex_unlock
	testl	%r12d, %r12d
	je	LBB0_1
LBB0_8:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_SCA3000_REG_MODE_MODE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	cmpl	$128, %r13d
	je	LBB0_6
## %bb.2:
	cmpl	$129, %r13d
	je	LBB0_5
## %bb.3:
	xorl	%r12d, %r12d
	cmpl	$130, %r13d
	jne	LBB0_8
## %bb.4:
	movq	8(%r15), %rax
	jmp	LBB0_7
LBB0_6:
	movq	8(%r15), %rax
	addq	$8, %rax
	jmp	LBB0_7
LBB0_5:
	movq	8(%r15), %rax
	addq	$4, %rax
LBB0_7:
	movl	(%rax), %edx
	movl	%edx, %ecx
	shrl	$31, %ecx
	addl	%edx, %ecx
	sarl	%ecx
	leal	3(%rdx), %r8d
	testl	%edx, %edx
	cmovnsl	%edx, %r8d
	sarl	$2, %r8d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sprintf                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SCA3000_REG_MODE_ADDR,4,2      ## @SCA3000_REG_MODE_ADDR
	.comm	_SCA3000_REG_MODE_MODE_MASK,4,2 ## @SCA3000_REG_MODE_MODE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d %d %d\n"

	.no_dead_strip	_sca3000_read_av_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sca3000_read_av_freq
_sca3000_read_av_freq:                  ; @sca3000_read_av_freq
	.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, x2
	bl	_dev_to_iio_dev
	bl	_iio_priv
	mov	x20, x0
	add	x22, x0, #16
	mov	x0, x22
	bl	_mutex_lock
Lloh0:
	adrp	x8, _SCA3000_REG_MODE_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCA3000_REG_MODE_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_sca3000_read_data_short
	mov	x21, x0
	ldr	x8, [x20]
	ldr	w23, [x8]
	mov	x0, x22
	bl	_mutex_unlock
	cbz	w21, LBB0_2
LBB0_1:
	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
LBB0_2:
Lloh3:
	adrp	x8, _SCA3000_REG_MODE_MODE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCA3000_REG_MODE_MODE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w23
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.3:
	cmp	w8, #129
	b.eq	LBB0_7
; %bb.4:
	cmp	w8, #130
	b.ne	LBB0_9
; %bb.5:
	ldr	x8, [x20, #8]
	b	LBB0_8
LBB0_6:
	ldr	x8, [x20, #8]
	add	x8, x8, #8
	b	LBB0_8
LBB0_7:
	ldr	x8, [x20, #8]
	add	x8, x8, #4
LBB0_8:
	ldr	w2, [x8]
	add	w8, w2, #3
	cmp	w2, #0
	csel	w8, w8, w2, lt
	cinc	w9, w2, lt
	asr	w3, w9, #1
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	asr	w4, w8, #2
	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
	b	_sprintf
LBB0_9:
	mov	w21, #0
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SCA3000_REG_MODE_ADDR,4,2      ; @SCA3000_REG_MODE_ADDR
	.comm	_SCA3000_REG_MODE_MODE_MASK,4,2 ; @SCA3000_REG_MODE_MODE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d %d %d\n"

	.no_dead_strip	_sca3000_read_av_freq
.subsections_via_symbols
