; LLVM IR from EarlGray/language-incubator :: llvm/kldscp (ast)

; 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.ast_node = type { i32, %union.anon }
%union.anon = type { %struct.anon.2 }
%struct.anon.2 = type { i8, ptr, ptr, i32 }
%struct.anon.3 = type { ptr, ptr, ptr }
%struct.anon.1 = type { ptr, ptr }
%struct.anon.0 = type { ptr, ptr, ptr }

@.str.48 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [35 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @list_head(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @list_next(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @list_data(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @print_ast(i32 noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  %8 = load ptr, ptr %4, align 8, !tbaa !9
  %9 = getelementptr inbounds %struct.ast_node, ptr %8, i32 0, i32 0
  %10 = load i32, ptr %9, align 8, !tbaa !11
  switch i32 %10, label %156 [
    i32 0, label %11
    i32 1, label %17
    i32 6, label %23
    i32 2, label %29
    i32 5, label %49
    i32 3, label %74
    i32 4, label %106
  ]

11:                                               ; preds = %2
  %12 = load i32, ptr %3, align 4, !tbaa !5
  call void @print_indent(i32 noundef %12)
  %13 = load ptr, ptr %4, align 8, !tbaa !9
  %14 = getelementptr inbounds %struct.ast_node, ptr %13, i32 0, i32 1
  %15 = load double, ptr %14, align 8, !tbaa !13
  %16 = call i32 (ptr, ...) @printf(ptr noundef @.str.48, double noundef %15)
  br label %161

17:                                               ; preds = %2
  %18 = load i32, ptr %3, align 4, !tbaa !5
  call void @print_indent(i32 noundef %18)
  %19 = load ptr, ptr %4, align 8, !tbaa !9
  %20 = getelementptr inbounds %struct.ast_node, ptr %19, i32 0, i32 1
  %21 = load ptr, ptr %20, align 8, !tbaa !13
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.49, ptr noundef %21)
  br label %161

23:                                               ; preds = %2
  %24 = load i32, ptr %3, align 4, !tbaa !5
  call void @print_indent(i32 noundef %24)
  %25 = load ptr, ptr %4, align 8, !tbaa !9
  %26 = getelementptr inbounds %struct.ast_node, ptr %25, i32 0, i32 1
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = call i32 (ptr, ...) @printf(ptr noundef @.str.50, ptr noundef %27)
  br label %161

29:                                               ; preds = %2
  %30 = load i32, ptr %3, align 4, !tbaa !5
  call void @print_indent(i32 noundef %30)
  %31 = load ptr, ptr %4, align 8, !tbaa !9
  %32 = getelementptr inbounds %struct.ast_node, ptr %31, i32 0, i32 1
  %33 = getelementptr inbounds %struct.anon.2, ptr %32, i32 0, i32 0
  %34 = load i8, ptr %33, align 8, !tbaa !13
  %35 = sext i8 %34 to i32
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.51, i32 noundef %35)
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  %39 = load ptr, ptr %4, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct.ast_node, ptr %39, i32 0, i32 1
  %41 = getelementptr inbounds %struct.anon.2, ptr %40, i32 0, i32 2
  %42 = load ptr, ptr %41, align 8, !tbaa !13
  call void @print_ast(i32 noundef %38, ptr noundef %42)
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  %45 = load ptr, ptr %4, align 8, !tbaa !9
  %46 = getelementptr inbounds %struct.ast_node, ptr %45, i32 0, i32 1
  %47 = getelementptr inbounds %struct.anon.2, ptr %46, i32 0, i32 1
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  call void @print_ast(i32 noundef %44, ptr noundef %48)
  br label %161

49:                                               ; preds = %2
  %50 = load i32, ptr %3, align 4, !tbaa !5
  call void @print_indent(i32 noundef %50)
  %51 = call i32 (ptr, ...) @printf(ptr noundef @.str.52)
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  %54 = load ptr, ptr %4, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.ast_node, ptr %54, i32 0, i32 1
  %56 = getelementptr inbounds %struct.anon.3, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !13
  call void @print_ast(i32 noundef %53, ptr noundef %57)
  %58 = load i32, ptr %3, align 4, !tbaa !5
  call void @print_indent(i32 noundef %58)
  %59 = call i32 (ptr, ...) @printf(ptr noundef @.str.53)
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  %62 = load ptr, ptr %4, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct.ast_node, ptr %62, i32 0, i32 1
  %64 = getelementptr inbounds %struct.anon.3, ptr %63, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  call void @print_ast(i32 noundef %61, ptr noundef %65)
  %66 = load i32, ptr %3, align 4, !tbaa !5
  call void @print_indent(i32 noundef %66)
  %67 = call i32 (ptr, ...) @printf(ptr noundef @.str.54)
  %68 = load i32, ptr %3, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  %70 = load ptr, ptr %4, align 8, !tbaa !9
  %71 = getelementptr inbounds %struct.ast_node, ptr %70, i32 0, i32 1
  %72 = getelementptr inbounds %struct.anon.3, ptr %71, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !13
  call void @print_ast(i32 noundef %69, ptr noundef %73)
  br label %161

74:                                               ; preds = %2
  %75 = load i32, ptr %3, align 4, !tbaa !5
  call void @print_indent(i32 noundef %75)
  %76 = load ptr, ptr %4, align 8, !tbaa !9
  %77 = getelementptr inbounds %struct.ast_node, ptr %76, i32 0, i32 1
  %78 = getelementptr inbounds %struct.anon.1, ptr %77, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8, !tbaa !13
  %80 = call i32 (ptr, ...) @printf(ptr noundef @.str.55, ptr noundef %79)
  %81 = load ptr, ptr %4, align 8, !tbaa !9
  %82 = getelementptr inbounds %struct.ast_node, ptr %81, i32 0, i32 1
  %83 = getelementptr inbounds %struct.anon.1, ptr %82, i32 0, i32 1
  %84 = load ptr, ptr %83, align 8, !tbaa !13
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %105

86:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %87 = load ptr, ptr %4, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.ast_node, ptr %87, i32 0, i32 1
  %89 = getelementptr inbounds %struct.anon.1, ptr %88, i32 0, i32 1
  %90 = load ptr, ptr %89, align 8, !tbaa !13
  %91 = call ptr @list_head(ptr noundef %90)
  store ptr %91, ptr %5, align 8, !tbaa !9
  br label %92

92:                                               ; preds = %95, %86
  %93 = load ptr, ptr %5, align 8, !tbaa !9
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %104

95:                                               ; preds = %92
  %96 = load i32, ptr %3, align 4, !tbaa !5
  call void @print_indent(i32 noundef %96)
  %97 = call i32 (ptr, ...) @printf(ptr noundef @.str.56)
  %98 = load i32, ptr %3, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  %100 = load ptr, ptr %5, align 8, !tbaa !9
  %101 = call ptr @list_data(ptr noundef %100)
  call void @print_ast(i32 noundef %99, ptr noundef %101)
  %102 = load ptr, ptr %5, align 8, !tbaa !9
  %103 = call ptr @list_next(ptr noundef %102)
  store ptr %103, ptr %5, align 8, !tbaa !9
  br label %92, !llvm.loop !14

104:                                              ; preds = %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %105

105:                                              ; preds = %104, %74
  br label %161

106:                                              ; preds = %2
  %107 = load i32, ptr %3, align 4, !tbaa !5
  call void @print_indent(i32 noundef %107)
  %108 = load ptr, ptr %4, align 8, !tbaa !9
  %109 = getelementptr inbounds %struct.ast_node, ptr %108, i32 0, i32 1
  %110 = getelementptr inbounds %struct.anon.0, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !13
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.57, ptr noundef %111)
  %113 = load ptr, ptr %4, align 8, !tbaa !9
  %114 = getelementptr inbounds %struct.ast_node, ptr %113, i32 0, i32 1
  %115 = getelementptr inbounds %struct.anon.0, ptr %114, i32 0, i32 1
  %116 = load ptr, ptr %115, align 8, !tbaa !13
  %117 = icmp ne ptr %116, null
  br i1 %117, label %118, label %139

118:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %119 = load ptr, ptr %4, align 8, !tbaa !9
  %120 = getelementptr inbounds %struct.ast_node, ptr %119, i32 0, i32 1
  %121 = getelementptr inbounds %struct.anon.0, ptr %120, i32 0, i32 1
  %122 = load ptr, ptr %121, align 8, !tbaa !13
  %123 = call ptr @list_head(ptr noundef %122)
  store ptr %123, ptr %6, align 8, !tbaa !9
  br label %124

124:                                              ; preds = %136, %118
  %125 = load ptr, ptr %6, align 8, !tbaa !9
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %138

127:                                              ; preds = %124
  %128 = load ptr, ptr %6, align 8, !tbaa !9
  %129 = call ptr @list_data(ptr noundef %128)
  %130 = call i32 (ptr, ...) @printf(ptr noundef @.str.58, ptr noundef %129)
  %131 = load ptr, ptr %6, align 8, !tbaa !9
  %132 = call ptr @list_next(ptr noundef %131)
  store ptr %132, ptr %6, align 8, !tbaa !9
  %133 = load ptr, ptr %6, align 8, !tbaa !9
  %134 = icmp ne ptr %133, null
  br i1 %134, label %136, label %135

135:                                              ; preds = %127
  br label %138

136:                                              ; preds = %127
  %137 = call i32 (ptr, ...) @printf(ptr noundef @.str.59)
  br label %124, !llvm.loop !16

138:                                              ; preds = %135, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %139

139:                                              ; preds = %138, %106
  %140 = call i32 (ptr, ...) @printf(ptr noundef @.str.60)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %141 = load ptr, ptr %4, align 8, !tbaa !9
  %142 = getelementptr inbounds %struct.ast_node, ptr %141, i32 0, i32 1
  %143 = getelementptr inbounds %struct.anon.0, ptr %142, i32 0, i32 2
  %144 = load ptr, ptr %143, align 8, !tbaa !13
  store ptr %144, ptr %7, align 8, !tbaa !9
  %145 = load ptr, ptr %7, align 8, !tbaa !9
  %146 = icmp ne ptr %145, null
  br i1 %146, label %147, label %151

147:                                              ; preds = %139
  %148 = load i32, ptr %3, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  %150 = load ptr, ptr %7, align 8, !tbaa !9
  call void @print_ast(i32 noundef %149, ptr noundef %150)
  br label %155

151:                                              ; preds = %139
  %152 = load i32, ptr %3, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  call void @print_indent(i32 noundef %153)
  %154 = call i32 (ptr, ...) @printf(ptr noundef @.str.61)
  br label %155

155:                                              ; preds = %151, %147
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %161

156:                                              ; preds = %2
  %157 = load ptr, ptr %4, align 8, !tbaa !9
  %158 = getelementptr inbounds %struct.ast_node, ptr %157, i32 0, i32 0
  %159 = load i32, ptr %158, align 8, !tbaa !11
  %160 = call i32 (ptr, ...) @printf(ptr noundef @.str.62, i32 noundef %159)
  br label %161

161:                                              ; preds = %156, %155, %105, %49, %29, %23, %17, %11
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @print_indent(i32 noundef) #2

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

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

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


; 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.48 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [35 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @print_ast(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  br label %tailrecurse

tailrecurse:                                      ; preds = %tailrecurse.backedge, %2
  %.tr = phi i32 [ %0, %2 ], [ %.tr.be, %tailrecurse.backedge ]
  %.tr54 = phi ptr [ %1, %2 ], [ %.tr54.be, %tailrecurse.backedge ]
  %3 = load i32, ptr %.tr54, align 8, !tbaa !5
  switch i32 %3, label %72 [
    i32 0, label %4
    i32 1, label %8
    i32 6, label %12
    i32 2, label %16
    i32 5, label %26
    i32 3, label %37
    i32 4, label %50
  ]

4:                                                ; preds = %tailrecurse
  tail call void @print_indent(i32 noundef %.tr)
  %5 = getelementptr inbounds i8, ptr %.tr54, i64 8
  %6 = load double, ptr %5, align 8, !tbaa !10
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.48, double noundef %6)
  br label %.loopexit

8:                                                ; preds = %tailrecurse
  tail call void @print_indent(i32 noundef %.tr)
  %9 = getelementptr inbounds i8, ptr %.tr54, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !10
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49, ptr noundef %10)
  br label %.loopexit

12:                                               ; preds = %tailrecurse
  tail call void @print_indent(i32 noundef %.tr)
  %13 = getelementptr inbounds i8, ptr %.tr54, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !10
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.50, ptr noundef %14)
  br label %.loopexit

16:                                               ; preds = %tailrecurse
  tail call void @print_indent(i32 noundef %.tr)
  %17 = getelementptr inbounds i8, ptr %.tr54, i64 8
  %18 = load i8, ptr %17, align 8, !tbaa !10
  %19 = sext i8 %18 to i32
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51, i32 noundef %19)
  %21 = add nsw i32 %.tr, 1
  %22 = getelementptr inbounds i8, ptr %.tr54, i64 24
  %23 = load ptr, ptr %22, align 8, !tbaa !10
  tail call void @print_ast(i32 noundef %21, ptr noundef %23)
  %24 = getelementptr inbounds i8, ptr %.tr54, i64 16
  %25 = load ptr, ptr %24, align 8, !tbaa !10
  br label %tailrecurse.backedge

