; LLVM IR from chdb-io/chdb :: base/glibc-compatibility/musl (lgammal)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%union.ldshape = type { x86_fp80 }
%struct.anon = type { i64, i16 }

; Function Attrs: nounwind uwtable
define dso_local x86_fp80 @lgammal_r(x86_fp80 noundef %0, ptr noundef %1) #0 {
  %3 = alloca x86_fp80, align 16
  %4 = alloca x86_fp80, align 16
  %5 = alloca ptr, align 8
  %6 = alloca x86_fp80, align 16
  %7 = alloca x86_fp80, align 16
  %8 = alloca x86_fp80, align 16
  %9 = alloca x86_fp80, align 16
  %10 = alloca x86_fp80, align 16
  %11 = alloca x86_fp80, align 16
  %12 = alloca x86_fp80, align 16
  %13 = alloca x86_fp80, align 16
  %14 = alloca x86_fp80, align 16
  %15 = alloca x86_fp80, align 16
  %16 = alloca %union.ldshape, align 16
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store x86_fp80 %0, ptr %4, align 16, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  %21 = load x86_fp80, ptr %4, align 16, !tbaa !5
  store x86_fp80 %21, ptr %16, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %22 = getelementptr inbounds %struct.anon, ptr %16, i32 0, i32 1
  %23 = load i16, ptr %22, align 8, !tbaa !11
  %24 = zext i16 %23 to i32
  %25 = and i32 %24, 32767
  %26 = shl i32 %25, 16
  %27 = zext i32 %26 to i64
  %28 = getelementptr inbounds %struct.anon, ptr %16, i32 0, i32 0
  %29 = load i64, ptr %28, align 16, !tbaa !11
  %30 = lshr i64 %29, 48
  %31 = or i64 %27, %30
  %32 = trunc i64 %31 to i32
  store i32 %32, ptr %17, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %33 = getelementptr inbounds %struct.anon, ptr %16, i32 0, i32 1
  %34 = load i16, ptr %33, align 8, !tbaa !11
  %35 = zext i16 %34 to i32
  %36 = ashr i32 %35, 15
  store i32 %36, ptr %18, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %37 = load ptr, ptr %5, align 8, !tbaa !9
  store i32 1, ptr %37, align 4, !tbaa !12
  %38 = load i32, ptr %17, align 4, !tbaa !12
  %39 = icmp uge i32 %38, 2147418112
  br i1 %39, label %40, label %44

40:                                               ; preds = %2
  %41 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %42 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %43 = fmul x86_fp80 %41, %42
  store x86_fp80 %43, ptr %3, align 16
  store i32 1, ptr %20, align 4
  br label %369

44:                                               ; preds = %2
  %45 = load i32, ptr %17, align 4, !tbaa !12
  %46 = icmp ult i32 %45, 1069580288
  br i1 %46, label %47, label %58

47:                                               ; preds = %44
  %48 = load i32, ptr %18, align 4, !tbaa !12
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %50, label %54

50:                                               ; preds = %47
  %51 = load ptr, ptr %5, align 8, !tbaa !9
  store i32 -1, ptr %51, align 4, !tbaa !12
  %52 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %53 = fneg x86_fp80 %52
  store x86_fp80 %53, ptr %4, align 16, !tbaa !5
  br label %54

54:                                               ; preds = %50, %47
  %55 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %56 = call x86_fp80 @logl(x86_fp80 noundef %55) #4
  %57 = fneg x86_fp80 %56
  store x86_fp80 %57, ptr %3, align 16
  store i32 1, ptr %20, align 4
  br label %369

58:                                               ; preds = %44
  %59 = load i32, ptr %18, align 4, !tbaa !12
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %90

61:                                               ; preds = %58
  %62 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %63 = fneg x86_fp80 %62
  store x86_fp80 %63, ptr %4, align 16, !tbaa !5
  %64 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %65 = fmul x86_fp80 0xK4000C90FDAA22168C235, %64
  %66 = fptrunc x86_fp80 %65 to double
  %67 = call double @sin(double noundef %66) #4
  %68 = fpext double %67 to x86_fp80
  store x86_fp80 %68, ptr %6, align 16, !tbaa !5
  %69 = load x86_fp80, ptr %6, align 16, !tbaa !5
  %70 = fcmp oeq x86_fp80 %69, 0xK00000000000000000000
  br i1 %70, label %71, label %76

71:                                               ; preds = %61
  %72 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %73 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %74 = fsub x86_fp80 %72, %73
  %75 = fdiv x86_fp80 0xK3FFF8000000000000000, %74
  store x86_fp80 %75, ptr %3, align 16
  store i32 1, ptr %20, align 4
  br label %369

76:                                               ; preds = %61
  %77 = load x86_fp80, ptr %6, align 16, !tbaa !5
  %78 = fcmp ogt x86_fp80 %77, 0xK00000000000000000000
  br i1 %78, label %79, label %81

79:                                               ; preds = %76
  %80 = load ptr, ptr %5, align 8, !tbaa !9
  store i32 -1, ptr %80, align 4, !tbaa !12
  br label %84

81:                                               ; preds = %76
  %82 = load x86_fp80, ptr %6, align 16, !tbaa !5
  %83 = fneg x86_fp80 %82
  store x86_fp80 %83, ptr %6, align 16, !tbaa !5
  br label %84

