; LLVM IR from vul337/PrIntFuzz :: config/linux/firmware/carl9170fw/config (expr)

; 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.symbol = type { ptr, ptr, i32, %struct.symbol_value, [4 x %struct.symbol_value], i32, i32, ptr, %struct.expr_value, %struct.expr_value }
%struct.symbol_value = type { ptr, i32 }
%struct.expr_value = type { ptr, i32 }
%struct.expr = type { i32, %union.expr_data, %union.expr_data }
%union.expr_data = type { ptr }

@symbol_no = external global %struct.symbol, align 8
@symbol_yes = external global %struct.symbol, align 8
@symbol_mod = external global %struct.symbol, align 8
@.str.2 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [54 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @expr_alloc_symbol(ptr noundef) #0

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

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

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

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local ptr @expr_transform(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %6 = load ptr, ptr %3, align 8, !tbaa !5
  %7 = icmp ne ptr %6, null
  br i1 %7, label %9, label %8

8:                                                ; preds = %1
  store ptr null, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %263

9:                                                ; preds = %1
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.expr, ptr %10, i32 0, i32 0
  %12 = load i32, ptr %11, align 8, !tbaa !9
  switch i32 %12, label %14 [
    i32 4, label %13
    i32 5, label %13
    i32 7, label %13
    i32 6, label %13
  ]

13:                                               ; preds = %9, %9, %9, %9
  br label %27

14:                                               ; preds = %9
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.expr, ptr %15, i32 0, i32 1
  %17 = load ptr, ptr %16, align 8, !tbaa !12
  %18 = call ptr @expr_transform(ptr noundef %17)
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.expr, ptr %19, i32 0, i32 1
  store ptr %18, ptr %20, align 8, !tbaa !12
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.expr, ptr %21, i32 0, i32 2
  %23 = load ptr, ptr %22, align 8, !tbaa !12
  %24 = call ptr @expr_transform(ptr noundef %23)
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.expr, ptr %25, i32 0, i32 2
  store ptr %24, ptr %26, align 8, !tbaa !12
  br label %27

27:                                               ; preds = %14, %13
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.expr, ptr %28, i32 0, i32 0
  %30 = load i32, ptr %29, align 8, !tbaa !9
  switch i32 %30, label %260 [
    i32 4, label %31
    i32 5, label %84
    i32 3, label %137
  ]

31:                                               ; preds = %27
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.expr, ptr %32, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !12
  %35 = getelementptr inbounds %struct.symbol, ptr %34, i32 0, i32 2
  %36 = load i32, ptr %35, align 8, !tbaa !13
  %37 = icmp ne i32 %36, 1
  br i1 %37, label %38, label %39

38:                                               ; preds = %31
  br label %261

39:                                               ; preds = %31
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.expr, ptr %40, i32 0, i32 2
  %42 = load ptr, ptr %41, align 8, !tbaa !12
  %43 = icmp eq ptr %42, @symbol_no
  br i1 %43, label %44, label %55

44:                                               ; preds = %39
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.expr, ptr %45, i32 0, i32 0
  store i32 3, ptr %46, align 8, !tbaa !9
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.expr, ptr %47, i32 0, i32 1
  %49 = load ptr, ptr %48, align 8, !tbaa !12
  %50 = call ptr @expr_alloc_symbol(ptr noundef %49)
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.expr, ptr %51, i32 0, i32 1
  store ptr %50, ptr %52, align 8, !tbaa !12
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.expr, ptr %53, i32 0, i32 2
  store ptr null, ptr %54, align 8, !tbaa !12
  br label %261

55:                                               ; preds = %39
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.expr, ptr %56, i32 0, i32 2
  %58 = load ptr, ptr %57, align 8, !tbaa !12
  %59 = icmp eq ptr %58, @symbol_mod
  br i1 %59, label %60, label %73

60:                                               ; preds = %55
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.expr, ptr %61, i32 0, i32 1
  %63 = load ptr, ptr %62, align 8, !tbaa !12
  %64 = getelementptr inbounds %struct.symbol, ptr %63, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !17
  %66 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %65)
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.expr, ptr %67, i32 0, i32 0
  store i32 7, ptr %68, align 8, !tbaa !9
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.expr, ptr %69, i32 0, i32 1
  store ptr @symbol_no, ptr %70, align 8, !tbaa !12
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.expr, ptr %71, i32 0, i32 2
  store ptr null, ptr %72, align 8, !tbaa !12
  br label %261

73:                                               ; preds = %55
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.expr, ptr %74, i32 0, i32 2
  %76 = load ptr, ptr %75, align 8, !tbaa !12
  %77 = icmp eq ptr %76, @symbol_yes
  br i1 %77, label %78, label %83

78:                                               ; preds = %73
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.expr, ptr %79, i32 0, i32 0
  store i32 7, ptr %80, align 8, !tbaa !9
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.expr, ptr %81, i32 0, i32 2
  store ptr null, ptr %82, align 8, !tbaa !12
  br label %261

83:                                               ; preds = %73
  br label %261

84:                                               ; preds = %27
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.expr, ptr %85, i32 0, i32 1
  %87 = load ptr, ptr %86, align 8, !tbaa !12
  %88 = getelementptr inbounds %struct.symbol, ptr %87, i32 0, i32 2
  %89 = load i32, ptr %88, align 8, !tbaa !13
  %90 = icmp ne i32 %89, 1
  br i1 %90, label %91, label %92

91:                                               ; preds = %84
  br label %261

92:                                               ; preds = %84
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.expr, ptr %93, i32 0, i32 2
  %95 = load ptr, ptr %94, align 8, !tbaa !12
  %96 = icmp eq ptr %95, @symbol_no
  br i1 %96, label %97, label %102

97:                                               ; preds = %92
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.expr, ptr %98, i32 0, i32 0
  store i32 7, ptr %99, align 8, !tbaa !9
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.expr, ptr %100, i32 0, i32 2
  store ptr null, ptr %101, align 8, !tbaa !12
  br label %261

102:                                              ; preds = %92
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.expr, ptr %103, i32 0, i32 2
  %105 = load ptr, ptr %104, align 8, !tbaa !12
  %106 = icmp eq ptr %105, @symbol_mod
  br i1 %106, label %107, label %120

107:                                              ; preds = %102
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.expr, ptr %108, i32 0, i32 1
  %110 = load ptr, ptr %109, align 8, !tbaa !12
  %111 = getelementptr inbounds %struct.symbol, ptr %110, i32 0, i32 1
  %112 = load ptr, ptr %111, align 8, !tbaa !17
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, ptr noundef %112)
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.expr, ptr %114, i32 0, i32 0
  store i32 7, ptr %115, align 8, !tbaa !9
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.expr, ptr %116, i32 0, i32 1
  store ptr @symbol_yes, ptr %117, align 8, !tbaa !12
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.expr, ptr %118, i32 0, i32 2
  store ptr null, ptr %119, align 8, !tbaa !12
  br label %261

120:                                              ; preds = %102
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.expr, ptr %121, i32 0, i32 2
  %123 = load ptr, ptr %122, align 8, !tbaa !12
  %124 = icmp eq ptr %123, @symbol_yes
  br i1 %124, label %125, label %136

125:                                              ; preds = %120
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.expr, ptr %126, i32 0, i32 0
  store i32 3, ptr %127, align 8, !tbaa !9
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.expr, ptr %128, i32 0, i32 1
  %130 = load ptr, ptr %129, align 8, !tbaa !12
  %131 = call ptr @expr_alloc_symbol(ptr noundef %130)
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.expr, ptr %132, i32 0, i32 1
  store ptr %131, ptr %133, align 8, !tbaa !12
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.expr, ptr %134, i32 0, i32 2
  store ptr null, ptr %135, align 8, !tbaa !12
  br label %261

136:                                              ; preds = %120
  br label %261

137:                                              ; preds = %27
  %138 = load ptr, ptr %3, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.expr, ptr %138, i32 0, i32 1
  %140 = load ptr, ptr %139, align 8, !tbaa !12
  %141 = getelementptr inbounds %struct.expr, ptr %140, i32 0, i32 0
  %142 = load i32, ptr %141, align 8, !tbaa !9
  switch i32 %142, label %258 [
    i32 3, label %143
    i32 4, label %156
    i32 5, label %156
    i32 1, label %170
    i32 2, label %188
    i32 7, label %206
  ]

143:                                              ; preds = %137
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.expr, ptr %144, i32 0, i32 1
  %146 = load ptr, ptr %145, align 8, !tbaa !12
  %147 = getelementptr inbounds %struct.expr, ptr %146, i32 0, i32 1
  %148 = load ptr, ptr %147, align 8, !tbaa !12
  store ptr %148, ptr %4, align 8, !tbaa !5
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.expr, ptr %149, i32 0, i32 1
  %151 = load ptr, ptr %150, align 8, !tbaa !12
  call void @free(ptr noundef %151) #4
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %152) #4
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %153, ptr %3, align 8, !tbaa !5
  %154 = load ptr, ptr %3, align 8, !tbaa !5
  %155 = call ptr @expr_transform(ptr noundef %154)
  store ptr %155, ptr %3, align 8, !tbaa !5
  br label %259

156:                                              ; preds = %137, %137
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.expr, ptr %157, i32 0, i32 1
  %159 = load ptr, ptr %158, align 8, !tbaa !12
  store ptr %159, ptr %4, align 8, !tbaa !5
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %160) #4
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %161, ptr %3, align 8, !tbaa !5
  %162 = load ptr, ptr %3, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.expr, ptr %162, i32 0, i32 0
  %164 = load i32, ptr %163, align 8, !tbaa !9
  %165 = icmp eq i32 %164, 4
  %166 = zext i1 %165 to i64
  %167 = select i1 %165, i32 5, i32 4
  %168 = load ptr, ptr %3, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.expr, ptr %168, i32 0, i32 0
  store i32 %167, ptr %169, align 8, !tbaa !9
  br label %259

170:                                              ; preds = %137
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.expr, ptr %171, i32 0, i32 1
  %173 = load ptr, ptr %172, align 8, !tbaa !12
  store ptr %173, ptr %4, align 8, !tbaa !5
  %174 = load ptr, ptr %3, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.expr, ptr %174, i32 0, i32 0
  store i32 2, ptr %175, align 8, !tbaa !9
  %176 = load ptr, ptr %4, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.expr, ptr %176, i32 0, i32 2
  %178 = load ptr, ptr %177, align 8, !tbaa !12
  %179 = call ptr @expr_alloc_one(i32 noundef 3, ptr noundef %178)
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.expr, ptr %180, i32 0, i32 2
  store ptr %179, ptr %181, align 8, !tbaa !12
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.expr, ptr %182, i32 0, i32 0
  store i32 3, ptr %183, align 8, !tbaa !9
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.expr, ptr %184, i32 0, i32 2
  store ptr null, ptr %185, align 8, !tbaa !12
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  %187 = call ptr @expr_transform(ptr noundef %186)
  store ptr %187, ptr %3, align 8, !tbaa !5
  br label %259

188:                                              ; preds = %137
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.expr, ptr %189, i32 0, i32 1
  %191 = load ptr, ptr %190, align 8, !tbaa !12
  store ptr %191, ptr %4, align 8, !tbaa !5
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.expr, ptr %192, i32 0, i32 0
  store i32 1, ptr %193, align 8, !tbaa !9
  %194 = load ptr, ptr %4, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.expr, ptr %194, i32 0, i32 2
  %196 = load ptr, ptr %195, align 8, !tbaa !12
  %197 = call ptr @expr_alloc_one(i32 noundef 3, ptr noundef %196)
  %198 = load ptr, ptr %3, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.expr, ptr %198, i32 0, i32 2
  store ptr %197, ptr %199, align 8, !tbaa !12
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.expr, ptr %200, i32 0, i32 0
  store i32 3, ptr %201, align 8, !tbaa !9
  %202 = load ptr, ptr %4, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.expr, ptr %202, i32 0, i32 2
  store ptr null, ptr %203, align 8, !tbaa !12
  %204 = load ptr, ptr %3, align 8, !tbaa !5
  %205 = call ptr @expr_transform(ptr noundef %204)
  store ptr %205, ptr %3, align 8, !tbaa !5
  br label %259

206:                                              ; preds = %137
  %207 = load ptr, ptr %3, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.expr, ptr %207, i32 0, i32 1
  %209 = load ptr, ptr %208, align 8, !tbaa !12
  %210 = getelementptr inbounds %struct.expr, ptr %209, i32 0, i32 1
  %211 = load ptr, ptr %210, align 8, !tbaa !12
  %212 = icmp eq ptr %211, @symbol_yes
  br i1 %212, label %213, label %223

213:                                              ; preds = %206
  %214 = load ptr, ptr %3, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.expr, ptr %214, i32 0, i32 1
  %216 = load ptr, ptr %215, align 8, !tbaa !12
  store ptr %216, ptr %4, align 8, !tbaa !5
  %217 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %217) #4
  %218 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %218, ptr %3, align 8, !tbaa !5
  %219 = load ptr, ptr %3, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.expr, ptr %219, i32 0, i32 0
  store i32 7, ptr %220, align 8, !tbaa !9
  %221 = load ptr, ptr %3, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.expr, ptr %221, i32 0, i32 1
  store ptr @symbol_no, ptr %222, align 8, !tbaa !12
  br label %259

223:                                              ; preds = %206
  %224 = load ptr, ptr %3, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.expr, ptr %224, i32 0, i32 1
  %226 = load ptr, ptr %225, align 8, !tbaa !12
  %227 = getelementptr inbounds %struct.expr, ptr %226, i32 0, i32 1
  %228 = load ptr, ptr %227, align 8, !tbaa !12
  %229 = icmp eq ptr %228, @symbol_mod
  br i1 %229, label %230, label %240

230:                                              ; preds = %223
  %231 = load ptr, ptr %3, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.expr, ptr %231, i32 0, i32 1
  %233 = load ptr, ptr %232, align 8, !tbaa !12
  store ptr %233, ptr %4, align 8, !tbaa !5
  %234 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %234) #4
  %235 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %235, ptr %3, align 8, !tbaa !5
  %236 = load ptr, ptr %3, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.expr, ptr %236, i32 0, i32 0
  store i32 7, ptr %237, align 8, !tbaa !9
  %238 = load ptr, ptr %3, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.expr, ptr %238, i32 0, i32 1
  store ptr @symbol_mod, ptr %239, align 8, !tbaa !12
  br label %259

240:                                              ; preds = %223
  %241 = load ptr, ptr %3, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.expr, ptr %241, i32 0, i32 1
  %243 = load ptr, ptr %242, align 8, !tbaa !12
  %244 = getelementptr inbounds %struct.expr, ptr %243, i32 0, i32 1
  %245 = load ptr, ptr %244, align 8, !tbaa !12
  %246 = icmp eq ptr %245, @symbol_no
  br i1 %246, label %247, label %257

247:                                              ; preds = %240
  %248 = load ptr, ptr %3, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.expr, ptr %248, i32 0, i32 1
  %250 = load ptr, ptr %249, align 8, !tbaa !12
  store ptr %250, ptr %4, align 8, !tbaa !5
  %251 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %251) #4
  %252 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %252, ptr %3, align 8, !tbaa !5
  %253 = load ptr, ptr %3, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.expr, ptr %253, i32 0, i32 0
  store i32 7, ptr %254, align 8, !tbaa !9
  %255 = load ptr, ptr %3, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.expr, ptr %255, i32 0, i32 1
  store ptr @symbol_yes, ptr %256, align 8, !tbaa !12
  br label %259

257:                                              ; preds = %240
  br label %259

258:                                              ; preds = %137
  br label %259

259:                                              ; preds = %258, %257, %247, %230, %213, %188, %170, %156, %143
  br label %261

260:                                              ; preds = %27
  br label %261

261:                                              ; preds = %260, %259, %136, %125, %107, %97, %91, %83, %78, %60, %44, %38
  %262 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %262, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %263

263:                                              ; preds = %261, %8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  %264 = load ptr, ptr %2, align 8
  ret ptr %264
}

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 = { 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 0}
!10 = !{!"expr", !11, i64 0, !7, i64 8, !7, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !11, i64 16}
!14 = !{!"symbol", !6, i64 0, !6, i64 8, !11, i64 16, !15, i64 24, !7, i64 40, !11, i64 104, !11, i64 108, !6, i64 112, !16, i64 120, !16, i64 136}
!15 = !{!"symbol_value", !6, i64 0, !11, i64 8}
!16 = !{!"expr_value", !6, i64 0, !11, i64 8}
!17 = !{!14, !6, 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"

%struct.symbol = type { ptr, ptr, i32, %struct.symbol_value, [4 x %struct.symbol_value], i32, i32, ptr, %struct.expr_value, %struct.expr_value }
%struct.symbol_value = type { ptr, i32 }
%struct.expr_value = type { ptr, i32 }

@symbol_no = external global %struct.symbol, align 8
@symbol_yes = external global %struct.symbol, align 8
@symbol_mod = external global %struct.symbol, align 8
@.str.2 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [54 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @expr_alloc_symbol(ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local ptr @expr_transform(ptr noundef %0) local_unnamed_addr #0 {
  %.not161 = icmp eq ptr %0, null
  br i1 %.not161, label %.loopexit, label %.lr.ph.split.preheader

.lr.ph.split.preheader:                           ; preds = %1, %tailrecurse.outer
  %.tr.ph162 = phi ptr [ %51, %tailrecurse.outer ], [ %0, %1 ]
  %2 = getelementptr inbounds i8, ptr %.tr.ph162, i64 8
  %3 = getelementptr inbounds i8, ptr %.tr.ph162, i64 16
  br label %.lr.ph.split

.lr.ph.split:                                     ; preds = %.lr.ph.split.preheader, %tailrecurse.backedge
  %4 = load i32, ptr %.tr.ph162, align 8, !tbaa !5
  %5 = and i32 %4, -4
  %switch = icmp eq i32 %5, 4
  br i1 %switch, label %11, label %6

6:                                                ; preds = %.lr.ph.split
  %7 = load ptr, ptr %2, align 8, !tbaa !10
  %8 = tail call ptr @expr_transform(ptr noundef %7)
  store ptr %8, ptr %2, align 8, !tbaa !10
  %9 = load ptr, ptr %3, align 8, !tbaa !10
  %10 = tail call ptr @expr_transform(ptr noundef %9)
  store ptr %10, ptr %3, align 8, !tbaa !10
  %.pr = load i32, ptr %.tr.ph162, align 8, !tbaa !5
  br label %11

11:                                               ; preds = %.lr.ph.split, %6
  %12 = phi i32 [ %4, %.lr.ph.split ], [ %.pr, %6 ]
  switch i32 %12, label %.loopexit [
    i32 4, label %.split.us
    i32 5, label %.split99.us
    i32 3, label %47
  ]

.split.us:                                        ; preds = %11
  %13 = load ptr, ptr %2, align 8, !tbaa !10
  %14 = getelementptr inbounds i8, ptr %13, i64 16
  %15 = load i32, ptr %14, align 8, !tbaa !11
  %.not86 = icmp eq i32 %15, 1
  br i1 %.not86, label %16, label %.loopexit

16:                                               ; preds = %.split.us
  %17 = load ptr, ptr %3, align 8, !tbaa !10
  %18 = icmp eq ptr %17, @symbol_no
  br i1 %18, label %19, label %21

19:                                               ; preds = %16
  store i32 3, ptr %.tr.ph162, align 8, !tbaa !5
  %20 = tail call ptr @expr_alloc_symbol(ptr noundef nonnull %13)
  store ptr %20, ptr %2, align 8, !tbaa !10
  store ptr null, ptr %3, align 8, !tbaa !10
  br label %.loopexit

21:                                               ; preds = %16
  %22 = icmp eq ptr %17, @symbol_mod
  br i1 %22, label %23, label %27

23:                                               ; preds = %21
  %24 = getelementptr inbounds i8, ptr %13, i64 8
  %25 = load ptr, ptr %24, align 8, !tbaa !16
  %26 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %25)
  store i32 7, ptr %.tr.ph162, align 8, !tbaa !5
  store ptr @symbol_no, ptr %2, align 8, !tbaa !10
  store ptr null, ptr %3, align 8, !tbaa !10
  br label %.loopexit

27:                                               ; preds = %21
  %28 = icmp eq ptr %17, @symbol_yes
  br i1 %28, label %29, label %.loopexit

29:                                               ; preds = %27
  store i32 7, ptr %.tr.ph162, align 8, !tbaa !5
  store ptr null, ptr %3, align 8, !tbaa !10
  br label %.loopexit

.split99.us:                                      ; preds = %11
  %30 = load ptr, ptr %2, align 8, !tbaa !10
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %32 = load i32, ptr %31, align 8, !tbaa !11
  %.not85 = icmp eq i32 %32, 1
  br i1 %.not85, label %33, label %.loopexit

33:                                               ; preds = %.split99.us
  %34 = load ptr, ptr %3, align 8, !tbaa !10
  %35 = icmp eq ptr %34, @symbol_no
  br i1 %35, label %36, label %37

36:                                               ; preds = %33
  store i32 7, ptr %.tr.ph162, align 8, !tbaa !5
  store ptr null, ptr %3, align 8, !tbaa !10
  br label %.loopexit

37:                                               ; preds = %33
  %38 = icmp eq ptr %34, @symbol_mod
  br i1 %38, label %39, label %43

39:                                               ; preds = %37
  %40 = getelementptr inbounds i8, ptr %30, i64 8
  %41 = load ptr, ptr %40, align 8, !tbaa !16
  %42 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef %41)
  store i32 7, ptr %.tr.ph162, align 8, !tbaa !5
  store ptr @symbol_yes, ptr %2, align 8, !tbaa !10
  store ptr null, ptr %3, align 8, !tbaa !10
  br label %.loopexit

43:                                               ; preds = %37
  %44 = icmp eq ptr %34, @symbol_yes
  br i1 %44, label %45, label %.loopexit

45:                                               ; preds = %43
  store i32 3, ptr %.tr.ph162, align 8, !tbaa !5
  %46 = tail call ptr @expr_alloc_symbol(ptr noundef nonnull %30)
  store ptr %46, ptr %2, align 8, !tbaa !10
  store ptr null, ptr %3, align 8, !tbaa !10
  br label %.loopexit

47:                                               ; preds = %11
  %48 = load ptr, ptr %2, align 8, !tbaa !10
  %49 = load i32, ptr %48, align 8, !tbaa !5
  switch i32 %49, label %.loopexit [
    i32 3, label %tailrecurse.outer
    i32 4, label %.split106.us
    i32 5, label %.split106.us
    i32 1, label %55
    i32 2, label %tailrecurse.backedge
    i32 7, label %.split110.us
  ]

tailrecurse.outer:                                ; preds = %47
  %50 = getelementptr inbounds i8, ptr %48, i64 8
  %51 = load ptr, ptr %50, align 8, !tbaa !10
  tail call void @free(ptr noundef nonnull %48) #3
  tail call void @free(ptr noundef nonnull %.tr.ph162) #3
  %.not = icmp eq ptr %51, null
  br i1 %.not, label %.loopexit, label %.lr.ph.split.preheader

.split106.us:                                     ; preds = %47, %47
  tail call void @free(ptr noundef nonnull %.tr.ph162) #3
  %52 = load i32, ptr %48, align 8, !tbaa !5
  %53 = icmp eq i32 %52, 4
  %54 = select i1 %53, i32 5, i32 4
  store i32 %54, ptr %48, align 8, !tbaa !5
  br label %.loopexit

55:                                               ; preds = %47
  br label %tailrecurse.backedge

tailrecurse.backedge:                             ; preds = %47, %55
  %.sink = phi i32 [ 2, %55 ], [ 1, %47 ]
  store i32 %.sink, ptr %.tr.ph162, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %48, i64 16
  %57 = load ptr, ptr %56, align 8, !tbaa !10
  %58 = tail call ptr @expr_alloc_one(i32 noundef 3, ptr noundef %57)
  store ptr %58, ptr %3, align 8, !tbaa !10
  store i32 3, ptr %48, align 8, !tbaa !5
  store ptr null, ptr %56, align 8, !tbaa !10
  br label %.lr.ph.split

.split110.us:                                     ; preds = %47
  %59 = getelementptr inbounds i8, ptr %48, i64 8
  %60 = load ptr, ptr %59, align 8, !tbaa !10
  %61 = icmp eq ptr %60, @symbol_yes
  br i1 %61, label %62, label %63

62:                                               ; preds = %.split110.us
  tail call void @free(ptr noundef nonnull %.tr.ph162) #3
  store i32 7, ptr %48, align 8, !tbaa !5
  store ptr @symbol_no, ptr %59, align 8, !tbaa !10
  br label %.loopexit

63:                                               ; preds = %.split110.us
  %64 = icmp eq ptr %60, @symbol_mod
  br i1 %64, label %65, label %66

65:                                               ; preds = %63
  tail call void @free(ptr noundef nonnull %.tr.ph162) #3
  store i32 7, ptr %48, align 8, !tbaa !5
  store ptr @symbol_mod, ptr %59, align 8, !tbaa !10
  br label %.loopexit

66:                                               ; preds = %63
  %67 = icmp eq ptr %60, @symbol_no
  br i1 %67, label %68, label %.loopexit

68:                                               ; preds = %66
  tail call void @free(ptr noundef nonnull %.tr.ph162) #3
  store i32 7, ptr %48, align 8, !tbaa !5
  store ptr @symbol_yes, ptr %59, align 8, !tbaa !10
  br label %.loopexit

.loopexit:                                        ; preds = %tailrecurse.outer, %11, %47, %1, %19, %23, %29, %36, %39, %45, %.split.us, %27, %.split99.us, %43, %66, %68, %65, %62, %.split106.us
  %.080 = phi ptr [ %48, %62 ], [ %48, %65 ], [ %48, %68 ], [ %.tr.ph162, %66 ], [ %48, %.split106.us ], [ %.tr.ph162, %.split99.us ], [ %.tr.ph162, %36 ], [ %.tr.ph162, %39 ], [ %.tr.ph162, %45 ], [ %.tr.ph162, %43 ], [ %.tr.ph162, %.split.us ], [ %.tr.ph162, %19 ], [ %.tr.ph162, %23 ], [ %.tr.ph162, %29 ], [ %.tr.ph162, %27 ], [ null, %1 ], [ %.tr.ph162, %47 ], [ %.tr.ph162, %11 ], [ null, %tailrecurse.outer ]
  ret ptr %.080
}

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 = { 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 #2 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 }

!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 = !{!"expr", !7, i64 0, !8, i64 8, !8, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!8, !8, i64 0}
!11 = !{!12, !7, i64 16}
!12 = !{!"symbol", !13, i64 0, !13, i64 8, !7, i64 16, !14, i64 24, !8, i64 40, !7, i64 104, !7, i64 108, !13, i64 112, !15, i64 120, !15, i64 136}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"symbol_value", !13, i64 0, !7, i64 8}
!15 = !{!"expr_value", !13, i64 0, !7, i64 8}
!16 = !{!12, !13, i64 8}


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