	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sps30_float_to_int_clamped
_sps30_float_to_int_clamped:            ## @sps30_float_to_int_clamped
	.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
	callq	_get_unaligned_be32
	movl	%eax, %ebx
	xorl	%r12d, %r12d
	movl	$22, %edi
	xorl	%esi, %esi
	callq	_GENMASK
	movl	%eax, %r14d
	andl	%ebx, %r14d
	cmpl	$8388607, %ebx                  ## imm = 0x7FFFFF
	ja	LBB0_2
## %bb.1:
	testl	%r14d, %r14d
	je	LBB0_7
LBB0_2:
	movl	%ebx, %eax
	sarl	$23, %eax
	cmpl	$1065353215, %ebx               ## imm = 0x3F7FFFFF
	jg	LBB0_4
## %bb.3:
	imull	$100, %r14d, %r12d
	addl	$838860800, %r12d               ## imm = 0x32000000
	sarl	$23, %r12d
	movb	$127, %cl
	subb	%al, %cl
	sarl	%cl, %r12d
	jmp	LBB0_7
LBB0_4:
	movl	$150, %r15d
	leal	-127(%rax), %ecx
	movl	$1, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	subl	%eax, %r15d
	movl	%r14d, %ebx
	movl	%r15d, %ecx
	sarl	%cl, %ebx
	addl	%edx, %ebx
	movq	_SPS30_MAX_PM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %ebx
	jge	LBB0_5
## %bb.6:
	movl	$149, %edi
	subl	%eax, %edi
	xorl	%esi, %esi
	callq	_GENMASK
	andl	%r14d, %eax
	imull	$100, %ebx, %edx
	imull	$100, %eax, %r12d
	movl	%r15d, %ecx
	sarl	%cl, %r12d
	addl	%edx, %r12d
	jmp	LBB0_7
LBB0_5:
	imull	$100, %ecx, %r12d
LBB0_7:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPS30_MAX_PM,4,2               ## @SPS30_MAX_PM
	.no_dead_strip	_sps30_float_to_int_clamped
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sps30_float_to_int_clamped
_sps30_float_to_int_clamped:            ; @sps30_float_to_int_clamped
	.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
	bl	_get_unaligned_be32
	mov	x19, x0
	mov	w0, #22
	mov	w1, #0
	bl	_GENMASK
	and	w20, w0, w19
	lsr	w8, w19, #23
	cbnz	w8, LBB0_2
; %bb.1:
	mov	w0, #0
	cbz	w20, LBB0_7
LBB0_2:
	asr	w8, w19, #23
	mov	w9, #1065353215
	cmp	w19, w9
	b.gt	LBB0_4
; %bb.3:
	mov	w9, #100
	mov	w10, #838860800
	madd	w9, w20, w9, w10
	asr	w9, w9, #23
	mvn	w8, w8
	asr	w0, w9, w8
	b	LBB0_7
LBB0_4:
	sub	w9, w8, #127
	mov	w10, #150
	sub	w19, w10, w8
	mov	w10, #1
	lsl	w10, w10, w9
	asr	w11, w20, w19
Lloh0:
	adrp	x9, _SPS30_MAX_PM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SPS30_MAX_PM@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	w21, w10, w11
	cmp	w21, w9
	b.ge	LBB0_6
; %bb.5:
	mov	w9, #149
	sub	w0, w9, w8
	mov	w1, #0
	bl	_GENMASK
	and	w8, w0, w20
	mov	w9, #100
	mul	w8, w8, w9
	asr	w8, w8, w19
	madd	w0, w21, w9, w8
	b	LBB0_7
LBB0_6:
	mov	w8, #100
	mul	w0, w9, w8
LBB0_7:
	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	_SPS30_MAX_PM,4,2               ; @SPS30_MAX_PM
	.no_dead_strip	_sps30_float_to_int_clamped
.subsections_via_symbols