84:                                               ; preds = %81, %79
  %85 = load x86_fp80, ptr %6, align 16, !tbaa !5
  %86 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %87 = fmul x86_fp80 %85, %86
  %88 = fdiv x86_fp80 0xK4000C90FDAA22168C235, %87
  %89 = call x86_fp80 @logl(x86_fp80 noundef %88) #4
  store x86_fp80 %89, ptr %9, align 16, !tbaa !5
  br label %90

90:                                               ; preds = %84, %58
  %91 = load i32, ptr %17, align 4, !tbaa !12
  %92 = icmp eq i32 %91, 1073709056
  br i1 %92, label %96, label %93

93:                                               ; preds = %90
  %94 = load i32, ptr %17, align 4, !tbaa !12
  %95 = icmp eq i32 %94, 1073774592
  br i1 %95, label %96, label %101

96:                                               ; preds = %93, %90
  %97 = getelementptr inbounds %struct.anon, ptr %16, i32 0, i32 0
  %98 = load i64, ptr %97, align 16, !tbaa !11
  %99 = icmp eq i64 %98, 0
  br i1 %99, label %100, label %101

100:                                              ; preds = %96
  store x86_fp80 0xK00000000000000000000, ptr %14, align 16, !tbaa !5
  br label %360

101:                                              ; preds = %96, %93
  %102 = load i32, ptr %17, align 4, !tbaa !12
  %103 = icmp ult i32 %102, 1073774592
  br i1 %103, label %104, label %245

104:                                              ; preds = %101
  %105 = load i32, ptr %17, align 4, !tbaa !12
  %106 = icmp ule i32 %105, 1073669734
  br i1 %106, label %107, label %126

107:                                              ; preds = %104
  %108 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %109 = call x86_fp80 @logl(x86_fp80 noundef %108) #4
  %110 = fneg x86_fp80 %109
  store x86_fp80 %110, ptr %14, align 16, !tbaa !5
  %111 = load i32, ptr %17, align 4, !tbaa !12
  %112 = icmp uge i32 %111, 1073658698
  br i1 %112, label %113, label %116

113:                                              ; preds = %107
  %114 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %115 = fsub x86_fp80 %114, 0xK3FFF8000000000000000
  store x86_fp80 %115, ptr %7, align 16, !tbaa !5
  store i32 0, ptr %19, align 4, !tbaa !12
  br label %125

116:                                              ; preds = %107
  %117 = load i32, ptr %17, align 4, !tbaa !12
  %118 = icmp uge i32 %117, 1073540403
  br i1 %118, label %119, label %122

119:                                              ; preds = %116
  %120 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %121 = fsub x86_fp80 %120, 0xK3FFDEC5B0C6AD7C7EDC4
  store x86_fp80 %121, ptr %7, align 16, !tbaa !5
  store i32 1, ptr %19, align 4, !tbaa !12
  br label %124

122:                                              ; preds = %116
  %123 = load x86_fp80, ptr %4, align 16, !tbaa !5
  store x86_fp80 %123, ptr %7, align 16, !tbaa !5
  store i32 2, ptr %19, align 4, !tbaa !12
  br label %124

124:                                              ; preds = %122, %119
  br label %125

125:                                              ; preds = %124, %113
  br label %143

126:                                              ; preds = %104
  store x86_fp80 0xK00000000000000000000, ptr %14, align 16, !tbaa !5
  %127 = load i32, ptr %17, align 4, !tbaa !12
  %128 = icmp uge i32 %127, 1073733030
  br i1 %128, label %129, label %132

129:                                              ; preds = %126
  %130 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %131 = fsub x86_fp80 %130, 0xK40008000000000000000
  store x86_fp80 %131, ptr %7, align 16, !tbaa !5
  store i32 0, ptr %19, align 4, !tbaa !12
  br label %142

132:                                              ; preds = %126
  %133 = load i32, ptr %17, align 4, !tbaa !12
  %134 = icmp uge i32 %133, 1073716646
  br i1 %134, label %135, label %138

135:                                              ; preds = %132
  %136 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %137 = fsub x86_fp80 %136, 0xK3FFFBB16C31AB5F1FB71
  store x86_fp80 %137, ptr %7, align 16, !tbaa !5
  store i32 1, ptr %19, align 4, !tbaa !12
  br label %141

138:                                              ; preds = %132
  %139 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %140 = fsub x86_fp80 %139, 0xK3FFF8000000000000000
  store x86_fp80 %140, ptr %7, align 16, !tbaa !5
  store i32 2, ptr %19, align 4, !tbaa !12
  br label %141

141:                                              ; preds = %138, %135
  br label %142

142:                                              ; preds = %141, %129
  br label %143

143:                                              ; preds = %142, %125
  %144 = load i32, ptr %19, align 4, !tbaa !12
  switch i32 %144, label %244 [
    i32 0, label %145
    i32 1, label %175
    i32 2, label %210
  ]

