; LLVM IR from sysprog21/shecc :: src (ssa)

; 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.func_list_t = type { ptr, ptr }
%struct.func = type { %struct.var, [8 x %struct.var], i32, i32, i32, ptr, ptr, %struct.symbol_list_t, i32, i32, ptr }
%struct.var = type { [32 x i8], [32 x i8], i32, i8, i8, i32, i32, i32, i32, i32, ptr, i32, [64 x ptr], i32, %struct.rename_t, %struct.ref_block_list, ptr, ptr, ptr, i32, i8, i8, i8 }
%struct.rename_t = type { i32, [64 x i32], i32 }
%struct.ref_block_list = type { ptr, ptr }
%struct.symbol_list_t = type { ptr, ptr }
%struct.symbol = type { ptr, i32, ptr }
%struct.ref_block = type { ptr, ptr }
%struct.basic_block = type { %struct.insn_list_t, %struct.ph2_ir_list_t, [128 x %struct.bb_connection_t], ptr, ptr, ptr, ptr, ptr, ptr, ptr, [800 x ptr], i32, [800 x ptr], i32, [800 x ptr], i32, [800 x ptr], i32, i32, i32, [64 x ptr], [64 x ptr], i32, i32, i32, i8, [64 x ptr], ptr, [256 x ptr], ptr, ptr, ptr, %struct.symbol_list_t, i32 }
%struct.insn_list_t = type { ptr, ptr }
%struct.ph2_ir_list_t = type { ptr, ptr }
%struct.bb_connection_t = type { ptr, i32 }

@FUNC_LIST = external dso_local global %struct.func_list_t, align 8

