; LLVM IR from Dynmi/AlexNet :: src (fc_layer)

; 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.fc_args = type { ptr, i16, i16, i16 }
%struct.fc_op = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i16 }

; 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: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #2

; Function Attrs: nounwind
declare i32 @pthread_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @pthread_join(i64 noundef, ptr noundef) #4

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #1

; Function Attrs: nounwind uwtable
define dso_local void @fc_op_backward(ptr noundef %0) #5 {
  %2 = alloca ptr, align 8
  %3 = alloca i16, align 2
  %4 = alloca %struct.fc_args, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i16, align 2
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %3) #6
  store i16 12, ptr %3, align 2, !tbaa !9
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.fc_op, ptr %11, i32 0, i32 9
  %13 = load i32, ptr %12, align 4, !tbaa !11
  %14 = load i16, ptr %3, align 2, !tbaa !9
  %15 = sext i16 %14 to i32
  %16 = icmp slt i32 %13, %15
  br i1 %16, label %17, label %27

17:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #6
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.fc_args, ptr %4, i32 0, i32 0
  store ptr %18, ptr %19, align 8, !tbaa !14
  %20 = getelementptr inbounds %struct.fc_args, ptr %4, i32 0, i32 2
  store i16 0, ptr %20, align 2, !tbaa !16
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.fc_op, ptr %21, i32 0, i32 9
  %23 = load i32, ptr %22, align 4, !tbaa !11
  %24 = trunc i32 %23 to i16
  %25 = getelementptr inbounds %struct.fc_args, ptr %4, i32 0, i32 3
  store i16 %24, ptr %25, align 4, !tbaa !17
  %26 = call ptr @pthread_fc_op_backward(ptr noundef %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #6
  br label %133

27:                                               ; preds = %1
  %28 = load i16, ptr %3, align 2, !tbaa !9
  %29 = sext i16 %28 to i32
  %30 = add nsw i32 %29, 1
  %31 = zext i32 %30 to i64
  %32 = call ptr @llvm.stacksave.p0()
  store ptr %32, ptr %5, align 8
  %33 = alloca %struct.fc_args, i64 %31, align 16
  store i64 %31, ptr %6, align 8
  %34 = load i16, ptr %3, align 2, !tbaa !9
  %35 = sext i16 %34 to i32
  %36 = add nsw i32 %35, 1
  %37 = zext i32 %36 to i64
  %38 = alloca i64, i64 %37, align 16
  store i64 %37, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 2, ptr %8) #6
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.fc_op, ptr %39, i32 0, i32 9
  %41 = load i32, ptr %40, align 4, !tbaa !11
  %42 = sitofp i32 %41 to double
  %43 = fmul double 1.000000e+00, %42
  %44 = load i16, ptr %3, align 2, !tbaa !9
  %45 = sext i16 %44 to i32
  %46 = sitofp i32 %45 to double
  %47 = fdiv double %43, %46
  %48 = call double @llvm.ceil.f64(double %47)
  %49 = fptosi double %48 to i16
  store i16 %49, ptr %8, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !18
  br label %50

50:                                               ; preds = %112, %27
  %51 = load i32, ptr %9, align 4, !tbaa !18
  %52 = load i16, ptr %3, align 2, !tbaa !9
  %53 = sext i16 %52 to i32
  %54 = icmp slt i32 %51, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %115

56:                                               ; preds = %50
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = load i32, ptr %9, align 4, !tbaa !18
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds %struct.fc_args, ptr %33, i64 %59
  %61 = getelementptr inbounds %struct.fc_args, ptr %60, i32 0, i32 0
  store ptr %57, ptr %61, align 16, !tbaa !14
  %62 = load i32, ptr %9, align 4, !tbaa !18
  %63 = load i16, ptr %8, align 2, !tbaa !9
  %64 = sext i16 %63 to i32
  %65 = mul nsw i32 %62, %64
  %66 = trunc i32 %65 to i16
  %67 = load i32, ptr %9, align 4, !tbaa !18
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds %struct.fc_args, ptr %33, i64 %68
  %70 = getelementptr inbounds %struct.fc_args, ptr %69, i32 0, i32 2
  store i16 %66, ptr %70, align 2, !tbaa !16
  %71 = load i32, ptr %9, align 4, !tbaa !18
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds %struct.fc_args, ptr %33, i64 %72
  %74 = getelementptr inbounds %struct.fc_args, ptr %73, i32 0, i32 2
  %75 = load i16, ptr %74, align 2, !tbaa !16
  %76 = sext i16 %75 to i32
  %77 = load i16, ptr %8, align 2, !tbaa !9
  %78 = sext i16 %77 to i32
  %79 = add nsw i32 %76, %78
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.fc_op, ptr %80, i32 0, i32 9
  %82 = load i32, ptr %81, align 4, !tbaa !11
  %83 = icmp slt i32 %79, %82
  br i1 %83, label %84, label %94

84:                                               ; preds = %56
  %85 = load i32, ptr %9, align 4, !tbaa !18
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds %struct.fc_args, ptr %33, i64 %86
  %88 = getelementptr inbounds %struct.fc_args, ptr %87, i32 0, i32 2
  %89 = load i16, ptr %88, align 2, !tbaa !16
  %90 = sext i16 %89 to i32
  %91 = load i16, ptr %8, align 2, !tbaa !9
  %92 = sext i16 %91 to i32
  %93 = add nsw i32 %90, %92
  br label %98

94:                                               ; preds = %56
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.fc_op, ptr %95, i32 0, i32 9
  %97 = load i32, ptr %96, align 4, !tbaa !11
  br label %98

98:                                               ; preds = %94, %84
  %99 = phi i32 [ %93, %84 ], [ %97, %94 ]
  %100 = trunc i32 %99 to i16
  %101 = load i32, ptr %9, align 4, !tbaa !18
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds %struct.fc_args, ptr %33, i64 %102
  %104 = getelementptr inbounds %struct.fc_args, ptr %103, i32 0, i32 3
  store i16 %100, ptr %104, align 4, !tbaa !17
  %105 = load i32, ptr %9, align 4, !tbaa !18
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i64, ptr %38, i64 %106
  %108 = load i32, ptr %9, align 4, !tbaa !18
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds %struct.fc_args, ptr %33, i64 %109
  %111 = call i32 @pthread_create(ptr noundef %107, ptr noundef null, ptr noundef @pthread_fc_op_backward, ptr noundef %110) #6
  br label %112

112:                                              ; preds = %98
  %113 = load i32, ptr %9, align 4, !tbaa !18
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %9, align 4, !tbaa !18
  br label %50, !llvm.loop !19

115:                                              ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !18
  br label %116

116:                                              ; preds = %128, %115
  %117 = load i32, ptr %10, align 4, !tbaa !18
  %118 = load i16, ptr %3, align 2, !tbaa !9
  %119 = sext i16 %118 to i32
  %120 = icmp slt i32 %117, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %131

122:                                              ; preds = %116
  %123 = load i32, ptr %10, align 4, !tbaa !18
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds i64, ptr %38, i64 %124
  %126 = load i64, ptr %125, align 8, !tbaa !21
  %127 = call i32 @pthread_join(i64 noundef %126, ptr noundef null)
  br label %128

128:                                              ; preds = %122
  %129 = load i32, ptr %10, align 4, !tbaa !18
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %10, align 4, !tbaa !18
  br label %116, !llvm.loop !23

131:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 2, ptr %8) #6
  %132 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %132)
  br label %133

133:                                              ; preds = %131, %17
  call void @llvm.lifetime.end.p0(i64 2, ptr %3) #6
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden ptr @pthread_fc_op_backward(ptr noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { "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 #5 = { 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 #6 = { 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 = !{!"short", !7, i64 0}
!11 = !{!12, !13, i64 68}
!12 = !{!"fc_op", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !13, i64 64, !13, i64 68, !10, i64 72}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"fc_args", !6, i64 0, !10, i64 8, !10, i64 10, !10, i64 12}
!16 = !{!15, !10, i64 10}
!17 = !{!15, !10, i64 12}
!18 = !{!13, !13, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !22, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = distinct !{!23, !20}


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

%struct.fc_args = type { ptr, i16, i16, i16 }

; 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: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #2

; Function Attrs: nounwind
declare i32 @pthread_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @pthread_join(i64 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #1

; Function Attrs: nounwind uwtable
define dso_local void @fc_op_backward(ptr noundef %0) local_unnamed_addr #5 {
  %2 = alloca %struct.fc_args, align 8
  %3 = getelementptr inbounds i8, ptr %0, i64 68
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp slt i32 %4, 12
  br i1 %5, label %6, label %.preheader.preheader

6:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #7
  store ptr %0, ptr %2, align 8, !tbaa !12
  %7 = getelementptr inbounds i8, ptr %2, i64 10
  store i16 0, ptr %7, align 2, !tbaa !14
  %8 = trunc i32 %4 to i16
  %9 = getelementptr inbounds i8, ptr %2, i64 12
  store i16 %8, ptr %9, align 4, !tbaa !15
  %10 = call ptr @pthread_fc_op_backward(ptr noundef nonnull %2)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #7
  br label %156

.preheader.preheader:                             ; preds = %1
  %11 = tail call ptr @llvm.stacksave.p0()
  %12 = alloca [13 x %struct.fc_args], align 16
  %13 = alloca [13 x i64], align 16
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = sitofp i32 %14 to double
  %16 = fdiv double %15, 1.200000e+01
  %17 = tail call double @llvm.ceil.f64(double %16)
  %18 = fptosi double %17 to i16
  %19 = sext i16 %18 to i32
  store ptr %0, ptr %12, align 16, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %12, i64 10
  store i16 0, ptr %20, align 2, !tbaa !14
  %. = tail call i32 @llvm.smin.i32(i32 %19, i32 %14)
  %21 = trunc i32 %. to i16
  %22 = getelementptr inbounds i8, ptr %12, i64 12
  store i16 %21, ptr %22, align 4, !tbaa !15
  %23 = call i32 @pthread_create(ptr noundef nonnull %13, ptr noundef null, ptr noundef nonnull @pthread_fc_op_backward, ptr noundef nonnull %12) #7
  %24 = getelementptr inbounds i8, ptr %12, i64 16
  store ptr %0, ptr %24, align 16, !tbaa !12
  %25 = getelementptr inbounds i8, ptr %12, i64 26
  store i16 %18, ptr %25, align 2, !tbaa !14
  %26 = shl nsw i32 %19, 1
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %..1 = call i32 @llvm.smin.i32(i32 %26, i32 %27)
  %28 = trunc i32 %..1 to i16
  %29 = getelementptr inbounds i8, ptr %12, i64 28
  store i16 %28, ptr %29, align 4, !tbaa !15
  %30 = getelementptr inbounds i8, ptr %13, i64 8
  %31 = call i32 @pthread_create(ptr noundef nonnull %30, ptr noundef null, ptr noundef nonnull @pthread_fc_op_backward, ptr noundef nonnull %24) #7
  %32 = getelementptr inbounds i8, ptr %12, i64 32
  store ptr %0, ptr %32, align 16, !tbaa !12
  %33 = shl i16 %18, 1
  %34 = getelementptr inbounds i8, ptr %12, i64 42
  store i16 %33, ptr %34, align 2, !tbaa !14
  %35 = sext i16 %33 to i32
  %36 = add nsw i32 %35, %19
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %..2 = call i32 @llvm.smin.i32(i32 %36, i32 %37)
  %38 = trunc i32 %..2 to i16
  %39 = getelementptr inbounds i8, ptr %12, i64 44
  store i16 %38, ptr %39, align 4, !tbaa !15
  %40 = getelementptr inbounds i8, ptr %13, i64 16
  %41 = call i32 @pthread_create(ptr noundef nonnull %40, ptr noundef null, ptr noundef nonnull @pthread_fc_op_backward, ptr noundef nonnull %32) #7
  %42 = getelementptr inbounds i8, ptr %12, i64 48
  store ptr %0, ptr %42, align 16, !tbaa !12
  %43 = mul i16 %18, 3
  %44 = getelementptr inbounds i8, ptr %12, i64 58
  store i16 %43, ptr %44, align 2, !tbaa !14
  %45 = sext i16 %43 to i32
  %46 = add nsw i32 %45, %19
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %..3 = call i32 @llvm.smin.i32(i32 %46, i32 %47)
  %48 = trunc i32 %..3 to i16
  %49 = getelementptr inbounds i8, ptr %12, i64 60
  store i16 %48, ptr %49, align 4, !tbaa !15
  %50 = getelementptr inbounds i8, ptr %13, i64 24
  %51 = call i32 @pthread_create(ptr noundef nonnull %50, ptr noundef null, ptr noundef nonnull @pthread_fc_op_backward, ptr noundef nonnull %42) #7
  %52 = getelementptr inbounds i8, ptr %12, i64 64
  store ptr %0, ptr %52, align 16, !tbaa !12
  %53 = shl i16 %18, 2
  %54 = getelementptr inbounds i8, ptr %12, i64 74
  store i16 %53, ptr %54, align 2, !tbaa !14
  %55 = sext i16 %53 to i32
  %56 = add nsw i32 %55, %19
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %..4 = call i32 @llvm.smin.i32(i32 %56, i32 %57)
  %58 = trunc i32 %..4 to i16
  %59 = getelementptr inbounds i8, ptr %12, i64 76
  store i16 %58, ptr %59, align 4, !tbaa !15
  %60 = getelementptr inbounds i8, ptr %13, i64 32
  %61 = call i32 @pthread_create(ptr noundef nonnull %60, ptr noundef null, ptr noundef nonnull @pthread_fc_op_backward, ptr noundef nonnull %52) #7
  %62 = getelementptr inbounds i8, ptr %12, i64 80
  store ptr %0, ptr %62, align 16, !tbaa !12
  %63 = mul i16 %18, 5
  %64 = getelementptr inbounds i8, ptr %12, i64 90
  store i16 %63, ptr %64, align 2, !tbaa !14
  %65 = sext i16 %63 to i32
  %66 = add nsw i32 %65, %19
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %..5 = call i32 @llvm.smin.i32(i32 %66, i32 %67)
  %68 = trunc i32 %..5 to i16
  %69 = getelementptr inbounds i8, ptr %12, i64 92
  store i16 %68, ptr %69, align 4, !tbaa !15
  %70 = getelementptr inbounds i8, ptr %13, i64 40
  %71 = call i32 @pthread_create(ptr noundef nonnull %70, ptr noundef null, ptr noundef nonnull @pthread_fc_op_backward, ptr noundef nonnull %62) #7
  %72 = getelementptr inbounds i8, ptr %12, i64 96
  store ptr %0, ptr %72, align 16, !tbaa !12
  %73 = mul i16 %18, 6
  %74 = getelementptr inbounds i8, ptr %12, i64 106
  store i16 %73, ptr %74, align 2, !tbaa !14
  %75 = sext i16 %73 to i32
  %76 = add nsw i32 %75, %19
  %77 = load i32, ptr %3, align 4, !tbaa !5
  %..6 = call i32 @llvm.smin.i32(i32 %76, i32 %77)
  %78 = trunc i32 %..6 to i16
  %79 = getelementptr inbounds i8, ptr %12, i64 108
  store i16 %78, ptr %79, align 4, !tbaa !15
  %80 = getelementptr inbounds i8, ptr %13, i64 48
  %81 = call i32 @pthread_create(ptr noundef nonnull %80, ptr noundef null, ptr noundef nonnull @pthread_fc_op_backward, ptr noundef nonnull %72) #7
  %82 = getelementptr inbounds i8, ptr %12, i64 112
  store ptr %0, ptr %82, align 16, !tbaa !12
  %83 = mul i16 %18, 7
  %84 = getelementptr inbounds i8, ptr %12, i64 122
  store i16 %83, ptr %84, align 2, !tbaa !14
  %85 = sext i16 %83 to i32
  %86 = add nsw i32 %85, %19
  %87 = load i32, ptr %3, align 4, !tbaa !5
  %..7 = call i32 @llvm.smin.i32(i32 %86, i32 %87)
  %88 = trunc i32 %..7 to i16
  %89 = getelementptr inbounds i8, ptr %12, i64 124
  store i16 %88, ptr %89, align 4, !tbaa !15
  %90 = getelementptr inbounds i8, ptr %13, i64 56
  %91 = call i32 @pthread_create(ptr noundef nonnull %90, ptr noundef null, ptr noundef nonnull @pthread_fc_op_backward, ptr noundef nonnull %82) #7
  %92 = getelementptr inbounds i8, ptr %12, i64 128
  store ptr %0, ptr %92, align 16, !tbaa !12
  %93 = shl i16 %18, 3
  %94 = getelementptr inbounds i8, ptr %12, i64 138
  store i16 %93, ptr %94, align 2, !tbaa !14
  %95 = sext i16 %93 to i32
  %96 = add nsw i32 %95, %19
  %97 = load i32, ptr %3, align 4, !tbaa !5
  %..8 = call i32 @llvm.smin.i32(i32 %96, i32 %97)
  %98 = trunc i32 %..8 to i16
  %99 = getelementptr inbounds i8, ptr %12, i64 140
  store i16 %98, ptr %99, align 4, !tbaa !15
  %100 = getelementptr inbounds i8, ptr %13, i64 64
  %101 = call i32 @pthread_create(ptr noundef nonnull %100, ptr noundef null, ptr noundef nonnull @pthread_fc_op_backward, ptr noundef nonnull %92) #7
  %102 = getelementptr inbounds i8, ptr %12, i64 144
  store ptr %0, ptr %102, align 16, !tbaa !12
  %103 = mul i16 %18, 9
  %104 = getelementptr inbounds i8, ptr %12, i64 154
  store i16 %103, ptr %104, align 2, !tbaa !14
  %105 = sext i16 %103 to i32
  %106 = add nsw i32 %105, %19
  %107 = load i32, ptr %3, align 4, !tbaa !5
  %..9 = call i32 @llvm.smin.i32(i32 %106, i32 %107)
  %108 = trunc i32 %..9 to i16
  %109 = getelementptr inbounds i8, ptr %12, i64 156
  store i16 %108, ptr %109, align 4, !tbaa !15
  %110 = getelementptr inbounds i8, ptr %13, i64 72
  %111 = call i32 @pthread_create(ptr noundef nonnull %110, ptr noundef null, ptr noundef nonnull @pthread_fc_op_backward, ptr noundef nonnull %102) #7
  %112 = getelementptr inbounds i8, ptr %12, i64 160
  store ptr %0, ptr %112, align 16, !tbaa !12
  %113 = mul i16 %18, 10
  %114 = getelementptr inbounds i8, ptr %12, i64 170
  store i16 %113, ptr %114, align 2, !tbaa !14
  %115 = sext i16 %113 to i32
  %116 = add nsw i32 %115, %19
  %117 = load i32, ptr %3, align 4, !tbaa !5
  %..10 = call i32 @llvm.smin.i32(i32 %116, i32 %117)
  %118 = trunc i32 %..10 to i16
  %119 = getelementptr inbounds i8, ptr %12, i64 172
  store i16 %118, ptr %119, align 4, !tbaa !15
  %120 = getelementptr inbounds i8, ptr %13, i64 80
  %121 = call i32 @pthread_create(ptr noundef nonnull %120, ptr noundef null, ptr noundef nonnull @pthread_fc_op_backward, ptr noundef nonnull %112) #7
  %122 = getelementptr inbounds i8, ptr %12, i64 176
  store ptr %0, ptr %122, align 16, !tbaa !12
  %123 = mul i16 %18, 11
  %124 = getelementptr inbounds i8, ptr %12, i64 186
  store i16 %123, ptr %124, align 2, !tbaa !14
  %125 = sext i16 %123 to i32
  %126 = add nsw i32 %125, %19
  %127 = load i32, ptr %3, align 4, !tbaa !5
  %..11 = call i32 @llvm.smin.i32(i32 %126, i32 %127)
  %128 = trunc i32 %..11 to i16
  %129 = getelementptr inbounds i8, ptr %12, i64 188
  store i16 %128, ptr %129, align 4, !tbaa !15
  %130 = getelementptr inbounds i8, ptr %13, i64 88
  %131 = call i32 @pthread_create(ptr noundef nonnull %130, ptr noundef null, ptr noundef nonnull @pthread_fc_op_backward, ptr noundef nonnull %122) #7
  %132 = load i64, ptr %13, align 16, !tbaa !16
  %133 = call i32 @pthread_join(i64 noundef %132, ptr noundef null) #7
  %134 = load i64, ptr %30, align 8, !tbaa !16
  %135 = call i32 @pthread_join(i64 noundef %134, ptr noundef null) #7
  %136 = load i64, ptr %40, align 16, !tbaa !16
  %137 = call i32 @pthread_join(i64 noundef %136, ptr noundef null) #7
  %138 = load i64, ptr %50, align 8, !tbaa !16
  %139 = call i32 @pthread_join(i64 noundef %138, ptr noundef null) #7
  %140 = load i64, ptr %60, align 16, !tbaa !16
  %141 = call i32 @pthread_join(i64 noundef %140, ptr noundef null) #7
  %142 = load i64, ptr %70, align 8, !tbaa !16
  %143 = call i32 @pthread_join(i64 noundef %142, ptr noundef null) #7
  %144 = load i64, ptr %80, align 16, !tbaa !16
  %145 = call i32 @pthread_join(i64 noundef %144, ptr noundef null) #7
  %146 = load i64, ptr %90, align 8, !tbaa !16
  %147 = call i32 @pthread_join(i64 noundef %146, ptr noundef null) #7
  %148 = load i64, ptr %100, align 16, !tbaa !16
  %149 = call i32 @pthread_join(i64 noundef %148, ptr noundef null) #7
  %150 = load i64, ptr %110, align 8, !tbaa !16
  %151 = call i32 @pthread_join(i64 noundef %150, ptr noundef null) #7
  %152 = load i64, ptr %120, align 16, !tbaa !16
  %153 = call i32 @pthread_join(i64 noundef %152, ptr noundef null) #7
  %154 = load i64, ptr %130, align 8, !tbaa !16
  %155 = call i32 @pthread_join(i64 noundef %154, ptr noundef null) #7
  call void @llvm.stackrestore.p0(ptr %11)
  br label %156

156:                                              ; preds = %.preheader.preheader, %6
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden ptr @pthread_fc_op_backward(ptr noundef) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { "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 #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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, !10, i64 68}
!6 = !{!"fc_op", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !10, i64 68, !11, i64 72}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"short", !8, i64 0}
!12 = !{!13, !7, i64 0}
!13 = !{!"fc_args", !7, i64 0, !11, i64 8, !11, i64 10, !11, i64 12}
!14 = !{!13, !11, i64 10}
!15 = !{!13, !11, i64 12}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass