	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function FAN_TO_REG
_FAN_TO_REG:                            ## @FAN_TO_REG
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testl	%esi, %esi
	je	LBB0_4
## %bb.1:
	movslq	%esi, %rcx
	movq	%rdi, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_2
## %bb.3:
	movq	%rdi, %rax
	cqto
	idivq	%rcx
	movq	%rax, %rdi
	movl	$65535, %ecx                    ## imm = 0xFFFF
	jmp	LBB0_8
LBB0_4:
	testq	%rdi, %rdi
	jle	LBB0_9
## %bb.5:
	movl	$65534, %ecx                    ## imm = 0xFFFE
	cmpq	$5400000, %rdi                  ## imm = 0x5265C0
	ja	LBB0_6
## %bb.7:
	movl	$5400000, %eax                  ## imm = 0x5265C0
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, %edi
	jmp	LBB0_8
LBB0_2:
	movl	%edi, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %edi
	movl	$65535, %ecx                    ## imm = 0xFFFF
	jmp	LBB0_8
LBB0_9:
	movl	$65535, %eax                    ## imm = 0xFFFF
	popq	%rbp
	retq
LBB0_6:
	xorl	%edi, %edi
LBB0_8:
                                        ## kill: def $edi killed $edi killed $rdi
	xorl	%esi, %esi
	movl	%ecx, %edx
	popq	%rbp
	jmp	_clamp_val                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_FAN_TO_REG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function FAN_TO_REG
_FAN_TO_REG:                            ; @FAN_TO_REG
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w1 killed $w1 def $x1
	cbz	w1, LBB0_2
; %bb.1:
	sxtw	x8, w1
	mov	w2, #65535
	sdiv	x0, x0, x8
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	w1, #0
	b	_clamp_val
LBB0_2:
	cmp	x0, #1
	b.lt	LBB0_4
; %bb.3:
	mov	w8, #26048
	movk	w8, #82, lsl #16
	mov	w2, #65534
	udiv	x0, x8, x0
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	w1, #0
	b	_clamp_val
LBB0_4:
	mov	w0, #65535
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_FAN_TO_REG
.subsections_via_symbols