145:                                              ; preds = %143
  %146 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %147 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %148 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %149 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %150 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %151 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %150, x86_fp80 0xK4000F115D0E13AEA5AAC, x86_fp80 0xK4005E31280572629A7F8)
  %152 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %149, x86_fp80 %151, x86_fp80 0xK4008DC1ACEEC4B3BA538)
  %153 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %148, x86_fp80 %152, x86_fp80 0xK400A964BBAC9559EAC31)
  %154 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %147, x86_fp80 %153, x86_fp80 0xK4009E811ED79A7063DDF)
  %155 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %146, x86_fp80 %154, x86_fp80 0xKC0089E94C7302246C2A8)
  store x86_fp80 %155, ptr %11, align 16, !tbaa !5
  %156 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %157 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %158 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %159 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %160 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %161 = fadd x86_fp80 0xK4004F1B2AA9F4861B5CB, %160
  %162 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %159, x86_fp80 %161, x86_fp80 0xK4008D4ACA5204E78D8C0)
  %163 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %158, x86_fp80 %162, x86_fp80 0xK400B8E4AB3272A55A21D)
  %164 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %157, x86_fp80 %163, x86_fp80 0xK400CA05DBD87D12E640B)
  %165 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %156, x86_fp80 %164, x86_fp80 0xK400C805BE51545C76426)
  store x86_fp80 %165, ptr %12, align 16, !tbaa !5
  %166 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %167 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %168 = load x86_fp80, ptr %11, align 16, !tbaa !5
  %169 = fmul x86_fp80 %167, %168
  %170 = load x86_fp80, ptr %12, align 16, !tbaa !5
  %171 = fdiv x86_fp80 %169, %170
  %172 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xK3FFE8000000000000000, x86_fp80 %166, x86_fp80 %171)
  %173 = load x86_fp80, ptr %14, align 16, !tbaa !5
  %174 = fadd x86_fp80 %173, %172
  store x86_fp80 %174, ptr %14, align 16, !tbaa !5
  br label %244

175:                                              ; preds = %143
  %176 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %177 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %178 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %179 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %180 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %181 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %182 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %181, x86_fp80 0xK40018ABC66E1056EBB97, x86_fp80 0xK40069A2C6D7DA4A7143C)
  %183 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %180, x86_fp80 %182, x86_fp80 0xK4009B5EDAD4A2B6AF60D)
  %184 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %179, x86_fp80 %183, x86_fp80 0xK400BAAC17DCD67444A43)
  %185 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %178, x86_fp80 %184, x86_fp80 0xK400C89F26A0FC9F11345)
  %186 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %177, x86_fp80 %185, x86_fp80 0xK400BA0353CB55C121785)
  %187 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %176, x86_fp80 %186, x86_fp80 0xK3FC5867F0E7C29340760)
  store x86_fp80 %187, ptr %11, align 16, !tbaa !5
  %188 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %189 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %190 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %191 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %192 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %193 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %194 = fadd x86_fp80 0xK400580D986849A094970, %193
  %195 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %192, x86_fp80 %194, x86_fp80 0xK4008F41B2AA4D08C27AA)
  %196 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %191, x86_fp80 %195, x86_fp80 0xK400BB7682D0BD0041DB4)
  %197 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %190, x86_fp80 %196, x86_fp80 0xK400D805C4B9F648BE3D4)
  %198 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %189, x86_fp80 %197, x86_fp80 0xK400DA7CE6EDDA9979471)
  %199 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %188, x86_fp80 %198, x86_fp80 0xK400CA58F65AF2D6352AF)
  store x86_fp80 %199, ptr %12, align 16, !tbaa !5
  %200 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %201 = load x86_fp80, ptr %11, align 16, !tbaa !5
  %202 = fmul x86_fp80 %200, %201
  %203 = load x86_fp80, ptr %12, align 16, !tbaa !5
  %204 = fdiv x86_fp80 %202, %203
  %205 = fadd x86_fp80 0xK3FC4F84AE446AD360AC8, %204
  store x86_fp80 %205, ptr %10, align 16, !tbaa !5
  %206 = load x86_fp80, ptr %10, align 16, !tbaa !5
  %207 = fadd x86_fp80 0xKBFFBF8CDCDE61C521000, %206
  %208 = load x86_fp80, ptr %14, align 16, !tbaa !5
  %209 = fadd x86_fp80 %208, %207
  store x86_fp80 %209, ptr %14, align 16, !tbaa !5
  br label %244

210:                                              ; preds = %143
  %211 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %212 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %213 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %214 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %215 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %216 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %217 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %218 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %217, x86_fp80 0xK40018F80321770681672, x86_fp80 0xK4005E2738851DB576BEE)
  %219 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %216, x86_fp80 %218, x86_fp80 0xK4008BA2D37BF660E26EB)
  %220 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %215, x86_fp80 %219, x86_fp80 0xK4009EEF72A378D76FD0C)
  %221 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %214, x86_fp80 %220, x86_fp80 0xK4009FF54090C5581BF2A)
  %222 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %213, x86_fp80 %221, x86_fp80 0xK4008AB00B4302BB3CBF1)
  %223 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %212, x86_fp80 %222, x86_fp80 0xKC005B1B96F0070C4A41B)
  %224 = fmul x86_fp80 %211, %223
  store x86_fp80 %224, ptr %11, align 16, !tbaa !5
  %225 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %226 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %227 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %228 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %229 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %230 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %231 = fadd x86_fp80 0xK4004B45C0DD3D2AA7F6A, %230
  %232 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %229, x86_fp80 %231, x86_fp80 0xK4007ED116565A2F267A3)
  %233 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %228, x86_fp80 %232, x86_fp80 0xK4009F5CE67685BED2E20)
  %234 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %227, x86_fp80 %233, x86_fp80 0xK400AECAA1B7760BA7C84)
  %235 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %226, x86_fp80 %234, x86_fp80 0xK400AD47B13801C9ABE6B)
  %236 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %225, x86_fp80 %235, x86_fp80 0xK40098FDA96EE56155B39)
  store x86_fp80 %236, ptr %12, align 16, !tbaa !5
  %237 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %238 = load x86_fp80, ptr %11, align 16, !tbaa !5
  %239 = load x86_fp80, ptr %12, align 16, !tbaa !5
  %240 = fdiv x86_fp80 %238, %239
  %241 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xKBFFE8000000000000000, x86_fp80 %237, x86_fp80 %240)
  %242 = load x86_fp80, ptr %14, align 16, !tbaa !5
  %243 = fadd x86_fp80 %242, %241
  store x86_fp80 %243, ptr %14, align 16, !tbaa !5
  br label %244

