; LLVM IR from MQCPack/mqcPack :: src (mqc_util)

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

@EndOfString = external dso_local global [8 x i8], align 1
@mqc_Matfile_Guide.int_len = external hidden global i32, align 4
@mqc_Matfile_Guide.char_len = external hidden global i32, align 4
@mqc_Matfile_Guide.SaveDataType = external hidden global [64 x i8], align 16
@mqc_Matfile_Guide.File_Location = external hidden global i32, align 4
@mqc_Matfile_Guide.matfile = external hidden global ptr, align 8
@mqc_Matfile_Guide.LastFileName = external hidden global ptr, align 8
@.str.46 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [6 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: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #1

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @mqc_DupString(ptr noundef, ptr noundef) #2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

declare i32 @fclose(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @mqc_Matfile_Guide(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca [2048 x i32], align 16
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca [2048 x i64], align 16
  %22 = alloca i64, align 8
  %23 = alloca [2048 x i8], align 16
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca i64, align 8
  %35 = alloca i64, align 8
  %36 = alloca i64, align 8
  %37 = alloca i64, align 8
  %38 = alloca i64, align 8
  %39 = alloca i64, align 8
  %40 = alloca [2048 x double], align 16
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i64, align 8
  %44 = alloca i64, align 8
  %45 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 24, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8192, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 16384, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 2048, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #5
  call void @llvm.lifetime.start.p0(i64 16384, ptr %40) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #5
  %46 = load ptr, ptr @mqc_Matfile_Guide.LastFileName, align 8, !tbaa !5
  %47 = icmp eq ptr %46, null
  br i1 %47, label %48, label %51

48:                                               ; preds = %5
  %49 = load ptr, ptr @mqc_Matfile_Guide.LastFileName, align 8, !tbaa !5
  %50 = call ptr @mqc_DupString(ptr noundef @.str.46, ptr noundef %49)
  store ptr %50, ptr @mqc_Matfile_Guide.LastFileName, align 8, !tbaa !5
  br label %51

51:                                               ; preds = %48, %5
  %52 = load ptr, ptr @mqc_Matfile_Guide.LastFileName, align 8, !tbaa !5
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = call i32 @strcmp(ptr noundef %52, ptr noundef %53) #6
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %56, label %59

56:                                               ; preds = %51
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %57, ptr noundef @.str.47, ptr noundef @mqc_Matfile_Guide.SaveDataType, ptr noundef @EndOfString) #5
  br label %194

59:                                               ; preds = %51
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = call noalias ptr @fopen(ptr noundef %60, ptr noundef @.str.48)
  store ptr %61, ptr @mqc_Matfile_Guide.matfile, align 8, !tbaa !5
  %62 = load ptr, ptr @mqc_Matfile_Guide.matfile, align 8, !tbaa !5
  %63 = icmp eq ptr %62, null
  br i1 %63, label %64, label %70

64:                                               ; preds = %59
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = call i32 (ptr, ...) @printf(ptr noundef @.str.49, ptr noundef %65)
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %67, ptr noundef @.str.50, ptr noundef %68, ptr noundef @EndOfString) #5
  store i32 1, ptr %45, align 4
  br label %195

70:                                               ; preds = %59
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = load ptr, ptr @mqc_Matfile_Guide.LastFileName, align 8, !tbaa !5
  %73 = call ptr @mqc_DupString(ptr noundef %71, ptr noundef %72)
  store ptr %73, ptr @mqc_Matfile_Guide.LastFileName, align 8, !tbaa !5
  store i32 4, ptr @mqc_Matfile_Guide.File_Location, align 4, !tbaa !9
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds i32, ptr %74, i64 0
  %76 = load i32, ptr %75, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = mul i64 1, %77
  %79 = trunc i64 %78 to i32
  store i32 %79, ptr @mqc_Matfile_Guide.char_len, align 4, !tbaa !9
  store i32 8, ptr %17, align 4, !tbaa !9
  store i32 1, ptr %19, align 4, !tbaa !9
  %80 = load ptr, ptr @mqc_Matfile_Guide.matfile, align 8, !tbaa !5
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = load i32, ptr %19, align 4, !tbaa !9
  %83 = load i32, ptr @mqc_Matfile_Guide.File_Location, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = add i64 %84, 32
  %86 = load i32, ptr @mqc_Matfile_Guide.char_len, align 4, !tbaa !9
  %87 = mul nsw i32 %86, 3
  %88 = sext i32 %87 to i64
  %89 = add i64 %85, %88
  %90 = load i32, ptr %17, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = add i64 %89, %91
  %93 = trunc i64 %92 to i32
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = getelementptr inbounds [2048 x i64], ptr %21, i64 0, i64 0
  %96 = getelementptr inbounds [2048 x double], ptr %40, i64 0, i64 0
  %97 = getelementptr inbounds [2048 x i8], ptr %23, i64 0, i64 0
  %98 = call i32 @Get_Unformated_Data(ptr noundef %80, ptr noundef %81, i32 noundef %82, ptr noundef @.str.51, i32 noundef %93, ptr noundef %94, ptr noundef @.str.52, i32 noundef 4, ptr noundef %95, ptr noundef %41, ptr noundef %96, ptr noundef %97)
  %99 = icmp eq i32 %98, 1
  br i1 %99, label %100, label %101

100:                                              ; preds = %70
  store i32 1, ptr %45, align 4
  br label %195

101:                                              ; preds = %70
  %102 = load ptr, ptr @mqc_Matfile_Guide.matfile, align 8, !tbaa !5
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = load i32, ptr %19, align 4, !tbaa !9
  %105 = load i32, ptr @mqc_Matfile_Guide.File_Location, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = add i64 %106, 64
  %108 = load i32, ptr @mqc_Matfile_Guide.char_len, align 4, !tbaa !9
  %109 = mul nsw i32 %108, 3
  %110 = sext i32 %109 to i64
  %111 = add i64 %107, %110
  %112 = load i32, ptr %17, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = add i64 %111, %113
  %115 = trunc i64 %114 to i32
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = getelementptr inbounds [2048 x i32], ptr %13, i64 0, i64 0
  %118 = getelementptr inbounds [2048 x double], ptr %40, i64 0, i64 0
  %119 = getelementptr inbounds [2048 x i8], ptr %23, i64 0, i64 0
  %120 = call i32 @Get_Unformated_Data(ptr noundef %102, ptr noundef %103, i32 noundef %104, ptr noundef @.str.53, i32 noundef %115, ptr noundef %116, ptr noundef @.str.52, i32 noundef 8, ptr noundef %43, ptr noundef %117, ptr noundef %118, ptr noundef %119)
  %121 = icmp eq i32 %120, 1
  br i1 %121, label %122, label %123

122:                                              ; preds = %101
  store i32 1, ptr %45, align 4
  br label %195

123:                                              ; preds = %101
  %124 = load ptr, ptr @mqc_Matfile_Guide.matfile, align 8, !tbaa !5
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = load i32, ptr %19, align 4, !tbaa !9
  %127 = load i32, ptr @mqc_Matfile_Guide.File_Location, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = add i64 %128, 36
  %130 = load i32, ptr @mqc_Matfile_Guide.char_len, align 4, !tbaa !9
  %131 = mul nsw i32 %130, 3
  %132 = sext i32 %131 to i64
  %133 = add i64 %129, %132
  %134 = load i32, ptr %17, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = add i64 %133, %135
  %137 = trunc i64 %136 to i32
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = getelementptr inbounds [2048 x i64], ptr %21, i64 0, i64 0
  %140 = getelementptr inbounds [2048 x double], ptr %40, i64 0, i64 0
  %141 = getelementptr inbounds [2048 x i8], ptr %23, i64 0, i64 0
  %142 = call i32 @Get_Unformated_Data(ptr noundef %124, ptr noundef %125, i32 noundef %126, ptr noundef @.str.54, i32 noundef %137, ptr noundef %138, ptr noundef @.str.52, i32 noundef 4, ptr noundef %139, ptr noundef %42, ptr noundef %140, ptr noundef %141)
  %143 = icmp eq i32 %142, 1
  br i1 %143, label %144, label %145

144:                                              ; preds = %123
  store i32 1, ptr %45, align 4
  br label %195

145:                                              ; preds = %123
  %146 = load ptr, ptr @mqc_Matfile_Guide.matfile, align 8, !tbaa !5
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  %148 = load i32, ptr %19, align 4, !tbaa !9
  %149 = load i32, ptr @mqc_Matfile_Guide.File_Location, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = add i64 %150, 72
  %152 = load i32, ptr @mqc_Matfile_Guide.char_len, align 4, !tbaa !9
  %153 = mul nsw i32 %152, 3
  %154 = sext i32 %153 to i64
  %155 = add i64 %151, %154
  %156 = load i32, ptr %17, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = add i64 %155, %157
  %159 = trunc i64 %158 to i32
  %160 = load ptr, ptr %7, align 8, !tbaa !5
  %161 = getelementptr inbounds [2048 x i32], ptr %13, i64 0, i64 0
  %162 = getelementptr inbounds [2048 x double], ptr %40, i64 0, i64 0
  %163 = getelementptr inbounds [2048 x i8], ptr %23, i64 0, i64 0
  %164 = call i32 @Get_Unformated_Data(ptr noundef %146, ptr noundef %147, i32 noundef %148, ptr noundef @.str.55, i32 noundef %159, ptr noundef %160, ptr noundef @.str.52, i32 noundef 8, ptr noundef %44, ptr noundef %161, ptr noundef %162, ptr noundef %163)
  %165 = icmp eq i32 %164, 1
  br i1 %165, label %166, label %167

166:                                              ; preds = %145
  store i32 1, ptr %45, align 4
  br label %195

167:                                              ; preds = %145
  %168 = load i32, ptr %41, align 4, !tbaa !9
  %169 = icmp eq i32 %168, 4
  br i1 %169, label %170, label %177

170:                                              ; preds = %167
  %171 = load i32, ptr %42, align 4, !tbaa !9
  %172 = icmp eq i32 %171, 4
  br i1 %172, label %173, label %177

173:                                              ; preds = %170
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %174, ptr noundef @.str.56, ptr noundef @EndOfString) #5
  %176 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef @mqc_Matfile_Guide.SaveDataType, ptr noundef @.str.56, ptr noundef @EndOfString) #5
  store i32 4, ptr @mqc_Matfile_Guide.int_len, align 4, !tbaa !9
  br label %191

