; LLVM IR from hbatagelo/abcg :: abcg/external/glslang/glslang/HLSL (hlslScanContext)

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

%"class.glslang::TPpToken" = type <{ %"struct.glslang::TSourceLoc", i8, [7 x i8], %union.anon.34, [1025 x i8], [7 x i8] }>
%"struct.glslang::TSourceLoc" = type { ptr, i32, i32, i32 }
%union.anon.34 = type { double }
%"class.glslang::HlslScanContext" = type <{ ptr, ptr, ptr, %"struct.glslang::TSourceLoc", ptr, ptr, ptr, i32, [4 x i8] }>
%"struct.glslang::HlslToken" = type { %"struct.glslang::TSourceLoc", i32, %union.anon }
%union.anon = type { ptr }

@.str.302 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.303 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.304 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.305 = external hidden unnamed_addr constant [17 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7glslang15HlslScanContext13tokenizeClassERNS_9HlslTokenE(ptr noundef nonnull align 8 dereferenceable(76) %0, ptr noundef nonnull align 8 dereferenceable(40) %1) #1 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.glslang::TPpToken", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca [2 x i8], align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8
  br label %12

12:                                               ; preds = %170, %2
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 5
  store ptr %13, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1072, ptr %6) #5
  call void @_ZN7glslang8TPpTokenC2Ev(ptr noundef nonnull align 8 dereferenceable(1065) %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %15 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 2
  %16 = load ptr, ptr %15, align 8, !tbaa !14
  %17 = call noundef i32 @_ZN7glslang10TPpContext8tokenizeERNS_8TPpTokenE(ptr noundef nonnull align 8 dereferenceable(921) %16, ptr noundef nonnull align 8 dereferenceable(1065) %6)
  store i32 %17, ptr %7, align 4, !tbaa !15
  %18 = load i32, ptr %7, align 4, !tbaa !15
  %19 = icmp eq i32 %18, -1
  br i1 %19, label %20, label %21

20:                                               ; preds = %12
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

21:                                               ; preds = %12
  %22 = getelementptr inbounds %"class.glslang::TPpToken", ptr %6, i32 0, i32 4
  %23 = getelementptr inbounds [1025 x i8], ptr %22, i64 0, i64 0
  %24 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 6
  store ptr %23, ptr %24, align 8, !tbaa !16
  %25 = getelementptr inbounds %"class.glslang::TPpToken", ptr %6, i32 0, i32 0
  %26 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %25, i64 24, i1 false), !tbaa.struct !17
  %27 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 3
  %28 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 5
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = getelementptr inbounds %"struct.glslang::HlslToken", ptr %29, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 8 %27, i64 24, i1 false), !tbaa.struct !17
  %31 = load i32, ptr %7, align 4, !tbaa !15
  switch i32 %31, label %126 [
    i32 59, label %32
    i32 44, label %33
    i32 58, label %34
    i32 61, label %35
    i32 40, label %36
    i32 41, label %37
    i32 46, label %38
    i32 33, label %39
    i32 45, label %40
    i32 126, label %41
    i32 43, label %42
    i32 42, label %43
    i32 47, label %44
    i32 37, label %45
    i32 60, label %46
    i32 62, label %47
    i32 124, label %48
    i32 94, label %49
    i32 38, label %50
    i32 63, label %51
    i32 91, label %52
    i32 93, label %53
    i32 123, label %54
    i32 125, label %55
    i32 92, label %56
    i32 129, label %63
    i32 130, label %64
    i32 131, label %65
    i32 132, label %66
    i32 133, label %67
    i32 134, label %68
    i32 135, label %69
    i32 136, label %70
    i32 137, label %71
    i32 138, label %72
    i32 139, label %73
    i32 140, label %74
    i32 141, label %75
    i32 142, label %76
    i32 143, label %77
    i32 144, label %78
    i32 146, label %79
    i32 145, label %80
    i32 147, label %81
    i32 148, label %82
    i32 149, label %83
    i32 150, label %84
    i32 152, label %85
    i32 153, label %91
    i32 160, label %97
    i32 158, label %103
    i32 159, label %109
    i32 162, label %115
    i32 161, label %118
    i32 -1, label %125
  ]