244:                                              ; preds = %210, %175, %145, %143
  br label %359

245:                                              ; preds = %101
  %246 = load i32, ptr %17, align 4, !tbaa !12
  %247 = icmp ult i32 %246, 1073905664
  br i1 %247, label %248, label %320

248:                                              ; preds = %245
  %249 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %250 = fptosi x86_fp80 %249 to i32
  store i32 %250, ptr %19, align 4, !tbaa !12
  %251 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %252 = load i32, ptr %19, align 4, !tbaa !12
  %253 = sitofp i32 %252 to double
  %254 = fpext double %253 to x86_fp80
  %255 = fsub x86_fp80 %251, %254
  store x86_fp80 %255, ptr %7, align 16, !tbaa !5
  %256 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %257 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %258 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %259 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %260 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %261 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %262 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %263 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %262, x86_fp80 0xKC009D29DA60F5DFA05EF, x86_fp80 0xKC00EF4AA443706E810E3)
  %264 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %261, x86_fp80 %263, x86_fp80 0xKC012AD371282903EB2E4)
  %265 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %260, x86_fp80 %264, x86_fp80 0xKC014CA943F86A403F6BE)
  %266 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %259, x86_fp80 %265, x86_fp80 0xKC015C89C01657BB2F73A)
  %267 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %258, x86_fp80 %266, x86_fp80 0xKC014EE1FD18F72CBB4CD)
  %268 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %257, x86_fp80 %267, x86_fp80 0xK4013B194321B770C93B4)
  %269 = fmul x86_fp80 %256, %268
  store x86_fp80 %269, ptr %10, align 16, !tbaa !5
  %270 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %271 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %272 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %273 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %274 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %275 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %276 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %277 = fadd x86_fp80 0xKC007E1198B5AF4A1810D, %276
  %278 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %275, x86_fp80 %277, x86_fp80 0xKC00DEC8AB16E428C6E2C)
  %279 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %274, x86_fp80 %278, x86_fp80 0xKC01287D5CC4AA7C1EF90)
  %280 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %273, x86_fp80 %279, x86_fp80 0xKC015838BFC9A902FB887)
  %281 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %272, x86_fp80 %280, x86_fp80 0xKC016F42D96F3D84BACAE)
  %282 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %271, x86_fp80 %281, x86_fp80 0xKC017D6C87E69FFDB436A)
  %283 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %270, x86_fp80 %282, x86_fp80 0xKC0178FBC72CDBD6AA4C7)
  store x86_fp80 %283, ptr %13, align 16, !tbaa !5
  %284 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %285 = load x86_fp80, ptr %10, align 16, !tbaa !5
  %286 = load x86_fp80, ptr %13, align 16, !tbaa !5
  %287 = fdiv x86_fp80 %285, %286
  %288 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xK3FFE8000000000000000, x86_fp80 %284, x86_fp80 %287)
  store x86_fp80 %288, ptr %14, align 16, !tbaa !5
  store x86_fp80 0xK3FFF8000000000000000, ptr %8, align 16, !tbaa !5
  %289 = load i32, ptr %19, align 4, !tbaa !12
  switch i32 %289, label %319 [
    i32 7, label %290
    i32 6, label %295
    i32 5, label %300
    i32 4, label %305
    i32 3, label %310
  ]

290:                                              ; preds = %248
  %291 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %292 = fadd x86_fp80 %291, 0xK4001C000000000000000
  %293 = load x86_fp80, ptr %8, align 16, !tbaa !5
  %294 = fmul x86_fp80 %293, %292
  store x86_fp80 %294, ptr %8, align 16, !tbaa !5
  br label %295

295:                                              ; preds = %290, %248
  %296 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %297 = fadd x86_fp80 %296, 0xK4001A000000000000000
  %298 = load x86_fp80, ptr %8, align 16, !tbaa !5
  %299 = fmul x86_fp80 %298, %297
  store x86_fp80 %299, ptr %8, align 16, !tbaa !5
  br label %300

300:                                              ; preds = %295, %248
  %301 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %302 = fadd x86_fp80 %301, 0xK40018000000000000000
  %303 = load x86_fp80, ptr %8, align 16, !tbaa !5
  %304 = fmul x86_fp80 %303, %302
  store x86_fp80 %304, ptr %8, align 16, !tbaa !5
  br label %305

305:                                              ; preds = %300, %248
  %306 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %307 = fadd x86_fp80 %306, 0xK4000C000000000000000
  %308 = load x86_fp80, ptr %8, align 16, !tbaa !5
  %309 = fmul x86_fp80 %308, %307
  store x86_fp80 %309, ptr %8, align 16, !tbaa !5
  br label %310

