; LLVM IR from snowballstem/snowball :: compiler (driver)

; 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.tokeniser = type { ptr, ptr, i32, ptr, i32, i32, ptr, ptr, i32, i32, i32, ptr, i32, i32, i32, i32, i8, i8, i32, i32, ptr, i32, [94 x i8] }
%struct.options = type { ptr, ptr, ptr, ptr, i8, i8, i8, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.analyser = type { ptr, ptr, ptr, ptr, i8, i8, ptr, ptr, [6 x i32], ptr, ptr, i32, i32, i32, ptr, ptr, ptr, i32, i8 }
%struct.input = type { ptr, ptr, i32, ptr, i32, i32 }
%struct.include = type { ptr, ptr }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@space_count = external global i32, align 4
@.str.12 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %27 = call ptr @check_malloc(i64 noundef 128)
  store ptr %27, ptr %7, align 8, !tbaa !9
  %28 = load ptr, ptr %7, align 8, !tbaa !9
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = load ptr, ptr %5, align 8, !tbaa !9
  %31 = call i32 @read_options(ptr noundef %28, i32 noundef %29, ptr noundef %30)
  store i32 %31, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %32 = load ptr, ptr %5, align 8, !tbaa !9
  %33 = getelementptr inbounds ptr, ptr %32, i64 1
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  store ptr %34, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %35 = load ptr, ptr %8, align 8, !tbaa !9
  %36 = call ptr @get_input(ptr noundef %35)
  store ptr %36, ptr %9, align 8, !tbaa !9
  %37 = load ptr, ptr %9, align 8, !tbaa !9
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %43

39:                                               ; preds = %2
  %40 = load ptr, ptr @stderr, align 8, !tbaa !9
  %41 = load ptr, ptr %8, align 8, !tbaa !9
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef @.str, ptr noundef %41) #5
  call void @exit(i32 noundef 1) #6
  unreachable

43:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %44 = load ptr, ptr %9, align 8, !tbaa !9
  %45 = load ptr, ptr %8, align 8, !tbaa !9
  %46 = call ptr @create_tokeniser(ptr noundef %44, ptr noundef %45)
  store ptr %46, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %47 = load ptr, ptr %10, align 8, !tbaa !9
  %48 = call ptr @create_analyser(ptr noundef %47)
  store ptr %48, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %49 = load ptr, ptr %10, align 8, !tbaa !9
  %50 = getelementptr inbounds %struct.tokeniser, ptr %49, i32 0, i32 0
  store ptr %50, ptr %12, align 8, !tbaa !9
  %51 = load ptr, ptr %7, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.options, ptr %51, i32 0, i32 7
  %53 = load i32, ptr %52, align 4, !tbaa !11
  %54 = load ptr, ptr %10, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.tokeniser, ptr %54, i32 0, i32 18
  store i32 %53, ptr %55, align 4, !tbaa !13
  %56 = load ptr, ptr %11, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct.analyser, ptr %56, i32 0, i32 17
  store i32 %53, ptr %57, align 8, !tbaa !15
  %58 = load ptr, ptr %7, align 8, !tbaa !9
  %59 = getelementptr inbounds %struct.options, ptr %58, i32 0, i32 17
  %60 = load ptr, ptr %59, align 8, !tbaa !17
  %61 = load ptr, ptr %10, align 8, !tbaa !9
  %62 = getelementptr inbounds %struct.tokeniser, ptr %61, i32 0, i32 20
  store ptr %60, ptr %62, align 8, !tbaa !18
  store i32 2, ptr %6, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %99, %43
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = icmp ne i32 %64, %65
  br i1 %66, label %67, label %102

67:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %68 = call ptr @check_malloc(i64 noundef 40)
  store ptr %68, ptr %13, align 8, !tbaa !9
  %69 = load ptr, ptr %5, align 8, !tbaa !9
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds ptr, ptr %69, i64 %71
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  store ptr %73, ptr %8, align 8, !tbaa !9
  %74 = load ptr, ptr %8, align 8, !tbaa !9
  %75 = call ptr @get_input(ptr noundef %74)
  store ptr %75, ptr %9, align 8, !tbaa !9
  %76 = load ptr, ptr %9, align 8, !tbaa !9
  %77 = icmp eq ptr %76, null
  br i1 %77, label %78, label %82

78:                                               ; preds = %67
  %79 = load ptr, ptr @stderr, align 8, !tbaa !9
  %80 = load ptr, ptr %8, align 8, !tbaa !9
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef @.str, ptr noundef %80) #5
  call void @exit(i32 noundef 1) #6
  unreachable

82:                                               ; preds = %67
  %83 = load ptr, ptr %9, align 8, !tbaa !9
  %84 = load ptr, ptr %13, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct.input, ptr %84, i32 0, i32 1
  store ptr %83, ptr %85, align 8, !tbaa !19
  %86 = load ptr, ptr %13, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct.input, ptr %86, i32 0, i32 2
  store i32 0, ptr %87, align 8, !tbaa !21
  %88 = load ptr, ptr %8, align 8, !tbaa !9
  %89 = load ptr, ptr %13, align 8, !tbaa !9
  %90 = getelementptr inbounds %struct.input, ptr %89, i32 0, i32 3
  store ptr %88, ptr %90, align 8, !tbaa !22
  %91 = load ptr, ptr %13, align 8, !tbaa !9
  %92 = getelementptr inbounds %struct.input, ptr %91, i32 0, i32 4
  store i32 0, ptr %92, align 8, !tbaa !23
  %93 = load ptr, ptr %13, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.input, ptr %93, i32 0, i32 5
  store i32 1, ptr %94, align 4, !tbaa !24
  %95 = load ptr, ptr %13, align 8, !tbaa !9
  %96 = load ptr, ptr %12, align 8, !tbaa !9
  store ptr %95, ptr %96, align 8, !tbaa !9
  %97 = load ptr, ptr %13, align 8, !tbaa !9
  %98 = getelementptr inbounds %struct.input, ptr %97, i32 0, i32 0
  store ptr %98, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %99

99:                                               ; preds = %82
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %6, align 4, !tbaa !5
  br label %63, !llvm.loop !25

102:                                              ; preds = %63
  %103 = load ptr, ptr %12, align 8, !tbaa !9
  store ptr null, ptr %103, align 8, !tbaa !9
  %104 = load ptr, ptr %11, align 8, !tbaa !9
  call void @read_program(ptr noundef %104)
  %105 = load ptr, ptr %10, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct.tokeniser, ptr %105, i32 0, i32 13
  %107 = load i32, ptr %106, align 4, !tbaa !27
  %108 = icmp sgt i32 %107, 0
  br i1 %108, label %109, label %110

109:                                              ; preds = %102
  call void @exit(i32 noundef 1) #6
  unreachable

110:                                              ; preds = %102
  %111 = load ptr, ptr %7, align 8, !tbaa !9
  %112 = getelementptr inbounds %struct.options, ptr %111, i32 0, i32 4
  %113 = load i8, ptr %112, align 8, !tbaa !28
  %114 = icmp ne i8 %113, 0
  br i1 %114, label %115, label %117

