; LLVM IR from DroneBridge/DroneBridge :: recorder (recorder)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.video_file_t = type { ptr, [512 x i8] }

@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@stderr = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [45 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @file_exists(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local void @open_new_file(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [64 x i8], align 16
  %6 = alloca [507 x i8], align 16
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [12 x i8], align 1
  %12 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 507, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %13 = getelementptr inbounds [507 x i8], ptr %6, i64 0, i64 0
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = call ptr @strcpy(ptr noundef %13, ptr noundef %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %16 = call i64 @time(ptr noundef null) #5
  store i64 %16, ptr %8, align 8, !tbaa !9
  %17 = call ptr @localtime(ptr noundef %8) #5
  store ptr %17, ptr %7, align 8, !tbaa !5
  %18 = getelementptr inbounds [64 x i8], ptr %5, i64 0, i64 0
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = call i64 @strftime(ptr noundef %18, i64 noundef 64, ptr noundef @.str, ptr noundef %19) #5
  %21 = getelementptr inbounds [507 x i8], ptr %6, i64 0, i64 0
  %22 = getelementptr inbounds [64 x i8], ptr %5, i64 0, i64 0
  %23 = call ptr @strcat(ptr noundef %21, ptr noundef %22) #5
  %24 = getelementptr inbounds [507 x i8], ptr %6, i64 0, i64 0
  %25 = call zeroext i1 @file_exists(ptr noundef %24)
  br i1 %25, label %26, label %50

26:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !11
  br label %27

27:                                               ; preds = %45, %26
  %28 = load i32, ptr %9, align 4, !tbaa !11
  %29 = icmp slt i32 %28, 10
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  store i32 2, ptr %10, align 4
  br label %48

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #5
  %32 = getelementptr inbounds [12 x i8], ptr %11, i64 0, i64 0
  %33 = load i32, ptr %9, align 4, !tbaa !11
  %34 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %32, ptr noundef @.str.1, i32 noundef %33) #5
  %35 = getelementptr inbounds [507 x i8], ptr %6, i64 0, i64 0
  %36 = getelementptr inbounds [12 x i8], ptr %11, i64 0, i64 0
  %37 = call ptr @strcat(ptr noundef %35, ptr noundef %36) #5
  %38 = getelementptr inbounds [507 x i8], ptr %6, i64 0, i64 0
  %39 = call zeroext i1 @file_exists(ptr noundef %38)
  br i1 %39, label %41, label %40

40:                                               ; preds = %31
  store i32 2, ptr %10, align 4
  br label %42

41:                                               ; preds = %31
  store i32 0, ptr %10, align 4
  br label %42

42:                                               ; preds = %41, %40
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #5
  %43 = load i32, ptr %10, align 4
  switch i32 %43, label %48 [
    i32 0, label %44
  ]

44:                                               ; preds = %42
  br label %45

45:                                               ; preds = %44
  %46 = load i32, ptr %9, align 4, !tbaa !11
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %9, align 4, !tbaa !11
  br label %27, !llvm.loop !13

48:                                               ; preds = %42, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %49

49:                                               ; preds = %48
  br label %50

50:                                               ; preds = %49, %2
  %51 = getelementptr inbounds [507 x i8], ptr %6, i64 0, i64 0
  %52 = call ptr @strcat(ptr noundef %51, ptr noundef @.str.2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  br label %53

53:                                               ; preds = %50
  %54 = getelementptr inbounds [507 x i8], ptr %6, i64 0, i64 0
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, ptr noundef %54)
  %56 = getelementptr inbounds [507 x i8], ptr %6, i64 0, i64 0
  call void (i32, ptr, ...) @syslog(i32 noundef 6, ptr noundef @.str.3, ptr noundef %56)
  br label %57

57:                                               ; preds = %53
  br label %58

58:                                               ; preds = %57
  %59 = getelementptr inbounds [507 x i8], ptr %6, i64 0, i64 0
  %60 = call noalias ptr @fopen(ptr noundef %59, ptr noundef @.str.4)
  store ptr %60, ptr %12, align 8, !tbaa !5
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = icmp eq ptr %61, null
  br i1 %62, label %63, label %75

63:                                               ; preds = %58
  br label %64

64:                                               ; preds = %63
  %65 = load ptr, ptr @stderr, align 8, !tbaa !5
  %66 = call ptr @__errno_location() #6
  %67 = load i32, ptr %66, align 4, !tbaa !11
  %68 = call ptr @strerror(i32 noundef %67) #5
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef @.str.5, ptr noundef %68) #5
  %70 = call ptr @__errno_location() #6
  %71 = load i32, ptr %70, align 4, !tbaa !11
  %72 = call ptr @strerror(i32 noundef %71) #5
  call void (i32, ptr, ...) @syslog(i32 noundef 3, ptr noundef @.str.5, ptr noundef %72)
  br label %73

73:                                               ; preds = %64
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74, %58
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.video_file_t, ptr %77, i32 0, i32 0
  store ptr %76, ptr %78, align 8, !tbaa !15
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.video_file_t, ptr %79, i32 0, i32 1
  %81 = getelementptr inbounds [512 x i8], ptr %80, i64 0, i64 0
  %82 = getelementptr inbounds [507 x i8], ptr %6, i64 0, i64 0
  %83 = call ptr @strcpy(ptr noundef %81, ptr noundef %82) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 507, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #5
  ret void
}

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

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #2

; Function Attrs: nounwind
declare ptr @localtime(ptr noundef) #2

; Function Attrs: nounwind
declare i64 @strftime(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare ptr @strcat(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #2

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

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

declare void @syslog(i32 noundef, ptr noundef, ...) #3

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

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

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #2

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #4

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

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !6, i64 0}
!16 = !{!"", !6, i64 0, !7, i64 8}


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

@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [45 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @open_new_file(ptr nocapture noundef readonly %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca [64 x i8], align 16
  %4 = alloca [507 x i8], align 16
  %5 = alloca i64, align 8
  %6 = alloca [12 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 507, ptr nonnull %4) #7
  %7 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %8 = call i64 @time(ptr noundef null) #7
  store i64 %8, ptr %5, align 8, !tbaa !5
  %9 = call ptr @localtime(ptr noundef nonnull %5) #7
  %10 = call i64 @strftime(ptr noundef nonnull %3, i64 noundef 64, ptr noundef nonnull @.str, ptr noundef %9) #7
  %11 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %3) #7
  %12 = call zeroext i1 @file_exists(ptr noundef nonnull %4)
  br i1 %12, label %.preheader.preheader, label %.loopexit

.preheader.preheader:                             ; preds = %2
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %13 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 0) #7
  %14 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %6) #7
  %15 = call zeroext i1 @file_exists(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  br i1 %15, label %.preheader.1, label %.loopexit

.preheader.1:                                     ; preds = %.preheader.preheader
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %16 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 1) #7
  %17 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %6) #7
  %18 = call zeroext i1 @file_exists(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  br i1 %18, label %.preheader.2, label %.loopexit

.preheader.2:                                     ; preds = %.preheader.1
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %19 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 2) #7
  %20 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %6) #7
  %21 = call zeroext i1 @file_exists(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  br i1 %21, label %.preheader.3, label %.loopexit

.preheader.3:                                     ; preds = %.preheader.2
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %22 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 3) #7
  %23 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %6) #7
  %24 = call zeroext i1 @file_exists(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  br i1 %24, label %.preheader.4, label %.loopexit

.preheader.4:                                     ; preds = %.preheader.3
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %25 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 4) #7
  %26 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %6) #7
  %27 = call zeroext i1 @file_exists(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  br i1 %27, label %.preheader.5, label %.loopexit

.preheader.5:                                     ; preds = %.preheader.4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %28 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 5) #7
  %29 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %6) #7
  %30 = call zeroext i1 @file_exists(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  br i1 %30, label %.preheader.6, label %.loopexit

.preheader.6:                                     ; preds = %.preheader.5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %31 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 6) #7
  %32 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %6) #7
  %33 = call zeroext i1 @file_exists(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  br i1 %33, label %.preheader.7, label %.loopexit

.preheader.7:                                     ; preds = %.preheader.6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %34 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 7) #7
  %35 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %6) #7
  %36 = call zeroext i1 @file_exists(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  br i1 %36, label %.preheader.8, label %.loopexit

.preheader.8:                                     ; preds = %.preheader.7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %37 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 8) #7
  %38 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %6) #7
  %39 = call zeroext i1 @file_exists(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  br i1 %39, label %.preheader.9, label %.loopexit

.preheader.9:                                     ; preds = %.preheader.8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %40 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 9) #7
  %41 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %6) #7
  %42 = call zeroext i1 @file_exists(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader.9, %.preheader.preheader, %.preheader.1, %.preheader.2, %.preheader.3, %.preheader.4, %.preheader.5, %.preheader.6, %.preheader.7, %.preheader.8, %2
  %43 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.2) #7
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull %4)
  call void (i32, ptr, ...) @syslog(i32 noundef 6, ptr noundef nonnull @.str.3, ptr noundef nonnull %4) #7
  %45 = call noalias ptr @fopen(ptr noundef nonnull %4, ptr noundef nonnull @.str.4)
  %46 = icmp eq ptr %45, null
  br i1 %46, label %47, label %55

47:                                               ; preds = %.loopexit
  %48 = load ptr, ptr @stderr, align 8, !tbaa !9
  %49 = tail call ptr @__errno_location() #8
  %50 = load i32, ptr %49, align 4, !tbaa !11
  %51 = call ptr @strerror(i32 noundef %50) #7
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.5, ptr noundef %51) #9
  %53 = load i32, ptr %49, align 4, !tbaa !11
  %54 = call ptr @strerror(i32 noundef %53) #7
  call void (i32, ptr, ...) @syslog(i32 noundef 3, ptr noundef nonnull @.str.5, ptr noundef %54) #7
  br label %55

55:                                               ; preds = %47, %.loopexit
  store ptr %45, ptr %1, align 8, !tbaa !13
  %56 = getelementptr inbounds i8, ptr %1, i64 8
  %57 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %56, ptr noundef nonnull dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 507, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #7
  ret void
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare ptr @localtime(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare i64 @strftime(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcat(ptr noalias noundef returned, ptr noalias nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

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

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

declare void @syslog(i32 noundef, ptr noundef, ...) local_unnamed_addr #5

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

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

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #6

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { "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 #6 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(none) }
attributes #9 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"", !10, i64 0, !7, i64 8}


; Effective O3 passes: ADCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass