; LLVM IR from libtcod/libtcod :: src/libtcod (noise_c)

; 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.TCOD_Noise = type { i32, [256 x i8], [256 x [4 x float]], float, float, [128 x float], ptr, ptr, i32 }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @TCOD_noise_new(i32 noundef %0, float noundef %1, float noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i8, align 1
  %17 = alloca float, align 4
  %18 = alloca i32, align 4
  store i32 %0, ptr %6, align 4, !tbaa !5
  store float %1, ptr %7, align 4, !tbaa !9
  store float %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %19 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 4904) #5
  store ptr %19, ptr %10, align 8, !tbaa !11
  %20 = load ptr, ptr %10, align 8, !tbaa !11
  %21 = icmp ne ptr %20, null
  br i1 %21, label %24, label %22

22:                                               ; preds = %4
  %23 = call i32 (ptr, ...) @TCOD_set_errorf(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 113, ptr noundef @.str.2)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %149

24:                                               ; preds = %4
  %25 = load ptr, ptr %9, align 8, !tbaa !11
  %26 = icmp ne ptr %25, null
  br i1 %26, label %27, label %29

27:                                               ; preds = %24
  %28 = load ptr, ptr %9, align 8, !tbaa !11
  br label %31

29:                                               ; preds = %24
  %30 = call ptr @TCOD_random_get_instance()
  br label %31

31:                                               ; preds = %29, %27
  %32 = phi ptr [ %28, %27 ], [ %30, %29 ]
  %33 = load ptr, ptr %10, align 8, !tbaa !11
  %34 = getelementptr inbounds %struct.TCOD_Noise, ptr %33, i32 0, i32 7
  store ptr %32, ptr %34, align 8, !tbaa !13
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = load ptr, ptr %10, align 8, !tbaa !11
  %37 = getelementptr inbounds %struct.TCOD_Noise, ptr %36, i32 0, i32 0
  store i32 %35, ptr %37, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %81, %31
  %39 = load i32, ptr %12, align 4, !tbaa !5
  %40 = icmp slt i32 %39, 256
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %84

42:                                               ; preds = %38
  %43 = load i32, ptr %12, align 4, !tbaa !5
  %44 = trunc i32 %43 to i8
  %45 = load ptr, ptr %10, align 8, !tbaa !11
  %46 = getelementptr inbounds %struct.TCOD_Noise, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %12, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [256 x i8], ptr %46, i64 0, i64 %48
  store i8 %44, ptr %49, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %70, %42
  %51 = load i32, ptr %13, align 4, !tbaa !5
  %52 = load ptr, ptr %10, align 8, !tbaa !11
  %53 = getelementptr inbounds %struct.TCOD_Noise, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !15
  %55 = icmp slt i32 %51, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %50
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %73

57:                                               ; preds = %50
  %58 = load ptr, ptr %10, align 8, !tbaa !11
  %59 = getelementptr inbounds %struct.TCOD_Noise, ptr %58, i32 0, i32 7
  %60 = load ptr, ptr %59, align 8, !tbaa !13
  %61 = call float @TCOD_random_get_float(ptr noundef %60, float noundef -5.000000e-01, float noundef 5.000000e-01)
  %62 = load ptr, ptr %10, align 8, !tbaa !11
  %63 = getelementptr inbounds %struct.TCOD_Noise, ptr %62, i32 0, i32 2
  %64 = load i32, ptr %12, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [256 x [4 x float]], ptr %63, i64 0, i64 %65
  %67 = load i32, ptr %13, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [4 x float], ptr %66, i64 0, i64 %68
  store float %61, ptr %69, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %57
  %71 = load i32, ptr %13, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %13, align 4, !tbaa !5
  br label %50, !llvm.loop !17

73:                                               ; preds = %56
  %74 = load ptr, ptr %10, align 8, !tbaa !11
  %75 = load ptr, ptr %10, align 8, !tbaa !11
  %76 = getelementptr inbounds %struct.TCOD_Noise, ptr %75, i32 0, i32 2
  %77 = load i32, ptr %12, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [256 x [4 x float]], ptr %76, i64 0, i64 %78
  %80 = getelementptr inbounds [4 x float], ptr %79, i64 0, i64 0
  call void @normalize(ptr noundef %74, ptr noundef %80)
  br label %81

81:                                               ; preds = %73
  %82 = load i32, ptr %12, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %12, align 4, !tbaa !5
  br label %38, !llvm.loop !19

84:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 255, ptr %14, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %117, %84
  %86 = load i32, ptr %14, align 4, !tbaa !5
  %87 = icmp sge i32 %86, 0
  br i1 %87, label %89, label %88

88:                                               ; preds = %85
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %120

89:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %90 = load ptr, ptr %10, align 8, !tbaa !11
  %91 = getelementptr inbounds %struct.TCOD_Noise, ptr %90, i32 0, i32 7
  %92 = load ptr, ptr %91, align 8, !tbaa !13
  %93 = call i32 @TCOD_random_get_int(ptr noundef %92, i32 noundef 0, i32 noundef 255)
  store i32 %93, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #4
  %94 = load ptr, ptr %10, align 8, !tbaa !11
  %95 = getelementptr inbounds %struct.TCOD_Noise, ptr %94, i32 0, i32 1
  %96 = load i32, ptr %14, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [256 x i8], ptr %95, i64 0, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !16
  store i8 %99, ptr %16, align 1, !tbaa !16
  %100 = load ptr, ptr %10, align 8, !tbaa !11
  %101 = getelementptr inbounds %struct.TCOD_Noise, ptr %100, i32 0, i32 1
  %102 = load i32, ptr %15, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [256 x i8], ptr %101, i64 0, i64 %103
  %105 = load i8, ptr %104, align 1, !tbaa !16
  %106 = load ptr, ptr %10, align 8, !tbaa !11
  %107 = getelementptr inbounds %struct.TCOD_Noise, ptr %106, i32 0, i32 1
  %108 = load i32, ptr %14, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [256 x i8], ptr %107, i64 0, i64 %109
  store i8 %105, ptr %110, align 1, !tbaa !16
  %111 = load i8, ptr %16, align 1, !tbaa !16
  %112 = load ptr, ptr %10, align 8, !tbaa !11
  %113 = getelementptr inbounds %struct.TCOD_Noise, ptr %112, i32 0, i32 1
  %114 = load i32, ptr %15, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [256 x i8], ptr %113, i64 0, i64 %115
  store i8 %111, ptr %116, align 1, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %117

117:                                              ; preds = %89
  %118 = load i32, ptr %14, align 4, !tbaa !5
  %119 = add nsw i32 %118, -1
  store i32 %119, ptr %14, align 4, !tbaa !5
  br label %85, !llvm.loop !20

120:                                              ; preds = %88
  %121 = load float, ptr %7, align 4, !tbaa !9
  %122 = load ptr, ptr %10, align 8, !tbaa !11
  %123 = getelementptr inbounds %struct.TCOD_Noise, ptr %122, i32 0, i32 3
  store float %121, ptr %123, align 4, !tbaa !21
  %124 = load float, ptr %8, align 4, !tbaa !9
  %125 = load ptr, ptr %10, align 8, !tbaa !11
  %126 = getelementptr inbounds %struct.TCOD_Noise, ptr %125, i32 0, i32 4
  store float %124, ptr %126, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store float 1.000000e+00, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %142, %120
  %128 = load i32, ptr %18, align 4, !tbaa !5
  %129 = icmp slt i32 %128, 128
  br i1 %129, label %131, label %130

130:                                              ; preds = %127
  store i32 11, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %145

131:                                              ; preds = %127
  %132 = load float, ptr %17, align 4, !tbaa !9
  %133 = fdiv float 1.000000e+00, %132
  %134 = load ptr, ptr %10, align 8, !tbaa !11
  %135 = getelementptr inbounds %struct.TCOD_Noise, ptr %134, i32 0, i32 5
  %136 = load i32, ptr %18, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [128 x float], ptr %135, i64 0, i64 %137
  store float %133, ptr %138, align 4, !tbaa !9
  %139 = load float, ptr %8, align 4, !tbaa !9
  %140 = load float, ptr %17, align 4, !tbaa !9
  %141 = fmul float %140, %139
  store float %141, ptr %17, align 4, !tbaa !9
  br label %142

142:                                              ; preds = %131
  %143 = load i32, ptr %18, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %18, align 4, !tbaa !5
  br label %127, !llvm.loop !23

145:                                              ; preds = %130
  %146 = load ptr, ptr %10, align 8, !tbaa !11
  %147 = getelementptr inbounds %struct.TCOD_Noise, ptr %146, i32 0, i32 8
  store i32 0, ptr %147, align 8, !tbaa !24
  %148 = load ptr, ptr %10, align 8, !tbaa !11
  store ptr %148, ptr %5, align 8
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %149