310:                                              ; preds = %305, %248
  %311 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %312 = fadd x86_fp80 %311, 0xK40008000000000000000
  %313 = load x86_fp80, ptr %8, align 16, !tbaa !5
  %314 = fmul x86_fp80 %313, %312
  store x86_fp80 %314, ptr %8, align 16, !tbaa !5
  %315 = load x86_fp80, ptr %8, align 16, !tbaa !5
  %316 = call x86_fp80 @logl(x86_fp80 noundef %315) #4
  %317 = load x86_fp80, ptr %14, align 16, !tbaa !5
  %318 = fadd x86_fp80 %317, %316
  store x86_fp80 %318, ptr %14, align 16, !tbaa !5
  br label %319

319:                                              ; preds = %310, %248
  br label %358

320:                                              ; preds = %245
  %321 = load i32, ptr %17, align 4, !tbaa !12
  %322 = icmp ult i32 %321, 1078034432
  br i1 %322, label %323, label %351

323:                                              ; preds = %320
  %324 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %325 = call x86_fp80 @logl(x86_fp80 noundef %324) #4
  store x86_fp80 %325, ptr %6, align 16, !tbaa !5
  %326 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %327 = fdiv x86_fp80 0xK3FFF8000000000000000, %326
  store x86_fp80 %327, ptr %8, align 16, !tbaa !5
  %328 = load x86_fp80, ptr %8, align 16, !tbaa !5
  %329 = load x86_fp80, ptr %8, align 16, !tbaa !5
  %330 = fmul x86_fp80 %328, %329
  store x86_fp80 %330, ptr %7, align 16, !tbaa !5
  %331 = load x86_fp80, ptr %8, align 16, !tbaa !5
  %332 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %333 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %334 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %335 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %336 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %337 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %338 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %337, x86_fp80 0xK3FF7A01291C2CC08D984, x86_fp80 0xKBFF5F6853DA103043D91)
  %339 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %336, x86_fp80 %338, x86_fp80 0xK3FF4DC88D492AAD13BDC)
  %340 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %335, x86_fp80 %339, x86_fp80 0xKBFF49C09844E9FCE8B20)
  %341 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %334, x86_fp80 %340, x86_fp80 0xK3FF4D00D009230E5F8F2)
  %342 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %333, x86_fp80 %341, x86_fp80 0xKBFF6B60B60B603A84D88)
  %343 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %332, x86_fp80 %342, x86_fp80 0xK3FFBAAAAAAAAAAAA9FCC)
  %344 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %331, x86_fp80 %343, x86_fp80 0xK3FFDD67F1C864BEB4A69)
  store x86_fp80 %344, ptr %15, align 16, !tbaa !5
  %345 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %346 = fsub x86_fp80 %345, 0xK3FFE8000000000000000
  %347 = load x86_fp80, ptr %6, align 16, !tbaa !5
  %348 = fsub x86_fp80 %347, 0xK3FFF8000000000000000
  %349 = load x86_fp80, ptr %15, align 16, !tbaa !5
  %350 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %346, x86_fp80 %348, x86_fp80 %349)
  store x86_fp80 %350, ptr %14, align 16, !tbaa !5
  br label %357

351:                                              ; preds = %320
  %352 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %353 = load x86_fp80, ptr %4, align 16, !tbaa !5
  %354 = call x86_fp80 @logl(x86_fp80 noundef %353) #4
  %355 = fsub x86_fp80 %354, 0xK3FFF8000000000000000
  %356 = fmul x86_fp80 %352, %355
  store x86_fp80 %356, ptr %14, align 16, !tbaa !5
  br label %357

357:                                              ; preds = %351, %323
  br label %358

358:                                              ; preds = %357, %319
  br label %359

359:                                              ; preds = %358, %244
  br label %360

360:                                              ; preds = %359, %100
  %361 = load i32, ptr %18, align 4, !tbaa !12
  %362 = icmp ne i32 %361, 0
  br i1 %362, label %363, label %367

363:                                              ; preds = %360
  %364 = load x86_fp80, ptr %9, align 16, !tbaa !5
  %365 = load x86_fp80, ptr %14, align 16, !tbaa !5
  %366 = fsub x86_fp80 %364, %365
  store x86_fp80 %366, ptr %14, align 16, !tbaa !5
  br label %367

367:                                              ; preds = %363, %360
  %368 = load x86_fp80, ptr %14, align 16, !tbaa !5
  store x86_fp80 %368, ptr %3, align 16
  store i32 1, ptr %20, align 4
  br label %369

369:                                              ; preds = %367, %71, %54, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #4
  %370 = load x86_fp80, ptr %3, align 16
  ret x86_fp80 %370
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind
declare x86_fp80 @logl(x86_fp80 noundef) #2

; Function Attrs: nounwind
declare double @sin(double noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare x86_fp80 @llvm.fmuladd.f80(x86_fp80, x86_fp80, x86_fp80) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress nofree nounwind willreturn memory(write) uwtable
define dso_local x86_fp80 @lgammal_r(x86_fp80 noundef %0, ptr nocapture noundef writeonly %1) local_unnamed_addr #0 {
  %3 = bitcast x86_fp80 %0 to i80
  %.sroa.0.8.extract.shift = lshr i80 %3, 64
  %.sroa.0.8.extract.trunc = trunc nuw nsw i80 %.sroa.0.8.extract.shift to i32
  %4 = shl nuw i32 %.sroa.0.8.extract.trunc, 16
  %5 = and i32 %4, 2147418112
  %.sroa.0.0.extract.trunc = trunc i80 %3 to i64
  %6 = lshr i64 %.sroa.0.0.extract.trunc, 48
  %7 = trunc nuw nsw i64 %6 to i32
  %8 = or disjoint i32 %5, %7
  store i32 1, ptr %1, align 4, !tbaa !5
  %9 = icmp eq i32 %5, 2147418112
  br i1 %9, label %10, label %12

10:                                               ; preds = %2
  %11 = fmul x86_fp80 %0, %0
  br label %172

12:                                               ; preds = %2
  %13 = icmp ult i32 %8, 1069580288
  %.not165 = icmp ult i32 %.sroa.0.8.extract.trunc, 32768
  br i1 %13, label %14, label %20

14:                                               ; preds = %12
  br i1 %.not165, label %17, label %15

15:                                               ; preds = %14
  store i32 -1, ptr %1, align 4, !tbaa !5
  %16 = fneg x86_fp80 %0
  br label %17

17:                                               ; preds = %15, %14
  %.0154 = phi x86_fp80 [ %16, %15 ], [ %0, %14 ]
  %18 = tail call x86_fp80 @logl(x86_fp80 noundef %.0154) #3
  %19 = fneg x86_fp80 %18
  br label %172

20:                                               ; preds = %12
  br i1 %.not165, label %40, label %21

21:                                               ; preds = %20
  %22 = fneg x86_fp80 %0
  %23 = fmul x86_fp80 %0, 0xKC000C90FDAA22168C235
  %24 = fptrunc x86_fp80 %23 to double
  %25 = tail call double @sin(double noundef %24) #3
  %26 = fpext double %25 to x86_fp80
  %27 = fcmp oeq double %25, 0.000000e+00
  br i1 %27, label %28, label %31

28:                                               ; preds = %21
  %29 = fsub x86_fp80 %0, %0
  %30 = fdiv x86_fp80 0xK3FFF8000000000000000, %29
  br label %172

31:                                               ; preds = %21
  %32 = fcmp ogt double %25, 0.000000e+00
  br i1 %32, label %33, label %34

33:                                               ; preds = %31
  store i32 -1, ptr %1, align 4, !tbaa !5
  br label %36

34:                                               ; preds = %31
  %35 = fneg x86_fp80 %26
  br label %36

36:                                               ; preds = %34, %33
  %.0155 = phi x86_fp80 [ %26, %33 ], [ %35, %34 ]
  %37 = fmul x86_fp80 %.0155, %22
  %38 = fdiv x86_fp80 0xK4000C90FDAA22168C235, %37
  %39 = tail call x86_fp80 @logl(x86_fp80 noundef %38) #3
  br label %40

40:                                               ; preds = %36, %20
  %.0159 = phi x86_fp80 [ %39, %36 ], [ undef, %20 ]
  %.1 = phi x86_fp80 [ %22, %36 ], [ %0, %20 ]
  %41 = icmp eq i32 %8, 1073709056
  %42 = icmp eq i32 %8, 1073774592
  %or.cond = or i1 %41, %42
  %43 = icmp eq i64 %.sroa.0.0.extract.trunc, 0
  %or.cond4 = and i1 %43, %or.cond
  br i1 %or.cond4, label %170, label %44

44:                                               ; preds = %40
  %45 = icmp ult i32 %8, 1073774592
  br i1 %45, label %46, label %113

46:                                               ; preds = %44
  %47 = icmp ult i32 %8, 1073669735
  br i1 %47, label %48, label %55

48:                                               ; preds = %46
  %49 = tail call x86_fp80 @logl(x86_fp80 noundef %.1) #3
  %50 = fneg x86_fp80 %49
  %51 = icmp ugt i32 %8, 1073658697
  br i1 %51, label %63, label %52

52:                                               ; preds = %48
  %53 = icmp ugt i32 %8, 1073540402
  %54 = fadd x86_fp80 %.1, 0xKBFFDEC5B0C6AD7C7EDC4
  br i1 %53, label %select.unfold, label %96

55:                                               ; preds = %46
  %56 = icmp ugt i32 %8, 1073733029
  br i1 %56, label %63, label %57

57:                                               ; preds = %55
  %58 = icmp ugt i32 %8, 1073716645
  br i1 %58, label %59, label %61

59:                                               ; preds = %57
  %60 = fadd x86_fp80 %.1, 0xKBFFFBB16C31AB5F1FB71
  br label %select.unfold

61:                                               ; preds = %57
  %62 = fadd x86_fp80 %.1, 0xKBFFF8000000000000000
  br label %96

63:                                               ; preds = %55, %48
  %.sink = phi x86_fp80 [ 0xKBFFF8000000000000000, %48 ], [ 0xKC0008000000000000000, %55 ]
  %.0160.ph = phi x86_fp80 [ %50, %48 ], [ 0xK00000000000000000000, %55 ]
  %64 = fadd x86_fp80 %.1, %.sink
  %65 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %64, x86_fp80 0xK4000F115D0E13AEA5AAC, x86_fp80 0xK4005E31280572629A7F8)
  %66 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %64, x86_fp80 %65, x86_fp80 0xK4008DC1ACEEC4B3BA538)
  %67 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %64, x86_fp80 %66, x86_fp80 0xK400A964BBAC9559EAC31)
  %68 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %64, x86_fp80 %67, x86_fp80 0xK4009E811ED79A7063DDF)
  %69 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %64, x86_fp80 %68, x86_fp80 0xKC0089E94C7302246C2A8)
  %70 = fadd x86_fp80 %64, 0xK4004F1B2AA9F4861B5CB
  %71 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %64, x86_fp80 %70, x86_fp80 0xK4008D4ACA5204E78D8C0)
  %72 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %64, x86_fp80 %71, x86_fp80 0xK400B8E4AB3272A55A21D)
  %73 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %64, x86_fp80 %72, x86_fp80 0xK400CA05DBD87D12E640B)
  %74 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %64, x86_fp80 %73, x86_fp80 0xK400C805BE51545C76426)
  %75 = fmul x86_fp80 %64, %69
  %76 = fdiv x86_fp80 %75, %74
  %77 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %64, x86_fp80 0xK3FFE8000000000000000, x86_fp80 %76)
  %78 = fadd x86_fp80 %.0160.ph, %77
  br label %170

