; LLVM IR from jspd-group/pegit :: src (project-config)

; 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.project_details = type { %struct.strbuf, %struct.strbuf, %struct.strbuf, %struct.strbuf }
%struct.strbuf = type { i64, i64, ptr }

; Function Attrs: nounwind uwtable
declare dso_local i64 @goto_next(ptr noundef, i8 noundef signext, i64 noundef, 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 uwtable
define dso_local zeroext i1 @author_exists(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store i64 0, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  store i64 0, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.project_details, ptr %10, i32 0, i32 1
  %12 = getelementptr inbounds %struct.strbuf, ptr %11, i32 0, i32 2
  %13 = load ptr, ptr %12, align 8, !tbaa !11
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.project_details, ptr %14, i32 0, i32 1
  %16 = getelementptr inbounds %struct.strbuf, ptr %15, i32 0, i32 1
  %17 = load i64, ptr %16, align 8, !tbaa !14
  %18 = call i64 @goto_next(ptr noundef %13, i8 noundef signext 59, i64 noundef %17, ptr noundef %6)
  store i64 %18, ptr %8, align 8, !tbaa !9
  br label %19

19:                                               ; preds = %34, %2
  %20 = load i64, ptr %8, align 8, !tbaa !9
  %21 = icmp sgt i64 %20, 0
  br i1 %21, label %22, label %48

22:                                               ; preds = %19
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.project_details, ptr %23, i32 0, i32 1
  %25 = getelementptr inbounds %struct.strbuf, ptr %24, i32 0, i32 2
  %26 = load ptr, ptr %25, align 8, !tbaa !11
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = load i64, ptr %7, align 8, !tbaa !9
  %29 = trunc i64 %28 to i32
  %30 = load i64, ptr %8, align 8, !tbaa !9
  %31 = trunc i64 %30 to i32
  %32 = call zeroext i1 @match_name(ptr noundef %26, ptr noundef %27, i32 noundef %29, i32 noundef %31)
  br i1 %32, label %33, label %34

33:                                               ; preds = %22
  store i1 true, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %49

34:                                               ; preds = %22
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.project_details, ptr %35, i32 0, i32 1
  %37 = getelementptr inbounds %struct.strbuf, ptr %36, i32 0, i32 2
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.project_details, ptr %39, i32 0, i32 1
  %41 = getelementptr inbounds %struct.strbuf, ptr %40, i32 0, i32 1
  %42 = load i64, ptr %41, align 8, !tbaa !14
  %43 = call i64 @goto_next(ptr noundef %38, i8 noundef signext 59, i64 noundef %42, ptr noundef %6)
  store i64 %43, ptr %8, align 8, !tbaa !9
  %44 = load i64, ptr %8, align 8, !tbaa !9
  %45 = add nsw i64 %44, 1
  %46 = load i64, ptr %7, align 8, !tbaa !9
  %47 = add i64 %46, %45
  store i64 %47, ptr %7, align 8, !tbaa !9
  br label %19, !llvm.loop !15

48:                                               ; preds = %19
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %49

49:                                               ; preds = %48, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %50 = load i1, ptr %3, align 1
  ret i1 %50
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @match_name(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 40}
!12 = !{!"project_details", !13, i64 0, !13, i64 24, !13, i64 48, !13, i64 72}
!13 = !{!"strbuf", !10, i64 0, !10, i64 8, !6, i64 16}
!14 = !{!12, !10, i64 32}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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

; Function Attrs: nounwind uwtable
declare dso_local i64 @goto_next(ptr noundef, i8 noundef signext, i64 noundef, 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: nounwind uwtable
define dso_local noundef zeroext i1 @author_exists(ptr nocapture noundef readonly %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  store i64 0, ptr %3, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = load ptr, ptr %4, align 8, !tbaa !9
  %6 = getelementptr inbounds i8, ptr %0, i64 32
  %7 = load i64, ptr %6, align 8, !tbaa !13
  %8 = call i64 @goto_next(ptr noundef %5, i8 noundef signext 59, i64 noundef %7, ptr noundef nonnull %3)
  %9 = icmp sgt i64 %8, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2, %14
  %.014 = phi i64 [ %17, %14 ], [ %8, %2 ]
  %.01113 = phi i64 [ %19, %14 ], [ 0, %2 ]
  %10 = load ptr, ptr %4, align 8, !tbaa !9
  %11 = trunc i64 %.01113 to i32
  %12 = trunc i64 %.014 to i32
  %13 = call zeroext i1 @match_name(ptr noundef %10, ptr noundef %1, i32 noundef %11, i32 noundef %12)
  br i1 %13, label %._crit_edge, label %14

14:                                               ; preds = %.lr.ph
  %15 = load ptr, ptr %4, align 8, !tbaa !9
  %16 = load i64, ptr %6, align 8, !tbaa !13
  %17 = call i64 @goto_next(ptr noundef %15, i8 noundef signext 59, i64 noundef %16, ptr noundef nonnull %3)
  %18 = add i64 %.01113, 1
  %19 = add i64 %18, %17
  %20 = icmp sgt i64 %17, 0
  br i1 %20, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph, %14, %2
  %.lcssa = phi i1 [ false, %2 ], [ %13, %14 ], [ %13, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  ret i1 %.lcssa
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @match_name(ptr noundef, 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !12, i64 40}
!10 = !{!"project_details", !11, i64 0, !11, i64 24, !11, i64 48, !11, i64 72}
!11 = !{!"strbuf", !6, i64 0, !6, i64 8, !12, i64 16}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!10, !6, i64 32}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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