tailrecurse.backedge:                             ; preds = %16, %26, %.loopexit55
  %.tr.be = phi i32 [ %21, %16 ], [ %28, %26 ], [ %69, %.loopexit55 ]
  %.tr54.be = phi ptr [ %25, %16 ], [ %36, %26 ], [ %68, %.loopexit55 ]
  br label %tailrecurse

26:                                               ; preds = %tailrecurse
  tail call void @print_indent(i32 noundef %.tr)
  %27 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %28 = add nsw i32 %.tr, 1
  %29 = getelementptr inbounds i8, ptr %.tr54, i64 8
  %30 = load ptr, ptr %29, align 8, !tbaa !10
  tail call void @print_ast(i32 noundef %28, ptr noundef %30)
  tail call void @print_indent(i32 noundef %.tr)
  %31 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.53)
  %32 = getelementptr inbounds i8, ptr %.tr54, i64 16
  %33 = load ptr, ptr %32, align 8, !tbaa !10
  tail call void @print_ast(i32 noundef %28, ptr noundef %33)
  tail call void @print_indent(i32 noundef %.tr)
  %34 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.54)
  %35 = getelementptr inbounds i8, ptr %.tr54, i64 24
  %36 = load ptr, ptr %35, align 8, !tbaa !10
  br label %tailrecurse.backedge

37:                                               ; preds = %tailrecurse
  tail call void @print_indent(i32 noundef %.tr)
  %38 = getelementptr inbounds i8, ptr %.tr54, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !10
  %40 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.55, ptr noundef %39)
  %41 = getelementptr inbounds i8, ptr %.tr54, i64 16
  %42 = load ptr, ptr %41, align 8, !tbaa !10
  %.not52 = icmp eq ptr %42, null
  br i1 %.not52, label %.loopexit, label %43

43:                                               ; preds = %37
  %44 = tail call ptr @list_head(ptr noundef nonnull %42)
  %.not5374 = icmp eq ptr %44, null
  br i1 %.not5374, label %.loopexit, label %.lr.ph76

.lr.ph76:                                         ; preds = %43
  %45 = add nsw i32 %.tr, 1
  br label %46

46:                                               ; preds = %.lr.ph76, %46
  %.075 = phi ptr [ %44, %.lr.ph76 ], [ %49, %46 ]
  tail call void @print_indent(i32 noundef %.tr)
  %47 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.56)
  %48 = tail call ptr @list_data(ptr noundef nonnull %.075)
  tail call void @print_ast(i32 noundef %45, ptr noundef %48)
  %49 = tail call ptr @list_next(ptr noundef nonnull %.075)
  %.not53 = icmp eq ptr %49, null
  br i1 %.not53, label %.loopexit, label %46, !llvm.loop !11

50:                                               ; preds = %tailrecurse
  tail call void @print_indent(i32 noundef %.tr)
  %51 = getelementptr inbounds i8, ptr %.tr54, i64 8
  %52 = load ptr, ptr %51, align 8, !tbaa !10
  %53 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.57, ptr noundef %52)
  %54 = getelementptr inbounds i8, ptr %.tr54, i64 16
  %55 = load ptr, ptr %54, align 8, !tbaa !10
  %.not = icmp eq ptr %55, null
  br i1 %.not, label %.loopexit55, label %56

56:                                               ; preds = %50
  %57 = tail call ptr @list_head(ptr noundef nonnull %55)
  %.not4971 = icmp eq ptr %57, null
  br i1 %.not4971, label %.loopexit55, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %56
  %58 = tail call ptr @list_data(ptr noundef nonnull %57)
  %59 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.58, ptr noundef %58)
  %60 = tail call ptr @list_next(ptr noundef nonnull %57)
  %.not50122 = icmp eq ptr %60, null
  br i1 %.not50122, label %.loopexit55, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %61 = phi ptr [ %65, %.lr.ph ], [ %60, %.lr.ph.preheader ]
  %62 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.59)
  %63 = tail call ptr @list_data(ptr noundef nonnull %61)
  %64 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.58, ptr noundef %63)
  %65 = tail call ptr @list_next(ptr noundef nonnull %61)
  %.not50 = icmp eq ptr %65, null
  br i1 %.not50, label %.loopexit55, label %.lr.ph, !llvm.loop !13

.loopexit55:                                      ; preds = %.lr.ph, %.lr.ph.preheader, %56, %50
  %66 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.60)
  %67 = getelementptr inbounds i8, ptr %.tr54, i64 24
  %68 = load ptr, ptr %67, align 8, !tbaa !10
  %.not51 = icmp eq ptr %68, null
  %69 = add nsw i32 %.tr, 1
  br i1 %.not51, label %70, label %tailrecurse.backedge

70:                                               ; preds = %.loopexit55
  tail call void @print_indent(i32 noundef %69)
  %71 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.61)
  br label %.loopexit

72:                                               ; preds = %tailrecurse
  %73 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.62, i32 noundef %3)
  br label %.loopexit

.loopexit:                                        ; preds = %46, %43, %70, %37, %72, %12, %8, %4
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @print_indent(i32 noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) 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 = { inlinehint 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 = { 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" }

!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, !7, i64 0}
!6 = !{!"ast_node", !7, i64 0, !8, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!8, !8, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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