	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si1145_store_samp_freq
_si1145_store_samp_freq:                ## @si1145_store_samp_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	leal	-32001(%rsi), %eax
	cmpl	$-32001, %eax                   ## imm = 0x82FF
	ja	LBB0_2
## %bb.1:
	movq	_ERANGE@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_2:
	movq	%rdi, %r12
	movw	$32000, %ax                     ## imm = 0x7D00
	xorl	%edx, %edx
	divw	%si
	movzwl	%ax, %r15d
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpq	$0, 16(%r12)
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_si1145_set_meas_rate
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
LBB0_4:
	movq	8(%r12), %rax
	cmpq	$0, (%rax)
	jne	LBB0_6
## %bb.5:
	movl	%r15d, %edi
	callq	_si1145_compress
	movl	%eax, %r15d
LBB0_6:
	movl	%r15d, (%r12)
	xorl	%ebx, %ebx
LBB0_7:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERANGE,4,2                     ## @ERANGE
	.no_dead_strip	_si1145_store_samp_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si1145_store_samp_freq
_si1145_store_samp_freq:                ; @si1145_store_samp_freq
	.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
	mov	w8, #-32001
	add	w9, w1, w8
	cmp	w9, w8
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ERANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_8
LBB0_2:
	mov	x19, x0
	and	w8, w1, #0xffff
	mov	w9, #32000
	add	x20, x0, #4
	udiv	w21, w9, w8
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	bl	_si1145_set_meas_rate
	mov	x22, x0
	cbnz	w0, LBB0_7
LBB0_4:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbnz	x8, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_si1145_compress
	mov	x21, x0
LBB0_6:
	mov	w22, #0
	str	w21, [x19]
LBB0_7:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_8:
	mov	x0, x22
	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	_ERANGE,4,2                     ; @ERANGE
	.no_dead_strip	_si1145_store_samp_freq
.subsections_via_symbols
