; 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.30 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [14 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_real_parm(ptr noundef %0, i32 noundef %1, double noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store double %2, ptr %6, align 8, !tbaa !11
  %7 = load i32, ptr %5, align 4, !tbaa !9
  switch i32 %7, label %40 [
    i32 0, label %8
    i32 1, label %24
  ]

8:                                                ; preds = %3
  %9 = load double, ptr %6, align 8, !tbaa !11
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.Ma57_Data, ptr %10, i32 0, i32 3
  %12 = getelementptr inbounds [6 x double], ptr %11, i64 0, i64 0
  store double %9, ptr %12, align 8, !tbaa !11
  %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 !13
  %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 !13
  %21 = load double, ptr %6, align 8, !tbaa !11
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef @.str.30, ptr noundef @.str.31, double noundef %21) #2
  br label %23

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

24:                                               ; preds = %3
  %25 = load double, ptr %6, align 8, !tbaa !11
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.Ma57_Data, ptr %26, i32 0, i32 3
  %28 = getelementptr inbounds [6 x double], ptr %27, i64 0, i64 1
  store double %25, ptr %28, align 8, !tbaa !11
  %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 !13
  %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 !13
  %37 = load double, ptr %6, align 8, !tbaa !11
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef @.str.30, ptr noundef @.str.32, double noundef %37) #2
  br label %39

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

40:                                               ; preds = %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, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !6, i64 624}
!14 = !{!"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.30 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [14 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_real_parm(ptr nocapture noundef %0, i32 noundef %1, double noundef %2) local_unnamed_addr #1 {
  switch i32 %1, label %16 [
    i32 0, label %4
    i32 1, label %10
  ]

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

8:                                                ; preds = %4
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %7, ptr noundef nonnull @.str.30, ptr noundef nonnull @.str.31, double noundef %2) #2
  br label %16

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

14:                                               ; preds = %10
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %13, ptr noundef nonnull @.str.30, ptr noundef nonnull @.str.32, double noundef %2) #2
  br label %16

16:                                               ; preds = %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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !12, i64 624}
!10 = !{!"Ma57_Data", !11, i64 0, !11, i64 4, !7, i64 8, !7, i64 96, !7, i64 144, !7, i64 312, !12, i64 480, !12, i64 488, !11, i64 496, !12, i64 504, !12, i64 512, !12, i64 520, !11, i64 528, !12, i64 536, !11, i64 544, !11, i64 548, !11, i64 552, !12, i64 560, !11, i64 568, !12, i64 576, !11, i64 584, !11, i64 588, !12, i64 592, !12, i64 600, !7, i64 608, !11, i64 612, !11, i64 616, !12, i64 624}
!11 = !{!"int", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}


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