115:                                              ; preds = %110
  %116 = load ptr, ptr %11, align 8, !tbaa !9
  call void @print_program(ptr noundef %116)
  br label %117

117:                                              ; preds = %115, %110
  %118 = load ptr, ptr %7, align 8, !tbaa !9
  %119 = getelementptr inbounds %struct.options, ptr %118, i32 0, i32 4
  %120 = load i8, ptr %119, align 8, !tbaa !28
  %121 = icmp ne i8 %120, 0
  br i1 %121, label %368, label %122

122:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %123 = load ptr, ptr %7, align 8, !tbaa !9
  %124 = getelementptr inbounds %struct.options, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !29
  store ptr %125, ptr %15, align 8, !tbaa !9
  %126 = load ptr, ptr %15, align 8, !tbaa !9
  %127 = icmp ne ptr %126, null
  br i1 %127, label %131, label %128

128:                                              ; preds = %122
  %129 = load ptr, ptr @stderr, align 8, !tbaa !9
  %130 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %129, ptr noundef @.str.1) #5
  call void @print_arglist(i32 noundef 1)
  br label %131

131:                                              ; preds = %128, %122
  %132 = load ptr, ptr %11, align 8, !tbaa !9
  %133 = load ptr, ptr %7, align 8, !tbaa !9
  %134 = call ptr @create_generator(ptr noundef %132, ptr noundef %133)
  store ptr %134, ptr %14, align 8, !tbaa !9
  %135 = load ptr, ptr %7, align 8, !tbaa !9
  %136 = getelementptr inbounds %struct.options, ptr %135, i32 0, i32 8
  %137 = load i32, ptr %136, align 8, !tbaa !30
  %138 = icmp eq i32 %137, 1
  br i1 %138, label %144, label %139

139:                                              ; preds = %131
  %140 = load ptr, ptr %7, align 8, !tbaa !9
  %141 = getelementptr inbounds %struct.options, ptr %140, i32 0, i32 8
  %142 = load i32, ptr %141, align 8, !tbaa !30
  %143 = icmp eq i32 %142, 2
  br i1 %143, label %144, label %182

144:                                              ; preds = %139, %131
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %145 = load ptr, ptr %15, align 8, !tbaa !9
  %146 = call ptr @add_sz_to_s(ptr noundef null, ptr noundef %145)
  store ptr %146, ptr %16, align 8, !tbaa !9
  %147 = load ptr, ptr %16, align 8, !tbaa !9
  %148 = call ptr @add_s_to_s(ptr noundef %147, ptr noundef @.str.2, i32 noundef 2)
  store ptr %148, ptr %16, align 8, !tbaa !9
  %149 = load ptr, ptr %16, align 8, !tbaa !9
  %150 = call ptr @get_output(ptr noundef %149)
  %151 = load ptr, ptr %7, align 8, !tbaa !9
  %152 = getelementptr inbounds %struct.options, ptr %151, i32 0, i32 3
  store ptr %150, ptr %152, align 8, !tbaa !31
  %153 = load ptr, ptr %16, align 8, !tbaa !9
  %154 = load ptr, ptr %16, align 8, !tbaa !9
  %155 = getelementptr inbounds i32, ptr %154, i64 -1
  %156 = load i32, ptr %155, align 4, !tbaa !5
  %157 = sub nsw i32 %156, 1
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i8, ptr %153, i64 %158
  store i8 99, ptr %159, align 1, !tbaa !32
  %160 = load ptr, ptr %7, align 8, !tbaa !9
  %161 = getelementptr inbounds %struct.options, ptr %160, i32 0, i32 8
  %162 = load i32, ptr %161, align 8, !tbaa !30
  %163 = icmp eq i32 %162, 2
  br i1 %163, label %164, label %167

164:                                              ; preds = %144
  %165 = load ptr, ptr %16, align 8, !tbaa !9
  %166 = call ptr @add_char_to_s(ptr noundef %165, i8 noundef signext 99)
  store ptr %166, ptr %16, align 8, !tbaa !9
  br label %167

167:                                              ; preds = %164, %144
  %168 = load ptr, ptr %16, align 8, !tbaa !9
  %169 = call ptr @get_output(ptr noundef %168)
  %170 = load ptr, ptr %7, align 8, !tbaa !9
  %171 = getelementptr inbounds %struct.options, ptr %170, i32 0, i32 2
  store ptr %169, ptr %171, align 8, !tbaa !33
  %172 = load ptr, ptr %16, align 8, !tbaa !9
  call void @lose_s(ptr noundef %172)
  %173 = load ptr, ptr %14, align 8, !tbaa !9
  call void @generate_program_c(ptr noundef %173)
  %174 = load ptr, ptr %7, align 8, !tbaa !9
  %175 = getelementptr inbounds %struct.options, ptr %174, i32 0, i32 2
  %176 = load ptr, ptr %175, align 8, !tbaa !33
  %177 = call i32 @fclose(ptr noundef %176)
  %178 = load ptr, ptr %7, align 8, !tbaa !9
  %179 = getelementptr inbounds %struct.options, ptr %178, i32 0, i32 3
  %180 = load ptr, ptr %179, align 8, !tbaa !31
  %181 = call i32 @fclose(ptr noundef %180)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %182

182:                                              ; preds = %167, %139
  %183 = load ptr, ptr %7, align 8, !tbaa !9
  %184 = getelementptr inbounds %struct.options, ptr %183, i32 0, i32 8
  %185 = load i32, ptr %184, align 8, !tbaa !30
  %186 = icmp eq i32 %185, 0
  br i1 %186, label %187, label %202

187:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %188 = load ptr, ptr %15, align 8, !tbaa !9
  %189 = call ptr @add_sz_to_s(ptr noundef null, ptr noundef %188)
  store ptr %189, ptr %17, align 8, !tbaa !9
  %190 = load ptr, ptr %17, align 8, !tbaa !9
  %191 = call ptr @add_s_to_s(ptr noundef %190, ptr noundef @.str.3, i32 noundef 5)
  store ptr %191, ptr %17, align 8, !tbaa !9
  %192 = load ptr, ptr %17, align 8, !tbaa !9
  %193 = call ptr @get_output(ptr noundef %192)
  %194 = load ptr, ptr %7, align 8, !tbaa !9
  %195 = getelementptr inbounds %struct.options, ptr %194, i32 0, i32 2
  store ptr %193, ptr %195, align 8, !tbaa !33
  %196 = load ptr, ptr %17, align 8, !tbaa !9
  call void @lose_s(ptr noundef %196)
  %197 = load ptr, ptr %14, align 8, !tbaa !9
  call void @generate_program_java(ptr noundef %197)
  %198 = load ptr, ptr %7, align 8, !tbaa !9
  %199 = getelementptr inbounds %struct.options, ptr %198, i32 0, i32 2
  %200 = load ptr, ptr %199, align 8, !tbaa !33
  %201 = call i32 @fclose(ptr noundef %200)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %202

202:                                              ; preds = %187, %182
  %203 = load ptr, ptr %7, align 8, !tbaa !9
  %204 = getelementptr inbounds %struct.options, ptr %203, i32 0, i32 8
  %205 = load i32, ptr %204, align 8, !tbaa !30
  %206 = icmp eq i32 %205, 4
  br i1 %206, label %207, label %222

207:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %208 = load ptr, ptr %15, align 8, !tbaa !9
  %209 = call ptr @add_sz_to_s(ptr noundef null, ptr noundef %208)
  store ptr %209, ptr %18, align 8, !tbaa !9
  %210 = load ptr, ptr %18, align 8, !tbaa !9
  %211 = call ptr @add_s_to_s(ptr noundef %210, ptr noundef @.str.4, i32 noundef 4)
  store ptr %211, ptr %18, align 8, !tbaa !9
  %212 = load ptr, ptr %18, align 8, !tbaa !9
  %213 = call ptr @get_output(ptr noundef %212)
  %214 = load ptr, ptr %7, align 8, !tbaa !9
  %215 = getelementptr inbounds %struct.options, ptr %214, i32 0, i32 2
  store ptr %213, ptr %215, align 8, !tbaa !33
  %216 = load ptr, ptr %18, align 8, !tbaa !9
  call void @lose_s(ptr noundef %216)
  %217 = load ptr, ptr %14, align 8, !tbaa !9
  call void @generate_program_pascal(ptr noundef %217)
  %218 = load ptr, ptr %7, align 8, !tbaa !9
  %219 = getelementptr inbounds %struct.options, ptr %218, i32 0, i32 2
  %220 = load ptr, ptr %219, align 8, !tbaa !33
  %221 = call i32 @fclose(ptr noundef %220)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %222

222:                                              ; preds = %207, %202
  %223 = load ptr, ptr %7, align 8, !tbaa !9
  %224 = getelementptr inbounds %struct.options, ptr %223, i32 0, i32 8
  %225 = load i32, ptr %224, align 8, !tbaa !30
  %226 = icmp eq i32 %225, 5
  br i1 %226, label %227, label %242

227:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %228 = load ptr, ptr %15, align 8, !tbaa !9
  %229 = call ptr @add_sz_to_s(ptr noundef null, ptr noundef %228)
  store ptr %229, ptr %19, align 8, !tbaa !9
  %230 = load ptr, ptr %19, align 8, !tbaa !9
  %231 = call ptr @add_s_to_s(ptr noundef %230, ptr noundef @.str.5, i32 noundef 3)
  store ptr %231, ptr %19, align 8, !tbaa !9
  %232 = load ptr, ptr %19, align 8, !tbaa !9
  %233 = call ptr @get_output(ptr noundef %232)
  %234 = load ptr, ptr %7, align 8, !tbaa !9
  %235 = getelementptr inbounds %struct.options, ptr %234, i32 0, i32 2
  store ptr %233, ptr %235, align 8, !tbaa !33
  %236 = load ptr, ptr %19, align 8, !tbaa !9
  call void @lose_s(ptr noundef %236)
  %237 = load ptr, ptr %14, align 8, !tbaa !9
  call void @generate_program_python(ptr noundef %237)
  %238 = load ptr, ptr %7, align 8, !tbaa !9
  %239 = getelementptr inbounds %struct.options, ptr %238, i32 0, i32 2
  %240 = load ptr, ptr %239, align 8, !tbaa !33
  %241 = call i32 @fclose(ptr noundef %240)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %242

242:                                              ; preds = %227, %222
  %243 = load ptr, ptr %7, align 8, !tbaa !9
  %244 = getelementptr inbounds %struct.options, ptr %243, i32 0, i32 8
  %245 = load i32, ptr %244, align 8, !tbaa !30
  %246 = icmp eq i32 %245, 6
  br i1 %246, label %247, label %271

247:                                              ; preds = %242
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %248 = load ptr, ptr %15, align 8, !tbaa !9
  %249 = call ptr @add_sz_to_s(ptr noundef null, ptr noundef %248)
  store ptr %249, ptr %20, align 8, !tbaa !9
  %250 = load ptr, ptr %7, align 8, !tbaa !9
  %251 = getelementptr inbounds %struct.options, ptr %250, i32 0, i32 6
  %252 = load i8, ptr %251, align 2, !tbaa !34
  %253 = icmp ne i8 %252, 0
  br i1 %253, label %254, label %257

254:                                              ; preds = %247
  %255 = load ptr, ptr %20, align 8, !tbaa !9
  %256 = call ptr @add_s_to_s(ptr noundef %255, ptr noundef @.str.6, i32 noundef 4)
  store ptr %256, ptr %20, align 8, !tbaa !9
  br label %260

257:                                              ; preds = %247
  %258 = load ptr, ptr %20, align 8, !tbaa !9
  %259 = call ptr @add_s_to_s(ptr noundef %258, ptr noundef @.str.7, i32 noundef 3)
  store ptr %259, ptr %20, align 8, !tbaa !9
  br label %260

260:                                              ; preds = %257, %254
  %261 = load ptr, ptr %20, align 8, !tbaa !9
  %262 = call ptr @get_output(ptr noundef %261)
  %263 = load ptr, ptr %7, align 8, !tbaa !9
  %264 = getelementptr inbounds %struct.options, ptr %263, i32 0, i32 2
  store ptr %262, ptr %264, align 8, !tbaa !33
  %265 = load ptr, ptr %20, align 8, !tbaa !9
  call void @lose_s(ptr noundef %265)
  %266 = load ptr, ptr %14, align 8, !tbaa !9
  call void @generate_program_js(ptr noundef %266)
  %267 = load ptr, ptr %7, align 8, !tbaa !9
  %268 = getelementptr inbounds %struct.options, ptr %267, i32 0, i32 2
  %269 = load ptr, ptr %268, align 8, !tbaa !33
  %270 = call i32 @fclose(ptr noundef %269)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %271

271:                                              ; preds = %260, %242
  %272 = load ptr, ptr %7, align 8, !tbaa !9
  %273 = getelementptr inbounds %struct.options, ptr %272, i32 0, i32 8
  %274 = load i32, ptr %273, align 8, !tbaa !30
  %275 = icmp eq i32 %274, 3
  br i1 %275, label %276, label %291

276:                                              ; preds = %271
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %277 = load ptr, ptr %15, align 8, !tbaa !9
  %278 = call ptr @add_sz_to_s(ptr noundef null, ptr noundef %277)
  store ptr %278, ptr %21, align 8, !tbaa !9
  %279 = load ptr, ptr %21, align 8, !tbaa !9
  %280 = call ptr @add_s_to_s(ptr noundef %279, ptr noundef @.str.8, i32 noundef 3)
  store ptr %280, ptr %21, align 8, !tbaa !9
  %281 = load ptr, ptr %21, align 8, !tbaa !9
  %282 = call ptr @get_output(ptr noundef %281)
  %283 = load ptr, ptr %7, align 8, !tbaa !9
  %284 = getelementptr inbounds %struct.options, ptr %283, i32 0, i32 2
  store ptr %282, ptr %284, align 8, !tbaa !33
  %285 = load ptr, ptr %21, align 8, !tbaa !9
  call void @lose_s(ptr noundef %285)
  %286 = load ptr, ptr %14, align 8, !tbaa !9
  call void @generate_program_csharp(ptr noundef %286)
  %287 = load ptr, ptr %7, align 8, !tbaa !9
  %288 = getelementptr inbounds %struct.options, ptr %287, i32 0, i32 2
  %289 = load ptr, ptr %288, align 8, !tbaa !33
  %290 = call i32 @fclose(ptr noundef %289)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %291

291:                                              ; preds = %276, %271
  %292 = load ptr, ptr %7, align 8, !tbaa !9
  %293 = getelementptr inbounds %struct.options, ptr %292, i32 0, i32 8
  %294 = load i32, ptr %293, align 8, !tbaa !30
  %295 = icmp eq i32 %294, 7
  br i1 %295, label %296, label %311

296:                                              ; preds = %291
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %297 = load ptr, ptr %15, align 8, !tbaa !9
  %298 = call ptr @add_sz_to_s(ptr noundef null, ptr noundef %297)
  store ptr %298, ptr %22, align 8, !tbaa !9
  %299 = load ptr, ptr %22, align 8, !tbaa !9
  %300 = call ptr @add_s_to_s(ptr noundef %299, ptr noundef @.str.9, i32 noundef 3)
  store ptr %300, ptr %22, align 8, !tbaa !9
  %301 = load ptr, ptr %22, align 8, !tbaa !9
  %302 = call ptr @get_output(ptr noundef %301)
  %303 = load ptr, ptr %7, align 8, !tbaa !9
  %304 = getelementptr inbounds %struct.options, ptr %303, i32 0, i32 2
  store ptr %302, ptr %304, align 8, !tbaa !33
  %305 = load ptr, ptr %22, align 8, !tbaa !9
  call void @lose_s(ptr noundef %305)
  %306 = load ptr, ptr %14, align 8, !tbaa !9
  call void @generate_program_rust(ptr noundef %306)
  %307 = load ptr, ptr %7, align 8, !tbaa !9
  %308 = getelementptr inbounds %struct.options, ptr %307, i32 0, i32 2
  %309 = load ptr, ptr %308, align 8, !tbaa !33
  %310 = call i32 @fclose(ptr noundef %309)
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %311

311:                                              ; preds = %296, %291
  %312 = load ptr, ptr %7, align 8, !tbaa !9
  %313 = getelementptr inbounds %struct.options, ptr %312, i32 0, i32 8
  %314 = load i32, ptr %313, align 8, !tbaa !30
  %315 = icmp eq i32 %314, 8
  br i1 %315, label %316, label %331

316:                                              ; preds = %311
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %317 = load ptr, ptr %15, align 8, !tbaa !9
  %318 = call ptr @add_sz_to_s(ptr noundef null, ptr noundef %317)
  store ptr %318, ptr %23, align 8, !tbaa !9
  %319 = load ptr, ptr %23, align 8, !tbaa !9
  %320 = call ptr @add_s_to_s(ptr noundef %319, ptr noundef @.str.10, i32 noundef 3)
  store ptr %320, ptr %23, align 8, !tbaa !9
  %321 = load ptr, ptr %23, align 8, !tbaa !9
  %322 = call ptr @get_output(ptr noundef %321)
  %323 = load ptr, ptr %7, align 8, !tbaa !9
  %324 = getelementptr inbounds %struct.options, ptr %323, i32 0, i32 2
  store ptr %322, ptr %324, align 8, !tbaa !33
  %325 = load ptr, ptr %23, align 8, !tbaa !9
  call void @lose_s(ptr noundef %325)
  %326 = load ptr, ptr %14, align 8, !tbaa !9
  call void @generate_program_go(ptr noundef %326)
  %327 = load ptr, ptr %7, align 8, !tbaa !9
  %328 = getelementptr inbounds %struct.options, ptr %327, i32 0, i32 2
  %329 = load ptr, ptr %328, align 8, !tbaa !33
  %330 = call i32 @fclose(ptr noundef %329)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %331

331:                                              ; preds = %316, %311
  %332 = load ptr, ptr %7, align 8, !tbaa !9
  %333 = getelementptr inbounds %struct.options, ptr %332, i32 0, i32 8
  %334 = load i32, ptr %333, align 8, !tbaa !30
  %335 = icmp eq i32 %334, 9
  br i1 %335, label %336, label %366

336:                                              ; preds = %331
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %337 = load ptr, ptr %15, align 8, !tbaa !9
  %338 = call ptr @add_sz_to_s(ptr noundef null, ptr noundef %337)
  store ptr %338, ptr %24, align 8, !tbaa !9
  %339 = load ptr, ptr %24, align 8, !tbaa !9
  %340 = call ptr @add_s_to_s(ptr noundef %339, ptr noundef @.str.11, i32 noundef 4)
  store ptr %340, ptr %24, align 8, !tbaa !9
  %341 = load ptr, ptr %24, align 8, !tbaa !9
  %342 = call ptr @get_output(ptr noundef %341)
  %343 = load ptr, ptr %7, align 8, !tbaa !9
  %344 = getelementptr inbounds %struct.options, ptr %343, i32 0, i32 3
  store ptr %342, ptr %344, align 8, !tbaa !31
  %345 = load ptr, ptr %24, align 8, !tbaa !9
  %346 = load ptr, ptr %24, align 8, !tbaa !9
  %347 = getelementptr inbounds i32, ptr %346, i64 -1
  %348 = load i32, ptr %347, align 4, !tbaa !5
  %349 = sub nsw i32 %348, 1
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds i8, ptr %345, i64 %350
  store i8 98, ptr %351, align 1, !tbaa !32
  %352 = load ptr, ptr %24, align 8, !tbaa !9
  %353 = call ptr @get_output(ptr noundef %352)
  %354 = load ptr, ptr %7, align 8, !tbaa !9
  %355 = getelementptr inbounds %struct.options, ptr %354, i32 0, i32 2
  store ptr %353, ptr %355, align 8, !tbaa !33
  %356 = load ptr, ptr %24, align 8, !tbaa !9
  call void @lose_s(ptr noundef %356)
  %357 = load ptr, ptr %14, align 8, !tbaa !9
  call void @generate_program_ada(ptr noundef %357)
  %358 = load ptr, ptr %7, align 8, !tbaa !9
  %359 = getelementptr inbounds %struct.options, ptr %358, i32 0, i32 2
  %360 = load ptr, ptr %359, align 8, !tbaa !33
  %361 = call i32 @fclose(ptr noundef %360)
  %362 = load ptr, ptr %7, align 8, !tbaa !9
  %363 = getelementptr inbounds %struct.options, ptr %362, i32 0, i32 3
  %364 = load ptr, ptr %363, align 8, !tbaa !31
  %365 = call i32 @fclose(ptr noundef %364)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %366

