; LLVM IR from Lodour/ACM-CheatSheet :: src/6_计算几何/3_多边形/5_小结.ll (Z14inside_polygon5pointiPS_i)

; 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"

%struct.point = type { double, double }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_Z5xmult5pointS_S_(double, double, double, double, double, double) #0

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z14inside_polygon5pointiPS_i(double %0, double %1, i32 noundef %2, ptr noundef %3, i32 noundef %4) #0 {
  %6 = alloca i32, align 4
  %7 = alloca %struct.point, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.point, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.point, align 8
  %15 = alloca %struct.point, align 8
  %16 = alloca %struct.point, align 8
  %17 = alloca %struct.point, align 8
  %18 = alloca %struct.point, align 8
  %19 = alloca %struct.point, align 8
  %20 = alloca %struct.point, align 8
  %21 = alloca %struct.point, align 8
  %22 = alloca %struct.point, align 8
  %23 = alloca i32, align 4
  %24 = alloca %struct.point, align 8
  %25 = alloca %struct.point, align 8
  %26 = alloca %struct.point, align 8
  %27 = alloca %struct.point, align 8
  %28 = alloca %struct.point, align 8
  %29 = alloca %struct.point, align 8
  %30 = alloca %struct.point, align 8
  %31 = alloca %struct.point, align 8
  %32 = alloca %struct.point, align 8
  %33 = alloca %struct.point, align 8
  %34 = alloca %struct.point, align 8
  %35 = alloca %struct.point, align 8
  %36 = alloca %struct.point, align 8
  %37 = alloca %struct.point, align 8
  %38 = alloca %struct.point, align 8
  %39 = alloca %struct.point, align 8
  %40 = alloca %struct.point, align 8
  %41 = alloca %struct.point, align 8
  %42 = alloca %struct.point, align 8
  %43 = alloca %struct.point, align 8
  %44 = alloca %struct.point, align 8
  %45 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 0
  store double %0, ptr %45, align 8
  %46 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 1
  store double %1, ptr %46, align 8
  store i32 %2, ptr %8, align 4, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  br label %47

47:                                               ; preds = %354, %5
  %48 = load i32, ptr %12, align 4, !tbaa !5
  %49 = load i32, ptr %8, align 4, !tbaa !5
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %51, label %355

51:                                               ; preds = %47
  store i32 0, ptr %12, align 4, !tbaa !5
  store i32 0, ptr %13, align 4, !tbaa !5
  %52 = call i32 @rand() #4
  %53 = add nsw i32 %52, 10000
  %54 = sitofp i32 %53 to double
  %55 = getelementptr inbounds %struct.point, ptr %11, i32 0, i32 0
  store double %54, ptr %55, align 8, !tbaa !11
  %56 = call i32 @rand() #4
  %57 = add nsw i32 %56, 10000
  %58 = sitofp i32 %57 to double
  %59 = getelementptr inbounds %struct.point, ptr %11, i32 0, i32 1
  store double %58, ptr %59, align 8, !tbaa !14
  br label %60

60:                                               ; preds = %351, %51
  %61 = load i32, ptr %12, align 4, !tbaa !5
  %62 = load i32, ptr %8, align 4, !tbaa !5
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %64, label %354

64:                                               ; preds = %60
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !15
  %65 = load ptr, ptr %9, align 8, !tbaa !9
  %66 = load i32, ptr %12, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds %struct.point, ptr %65, i64 %67
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %68, i64 16, i1 false), !tbaa.struct !15
  %69 = load ptr, ptr %9, align 8, !tbaa !9
  %70 = load i32, ptr %12, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  %72 = load i32, ptr %8, align 4, !tbaa !5
  %73 = srem i32 %71, %72
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds %struct.point, ptr %69, i64 %74
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %75, i64 16, i1 false), !tbaa.struct !15
  %76 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %77 = load double, ptr %76, align 8
  %78 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %79 = load double, ptr %78, align 8
  %80 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %81 = load double, ptr %80, align 8
  %82 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %83 = load double, ptr %82, align 8
  %84 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %85 = load double, ptr %84, align 8
  %86 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %87 = load double, ptr %86, align 8
  %88 = call noundef double @_Z5xmult5pointS_S_(double %77, double %79, double %81, double %83, double %85, double %87)
  %89 = fcmp ogt double %88, 0.000000e+00
  br i1 %89, label %90, label %115

