; LLVM IR from siconos/siconos :: externals/lbl/src (ma57_lib)

; 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.Ma57_Data = type { i32, i32, [21 x i32], [6 x double], [41 x i32], [21 x double], ptr, ptr, i32, ptr, ptr, ptr, i32, ptr, i32, i32, i32, ptr, i32, ptr, i32, i32, ptr, ptr, i8, i32, i32, ptr }

@.str.26 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [10 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @Ma57_set_int_parm(ptr noundef %0, i32 noundef %1, i32 noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %7 = load i32, ptr %5, align 4, !tbaa !9
  switch i32 %7, label %56 [
    i32 5, label %8
    i32 6, label %24
    i32 14, label %40
  ]

8:                                                ; preds = %3
  %9 = load i32, ptr %6, align 4, !tbaa !9
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.Ma57_Data, ptr %10, i32 0, i32 2
  %12 = getelementptr inbounds [21 x i32], ptr %11, i64 0, i64 5
  store i32 %9, ptr %12, align 4, !tbaa !9
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.Ma57_Data, ptr %13, i32 0, i32 27
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = icmp ne ptr %15, null
  br i1 %16, label %17, label %23

17:                                               ; preds = %8
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.Ma57_Data, ptr %18, i32 0, i32 27
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = load i32, ptr %6, align 4, !tbaa !9
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef @.str.26, ptr noundef @.str.27, i32 noundef %21) #2
  br label %23

23:                                               ; preds = %17, %8
  br label %56

24:                                               ; preds = %3
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.Ma57_Data, ptr %26, i32 0, i32 2
  %28 = getelementptr inbounds [21 x i32], ptr %27, i64 0, i64 6
  store i32 %25, ptr %28, align 8, !tbaa !9
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.Ma57_Data, ptr %29, i32 0, i32 27
  %31 = load ptr, ptr %30, align 8, !tbaa !11
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %39

33:                                               ; preds = %24
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.Ma57_Data, ptr %34, i32 0, i32 27
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef @.str.26, ptr noundef @.str.28, i32 noundef %37) #2
  br label %39

39:                                               ; preds = %33, %24
  br label %56

40:                                               ; preds = %3
  %41 = load i32, ptr %6, align 4, !tbaa !9
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.Ma57_Data, ptr %42, i32 0, i32 2
  %44 = getelementptr inbounds [21 x i32], ptr %43, i64 0, i64 14
  store i32 %41, ptr %44, align 8, !tbaa !9
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.Ma57_Data, ptr %45, i32 0, i32 27
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = icmp ne ptr %47, null
  br i1 %48, label %49, label %55

49:                                               ; preds = %40
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.Ma57_Data, ptr %50, i32 0, i32 27
  %52 = load ptr, ptr %51, align 8, !tbaa !11
  %53 = load i32, ptr %6, align 4, !tbaa !9
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef @.str.26, ptr noundef @.str.29, i32 noundef %53) #2
  br label %55

55:                                               ; preds = %49, %40
  br label %56

56:                                               ; preds = %55, %39, %23, %3
  ret void
}

attributes #0 = { 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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 624}
!12 = !{!"Ma57_Data", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 96, !7, i64 144, !7, i64 312, !6, i64 480, !6, i64 488, !10, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !10, i64 528, !6, i64 536, !10, i64 544, !10, i64 548, !10, i64 552, !6, i64 560, !10, i64 568, !6, i64 576, !10, i64 584, !10, i64 588, !6, i64 592, !6, i64 600, !7, i64 608, !10, i64 612, !10, i64 616, !6, i64 624}


; 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.26 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [10 x i8], align 1

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

; Function Attrs: nofree nounwind uwtable
define dso_local void @Ma57_set_int_parm(ptr nocapture noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #1 {
  switch i32 %1, label %22 [
    i32 5, label %4
    i32 6, label %10
    i32 14, label %16
  ]

4:                                                ; preds = %3
  %5 = getelementptr inbounds i8, ptr %0, i64 28
  store i32 %2, ptr %5, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 624
  %7 = load ptr, ptr %6, align 8, !tbaa !9
  %.not18 = icmp eq ptr %7, null
  br i1 %.not18, label %22, label %8

8:                                                ; preds = %4
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %7, ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.27, i32 noundef %2) #2
  br label %22

10:                                               ; preds = %3
  %11 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 %2, ptr %11, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %0, i64 624
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %.not17 = icmp eq ptr %13, null
  br i1 %.not17, label %22, label %14

14:                                               ; preds = %10
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %13, ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.28, i32 noundef %2) #2
  br label %22

16:                                               ; preds = %3
  %17 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 %2, ptr %17, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %0, i64 624
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %.not = icmp eq ptr %19, null
  br i1 %.not, label %22, label %20

20:                                               ; preds = %16
  %21 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %19, ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.29, i32 noundef %2) #2
  br label %22

22:                                               ; preds = %16, %20, %10, %14, %4, %8, %3
  ret void
}

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 = { nofree 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 = { 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, !11, i64 624}
!10 = !{!"Ma57_Data", !6, i64 0, !6, i64 4, !7, i64 8, !7, i64 96, !7, i64 144, !7, i64 312, !11, i64 480, !11, i64 488, !6, i64 496, !11, i64 504, !11, i64 512, !11, i64 520, !6, i64 528, !11, i64 536, !6, i64 544, !6, i64 548, !6, i64 552, !11, i64 560, !6, i64 568, !11, i64 576, !6, i64 584, !6, i64 588, !11, i64 592, !11, i64 600, !7, i64 608, !6, i64 612, !6, i64 616, !11, i64 624}
!11 = !{!"any pointer", !7, i64 0}


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