149:                                              ; preds = %145, %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %150 = load ptr, ptr %5, align 8
  ret ptr %150
}

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #2

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

declare ptr @TCOD_random_get_instance() #3

declare float @TCOD_random_get_float(ptr noundef, float noundef, float noundef) #3

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

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

declare i32 @TCOD_random_get_int(ptr noundef, i32 noundef, i32 noundef) #3

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 allocsize(0,1) "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 }
attributes #5 = { nounwind allocsize(0,1) }

!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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !12, i64 4888}
!14 = !{!"TCOD_Noise", !6, i64 0, !7, i64 4, !7, i64 260, !10, i64 4356, !10, i64 4360, !7, i64 4364, !12, i64 4880, !12, i64 4888, !6, i64 4896}
!15 = !{!14, !6, i64 0}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}
!21 = !{!14, !10, i64 4356}
!22 = !{!14, !10, i64 4360}
!23 = distinct !{!23, !18}
!24 = !{!14, !6, i64 4896}


; 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 [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @TCOD_noise_new(i32 noundef %0, float noundef %1, float noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = tail call noalias dereferenceable_or_null(4904) ptr @calloc(i64 noundef 1, i64 noundef 4904) #3
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %6, label %8

6:                                                ; preds = %4
  %7 = tail call i32 (ptr, ...) @TCOD_set_errorf(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 113, ptr noundef nonnull @.str.2) #4
  br label %54

8:                                                ; preds = %4
  %.not53 = icmp eq ptr %3, null
  br i1 %.not53, label %9, label %11

9:                                                ; preds = %8
  %10 = tail call ptr @TCOD_random_get_instance() #4
  br label %11

11:                                               ; preds = %8, %9
  %12 = phi ptr [ %10, %9 ], [ %3, %8 ]
  %13 = getelementptr inbounds i8, ptr %5, i64 4888
  store ptr %12, ptr %13, align 8, !tbaa !5
  store i32 %0, ptr %5, align 8, !tbaa !12
  %14 = getelementptr inbounds i8, ptr %5, i64 4
  %15 = getelementptr inbounds i8, ptr %5, i64 260
  br label %16

thread-pre-split:                                 ; preds = %._crit_edge
  %.pr = load i32, ptr %5, align 8, !tbaa !12
  br label %16

16:                                               ; preds = %thread-pre-split, %11
  %17 = phi i32 [ %.pr, %thread-pre-split ], [ %0, %11 ]
  %indvars.iv60 = phi i64 [ %indvars.iv.next61, %thread-pre-split ], [ 0, %11 ]
  %18 = trunc i64 %indvars.iv60 to i8
  %19 = getelementptr inbounds [256 x i8], ptr %14, i64 0, i64 %indvars.iv60
  store i8 %18, ptr %19, align 1, !tbaa !13
  %20 = icmp sgt i32 %17, 0
  br i1 %20, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %16
  %21 = getelementptr inbounds [256 x [4 x float]], ptr %15, i64 0, i64 %indvars.iv60
  tail call void @normalize(ptr noundef nonnull %5, ptr noundef nonnull %21)
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next61, 256
  br i1 %exitcond.not, label %.preheader, label %thread-pre-split, !llvm.loop !14

.lr.ph:                                           ; preds = %16, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %16 ]
  %22 = load ptr, ptr %13, align 8, !tbaa !5
  %23 = tail call float @TCOD_random_get_float(ptr noundef %22, float noundef -5.000000e-01, float noundef 5.000000e-01) #4
  %24 = getelementptr inbounds [256 x [4 x float]], ptr %15, i64 0, i64 %indvars.iv60, i64 %indvars.iv
  store float %23, ptr %24, align 4, !tbaa !16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = load i32, ptr %5, align 8, !tbaa !12
  %26 = sext i32 %25 to i64
  %27 = icmp slt i64 %indvars.iv.next, %26
  br i1 %27, label %.lr.ph, label %._crit_edge, !llvm.loop !17

28:                                               ; preds = %.preheader
  %29 = getelementptr inbounds i8, ptr %5, i64 4356
  store float %1, ptr %29, align 4, !tbaa !18
  %30 = getelementptr inbounds i8, ptr %5, i64 4360
  store float %2, ptr %30, align 8, !tbaa !19
  %31 = getelementptr inbounds i8, ptr %5, i64 4364
  br label %41

.preheader:                                       ; preds = %._crit_edge, %.preheader
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %.preheader ], [ 255, %._crit_edge ]
  %32 = load ptr, ptr %13, align 8, !tbaa !5
  %33 = tail call i32 @TCOD_random_get_int(ptr noundef %32, i32 noundef 0, i32 noundef 255) #4
  %34 = getelementptr inbounds [256 x i8], ptr %14, i64 0, i64 %indvars.iv63
  %35 = load i8, ptr %34, align 1, !tbaa !13
  %36 = sext i32 %33 to i64
  %37 = getelementptr inbounds [256 x i8], ptr %14, i64 0, i64 %36
  %38 = load i8, ptr %37, align 1, !tbaa !13
  store i8 %38, ptr %34, align 1, !tbaa !13
  store i8 %35, ptr %37, align 1, !tbaa !13
  %indvars.iv.next64 = add nsw i64 %indvars.iv63, -1
  %.not70 = icmp eq i64 %indvars.iv63, 0
  br i1 %.not70, label %28, label %.preheader, !llvm.loop !20

39:                                               ; preds = %41
  %40 = getelementptr inbounds i8, ptr %5, i64 4896
  store i32 0, ptr %40, align 8, !tbaa !21
  br label %54

41:                                               ; preds = %41, %28
  %indvars.iv66 = phi i64 [ 0, %28 ], [ %indvars.iv.next67.3, %41 ]
  %.04657 = phi float [ 1.000000e+00, %28 ], [ %53, %41 ]
  %42 = fdiv float 1.000000e+00, %.04657
  %43 = getelementptr inbounds [128 x float], ptr %31, i64 0, i64 %indvars.iv66
  store float %42, ptr %43, align 4, !tbaa !16
  %44 = fmul float %.04657, %2
  %indvars.iv.next67 = or disjoint i64 %indvars.iv66, 1
  %45 = fdiv float 1.000000e+00, %44
  %46 = getelementptr inbounds [128 x float], ptr %31, i64 0, i64 %indvars.iv.next67
  store float %45, ptr %46, align 4, !tbaa !16
  %47 = fmul float %44, %2
  %indvars.iv.next67.1 = or disjoint i64 %indvars.iv66, 2
  %48 = fdiv float 1.000000e+00, %47
  %49 = getelementptr inbounds [128 x float], ptr %31, i64 0, i64 %indvars.iv.next67.1
  store float %48, ptr %49, align 4, !tbaa !16
  %50 = fmul float %47, %2
  %indvars.iv.next67.2 = or disjoint i64 %indvars.iv66, 3
  %51 = fdiv float 1.000000e+00, %50
  %52 = getelementptr inbounds [128 x float], ptr %31, i64 0, i64 %indvars.iv.next67.2
  store float %51, ptr %52, align 4, !tbaa !16
  %53 = fmul float %50, %2
  %indvars.iv.next67.3 = add nuw nsw i64 %indvars.iv66, 4
  %exitcond69.not.3 = icmp eq i64 %indvars.iv.next67.3, 128
  br i1 %exitcond69.not.3, label %39, label %41, !llvm.loop !22

54:                                               ; preds = %39, %6
  ret ptr %5
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #1

declare i32 @TCOD_set_errorf(ptr noundef, ...) local_unnamed_addr #2

declare ptr @TCOD_random_get_instance() local_unnamed_addr #2

declare float @TCOD_random_get_float(ptr noundef, float noundef, float noundef) local_unnamed_addr #2

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

declare i32 @TCOD_random_get_int(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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 nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(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 #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 allocsize(0,1) }
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, !11, i64 4888}
!6 = !{!"TCOD_Noise", !7, i64 0, !8, i64 4, !8, i64 260, !10, i64 4356, !10, i64 4360, !8, i64 4364, !11, i64 4880, !11, i64 4888, !7, i64 4896}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !7, i64 0}
!13 = !{!8, !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!10, !10, i64 0}
!17 = distinct !{!17, !15}
!18 = !{!6, !10, i64 4356}
!19 = !{!6, !10, i64 4360}
!20 = distinct !{!20, !15}
!21 = !{!6, !7, i64 4896}
!22 = distinct !{!22, !15}


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