select.unfold:                                    ; preds = %52, %59
  %.0160.ph174 = phi x86_fp80 [ 0xK00000000000000000000, %59 ], [ %50, %52 ]
  %.0156.ph175 = phi x86_fp80 [ %60, %59 ], [ %54, %52 ]
  %79 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156.ph175, x86_fp80 0xK40018ABC66E1056EBB97, x86_fp80 0xK40069A2C6D7DA4A7143C)
  %80 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156.ph175, x86_fp80 %79, x86_fp80 0xK4009B5EDAD4A2B6AF60D)
  %81 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156.ph175, x86_fp80 %80, x86_fp80 0xK400BAAC17DCD67444A43)
  %82 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156.ph175, x86_fp80 %81, x86_fp80 0xK400C89F26A0FC9F11345)
  %83 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156.ph175, x86_fp80 %82, x86_fp80 0xK400BA0353CB55C121785)
  %84 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156.ph175, x86_fp80 %83, x86_fp80 0xK3FC5867F0E7C29340760)
  %85 = fadd x86_fp80 %.0156.ph175, 0xK400580D986849A094970
  %86 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156.ph175, x86_fp80 %85, x86_fp80 0xK4008F41B2AA4D08C27AA)
  %87 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156.ph175, x86_fp80 %86, x86_fp80 0xK400BB7682D0BD0041DB4)
  %88 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156.ph175, x86_fp80 %87, x86_fp80 0xK400D805C4B9F648BE3D4)
  %89 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156.ph175, x86_fp80 %88, x86_fp80 0xK400DA7CE6EDDA9979471)
  %90 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156.ph175, x86_fp80 %89, x86_fp80 0xK400CA58F65AF2D6352AF)
  %91 = fmul x86_fp80 %.0156.ph175, %84
  %92 = fdiv x86_fp80 %91, %90
  %93 = fadd x86_fp80 %92, 0xK3FC4F84AE446AD360AC8
  %94 = fadd x86_fp80 %93, 0xKBFFBF8CDCDE61C521000
  %95 = fadd x86_fp80 %.0160.ph174, %94
  br label %170

96:                                               ; preds = %61, %52
  %.0160 = phi x86_fp80 [ 0xK00000000000000000000, %61 ], [ %50, %52 ]
  %.0156 = phi x86_fp80 [ %62, %61 ], [ %.1, %52 ]
  %97 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156, x86_fp80 0xK40018F80321770681672, x86_fp80 0xK4005E2738851DB576BEE)
  %98 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156, x86_fp80 %97, x86_fp80 0xK4008BA2D37BF660E26EB)
  %99 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156, x86_fp80 %98, x86_fp80 0xK4009EEF72A378D76FD0C)
  %100 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156, x86_fp80 %99, x86_fp80 0xK4009FF54090C5581BF2A)
  %101 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156, x86_fp80 %100, x86_fp80 0xK4008AB00B4302BB3CBF1)
  %102 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156, x86_fp80 %101, x86_fp80 0xKC005B1B96F0070C4A41B)
  %103 = fmul x86_fp80 %.0156, %102
  %104 = fadd x86_fp80 %.0156, 0xK4004B45C0DD3D2AA7F6A
  %105 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156, x86_fp80 %104, x86_fp80 0xK4007ED116565A2F267A3)
  %106 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156, x86_fp80 %105, x86_fp80 0xK4009F5CE67685BED2E20)
  %107 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156, x86_fp80 %106, x86_fp80 0xK400AECAA1B7760BA7C84)
  %108 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156, x86_fp80 %107, x86_fp80 0xK400AD47B13801C9ABE6B)
  %109 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156, x86_fp80 %108, x86_fp80 0xK40098FDA96EE56155B39)
  %110 = fdiv x86_fp80 %103, %109
  %111 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %.0156, x86_fp80 0xKBFFE8000000000000000, x86_fp80 %110)
  %112 = fadd x86_fp80 %.0160, %111
  br label %170

113:                                              ; preds = %44
  %114 = icmp ult i32 %8, 1073905664
  br i1 %114, label %115, label %151

