; LLVM IR from HRI-EU/Rcs :: src/RcsCore (Rcs_HTr)

; 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.HTr = type { [3 x double], [3 x [3 x double]] }

; 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
define dso_local zeroext i1 @HTr_fromString(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [12 x double], align 16
  %7 = alloca i8, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %8 = load ptr, ptr %4, align 8, !tbaa !5
  %9 = icmp eq ptr %8, null
  br i1 %9, label %13, label %10

10:                                               ; preds = %2
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %14

13:                                               ; preds = %10, %2
  store i1 false, ptr %3, align 1
  br label %46

14:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 96, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #3
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds [12 x double], ptr %6, i64 0, i64 0
  %17 = call zeroext i1 @String_toDoubleArray_l(ptr noundef %15, ptr noundef %16, i32 noundef 12)
  %18 = zext i1 %17 to i8
  store i8 %18, ptr %7, align 1, !tbaa !9
  %19 = load i8, ptr %7, align 1, !tbaa !9, !range !11, !noundef !12
  %20 = trunc i8 %19 to i1
  %21 = zext i1 %20 to i32
  %22 = icmp eq i32 %21, 1
  br i1 %22, label %23, label %43

23:                                               ; preds = %14
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.HTr, ptr %24, i32 0, i32 0
  %26 = getelementptr inbounds [3 x double], ptr %25, i64 0, i64 0
  %27 = getelementptr inbounds [12 x double], ptr %6, i64 0, i64 0
  call void @Vec3d_copy(ptr noundef %26, ptr noundef %27)
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.HTr, ptr %28, i32 0, i32 1
  %30 = getelementptr inbounds [3 x [3 x double]], ptr %29, i64 0, i64 0
  %31 = getelementptr inbounds [3 x double], ptr %30, i64 0, i64 0
  %32 = getelementptr inbounds [12 x double], ptr %6, i64 0, i64 3
  call void @Vec3d_copy(ptr noundef %31, ptr noundef %32)
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.HTr, ptr %33, i32 0, i32 1
  %35 = getelementptr inbounds [3 x [3 x double]], ptr %34, i64 0, i64 1
  %36 = getelementptr inbounds [3 x double], ptr %35, i64 0, i64 0
  %37 = getelementptr inbounds [12 x double], ptr %6, i64 0, i64 6
  call void @Vec3d_copy(ptr noundef %36, ptr noundef %37)
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.HTr, ptr %38, i32 0, i32 1
  %40 = getelementptr inbounds [3 x [3 x double]], ptr %39, i64 0, i64 2
  %41 = getelementptr inbounds [3 x double], ptr %40, i64 0, i64 0
  %42 = getelementptr inbounds [12 x double], ptr %6, i64 0, i64 9
  call void @Vec3d_copy(ptr noundef %41, ptr noundef %42)
  br label %43

43:                                               ; preds = %23, %14
  %44 = load i8, ptr %7, align 1, !tbaa !9, !range !11, !noundef !12
  %45 = trunc i8 %44 to i1
  store i1 %45, ptr %3, align 1
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 96, ptr %6) #3
  br label %46

46:                                               ; preds = %43, %13
  %47 = load i1, ptr %3, align 1
  ret i1 %47
}

declare zeroext i1 @String_toDoubleArray_l(ptr noundef, ptr noundef, i32 noundef) #2

declare void @Vec3d_copy(ptr noundef, ptr noundef) #2

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 = { "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 = !{!"_Bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}


; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: nounwind uwtable
define dso_local noundef zeroext i1 @HTr_fromString(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = alloca [12 x double], align 16
  %4 = icmp eq ptr %0, null
  %5 = icmp eq ptr %1, null
  %or.cond = or i1 %4, %5
  br i1 %or.cond, label %16, label %6

6:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %3) #3
  %7 = call zeroext i1 @String_toDoubleArray_l(ptr noundef nonnull %1, ptr noundef nonnull %3, i32 noundef 12) #3
  br i1 %7, label %8, label %15

8:                                                ; preds = %6
  call void @Vec3d_copy(ptr noundef nonnull %0, ptr noundef nonnull %3) #3
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = getelementptr inbounds i8, ptr %3, i64 24
  call void @Vec3d_copy(ptr noundef nonnull %9, ptr noundef nonnull %10) #3
  %11 = getelementptr inbounds i8, ptr %0, i64 48
  %12 = getelementptr inbounds i8, ptr %3, i64 48
  call void @Vec3d_copy(ptr noundef nonnull %11, ptr noundef nonnull %12) #3
  %13 = getelementptr inbounds i8, ptr %0, i64 72
  %14 = getelementptr inbounds i8, ptr %3, i64 72
  call void @Vec3d_copy(ptr noundef nonnull %13, ptr noundef nonnull %14) #3
  br label %15

15:                                               ; preds = %8, %6
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %3) #3
  br label %16

16:                                               ; preds = %2, %15
  %.0 = phi i1 [ %7, %15 ], [ false, %2 ]
  ret i1 %.0
}

declare zeroext i1 @String_toDoubleArray_l(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @Vec3d_copy(ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress 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 = { "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)"}


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