366:                                              ; preds = %336, %331
  %367 = load ptr, ptr %14, align 8, !tbaa !9
  call void @close_generator(ptr noundef %367)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %368

368:                                              ; preds = %366, %117
  %369 = load ptr, ptr %10, align 8, !tbaa !9
  call void @close_tokeniser(ptr noundef %369)
  %370 = load ptr, ptr %11, align 8, !tbaa !9
  call void @close_analyser(ptr noundef %370)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %371 = load ptr, ptr %9, align 8, !tbaa !9
  call void @lose_s(ptr noundef %371)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %372 = load ptr, ptr %7, align 8, !tbaa !9
  %373 = getelementptr inbounds %struct.options, ptr %372, i32 0, i32 17
  %374 = load ptr, ptr %373, align 8, !tbaa !17
  store ptr %374, ptr %25, align 8, !tbaa !9
  br label %375

375:                                              ; preds = %378, %368
  %376 = load ptr, ptr %25, align 8, !tbaa !9
  %377 = icmp ne ptr %376, null
  br i1 %377, label %378, label %387

378:                                              ; preds = %375
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %379 = load ptr, ptr %25, align 8, !tbaa !9
  %380 = getelementptr inbounds %struct.include, ptr %379, i32 0, i32 0
  %381 = load ptr, ptr %380, align 8, !tbaa !35
  store ptr %381, ptr %26, align 8, !tbaa !9
  %382 = load ptr, ptr %25, align 8, !tbaa !9
  %383 = getelementptr inbounds %struct.include, ptr %382, i32 0, i32 1
  %384 = load ptr, ptr %383, align 8, !tbaa !37
  call void @lose_s(ptr noundef %384)
  %385 = load ptr, ptr %25, align 8, !tbaa !9
  call void @check_free(ptr noundef %385)
  %386 = load ptr, ptr %26, align 8, !tbaa !9
  store ptr %386, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %375, !llvm.loop !38

387:                                              ; preds = %375
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  %388 = load ptr, ptr %7, align 8, !tbaa !9
  %389 = getelementptr inbounds %struct.options, ptr %388, i32 0, i32 1
  %390 = load ptr, ptr %389, align 8, !tbaa !39
  call void @check_free(ptr noundef %390)
  %391 = load ptr, ptr %7, align 8, !tbaa !9
  call void @check_free(ptr noundef %391)
  %392 = load i32, ptr @space_count, align 4, !tbaa !5
  %393 = icmp ne i32 %392, 0
  br i1 %393, label %394, label %398

394:                                              ; preds = %387
  %395 = load ptr, ptr @stderr, align 8, !tbaa !9
  %396 = load i32, ptr @space_count, align 4, !tbaa !5
  %397 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %395, ptr noundef @.str.12, i32 noundef %396) #5
  br label %398

398:                                              ; preds = %394, %387
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  ret i32 0
}

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

declare ptr @check_malloc(i64 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @read_options(ptr noundef, i32 noundef, ptr noundef) #0

declare ptr @get_input(ptr noundef) #2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

declare ptr @create_tokeniser(ptr noundef, ptr noundef) #2

declare ptr @create_analyser(ptr noundef) #2

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

declare void @read_program(ptr noundef) #2

declare void @print_program(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @print_arglist(i32 noundef) #0

declare ptr @create_generator(ptr noundef, ptr noundef) #2

declare ptr @add_sz_to_s(ptr noundef, ptr noundef) #2

declare ptr @add_s_to_s(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden ptr @get_output(ptr noundef) #0

declare ptr @add_char_to_s(ptr noundef, i8 noundef signext) #2

declare void @lose_s(ptr noundef) #2

declare void @generate_program_c(ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

declare void @generate_program_java(ptr noundef) #2

declare void @generate_program_pascal(ptr noundef) #2

declare void @generate_program_python(ptr noundef) #2

declare void @generate_program_js(ptr noundef) #2

declare void @generate_program_csharp(ptr noundef) #2

declare void @generate_program_rust(ptr noundef) #2

declare void @generate_program_go(ptr noundef) #2

declare void @generate_program_ada(ptr noundef) #2

declare void @close_generator(ptr noundef) #2

declare void @close_tokeniser(ptr noundef) #2

declare void @close_analyser(ptr noundef) #2

declare void @check_free(ptr noundef) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 "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 = { noreturn 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 }
attributes #6 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 36}
!12 = !{!"options", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !7, i64 33, !7, i64 34, !6, i64 36, !6, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120}
!13 = !{!14, !6, i64 100}
!14 = !{!"tokeniser", !10, i64 0, !10, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !6, i64 36, !10, i64 40, !10, i64 48, !6, i64 56, !6, i64 60, !6, i64 64, !10, i64 72, !6, i64 80, !6, i64 84, !6, i64 88, !6, i64 92, !7, i64 96, !7, i64 97, !6, i64 100, !6, i64 104, !10, i64 112, !6, i64 120, !7, i64 124}
!15 = !{!16, !6, i64 136}
!16 = !{!"analyser", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !7, i64 33, !10, i64 40, !10, i64 48, !7, i64 56, !10, i64 80, !10, i64 88, !6, i64 96, !6, i64 100, !6, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !6, i64 136, !7, i64 140}
!17 = !{!12, !10, i64 112}
!18 = !{!14, !10, i64 112}
!19 = !{!20, !10, i64 8}
!20 = !{!"input", !10, i64 0, !10, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !6, i64 36}
!21 = !{!20, !6, i64 16}
!22 = !{!20, !10, i64 24}
!23 = !{!20, !6, i64 32}
!24 = !{!20, !6, i64 36}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!14, !6, i64 84}
!28 = !{!12, !7, i64 32}
!29 = !{!12, !10, i64 0}
!30 = !{!12, !6, i64 40}
!31 = !{!12, !10, i64 24}
!32 = !{!7, !7, i64 0}
!33 = !{!12, !10, i64 16}
!34 = !{!12, !7, i64 34}
!35 = !{!36, !10, i64 0}
!36 = !{!"include", !10, i64 0, !10, i64 8}
!37 = !{!36, !10, i64 8}
!38 = distinct !{!38, !26}
!39 = !{!12, !10, i64 8}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@space_count = external local_unnamed_addr global i32, align 4
@.str.12 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = tail call ptr @check_malloc(i64 noundef 128) #4
  %4 = tail call i32 @read_options(ptr noundef %3, i32 noundef %0, ptr noundef %1)
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = tail call ptr @get_input(ptr noundef %6) #4
  %8 = icmp eq ptr %7, null
  br i1 %8, label %9, label %12

9:                                                ; preds = %2
  %10 = load ptr, ptr @stderr, align 8, !tbaa !5
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str, ptr noundef %6) #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

12:                                               ; preds = %2
  %13 = tail call ptr @create_tokeniser(ptr noundef nonnull %7, ptr noundef %6) #4
  %14 = tail call ptr @create_analyser(ptr noundef %13) #4
  %15 = getelementptr inbounds i8, ptr %3, i64 36
  %16 = load i32, ptr %15, align 4, !tbaa !9
  %17 = getelementptr inbounds i8, ptr %13, i64 100
  store i32 %16, ptr %17, align 4, !tbaa !12
  %18 = getelementptr inbounds i8, ptr %14, i64 136
  store i32 %16, ptr %18, align 8, !tbaa !14
  %19 = getelementptr inbounds i8, ptr %3, i64 112
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %13, i64 112
  store ptr %20, ptr %21, align 8, !tbaa !17
  %.not164 = icmp eq i32 %4, 2
  br i1 %.not164, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %12
  %22 = zext i32 %4 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %31
  %indvars.iv = phi i64 [ 2, %.lr.ph.preheader ], [ %indvars.iv.next, %31 ]
  %.0144165 = phi ptr [ %13, %.lr.ph.preheader ], [ %23, %31 ]
  %23 = tail call ptr @check_malloc(i64 noundef 40) #4
  %24 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  %26 = tail call ptr @get_input(ptr noundef %25) #4
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %31

28:                                               ; preds = %.lr.ph
  %29 = load ptr, ptr @stderr, align 8, !tbaa !5
  %30 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str, ptr noundef %25) #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

31:                                               ; preds = %.lr.ph
  %32 = getelementptr inbounds i8, ptr %23, i64 8
  store ptr %26, ptr %32, align 8, !tbaa !18
  %33 = getelementptr inbounds i8, ptr %23, i64 16
  store i32 0, ptr %33, align 8, !tbaa !20
  %34 = getelementptr inbounds i8, ptr %23, i64 24
  store ptr %25, ptr %34, align 8, !tbaa !21
  %35 = getelementptr inbounds i8, ptr %23, i64 32
  store i32 0, ptr %35, align 8, !tbaa !22
  %36 = getelementptr inbounds i8, ptr %23, i64 36
  store i32 1, ptr %36, align 4, !tbaa !23
  store ptr %23, ptr %.0144165, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.not = icmp eq i64 %indvars.iv.next, %22
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !24

._crit_edge:                                      ; preds = %31, %12
  %.0144.lcssa = phi ptr [ %13, %12 ], [ %23, %31 ]
  %.0143.lcssa = phi ptr [ %7, %12 ], [ %26, %31 ]
  store ptr null, ptr %.0144.lcssa, align 8, !tbaa !5
  tail call void @read_program(ptr noundef %14) #4
  %37 = getelementptr inbounds i8, ptr %13, i64 84
  %38 = load i32, ptr %37, align 4, !tbaa !26
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %._crit_edge
  tail call void @exit(i32 noundef 1) #6
  unreachable

41:                                               ; preds = %._crit_edge
  %42 = getelementptr inbounds i8, ptr %3, i64 32
  %43 = load i8, ptr %42, align 8, !tbaa !27
  %.not151 = icmp eq i8 %43, 0
  br i1 %.not151, label %.thread, label %44

44:                                               ; preds = %41
  tail call void @print_program(ptr noundef %14) #4
  %.pr = load i8, ptr %42, align 8, !tbaa !27
  %.not152 = icmp eq i8 %.pr, 0
  br i1 %.not152, label %.thread, label %170

.thread:                                          ; preds = %41, %44
  %45 = load ptr, ptr %3, align 8, !tbaa !28
  %.not153 = icmp eq ptr %45, null
  br i1 %.not153, label %46, label %49

46:                                               ; preds = %.thread
  %47 = load ptr, ptr @stderr, align 8, !tbaa !5
  %48 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef nonnull @.str.1) #5
  tail call void @print_arglist(i32 noundef 1)
  br label %49