177:                                              ; preds = %170, %167
  %178 = load i64, ptr %43, align 8, !tbaa !11
  %179 = icmp eq i64 %178, 8
  br i1 %179, label %180, label %187

180:                                              ; preds = %177
  %181 = load i64, ptr %44, align 8, !tbaa !11
  %182 = icmp eq i64 %181, 8
  br i1 %182, label %183, label %187

183:                                              ; preds = %180
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %184, ptr noundef @.str.57, ptr noundef @EndOfString) #5
  %186 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef @mqc_Matfile_Guide.SaveDataType, ptr noundef @.str.57, ptr noundef @EndOfString) #5
  store i32 8, ptr @mqc_Matfile_Guide.int_len, align 4, !tbaa !9
  br label %190

187:                                              ; preds = %180, %177
  %188 = load ptr, ptr %7, align 8, !tbaa !5
  %189 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %188, ptr noundef @.str.58, ptr noundef @EndOfString) #5
  store i32 1, ptr %45, align 4
  br label %195

190:                                              ; preds = %183
  br label %191

191:                                              ; preds = %190, %173
  %192 = load ptr, ptr @mqc_Matfile_Guide.matfile, align 8, !tbaa !5
  %193 = call i32 @fclose(ptr noundef %192)
  store i32 %193, ptr %20, align 4, !tbaa !9
  br label %194

194:                                              ; preds = %191, %56
  store i32 0, ptr %45, align 4
  br label %195

195:                                              ; preds = %194, %187, %166, %144, %122, %100, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 16384, ptr %40) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 16384, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8192, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  %196 = load i32, ptr %45, align 4
  switch i32 %196, label %198 [
    i32 0, label %197
    i32 1, label %197
  ]

197:                                              ; preds = %195, %195
  ret void

198:                                              ; preds = %195
  unreachable
}

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}


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

@EndOfString = external dso_local global [8 x i8], align 1
@mqc_Matfile_Guide.int_len = external hidden local_unnamed_addr global i32, align 4
@mqc_Matfile_Guide.char_len = external hidden local_unnamed_addr global i32, align 4
@mqc_Matfile_Guide.SaveDataType = external hidden global [64 x i8], align 16
@mqc_Matfile_Guide.File_Location = external hidden local_unnamed_addr global i32, align 4
@mqc_Matfile_Guide.matfile = external hidden local_unnamed_addr global ptr, align 8
@mqc_Matfile_Guide.LastFileName = external hidden local_unnamed_addr global ptr, align 8
@.str.46 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [6 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: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @mqc_DupString(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @mqc_Matfile_Guide(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readnone %3, ptr nocapture noundef readnone %4) local_unnamed_addr #2 {
  %6 = alloca [2048 x i32], align 16
  %7 = alloca [2048 x i64], align 16
  %8 = alloca [2048 x i8], align 16
  %9 = alloca [2048 x double], align 16
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8192, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 16384, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 16384, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  %14 = load ptr, ptr @mqc_Matfile_Guide.LastFileName, align 8, !tbaa !5
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %18

16:                                               ; preds = %5
  %17 = tail call ptr @mqc_DupString(ptr noundef nonnull @.str.46, ptr noundef null)
  store ptr %17, ptr @mqc_Matfile_Guide.LastFileName, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %16, %5
  %19 = phi ptr [ %17, %16 ], [ %14, %5 ]
  %20 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %19, ptr noundef nonnull dereferenceable(1) %0) #5
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %24

22:                                               ; preds = %18
  %23 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.47, ptr noundef nonnull @mqc_Matfile_Guide.SaveDataType, ptr noundef nonnull @EndOfString) #4
  br label %83

24:                                               ; preds = %18
  %25 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str.48)
  store ptr %25, ptr @mqc_Matfile_Guide.matfile, align 8, !tbaa !5
  %26 = icmp eq ptr %25, null
  br i1 %26, label %27, label %30

27:                                               ; preds = %24
  %28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49, ptr noundef %0)
  %29 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.50, ptr noundef %0, ptr noundef nonnull @EndOfString) #4
  br label %83

30:                                               ; preds = %24
  %31 = load ptr, ptr @mqc_Matfile_Guide.LastFileName, align 8, !tbaa !5
  %32 = tail call ptr @mqc_DupString(ptr noundef %0, ptr noundef %31)
  store ptr %32, ptr @mqc_Matfile_Guide.LastFileName, align 8, !tbaa !5
  store i32 4, ptr @mqc_Matfile_Guide.File_Location, align 4, !tbaa !9
  %33 = load i32, ptr %2, align 4, !tbaa !9
  store i32 %33, ptr @mqc_Matfile_Guide.char_len, align 4, !tbaa !9
  %34 = load ptr, ptr @mqc_Matfile_Guide.matfile, align 8, !tbaa !5
  %35 = mul nsw i32 %33, 3
  %36 = add i32 %35, 44
  %37 = call i32 @Get_Unformated_Data(ptr noundef %34, ptr noundef %0, i32 noundef 1, ptr noundef nonnull @.str.51, i32 noundef %36, ptr noundef %1, ptr noundef nonnull @.str.52, i32 noundef 4, ptr noundef nonnull %7, ptr noundef nonnull %10, ptr noundef nonnull %9, ptr noundef nonnull %8)
  %38 = icmp eq i32 %37, 1
  br i1 %38, label %83, label %39

39:                                               ; preds = %30
  %40 = load ptr, ptr @mqc_Matfile_Guide.matfile, align 8, !tbaa !5
  %41 = load i32, ptr @mqc_Matfile_Guide.File_Location, align 4, !tbaa !9
  %42 = load i32, ptr @mqc_Matfile_Guide.char_len, align 4, !tbaa !9
  %43 = mul nsw i32 %42, 3
  %44 = add i32 %41, 72
  %45 = add i32 %44, %43
  %46 = call i32 @Get_Unformated_Data(ptr noundef %40, ptr noundef %0, i32 noundef 1, ptr noundef nonnull @.str.53, i32 noundef %45, ptr noundef %1, ptr noundef nonnull @.str.52, i32 noundef 8, ptr noundef nonnull %12, ptr noundef nonnull %6, ptr noundef nonnull %9, ptr noundef nonnull %8)
  %47 = icmp eq i32 %46, 1
  br i1 %47, label %83, label %48

48:                                               ; preds = %39
  %49 = load ptr, ptr @mqc_Matfile_Guide.matfile, align 8, !tbaa !5
  %50 = load i32, ptr @mqc_Matfile_Guide.File_Location, align 4, !tbaa !9
  %51 = load i32, ptr @mqc_Matfile_Guide.char_len, align 4, !tbaa !9
  %52 = mul nsw i32 %51, 3
  %53 = add i32 %50, 44
  %54 = add i32 %53, %52
  %55 = call i32 @Get_Unformated_Data(ptr noundef %49, ptr noundef %0, i32 noundef 1, ptr noundef nonnull @.str.54, i32 noundef %54, ptr noundef %1, ptr noundef nonnull @.str.52, i32 noundef 4, ptr noundef nonnull %7, ptr noundef nonnull %11, ptr noundef nonnull %9, ptr noundef nonnull %8)
  %56 = icmp eq i32 %55, 1
  br i1 %56, label %83, label %57

57:                                               ; preds = %48
  %58 = load ptr, ptr @mqc_Matfile_Guide.matfile, align 8, !tbaa !5
  %59 = load i32, ptr @mqc_Matfile_Guide.File_Location, align 4, !tbaa !9
  %60 = load i32, ptr @mqc_Matfile_Guide.char_len, align 4, !tbaa !9
  %61 = mul nsw i32 %60, 3
  %62 = add i32 %59, 80
  %63 = add i32 %62, %61
  %64 = call i32 @Get_Unformated_Data(ptr noundef %58, ptr noundef %0, i32 noundef 1, ptr noundef nonnull @.str.55, i32 noundef %63, ptr noundef %1, ptr noundef nonnull @.str.52, i32 noundef 8, ptr noundef nonnull %13, ptr noundef nonnull %6, ptr noundef nonnull %9, ptr noundef nonnull %8)
  %65 = icmp eq i32 %64, 1
  br i1 %65, label %83, label %66

66:                                               ; preds = %57
  %67 = load i32, ptr %10, align 4, !tbaa !9
  %68 = icmp eq i32 %67, 4
  %69 = load i32, ptr %11, align 4
  %70 = icmp eq i32 %69, 4
  %or.cond = select i1 %68, i1 %70, i1 false
  br i1 %or.cond, label %78, label %71

71:                                               ; preds = %66
  %72 = load i64, ptr %12, align 8, !tbaa !11
  %73 = icmp eq i64 %72, 8
  %74 = load i64, ptr %13, align 8
  %75 = icmp eq i64 %74, 8
  %or.cond3 = select i1 %73, i1 %75, i1 false
  br i1 %or.cond3, label %78, label %76

76:                                               ; preds = %71
  %77 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.58, ptr noundef nonnull @EndOfString) #4
  br label %83

78:                                               ; preds = %71, %66
  %.str.57.sink29 = phi ptr [ @.str.56, %66 ], [ @.str.57, %71 ]
  %storemerge = phi i32 [ 4, %66 ], [ 8, %71 ]
  %79 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) %.str.57.sink29, ptr noundef nonnull @EndOfString) #4
  %80 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) @mqc_Matfile_Guide.SaveDataType, ptr noundef nonnull dereferenceable(1) %.str.57.sink29, ptr noundef nonnull @EndOfString) #4
  store i32 %storemerge, ptr @mqc_Matfile_Guide.int_len, align 4, !tbaa !9
  %81 = load ptr, ptr @mqc_Matfile_Guide.matfile, align 8, !tbaa !5
  %82 = call i32 @fclose(ptr noundef %81)
  br label %83

83:                                               ; preds = %22, %78, %57, %48, %39, %30, %76, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 16384, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 16384, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8192, ptr nonnull %6) #4
  ret void
}

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass