; LLVM IR from introlab/odas :: src/system (pitch2category)

; 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.pitch2category_obj = type { i32, float, float, float, float, float, float, float, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

; Function Attrs: nounwind uwtable
define dso_local ptr @pitch2category_construct_zero(i32 noundef %0, float noundef %1, float noundef %2, float noundef %3, float noundef %4, float noundef %5, float noundef %6, float noundef %7) #0 {
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca ptr, align 8
  store i32 %0, ptr %9, align 4, !tbaa !5
  store float %1, ptr %10, align 4, !tbaa !9
  store float %2, ptr %11, align 4, !tbaa !9
  store float %3, ptr %12, align 4, !tbaa !9
  store float %4, ptr %13, align 4, !tbaa !9
  store float %5, ptr %14, align 4, !tbaa !9
  store float %6, ptr %15, align 4, !tbaa !9
  store float %7, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %18 = call noalias ptr @malloc(i64 noundef 104) #5
  store ptr %18, ptr %17, align 8, !tbaa !11
  %19 = load i32, ptr %9, align 4, !tbaa !5
  %20 = load ptr, ptr %17, align 8, !tbaa !11
  %21 = getelementptr inbounds %struct.pitch2category_obj, ptr %20, i32 0, i32 0
  store i32 %19, ptr %21, align 8, !tbaa !13
  %22 = load float, ptr %10, align 4, !tbaa !9
  %23 = load ptr, ptr %17, align 8, !tbaa !11
  %24 = getelementptr inbounds %struct.pitch2category_obj, ptr %23, i32 0, i32 1
  store float %22, ptr %24, align 4, !tbaa !15
  %25 = load float, ptr %11, align 4, !tbaa !9
  %26 = load ptr, ptr %17, align 8, !tbaa !11
  %27 = getelementptr inbounds %struct.pitch2category_obj, ptr %26, i32 0, i32 2
  store float %25, ptr %27, align 8, !tbaa !16
  %28 = load float, ptr %12, align 4, !tbaa !9
  %29 = load ptr, ptr %17, align 8, !tbaa !11
  %30 = getelementptr inbounds %struct.pitch2category_obj, ptr %29, i32 0, i32 3
  store float %28, ptr %30, align 4, !tbaa !17
  %31 = load float, ptr %13, align 4, !tbaa !9
  %32 = load ptr, ptr %17, align 8, !tbaa !11
  %33 = getelementptr inbounds %struct.pitch2category_obj, ptr %32, i32 0, i32 4
  store float %31, ptr %33, align 8, !tbaa !18
  %34 = load float, ptr %14, align 4, !tbaa !9
  %35 = load ptr, ptr %17, align 8, !tbaa !11
  %36 = getelementptr inbounds %struct.pitch2category_obj, ptr %35, i32 0, i32 5
  store float %34, ptr %36, align 4, !tbaa !19
  %37 = load float, ptr %15, align 4, !tbaa !9
  %38 = load ptr, ptr %17, align 8, !tbaa !11
  %39 = getelementptr inbounds %struct.pitch2category_obj, ptr %38, i32 0, i32 6
  store float %37, ptr %39, align 8, !tbaa !20
  %40 = load float, ptr %16, align 4, !tbaa !9
  %41 = load ptr, ptr %17, align 8, !tbaa !11
  %42 = getelementptr inbounds %struct.pitch2category_obj, ptr %41, i32 0, i32 7
  store float %40, ptr %42, align 4, !tbaa !21
  %43 = load i32, ptr %9, align 4, !tbaa !5
  %44 = zext i32 %43 to i64
  %45 = mul i64 4, %44
  %46 = call noalias ptr @malloc(i64 noundef %45) #5
  %47 = load ptr, ptr %17, align 8, !tbaa !11
  %48 = getelementptr inbounds %struct.pitch2category_obj, ptr %47, i32 0, i32 8
  store ptr %46, ptr %48, align 8, !tbaa !22
  %49 = load ptr, ptr %17, align 8, !tbaa !11
  %50 = getelementptr inbounds %struct.pitch2category_obj, ptr %49, i32 0, i32 8
  %51 = load ptr, ptr %50, align 8, !tbaa !22
  %52 = load i32, ptr %9, align 4, !tbaa !5
  %53 = zext i32 %52 to i64
  %54 = mul i64 4, %53
  call void @llvm.memset.p0.i64(ptr align 4 %51, i8 0, i64 %54, i1 false)
  %55 = load i32, ptr %9, align 4, !tbaa !5
  %56 = zext i32 %55 to i64
  %57 = mul i64 4, %56
  %58 = call noalias ptr @malloc(i64 noundef %57) #5
  %59 = load ptr, ptr %17, align 8, !tbaa !11
  %60 = getelementptr inbounds %struct.pitch2category_obj, ptr %59, i32 0, i32 9
  store ptr %58, ptr %60, align 8, !tbaa !23
  %61 = load ptr, ptr %17, align 8, !tbaa !11
  %62 = getelementptr inbounds %struct.pitch2category_obj, ptr %61, i32 0, i32 9
  %63 = load ptr, ptr %62, align 8, !tbaa !23
  %64 = load i32, ptr %9, align 4, !tbaa !5
  %65 = zext i32 %64 to i64
  %66 = mul i64 4, %65
  call void @llvm.memset.p0.i64(ptr align 4 %63, i8 0, i64 %66, i1 false)
  %67 = load i32, ptr %9, align 4, !tbaa !5
  %68 = zext i32 %67 to i64
  %69 = mul i64 4, %68
  %70 = call noalias ptr @malloc(i64 noundef %69) #5
  %71 = load ptr, ptr %17, align 8, !tbaa !11
  %72 = getelementptr inbounds %struct.pitch2category_obj, ptr %71, i32 0, i32 10
  store ptr %70, ptr %72, align 8, !tbaa !24
  %73 = load ptr, ptr %17, align 8, !tbaa !11
  %74 = getelementptr inbounds %struct.pitch2category_obj, ptr %73, i32 0, i32 10
  %75 = load ptr, ptr %74, align 8, !tbaa !24
  %76 = load i32, ptr %9, align 4, !tbaa !5
  %77 = zext i32 %76 to i64
  %78 = mul i64 4, %77
  call void @llvm.memset.p0.i64(ptr align 4 %75, i8 0, i64 %78, i1 false)
  %79 = load i32, ptr %9, align 4, !tbaa !5
  %80 = zext i32 %79 to i64
  %81 = mul i64 4, %80
  %82 = call noalias ptr @malloc(i64 noundef %81) #5
  %83 = load ptr, ptr %17, align 8, !tbaa !11
  %84 = getelementptr inbounds %struct.pitch2category_obj, ptr %83, i32 0, i32 11
  store ptr %82, ptr %84, align 8, !tbaa !25
  %85 = load ptr, ptr %17, align 8, !tbaa !11
  %86 = getelementptr inbounds %struct.pitch2category_obj, ptr %85, i32 0, i32 11
  %87 = load ptr, ptr %86, align 8, !tbaa !25
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = zext i32 %88 to i64
  %90 = mul i64 4, %89
  call void @llvm.memset.p0.i64(ptr align 4 %87, i8 0, i64 %90, i1 false)
  %91 = load i32, ptr %9, align 4, !tbaa !5
  %92 = zext i32 %91 to i64
  %93 = mul i64 4, %92
  %94 = call noalias ptr @malloc(i64 noundef %93) #5
  %95 = load ptr, ptr %17, align 8, !tbaa !11
  %96 = getelementptr inbounds %struct.pitch2category_obj, ptr %95, i32 0, i32 12
  store ptr %94, ptr %96, align 8, !tbaa !26
  %97 = load ptr, ptr %17, align 8, !tbaa !11
  %98 = getelementptr inbounds %struct.pitch2category_obj, ptr %97, i32 0, i32 12
  %99 = load ptr, ptr %98, align 8, !tbaa !26
  %100 = load i32, ptr %9, align 4, !tbaa !5
  %101 = zext i32 %100 to i64
  %102 = mul i64 4, %101
  call void @llvm.memset.p0.i64(ptr align 4 %99, i8 0, i64 %102, i1 false)
  %103 = load i32, ptr %9, align 4, !tbaa !5
  %104 = zext i32 %103 to i64
  %105 = mul i64 4, %104
  %106 = call noalias ptr @malloc(i64 noundef %105) #5
  %107 = load ptr, ptr %17, align 8, !tbaa !11
  %108 = getelementptr inbounds %struct.pitch2category_obj, ptr %107, i32 0, i32 13
  store ptr %106, ptr %108, align 8, !tbaa !27
  %109 = load ptr, ptr %17, align 8, !tbaa !11
  %110 = getelementptr inbounds %struct.pitch2category_obj, ptr %109, i32 0, i32 13
  %111 = load ptr, ptr %110, align 8, !tbaa !27
  %112 = load i32, ptr %9, align 4, !tbaa !5
  %113 = zext i32 %112 to i64
  %114 = mul i64 4, %113
  call void @llvm.memset.p0.i64(ptr align 4 %111, i8 0, i64 %114, i1 false)
  %115 = load i32, ptr %9, align 4, !tbaa !5
  %116 = zext i32 %115 to i64
  %117 = mul i64 4, %116
  %118 = call noalias ptr @malloc(i64 noundef %117) #5
  %119 = load ptr, ptr %17, align 8, !tbaa !11
  %120 = getelementptr inbounds %struct.pitch2category_obj, ptr %119, i32 0, i32 14
  store ptr %118, ptr %120, align 8, !tbaa !28
  %121 = load ptr, ptr %17, align 8, !tbaa !11
  %122 = getelementptr inbounds %struct.pitch2category_obj, ptr %121, i32 0, i32 14
  %123 = load ptr, ptr %122, align 8, !tbaa !28
  %124 = load i32, ptr %9, align 4, !tbaa !5
  %125 = zext i32 %124 to i64
  %126 = mul i64 4, %125
  call void @llvm.memset.p0.i64(ptr align 4 %123, i8 0, i64 %126, i1 false)
  %127 = load i32, ptr %9, align 4, !tbaa !5
  %128 = zext i32 %127 to i64
  %129 = mul i64 4, %128
  %130 = call noalias ptr @malloc(i64 noundef %129) #5
  %131 = load ptr, ptr %17, align 8, !tbaa !11
  %132 = getelementptr inbounds %struct.pitch2category_obj, ptr %131, i32 0, i32 15
  store ptr %130, ptr %132, align 8, !tbaa !29
  %133 = load ptr, ptr %17, align 8, !tbaa !11
  %134 = getelementptr inbounds %struct.pitch2category_obj, ptr %133, i32 0, i32 15
  %135 = load ptr, ptr %134, align 8, !tbaa !29
  %136 = load i32, ptr %9, align 4, !tbaa !5
  %137 = zext i32 %136 to i64
  %138 = mul i64 4, %137
  call void @llvm.memset.p0.i64(ptr align 4 %135, i8 0, i64 %138, i1 false)
  %139 = load i32, ptr %9, align 4, !tbaa !5
  %140 = zext i32 %139 to i64
  %141 = mul i64 1, %140
  %142 = call noalias ptr @malloc(i64 noundef %141) #5
  %143 = load ptr, ptr %17, align 8, !tbaa !11
  %144 = getelementptr inbounds %struct.pitch2category_obj, ptr %143, i32 0, i32 16
  store ptr %142, ptr %144, align 8, !tbaa !30
  %145 = load ptr, ptr %17, align 8, !tbaa !11
  %146 = getelementptr inbounds %struct.pitch2category_obj, ptr %145, i32 0, i32 16
  %147 = load ptr, ptr %146, align 8, !tbaa !30
  %148 = load i32, ptr %9, align 4, !tbaa !5
  %149 = zext i32 %148 to i64
  %150 = mul i64 1, %149
  call void @llvm.memset.p0.i64(ptr align 1 %147, i8 0, i64 %150, i1 false)
  %151 = load ptr, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  ret ptr %151
}

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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 = { nounwind allocsize(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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind }
attributes #5 = { nounwind allocsize(0) }

!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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"pitch2category_obj", !6, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96}
!15 = !{!14, !10, i64 4}
!16 = !{!14, !10, i64 8}
!17 = !{!14, !10, i64 12}
!18 = !{!14, !10, i64 16}
!19 = !{!14, !10, i64 20}
!20 = !{!14, !10, i64 24}
!21 = !{!14, !10, i64 28}
!22 = !{!14, !12, i64 32}
!23 = !{!14, !12, i64 40}
!24 = !{!14, !12, i64 48}
!25 = !{!14, !12, i64 56}
!26 = !{!14, !12, i64 64}
!27 = !{!14, !12, i64 72}
!28 = !{!14, !12, i64 80}
!29 = !{!14, !12, i64 88}
!30 = !{!14, !12, i64 96}


; 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 nofree nounwind willreturn memory(write, argmem: none, inaccessiblemem: readwrite) uwtable
define dso_local noalias noundef ptr @pitch2category_construct_zero(i32 noundef %0, float noundef %1, float noundef %2, float noundef %3, float noundef %4, float noundef %5, float noundef %6, float noundef %7) local_unnamed_addr #0 {
  %9 = tail call noalias dereferenceable_or_null(104) ptr @malloc(i64 noundef 104) #3
  store i32 %0, ptr %9, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 4
  store float %1, ptr %10, align 4, !tbaa !12
  %11 = getelementptr inbounds i8, ptr %9, i64 8
  store float %2, ptr %11, align 8, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %9, i64 12
  store float %3, ptr %12, align 4, !tbaa !14
  %13 = getelementptr inbounds i8, ptr %9, i64 16
  store float %4, ptr %13, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %9, i64 20
  store float %5, ptr %14, align 4, !tbaa !16
  %15 = getelementptr inbounds i8, ptr %9, i64 24
  store float %6, ptr %15, align 8, !tbaa !17
  %16 = getelementptr inbounds i8, ptr %9, i64 28
  store float %7, ptr %16, align 4, !tbaa !18
  %17 = zext i32 %0 to i64
  %18 = shl nuw nsw i64 %17, 2
  %calloc = tail call ptr @calloc(i64 1, i64 %18)
  %19 = getelementptr inbounds i8, ptr %9, i64 32
  store ptr %calloc, ptr %19, align 8, !tbaa !19
  %calloc52 = tail call ptr @calloc(i64 1, i64 %18)
  %20 = getelementptr inbounds i8, ptr %9, i64 40
  store ptr %calloc52, ptr %20, align 8, !tbaa !20
  %calloc53 = tail call ptr @calloc(i64 1, i64 %18)
  %21 = getelementptr inbounds i8, ptr %9, i64 48
  store ptr %calloc53, ptr %21, align 8, !tbaa !21
  %calloc54 = tail call ptr @calloc(i64 1, i64 %18)
  %22 = getelementptr inbounds i8, ptr %9, i64 56
  store ptr %calloc54, ptr %22, align 8, !tbaa !22
  %calloc55 = tail call ptr @calloc(i64 1, i64 %18)
  %23 = getelementptr inbounds i8, ptr %9, i64 64
  store ptr %calloc55, ptr %23, align 8, !tbaa !23
  %calloc56 = tail call ptr @calloc(i64 1, i64 %18)
  %24 = getelementptr inbounds i8, ptr %9, i64 72
  store ptr %calloc56, ptr %24, align 8, !tbaa !24
  %calloc57 = tail call ptr @calloc(i64 1, i64 %18)
  %25 = getelementptr inbounds i8, ptr %9, i64 80
  store ptr %calloc57, ptr %25, align 8, !tbaa !25
  %calloc58 = tail call ptr @calloc(i64 1, i64 %18)
  %26 = getelementptr inbounds i8, ptr %9, i64 88
  store ptr %calloc58, ptr %26, align 8, !tbaa !26
  %calloc59 = tail call ptr @calloc(i64 1, i64 %17)
  %27 = getelementptr inbounds i8, ptr %9, i64 96
  store ptr %calloc59, ptr %27, align 8, !tbaa !27
  ret ptr %9
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nofree nounwind willreturn memory(write, argmem: none, inaccessiblemem: readwrite) 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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #3 = { nounwind allocsize(0) }

!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 = !{!"pitch2category_obj", !7, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !10, i64 4}
!13 = !{!6, !10, i64 8}
!14 = !{!6, !10, i64 12}
!15 = !{!6, !10, i64 16}
!16 = !{!6, !10, i64 20}
!17 = !{!6, !10, i64 24}
!18 = !{!6, !10, i64 28}
!19 = !{!6, !11, i64 32}
!20 = !{!6, !11, i64 40}
!21 = !{!6, !11, i64 48}
!22 = !{!6, !11, i64 56}
!23 = !{!6, !11, i64 64}
!24 = !{!6, !11, i64 72}
!25 = !{!6, !11, i64 80}
!26 = !{!6, !11, i64 88}
!27 = !{!6, !11, i64 96}


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