90:                                               ; preds = %64
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !15
  %91 = load ptr, ptr %9, align 8, !tbaa !9
  %92 = load i32, ptr %12, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds %struct.point, ptr %91, i64 %93
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %94, i64 16, i1 false), !tbaa.struct !15
  %95 = load ptr, ptr %9, align 8, !tbaa !9
  %96 = load i32, ptr %12, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  %98 = load i32, ptr %8, align 4, !tbaa !5
  %99 = srem i32 %97, %98
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds %struct.point, ptr %95, i64 %100
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %101, i64 16, i1 false), !tbaa.struct !15
  %102 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %103 = load double, ptr %102, align 8
  %104 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %105 = load double, ptr %104, align 8
  %106 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %107 = load double, ptr %106, align 8
  %108 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %109 = load double, ptr %108, align 8
  %110 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %111 = load double, ptr %110, align 8
  %112 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %113 = load double, ptr %112, align 8
  %114 = call noundef double @_Z5xmult5pointS_S_(double %103, double %105, double %107, double %109, double %111, double %113)
  br label %141

115:                                              ; preds = %64
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !15
  %116 = load ptr, ptr %9, align 8, !tbaa !9
  %117 = load i32, ptr %12, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds %struct.point, ptr %116, i64 %118
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %119, i64 16, i1 false), !tbaa.struct !15
  %120 = load ptr, ptr %9, align 8, !tbaa !9
  %121 = load i32, ptr %12, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  %123 = load i32, ptr %8, align 4, !tbaa !5
  %124 = srem i32 %122, %123
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds %struct.point, ptr %120, i64 %125
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %126, i64 16, i1 false), !tbaa.struct !15
  %127 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %128 = load double, ptr %127, align 8
  %129 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %130 = load double, ptr %129, align 8
  %131 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %132 = load double, ptr %131, align 8
  %133 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %134 = load double, ptr %133, align 8
  %135 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %136 = load double, ptr %135, align 8
  %137 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %138 = load double, ptr %137, align 8
  %139 = call noundef double @_Z5xmult5pointS_S_(double %128, double %130, double %132, double %134, double %136, double %138)
  %140 = fneg double %139
  br label %141

141:                                              ; preds = %115, %90
  %142 = phi double [ %114, %90 ], [ %140, %115 ]
  %143 = fcmp olt double %142, 1.000000e-08
  br i1 %143, label %144, label %194

144:                                              ; preds = %141
  %145 = load ptr, ptr %9, align 8, !tbaa !9
  %146 = load i32, ptr %12, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds %struct.point, ptr %145, i64 %147
  %149 = getelementptr inbounds %struct.point, ptr %148, i32 0, i32 0
  %150 = load double, ptr %149, align 8, !tbaa !11
  %151 = getelementptr inbounds %struct.point, ptr %7, i32 0, i32 0
  %152 = load double, ptr %151, align 8, !tbaa !11
  %153 = fsub double %150, %152
  %154 = load ptr, ptr %9, align 8, !tbaa !9
  %155 = load i32, ptr %12, align 4, !tbaa !5
  %156 = add nsw i32 %155, 1
  %157 = load i32, ptr %8, align 4, !tbaa !5
  %158 = srem i32 %156, %157
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds %struct.point, ptr %154, i64 %159
  %161 = getelementptr inbounds %struct.point, ptr %160, i32 0, i32 0
  %162 = load double, ptr %161, align 8, !tbaa !11
  %163 = getelementptr inbounds %struct.point, ptr %7, i32 0, i32 0
  %164 = load double, ptr %163, align 8, !tbaa !11
  %165 = fsub double %162, %164
  %166 = fmul double %153, %165
  %167 = fcmp olt double %166, 1.000000e-08
  br i1 %167, label %168, label %194