49:                                               ; preds = %46, %.thread
  %50 = tail call ptr @create_generator(ptr noundef %14, ptr noundef nonnull %3) #4
  %51 = getelementptr inbounds i8, ptr %3, i64 40
  %52 = load i32, ptr %51, align 8, !tbaa !29
  %.off = add i32 %52, -1
  %switch = icmp ult i32 %.off, 2
  br i1 %switch, label %53, label %74

53:                                               ; preds = %49
  %54 = tail call ptr @add_sz_to_s(ptr noundef null, ptr noundef %45) #4
  %55 = tail call ptr @add_s_to_s(ptr noundef %54, ptr noundef nonnull @.str.2, i32 noundef 2) #4
  %56 = tail call ptr @get_output(ptr noundef %55)
  %57 = getelementptr inbounds i8, ptr %3, i64 24
  store ptr %56, ptr %57, align 8, !tbaa !30
  %58 = getelementptr inbounds i8, ptr %55, i64 -4
  %59 = load i32, ptr %58, align 4, !tbaa !31
  %60 = sext i32 %59 to i64
  %61 = getelementptr i8, ptr %55, i64 %60
  %62 = getelementptr i8, ptr %61, i64 -1
  store i8 99, ptr %62, align 1, !tbaa !32
  %63 = load i32, ptr %51, align 8, !tbaa !29
  %64 = icmp eq i32 %63, 2
  br i1 %64, label %65, label %67

65:                                               ; preds = %53
  %66 = tail call ptr @add_char_to_s(ptr noundef nonnull %55, i8 noundef signext 99) #4
  br label %67

67:                                               ; preds = %65, %53
  %.0146 = phi ptr [ %66, %65 ], [ %55, %53 ]
  %68 = tail call ptr @get_output(ptr noundef %.0146)
  %69 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr %68, ptr %69, align 8, !tbaa !33
  tail call void @lose_s(ptr noundef %.0146) #4
  tail call void @generate_program_c(ptr noundef %50) #4
  %70 = load ptr, ptr %69, align 8, !tbaa !33
  %71 = tail call i32 @fclose(ptr noundef %70)
  %72 = load ptr, ptr %57, align 8, !tbaa !30
  %73 = tail call i32 @fclose(ptr noundef %72)
  %.pr158 = load i32, ptr %51, align 8, !tbaa !29
  br label %74

74:                                               ; preds = %49, %67
  %75 = phi i32 [ %52, %49 ], [ %.pr158, %67 ]
  %76 = icmp eq i32 %75, 0
  br i1 %76, label %77, label %84

77:                                               ; preds = %74
  %78 = tail call ptr @add_sz_to_s(ptr noundef null, ptr noundef %45) #4
  %79 = tail call ptr @add_s_to_s(ptr noundef %78, ptr noundef nonnull @.str.3, i32 noundef 5) #4
  %80 = tail call ptr @get_output(ptr noundef %79)
  %81 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr %80, ptr %81, align 8, !tbaa !33
  tail call void @lose_s(ptr noundef %79) #4
  tail call void @generate_program_java(ptr noundef %50) #4
  %82 = load ptr, ptr %81, align 8, !tbaa !33
  %83 = tail call i32 @fclose(ptr noundef %82)
  %.pre = load i32, ptr %51, align 8, !tbaa !29
  br label %84

84:                                               ; preds = %77, %74
  %85 = phi i32 [ %.pre, %77 ], [ %75, %74 ]
  %86 = icmp eq i32 %85, 4
  br i1 %86, label %87, label %94

87:                                               ; preds = %84
  %88 = tail call ptr @add_sz_to_s(ptr noundef null, ptr noundef %45) #4
  %89 = tail call ptr @add_s_to_s(ptr noundef %88, ptr noundef nonnull @.str.4, i32 noundef 4) #4
  %90 = tail call ptr @get_output(ptr noundef %89)
  %91 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr %90, ptr %91, align 8, !tbaa !33
  tail call void @lose_s(ptr noundef %89) #4
  tail call void @generate_program_pascal(ptr noundef %50) #4
  %92 = load ptr, ptr %91, align 8, !tbaa !33
  %93 = tail call i32 @fclose(ptr noundef %92)
  %.pr159 = load i32, ptr %51, align 8, !tbaa !29
  br label %94

94:                                               ; preds = %87, %84
  %95 = phi i32 [ %.pr159, %87 ], [ %85, %84 ]
  %96 = icmp eq i32 %95, 5
  br i1 %96, label %97, label %104

97:                                               ; preds = %94
  %98 = tail call ptr @add_sz_to_s(ptr noundef null, ptr noundef %45) #4
  %99 = tail call ptr @add_s_to_s(ptr noundef %98, ptr noundef nonnull @.str.5, i32 noundef 3) #4
  %100 = tail call ptr @get_output(ptr noundef %99)
  %101 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr %100, ptr %101, align 8, !tbaa !33
  tail call void @lose_s(ptr noundef %99) #4
  tail call void @generate_program_python(ptr noundef %50) #4
  %102 = load ptr, ptr %101, align 8, !tbaa !33
  %103 = tail call i32 @fclose(ptr noundef %102)
  %.pre179 = load i32, ptr %51, align 8, !tbaa !29
  br label %104

104:                                              ; preds = %97, %94
  %105 = phi i32 [ %.pre179, %97 ], [ %95, %94 ]
  %106 = icmp eq i32 %105, 6
  br i1 %106, label %107, label %120

107:                                              ; preds = %104
  %108 = tail call ptr @add_sz_to_s(ptr noundef null, ptr noundef %45) #4
  %109 = getelementptr inbounds i8, ptr %3, i64 34
  %110 = load i8, ptr %109, align 2, !tbaa !34
  %.not154 = icmp eq i8 %110, 0
  br i1 %.not154, label %113, label %111

111:                                              ; preds = %107
  %112 = tail call ptr @add_s_to_s(ptr noundef %108, ptr noundef nonnull @.str.6, i32 noundef 4) #4
  br label %115

113:                                              ; preds = %107
  %114 = tail call ptr @add_s_to_s(ptr noundef %108, ptr noundef nonnull @.str.7, i32 noundef 3) #4
  br label %115

115:                                              ; preds = %113, %111
  %.0145 = phi ptr [ %112, %111 ], [ %114, %113 ]
  %116 = tail call ptr @get_output(ptr noundef %.0145)
  %117 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr %116, ptr %117, align 8, !tbaa !33
  tail call void @lose_s(ptr noundef %.0145) #4
  tail call void @generate_program_js(ptr noundef %50) #4
  %118 = load ptr, ptr %117, align 8, !tbaa !33
  %119 = tail call i32 @fclose(ptr noundef %118)
  %.pr160 = load i32, ptr %51, align 8, !tbaa !29
  br label %120

120:                                              ; preds = %115, %104
  %121 = phi i32 [ %.pr160, %115 ], [ %105, %104 ]
  %122 = icmp eq i32 %121, 3
  br i1 %122, label %123, label %130

123:                                              ; preds = %120
  %124 = tail call ptr @add_sz_to_s(ptr noundef null, ptr noundef %45) #4
  %125 = tail call ptr @add_s_to_s(ptr noundef %124, ptr noundef nonnull @.str.8, i32 noundef 3) #4
  %126 = tail call ptr @get_output(ptr noundef %125)
  %127 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr %126, ptr %127, align 8, !tbaa !33
  tail call void @lose_s(ptr noundef %125) #4
  tail call void @generate_program_csharp(ptr noundef %50) #4
  %128 = load ptr, ptr %127, align 8, !tbaa !33
  %129 = tail call i32 @fclose(ptr noundef %128)
  %.pre180 = load i32, ptr %51, align 8, !tbaa !29
  br label %130

130:                                              ; preds = %123, %120
  %131 = phi i32 [ %.pre180, %123 ], [ %121, %120 ]
  %132 = icmp eq i32 %131, 7
  br i1 %132, label %133, label %140

133:                                              ; preds = %130
  %134 = tail call ptr @add_sz_to_s(ptr noundef null, ptr noundef %45) #4
  %135 = tail call ptr @add_s_to_s(ptr noundef %134, ptr noundef nonnull @.str.9, i32 noundef 3) #4
  %136 = tail call ptr @get_output(ptr noundef %135)
  %137 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr %136, ptr %137, align 8, !tbaa !33
  tail call void @lose_s(ptr noundef %135) #4
  tail call void @generate_program_rust(ptr noundef %50) #4
  %138 = load ptr, ptr %137, align 8, !tbaa !33
  %139 = tail call i32 @fclose(ptr noundef %138)
  %.pr161 = load i32, ptr %51, align 8, !tbaa !29
  br label %140

140:                                              ; preds = %133, %130
  %141 = phi i32 [ %.pr161, %133 ], [ %131, %130 ]
  %142 = icmp eq i32 %141, 8
  br i1 %142, label %143, label %150

143:                                              ; preds = %140
  %144 = tail call ptr @add_sz_to_s(ptr noundef null, ptr noundef %45) #4
  %145 = tail call ptr @add_s_to_s(ptr noundef %144, ptr noundef nonnull @.str.10, i32 noundef 3) #4
  %146 = tail call ptr @get_output(ptr noundef %145)
  %147 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr %146, ptr %147, align 8, !tbaa !33
  tail call void @lose_s(ptr noundef %145) #4
  tail call void @generate_program_go(ptr noundef %50) #4
  %148 = load ptr, ptr %147, align 8, !tbaa !33
  %149 = tail call i32 @fclose(ptr noundef %148)
  %.pre181 = load i32, ptr %51, align 8, !tbaa !29
  br label %150

150:                                              ; preds = %143, %140
  %151 = phi i32 [ %.pre181, %143 ], [ %141, %140 ]
  %152 = icmp eq i32 %151, 9
  br i1 %152, label %153, label %169

153:                                              ; preds = %150
  %154 = tail call ptr @add_sz_to_s(ptr noundef null, ptr noundef %45) #4
  %155 = tail call ptr @add_s_to_s(ptr noundef %154, ptr noundef nonnull @.str.11, i32 noundef 4) #4
  %156 = tail call ptr @get_output(ptr noundef %155)
  %157 = getelementptr inbounds i8, ptr %3, i64 24
  store ptr %156, ptr %157, align 8, !tbaa !30
  %158 = getelementptr inbounds i8, ptr %155, i64 -4
  %159 = load i32, ptr %158, align 4, !tbaa !31
  %160 = sext i32 %159 to i64
  %161 = getelementptr i8, ptr %155, i64 %160
  %162 = getelementptr i8, ptr %161, i64 -1
  store i8 98, ptr %162, align 1, !tbaa !32
  %163 = tail call ptr @get_output(ptr noundef %155)
  %164 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr %163, ptr %164, align 8, !tbaa !33
  tail call void @lose_s(ptr noundef %155) #4
  tail call void @generate_program_ada(ptr noundef %50) #4
  %165 = load ptr, ptr %164, align 8, !tbaa !33
  %166 = tail call i32 @fclose(ptr noundef %165)
  %167 = load ptr, ptr %157, align 8, !tbaa !30
  %168 = tail call i32 @fclose(ptr noundef %167)
  br label %169

169:                                              ; preds = %153, %150
  tail call void @close_generator(ptr noundef %50) #4
  br label %170

170:                                              ; preds = %169, %44
  tail call void @close_tokeniser(ptr noundef nonnull %13) #4
  tail call void @close_analyser(ptr noundef %14) #4
  tail call void @lose_s(ptr noundef nonnull %.0143.lcssa) #4
  %171 = load ptr, ptr %19, align 8, !tbaa !16
  %.not155168 = icmp eq ptr %171, null
  br i1 %.not155168, label %._crit_edge172, label %.lr.ph171

.lr.ph171:                                        ; preds = %170, %.lr.ph171
  %.0169 = phi ptr [ %172, %.lr.ph171 ], [ %171, %170 ]
  %172 = load ptr, ptr %.0169, align 8, !tbaa !35
  %173 = getelementptr inbounds i8, ptr %.0169, i64 8
  %174 = load ptr, ptr %173, align 8, !tbaa !37
  tail call void @lose_s(ptr noundef %174) #4
  tail call void @check_free(ptr noundef nonnull %.0169) #4
  %.not155 = icmp eq ptr %172, null
  br i1 %.not155, label %._crit_edge172, label %.lr.ph171, !llvm.loop !38

._crit_edge172:                                   ; preds = %.lr.ph171, %170
  %175 = getelementptr inbounds i8, ptr %3, i64 8
  %176 = load ptr, ptr %175, align 8, !tbaa !39
  tail call void @check_free(ptr noundef %176) #4
  tail call void @check_free(ptr noundef %3) #4
  %177 = load i32, ptr @space_count, align 4, !tbaa !31
  %.not156 = icmp eq i32 %177, 0
  br i1 %.not156, label %181, label %178

178:                                              ; preds = %._crit_edge172
  %179 = load ptr, ptr @stderr, align 8, !tbaa !5
  %180 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %179, ptr noundef nonnull @.str.12, i32 noundef %177) #5
  br label %181

181:                                              ; preds = %178, %._crit_edge172
  ret i32 0
}

declare ptr @check_malloc(i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @read_options(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare ptr @get_input(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

declare ptr @create_tokeniser(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @create_analyser(ptr noundef) local_unnamed_addr #1

declare void @read_program(ptr noundef) local_unnamed_addr #1

declare void @print_program(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @print_arglist(i32 noundef) local_unnamed_addr #0

declare ptr @create_generator(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @add_sz_to_s(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @add_s_to_s(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden ptr @get_output(ptr noundef) local_unnamed_addr #0

declare ptr @add_char_to_s(ptr noundef, i8 noundef signext) local_unnamed_addr #1

declare void @lose_s(ptr noundef) local_unnamed_addr #1

declare void @generate_program_c(ptr noundef) local_unnamed_addr #1

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

declare void @generate_program_java(ptr noundef) local_unnamed_addr #1

declare void @generate_program_pascal(ptr noundef) local_unnamed_addr #1

declare void @generate_program_python(ptr noundef) local_unnamed_addr #1

declare void @generate_program_js(ptr noundef) local_unnamed_addr #1

declare void @generate_program_csharp(ptr noundef) local_unnamed_addr #1

declare void @generate_program_rust(ptr noundef) local_unnamed_addr #1

declare void @generate_program_go(ptr noundef) local_unnamed_addr #1

declare void @generate_program_ada(ptr noundef) local_unnamed_addr #1

declare void @close_generator(ptr noundef) local_unnamed_addr #1

declare void @close_tokeniser(ptr noundef) local_unnamed_addr #1

declare void @close_analyser(ptr noundef) local_unnamed_addr #1

declare void @check_free(ptr noundef) local_unnamed_addr #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { 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 #3 = { noreturn 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 }
attributes #5 = { cold nounwind }
attributes #6 = { noreturn 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 = !{!10, !11, i64 36}
!10 = !{!"options", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !7, i64 32, !7, i64 33, !7, i64 34, !11, i64 36, !11, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !11, i64 100}
!13 = !{!"tokeniser", !6, i64 0, !6, i64 8, !11, i64 16, !6, i64 24, !11, i64 32, !11, i64 36, !6, i64 40, !6, i64 48, !11, i64 56, !11, i64 60, !11, i64 64, !6, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !7, i64 96, !7, i64 97, !11, i64 100, !11, i64 104, !6, i64 112, !11, i64 120, !7, i64 124}
!14 = !{!15, !11, i64 136}
!15 = !{!"analyser", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !7, i64 32, !7, i64 33, !6, i64 40, !6, i64 48, !7, i64 56, !6, i64 80, !6, i64 88, !11, i64 96, !11, i64 100, !11, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !11, i64 136, !7, i64 140}
!16 = !{!10, !6, i64 112}
!17 = !{!13, !6, i64 112}
!18 = !{!19, !6, i64 8}
!19 = !{!"input", !6, i64 0, !6, i64 8, !11, i64 16, !6, i64 24, !11, i64 32, !11, i64 36}
!20 = !{!19, !11, i64 16}
!21 = !{!19, !6, i64 24}
!22 = !{!19, !11, i64 32}
!23 = !{!19, !11, i64 36}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!13, !11, i64 84}
!27 = !{!10, !7, i64 32}
!28 = !{!10, !6, i64 0}
!29 = !{!10, !11, i64 40}
!30 = !{!10, !6, i64 24}
!31 = !{!11, !11, i64 0}
!32 = !{!7, !7, i64 0}
!33 = !{!10, !6, i64 16}
!34 = !{!10, !7, i64 34}
!35 = !{!36, !6, i64 0}
!36 = !{!"include", !6, i64 0, !6, i64 8}
!37 = !{!36, !6, i64 8}
!38 = distinct !{!38, !25}
!39 = !{!10, !6, i64 8}


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