115:                                              ; preds = %113
  %116 = fptosi x86_fp80 %.1 to i32
  %117 = sitofp i32 %116 to x86_fp80
  %118 = fsub x86_fp80 %.1, %117
  %119 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %118, x86_fp80 0xKC009D29DA60F5DFA05EF, x86_fp80 0xKC00EF4AA443706E810E3)
  %120 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %118, x86_fp80 %119, x86_fp80 0xKC012AD371282903EB2E4)
  %121 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %118, x86_fp80 %120, x86_fp80 0xKC014CA943F86A403F6BE)
  %122 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %118, x86_fp80 %121, x86_fp80 0xKC015C89C01657BB2F73A)
  %123 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %118, x86_fp80 %122, x86_fp80 0xKC014EE1FD18F72CBB4CD)
  %124 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %118, x86_fp80 %123, x86_fp80 0xK4013B194321B770C93B4)
  %125 = fmul x86_fp80 %118, %124
  %126 = fadd x86_fp80 %118, 0xKC007E1198B5AF4A1810D
  %127 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %118, x86_fp80 %126, x86_fp80 0xKC00DEC8AB16E428C6E2C)
  %128 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %118, x86_fp80 %127, x86_fp80 0xKC01287D5CC4AA7C1EF90)
  %129 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %118, x86_fp80 %128, x86_fp80 0xKC015838BFC9A902FB887)
  %130 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %118, x86_fp80 %129, x86_fp80 0xKC016F42D96F3D84BACAE)
  %131 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %118, x86_fp80 %130, x86_fp80 0xKC017D6C87E69FFDB436A)
  %132 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %118, x86_fp80 %131, x86_fp80 0xKC0178FBC72CDBD6AA4C7)
  %133 = fdiv x86_fp80 %125, %132
  %134 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %118, x86_fp80 0xK3FFE8000000000000000, x86_fp80 %133)
  switch i32 %116, label %170 [
    i32 7, label %135
    i32 6, label %137
    i32 5, label %140
    i32 4, label %143
    i32 3, label %146
  ]

135:                                              ; preds = %115
  %136 = fadd x86_fp80 %118, 0xK4001C000000000000000
  br label %137

137:                                              ; preds = %135, %115
  %.0157 = phi x86_fp80 [ 0xK3FFF8000000000000000, %115 ], [ %136, %135 ]
  %138 = fadd x86_fp80 %118, 0xK4001A000000000000000
  %139 = fmul x86_fp80 %138, %.0157
  br label %140

140:                                              ; preds = %137, %115
  %.1158 = phi x86_fp80 [ 0xK3FFF8000000000000000, %115 ], [ %139, %137 ]
  %141 = fadd x86_fp80 %118, 0xK40018000000000000000
  %142 = fmul x86_fp80 %141, %.1158
  br label %143

143:                                              ; preds = %140, %115
  %.2 = phi x86_fp80 [ 0xK3FFF8000000000000000, %115 ], [ %142, %140 ]
  %144 = fadd x86_fp80 %118, 0xK4000C000000000000000
  %145 = fmul x86_fp80 %144, %.2
  br label %146

146:                                              ; preds = %143, %115
  %.3 = phi x86_fp80 [ 0xK3FFF8000000000000000, %115 ], [ %145, %143 ]
  %147 = fadd x86_fp80 %118, 0xK40008000000000000000
  %148 = fmul x86_fp80 %147, %.3
  %149 = tail call x86_fp80 @logl(x86_fp80 noundef %148) #3
  %150 = fadd x86_fp80 %134, %149
  br label %170

151:                                              ; preds = %113
  %152 = icmp ult i32 %8, 1078034432
  %153 = tail call x86_fp80 @logl(x86_fp80 noundef %.1) #3
  br i1 %152, label %154, label %167

154:                                              ; preds = %151
  %155 = fdiv x86_fp80 0xK3FFF8000000000000000, %.1
  %156 = fmul x86_fp80 %155, %155
  %157 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %156, x86_fp80 0xK3FF7A01291C2CC08D984, x86_fp80 0xKBFF5F6853DA103043D91)
  %158 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %156, x86_fp80 %157, x86_fp80 0xK3FF4DC88D492AAD13BDC)
  %159 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %156, x86_fp80 %158, x86_fp80 0xKBFF49C09844E9FCE8B20)
  %160 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %156, x86_fp80 %159, x86_fp80 0xK3FF4D00D009230E5F8F2)
  %161 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %156, x86_fp80 %160, x86_fp80 0xKBFF6B60B60B603A84D88)
  %162 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %156, x86_fp80 %161, x86_fp80 0xK3FFBAAAAAAAAAAAA9FCC)
  %163 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %155, x86_fp80 %162, x86_fp80 0xK3FFDD67F1C864BEB4A69)
  %164 = fadd x86_fp80 %.1, 0xKBFFE8000000000000000
  %165 = fadd x86_fp80 %153, 0xKBFFF8000000000000000
  %166 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %164, x86_fp80 %165, x86_fp80 %163)
  br label %170

167:                                              ; preds = %151
  %168 = fadd x86_fp80 %153, 0xKBFFF8000000000000000
  %169 = fmul x86_fp80 %.1, %168
  br label %170

170:                                              ; preds = %40, %96, %select.unfold, %63, %154, %167, %115, %146
  %.1161 = phi x86_fp80 [ %112, %96 ], [ %95, %select.unfold ], [ %78, %63 ], [ %134, %115 ], [ %150, %146 ], [ %166, %154 ], [ %169, %167 ], [ 0xK00000000000000000000, %40 ]
  %171 = fsub x86_fp80 %.0159, %.1161
  %spec.select = select i1 %.not165, x86_fp80 %.1161, x86_fp80 %171
  br label %172

172:                                              ; preds = %170, %28, %17, %10
  %.0153 = phi x86_fp80 [ %11, %10 ], [ %19, %17 ], [ %30, %28 ], [ %spec.select, %170 ]
  ret x86_fp80 %.0153
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare x86_fp80 @logl(x86_fp80 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare x86_fp80 @llvm.fmuladd.f80(x86_fp80, x86_fp80, x86_fp80) #2

attributes #0 = { mustprogress nofree nounwind willreturn memory(write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass