; LLVM IR from lionsoul2014/friso :: src (tst-friso)

; 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.friso_config_struct = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i32, i32, ptr, ptr, [13 x i8] }
%struct.friso_entry = type { ptr, i32 }
%struct.friso_task_entry = type { ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, [7 x i8] }
%struct.friso_token_entry = type { i8, i8, i8, i8, i32, [64 x i8] }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [9 x i8], align 1
@stdin = external global ptr, align 8
@.str.21 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca [20480 x i8], align 16
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 20480, ptr %8) #7
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 0, i64 20480, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store ptr null, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store ptr null, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %35, %2
  %16 = load i32, ptr %9, align 4, !tbaa !5
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %19, label %38

19:                                               ; preds = %15
  %20 = load ptr, ptr %5, align 8, !tbaa !9
  %21 = load i32, ptr %9, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds ptr, ptr %20, i64 %22
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = call i32 @strcasecmp(ptr noundef @.str, ptr noundef %24) #8
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %34

27:                                               ; preds = %19
  %28 = load ptr, ptr %5, align 8, !tbaa !9
  %29 = load i32, ptr %9, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds ptr, ptr %28, i64 %31
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  store ptr %33, ptr %10, align 8, !tbaa !9
  br label %34

34:                                               ; preds = %27, %19
  br label %35

35:                                               ; preds = %34
  %36 = load i32, ptr %9, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %9, align 4, !tbaa !5
  br label %15, !llvm.loop !11

38:                                               ; preds = %15
  %39 = load ptr, ptr %10, align 8, !tbaa !9
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %43

41:                                               ; preds = %38
  %42 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.2)
  call void @exit(i32 noundef 0) #9
  unreachable

43:                                               ; preds = %38
  %44 = call i64 @clock() #7
  store i64 %44, ptr %6, align 8, !tbaa !13
  %45 = call ptr @friso_new()
  store ptr %45, ptr %12, align 8, !tbaa !9
  %46 = call ptr @friso_new_config()
  store ptr %46, ptr %13, align 8, !tbaa !9
  %47 = load ptr, ptr %12, align 8, !tbaa !9
  %48 = load ptr, ptr %13, align 8, !tbaa !9
  %49 = load ptr, ptr %10, align 8, !tbaa !9
  %50 = call i32 @friso_init_from_ifile(ptr noundef %47, ptr noundef %48, ptr noundef %49)
  %51 = icmp ne i32 %50, 1
  br i1 %51, label %52, label %54

52:                                               ; preds = %43
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %128

54:                                               ; preds = %43
  %55 = load ptr, ptr %13, align 8, !tbaa !9
  %56 = getelementptr inbounds %struct.friso_config_struct, ptr %55, i32 0, i32 11
  %57 = load i32, ptr %56, align 8, !tbaa !15
  switch i32 %57, label %61 [
    i32 1, label %58
    i32 2, label %59
    i32 3, label %60
  ]

58:                                               ; preds = %54
  store ptr @.str.4, ptr %11, align 8, !tbaa !9
  br label %61

59:                                               ; preds = %54
  store ptr @.str.5, ptr %11, align 8, !tbaa !9
  br label %61

60:                                               ; preds = %54
  store ptr @.str.6, ptr %11, align 8, !tbaa !9
  br label %61

61:                                               ; preds = %60, %59, %58, %54
  %62 = call i64 @clock() #7
  store i64 %62, ptr %7, align 8, !tbaa !13
  %63 = load i64, ptr %7, align 8, !tbaa !13
  %64 = load i64, ptr %6, align 8, !tbaa !13
  %65 = sub nsw i64 %63, %64
  %66 = sitofp i64 %65 to double
  %67 = fdiv double %66, 1.000000e+06
  %68 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, double noundef %67)
  %69 = load ptr, ptr %11, align 8, !tbaa !9
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef %69)
  %71 = load ptr, ptr %12, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.friso_entry, ptr %71, i32 0, i32 1
  %73 = load i32, ptr %72, align 8, !tbaa !18
  %74 = icmp eq i32 %73, 0
  %75 = zext i1 %74 to i64
  %76 = select i1 %74, ptr @.str.11, ptr @.str.12
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef @.str.10, ptr noundef %76)
  %78 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.13)
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.14)
  %80 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.15)
  %81 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.16)
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.17)
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.18)
  %84 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.13)
  %85 = call ptr @friso_new_task()
  store ptr %85, ptr %14, align 8, !tbaa !9
  br label %86

86:                                               ; preds = %118, %61
  br label %87

87:                                               ; preds = %86
  %88 = call i32 (ptr, ...) @printf(ptr noundef @.str.19, ptr noundef @.str.20)
  %89 = load ptr, ptr @stdin, align 8, !tbaa !9
  %90 = getelementptr inbounds [20480 x i8], ptr %8, i64 0, i64 0
  %91 = call ptr @getLine(ptr noundef %89, ptr noundef %90)
  %92 = getelementptr inbounds [20480 x i8], ptr %8, i64 0, i64 0
  %93 = call i32 @strcasecmp(ptr noundef %92, ptr noundef @.str.21) #8
  %94 = icmp eq i32 %93, 0
  br i1 %94, label %95, label %97

95:                                               ; preds = %87
  %96 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.22)
  br label %126

97:                                               ; preds = %87
  %98 = load ptr, ptr %14, align 8, !tbaa !9
  %99 = getelementptr inbounds [20480 x i8], ptr %8, i64 0, i64 0
  call void @friso_set_text(ptr noundef %98, ptr noundef %99)
  %100 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.23)
  %101 = call i64 @clock() #7
  store i64 %101, ptr %6, align 8, !tbaa !13
  br label %102

102:                                              ; preds = %111, %97
  %103 = load ptr, ptr %13, align 8, !tbaa !9
  %104 = getelementptr inbounds %struct.friso_config_struct, ptr %103, i32 0, i32 12
  %105 = load ptr, ptr %104, align 8, !tbaa !20
  %106 = load ptr, ptr %12, align 8, !tbaa !9
  %107 = load ptr, ptr %13, align 8, !tbaa !9
  %108 = load ptr, ptr %14, align 8, !tbaa !9
  %109 = call ptr %105(ptr noundef %106, ptr noundef %107, ptr noundef %108)
  %110 = icmp ne ptr %109, null
  br i1 %110, label %111, label %118

111:                                              ; preds = %102
  %112 = load ptr, ptr %14, align 8, !tbaa !9
  %113 = getelementptr inbounds %struct.friso_task_entry, ptr %112, i32 0, i32 8
  %114 = load ptr, ptr %113, align 8, !tbaa !21
  %115 = getelementptr inbounds %struct.friso_token_entry, ptr %114, i32 0, i32 5
  %116 = getelementptr inbounds [64 x i8], ptr %115, i64 0, i64 0
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.24, ptr noundef %116)
  br label %102, !llvm.loop !23

118:                                              ; preds = %102
  %119 = call i64 @clock() #7
  store i64 %119, ptr %7, align 8, !tbaa !13
  %120 = load i64, ptr %7, align 8, !tbaa !13
  %121 = load i64, ptr %6, align 8, !tbaa !13
  %122 = sub nsw i64 %120, %121
  %123 = sitofp i64 %122 to double
  %124 = fdiv double %123, 1.000000e+06
  %125 = call i32 (ptr, ...) @printf(ptr noundef @.str.25, double noundef %124)
  br label %86

126:                                              ; preds = %95
  %127 = load ptr, ptr %14, align 8, !tbaa !9
  call void @friso_free_task(ptr noundef %127)
  br label %128

128:                                              ; preds = %126, %52
  %129 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free(ptr noundef %129) #7
  %130 = load ptr, ptr %12, align 8, !tbaa !9
  call void @friso_free(ptr noundef %130)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 20480, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  ret i32 0
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

; Function Attrs: nounwind
declare i64 @clock() #6

declare ptr @friso_new() #4

declare ptr @friso_new_config() #4

declare i32 @friso_init_from_ifile(ptr noundef, ptr noundef, ptr noundef) #4

declare ptr @friso_new_task() #4

; Function Attrs: nounwind uwtable
declare hidden ptr @getLine(ptr noundef, ptr noundef) #0

declare void @friso_set_text(ptr noundef, ptr noundef) #4

declare void @friso_free_task(ptr noundef) #4

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

declare void @friso_free(ptr noundef) #4

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #4 = { "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 = { noreturn 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { noreturn 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 = !{!"int", !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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !6, i64 24}
!16 = !{!"friso_config_struct", !17, i64 0, !17, i64 2, !17, i64 4, !17, i64 6, !17, i64 8, !17, i64 10, !17, i64 12, !17, i64 14, !17, i64 16, !17, i64 18, !6, i64 20, !6, i64 24, !10, i64 32, !10, i64 40, !7, i64 48}
!17 = !{!"short", !7, i64 0}
!18 = !{!19, !6, i64 8}
!19 = !{!"", !10, i64 0, !6, i64 8}
!20 = !{!16, !10, i64 32}
!21 = !{!22, !10, i64 48}
!22 = !{!"", !10, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !7, i64 56}
!23 = distinct !{!23, !12}


; 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 [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [9 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.21 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [21 x i8], align 1
@switch.table.main = private unnamed_addr constant [3 x ptr] [ptr @.str.4, ptr @.str.5, ptr @.str.6], align 8

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [20480 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 20480, ptr nonnull %3) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(20480) %3, i8 0, i64 20480, i1 false)
  %4 = icmp sgt i32 %0, 0
  br i1 %4, label %.lr.ph.preheader, label %._crit_edge.thread

.lr.ph.preheader:                                 ; preds = %2
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %12
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %12 ]
  %.02729 = phi ptr [ null, %.lr.ph.preheader ], [ %.1, %12 ]
  %5 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = tail call i32 @strcasecmp(ptr noundef nonnull @.str, ptr noundef %6) #10
  %8 = icmp eq i32 %7, 0
  br i1 %8, label %9, label %12

9:                                                ; preds = %.lr.ph
  %10 = getelementptr inbounds i8, ptr %5, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  br label %12

12:                                               ; preds = %.lr.ph, %9
  %.1 = phi ptr [ %11, %9 ], [ %.02729, %.lr.ph ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %12
  %13 = icmp eq ptr %.1, null
  br i1 %13, label %._crit_edge.thread, label %15

._crit_edge.thread:                               ; preds = %2, %._crit_edge
  %14 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.2)
  tail call void @exit(i32 noundef 0) #11
  unreachable

15:                                               ; preds = %._crit_edge
  %16 = tail call i64 @clock() #9
  %17 = tail call ptr @friso_new() #9
  %18 = tail call ptr @friso_new_config() #9
  %19 = tail call i32 @friso_init_from_ifile(ptr noundef %17, ptr noundef %18, ptr noundef nonnull %.1) #9
  %.not = icmp eq i32 %19, 1
  br i1 %.not, label %22, label %20

20:                                               ; preds = %15
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %75

22:                                               ; preds = %15
  %23 = getelementptr inbounds i8, ptr %18, i64 24
  %24 = load i32, ptr %23, align 8, !tbaa !11
  %switch.tableidx = add i32 %24, -1
  %25 = icmp ult i32 %switch.tableidx, 3
  br i1 %25, label %switch.lookup, label %27

switch.lookup:                                    ; preds = %22
  %26 = zext nneg i32 %switch.tableidx to i64
  %switch.gep = getelementptr inbounds [3 x ptr], ptr @switch.table.main, i64 0, i64 %26
  %switch.load = load ptr, ptr %switch.gep, align 8
  br label %27

27:                                               ; preds = %switch.lookup, %22
  %.026 = phi ptr [ null, %22 ], [ %switch.load, %switch.lookup ]
  %28 = tail call i64 @clock() #9
  %29 = sub nsw i64 %28, %16
  %30 = sitofp i64 %29 to double
  %31 = fdiv double %30, 1.000000e+06
  %32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, double noundef %31)
  %33 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef %.026)
  %34 = getelementptr inbounds i8, ptr %17, i64 8
  %35 = load i32, ptr %34, align 8, !tbaa !15
  %36 = icmp eq i32 %35, 0
  %37 = select i1 %36, ptr @.str.11, ptr @.str.12
  %38 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull @.str.10, ptr noundef nonnull %37)
  %39 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.13)
  %40 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.14)
  %41 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.15)
  %42 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.16)
  %43 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.17)
  %44 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.18)
  %45 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.13)
  %46 = tail call ptr @friso_new_task() #9
  %47 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, ptr noundef nonnull @.str.20)
  %48 = load ptr, ptr @stdin, align 8, !tbaa !5
  %49 = call ptr @getLine(ptr noundef %48, ptr noundef nonnull %3)
  %50 = call i32 @strcasecmp(ptr noundef nonnull %3, ptr noundef nonnull @.str.21) #10
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %._crit_edge37, label %.lr.ph36

.lr.ph36:                                         ; preds = %27
  %52 = getelementptr inbounds i8, ptr %18, i64 32
  %53 = getelementptr inbounds i8, ptr %46, i64 48
  br label %55

._crit_edge37:                                    ; preds = %._crit_edge34, %27
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.22)
  call void @friso_free_task(ptr noundef %46) #9
  br label %75

55:                                               ; preds = %.lr.ph36, %._crit_edge34
  call void @friso_set_text(ptr noundef %46, ptr noundef nonnull %3) #9
  %56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.23)
  %57 = call i64 @clock() #9
  %58 = load ptr, ptr %52, align 8, !tbaa !17
  %59 = call ptr %58(ptr noundef %17, ptr noundef nonnull %18, ptr noundef %46) #9
  %.not2831 = icmp eq ptr %59, null
  br i1 %.not2831, label %._crit_edge34, label %.lr.ph33

.lr.ph33:                                         ; preds = %55, %.lr.ph33
  %60 = load ptr, ptr %53, align 8, !tbaa !18
  %61 = getelementptr inbounds i8, ptr %60, i64 8
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24, ptr noundef nonnull %61)
  %63 = load ptr, ptr %52, align 8, !tbaa !17
  %64 = call ptr %63(ptr noundef %17, ptr noundef nonnull %18, ptr noundef %46) #9
  %.not28 = icmp eq ptr %64, null
  br i1 %.not28, label %._crit_edge34, label %.lr.ph33, !llvm.loop !20

._crit_edge34:                                    ; preds = %.lr.ph33, %55
  %65 = call i64 @clock() #9
  %66 = sub nsw i64 %65, %57
  %67 = sitofp i64 %66 to double
  %68 = fdiv double %67, 1.000000e+06
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25, double noundef %68)
  %70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, ptr noundef nonnull @.str.20)
  %71 = load ptr, ptr @stdin, align 8, !tbaa !5
  %72 = call ptr @getLine(ptr noundef %71, ptr noundef nonnull %3)
  %73 = call i32 @strcasecmp(ptr noundef nonnull %3, ptr noundef nonnull @.str.21) #10
  %74 = icmp eq i32 %73, 0
  br i1 %74, label %._crit_edge37, label %55

75:                                               ; preds = %._crit_edge37, %20
  call void @free(ptr noundef %18) #9
  call void @friso_free(ptr noundef %17) #9
  call void @llvm.lifetime.end.p0(i64 20480, ptr nonnull %3) #9
  ret i32 0
}

; 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @strcasecmp(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 #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare i64 @clock() local_unnamed_addr #6

declare ptr @friso_new() local_unnamed_addr #7

declare ptr @friso_new_config() local_unnamed_addr #7

declare i32 @friso_init_from_ifile(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #7

declare ptr @friso_new_task() local_unnamed_addr #7

; Function Attrs: nounwind uwtable
declare hidden ptr @getLine(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @friso_set_text(ptr noundef, ptr noundef) local_unnamed_addr #7

declare void @friso_free_task(ptr noundef) local_unnamed_addr #7

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

declare void @friso_free(ptr noundef) local_unnamed_addr #7

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

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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nofree 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 #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 = { noreturn 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 #6 = { 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 #7 = { "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 #8 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { noreturn 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !14, i64 24}
!12 = !{!"friso_config_struct", !13, i64 0, !13, i64 2, !13, i64 4, !13, i64 6, !13, i64 8, !13, i64 10, !13, i64 12, !13, i64 14, !13, i64 16, !13, i64 18, !14, i64 20, !14, i64 24, !6, i64 32, !6, i64 40, !7, i64 48}
!13 = !{!"short", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !14, i64 8}
!16 = !{!"", !6, i64 0, !14, i64 8}
!17 = !{!12, !6, i64 32}
!18 = !{!19, !6, i64 48}
!19 = !{!"", !6, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !7, i64 56}
!20 = distinct !{!20, !10}


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