; LLVM IR from libtcod/libtcod :: src/libtcod (parser_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"

%union.TCOD_value_t = type { ptr, [8 x i8] }
%struct.TCOD_lex_t = type { i32, i32, i32, i32, float, ptr, i32, i8, ptr, ptr, ptr, ptr, i32, i32, i32, [100 x [5 x i8]], [100 x [20 x i8]], ptr, ptr, ptr, ptr, ptr, i8, i8, i8 }

@lex = external hidden global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [66 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @TCOD_parser_error(ptr noundef, ...) #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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

declare ptr @TCOD_strdup(ptr noundef) #3

declare void @TCOD_list_push(ptr noundef, ptr noundef) #3

declare ptr @TCOD_list_begin(ptr noundef) #3

declare ptr @TCOD_list_end(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local { ptr, double } @TCOD_parse_string_value() #0 {
  %1 = alloca %union.TCOD_value_t, align 8
  %2 = alloca ptr, align 8
  %3 = alloca %struct.TCOD_lex_t, align 8
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %8 = call ptr @TCOD_list_new()
  store ptr %8, ptr %2, align 8, !tbaa !5
  %9 = load ptr, ptr @lex, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.TCOD_lex_t, ptr %9, i32 0, i32 1
  %11 = load i32, ptr %10, align 4, !tbaa !9
  %12 = icmp ne i32 %11, 4
  br i1 %12, label %13, label %17

13:                                               ; preds = %0
  %14 = load ptr, ptr @lex, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.TCOD_lex_t, ptr %14, i32 0, i32 5
  %16 = load ptr, ptr %15, align 8, !tbaa !14
  call void (ptr, ...) @TCOD_parser_error(ptr noundef @.str.7, ptr noundef %16)
  br label %17

17:                                               ; preds = %13, %0
  br label %18

18:                                               ; preds = %34, %17
  br label %19

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 2632, ptr %3) #6
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = load ptr, ptr @lex, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.TCOD_lex_t, ptr %21, i32 0, i32 5
  %23 = load ptr, ptr %22, align 8, !tbaa !14
  %24 = call ptr @TCOD_strdup(ptr noundef %23)
  call void @TCOD_list_push(ptr noundef %20, ptr noundef %24)
  %25 = load ptr, ptr @lex, align 8, !tbaa !5
  call void @TCOD_lex_savepoint(ptr noundef %25, ptr noundef %3)
  %26 = load ptr, ptr @lex, align 8, !tbaa !5
  %27 = call i32 @TCOD_lex_parse(ptr noundef %26)
  %28 = icmp ne i32 %27, 4
  br i1 %28, label %29, label %31

29:                                               ; preds = %19
  %30 = load ptr, ptr @lex, align 8, !tbaa !5
  call void @TCOD_lex_restore(ptr noundef %30, ptr noundef %3)
  store i32 3, ptr %4, align 4
  br label %32

31:                                               ; preds = %19
  store i32 0, ptr %4, align 4
  br label %32

32:                                               ; preds = %31, %29
  call void @llvm.lifetime.end.p0(i64 2632, ptr %3) #6
  %33 = load i32, ptr %4, align 4
  switch i32 %33, label %88 [
    i32 0, label %34
    i32 3, label %35
  ]

34:                                               ; preds = %32
  br label %18

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = call ptr @TCOD_list_begin(ptr noundef %36)
  store ptr %37, ptr %6, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %50, %35
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = call ptr @TCOD_list_end(ptr noundef %40)
  %42 = icmp ne ptr %39, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %38
  store i32 4, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %53

44:                                               ; preds = %38
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = call i64 @strlen(ptr noundef %46) #7
  %48 = load i64, ptr %5, align 8, !tbaa !15
  %49 = add i64 %48, %47
  store i64 %49, ptr %5, align 8, !tbaa !15
  br label %50

50:                                               ; preds = %44
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds ptr, ptr %51, i32 1
  store ptr %52, ptr %6, align 8, !tbaa !5
  br label %38, !llvm.loop !17

53:                                               ; preds = %43
  %54 = load i64, ptr %5, align 8, !tbaa !15
  %55 = add i64 %54, 1
  %56 = call noalias ptr @calloc(i64 noundef %55, i64 noundef 1) #8
  store ptr %56, ptr %1, align 8, !tbaa !19
  %57 = load ptr, ptr %1, align 8, !tbaa !19
  %58 = icmp ne ptr %57, null
  br i1 %58, label %62, label %59

59:                                               ; preds = %53
  %60 = load i64, ptr %5, align 8, !tbaa !15
  %61 = add i64 %60, 1
  call void (ptr, ...) @TCOD_parser_error(ptr noundef @.str.8, i64 noundef %61)
  br label %62

62:                                               ; preds = %59, %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = call ptr @TCOD_list_begin(ptr noundef %63)
  store ptr %64, ptr %7, align 8, !tbaa !5
  br label %65

65:                                               ; preds = %82, %62
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  %68 = call ptr @TCOD_list_end(ptr noundef %67)
  %69 = icmp ne ptr %66, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %65
  store i32 7, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %85

71:                                               ; preds = %65
  %72 = load ptr, ptr %1, align 8, !tbaa !19
  %73 = icmp ne ptr %72, null
  br i1 %73, label %74, label %79

74:                                               ; preds = %71
  %75 = load ptr, ptr %1, align 8, !tbaa !19
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = load ptr, ptr %76, align 8, !tbaa !5
  %78 = call ptr @strcat(ptr noundef %75, ptr noundef %77) #6
  br label %79

79:                                               ; preds = %74, %71
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  call void @free(ptr noundef %81) #6
  br label %82

82:                                               ; preds = %79
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = getelementptr inbounds ptr, ptr %83, i32 1
  store ptr %84, ptr %7, align 8, !tbaa !5
  br label %65, !llvm.loop !20

85:                                               ; preds = %70
  %86 = load ptr, ptr %2, align 8, !tbaa !5
  call void @TCOD_list_delete(ptr noundef %86)
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %87 = load { ptr, double }, ptr %1, align 8
  ret { ptr, double } %87

88:                                               ; preds = %32
  unreachable
}

declare ptr @TCOD_list_new() #3

declare void @TCOD_lex_savepoint(ptr noundef, ptr noundef) #3

declare i32 @TCOD_lex_parse(ptr noundef) #3

declare void @TCOD_lex_restore(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

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

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

declare void @TCOD_list_delete(ptr 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 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 "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 }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 4}
!10 = !{!"TCOD_lex_t", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !12, i64 16, !6, i64 24, !11, i64 32, !7, i64 36, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !11, i64 76, !11, i64 80, !7, i64 84, !7, i64 584, !6, i64 2584, !6, i64 2592, !6, i64 2600, !6, i64 2608, !6, i64 2616, !13, i64 2624, !13, i64 2625, !13, i64 2626}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!10, !6, i64 24}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !18}


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

%struct.TCOD_lex_t = type { i32, i32, i32, i32, float, ptr, i32, i8, ptr, ptr, ptr, ptr, i32, i32, i32, [100 x [5 x i8]], [100 x [20 x i8]], ptr, ptr, ptr, ptr, ptr, i8, i8, i8 }

@lex = external hidden local_unnamed_addr global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [66 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @TCOD_parser_error(ptr noundef, ...) local_unnamed_addr #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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; 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 #2

declare ptr @TCOD_strdup(ptr noundef) local_unnamed_addr #3

declare void @TCOD_list_push(ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @TCOD_list_begin(ptr noundef) local_unnamed_addr #3

declare ptr @TCOD_list_end(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local { ptr, double } @TCOD_parse_string_value() local_unnamed_addr #0 {
  %1 = alloca %struct.TCOD_lex_t, align 8
  %2 = tail call ptr @TCOD_list_new() #7
  %3 = load ptr, ptr @lex, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 4
  %5 = load i32, ptr %4, align 4, !tbaa !9
  %.not = icmp eq i32 %5, 4
  br i1 %.not, label %9, label %6

6:                                                ; preds = %0
  %7 = getelementptr inbounds i8, ptr %3, i64 24
  %8 = load ptr, ptr %7, align 8, !tbaa !14
  tail call void (ptr, ...) @TCOD_parser_error(ptr noundef nonnull @.str.7, ptr noundef %8)
  %.pre = load ptr, ptr @lex, align 8, !tbaa !5
  br label %9

9:                                                ; preds = %6, %0
  %10 = phi ptr [ %.pre, %6 ], [ %3, %0 ]
  call void @llvm.lifetime.start.p0(i64 2632, ptr nonnull %1) #7
  %11 = getelementptr inbounds i8, ptr %10, i64 24
  %12 = load ptr, ptr %11, align 8, !tbaa !14
  %13 = tail call ptr @TCOD_strdup(ptr noundef %12) #7
  tail call void @TCOD_list_push(ptr noundef %2, ptr noundef %13) #7
  %14 = load ptr, ptr @lex, align 8, !tbaa !5
  call void @TCOD_lex_savepoint(ptr noundef %14, ptr noundef nonnull %1) #7
  %15 = load ptr, ptr @lex, align 8, !tbaa !5
  %16 = call i32 @TCOD_lex_parse(ptr noundef %15) #7
  %.not2228 = icmp eq i32 %16, 4
  br i1 %.not2228, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %9, %.lr.ph
  call void @llvm.lifetime.end.p0(i64 2632, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 2632, ptr nonnull %1) #7
  %17 = load ptr, ptr @lex, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %17, i64 24
  %19 = load ptr, ptr %18, align 8, !tbaa !14
  %20 = call ptr @TCOD_strdup(ptr noundef %19) #7
  call void @TCOD_list_push(ptr noundef %2, ptr noundef %20) #7
  %21 = load ptr, ptr @lex, align 8, !tbaa !5
  call void @TCOD_lex_savepoint(ptr noundef %21, ptr noundef nonnull %1) #7
  %22 = load ptr, ptr @lex, align 8, !tbaa !5
  %23 = call i32 @TCOD_lex_parse(ptr noundef %22) #7
  %.not22 = icmp eq i32 %23, 4
  br i1 %.not22, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %9
  %24 = load ptr, ptr @lex, align 8, !tbaa !5
  call void @TCOD_lex_restore(ptr noundef %24, ptr noundef nonnull %1) #7
  call void @llvm.lifetime.end.p0(i64 2632, ptr nonnull %1) #7
  %25 = call ptr @TCOD_list_begin(ptr noundef %2) #7
  %26 = call ptr @TCOD_list_end(ptr noundef %2) #7
  %.not2329 = icmp eq ptr %25, %26
  br i1 %.not2329, label %._crit_edge34, label %.lr.ph33

._crit_edge34.loopexit:                           ; preds = %.lr.ph33
  %27 = add i64 %31, 1
  br label %._crit_edge34

._crit_edge34:                                    ; preds = %._crit_edge34.loopexit, %._crit_edge
  %.019.lcssa = phi i64 [ 1, %._crit_edge ], [ %27, %._crit_edge34.loopexit ]
  %28 = call noalias ptr @calloc(i64 noundef %.019.lcssa, i64 noundef 1) #8
  %.not24 = icmp eq ptr %28, null
  br i1 %.not24, label %34, label %35

.lr.ph33:                                         ; preds = %._crit_edge, %.lr.ph33
  %.01831 = phi ptr [ %32, %.lr.ph33 ], [ %25, %._crit_edge ]
  %.01930 = phi i64 [ %31, %.lr.ph33 ], [ 0, %._crit_edge ]
  %29 = load ptr, ptr %.01831, align 8, !tbaa !5
  %30 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %29) #9
  %31 = add i64 %30, %.01930
  %32 = getelementptr inbounds i8, ptr %.01831, i64 8
  %33 = call ptr @TCOD_list_end(ptr noundef %2) #7
  %.not23 = icmp eq ptr %32, %33
  br i1 %.not23, label %._crit_edge34.loopexit, label %.lr.ph33, !llvm.loop !15

34:                                               ; preds = %._crit_edge34
  call void (ptr, ...) @TCOD_parser_error(ptr noundef nonnull @.str.8, i64 noundef %.019.lcssa)
  br label %35

35:                                               ; preds = %34, %._crit_edge34
  %36 = call ptr @TCOD_list_begin(ptr noundef %2) #7
  %37 = call ptr @TCOD_list_end(ptr noundef %2) #7
  %.not2535 = icmp eq ptr %36, %37
  br i1 %.not2535, label %._crit_edge39, label %.lr.ph38

.lr.ph38:                                         ; preds = %35
  br i1 %.not24, label %.lr.ph38.split.us, label %.lr.ph38.split

.lr.ph38.split.us:                                ; preds = %.lr.ph38, %.lr.ph38.split.us
  %.036.us = phi ptr [ %39, %.lr.ph38.split.us ], [ %36, %.lr.ph38 ]
  %38 = load ptr, ptr %.036.us, align 8, !tbaa !5
  call void @free(ptr noundef %38) #7
  %39 = getelementptr inbounds i8, ptr %.036.us, i64 8
  %40 = call ptr @TCOD_list_end(ptr noundef %2) #7
  %.not25.us = icmp eq ptr %39, %40
  br i1 %.not25.us, label %._crit_edge39, label %.lr.ph38.split.us, !llvm.loop !17

._crit_edge39:                                    ; preds = %.lr.ph38.split, %.lr.ph38.split.us, %35
  call void @TCOD_list_delete(ptr noundef %2) #7
  %.fca.0.insert = insertvalue { ptr, double } poison, ptr %28, 0
  %.fca.1.insert = insertvalue { ptr, double } %.fca.0.insert, double undef, 1
  ret { ptr, double } %.fca.1.insert

.lr.ph38.split:                                   ; preds = %.lr.ph38, %.lr.ph38.split
  %.036 = phi ptr [ %43, %.lr.ph38.split ], [ %36, %.lr.ph38 ]
  %41 = load ptr, ptr %.036, align 8, !tbaa !5
  %42 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %28, ptr noundef nonnull dereferenceable(1) %41) #7
  call void @free(ptr noundef %41) #7
  %43 = getelementptr inbounds i8, ptr %.036, i64 8
  %44 = call ptr @TCOD_list_end(ptr noundef %2) #7
  %.not25 = icmp eq ptr %43, %44
  br i1 %.not25, label %._crit_edge39, label %.lr.ph38.split, !llvm.loop !17
}

declare ptr @TCOD_list_new() local_unnamed_addr #3

declare void @TCOD_lex_savepoint(ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @TCOD_lex_parse(ptr noundef) local_unnamed_addr #3

declare void @TCOD_lex_restore(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

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

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

declare void @TCOD_list_delete(ptr noundef) local_unnamed_addr #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0,1) }
attributes #9 = { 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, !11, i64 4}
!10 = !{!"TCOD_lex_t", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !12, i64 16, !6, i64 24, !11, i64 32, !7, i64 36, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !11, i64 76, !11, i64 80, !7, i64 84, !7, i64 584, !6, i64 2584, !6, i64 2592, !6, i64 2600, !6, i64 2608, !6, i64 2616, !13, i64 2624, !13, i64 2625, !13, i64 2626}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!10, !6, i64 24}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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