; LLVM IR from Discngine/fpocket :: src (rpdb)

; 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.s_pdb = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, float, float, float, float, float, float, [83 x i8], [500 x i8], float, float, float, i32, i32 }
%struct.s_atm = type { i32, float, float, float, float, float, float, float, [5 x i8], [7 x i8], [16 x i8], [16 x i8], [3 x i8], [8 x i8], i32, i32, i32, i32, i32, i32, i32, float, float, float, float, float, float, float, i8, i8, float, float, float, float, i16, ptr, i32 }
%struct.s_pdb_grid = type { ptr, ptr, i32, i32, i32, float }
%struct.s_atom_ptr_list = type { ptr, i32 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [45 x i8], align 1

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

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

declare ptr @my_malloc(i64 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @fill_coord_grid(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i16, align 2
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.s_pdb, ptr %12, i32 0, i32 1
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  store ptr %14, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %11) #6
  store i16 25, ptr %11, align 2, !tbaa !14
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %15

15:                                               ; preds = %263, %1
  %16 = load i32, ptr %9, align 4, !tbaa !9
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.s_pdb, ptr %17, i32 0, i32 10
  %19 = load i32, ptr %18, align 4, !tbaa !16
  %20 = icmp slt i32 %16, %19
  br i1 %20, label %21, label %266

21:                                               ; preds = %15
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.s_pdb, ptr %22, i32 0, i32 2
  %24 = load ptr, ptr %23, align 8, !tbaa !17
  %25 = load i32, ptr %9, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds %struct.s_atm, ptr %24, i64 %26
  %28 = getelementptr inbounds %struct.s_atm, ptr %27, i32 0, i32 12
  %29 = getelementptr inbounds [3 x i8], ptr %28, i64 0, i64 0
  %30 = call i32 @strcmp(ptr noundef %29, ptr noundef @.str) #7
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %32, label %262

32:                                               ; preds = %21
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.s_pdb, ptr %33, i32 0, i32 2
  %35 = load ptr, ptr %34, align 8, !tbaa !17
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds %struct.s_atm, ptr %35, i64 %37
  %39 = getelementptr inbounds %struct.s_atm, ptr %38, i32 0, i32 5
  %40 = load float, ptr %39, align 4, !tbaa !18
  store float %40, ptr %6, align 4, !tbaa !20
  %41 = load ptr, ptr %2, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.s_pdb, ptr %41, i32 0, i32 2
  %43 = load ptr, ptr %42, align 8, !tbaa !17
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds %struct.s_atm, ptr %43, i64 %45
  %47 = getelementptr inbounds %struct.s_atm, ptr %46, i32 0, i32 6
  %48 = load float, ptr %47, align 8, !tbaa !21
  store float %48, ptr %7, align 4, !tbaa !20
  %49 = load ptr, ptr %2, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.s_pdb, ptr %49, i32 0, i32 2
  %51 = load ptr, ptr %50, align 8, !tbaa !17
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds %struct.s_atm, ptr %51, i64 %53
  %55 = getelementptr inbounds %struct.s_atm, ptr %54, i32 0, i32 7
  %56 = load float, ptr %55, align 4, !tbaa !22
  store float %56, ptr %8, align 4, !tbaa !20
  %57 = load float, ptr %6, align 4, !tbaa !20
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.s_pdb_grid, ptr %58, i32 0, i32 1
  %60 = load ptr, ptr %59, align 8, !tbaa !23
  %61 = getelementptr inbounds float, ptr %60, i64 0
  %62 = load float, ptr %61, align 4, !tbaa !20
  %63 = fsub float %57, %62
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.s_pdb_grid, ptr %64, i32 0, i32 5
  %66 = load float, ptr %65, align 4, !tbaa !25
  %67 = fdiv float %63, %66
  %68 = call float @llvm.round.f32(float %67)
  %69 = fptosi float %68 to i32
  store i32 %69, ptr %3, align 4, !tbaa !9
  %70 = load float, ptr %7, align 4, !tbaa !20
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.s_pdb_grid, ptr %71, i32 0, i32 1
  %73 = load ptr, ptr %72, align 8, !tbaa !23
  %74 = getelementptr inbounds float, ptr %73, i64 1
  %75 = load float, ptr %74, align 4, !tbaa !20
  %76 = fsub float %70, %75
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.s_pdb_grid, ptr %77, i32 0, i32 5
  %79 = load float, ptr %78, align 4, !tbaa !25
  %80 = fdiv float %76, %79
  %81 = call float @llvm.round.f32(float %80)
  %82 = fptosi float %81 to i32
  store i32 %82, ptr %4, align 4, !tbaa !9
  %83 = load float, ptr %8, align 4, !tbaa !20
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.s_pdb_grid, ptr %84, i32 0, i32 1
  %86 = load ptr, ptr %85, align 8, !tbaa !23
  %87 = getelementptr inbounds float, ptr %86, i64 2
  %88 = load float, ptr %87, align 4, !tbaa !20
  %89 = fsub float %83, %88
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.s_pdb_grid, ptr %90, i32 0, i32 5
  %92 = load float, ptr %91, align 4, !tbaa !25
  %93 = fdiv float %89, %92
  %94 = call float @llvm.round.f32(float %93)
  %95 = fptosi float %94 to i32
  store i32 %95, ptr %5, align 4, !tbaa !9
  %96 = load ptr, ptr @stdout, align 8, !tbaa !5
  %97 = call i32 @fflush(ptr noundef %96)
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.s_pdb_grid, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !26
  %101 = load i32, ptr %3, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds ptr, ptr %100, i64 %102
  %104 = load ptr, ptr %103, align 8, !tbaa !5
  %105 = load i32, ptr %4, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds ptr, ptr %104, i64 %106
  %108 = load ptr, ptr %107, align 8, !tbaa !5
  %109 = load i32, ptr %5, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %108, i64 %110
  %112 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %111, i32 0, i32 1
  %113 = load i32, ptr %112, align 8, !tbaa !27
  %114 = icmp eq i32 %113, 0
  br i1 %114, label %115, label %174

115:                                              ; preds = %32
  %116 = load i16, ptr %11, align 2, !tbaa !14
  %117 = sext i16 %116 to i64
  %118 = mul i64 8, %117
  %119 = call ptr @my_malloc(i64 noundef %118)
  %120 = load ptr, ptr %10, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.s_pdb_grid, ptr %120, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8, !tbaa !26
  %123 = load i32, ptr %3, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds ptr, ptr %122, i64 %124
  %126 = load ptr, ptr %125, align 8, !tbaa !5
  %127 = load i32, ptr %4, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds ptr, ptr %126, i64 %128
  %130 = load ptr, ptr %129, align 8, !tbaa !5
  %131 = load i32, ptr %5, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %130, i64 %132
  %134 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %133, i32 0, i32 0
  store ptr %119, ptr %134, align 8, !tbaa !29
  %135 = load ptr, ptr %2, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.s_pdb, ptr %135, i32 0, i32 3
  %137 = load ptr, ptr %136, align 8, !tbaa !30
  %138 = load i32, ptr %9, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds ptr, ptr %137, i64 %139
  %141 = load ptr, ptr %140, align 8, !tbaa !5
  %142 = load ptr, ptr %10, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.s_pdb_grid, ptr %142, i32 0, i32 0
  %144 = load ptr, ptr %143, align 8, !tbaa !26
  %145 = load i32, ptr %3, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds ptr, ptr %144, i64 %146
  %148 = load ptr, ptr %147, align 8, !tbaa !5
  %149 = load i32, ptr %4, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds ptr, ptr %148, i64 %150
  %152 = load ptr, ptr %151, align 8, !tbaa !5
  %153 = load i32, ptr %5, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %152, i64 %154
  %156 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !29
  %158 = getelementptr inbounds ptr, ptr %157, i64 0
  store ptr %141, ptr %158, align 8, !tbaa !5
  %159 = load ptr, ptr %10, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.s_pdb_grid, ptr %159, i32 0, i32 0
  %161 = load ptr, ptr %160, align 8, !tbaa !26
  %162 = load i32, ptr %3, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds ptr, ptr %161, i64 %163
  %165 = load ptr, ptr %164, align 8, !tbaa !5
  %166 = load i32, ptr %4, align 4, !tbaa !9
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds ptr, ptr %165, i64 %167
  %169 = load ptr, ptr %168, align 8, !tbaa !5
  %170 = load i32, ptr %5, align 4, !tbaa !9
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %169, i64 %171
  %173 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %172, i32 0, i32 1
  store i32 1, ptr %173, align 8, !tbaa !27
  br label %261

174:                                              ; preds = %32
  %175 = load ptr, ptr @stdout, align 8, !tbaa !5
  %176 = call i32 @fflush(ptr noundef %175)
  %177 = load ptr, ptr %10, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.s_pdb_grid, ptr %177, i32 0, i32 0
  %179 = load ptr, ptr %178, align 8, !tbaa !26
  %180 = load i32, ptr %3, align 4, !tbaa !9
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds ptr, ptr %179, i64 %181
  %183 = load ptr, ptr %182, align 8, !tbaa !5
  %184 = load i32, ptr %4, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds ptr, ptr %183, i64 %185
  %187 = load ptr, ptr %186, align 8, !tbaa !5
  %188 = load i32, ptr %5, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %187, i64 %189
  %191 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %190, i32 0, i32 1
  %192 = load i32, ptr %191, align 8, !tbaa !27
  %193 = load i16, ptr %11, align 2, !tbaa !14
  %194 = sext i16 %193 to i32
  %195 = icmp slt i32 %192, %194
  br i1 %195, label %196, label %240

196:                                              ; preds = %174
  %197 = load ptr, ptr @stdout, align 8, !tbaa !5
  %198 = call i32 @fflush(ptr noundef %197)
  %199 = load ptr, ptr %2, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.s_pdb, ptr %199, i32 0, i32 3
  %201 = load ptr, ptr %200, align 8, !tbaa !30
  %202 = load i32, ptr %9, align 4, !tbaa !9
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds ptr, ptr %201, i64 %203
  %205 = load ptr, ptr %204, align 8, !tbaa !5
  %206 = load ptr, ptr %10, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.s_pdb_grid, ptr %206, i32 0, i32 0
  %208 = load ptr, ptr %207, align 8, !tbaa !26
  %209 = load i32, ptr %3, align 4, !tbaa !9
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds ptr, ptr %208, i64 %210
  %212 = load ptr, ptr %211, align 8, !tbaa !5
  %213 = load i32, ptr %4, align 4, !tbaa !9
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds ptr, ptr %212, i64 %214
  %216 = load ptr, ptr %215, align 8, !tbaa !5
  %217 = load i32, ptr %5, align 4, !tbaa !9
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %216, i64 %218
  %220 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %219, i32 0, i32 0
  %221 = load ptr, ptr %220, align 8, !tbaa !29
  %222 = load ptr, ptr %10, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.s_pdb_grid, ptr %222, i32 0, i32 0
  %224 = load ptr, ptr %223, align 8, !tbaa !26
  %225 = load i32, ptr %3, align 4, !tbaa !9
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds ptr, ptr %224, i64 %226
  %228 = load ptr, ptr %227, align 8, !tbaa !5
  %229 = load i32, ptr %4, align 4, !tbaa !9
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds ptr, ptr %228, i64 %230
  %232 = load ptr, ptr %231, align 8, !tbaa !5
  %233 = load i32, ptr %5, align 4, !tbaa !9
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %232, i64 %234
  %236 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %235, i32 0, i32 1
  %237 = load i32, ptr %236, align 8, !tbaa !27
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds ptr, ptr %221, i64 %238
  store ptr %205, ptr %239, align 8, !tbaa !5
  br label %243

240:                                              ; preds = %174
  %241 = load ptr, ptr @stderr, align 8, !tbaa !5
  %242 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %241, ptr noundef @.str.1) #6
  br label %243

243:                                              ; preds = %240, %196
  %244 = load ptr, ptr %10, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.s_pdb_grid, ptr %244, i32 0, i32 0
  %246 = load ptr, ptr %245, align 8, !tbaa !26
  %247 = load i32, ptr %3, align 4, !tbaa !9
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds ptr, ptr %246, i64 %248
  %250 = load ptr, ptr %249, align 8, !tbaa !5
  %251 = load i32, ptr %4, align 4, !tbaa !9
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds ptr, ptr %250, i64 %252
  %254 = load ptr, ptr %253, align 8, !tbaa !5
  %255 = load i32, ptr %5, align 4, !tbaa !9
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %254, i64 %256
  %258 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %257, i32 0, i32 1
  %259 = load i32, ptr %258, align 8, !tbaa !27
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %258, align 8, !tbaa !27
  br label %261

261:                                              ; preds = %243, %115
  br label %262

262:                                              ; preds = %261, %21
  br label %263

263:                                              ; preds = %262
  %264 = load i32, ptr %9, align 4, !tbaa !9
  %265 = add nsw i32 %264, 1
  store i32 %265, ptr %9, align 4, !tbaa !9
  br label %15, !llvm.loop !31

266:                                              ; preds = %15
  call void @llvm.lifetime.end.p0(i64 2, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  ret void
}

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.round.f32(float) #4

declare i32 @fflush(ptr noundef) #1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 #3 = { nounwind willreturn memory(read) "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"s_pdb", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !13, i64 112, !7, i64 116, !7, i64 199, !13, i64 700, !13, i64 704, !13, i64 708, !10, i64 712, !10, i64 716}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!12, !10, i64 76}
!17 = !{!12, !6, i64 16}
!18 = !{!19, !13, i64 20}
!19 = !{!"s_atm", !10, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !7, i64 32, !7, i64 37, !7, i64 44, !7, i64 60, !7, i64 76, !7, i64 79, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !13, i64 116, !13, i64 120, !13, i64 124, !13, i64 128, !13, i64 132, !13, i64 136, !13, i64 140, !7, i64 144, !7, i64 145, !13, i64 148, !13, i64 152, !13, i64 156, !13, i64 160, !15, i64 164, !6, i64 168, !10, i64 176}
!20 = !{!13, !13, i64 0}
!21 = !{!19, !13, i64 24}
!22 = !{!19, !13, i64 28}
!23 = !{!24, !6, i64 8}
!24 = !{!"s_pdb_grid", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !13, i64 28}
!25 = !{!24, !13, i64 28}
!26 = !{!24, !6, i64 0}
!27 = !{!28, !10, i64 8}
!28 = !{!"s_atom_ptr_list", !6, i64 0, !10, i64 8}
!29 = !{!28, !6, i64 0}
!30 = !{!12, !6, i64 24}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}


; 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.s_atm = type { i32, float, float, float, float, float, float, float, [5 x i8], [7 x i8], [16 x i8], [16 x i8], [3 x i8], [8 x i8], i32, i32, i32, i32, i32, i32, i32, float, float, float, float, float, float, float, i8, i8, float, float, float, float, i16, ptr, i32 }
%struct.s_atom_ptr_list = type { ptr, i32 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [45 x i8], align 1

declare ptr @my_malloc(i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @fill_coord_grid(ptr nocapture noundef readonly %0) local_unnamed_addr #1 {
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 76
  %5 = load i32, ptr %4, align 4, !tbaa !12
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = getelementptr inbounds i8, ptr %3, i64 8
  %9 = getelementptr inbounds i8, ptr %3, i64 28
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  br label %11

11:                                               ; preds = %.lr.ph, %117
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %117 ]
  %12 = load ptr, ptr %7, align 8, !tbaa !13
  %13 = getelementptr inbounds %struct.s_atm, ptr %12, i64 %indvars.iv
  %14 = getelementptr inbounds i8, ptr %13, i64 76
  %15 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %14, ptr noundef nonnull dereferenceable(1) @.str) #5
  %.not = icmp eq i32 %15, 0
  br i1 %.not, label %117, label %16

16:                                               ; preds = %11
  %17 = getelementptr inbounds i8, ptr %13, i64 20
  %18 = load float, ptr %17, align 4, !tbaa !14
  %19 = getelementptr inbounds i8, ptr %13, i64 24
  %20 = load float, ptr %19, align 8, !tbaa !17
  %21 = getelementptr inbounds i8, ptr %13, i64 28
  %22 = load float, ptr %21, align 4, !tbaa !18
  %23 = load ptr, ptr %8, align 8, !tbaa !19
  %24 = load float, ptr %23, align 4, !tbaa !21
  %25 = fsub float %18, %24
  %26 = load float, ptr %9, align 4, !tbaa !22
  %27 = fdiv float %25, %26
  %28 = tail call float @llvm.round.f32(float %27)
  %29 = fptosi float %28 to i32
  %30 = getelementptr inbounds i8, ptr %23, i64 4
  %31 = load float, ptr %30, align 4, !tbaa !21
  %32 = fsub float %20, %31
  %33 = fdiv float %32, %26
  %34 = tail call float @llvm.round.f32(float %33)
  %35 = fptosi float %34 to i32
  %36 = getelementptr inbounds i8, ptr %23, i64 8
  %37 = load float, ptr %36, align 4, !tbaa !21
  %38 = fsub float %22, %37
  %39 = fdiv float %38, %26
  %40 = tail call float @llvm.round.f32(float %39)
  %41 = fptosi float %40 to i32
  %42 = load ptr, ptr @stdout, align 8, !tbaa !23
  %43 = tail call i32 @fflush(ptr noundef %42)
  %44 = load ptr, ptr %3, align 8, !tbaa !24
  %45 = sext i32 %29 to i64
  %46 = getelementptr inbounds ptr, ptr %44, i64 %45
  %47 = load ptr, ptr %46, align 8, !tbaa !23
  %48 = sext i32 %35 to i64
  %49 = getelementptr inbounds ptr, ptr %47, i64 %48
  %50 = load ptr, ptr %49, align 8, !tbaa !23
  %51 = sext i32 %41 to i64
  %52 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %50, i64 %51, i32 1
  %53 = load i32, ptr %52, align 8, !tbaa !25
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %77

55:                                               ; preds = %16
  %56 = tail call ptr @my_malloc(i64 noundef 200) #6
  %57 = load ptr, ptr %3, align 8, !tbaa !24
  %58 = getelementptr inbounds ptr, ptr %57, i64 %45
  %59 = load ptr, ptr %58, align 8, !tbaa !23
  %60 = getelementptr inbounds ptr, ptr %59, i64 %48
  %61 = load ptr, ptr %60, align 8, !tbaa !23
  %62 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %61, i64 %51
  store ptr %56, ptr %62, align 8, !tbaa !27
  %63 = load ptr, ptr %10, align 8, !tbaa !28
  %64 = getelementptr inbounds ptr, ptr %63, i64 %indvars.iv
  %65 = load ptr, ptr %64, align 8, !tbaa !23
  %66 = load ptr, ptr %58, align 8, !tbaa !23
  %67 = getelementptr inbounds ptr, ptr %66, i64 %48
  %68 = load ptr, ptr %67, align 8, !tbaa !23
  %69 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %68, i64 %51
  %70 = load ptr, ptr %69, align 8, !tbaa !27
  store ptr %65, ptr %70, align 8, !tbaa !23
  %71 = load ptr, ptr %3, align 8, !tbaa !24
  %72 = getelementptr inbounds ptr, ptr %71, i64 %45
  %73 = load ptr, ptr %72, align 8, !tbaa !23
  %74 = getelementptr inbounds ptr, ptr %73, i64 %48
  %75 = load ptr, ptr %74, align 8, !tbaa !23
  %76 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %75, i64 %51, i32 1
  store i32 1, ptr %76, align 8, !tbaa !25
  br label %117

77:                                               ; preds = %16
  %78 = load ptr, ptr @stdout, align 8, !tbaa !23
  %79 = tail call i32 @fflush(ptr noundef %78)
  %80 = load ptr, ptr %3, align 8, !tbaa !24
  %81 = getelementptr inbounds ptr, ptr %80, i64 %45
  %82 = load ptr, ptr %81, align 8, !tbaa !23
  %83 = getelementptr inbounds ptr, ptr %82, i64 %48
  %84 = load ptr, ptr %83, align 8, !tbaa !23
  %85 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %84, i64 %51, i32 1
  %86 = load i32, ptr %85, align 8, !tbaa !25
  %87 = icmp slt i32 %86, 25
  br i1 %87, label %88, label %105

88:                                               ; preds = %77
  %89 = load ptr, ptr @stdout, align 8, !tbaa !23
  %90 = tail call i32 @fflush(ptr noundef %89)
  %91 = load ptr, ptr %10, align 8, !tbaa !28
  %92 = getelementptr inbounds ptr, ptr %91, i64 %indvars.iv
  %93 = load ptr, ptr %92, align 8, !tbaa !23
  %94 = load ptr, ptr %3, align 8, !tbaa !24
  %95 = getelementptr inbounds ptr, ptr %94, i64 %45
  %96 = load ptr, ptr %95, align 8, !tbaa !23
  %97 = getelementptr inbounds ptr, ptr %96, i64 %48
  %98 = load ptr, ptr %97, align 8, !tbaa !23
  %99 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %98, i64 %51
  %100 = load ptr, ptr %99, align 8, !tbaa !27
  %101 = getelementptr inbounds i8, ptr %99, i64 8
  %102 = load i32, ptr %101, align 8, !tbaa !25
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds ptr, ptr %100, i64 %103
  store ptr %93, ptr %104, align 8, !tbaa !23
  br label %108

105:                                              ; preds = %77
  %106 = load ptr, ptr @stderr, align 8, !tbaa !23
  %107 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %106, ptr noundef nonnull @.str.1) #7
  br label %108

108:                                              ; preds = %105, %88
  %109 = load ptr, ptr %3, align 8, !tbaa !24
  %110 = getelementptr inbounds ptr, ptr %109, i64 %45
  %111 = load ptr, ptr %110, align 8, !tbaa !23
  %112 = getelementptr inbounds ptr, ptr %111, i64 %48
  %113 = load ptr, ptr %112, align 8, !tbaa !23
  %114 = getelementptr inbounds %struct.s_atom_ptr_list, ptr %113, i64 %51, i32 1
  %115 = load i32, ptr %114, align 8, !tbaa !25
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %114, align 8, !tbaa !25
  br label %117

117:                                              ; preds = %11, %108, %55
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %118 = load i32, ptr %4, align 4, !tbaa !12
  %119 = sext i32 %118 to i64
  %120 = icmp slt i64 %indvars.iv.next, %119
  br i1 %120, label %11, label %._crit_edge, !llvm.loop !29

._crit_edge:                                      ; preds = %117, %1
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.round.f32(float) #3

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

attributes #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 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 #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nofree 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 #5 = { nounwind willreturn memory(read) }
attributes #6 = { nounwind }
attributes #7 = { cold 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, !7, i64 8}
!6 = !{!"s_pdb", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !8, i64 116, !8, i64 199, !11, i64 700, !11, i64 704, !11, i64 708, !10, i64 712, !10, i64 716}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !10, i64 76}
!13 = !{!6, !7, i64 16}
!14 = !{!15, !11, i64 20}
!15 = !{!"s_atm", !10, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !8, i64 32, !8, i64 37, !8, i64 44, !8, i64 60, !8, i64 76, !8, i64 79, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !8, i64 144, !8, i64 145, !11, i64 148, !11, i64 152, !11, i64 156, !11, i64 160, !16, i64 164, !7, i64 168, !10, i64 176}
!16 = !{!"short", !8, i64 0}
!17 = !{!15, !11, i64 24}
!18 = !{!15, !11, i64 28}
!19 = !{!20, !7, i64 8}
!20 = !{!"s_pdb_grid", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !11, i64 28}
!21 = !{!11, !11, i64 0}
!22 = !{!20, !11, i64 28}
!23 = !{!7, !7, i64 0}
!24 = !{!20, !7, i64 0}
!25 = !{!26, !10, i64 8}
!26 = !{!"s_atom_ptr_list", !7, i64 0, !10, i64 8}
!27 = !{!26, !7, i64 0}
!28 = !{!6, !7, i64 24}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


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