; LLVM IR from trustwallet/wallet-core :: trezor-crypto/crypto/ed25519-donna (modm-donna-32bit)

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

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; 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
declare dso_local void @barrett_reduce256_modm(ptr noundef, ptr noundef, ptr noundef) #2

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

165:                                              ; preds = %3
  store i32 1, ptr %10, align 4
  br label %246

166:                                              ; preds = %3
  %167 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 7
  %168 = load i32, ptr %167, align 4, !tbaa !11
  %169 = lshr i32 %168, 24
  %170 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 8
  %171 = load i32, ptr %170, align 16, !tbaa !11
  %172 = shl i32 %171, 8
  %173 = or i32 %169, %172
  %174 = and i32 %173, 1073741823
  %175 = getelementptr inbounds [9 x i32], ptr %9, i64 0, i64 0
  store i32 %174, ptr %175, align 16, !tbaa !11
  %176 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 8
  %177 = load i32, ptr %176, align 16, !tbaa !11
  %178 = lshr i32 %177, 22
  %179 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 9
  %180 = load i32, ptr %179, align 4, !tbaa !11
  %181 = shl i32 %180, 10
  %182 = or i32 %178, %181
  %183 = and i32 %182, 1073741823
  %184 = getelementptr inbounds [9 x i32], ptr %9, i64 0, i64 1
  store i32 %183, ptr %184, align 4, !tbaa !11
  %185 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 9
  %186 = load i32, ptr %185, align 4, !tbaa !11
  %187 = lshr i32 %186, 20
  %188 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 10
  %189 = load i32, ptr %188, align 8, !tbaa !11
  %190 = shl i32 %189, 12
  %191 = or i32 %187, %190
  %192 = and i32 %191, 1073741823
  %193 = getelementptr inbounds [9 x i32], ptr %9, i64 0, i64 2
  store i32 %192, ptr %193, align 8, !tbaa !11
  %194 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 10
  %195 = load i32, ptr %194, align 8, !tbaa !11
  %196 = lshr i32 %195, 18
  %197 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 11
  %198 = load i32, ptr %197, align 4, !tbaa !11
  %199 = shl i32 %198, 14
  %200 = or i32 %196, %199
  %201 = and i32 %200, 1073741823
  %202 = getelementptr inbounds [9 x i32], ptr %9, i64 0, i64 3
  store i32 %201, ptr %202, align 4, !tbaa !11
  %203 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 11
  %204 = load i32, ptr %203, align 4, !tbaa !11
  %205 = lshr i32 %204, 16
  %206 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 12
  %207 = load i32, ptr %206, align 16, !tbaa !11
  %208 = shl i32 %207, 16
  %209 = or i32 %205, %208
  %210 = and i32 %209, 1073741823
  %211 = getelementptr inbounds [9 x i32], ptr %9, i64 0, i64 4
  store i32 %210, ptr %211, align 16, !tbaa !11
  %212 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 12
  %213 = load i32, ptr %212, align 16, !tbaa !11
  %214 = lshr i32 %213, 14
  %215 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 13
  %216 = load i32, ptr %215, align 4, !tbaa !11
  %217 = shl i32 %216, 18
  %218 = or i32 %214, %217
  %219 = and i32 %218, 1073741823
  %220 = getelementptr inbounds [9 x i32], ptr %9, i64 0, i64 5
  store i32 %219, ptr %220, align 4, !tbaa !11
  %221 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 13
  %222 = load i32, ptr %221, align 4, !tbaa !11
  %223 = lshr i32 %222, 12
  %224 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 14
  %225 = load i32, ptr %224, align 8, !tbaa !11
  %226 = shl i32 %225, 20
  %227 = or i32 %223, %226
  %228 = and i32 %227, 1073741823
  %229 = getelementptr inbounds [9 x i32], ptr %9, i64 0, i64 6
  store i32 %228, ptr %229, align 8, !tbaa !11
  %230 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 14
  %231 = load i32, ptr %230, align 8, !tbaa !11
  %232 = lshr i32 %231, 10
  %233 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 15
  %234 = load i32, ptr %233, align 4, !tbaa !11
  %235 = shl i32 %234, 22
  %236 = or i32 %232, %235
  %237 = and i32 %236, 1073741823
  %238 = getelementptr inbounds [9 x i32], ptr %9, i64 0, i64 7
  store i32 %237, ptr %238, align 4, !tbaa !11
  %239 = getelementptr inbounds [16 x i32], ptr %8, i64 0, i64 15
  %240 = load i32, ptr %239, align 4, !tbaa !11
  %241 = lshr i32 %240, 8
  %242 = getelementptr inbounds [9 x i32], ptr %9, i64 0, i64 8
  store i32 %241, ptr %242, align 16, !tbaa !11
  %243 = load ptr, ptr %4, align 8, !tbaa !5
  %244 = getelementptr inbounds [9 x i32], ptr %9, i64 0, i64 0
  %245 = load ptr, ptr %4, align 8, !tbaa !5
  call void @barrett_reduce256_modm(ptr noundef %243, ptr noundef %244, ptr noundef %245)
  store i32 0, ptr %10, align 4
  br label %246

246:                                              ; preds = %166, %165
  call void @llvm.lifetime.end.p0(i64 36, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #5
  %247 = load i32, ptr %10, align 4
  switch i32 %247, label %249 [
    i32 0, label %248
    i32 1, label %248
  ]

248:                                              ; preds = %246, %246
  ret void

249:                                              ; preds = %246
  unreachable
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @U8TO32_LE(ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 #5 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}


; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; 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
declare dso_local void @barrett_reduce256_modm(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @expand256_modm(ptr noundef %0, ptr nocapture noundef readonly %1, i64 noundef %2) local_unnamed_addr #2 {
  %4 = alloca [64 x i8], align 16
  %5 = alloca [9 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %4, i8 0, i64 64, i1 false)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %5) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(36) %5, i8 0, i64 36, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %4, ptr align 1 %1, i64 %2, i1 false)
  %6 = call i32 @U8TO32_LE(ptr noundef nonnull %4)
  %7 = getelementptr inbounds i8, ptr %4, i64 4
  %8 = call i32 @U8TO32_LE(ptr noundef nonnull %7)
  %9 = getelementptr inbounds i8, ptr %4, i64 8
  %10 = call i32 @U8TO32_LE(ptr noundef nonnull %9)
  %11 = getelementptr inbounds i8, ptr %4, i64 12
  %12 = call i32 @U8TO32_LE(ptr noundef nonnull %11)
  %13 = getelementptr inbounds i8, ptr %4, i64 16
  %14 = call i32 @U8TO32_LE(ptr noundef nonnull %13)
  %15 = getelementptr inbounds i8, ptr %4, i64 20
  %16 = call i32 @U8TO32_LE(ptr noundef nonnull %15)
  %17 = getelementptr inbounds i8, ptr %4, i64 24
  %18 = call i32 @U8TO32_LE(ptr noundef nonnull %17)
  %19 = getelementptr inbounds i8, ptr %4, i64 28
  %20 = call i32 @U8TO32_LE(ptr noundef nonnull %19)
  %21 = getelementptr inbounds i8, ptr %4, i64 32
  %22 = call i32 @U8TO32_LE(ptr noundef nonnull %21)
  %23 = getelementptr inbounds i8, ptr %4, i64 36
  %24 = call i32 @U8TO32_LE(ptr noundef nonnull %23)
  %25 = getelementptr inbounds i8, ptr %4, i64 40
  %26 = call i32 @U8TO32_LE(ptr noundef nonnull %25)
  %27 = getelementptr inbounds i8, ptr %4, i64 44
  %28 = call i32 @U8TO32_LE(ptr noundef nonnull %27)
  %29 = getelementptr inbounds i8, ptr %4, i64 48
  %30 = call i32 @U8TO32_LE(ptr noundef nonnull %29)
  %31 = getelementptr inbounds i8, ptr %4, i64 52
  %32 = call i32 @U8TO32_LE(ptr noundef nonnull %31)
  %33 = getelementptr inbounds i8, ptr %4, i64 56
  %34 = call i32 @U8TO32_LE(ptr noundef nonnull %33)
  %35 = getelementptr inbounds i8, ptr %4, i64 60
  %36 = call i32 @U8TO32_LE(ptr noundef nonnull %35)
  %37 = and i32 %6, 1073741823
  store i32 %37, ptr %0, align 4, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %0, i64 4
  %39 = insertelement <4 x i32> poison, i32 %10, i64 0
  %40 = insertelement <4 x i32> %39, i32 %12, i64 1
  %41 = insertelement <4 x i32> %40, i32 %14, i64 2
  %42 = insertelement <4 x i32> %41, i32 %8, i64 3
  %43 = shufflevector <4 x i32> %42, <4 x i32> poison, <4 x i32> <i32 3, i32 0, i32 1, i32 poison>
  %44 = insertelement <4 x i32> %43, i32 %6, i64 3
  %45 = call <4 x i32> @llvm.fshl.v4i32(<4 x i32> %42, <4 x i32> %44, <4 x i32> <i32 4, i32 6, i32 8, i32 2>)
  %46 = and <4 x i32> %45, <i32 1073741823, i32 1073741823, i32 1073741823, i32 1073741823>
  %47 = shufflevector <4 x i32> %46, <4 x i32> poison, <4 x i32> <i32 3, i32 0, i32 1, i32 2>
  store <4 x i32> %47, ptr %38, align 4, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %0, i64 20
  %49 = insertelement <4 x i32> poison, i32 %18, i64 0
  %50 = insertelement <4 x i32> %49, i32 %20, i64 1
  %51 = insertelement <4 x i32> %50, i32 %22, i64 2
  %52 = insertelement <4 x i32> %51, i32 %16, i64 3
  %53 = shufflevector <4 x i32> %52, <4 x i32> poison, <4 x i32> <i32 3, i32 0, i32 1, i32 poison>
  %54 = insertelement <4 x i32> %53, i32 %14, i64 3
  %55 = call <4 x i32> @llvm.fshl.v4i32(<4 x i32> %52, <4 x i32> %54, <4 x i32> <i32 12, i32 14, i32 16, i32 10>)
  %56 = and <4 x i32> %55, <i32 1073741823, i32 1073741823, i32 16777215, i32 1073741823>
  %57 = shufflevector <4 x i32> %56, <4 x i32> poison, <4 x i32> <i32 3, i32 0, i32 1, i32 2>
  store <4 x i32> %57, ptr %48, align 4, !tbaa !5
  %58 = icmp ult i64 %2, 32
  br i1 %58, label %81, label %59

59:                                               ; preds = %3
  %60 = insertelement <4 x i32> poison, i32 %24, i64 0
  %61 = insertelement <4 x i32> %60, i32 %26, i64 1
  %62 = insertelement <4 x i32> %61, i32 %28, i64 2
  %63 = insertelement <4 x i32> %62, i32 %22, i64 3
  %64 = shufflevector <4 x i32> %63, <4 x i32> poison, <4 x i32> <i32 3, i32 0, i32 1, i32 poison>
  %65 = insertelement <4 x i32> %64, i32 %20, i64 3
  %66 = call <4 x i32> @llvm.fshl.v4i32(<4 x i32> %63, <4 x i32> %65, <4 x i32> <i32 10, i32 12, i32 14, i32 8>)
  %67 = and <4 x i32> %66, <i32 1073741823, i32 1073741823, i32 1073741823, i32 1073741823>
  %68 = shufflevector <4 x i32> %67, <4 x i32> poison, <4 x i32> <i32 3, i32 0, i32 1, i32 2>
  store <4 x i32> %68, ptr %5, align 16, !tbaa !5
  %69 = insertelement <4 x i32> poison, i32 %32, i64 0
  %70 = insertelement <4 x i32> %69, i32 %34, i64 1
  %71 = insertelement <4 x i32> %70, i32 %36, i64 2
  %72 = insertelement <4 x i32> %71, i32 %30, i64 3
  %73 = shufflevector <4 x i32> %72, <4 x i32> poison, <4 x i32> <i32 3, i32 0, i32 1, i32 poison>
  %74 = insertelement <4 x i32> %73, i32 %28, i64 3
  %75 = call <4 x i32> @llvm.fshl.v4i32(<4 x i32> %72, <4 x i32> %74, <4 x i32> <i32 18, i32 20, i32 22, i32 16>)
  %76 = getelementptr inbounds i8, ptr %5, i64 16
  %77 = and <4 x i32> %75, <i32 1073741823, i32 1073741823, i32 1073741823, i32 1073741823>
  %78 = shufflevector <4 x i32> %77, <4 x i32> poison, <4 x i32> <i32 3, i32 0, i32 1, i32 2>
  store <4 x i32> %78, ptr %76, align 16, !tbaa !5
  %79 = lshr i32 %36, 8
  %80 = getelementptr inbounds i8, ptr %5, i64 32
  store i32 %79, ptr %80, align 16, !tbaa !5
  call void @barrett_reduce256_modm(ptr noundef nonnull %0, ptr noundef nonnull %5, ptr noundef nonnull %0)
  br label %81

81:                                               ; preds = %3, %59
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #6
  ret void
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @U8TO32_LE(ptr noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.fshl.v4i32(<4 x i32>, <4 x i32>, <4 x i32>) #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


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