; 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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @var_check_in_scope(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @insert_phi_insn(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @solve_phi_insertion() #1 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [64 x ptr], align 16
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca i8, align 1
  %15 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #2
  %16 = load ptr, ptr @FUNC_LIST, align 8, !tbaa !5
  store ptr %16, ptr %1, align 8, !tbaa !10
  br label %17

17:                                               ; preds = %189, %0
  %18 = load ptr, ptr %1, align 8, !tbaa !10
  %19 = icmp ne ptr %18, null
  br i1 %19, label %21, label %20

20:                                               ; preds = %17
  store i32 2, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #2
  br label %193

21:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #2
  %22 = load ptr, ptr %1, align 8, !tbaa !10
  %23 = getelementptr inbounds %struct.func, ptr %22, i32 0, i32 7
  %24 = getelementptr inbounds %struct.symbol_list_t, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  store ptr %25, ptr %3, align 8, !tbaa !10
  br label %26

26:                                               ; preds = %184, %21
  %27 = load ptr, ptr %3, align 8, !tbaa !10
  %28 = icmp ne ptr %27, null
  br i1 %28, label %30, label %29

29:                                               ; preds = %26
  store i32 5, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #2
  br label %188

30:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #2
  %31 = load ptr, ptr %3, align 8, !tbaa !10
  %32 = getelementptr inbounds %struct.symbol, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !18
  store ptr %33, ptr %4, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 512, ptr %5) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #2
  store i32 0, ptr %6, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #2
  %34 = load ptr, ptr %4, align 8, !tbaa !10
  %35 = getelementptr inbounds %struct.var, ptr %34, i32 0, i32 15
  %36 = getelementptr inbounds %struct.ref_block_list, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !21
  store ptr %37, ptr %7, align 8, !tbaa !10
  br label %38

38:                                               ; preds = %50, %30
  %39 = load ptr, ptr %7, align 8, !tbaa !10
  %40 = icmp ne ptr %39, null
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  store i32 8, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #2
  br label %54

42:                                               ; preds = %38
  %43 = load ptr, ptr %7, align 8, !tbaa !10
  %44 = getelementptr inbounds %struct.ref_block, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !22
  %46 = load i32, ptr %6, align 4, !tbaa !20
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %6, align 4, !tbaa !20
  %48 = sext i32 %46 to i64
  %49 = getelementptr inbounds [64 x ptr], ptr %5, i64 0, i64 %48
  store ptr %45, ptr %49, align 8, !tbaa !10
  br label %50

50:                                               ; preds = %42
  %51 = load ptr, ptr %7, align 8, !tbaa !10
  %52 = getelementptr inbounds %struct.ref_block, ptr %51, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !24
  store ptr %53, ptr %7, align 8, !tbaa !10
  br label %38, !llvm.loop !25

54:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #2
  store i32 0, ptr %8, align 4, !tbaa !20
  br label %55

55:                                               ; preds = %180, %54
  %56 = load i32, ptr %8, align 4, !tbaa !20
  %57 = load i32, ptr %6, align 4, !tbaa !20
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  store i32 11, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #2
  br label %183

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  %61 = load i32, ptr %8, align 4, !tbaa !20
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [64 x ptr], ptr %5, i64 0, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !10
  store ptr %64, ptr %9, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #2
  store i32 0, ptr %10, align 4, !tbaa !20
  br label %65

65:                                               ; preds = %176, %60
  %66 = load i32, ptr %10, align 4, !tbaa !20
  %67 = load ptr, ptr %9, align 8, !tbaa !10
  %68 = getelementptr inbounds %struct.basic_block, ptr %67, i32 0, i32 22
  %69 = load i32, ptr %68, align 8, !tbaa !27
  %70 = icmp slt i32 %66, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %65
  store i32 14, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #2
  br label %179

72:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #2
  %73 = load ptr, ptr %9, align 8, !tbaa !10
  %74 = getelementptr inbounds %struct.basic_block, ptr %73, i32 0, i32 20
  %75 = load i32, ptr %10, align 4, !tbaa !20
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [64 x ptr], ptr %74, i64 0, i64 %76
  %78 = load ptr, ptr %77, align 8, !tbaa !10
  store ptr %78, ptr %11, align 8, !tbaa !10
  %79 = load ptr, ptr %4, align 8, !tbaa !10
  %80 = load ptr, ptr %11, align 8, !tbaa !10
  %81 = getelementptr inbounds %struct.basic_block, ptr %80, i32 0, i32 31
  %82 = load ptr, ptr %81, align 8, !tbaa !29
  %83 = call zeroext i1 @var_check_in_scope(ptr noundef %79, ptr noundef %82)
  br i1 %83, label %85, label %84

84:                                               ; preds = %72
  store i32 16, ptr %2, align 4
  br label %173

85:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #2
  store i8 0, ptr %12, align 1, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #2
  %86 = load ptr, ptr %11, align 8, !tbaa !10
  %87 = getelementptr inbounds %struct.basic_block, ptr %86, i32 0, i32 32
  %88 = getelementptr inbounds %struct.symbol_list_t, ptr %87, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8, !tbaa !31
  store ptr %89, ptr %13, align 8, !tbaa !10
  br label %90

90:                                               ; preds = %102, %85
  %91 = load ptr, ptr %13, align 8, !tbaa !10
  %92 = icmp ne ptr %91, null
  br i1 %92, label %94, label %93

93:                                               ; preds = %90
  store i32 17, ptr %2, align 4
  br label %106

94:                                               ; preds = %90
  %95 = load ptr, ptr %13, align 8, !tbaa !10
  %96 = getelementptr inbounds %struct.symbol, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !18
  %98 = load ptr, ptr %4, align 8, !tbaa !10
  %99 = icmp eq ptr %97, %98
  br i1 %99, label %100, label %101

100:                                              ; preds = %94
  store i8 1, ptr %12, align 1, !tbaa !30
  store i32 17, ptr %2, align 4
  br label %106

101:                                              ; preds = %94
  br label %102

102:                                              ; preds = %101
  %103 = load ptr, ptr %13, align 8, !tbaa !10
  %104 = getelementptr inbounds %struct.symbol, ptr %103, i32 0, i32 2
  %105 = load ptr, ptr %104, align 8, !tbaa !32
  store ptr %105, ptr %13, align 8, !tbaa !10
  br label %90, !llvm.loop !33

106:                                              ; preds = %100, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #2
  br label %107

107:                                              ; preds = %106
  %108 = load i8, ptr %12, align 1, !tbaa !30, !range !34, !noundef !35
  %109 = trunc i8 %108 to i1
  br i1 %109, label %110, label %111

110:                                              ; preds = %107
  store i32 16, ptr %2, align 4
  br label %172

111:                                              ; preds = %107
  %112 = load ptr, ptr %11, align 8, !tbaa !10
  %113 = load ptr, ptr %1, align 8, !tbaa !10
  %114 = getelementptr inbounds %struct.func, ptr %113, i32 0, i32 6
  %115 = load ptr, ptr %114, align 8, !tbaa !36
  %116 = icmp eq ptr %112, %115
  br i1 %116, label %117, label %118

117:                                              ; preds = %111
  store i32 16, ptr %2, align 4
  br label %172

118:                                              ; preds = %111
  %119 = load ptr, ptr %4, align 8, !tbaa !10
  %120 = getelementptr inbounds %struct.var, ptr %119, i32 0, i32 4
  %121 = load i8, ptr %120, align 1, !tbaa !37, !range !34, !noundef !35
  %122 = trunc i8 %121 to i1
  br i1 %122, label %123, label %124

123:                                              ; preds = %118
  store i32 16, ptr %2, align 4
  br label %172

124:                                              ; preds = %118
  %125 = load ptr, ptr %11, align 8, !tbaa !10
  %126 = load ptr, ptr %4, align 8, !tbaa !10
  %127 = call zeroext i1 @insert_phi_insn(ptr noundef %125, ptr noundef %126)
  br i1 %127, label %128, label %171

128:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #2
  store i8 0, ptr %14, align 1, !tbaa !30
  %129 = load ptr, ptr %4, align 8, !tbaa !10
  %130 = getelementptr inbounds %struct.var, ptr %129, i32 0, i32 20
  %131 = load i8, ptr %130, align 4, !tbaa !38, !range !34, !noundef !35
  %132 = trunc i8 %131 to i1
  br i1 %132, label %138, label %133

133:                                              ; preds = %128
  %134 = load ptr, ptr %4, align 8, !tbaa !10
  %135 = getelementptr inbounds %struct.var, ptr %134, i32 0, i32 21
  %136 = load i8, ptr %135, align 1, !tbaa !39, !range !34, !noundef !35
  %137 = trunc i8 %136 to i1
  br i1 %137, label %138, label %139

138:                                              ; preds = %133, %128
  store i32 16, ptr %2, align 4
  br label %168

139:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #2
  store i32 0, ptr %15, align 4, !tbaa !20
  br label %140

140:                                              ; preds = %154, %139
  %141 = load i32, ptr %15, align 4, !tbaa !20
  %142 = load i32, ptr %6, align 4, !tbaa !20
  %143 = icmp slt i32 %141, %142
  br i1 %143, label %145, label %144

144:                                              ; preds = %140
  store i32 20, ptr %2, align 4
  br label %157

145:                                              ; preds = %140
  %146 = load i32, ptr %15, align 4, !tbaa !20
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [64 x ptr], ptr %5, i64 0, i64 %147
  %149 = load ptr, ptr %148, align 8, !tbaa !10
  %150 = load ptr, ptr %11, align 8, !tbaa !10
  %151 = icmp eq ptr %149, %150
  br i1 %151, label %152, label %153

152:                                              ; preds = %145
  store i8 1, ptr %14, align 1, !tbaa !30
  store i32 20, ptr %2, align 4
  br label %157

153:                                              ; preds = %145
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %15, align 4, !tbaa !20
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %15, align 4, !tbaa !20
  br label %140, !llvm.loop !40

157:                                              ; preds = %152, %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #2
  br label %158

158:                                              ; preds = %157
  %159 = load i8, ptr %14, align 1, !tbaa !30, !range !34, !noundef !35
  %160 = trunc i8 %159 to i1
  br i1 %160, label %167, label %161

161:                                              ; preds = %158
  %162 = load ptr, ptr %11, align 8, !tbaa !10
  %163 = load i32, ptr %6, align 4, !tbaa !20
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %6, align 4, !tbaa !20
  %165 = sext i32 %163 to i64
  %166 = getelementptr inbounds [64 x ptr], ptr %5, i64 0, i64 %165
  store ptr %162, ptr %166, align 8, !tbaa !10
  br label %167

167:                                              ; preds = %161, %158
  store i32 0, ptr %2, align 4
  br label %168

168:                                              ; preds = %167, %138
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #2
  %169 = load i32, ptr %2, align 4
  switch i32 %169, label %172 [
    i32 0, label %170
  ]

170:                                              ; preds = %168
  br label %171

171:                                              ; preds = %170, %124
  store i32 0, ptr %2, align 4
  br label %172

172:                                              ; preds = %171, %168, %123, %117, %110
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #2
  br label %173

173:                                              ; preds = %172, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #2
  %174 = load i32, ptr %2, align 4
  switch i32 %174, label %194 [
    i32 0, label %175
    i32 16, label %176
  ]

175:                                              ; preds = %173
  br label %176

176:                                              ; preds = %175, %173
  %177 = load i32, ptr %10, align 4, !tbaa !20
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %10, align 4, !tbaa !20
  br label %65, !llvm.loop !41

179:                                              ; preds = %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  br label %180

180:                                              ; preds = %179
  %181 = load i32, ptr %8, align 4, !tbaa !20
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %8, align 4, !tbaa !20
  br label %55, !llvm.loop !42

183:                                              ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 512, ptr %5) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #2
  br label %184

184:                                              ; preds = %183
  %185 = load ptr, ptr %3, align 8, !tbaa !10
  %186 = getelementptr inbounds %struct.symbol, ptr %185, i32 0, i32 2
  %187 = load ptr, ptr %186, align 8, !tbaa !32
  store ptr %187, ptr %3, align 8, !tbaa !10
  br label %26, !llvm.loop !43

188:                                              ; preds = %29
  br label %189

189:                                              ; preds = %188
  %190 = load ptr, ptr %1, align 8, !tbaa !10
  %191 = getelementptr inbounds %struct.func, ptr %190, i32 0, i32 10
  %192 = load ptr, ptr %191, align 8, !tbaa !44
  store ptr %192, ptr %1, align 8, !tbaa !10
  br label %17, !llvm.loop !45

193:                                              ; preds = %20
  ret void

194:                                              ; preds = %173
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 0}
!6 = !{!"", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !7, i64 8528}
!12 = !{!"func", !13, i64 0, !8, i64 944, !14, i64 8496, !14, i64 8500, !14, i64 8504, !7, i64 8512, !7, i64 8520, !6, i64 8528, !14, i64 8544, !14, i64 8548, !7, i64 8552}
!13 = !{!"var", !8, i64 0, !8, i64 32, !14, i64 64, !15, i64 68, !15, i64 69, !14, i64 72, !14, i64 76, !14, i64 80, !14, i64 84, !14, i64 88, !7, i64 96, !14, i64 104, !8, i64 112, !14, i64 624, !16, i64 628, !17, i64 896, !7, i64 912, !7, i64 920, !7, i64 928, !14, i64 936, !15, i64 940, !15, i64 941, !15, i64 942}
!14 = !{!"int", !8, i64 0}
!15 = !{!"_Bool", !8, i64 0}
!16 = !{!"", !14, i64 0, !8, i64 4, !14, i64 260}
!17 = !{!"ref_block_list", !7, i64 0, !7, i64 8}
!18 = !{!19, !7, i64 0}
!19 = !{!"symbol", !7, i64 0, !14, i64 8, !7, i64 16}
!20 = !{!14, !14, i64 0}
!21 = !{!13, !7, i64 896}
!22 = !{!23, !7, i64 0}
!23 = !{!"ref_block", !7, i64 0, !7, i64 8}
!24 = !{!23, !7, i64 8}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!28, !14, i64 28800}
!28 = !{!"basic_block", !6, i64 0, !6, i64 16, !8, i64 32, !7, i64 2080, !7, i64 2088, !7, i64 2096, !7, i64 2104, !7, i64 2112, !7, i64 2120, !7, i64 2128, !8, i64 2136, !14, i64 8536, !8, i64 8544, !14, i64 14944, !8, i64 14952, !14, i64 21352, !8, i64 21360, !14, i64 27760, !14, i64 27764, !14, i64 27768, !8, i64 27776, !8, i64 28288, !14, i64 28800, !14, i64 28804, !14, i64 28808, !15, i64 28812, !8, i64 28816, !7, i64 29328, !8, i64 29336, !7, i64 31384, !7, i64 31392, !7, i64 31400, !6, i64 31408, !14, i64 31424}
!29 = !{!28, !7, i64 31400}
!30 = !{!15, !15, i64 0}
!31 = !{!28, !7, i64 31408}
!32 = !{!19, !7, i64 16}
!33 = distinct !{!33, !26}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = !{!12, !7, i64 8520}
!37 = !{!13, !15, i64 69}
!38 = !{!13, !15, i64 940}
!39 = !{!13, !15, i64 941}
!40 = distinct !{!40, !26}
!41 = distinct !{!41, !26}
!42 = distinct !{!42, !26}
!43 = distinct !{!43, !26}
!44 = !{!12, !7, i64 8552}
!45 = distinct !{!45, !26}


; 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.func_list_t = type { ptr, ptr }

@FUNC_LIST = external dso_local local_unnamed_addr global %struct.func_list_t, align 8

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @var_check_in_scope(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @insert_phi_insn(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @solve_phi_insertion() local_unnamed_addr #1 {
  %1 = alloca [64 x ptr], align 16
  %.04685 = load ptr, ptr @FUNC_LIST, align 8, !tbaa !5
  %.not86 = icmp eq ptr %.04685, null
  br i1 %.not86, label %._crit_edge90, label %.lr.ph89

._crit_edge90:                                    ; preds = %._crit_edge84, %0
  ret void

.lr.ph89:                                         ; preds = %0, %._crit_edge84
  %.04687 = phi ptr [ %.046, %._crit_edge84 ], [ %.04685, %0 ]
  %2 = getelementptr inbounds i8, ptr %.04687, i64 8528
  %.05279 = load ptr, ptr %2, align 8, !tbaa !5
  %.not5480 = icmp eq ptr %.05279, null
  br i1 %.not5480, label %._crit_edge84, label %.lr.ph83

.lr.ph83:                                         ; preds = %.lr.ph89
  %3 = getelementptr inbounds i8, ptr %.04687, i64 8520
  br label %5

._crit_edge84:                                    ; preds = %._crit_edge78, %.lr.ph89
  %4 = getelementptr inbounds i8, ptr %.04687, i64 8552
  %.046 = load ptr, ptr %4, align 8, !tbaa !5
  %.not = icmp eq ptr %.046, null
  br i1 %.not, label %._crit_edge90, label %.lr.ph89, !llvm.loop !9

5:                                                ; preds = %.lr.ph83, %._crit_edge78
  %.05281 = phi ptr [ %.05279, %.lr.ph83 ], [ %.052, %._crit_edge78 ]
  %6 = load ptr, ptr %.05281, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %1) #2
  %7 = getelementptr inbounds i8, ptr %6, i64 896
  %.05061 = load ptr, ptr %7, align 8, !tbaa !5
  %.not5562 = icmp eq ptr %.05061, null
  br i1 %.not5562, label %._crit_edge78, label %.lr.ph

.preheader60:                                     ; preds = %.lr.ph
  %8 = trunc nuw i64 %indvars.iv.next to i32
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph77, label %._crit_edge78

.lr.ph77:                                         ; preds = %.preheader60
  %10 = getelementptr inbounds i8, ptr %6, i64 69
  %11 = getelementptr inbounds i8, ptr %6, i64 940
  %12 = getelementptr inbounds i8, ptr %6, i64 941
  br label %17

.lr.ph:                                           ; preds = %5, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %5 ]
  %.05064 = phi ptr [ %.050, %.lr.ph ], [ %.05061, %5 ]
  %13 = load ptr, ptr %.05064, align 8, !tbaa !14
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %14 = getelementptr inbounds [64 x ptr], ptr %1, i64 0, i64 %indvars.iv
  store ptr %13, ptr %14, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %.05064, i64 8
  %.050 = load ptr, ptr %15, align 8, !tbaa !5
  %.not55 = icmp eq ptr %.050, null
  br i1 %.not55, label %.preheader60, label %.lr.ph, !llvm.loop !16

._crit_edge78:                                    ; preds = %._crit_edge, %5, %.preheader60
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %1) #2
  %16 = getelementptr inbounds i8, ptr %.05281, i64 16
  %.052 = load ptr, ptr %16, align 8, !tbaa !5
  %.not54 = icmp eq ptr %.052, null
  br i1 %.not54, label %._crit_edge84, label %5, !llvm.loop !17

17:                                               ; preds = %.lr.ph77, %._crit_edge
  %indvars.iv99 = phi i64 [ 0, %.lr.ph77 ], [ %indvars.iv.next100, %._crit_edge ]
  %.175 = phi i32 [ %8, %.lr.ph77 ], [ %.2.lcssa, %._crit_edge ]
  %18 = getelementptr inbounds [64 x ptr], ptr %1, i64 0, i64 %indvars.iv99
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 28800
  %21 = load i32, ptr %20, align 8, !tbaa !18
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph73, label %._crit_edge

.lr.ph73:                                         ; preds = %17
  %23 = getelementptr inbounds i8, ptr %19, i64 27776
  br label %26

._crit_edge:                                      ; preds = %.loopexit, %17
  %.2.lcssa = phi i32 [ %.175, %17 ], [ %.7, %.loopexit ]
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1
  %24 = sext i32 %.2.lcssa to i64
  %25 = icmp slt i64 %indvars.iv.next100, %24
  br i1 %25, label %17, label %._crit_edge78, !llvm.loop !22

