; LLVM IR from rweather/lightweight-crypto :: src/genarm (gift128_arm_cortex_m3)

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

@stderr = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@variant = external hidden global i32, align 4
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [7 x i8], align 1
@is_nibble_based = external hidden global i32, align 4
@.str.12 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [18 x i8], align 1
@preloaded = external hidden global i32, align 4
@.str.24 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [9 x i8], align 1
@is_tweaked = external hidden global i32, align 4
@.str.26 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [8 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  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) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %9 = load i32, ptr %4, align 4, !tbaa !5
  %10 = icmp slt i32 %9, 3
  br i1 %10, label %11, label %17

11:                                               ; preds = %2
  %12 = load ptr, ptr @stderr, align 8, !tbaa !9
  %13 = load ptr, ptr %5, align 8, !tbaa !9
  %14 = getelementptr inbounds ptr, ptr %13, i64 0
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  %16 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef @.str.5, ptr noundef %15) #5
  store i32 1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %113

17:                                               ; preds = %2
  %18 = load ptr, ptr %5, align 8, !tbaa !9
  %19 = getelementptr inbounds ptr, ptr %18, i64 1
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  %21 = call i32 @strcmp(ptr noundef %20, ptr noundef @.str.6) #6
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %24, label %23

23:                                               ; preds = %17
  store i32 0, ptr @variant, align 4, !tbaa !5
  store ptr @.str.7, ptr %6, align 8, !tbaa !9
  br label %33

24:                                               ; preds = %17
  %25 = load ptr, ptr %5, align 8, !tbaa !9
  %26 = getelementptr inbounds ptr, ptr %25, i64 1
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = call i32 @strcmp(ptr noundef %27, ptr noundef @.str.8) #6
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %31, label %30

30:                                               ; preds = %24
  store i32 1, ptr @variant, align 4, !tbaa !5
  store ptr @.str.9, ptr %6, align 8, !tbaa !9
  br label %32

31:                                               ; preds = %24
  store i32 2, ptr @variant, align 4, !tbaa !5
  store ptr @.str.10, ptr %6, align 8, !tbaa !9
  br label %32

32:                                               ; preds = %31, %30
  br label %33

33:                                               ; preds = %32, %23
  %34 = load ptr, ptr %5, align 8, !tbaa !9
  %35 = getelementptr inbounds ptr, ptr %34, i64 2
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  %37 = call i32 @strcmp(ptr noundef %36, ptr noundef @.str.11) #6
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %40, label %39

39:                                               ; preds = %33
  store i32 1, ptr @is_nibble_based, align 4, !tbaa !5
  store ptr @.str.12, ptr %7, align 8, !tbaa !9
  br label %41

40:                                               ; preds = %33
  store i32 0, ptr @is_nibble_based, align 4, !tbaa !5
  store ptr @.str.13, ptr %7, align 8, !tbaa !9
  br label %41

41:                                               ; preds = %40, %39
  %42 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  %43 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %44 = load ptr, ptr %6, align 8, !tbaa !9
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, ptr noundef %44)
  %46 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %47 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %48 = call i32 (ptr, ...) @printf(ptr noundef @.str.19)
  %49 = load ptr, ptr %7, align 8, !tbaa !9
  call void @function_header(ptr noundef %49, ptr noundef @.str.20)
  call void @gen_gift128_init()
  %50 = load ptr, ptr %7, align 8, !tbaa !9
  call void @function_footer(ptr noundef %50, ptr noundef @.str.20)
  %51 = load i32, ptr @variant, align 4, !tbaa !5
  %52 = icmp eq i32 %51, 2
  br i1 %52, label %53, label %54

53:                                               ; preds = %41
  call void @gen_rc(ptr noundef @.str.21)
  br label %54

54:                                               ; preds = %53, %41
  %55 = load ptr, ptr %7, align 8, !tbaa !9
  call void @function_header(ptr noundef %55, ptr noundef @.str.22)
  %56 = load i32, ptr @variant, align 4, !tbaa !5
  %57 = icmp ne i32 %56, 2
  br i1 %57, label %58, label %59

58:                                               ; preds = %54
  call void @gen_gift128_encrypt_fixsliced()
  br label %60

59:                                               ; preds = %54
  call void @gen_gift128_encrypt_tiny()
  br label %60

60:                                               ; preds = %59, %58
  %61 = load ptr, ptr %7, align 8, !tbaa !9
  call void @function_footer(ptr noundef %61, ptr noundef @.str.22)
  %62 = load i32, ptr @is_nibble_based, align 4, !tbaa !5
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %72, label %64

64:                                               ; preds = %60
  %65 = load ptr, ptr %7, align 8, !tbaa !9
  call void @function_header(ptr noundef %65, ptr noundef @.str.23)
  store i32 1, ptr @preloaded, align 4, !tbaa !5
  %66 = load i32, ptr @variant, align 4, !tbaa !5
  %67 = icmp ne i32 %66, 2
  br i1 %67, label %68, label %69

68:                                               ; preds = %64
  call void @gen_gift128_encrypt_fixsliced()
  br label %70

69:                                               ; preds = %64
  call void @gen_gift128_encrypt_tiny()
  br label %70

70:                                               ; preds = %69, %68
  store i32 0, ptr @preloaded, align 4, !tbaa !5
  %71 = load ptr, ptr %7, align 8, !tbaa !9
  call void @function_footer(ptr noundef %71, ptr noundef @.str.23)
  br label %72

72:                                               ; preds = %70, %60
  %73 = load i32, ptr @variant, align 4, !tbaa !5
  %74 = icmp eq i32 %73, 1
  br i1 %74, label %75, label %76

75:                                               ; preds = %72
  call void @gen_rc(ptr noundef @.str.21)
  br label %76

76:                                               ; preds = %75, %72
  %77 = load ptr, ptr %7, align 8, !tbaa !9
  call void @function_header(ptr noundef %77, ptr noundef @.str.24)
  %78 = load i32, ptr @variant, align 4, !tbaa !5
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %80, label %81

80:                                               ; preds = %76
  call void @gen_gift128_decrypt_fixsliced()
  br label %82

81:                                               ; preds = %76
  call void @gen_gift128_decrypt_tiny()
  br label %82

82:                                               ; preds = %81, %80
  %83 = load ptr, ptr %7, align 8, !tbaa !9
  call void @function_footer(ptr noundef %83, ptr noundef @.str.24)
  %84 = load i32, ptr @is_nibble_based, align 4, !tbaa !5
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %109

86:                                               ; preds = %82
  store ptr @.str.25, ptr %7, align 8, !tbaa !9
  store i32 1, ptr @is_tweaked, align 4, !tbaa !5
  %87 = load i32, ptr @variant, align 4, !tbaa !5
  %88 = icmp eq i32 %87, 2
  br i1 %88, label %89, label %90

89:                                               ; preds = %86
  call void @gen_rc(ptr noundef @.str.26)
  br label %90

90:                                               ; preds = %89, %86
  %91 = load ptr, ptr %7, align 8, !tbaa !9
  call void @function_header(ptr noundef %91, ptr noundef @.str.22)
  %92 = load i32, ptr @variant, align 4, !tbaa !5
  %93 = icmp ne i32 %92, 2
  br i1 %93, label %94, label %95

94:                                               ; preds = %90
  call void @gen_gift128_encrypt_fixsliced()
  br label %96

95:                                               ; preds = %90
  call void @gen_gift128_encrypt_tiny()
  br label %96

96:                                               ; preds = %95, %94
  %97 = load ptr, ptr %7, align 8, !tbaa !9
  call void @function_footer(ptr noundef %97, ptr noundef @.str.22)
  %98 = load i32, ptr @variant, align 4, !tbaa !5
  %99 = icmp eq i32 %98, 1
  br i1 %99, label %100, label %101

100:                                              ; preds = %96
  call void @gen_rc(ptr noundef @.str.26)
  br label %101

101:                                              ; preds = %100, %96
  %102 = load ptr, ptr %7, align 8, !tbaa !9
  call void @function_header(ptr noundef %102, ptr noundef @.str.24)
  %103 = load i32, ptr @variant, align 4, !tbaa !5
  %104 = icmp eq i32 %103, 0
  br i1 %104, label %105, label %106

105:                                              ; preds = %101
  call void @gen_gift128_decrypt_fixsliced()
  br label %107

106:                                              ; preds = %101
  call void @gen_gift128_decrypt_tiny()
  br label %107

107:                                              ; preds = %106, %105
  %108 = load ptr, ptr %7, align 8, !tbaa !9
  call void @function_footer(ptr noundef %108, ptr noundef @.str.24)
  store i32 0, ptr @is_tweaked, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %107, %82
  %110 = call i32 (ptr, ...) @printf(ptr noundef @.str.27)
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.28)
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.28)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %113

113:                                              ; preds = %109, %11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %114 = load i32, ptr %3, align 4
  ret i32 %114
}

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

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

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

; Function Attrs: nounwind uwtable
declare hidden void @function_header(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @gen_gift128_init() #1

; Function Attrs: nounwind uwtable
declare hidden void @function_footer(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @gen_rc(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @gen_gift128_encrypt_fixsliced() #1

; Function Attrs: nounwind uwtable
declare hidden void @gen_gift128_encrypt_tiny() #1

; Function Attrs: nounwind uwtable
declare hidden void @gen_gift128_decrypt_fixsliced() #1

; Function Attrs: nounwind uwtable
declare hidden void @gen_gift128_decrypt_tiny() #1

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

attributes #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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"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}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@variant = external hidden local_unnamed_addr global i32, align 4
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [7 x i8], align 1
@is_nibble_based = external hidden local_unnamed_addr global i32, align 4
@.str.12 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [18 x i8], align 1
@preloaded = external hidden local_unnamed_addr global i32, align 4
@.str.24 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [9 x i8], align 1
@is_tweaked = external hidden local_unnamed_addr global i32, align 4
@.str.26 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [8 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #1 {
  %3 = icmp slt i32 %0, 3
  br i1 %3, label %4, label %8

4:                                                ; preds = %2
  %5 = load ptr, ptr @stderr, align 8, !tbaa !5
  %6 = load ptr, ptr %1, align 8, !tbaa !5
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %5, ptr noundef nonnull @.str.5, ptr noundef %6) #3
  br label %71

8:                                                ; preds = %2
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %10, ptr noundef nonnull dereferenceable(1) @.str.6) #4
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %14, label %12

12:                                               ; preds = %8
  %13 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %10, ptr noundef nonnull dereferenceable(1) @.str.8) #4
  %.not20 = icmp eq i32 %13, 0
  %.27 = select i1 %.not20, i32 1, i32 2
  %.str.9..str.10 = select i1 %.not20, ptr @.str.9, ptr @.str.10
  br label %14

14:                                               ; preds = %12, %8
  %.sink = phi i32 [ 0, %8 ], [ %.27, %12 ]
  %.018 = phi ptr [ @.str.7, %8 ], [ %.str.9..str.10, %12 ]
  store i32 %.sink, ptr @variant, align 4, !tbaa !9
  %15 = getelementptr inbounds i8, ptr %1, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %16, ptr noundef nonnull dereferenceable(1) @.str.11) #4
  %.not21 = icmp eq i32 %17, 0
  %. = zext i1 %.not21 to i32
  %.str.12..str.13 = select i1 %.not21, ptr @.str.12, ptr @.str.13
  store i32 %., ptr @is_nibble_based, align 4, !tbaa !9
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, ptr noundef nonnull %.018)
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  %23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19)
  tail call void @function_header(ptr noundef nonnull %.str.12..str.13, ptr noundef nonnull @.str.20)
  tail call void @gen_gift128_init()
  tail call void @function_footer(ptr noundef nonnull %.str.12..str.13, ptr noundef nonnull @.str.20)
  %24 = load i32, ptr @variant, align 4, !tbaa !9
  %25 = icmp eq i32 %24, 2
  br i1 %25, label %26, label %27

26:                                               ; preds = %14
  tail call void @gen_rc(ptr noundef nonnull @.str.21)
  br label %27

27:                                               ; preds = %26, %14
  tail call void @function_header(ptr noundef nonnull %.str.12..str.13, ptr noundef nonnull @.str.22)
  %28 = load i32, ptr @variant, align 4, !tbaa !9
  %.not22 = icmp eq i32 %28, 2
  br i1 %.not22, label %30, label %29

29:                                               ; preds = %27
  tail call void @gen_gift128_encrypt_fixsliced()
  br label %31

30:                                               ; preds = %27
  tail call void @gen_gift128_encrypt_tiny()
  br label %31

31:                                               ; preds = %30, %29
  tail call void @function_footer(ptr noundef nonnull %.str.12..str.13, ptr noundef nonnull @.str.22)
  %32 = load i32, ptr @is_nibble_based, align 4, !tbaa !9
  %.not23 = icmp eq i32 %32, 0
  br i1 %.not23, label %33, label %38

33:                                               ; preds = %31
  tail call void @function_header(ptr noundef nonnull %.str.12..str.13, ptr noundef nonnull @.str.23)
  store i32 1, ptr @preloaded, align 4, !tbaa !9
  %34 = load i32, ptr @variant, align 4, !tbaa !9
  %.not24 = icmp eq i32 %34, 2
  br i1 %.not24, label %36, label %35

35:                                               ; preds = %33
  tail call void @gen_gift128_encrypt_fixsliced()
  br label %37

36:                                               ; preds = %33
  tail call void @gen_gift128_encrypt_tiny()
  br label %37

37:                                               ; preds = %36, %35
  store i32 0, ptr @preloaded, align 4, !tbaa !9
  tail call void @function_footer(ptr noundef nonnull %.str.12..str.13, ptr noundef nonnull @.str.23)
  br label %38

38:                                               ; preds = %37, %31
  %39 = load i32, ptr @variant, align 4, !tbaa !9
  %40 = icmp eq i32 %39, 1
  br i1 %40, label %41, label %42

41:                                               ; preds = %38
  tail call void @gen_rc(ptr noundef nonnull @.str.21)
  br label %42

42:                                               ; preds = %41, %38
  tail call void @function_header(ptr noundef nonnull %.str.12..str.13, ptr noundef nonnull @.str.24)
  %43 = load i32, ptr @variant, align 4, !tbaa !9
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %42
  tail call void @gen_gift128_decrypt_fixsliced()
  br label %47

46:                                               ; preds = %42
  tail call void @gen_gift128_decrypt_tiny()
  br label %47

47:                                               ; preds = %46, %45
  tail call void @function_footer(ptr noundef nonnull %.str.12..str.13, ptr noundef nonnull @.str.24)
  %48 = load i32, ptr @is_nibble_based, align 4, !tbaa !9
  %.not25 = icmp eq i32 %48, 0
  br i1 %.not25, label %67, label %49

49:                                               ; preds = %47
  store i32 1, ptr @is_tweaked, align 4, !tbaa !9
  %50 = load i32, ptr @variant, align 4, !tbaa !9
  %51 = icmp eq i32 %50, 2
  br i1 %51, label %52, label %53

52:                                               ; preds = %49
  tail call void @gen_rc(ptr noundef nonnull @.str.26)
  br label %53

53:                                               ; preds = %52, %49
  tail call void @function_header(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.22)
  %54 = load i32, ptr @variant, align 4, !tbaa !9
  %.not26 = icmp eq i32 %54, 2
  br i1 %.not26, label %56, label %55

55:                                               ; preds = %53
  tail call void @gen_gift128_encrypt_fixsliced()
  br label %57

56:                                               ; preds = %53
  tail call void @gen_gift128_encrypt_tiny()
  br label %57

57:                                               ; preds = %56, %55
  tail call void @function_footer(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.22)
  %58 = load i32, ptr @variant, align 4, !tbaa !9
  %59 = icmp eq i32 %58, 1
  br i1 %59, label %60, label %61

60:                                               ; preds = %57
  tail call void @gen_rc(ptr noundef nonnull @.str.26)
  br label %61

61:                                               ; preds = %60, %57
  tail call void @function_header(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.24)
  %62 = load i32, ptr @variant, align 4, !tbaa !9
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %61
  tail call void @gen_gift128_decrypt_fixsliced()
  br label %66

65:                                               ; preds = %61
  tail call void @gen_gift128_decrypt_tiny()
  br label %66

66:                                               ; preds = %65, %64
  tail call void @function_footer(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.24)
  store i32 0, ptr @is_tweaked, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %66, %47
  %68 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.27)
  %69 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.28)
  %70 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.28)
  br label %71

71:                                               ; preds = %67, %4
  %.019 = phi i32 [ 1, %4 ], [ 0, %67 ]
  ret i32 %.019
}

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

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

; Function Attrs: nounwind uwtable
declare hidden void @function_header(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @gen_gift128_init() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @function_footer(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @gen_rc(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @gen_gift128_encrypt_fixsliced() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @gen_gift128_encrypt_tiny() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @gen_gift128_decrypt_fixsliced() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @gen_gift128_decrypt_tiny() local_unnamed_addr #1

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 = { 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 #3 = { cold nounwind }
attributes #4 = { 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}


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