32:                                               ; preds = %21
  store i32 285, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

33:                                               ; preds = %21
  store i32 282, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

34:                                               ; preds = %21
  store i32 283, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

35:                                               ; preds = %21
  store i32 264, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

36:                                               ; preds = %21
  store i32 275, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

37:                                               ; preds = %21
  store i32 276, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

38:                                               ; preds = %21
  store i32 281, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

39:                                               ; preds = %21
  store i32 286, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

40:                                               ; preds = %21
  store i32 287, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

41:                                               ; preds = %21
  store i32 288, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

42:                                               ; preds = %21
  store i32 289, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

43:                                               ; preds = %21
  store i32 290, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

44:                                               ; preds = %21
  store i32 291, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

45:                                               ; preds = %21
  store i32 292, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

46:                                               ; preds = %21
  store i32 293, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

47:                                               ; preds = %21
  store i32 294, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

48:                                               ; preds = %21
  store i32 295, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

49:                                               ; preds = %21
  store i32 296, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

50:                                               ; preds = %21
  store i32 297, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

51:                                               ; preds = %21
  store i32 298, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

52:                                               ; preds = %21
  store i32 277, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

53:                                               ; preds = %21
  store i32 278, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

54:                                               ; preds = %21
  store i32 279, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

55:                                               ; preds = %21
  store i32 280, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

56:                                               ; preds = %21
  %57 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  %59 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 3
  %60 = load ptr, ptr %58, align 8, !tbaa !19
  %61 = getelementptr inbounds ptr, ptr %60, i64 42
  %62 = load ptr, ptr %61, align 8
  call void (ptr, ptr, ptr, ptr, ptr, ...) %62(ptr noundef nonnull align 8 dereferenceable(1176) %58, ptr noundef nonnull align 8 dereferenceable(24) %59, ptr noundef @.str.302, ptr noundef @.str.303, ptr noundef @.str.304)
  br label %166

63:                                               ; preds = %21
  store i32 267, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

64:                                               ; preds = %21
  store i32 274, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

65:                                               ; preds = %21
  store i32 265, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

66:                                               ; preds = %21
  store i32 266, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

67:                                               ; preds = %21
  store i32 268, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

68:                                               ; preds = %21
  store i32 254, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

69:                                               ; preds = %21
  store i32 253, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

70:                                               ; preds = %21
  store i32 270, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

71:                                               ; preds = %21
  store i32 269, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

72:                                               ; preds = %21
  store i32 271, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

73:                                               ; preds = %21
  store i32 273, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

74:                                               ; preds = %21
  store i32 272, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

75:                                               ; preds = %21
  store i32 261, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

76:                                               ; preds = %21
  store i32 262, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

77:                                               ; preds = %21
  store i32 263, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

78:                                               ; preds = %21
  store i32 259, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

79:                                               ; preds = %21
  store i32 258, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

80:                                               ; preds = %21
  store i32 260, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

81:                                               ; preds = %21
  store i32 257, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

82:                                               ; preds = %21
  store i32 256, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

83:                                               ; preds = %21
  store i32 255, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

84:                                               ; preds = %21
  store i32 284, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

85:                                               ; preds = %21
  %86 = getelementptr inbounds %"class.glslang::TPpToken", ptr %6, i32 0, i32 3
  %87 = load i32, ptr %86, align 8, !tbaa !21
  %88 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 5
  %89 = load ptr, ptr %88, align 8, !tbaa !9
  %90 = getelementptr inbounds %"struct.glslang::HlslToken", ptr %89, i32 0, i32 2
  store i32 %87, ptr %90, align 8, !tbaa !21
  store i32 237, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

91:                                               ; preds = %21
  %92 = getelementptr inbounds %"class.glslang::TPpToken", ptr %6, i32 0, i32 3
  %93 = load i32, ptr %92, align 8, !tbaa !21
  %94 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 5
  %95 = load ptr, ptr %94, align 8, !tbaa !9
  %96 = getelementptr inbounds %"struct.glslang::HlslToken", ptr %95, i32 0, i32 2
  store i32 %93, ptr %96, align 8, !tbaa !21
  store i32 238, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

97:                                               ; preds = %21
  %98 = getelementptr inbounds %"class.glslang::TPpToken", ptr %6, i32 0, i32 3
  %99 = load double, ptr %98, align 8, !tbaa !21
  %100 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 5
  %101 = load ptr, ptr %100, align 8, !tbaa !9
  %102 = getelementptr inbounds %"struct.glslang::HlslToken", ptr %101, i32 0, i32 2
  store double %99, ptr %102, align 8, !tbaa !21
  store i32 234, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

103:                                              ; preds = %21
  %104 = getelementptr inbounds %"class.glslang::TPpToken", ptr %6, i32 0, i32 3
  %105 = load double, ptr %104, align 8, !tbaa !21
  %106 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 5
  %107 = load ptr, ptr %106, align 8, !tbaa !9
  %108 = getelementptr inbounds %"struct.glslang::HlslToken", ptr %107, i32 0, i32 2
  store double %105, ptr %108, align 8, !tbaa !21
  store i32 235, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

109:                                              ; preds = %21
  %110 = getelementptr inbounds %"class.glslang::TPpToken", ptr %6, i32 0, i32 3
  %111 = load double, ptr %110, align 8, !tbaa !21
  %112 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 5
  %113 = load ptr, ptr %112, align 8, !tbaa !9
  %114 = getelementptr inbounds %"struct.glslang::HlslToken", ptr %113, i32 0, i32 2
  store double %111, ptr %114, align 8, !tbaa !21
  store i32 236, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

115:                                              ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %116 = call noundef i32 @_ZN7glslang15HlslScanContext18tokenizeIdentifierEv(ptr noundef nonnull align 8 dereferenceable(76) %11)
  store i32 %116, ptr %9, align 4, !tbaa !22
  %117 = load i32, ptr %9, align 4, !tbaa !22
  store i32 %117, ptr %3, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %167

118:                                              ; preds = %21
  %119 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 6
  %120 = load ptr, ptr %119, align 8, !tbaa !16
  %121 = call noundef ptr @_ZN7glslang14NewPoolTStringB5cxx11EPKc(ptr noundef %120)
  %122 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 5
  %123 = load ptr, ptr %122, align 8, !tbaa !9
  %124 = getelementptr inbounds %"struct.glslang::HlslToken", ptr %123, i32 0, i32 2
  store ptr %121, ptr %124, align 8, !tbaa !21
  store i32 240, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

125:                                              ; preds = %21
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %167

126:                                              ; preds = %21
  %127 = load i32, ptr %7, align 4, !tbaa !15
  %128 = icmp slt i32 %127, 127
  br i1 %128, label %129, label %141

129:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 2, ptr %10) #5
  %130 = load i32, ptr %7, align 4, !tbaa !15
  %131 = trunc i32 %130 to i8
  %132 = getelementptr inbounds [2 x i8], ptr %10, i64 0, i64 0
  store i8 %131, ptr %132, align 1, !tbaa !21
  %133 = getelementptr inbounds [2 x i8], ptr %10, i64 0, i64 1
  store i8 0, ptr %133, align 1, !tbaa !21
  %134 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 1
  %135 = load ptr, ptr %134, align 8, !tbaa !18
  %136 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 3
  %137 = getelementptr inbounds [2 x i8], ptr %10, i64 0, i64 0
  %138 = load ptr, ptr %135, align 8, !tbaa !19
  %139 = getelementptr inbounds ptr, ptr %138, i64 42
  %140 = load ptr, ptr %139, align 8
  call void (ptr, ptr, ptr, ptr, ptr, ...) %140(ptr noundef nonnull align 8 dereferenceable(1176) %135, ptr noundef nonnull align 8 dereferenceable(24) %136, ptr noundef @.str.305, ptr noundef %137, ptr noundef @.str.304)
  call void @llvm.lifetime.end.p0(i64 2, ptr %10) #5
  br label %165