26:                                               ; preds = %.lr.ph73, %.loopexit
  %indvars.iv96 = phi i64 [ 0, %.lr.ph73 ], [ %indvars.iv.next97, %.loopexit ]
  %.271 = phi i32 [ %.175, %.lr.ph73 ], [ %.7, %.loopexit ]
  %27 = getelementptr inbounds [64 x ptr], ptr %23, i64 0, i64 %indvars.iv96
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %28, i64 31400
  %30 = load ptr, ptr %29, align 8, !tbaa !23
  %31 = tail call zeroext i1 @var_check_in_scope(ptr noundef %6, ptr noundef %30)
  br i1 %31, label %32, label %.loopexit

32:                                               ; preds = %26
  %33 = getelementptr inbounds i8, ptr %28, i64 31408
  %.04465 = load ptr, ptr %33, align 8, !tbaa !5
  %.not56.not66 = icmp eq ptr %.04465, null
  br i1 %.not56.not66, label %.critedge, label %.lr.ph68

34:                                               ; preds = %.lr.ph68
  %35 = getelementptr inbounds i8, ptr %.04467, i64 16
  %.044 = load ptr, ptr %35, align 8, !tbaa !5
  %.not56.not = icmp eq ptr %.044, null
  br i1 %.not56.not, label %.critedge, label %.lr.ph68, !llvm.loop !24

.lr.ph68:                                         ; preds = %32, %34
  %.04467 = phi ptr [ %.044, %34 ], [ %.04465, %32 ]
  %36 = load ptr, ptr %.04467, align 8, !tbaa !11
  %37 = icmp eq ptr %36, %6
  br i1 %37, label %.loopexit, label %34

.critedge:                                        ; preds = %34, %32
  %38 = load ptr, ptr %3, align 8, !tbaa !25
  %39 = icmp eq ptr %28, %38
  br i1 %39, label %.loopexit, label %40

40:                                               ; preds = %.critedge
  %41 = load i8, ptr %10, align 1, !tbaa !30, !range !31, !noundef !32
  %42 = trunc nuw i8 %41 to i1
  br i1 %42, label %.loopexit, label %43

43:                                               ; preds = %40
  %44 = tail call zeroext i1 @insert_phi_insn(ptr noundef %28, ptr noundef nonnull %6)
  br i1 %44, label %45, label %.loopexit

45:                                               ; preds = %43
  %46 = load i8, ptr %11, align 4, !tbaa !33, !range !31, !noundef !32
  %47 = trunc nuw i8 %46 to i1
  br i1 %47, label %.loopexit, label %48

48:                                               ; preds = %45
  %49 = load i8, ptr %12, align 1, !tbaa !34, !range !31, !noundef !32
  %50 = trunc nuw i8 %49 to i1
  br i1 %50, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %48
  %51 = icmp sgt i32 %.271, 0
  br i1 %51, label %.lr.ph70.preheader, label %.critedge58