168:                                              ; preds = %144
  %169 = load ptr, ptr %9, align 8, !tbaa !9
  %170 = load i32, ptr %12, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds %struct.point, ptr %169, i64 %171
  %173 = getelementptr inbounds %struct.point, ptr %172, i32 0, i32 1
  %174 = load double, ptr %173, align 8, !tbaa !14
  %175 = getelementptr inbounds %struct.point, ptr %7, i32 0, i32 1
  %176 = load double, ptr %175, align 8, !tbaa !14
  %177 = fsub double %174, %176
  %178 = load ptr, ptr %9, align 8, !tbaa !9
  %179 = load i32, ptr %12, align 4, !tbaa !5
  %180 = add nsw i32 %179, 1
  %181 = load i32, ptr %8, align 4, !tbaa !5
  %182 = srem i32 %180, %181
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds %struct.point, ptr %178, i64 %183
  %185 = getelementptr inbounds %struct.point, ptr %184, i32 0, i32 1
  %186 = load double, ptr %185, align 8, !tbaa !14
  %187 = getelementptr inbounds %struct.point, ptr %7, i32 0, i32 1
  %188 = load double, ptr %187, align 8, !tbaa !14
  %189 = fsub double %186, %188
  %190 = fmul double %177, %189
  %191 = fcmp olt double %190, 1.000000e-08
  br i1 %191, label %192, label %194

192:                                              ; preds = %168
  %193 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %193, ptr %6, align 4
  store i32 1, ptr %23, align 4
  br label %358

194:                                              ; preds = %168, %144, %141
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !15
  %195 = load ptr, ptr %9, align 8, !tbaa !9
  %196 = load i32, ptr %12, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds %struct.point, ptr %195, i64 %197
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %198, i64 16, i1 false), !tbaa.struct !15
  %199 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %200 = load double, ptr %199, align 8
  %201 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %202 = load double, ptr %201, align 8
  %203 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %204 = load double, ptr %203, align 8
  %205 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %206 = load double, ptr %205, align 8
  %207 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %208 = load double, ptr %207, align 8
  %209 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %210 = load double, ptr %209, align 8
  %211 = call noundef double @_Z5xmult5pointS_S_(double %200, double %202, double %204, double %206, double %208, double %210)
  %212 = fcmp ogt double %211, 0.000000e+00
  br i1 %212, label %213, label %231

213:                                              ; preds = %194
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %28, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !15
  %214 = load ptr, ptr %9, align 8, !tbaa !9
  %215 = load i32, ptr %12, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds %struct.point, ptr %214, i64 %216
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %29, ptr align 8 %217, i64 16, i1 false), !tbaa.struct !15
  %218 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %219 = load double, ptr %218, align 8
  %220 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %221 = load double, ptr %220, align 8
  %222 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %223 = load double, ptr %222, align 8
  %224 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %225 = load double, ptr %224, align 8
  %226 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %227 = load double, ptr %226, align 8
  %228 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %229 = load double, ptr %228, align 8
  %230 = call noundef double @_Z5xmult5pointS_S_(double %219, double %221, double %223, double %225, double %227, double %229)
  br label %250

231:                                              ; preds = %194
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !15
  %232 = load ptr, ptr %9, align 8, !tbaa !9
  %233 = load i32, ptr %12, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds %struct.point, ptr %232, i64 %234
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %32, ptr align 8 %235, i64 16, i1 false), !tbaa.struct !15
  %236 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %237 = load double, ptr %236, align 8
  %238 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %239 = load double, ptr %238, align 8
  %240 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %241 = load double, ptr %240, align 8
  %242 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %243 = load double, ptr %242, align 8
  %244 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %245 = load double, ptr %244, align 8
  %246 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %247 = load double, ptr %246, align 8
  %248 = call noundef double @_Z5xmult5pointS_S_(double %237, double %239, double %241, double %243, double %245, double %247)
  %249 = fneg double %248
  br label %250

250:                                              ; preds = %231, %213
  %251 = phi double [ %230, %213 ], [ %249, %231 ]
  %252 = fcmp olt double %251, 1.000000e-08
  br i1 %252, label %253, label %254

253:                                              ; preds = %250
  br label %354

254:                                              ; preds = %250
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !15
  %255 = load ptr, ptr %9, align 8, !tbaa !9
  %256 = load i32, ptr %12, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds %struct.point, ptr %255, i64 %257
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 8 %258, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !15
  %259 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %260 = load double, ptr %259, align 8
  %261 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %262 = load double, ptr %261, align 8
  %263 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 0
  %264 = load double, ptr %263, align 8
  %265 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 1
  %266 = load double, ptr %265, align 8
  %267 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 0
  %268 = load double, ptr %267, align 8
  %269 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 1
  %270 = load double, ptr %269, align 8
  %271 = call noundef double @_Z5xmult5pointS_S_(double %260, double %262, double %264, double %266, double %268, double %270)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %36, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !15
  %272 = load ptr, ptr %9, align 8, !tbaa !9
  %273 = load i32, ptr %12, align 4, !tbaa !5
  %274 = add nsw i32 %273, 1
  %275 = load i32, ptr %8, align 4, !tbaa !5
  %276 = srem i32 %274, %275
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds %struct.point, ptr %272, i64 %277
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %37, ptr align 8 %278, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %38, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !15
  %279 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 0
  %280 = load double, ptr %279, align 8
  %281 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 1
  %282 = load double, ptr %281, align 8
  %283 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %284 = load double, ptr %283, align 8
  %285 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %286 = load double, ptr %285, align 8
  %287 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 0
  %288 = load double, ptr %287, align 8
  %289 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 1
  %290 = load double, ptr %289, align 8
  %291 = call noundef double @_Z5xmult5pointS_S_(double %280, double %282, double %284, double %286, double %288, double %290)
  %292 = fmul double %271, %291
  %293 = fcmp olt double %292, -1.000000e-08
  br i1 %293, label %294, label %348

294:                                              ; preds = %254
  %295 = load ptr, ptr %9, align 8, !tbaa !9
  %296 = load i32, ptr %12, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds %struct.point, ptr %295, i64 %297
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %39, ptr align 8 %298, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %40, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !15
  %299 = load ptr, ptr %9, align 8, !tbaa !9
  %300 = load i32, ptr %12, align 4, !tbaa !5
  %301 = add nsw i32 %300, 1
  %302 = load i32, ptr %8, align 4, !tbaa !5
  %303 = srem i32 %301, %302
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds %struct.point, ptr %299, i64 %304
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %41, ptr align 8 %305, i64 16, i1 false), !tbaa.struct !15
  %306 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 0
  %307 = load double, ptr %306, align 8
  %308 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 1
  %309 = load double, ptr %308, align 8
  %310 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 0
  %311 = load double, ptr %310, align 8
  %312 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 1
  %313 = load double, ptr %312, align 8
  %314 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 0
  %315 = load double, ptr %314, align 8
  %316 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 1
  %317 = load double, ptr %316, align 8
  %318 = call noundef double @_Z5xmult5pointS_S_(double %307, double %309, double %311, double %313, double %315, double %317)
  %319 = load ptr, ptr %9, align 8, !tbaa !9
  %320 = load i32, ptr %12, align 4, !tbaa !5
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds %struct.point, ptr %319, i64 %321
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %42, ptr align 8 %322, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %43, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !15
  %323 = load ptr, ptr %9, align 8, !tbaa !9
  %324 = load i32, ptr %12, align 4, !tbaa !5
  %325 = add nsw i32 %324, 1
  %326 = load i32, ptr %8, align 4, !tbaa !5
  %327 = srem i32 %325, %326
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds %struct.point, ptr %323, i64 %328
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %44, ptr align 8 %329, i64 16, i1 false), !tbaa.struct !15
  %330 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 0
  %331 = load double, ptr %330, align 8
  %332 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 1
  %333 = load double, ptr %332, align 8
  %334 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 0
  %335 = load double, ptr %334, align 8
  %336 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 1
  %337 = load double, ptr %336, align 8
  %338 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 0
  %339 = load double, ptr %338, align 8
  %340 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 1
  %341 = load double, ptr %340, align 8
  %342 = call noundef double @_Z5xmult5pointS_S_(double %331, double %333, double %335, double %337, double %339, double %341)
  %343 = fmul double %318, %342
  %344 = fcmp olt double %343, -1.000000e-08
  br i1 %344, label %345, label %348