141:                                              ; preds = %126
  %142 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 6
  %143 = load ptr, ptr %142, align 8, !tbaa !16
  %144 = getelementptr inbounds i8, ptr %143, i64 0
  %145 = load i8, ptr %144, align 1, !tbaa !21
  %146 = sext i8 %145 to i32
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %148, label %157

148:                                              ; preds = %141
  %149 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 1
  %150 = load ptr, ptr %149, align 8, !tbaa !18
  %151 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 3
  %152 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 6
  %153 = load ptr, ptr %152, align 8, !tbaa !16
  %154 = load ptr, ptr %150, align 8, !tbaa !19
  %155 = getelementptr inbounds ptr, ptr %154, i64 42
  %156 = load ptr, ptr %155, align 8
  call void (ptr, ptr, ptr, ptr, ptr, ...) %156(ptr noundef nonnull align 8 dereferenceable(1176) %150, ptr noundef nonnull align 8 dereferenceable(24) %151, ptr noundef @.str.305, ptr noundef %153, ptr noundef @.str.304)
  br label %164

157:                                              ; preds = %141
  %158 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 1
  %159 = load ptr, ptr %158, align 8, !tbaa !18
  %160 = getelementptr inbounds %"class.glslang::HlslScanContext", ptr %11, i32 0, i32 3
  %161 = load ptr, ptr %159, align 8, !tbaa !19
  %162 = getelementptr inbounds ptr, ptr %161, i64 42
  %163 = load ptr, ptr %162, align 8
  call void (ptr, ptr, ptr, ptr, ptr, ...) %163(ptr noundef nonnull align 8 dereferenceable(1176) %159, ptr noundef nonnull align 8 dereferenceable(24) %160, ptr noundef @.str.305, ptr noundef @.str.304, ptr noundef @.str.304)
  br label %164

164:                                              ; preds = %157, %148
  br label %165

165:                                              ; preds = %164, %129
  br label %166

166:                                              ; preds = %165, %56
  store i32 0, ptr %8, align 4
  br label %167

167:                                              ; preds = %166, %125, %118, %115, %109, %103, %97, %91, %85, %84, %83, %82, %81, %80, %79, %78, %77, %76, %75, %74, %73, %72, %71, %70, %69, %68, %67, %66, %65, %64, %63, %55, %54, %53, %52, %51, %50, %49, %48, %47, %46, %45, %44, %43, %42, %41, %40, %39, %38, %37, %36, %35, %34, %33, %32, %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1072, ptr %6) #5
  %168 = load i32, ptr %8, align 4
  switch i32 %168, label %174 [
    i32 0, label %169
    i32 1, label %172
  ]

169:                                              ; preds = %167
  br label %170

170:                                              ; preds = %169
  br i1 true, label %12, label %171, !llvm.loop !23

171:                                              ; preds = %170
  unreachable

172:                                              ; preds = %167
  %173 = load i32, ptr %3, align 4
  ret i32 %173

174:                                              ; preds = %167
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7glslang8TPpTokenC2Ev(ptr noundef nonnull align 8 dereferenceable(1065)) unnamed_addr #1 align 2

declare noundef i32 @_ZN7glslang10TPpContext8tokenizeERNS_8TPpTokenE(ptr noundef nonnull align 8 dereferenceable(921), ptr noundef nonnull align 8 dereferenceable(1065)) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7glslang15HlslScanContext18tokenizeIdentifierEv(ptr noundef nonnull align 8 dereferenceable(76)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN7glslang14NewPoolTStringB5cxx11EPKc(ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress 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 #5 = { 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++ TBAA"}
!9 = !{!10, !6, i64 56}
!10 = !{!"_ZTSN7glslang15HlslScanContextE", !6, i64 8, !6, i64 16, !11, i64 24, !6, i64 48, !6, i64 56, !6, i64 64, !13, i64 72}
!11 = !{!"_ZTSN7glslang10TSourceLocE", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSN7glslang15EHlslTokenClassE", !7, i64 0}
!14 = !{!10, !6, i64 16}
!15 = !{!12, !12, i64 0}
!16 = !{!10, !6, i64 64}
!17 = !{i64 0, i64 8, !5, i64 8, i64 4, !15, i64 12, i64 4, !15, i64 16, i64 4, !15}
!18 = !{!10, !6, i64 8}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !8, i64 0}
!21 = !{!7, !7, i64 0}
!22 = !{!13, !13, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.glslang::TPpToken" = type <{ %"struct.glslang::TSourceLoc", i8, [7 x i8], %union.anon.34, [1025 x i8], [7 x i8] }>
%"struct.glslang::TSourceLoc" = type { ptr, i32, i32, i32 }
%union.anon.34 = type { double }

@.str.302 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.303 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.304 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.305 = external hidden unnamed_addr constant [17 x i8], align 1

; 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: mustprogress uwtable
define dso_local noundef i32 @_ZN7glslang15HlslScanContext13tokenizeClassERNS_9HlslTokenE(ptr noundef nonnull align 8 dereferenceable(76) %0, ptr noundef nonnull align 8 dereferenceable(40) %1) local_unnamed_addr #1 align 2 {
  %3 = alloca %"class.glslang::TPpToken", align 8
  %4 = alloca [2 x i8], align 1
  %5 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1072, ptr nonnull %3) #6
  call void @_ZN7glslang8TPpTokenC2Ev(ptr noundef nonnull align 8 dereferenceable(1065) %3)
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = load ptr, ptr %6, align 8, !tbaa !13
  %8 = call noundef i32 @_ZN7glslang10TPpContext8tokenizeERNS_8TPpTokenE(ptr noundef nonnull align 8 dereferenceable(921) %7, ptr noundef nonnull align 8 dereferenceable(1065) %3)
  %9 = icmp eq i32 %8, -1
  br i1 %9, label %116, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %10 = getelementptr inbounds i8, ptr %3, i64 40
  %11 = getelementptr inbounds i8, ptr %0, i64 64
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = getelementptr inbounds i8, ptr %4, i64 1
  br label %15

15:                                               ; preds = %.lr.ph, %112
  %16 = phi i32 [ %8, %.lr.ph ], [ %114, %112 ]
  store ptr %10, ptr %11, align 8, !tbaa !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %3, i64 24, i1 false), !tbaa.struct !15
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %3, i64 24, i1 false)
  switch i32 %16, label %95 [
    i32 59, label %.loopexit
    i32 44, label %.loopexit120
    i32 58, label %.loopexit121
    i32 61, label %.loopexit122
    i32 40, label %.loopexit123
    i32 41, label %116
    i32 46, label %18
    i32 33, label %19
    i32 45, label %20
    i32 126, label %21
    i32 43, label %22
    i32 42, label %23
    i32 47, label %24
    i32 37, label %25
    i32 60, label %26
    i32 62, label %27
    i32 124, label %28
    i32 94, label %29
    i32 38, label %30
    i32 63, label %31
    i32 91, label %32
    i32 93, label %33
    i32 123, label %34
    i32 125, label %35
    i32 92, label %36
    i32 129, label %41
    i32 130, label %42
    i32 131, label %43
    i32 132, label %44
    i32 133, label %45
    i32 134, label %46
    i32 135, label %47
    i32 136, label %48
    i32 137, label %49
    i32 138, label %50
    i32 139, label %51
    i32 140, label %52
    i32 141, label %53
    i32 142, label %54
    i32 143, label %55
    i32 144, label %56
    i32 146, label %57
    i32 145, label %58
    i32 147, label %59
    i32 148, label %60
    i32 149, label %61
    i32 150, label %62
    i32 152, label %63
    i32 153, label %68
    i32 160, label %73
    i32 158, label %78
    i32 159, label %83
    i32 162, label %88
    i32 161, label %90
  ]

18:                                               ; preds = %15
  br label %116

19:                                               ; preds = %15
  br label %116

20:                                               ; preds = %15
  br label %116

21:                                               ; preds = %15
  br label %116

22:                                               ; preds = %15
  br label %116

23:                                               ; preds = %15
  br label %116

24:                                               ; preds = %15
  br label %116

25:                                               ; preds = %15
  br label %116

26:                                               ; preds = %15
  br label %116

27:                                               ; preds = %15
  br label %116

28:                                               ; preds = %15
  br label %116

29:                                               ; preds = %15
  br label %116

30:                                               ; preds = %15
  br label %116

31:                                               ; preds = %15
  br label %116

32:                                               ; preds = %15
  br label %116

33:                                               ; preds = %15
  br label %116

34:                                               ; preds = %15
  br label %116

35:                                               ; preds = %15
  br label %116

36:                                               ; preds = %15
  %37 = load ptr, ptr %13, align 8, !tbaa !18
  %38 = load ptr, ptr %37, align 8, !tbaa !19
  %39 = getelementptr inbounds i8, ptr %38, i64 336
  %40 = load ptr, ptr %39, align 8
  call void (ptr, ptr, ptr, ptr, ptr, ...) %40(ptr noundef nonnull align 8 dereferenceable(1176) %37, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull @.str.302, ptr noundef nonnull @.str.303, ptr noundef nonnull @.str.304)
  br label %112

41:                                               ; preds = %15
  br label %116

42:                                               ; preds = %15
  br label %116

43:                                               ; preds = %15
  br label %116

44:                                               ; preds = %15
  br label %116

45:                                               ; preds = %15
  br label %116

46:                                               ; preds = %15
  br label %116

47:                                               ; preds = %15
  br label %116

48:                                               ; preds = %15
  br label %116

49:                                               ; preds = %15
  br label %116

50:                                               ; preds = %15
  br label %116

51:                                               ; preds = %15
  br label %116

52:                                               ; preds = %15
  br label %116

53:                                               ; preds = %15
  br label %116

54:                                               ; preds = %15
  br label %116

55:                                               ; preds = %15
  br label %116

56:                                               ; preds = %15
  br label %116

57:                                               ; preds = %15
  br label %116

58:                                               ; preds = %15
  br label %116

59:                                               ; preds = %15
  br label %116

60:                                               ; preds = %15
  br label %116

61:                                               ; preds = %15
  br label %116

62:                                               ; preds = %15
  br label %116

63:                                               ; preds = %15
  %64 = getelementptr inbounds i8, ptr %3, i64 32
  %65 = load i32, ptr %64, align 8, !tbaa !21
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds i8, ptr %66, i64 32
  store i32 %65, ptr %67, align 8, !tbaa !21
  br label %116

68:                                               ; preds = %15
  %69 = getelementptr inbounds i8, ptr %3, i64 32
  %70 = load i32, ptr %69, align 8, !tbaa !21
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds i8, ptr %71, i64 32
  store i32 %70, ptr %72, align 8, !tbaa !21
  br label %116

73:                                               ; preds = %15
  %74 = getelementptr inbounds i8, ptr %3, i64 32
  %75 = load double, ptr %74, align 8, !tbaa !21
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i64 32
  store double %75, ptr %77, align 8, !tbaa !21
  br label %116

78:                                               ; preds = %15
  %79 = getelementptr inbounds i8, ptr %3, i64 32
  %80 = load double, ptr %79, align 8, !tbaa !21
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %81, i64 32
  store double %80, ptr %82, align 8, !tbaa !21
  br label %116

83:                                               ; preds = %15
  %84 = getelementptr inbounds i8, ptr %3, i64 32
  %85 = load double, ptr %84, align 8, !tbaa !21
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds i8, ptr %86, i64 32
  store double %85, ptr %87, align 8, !tbaa !21
  br label %116

88:                                               ; preds = %15
  %89 = call noundef i32 @_ZN7glslang15HlslScanContext18tokenizeIdentifierEv(ptr noundef nonnull align 8 dereferenceable(76) %0)
  br label %116

90:                                               ; preds = %15
  %91 = load ptr, ptr %11, align 8, !tbaa !14
  %92 = call noundef ptr @_ZN7glslang14NewPoolTStringB5cxx11EPKc(ptr noundef %91)
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds i8, ptr %93, i64 32
  store ptr %92, ptr %94, align 8, !tbaa !21
  br label %116

95:                                               ; preds = %15
  %96 = icmp slt i32 %16, 127
  br i1 %96, label %97, label %103

97:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %4) #6
  %98 = trunc i32 %16 to i8
  store i8 %98, ptr %4, align 1, !tbaa !21
  store i8 0, ptr %14, align 1, !tbaa !21
  %99 = load ptr, ptr %13, align 8, !tbaa !18
  %100 = load ptr, ptr %99, align 8, !tbaa !19
  %101 = getelementptr inbounds i8, ptr %100, i64 336
  %102 = load ptr, ptr %101, align 8
  call void (ptr, ptr, ptr, ptr, ptr, ...) %102(ptr noundef nonnull align 8 dereferenceable(1176) %99, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull @.str.305, ptr noundef nonnull %4, ptr noundef nonnull @.str.304)
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %4) #6
  br label %112

103:                                              ; preds = %95
  %104 = load ptr, ptr %11, align 8, !tbaa !14
  %105 = load i8, ptr %104, align 1, !tbaa !21
  %.not = icmp eq i8 %105, 0
  %106 = load ptr, ptr %13, align 8, !tbaa !18
  %107 = load ptr, ptr %106, align 8, !tbaa !19
  %108 = getelementptr inbounds i8, ptr %107, i64 336
  %109 = load ptr, ptr %108, align 8
  br i1 %.not, label %111, label %110

110:                                              ; preds = %103
  call void (ptr, ptr, ptr, ptr, ptr, ...) %109(ptr noundef nonnull align 8 dereferenceable(1176) %106, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull @.str.305, ptr noundef nonnull %104, ptr noundef nonnull @.str.304)
  br label %112

111:                                              ; preds = %103
  call void (ptr, ptr, ptr, ptr, ptr, ...) %109(ptr noundef nonnull align 8 dereferenceable(1176) %106, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull @.str.305, ptr noundef nonnull @.str.304, ptr noundef nonnull @.str.304)
  br label %112

112:                                              ; preds = %36, %110, %111, %97
  call void @llvm.lifetime.end.p0(i64 1072, ptr nonnull %3) #6
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1072, ptr nonnull %3) #6
  call void @_ZN7glslang8TPpTokenC2Ev(ptr noundef nonnull align 8 dereferenceable(1065) %3)
  %113 = load ptr, ptr %6, align 8, !tbaa !13
  %114 = call noundef i32 @_ZN7glslang10TPpContext8tokenizeERNS_8TPpTokenE(ptr noundef nonnull align 8 dereferenceable(921) %113, ptr noundef nonnull align 8 dereferenceable(1065) %3)
  %115 = icmp eq i32 %114, -1
  br i1 %115, label %116, label %15

.loopexit:                                        ; preds = %15
  br label %116

.loopexit120:                                     ; preds = %15
  br label %116

.loopexit121:                                     ; preds = %15
  br label %116

.loopexit122:                                     ; preds = %15
  br label %116

.loopexit123:                                     ; preds = %15
  br label %116

116:                                              ; preds = %112, %15, %.loopexit123, %.loopexit122, %.loopexit121, %.loopexit120, %2, %.loopexit, %90, %88, %83, %78, %73, %68, %63, %62, %61, %60, %59, %58, %57, %56, %55, %54, %53, %52, %51, %50, %49, %48, %47, %46, %45, %44, %43, %42, %41, %35, %34, %33, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18
  %.1.ph = phi i32 [ 281, %18 ], [ 286, %19 ], [ 287, %20 ], [ 288, %21 ], [ 289, %22 ], [ 290, %23 ], [ 291, %24 ], [ 292, %25 ], [ 293, %26 ], [ 294, %27 ], [ 295, %28 ], [ 296, %29 ], [ 297, %30 ], [ 298, %31 ], [ 277, %32 ], [ 278, %33 ], [ 279, %34 ], [ 280, %35 ], [ 267, %41 ], [ 274, %42 ], [ 265, %43 ], [ 266, %44 ], [ 268, %45 ], [ 254, %46 ], [ 253, %47 ], [ 270, %48 ], [ 269, %49 ], [ 271, %50 ], [ 273, %51 ], [ 272, %52 ], [ 261, %53 ], [ 262, %54 ], [ 263, %55 ], [ 259, %56 ], [ 258, %57 ], [ 260, %58 ], [ 257, %59 ], [ 256, %60 ], [ 255, %61 ], [ 284, %62 ], [ 237, %63 ], [ 238, %68 ], [ 234, %73 ], [ 235, %78 ], [ 236, %83 ], [ %89, %88 ], [ 240, %90 ], [ 0, %2 ], [ 285, %.loopexit ], [ 282, %.loopexit120 ], [ 283, %.loopexit121 ], [ 264, %.loopexit122 ], [ 276, %15 ], [ 0, %112 ], [ 275, %.loopexit123 ]
  call void @llvm.lifetime.end.p0(i64 1072, ptr nonnull %3) #6
  ret i32 %.1.ph
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7glslang8TPpTokenC2Ev(ptr noundef nonnull align 8 dereferenceable(1065)) unnamed_addr #1 align 2

declare noundef i32 @_ZN7glslang10TPpContext8tokenizeERNS_8TPpTokenE(ptr noundef nonnull align 8 dereferenceable(921), ptr noundef nonnull align 8 dereferenceable(1065)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7glslang15HlslScanContext18tokenizeIdentifierEv(ptr noundef nonnull align 8 dereferenceable(76)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN7glslang14NewPoolTStringB5cxx11EPKc(ptr noundef) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 56}
!6 = !{!"_ZTSN7glslang15HlslScanContextE", !7, i64 8, !7, i64 16, !10, i64 24, !7, i64 48, !7, i64 56, !7, i64 64, !12, i64 72}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN7glslang10TSourceLocE", !7, i64 0, !11, i64 8, !11, i64 12, !11, i64 16}
!11 = !{!"int", !8, i64 0}
!12 = !{!"_ZTSN7glslang15EHlslTokenClassE", !8, i64 0}
!13 = !{!6, !7, i64 16}
!14 = !{!6, !7, i64 64}
!15 = !{i64 0, i64 8, !16, i64 8, i64 4, !17, i64 12, i64 4, !17, i64 16, i64 4, !17}
!16 = !{!7, !7, i64 0}
!17 = !{!11, !11, i64 0}
!18 = !{!6, !7, i64 8}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !9, i64 0}
!21 = !{!8, !8, i64 0}


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