.lr.ph70.preheader:                               ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %.271 to i64
  br label %.lr.ph70

52:                                               ; preds = %.lr.ph70
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next94, %wide.trip.count
  br i1 %exitcond.not, label %.critedge58, label %.lr.ph70, !llvm.loop !35

.lr.ph70:                                         ; preds = %.lr.ph70.preheader, %52
  %indvars.iv93 = phi i64 [ 0, %.lr.ph70.preheader ], [ %indvars.iv.next94, %52 ]
  %53 = getelementptr inbounds [64 x ptr], ptr %1, i64 0, i64 %indvars.iv93
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  %55 = icmp eq ptr %54, %28
  br i1 %55, label %.loopexit, label %52

.critedge58:                                      ; preds = %52, %.preheader
  %56 = add nsw i32 %.271, 1
  %57 = sext i32 %.271 to i64
  %58 = getelementptr inbounds [64 x ptr], ptr %1, i64 0, i64 %57
  store ptr %28, ptr %58, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph68, %.lr.ph70, %48, %45, %.critedge58, %.critedge, %40, %43, %26
  %.7 = phi i32 [ %.271, %26 ], [ %.271, %.critedge ], [ %.271, %40 ], [ %.271, %43 ], [ %.271, %48 ], [ %.271, %45 ], [ %56, %.critedge58 ], [ %.271, %.lr.ph70 ], [ %.271, %.lr.ph68 ]
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %59 = load i32, ptr %20, align 8, !tbaa !18
  %60 = sext i32 %59 to i64
  %61 = icmp slt i64 %indvars.iv.next97, %60
  br i1 %61, label %26, label %._crit_edge, !llvm.loop !36
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 0}
!12 = !{!"symbol", !6, i64 0, !13, i64 8, !6, i64 16}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"ref_block", !6, i64 0, !6, i64 8}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = !{!19, !13, i64 28800}
!19 = !{!"basic_block", !20, i64 0, !20, i64 16, !7, i64 32, !6, i64 2080, !6, i64 2088, !6, i64 2096, !6, i64 2104, !6, i64 2112, !6, i64 2120, !6, i64 2128, !7, i64 2136, !13, i64 8536, !7, i64 8544, !13, i64 14944, !7, i64 14952, !13, i64 21352, !7, i64 21360, !13, i64 27760, !13, i64 27764, !13, i64 27768, !7, i64 27776, !7, i64 28288, !13, i64 28800, !13, i64 28804, !13, i64 28808, !21, i64 28812, !7, i64 28816, !6, i64 29328, !7, i64 29336, !6, i64 31384, !6, i64 31392, !6, i64 31400, !20, i64 31408, !13, i64 31424}
!20 = !{!"", !6, i64 0, !6, i64 8}
!21 = !{!"_Bool", !7, i64 0}
!22 = distinct !{!22, !10}
!23 = !{!19, !6, i64 31400}
!24 = distinct !{!24, !10}
!25 = !{!26, !6, i64 8520}
!26 = !{!"func", !27, i64 0, !7, i64 944, !13, i64 8496, !13, i64 8500, !13, i64 8504, !6, i64 8512, !6, i64 8520, !20, i64 8528, !13, i64 8544, !13, i64 8548, !6, i64 8552}
!27 = !{!"var", !7, i64 0, !7, i64 32, !13, i64 64, !21, i64 68, !21, i64 69, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !13, i64 88, !6, i64 96, !13, i64 104, !7, i64 112, !13, i64 624, !28, i64 628, !29, i64 896, !6, i64 912, !6, i64 920, !6, i64 928, !13, i64 936, !21, i64 940, !21, i64 941, !21, i64 942}
!28 = !{!"", !13, i64 0, !7, i64 4, !13, i64 260}
!29 = !{!"ref_block_list", !6, i64 0, !6, i64 8}
!30 = !{!27, !21, i64 69}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!27, !21, i64 940}
!34 = !{!27, !21, i64 941}
!35 = distinct !{!35, !10}
!36 = distinct !{!36, !10}


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