345:                                              ; preds = %294
  %346 = load i32, ptr %13, align 4, !tbaa !5
  %347 = add nsw i32 %346, 1
  store i32 %347, ptr %13, align 4, !tbaa !5
  br label %348

348:                                              ; preds = %345, %294, %254
  br label %349

349:                                              ; preds = %348
  br label %350

350:                                              ; preds = %349
  br label %351

351:                                              ; preds = %350
  %352 = load i32, ptr %12, align 4, !tbaa !5
  %353 = add nsw i32 %352, 1
  store i32 %353, ptr %12, align 4, !tbaa !5
  br label %60, !llvm.loop !17

354:                                              ; preds = %253, %60
  br label %47, !llvm.loop !19

355:                                              ; preds = %47
  %356 = load i32, ptr %13, align 4, !tbaa !5
  %357 = and i32 %356, 1
  store i32 %357, ptr %6, align 4
  store i32 1, ptr %23, align 4
  br label %358

358:                                              ; preds = %355, %192
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  %359 = load i32, ptr %6, align 4
  ret i32 %359
}

; Function Attrs: nounwind
declare i32 @rand() #3

attributes #0 = { mustprogress 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS5point", !13, i64 0, !13, i64 8}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{i64 0, i64 8, !16, i64 8, i64 8, !16}
!16 = !{!13, !13, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


; 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"

%struct.point = type { double, double }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_Z5xmult5pointS_S_(double, double, double, double, double, double) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z14inside_polygon5pointiPS_i(double %0, double %1, i32 noundef %2, ptr nocapture noundef readonly %3, i32 noundef %4) local_unnamed_addr #0 {
  %6 = icmp sgt i32 %2, 0
  br i1 %6, label %.lr.ph.us.preheader, label %.loopexit

.lr.ph.us.preheader:                              ; preds = %5
  %7 = zext nneg i32 %2 to i64
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %8 = tail call i32 @rand() #2
  %9 = add nsw i32 %8, 10000
  %10 = sitofp i32 %9 to double
  %11 = tail call i32 @rand() #2
  %12 = add nsw i32 %11, 10000
  %13 = sitofp i32 %12 to double
  br label %14

14:                                               ; preds = %.lr.ph.us, %57
  %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %57 ]
  %.1118123.us = phi i32 [ 0, %.lr.ph.us ], [ %.2.us, %57 ]
  %15 = getelementptr inbounds %struct.point, ptr %3, i64 %indvars.iv
  %.sroa.055.0.copyload.us = load double, ptr %15, align 8, !tbaa !5
  %.sroa.256.0..sroa_idx.us = getelementptr inbounds i8, ptr %15, i64 8
  %.sroa.256.0.copyload.us = load double, ptr %.sroa.256.0..sroa_idx.us, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %16 = icmp eq i64 %indvars.iv.next, %7
  %17 = and i64 %indvars.iv.next, 4294967295
  %18 = select i1 %16, i64 0, i64 %17
  %19 = getelementptr inbounds %struct.point, ptr %3, i64 %18
  %.sroa.053.0.copyload.us = load double, ptr %19, align 8, !tbaa !5
  %.sroa.254.0..sroa_idx.us = getelementptr inbounds i8, ptr %19, i64 8
  %.sroa.254.0.copyload.us = load double, ptr %.sroa.254.0..sroa_idx.us, align 8, !tbaa !5
  %20 = tail call noundef double @_Z5xmult5pointS_S_(double %0, double %1, double %.sroa.055.0.copyload.us, double %.sroa.256.0.copyload.us, double %.sroa.053.0.copyload.us, double %.sroa.254.0.copyload.us)
  %21 = fcmp ogt double %20, 0.000000e+00
  %.sroa.049.0.copyload.us = load double, ptr %15, align 8, !tbaa !5
  %.sroa.250.0.copyload.us = load double, ptr %.sroa.256.0..sroa_idx.us, align 8, !tbaa !5
  %.sroa.047.0.copyload.us = load double, ptr %19, align 8, !tbaa !5
  %.sroa.248.0.copyload.us = load double, ptr %.sroa.254.0..sroa_idx.us, align 8, !tbaa !5
  %22 = tail call noundef double @_Z5xmult5pointS_S_(double %0, double %1, double %.sroa.049.0.copyload.us, double %.sroa.250.0.copyload.us, double %.sroa.047.0.copyload.us, double %.sroa.248.0.copyload.us)
  %23 = fneg double %22
  %24 = select i1 %21, double %22, double %23
  %25 = fcmp olt double %24, 1.000000e-08
  %.sroa.035.0.copyload.us.pre = load double, ptr %15, align 8, !tbaa !5
  br i1 %25, label %26, label %._crit_edge

._crit_edge:                                      ; preds = %14
  %.sroa.236.0.copyload.us.pre = load double, ptr %.sroa.256.0..sroa_idx.us, align 8, !tbaa !5
  br label %38

26:                                               ; preds = %14
  %27 = fsub double %.sroa.035.0.copyload.us.pre, %0
  %28 = load double, ptr %19, align 8, !tbaa !9
  %29 = fsub double %28, %0
  %30 = fmul double %27, %29
  %31 = fcmp olt double %30, 1.000000e-08
  %.sroa.236.0.copyload.us.pre134 = load double, ptr %.sroa.256.0..sroa_idx.us, align 8, !tbaa !5
  br i1 %31, label %32, label %38

32:                                               ; preds = %26
  %33 = fsub double %.sroa.236.0.copyload.us.pre134, %1
  %34 = load double, ptr %.sroa.254.0..sroa_idx.us, align 8, !tbaa !11
  %35 = fsub double %34, %1
  %36 = fmul double %33, %35
  %37 = fcmp olt double %36, 1.000000e-08
  br i1 %37, label %.loopexit, label %38

38:                                               ; preds = %._crit_edge, %32, %26
  %.sroa.236.0.copyload.us = phi double [ %.sroa.236.0.copyload.us.pre, %._crit_edge ], [ %.sroa.236.0.copyload.us.pre134, %32 ], [ %.sroa.236.0.copyload.us.pre134, %26 ]
  %39 = tail call noundef double @_Z5xmult5pointS_S_(double %0, double %1, double %10, double %13, double %.sroa.035.0.copyload.us.pre, double %.sroa.236.0.copyload.us)
  %40 = fcmp ogt double %39, 0.000000e+00
  %.sroa.029.0.copyload.us = load double, ptr %15, align 8, !tbaa !5
  %.sroa.230.0.copyload.us = load double, ptr %.sroa.256.0..sroa_idx.us, align 8, !tbaa !5
  %41 = tail call noundef double @_Z5xmult5pointS_S_(double %0, double %1, double %10, double %13, double %.sroa.029.0.copyload.us, double %.sroa.230.0.copyload.us)
  %42 = fneg double %41
  %43 = select i1 %40, double %41, double %42
  %44 = fcmp olt double %43, 1.000000e-08
  br i1 %44, label %._crit_edge.us, label %45

45:                                               ; preds = %38
  %.sroa.019.0.copyload.us = load double, ptr %15, align 8, !tbaa !5
  %.sroa.220.0.copyload.us = load double, ptr %.sroa.256.0..sroa_idx.us, align 8, !tbaa !5
  %46 = tail call noundef double @_Z5xmult5pointS_S_(double %0, double %1, double %.sroa.019.0.copyload.us, double %.sroa.220.0.copyload.us, double %10, double %13)
  %.sroa.013.0.copyload.us = load double, ptr %19, align 8, !tbaa !5
  %.sroa.214.0.copyload.us = load double, ptr %.sroa.254.0..sroa_idx.us, align 8, !tbaa !5
  %47 = tail call noundef double @_Z5xmult5pointS_S_(double %0, double %1, double %.sroa.013.0.copyload.us, double %.sroa.214.0.copyload.us, double %10, double %13)
  %48 = fmul double %46, %47
  %49 = fcmp olt double %48, -1.000000e-08
  br i1 %49, label %50, label %57

50:                                               ; preds = %45
  %.sroa.09.0.copyload.us = load double, ptr %15, align 8, !tbaa !5
  %.sroa.210.0.copyload.us = load double, ptr %.sroa.256.0..sroa_idx.us, align 8, !tbaa !5
  %.sroa.05.0.copyload.us = load double, ptr %19, align 8, !tbaa !5
  %.sroa.26.0.copyload.us = load double, ptr %.sroa.254.0..sroa_idx.us, align 8, !tbaa !5
  %51 = tail call noundef double @_Z5xmult5pointS_S_(double %.sroa.09.0.copyload.us, double %.sroa.210.0.copyload.us, double %0, double %1, double %.sroa.05.0.copyload.us, double %.sroa.26.0.copyload.us)
  %.sroa.03.0.copyload.us = load double, ptr %15, align 8, !tbaa !5
  %.sroa.24.0.copyload.us = load double, ptr %.sroa.256.0..sroa_idx.us, align 8, !tbaa !5
  %.sroa.0.0.copyload.us = load double, ptr %19, align 8, !tbaa !5
  %.sroa.2.0.copyload.us = load double, ptr %.sroa.254.0..sroa_idx.us, align 8, !tbaa !5
  %52 = tail call noundef double @_Z5xmult5pointS_S_(double %.sroa.03.0.copyload.us, double %.sroa.24.0.copyload.us, double %10, double %13, double %.sroa.0.0.copyload.us, double %.sroa.2.0.copyload.us)
  %53 = fmul double %51, %52
  %54 = fcmp olt double %53, -1.000000e-08
  br i1 %54, label %55, label %57

55:                                               ; preds = %50
  %56 = add nsw i32 %.1118123.us, 1
  br label %57

57:                                               ; preds = %55, %50, %45
  %.2.us = phi i32 [ %56, %55 ], [ %.1118123.us, %50 ], [ %.1118123.us, %45 ]
  %exitcond.not = icmp eq i64 %indvars.iv.next, %7
  br i1 %exitcond.not, label %._crit_edge131.loopexit, label %14, !llvm.loop !12

._crit_edge.us:                                   ; preds = %38
  %58 = trunc nuw nsw i64 %indvars.iv to i32
  %59 = icmp slt i32 %58, %2
  br i1 %59, label %.lr.ph.us, label %._crit_edge131.loopexit, !llvm.loop !14

._crit_edge131.loopexit:                          ; preds = %._crit_edge.us, %57
  %.1118.lcssa.us138 = phi i32 [ %.2.us, %57 ], [ %.1118123.us, %._crit_edge.us ]
  %60 = and i32 %.1118.lcssa.us138, 1
  br label %.loopexit

.loopexit:                                        ; preds = %32, %5, %._crit_edge131.loopexit
  %.0 = phi i32 [ 0, %5 ], [ %60, %._crit_edge131.loopexit ], [ %4, %32 ]
  ret i32 %.0
}

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #1

attributes #0 = { mustprogress 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 = { 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 #2 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS5point", !6, i64 0, !6, i64 8}
!11 = !{!10, !6, i64 8}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass