; LLVM IR from HRI-EU/Rcs :: src/RcsCore (Rcs_mesh)

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

@RCS_GLOBAL_RLOG_CB = external global ptr, align 8
@.str = external hidden unnamed_addr constant [67 x i8], align 1
@RcsLogLevel = external global i32, align 4
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@__func__.RcsMesh_toFile = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [59 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 @fprintf(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
define dso_local zeroext i1 @RcsMesh_toFile(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %29

11:                                               ; preds = %2
  br label %12

12:                                               ; preds = %11
  %13 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %14 = icmp ne ptr %13, null
  br i1 %14, label %15, label %17

15:                                               ; preds = %12
  %16 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %16(i32 noundef 1, ptr noundef @.str, ptr noundef @__func__.RcsMesh_toFile, i32 noundef 412, ptr noundef @.str.6)
  br label %17

17:                                               ; preds = %15, %12
  %18 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %19 = icmp sle i32 1, %18
  br i1 %19, label %20, label %27

20:                                               ; preds = %17
  %21 = load ptr, ptr @stderr, align 8, !tbaa !5
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef @.str.2, ptr noundef @.str, ptr noundef @__func__.RcsMesh_toFile, i32 noundef 412) #4
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str.6) #4
  %25 = load ptr, ptr @stderr, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.3) #4
  br label %27

27:                                               ; preds = %20, %17
  br label %28

28:                                               ; preds = %27
  store i1 false, ptr %3, align 1
  br label %132

29:                                               ; preds = %2
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %50

32:                                               ; preds = %29
  br label %33

33:                                               ; preds = %32
  %34 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %38

36:                                               ; preds = %33
  %37 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %37(i32 noundef 1, ptr noundef @.str, ptr noundef @__func__.RcsMesh_toFile, i32 noundef 418, ptr noundef @.str.7)
  br label %38

38:                                               ; preds = %36, %33
  %39 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %40 = icmp sle i32 1, %39
  br i1 %40, label %41, label %48

41:                                               ; preds = %38
  %42 = load ptr, ptr @stderr, align 8, !tbaa !5
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef @.str.2, ptr noundef @.str, ptr noundef @__func__.RcsMesh_toFile, i32 noundef 418) #4
  %44 = load ptr, ptr @stderr, align 8, !tbaa !5
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef @.str.7) #4
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef @.str.3) #4
  br label %48

48:                                               ; preds = %41, %38
  br label %49

49:                                               ; preds = %48
  store i1 false, ptr %3, align 1
  br label %132

50:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = call noalias ptr @fopen(ptr noundef %51, ptr noundef @.str.8)
  store ptr %52, ptr %6, align 8, !tbaa !5
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = icmp eq ptr %53, null
  br i1 %54, label %55, label %76

55:                                               ; preds = %50
  br label %56

56:                                               ; preds = %55
  %57 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %62

59:                                               ; preds = %56
  %60 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %60(i32 noundef 1, ptr noundef @.str, ptr noundef @__func__.RcsMesh_toFile, i32 noundef 426, ptr noundef @.str.9, ptr noundef %61)
  br label %62

62:                                               ; preds = %59, %56
  %63 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %64 = icmp sle i32 1, %63
  br i1 %64, label %65, label %73

65:                                               ; preds = %62
  %66 = load ptr, ptr @stderr, align 8, !tbaa !5
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef @.str.2, ptr noundef @.str, ptr noundef @__func__.RcsMesh_toFile, i32 noundef 426) #4
  %68 = load ptr, ptr @stderr, align 8, !tbaa !5
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef @.str.9, ptr noundef %69) #4
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef @.str.3) #4
  br label %73

73:                                               ; preds = %65, %62
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %131

76:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #4
  store i8 0, ptr %8, align 1, !tbaa !11
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = call zeroext i1 @String_hasEnding(ptr noundef %77, ptr noundef @.str.10, i1 noundef zeroext false)
  br i1 %78, label %79, label %85

79:                                               ; preds = %76
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = call zeroext i1 @RcsMesh_toSTLFile(ptr noundef %80, ptr noundef %81, ptr noundef %82)
  %84 = zext i1 %83 to i8
  store i8 %84, ptr %8, align 1, !tbaa !11
  br label %126

85:                                               ; preds = %76
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = call zeroext i1 @String_hasEnding(ptr noundef %86, ptr noundef @.str.11, i1 noundef zeroext false)
  br i1 %87, label %88, label %94

88:                                               ; preds = %85
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = call zeroext i1 @RcsMesh_toOBJFile(ptr noundef %89, ptr noundef %90, ptr noundef %91)
  %93 = zext i1 %92 to i8
  store i8 %93, ptr %8, align 1, !tbaa !11
  br label %125

94:                                               ; preds = %85
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = call zeroext i1 @String_hasEnding(ptr noundef %95, ptr noundef @.str.12, i1 noundef zeroext false)
  br i1 %96, label %97, label %103

97:                                               ; preds = %94
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = call zeroext i1 @RcsMesh_toTRIFile(ptr noundef %98, ptr noundef %99, ptr noundef %100)
  %102 = zext i1 %101 to i8
  store i8 %102, ptr %8, align 1, !tbaa !11
  br label %124

103:                                              ; preds = %94
  br label %104

104:                                              ; preds = %103
  %105 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %106 = icmp ne ptr %105, null
  br i1 %106, label %107, label %110

107:                                              ; preds = %104
  %108 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %108(i32 noundef 4, ptr noundef @.str, ptr noundef @__func__.RcsMesh_toFile, i32 noundef 447, ptr noundef @.str.13, ptr noundef %109)
  br label %110

110:                                              ; preds = %107, %104
  %111 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %112 = icmp sle i32 4, %111
  br i1 %112, label %113, label %121

113:                                              ; preds = %110
  %114 = load ptr, ptr @stderr, align 8, !tbaa !5
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef @.str.2, ptr noundef @.str, ptr noundef @__func__.RcsMesh_toFile, i32 noundef 447) #4
  %116 = load ptr, ptr @stderr, align 8, !tbaa !5
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %116, ptr noundef @.str.13, ptr noundef %117) #4
  %119 = load ptr, ptr @stderr, align 8, !tbaa !5
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %119, ptr noundef @.str.3) #4
  br label %121

121:                                              ; preds = %113, %110
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122
  br label %124

124:                                              ; preds = %123, %97
  br label %125

125:                                              ; preds = %124, %88
  br label %126

126:                                              ; preds = %125, %79
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = call i32 @fclose(ptr noundef %127)
  %129 = load i8, ptr %8, align 1, !tbaa !11, !range !13, !noundef !14
  %130 = trunc i8 %129 to i1
  store i1 %130, ptr %3, align 1
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #4
  br label %131

131:                                              ; preds = %126, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %132

132:                                              ; preds = %131, %49, %28
  %133 = load i1, ptr %3, align 1
  ret i1 %133
}

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

declare zeroext i1 @String_hasEnding(ptr noundef, ptr noundef, i1 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @RcsMesh_toSTLFile(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @RcsMesh_toOBJFile(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @RcsMesh_toTRIFile(ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @fclose(ptr noundef) #3

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 }

!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 = !{!"_Bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}


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

@RCS_GLOBAL_RLOG_CB = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [67 x i8], align 1
@RcsLogLevel = external local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@__func__.RcsMesh_toFile = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [59 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @RcsMesh_toFile(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = icmp eq ptr %0, null
  br i1 %3, label %4, label %17

4:                                                ; preds = %2
  %5 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not32 = icmp eq ptr %5, null
  br i1 %.not32, label %7, label %6

6:                                                ; preds = %4
  tail call void (i32, ptr, ptr, i32, ptr, ...) %5(i32 noundef 1, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_toFile, i32 noundef 412, ptr noundef nonnull @.str.6) #3
  br label %7

7:                                                ; preds = %6, %4
  %8 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %10, label %75

10:                                               ; preds = %7
  %11 = load ptr, ptr @stderr, align 8, !tbaa !5
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_toFile, i32 noundef 412) #4
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.6) #4
  %15 = load ptr, ptr @stderr, align 8, !tbaa !5
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.3) #4
  br label %75

17:                                               ; preds = %2
  %18 = icmp eq ptr %1, null
  br i1 %18, label %19, label %32

19:                                               ; preds = %17
  %20 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not31 = icmp eq ptr %20, null
  br i1 %.not31, label %22, label %21

21:                                               ; preds = %19
  tail call void (i32, ptr, ptr, i32, ptr, ...) %20(i32 noundef 1, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_toFile, i32 noundef 418, ptr noundef nonnull @.str.7) #3
  br label %22

22:                                               ; preds = %21, %19
  %23 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %25, label %75

25:                                               ; preds = %22
  %26 = load ptr, ptr @stderr, align 8, !tbaa !5
  %27 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_toFile, i32 noundef 418) #4
  %28 = load ptr, ptr @stderr, align 8, !tbaa !5
  %29 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.7) #4
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.3) #4
  br label %75

32:                                               ; preds = %17
  %33 = tail call noalias ptr @fopen(ptr noundef nonnull %1, ptr noundef nonnull @.str.8)
  %34 = icmp eq ptr %33, null
  br i1 %34, label %35, label %48

35:                                               ; preds = %32
  %36 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not30 = icmp eq ptr %36, null
  br i1 %.not30, label %38, label %37

37:                                               ; preds = %35
  tail call void (i32, ptr, ptr, i32, ptr, ...) %36(i32 noundef 1, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_toFile, i32 noundef 426, ptr noundef nonnull @.str.9, ptr noundef nonnull %1) #3
  br label %38

38:                                               ; preds = %37, %35
  %39 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %40 = icmp sgt i32 %39, 0
  br i1 %40, label %41, label %75

41:                                               ; preds = %38
  %42 = load ptr, ptr @stderr, align 8, !tbaa !5
  %43 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_toFile, i32 noundef 426) #4
  %44 = load ptr, ptr @stderr, align 8, !tbaa !5
  %45 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.9, ptr noundef nonnull %1) #4
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.3) #4
  br label %75

48:                                               ; preds = %32
  %49 = tail call zeroext i1 @String_hasEnding(ptr noundef nonnull %1, ptr noundef nonnull @.str.10, i1 noundef zeroext false) #3
  br i1 %49, label %50, label %52

50:                                               ; preds = %48
  %51 = tail call zeroext i1 @RcsMesh_toSTLFile(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %33)
  br label %73

52:                                               ; preds = %48
  %53 = tail call zeroext i1 @String_hasEnding(ptr noundef nonnull %1, ptr noundef nonnull @.str.11, i1 noundef zeroext false) #3
  br i1 %53, label %54, label %56

54:                                               ; preds = %52
  %55 = tail call zeroext i1 @RcsMesh_toOBJFile(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %33)
  br label %73

56:                                               ; preds = %52
  %57 = tail call zeroext i1 @String_hasEnding(ptr noundef nonnull %1, ptr noundef nonnull @.str.12, i1 noundef zeroext false) #3
  br i1 %57, label %58, label %60

58:                                               ; preds = %56
  %59 = tail call zeroext i1 @RcsMesh_toTRIFile(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %33)
  br label %73

60:                                               ; preds = %56
  %61 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not = icmp eq ptr %61, null
  br i1 %.not, label %63, label %62

62:                                               ; preds = %60
  tail call void (i32, ptr, ptr, i32, ptr, ...) %61(i32 noundef 4, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_toFile, i32 noundef 447, ptr noundef nonnull @.str.13, ptr noundef nonnull %1) #3
  br label %63

63:                                               ; preds = %62, %60
  %64 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %65 = icmp sgt i32 %64, 3
  br i1 %65, label %66, label %73

66:                                               ; preds = %63
  %67 = load ptr, ptr @stderr, align 8, !tbaa !5
  %68 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_toFile, i32 noundef 447) #4
  %69 = load ptr, ptr @stderr, align 8, !tbaa !5
  %70 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef nonnull @.str.13, ptr noundef nonnull %1) #4
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.3) #4
  br label %73

73:                                               ; preds = %54, %63, %66, %58, %50
  %.0.shrunk = phi i1 [ %51, %50 ], [ %55, %54 ], [ %59, %58 ], [ false, %66 ], [ false, %63 ]
  %74 = tail call i32 @fclose(ptr noundef nonnull %33)
  br label %75

75:                                               ; preds = %73, %41, %38, %25, %22, %10, %7
  %.1 = phi i1 [ false, %7 ], [ false, %10 ], [ false, %22 ], [ false, %25 ], [ %.0.shrunk, %73 ], [ false, %41 ], [ false, %38 ]
  ret i1 %.1
}

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

declare zeroext i1 @String_hasEnding(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

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

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

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

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

attributes #0 = { 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 #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 }
attributes #4 = { cold 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}


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