; LLVM IR from cryspen/libcrux :: sys/hacl/c/src (Hacl_HMAC)

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

@.str = external hidden unnamed_addr constant [70 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [76 x i8], align 1
@__const.Hacl_HMAC_compute_sha1.s = external hidden unnamed_addr constant [5 x i32], align 16

; Function Attrs: nounwind uwtable
define dso_local void @Hacl_HMAC_compute_sha1(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i8, align 1
  %20 = alloca i8, align 1
  %21 = alloca i64, align 8
  %22 = alloca i32, align 4
  %23 = alloca i8, align 1
  %24 = alloca i8, align 1
  %25 = alloca [5 x i32], align 16
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %struct.K___uint32_t_uint32_t_s, align 4
  %31 = alloca i32, align 4
  %32 = alloca %struct.K___uint32_t_uint32_t_s, align 4
  %33 = alloca %struct.K___uint32_t_uint32_t_s, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca %struct.K___uint32_t_uint32_t_s, align 4
  %44 = alloca i32, align 4
  %45 = alloca %struct.K___uint32_t_uint32_t_s, align 4
  %46 = alloca %struct.K___uint32_t_uint32_t_s, align 4
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca ptr, align 8
  %51 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 64, ptr %11, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %5
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = zext i32 %53 to i64
  %55 = icmp ugt i64 %54, -1
  br i1 %55, label %56, label %58

56:                                               ; preds = %52
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 50)
  call void @exit(i32 noundef 253) #8
  unreachable

58:                                               ; preds = %52
  br label %59

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %11, align 4, !tbaa !9
  %62 = zext i32 %61 to i64
  %63 = call ptr @llvm.stacksave.p0()
  store ptr %63, ptr %12, align 8
  %64 = alloca i8, i64 %62, align 16
  store i64 %62, ptr %13, align 8
  %65 = load i32, ptr %11, align 4, !tbaa !9
  %66 = zext i32 %65 to i64
  %67 = mul i64 %66, 1
  call void @llvm.memset.p0.i64(ptr align 16 %64, i8 0, i64 %67, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store ptr %64, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %68 = load i32, ptr %8, align 4, !tbaa !9
  %69 = icmp ule i32 %68, 64
  br i1 %69, label %70, label %72

70:                                               ; preds = %60
  %71 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %71, ptr %15, align 4, !tbaa !9
  br label %73

72:                                               ; preds = %60
  store i32 20, ptr %15, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %72, %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %74 = load i32, ptr %15, align 4, !tbaa !9
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds i8, ptr %64, i64 %75
  store ptr %76, ptr %16, align 8, !tbaa !5
  %77 = load ptr, ptr %16, align 8, !tbaa !5
  %78 = load i32, ptr %8, align 4, !tbaa !9
  %79 = icmp ule i32 %78, 64
  br i1 %79, label %80, label %86

80:                                               ; preds = %73
  %81 = load ptr, ptr %14, align 8, !tbaa !5
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = load i32, ptr %8, align 4, !tbaa !9
  %84 = zext i32 %83 to i64
  %85 = mul i64 %84, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %81, ptr align 1 %82, i64 %85, i1 false)
  br label %90

86:                                               ; preds = %73
  %87 = load ptr, ptr %14, align 8, !tbaa !5
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = load i32, ptr %8, align 4, !tbaa !9
  call void @Hacl_Hash_SHA1_hash_oneshot(ptr noundef %87, ptr noundef %88, i32 noundef %89)
  br label %90

90:                                               ; preds = %86, %80
  br label %91

91:                                               ; preds = %90
  %92 = load i32, ptr %11, align 4, !tbaa !9
  %93 = zext i32 %92 to i64
  %94 = icmp ugt i64 %93, -1
  br i1 %94, label %95, label %97

95:                                               ; preds = %91
  %96 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 73)
  call void @exit(i32 noundef 253) #8
  unreachable

97:                                               ; preds = %91
  br label %98

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %11, align 4, !tbaa !9
  %101 = zext i32 %100 to i64
  %102 = alloca i8, i64 %101, align 16
  store i64 %101, ptr %17, align 8
  %103 = load i32, ptr %11, align 4, !tbaa !9
  %104 = zext i32 %103 to i64
  %105 = mul i64 %104, 1
  call void @llvm.memset.p0.i64(ptr align 16 %102, i8 54, i64 %105, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %129, %99
  %107 = load i32, ptr %18, align 4, !tbaa !9
  %108 = load i32, ptr %11, align 4, !tbaa !9
  %109 = icmp ult i32 %107, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %132

111:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #7
  %112 = load i32, ptr %18, align 4, !tbaa !9
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds i8, ptr %102, i64 %113
  %115 = load i8, ptr %114, align 1, !tbaa !11
  store i8 %115, ptr %19, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #7
  %116 = load i32, ptr %18, align 4, !tbaa !9
  %117 = zext i32 %116 to i64
  %118 = getelementptr inbounds i8, ptr %64, i64 %117
  %119 = load i8, ptr %118, align 1, !tbaa !11
  store i8 %119, ptr %20, align 1, !tbaa !11
  %120 = load i8, ptr %19, align 1, !tbaa !11
  %121 = zext i8 %120 to i32
  %122 = load i8, ptr %20, align 1, !tbaa !11
  %123 = zext i8 %122 to i32
  %124 = xor i32 %121, %123
  %125 = trunc i32 %124 to i8
  %126 = load i32, ptr %18, align 4, !tbaa !9
  %127 = zext i32 %126 to i64
  %128 = getelementptr inbounds i8, ptr %102, i64 %127
  store i8 %125, ptr %128, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  br label %129

129:                                              ; preds = %111
  %130 = load i32, ptr %18, align 4, !tbaa !9
  %131 = add i32 %130, 1
  store i32 %131, ptr %18, align 4, !tbaa !9
  br label %106, !llvm.loop !12

132:                                              ; preds = %110
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %11, align 4, !tbaa !9
  %135 = zext i32 %134 to i64
  %136 = icmp ugt i64 %135, -1
  br i1 %136, label %137, label %139

137:                                              ; preds = %133
  %138 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 82)
  call void @exit(i32 noundef 253) #8
  unreachable

139:                                              ; preds = %133
  br label %140

140:                                              ; preds = %139
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %11, align 4, !tbaa !9
  %143 = zext i32 %142 to i64
  %144 = alloca i8, i64 %143, align 16
  store i64 %143, ptr %21, align 8
  %145 = load i32, ptr %11, align 4, !tbaa !9
  %146 = zext i32 %145 to i64
  %147 = mul i64 %146, 1
  call void @llvm.memset.p0.i64(ptr align 16 %144, i8 92, i64 %147, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %148

148:                                              ; preds = %171, %141
  %149 = load i32, ptr %22, align 4, !tbaa !9
  %150 = load i32, ptr %11, align 4, !tbaa !9
  %151 = icmp ult i32 %149, %150
  br i1 %151, label %153, label %152

152:                                              ; preds = %148
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %174

153:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #7
  %154 = load i32, ptr %22, align 4, !tbaa !9
  %155 = zext i32 %154 to i64
  %156 = getelementptr inbounds i8, ptr %144, i64 %155
  %157 = load i8, ptr %156, align 1, !tbaa !11
  store i8 %157, ptr %23, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #7
  %158 = load i32, ptr %22, align 4, !tbaa !9
  %159 = zext i32 %158 to i64
  %160 = getelementptr inbounds i8, ptr %64, i64 %159
  %161 = load i8, ptr %160, align 1, !tbaa !11
  store i8 %161, ptr %24, align 1, !tbaa !11
  %162 = load i8, ptr %23, align 1, !tbaa !11
  %163 = zext i8 %162 to i32
  %164 = load i8, ptr %24, align 1, !tbaa !11
  %165 = zext i8 %164 to i32
  %166 = xor i32 %163, %165
  %167 = trunc i32 %166 to i8
  %168 = load i32, ptr %22, align 4, !tbaa !9
  %169 = zext i32 %168 to i64
  %170 = getelementptr inbounds i8, ptr %144, i64 %169
  store i8 %167, ptr %170, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  br label %171

171:                                              ; preds = %153
  %172 = load i32, ptr %22, align 4, !tbaa !9
  %173 = add i32 %172, 1
  store i32 %173, ptr %22, align 4, !tbaa !9
  br label %148, !llvm.loop !14

174:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 20, ptr %25) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %25, ptr align 16 @__const.Hacl_HMAC_compute_sha1.s, i64 20, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  store ptr %102, ptr %26, align 8, !tbaa !5
  %175 = load i32, ptr %10, align 4, !tbaa !9
  %176 = icmp eq i32 %175, 0
  br i1 %176, label %177, label %179

177:                                              ; preds = %174
  %178 = getelementptr inbounds [5 x i32], ptr %25, i64 0, i64 0
  call void @Hacl_Hash_SHA1_update_last(ptr noundef %178, i64 noundef 0, ptr noundef %102, i32 noundef 64)
  br label %230

179:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 64, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %180 = load i32, ptr %10, align 4, !tbaa !9
  %181 = load i32, ptr %27, align 4, !tbaa !9
  %182 = udiv i32 %180, %181
  store i32 %182, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %183 = load i32, ptr %10, align 4, !tbaa !9
  %184 = load i32, ptr %27, align 4, !tbaa !9
  %185 = urem i32 %183, %184
  store i32 %185, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %186 = load i32, ptr %28, align 4, !tbaa !9
  %187 = icmp ugt i32 %186, 0
  br i1 %187, label %188, label %202

188:                                              ; preds = %179
  %189 = load i32, ptr %29, align 4, !tbaa !9
  %190 = icmp eq i32 %189, 0
  br i1 %190, label %191, label %202

191:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  %192 = load i32, ptr %28, align 4, !tbaa !9
  %193 = sub i32 %192, 1
  store i32 %193, ptr %31, align 4, !tbaa !9
  %194 = getelementptr inbounds %struct.K___uint32_t_uint32_t_s, ptr %32, i32 0, i32 0
  %195 = load i32, ptr %31, align 4, !tbaa !9
  store i32 %195, ptr %194, align 4, !tbaa !15
  %196 = getelementptr inbounds %struct.K___uint32_t_uint32_t_s, ptr %32, i32 0, i32 1
  %197 = load i32, ptr %10, align 4, !tbaa !9
  %198 = load i32, ptr %31, align 4, !tbaa !9
  %199 = load i32, ptr %27, align 4, !tbaa !9
  %200 = mul i32 %198, %199
  %201 = sub i32 %197, %200
  store i32 %201, ptr %196, align 4, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %32, i64 8, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %207

202:                                              ; preds = %188, %179
  %203 = getelementptr inbounds %struct.K___uint32_t_uint32_t_s, ptr %33, i32 0, i32 0
  %204 = load i32, ptr %28, align 4, !tbaa !9
  store i32 %204, ptr %203, align 4, !tbaa !15
  %205 = getelementptr inbounds %struct.K___uint32_t_uint32_t_s, ptr %33, i32 0, i32 1
  %206 = load i32, ptr %29, align 4, !tbaa !9
  store i32 %206, ptr %205, align 4, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %33, i64 8, i1 false), !tbaa.struct !18
  br label %207

207:                                              ; preds = %202, %191
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  %208 = getelementptr inbounds %struct.K___uint32_t_uint32_t_s, ptr %30, i32 0, i32 0
  %209 = load i32, ptr %208, align 4, !tbaa !15
  store i32 %209, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  %210 = getelementptr inbounds %struct.K___uint32_t_uint32_t_s, ptr %30, i32 0, i32 1
  %211 = load i32, ptr %210, align 4, !tbaa !17
  store i32 %211, ptr %35, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #7
  %212 = load i32, ptr %34, align 4, !tbaa !9
  %213 = load i32, ptr %27, align 4, !tbaa !9
  %214 = mul i32 %212, %213
  store i32 %214, ptr %36, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  %215 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %215, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %216 = load ptr, ptr %9, align 8, !tbaa !5
  %217 = load i32, ptr %36, align 4, !tbaa !9
  %218 = zext i32 %217 to i64
  %219 = getelementptr inbounds i8, ptr %216, i64 %218
  store ptr %219, ptr %38, align 8, !tbaa !5
  %220 = getelementptr inbounds [5 x i32], ptr %25, i64 0, i64 0
  call void @Hacl_Hash_SHA1_update_multi(ptr noundef %220, ptr noundef %102, i32 noundef 1)
  %221 = getelementptr inbounds [5 x i32], ptr %25, i64 0, i64 0
  %222 = load ptr, ptr %37, align 8, !tbaa !5
  %223 = load i32, ptr %34, align 4, !tbaa !9
  call void @Hacl_Hash_SHA1_update_multi(ptr noundef %221, ptr noundef %222, i32 noundef %223)
  %224 = getelementptr inbounds [5 x i32], ptr %25, i64 0, i64 0
  %225 = load i32, ptr %36, align 4, !tbaa !9
  %226 = zext i32 %225 to i64
  %227 = add i64 64, %226
  %228 = load ptr, ptr %38, align 8, !tbaa !5
  %229 = load i32, ptr %35, align 4, !tbaa !9
  call void @Hacl_Hash_SHA1_update_last(ptr noundef %224, i64 noundef %227, ptr noundef %228, i32 noundef %229)
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %230

230:                                              ; preds = %207, %177
  %231 = getelementptr inbounds [5 x i32], ptr %25, i64 0, i64 0
  %232 = load ptr, ptr %26, align 8, !tbaa !5
  call void @Hacl_Hash_SHA1_finish(ptr noundef %231, ptr noundef %232)
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  store ptr %102, ptr %39, align 8, !tbaa !5
  %233 = getelementptr inbounds [5 x i32], ptr %25, i64 0, i64 0
  call void @Hacl_Hash_SHA1_init(ptr noundef %233)
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #7
  store i32 64, ptr %40, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #7
  %234 = load i32, ptr %40, align 4, !tbaa !9
  %235 = udiv i32 20, %234
  store i32 %235, ptr %41, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #7
  %236 = load i32, ptr %40, align 4, !tbaa !9
  %237 = urem i32 20, %236
  store i32 %237, ptr %42, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #7
  %238 = load i32, ptr %41, align 4, !tbaa !9
  %239 = icmp ugt i32 %238, 0
  br i1 %239, label %240, label %253

240:                                              ; preds = %230
  %241 = load i32, ptr %42, align 4, !tbaa !9
  %242 = icmp eq i32 %241, 0
  br i1 %242, label %243, label %253

243:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #7
  %244 = load i32, ptr %41, align 4, !tbaa !9
  %245 = sub i32 %244, 1
  store i32 %245, ptr %44, align 4, !tbaa !9
  %246 = getelementptr inbounds %struct.K___uint32_t_uint32_t_s, ptr %45, i32 0, i32 0
  %247 = load i32, ptr %44, align 4, !tbaa !9
  store i32 %247, ptr %246, align 4, !tbaa !15
  %248 = getelementptr inbounds %struct.K___uint32_t_uint32_t_s, ptr %45, i32 0, i32 1
  %249 = load i32, ptr %44, align 4, !tbaa !9
  %250 = load i32, ptr %40, align 4, !tbaa !9
  %251 = mul i32 %249, %250
  %252 = sub i32 20, %251
  store i32 %252, ptr %248, align 4, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 4 %45, i64 8, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #7
  br label %258

253:                                              ; preds = %240, %230
  %254 = getelementptr inbounds %struct.K___uint32_t_uint32_t_s, ptr %46, i32 0, i32 0
  %255 = load i32, ptr %41, align 4, !tbaa !9
  store i32 %255, ptr %254, align 4, !tbaa !15
  %256 = getelementptr inbounds %struct.K___uint32_t_uint32_t_s, ptr %46, i32 0, i32 1
  %257 = load i32, ptr %42, align 4, !tbaa !9
  store i32 %257, ptr %256, align 4, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 4 %46, i64 8, i1 false), !tbaa.struct !18
  br label %258

258:                                              ; preds = %253, %243
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #7
  %259 = getelementptr inbounds %struct.K___uint32_t_uint32_t_s, ptr %43, i32 0, i32 0
  %260 = load i32, ptr %259, align 4, !tbaa !15
  store i32 %260, ptr %47, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #7
  %261 = getelementptr inbounds %struct.K___uint32_t_uint32_t_s, ptr %43, i32 0, i32 1
  %262 = load i32, ptr %261, align 4, !tbaa !17
  store i32 %262, ptr %48, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #7
  %263 = load i32, ptr %47, align 4, !tbaa !9
  %264 = load i32, ptr %40, align 4, !tbaa !9
  %265 = mul i32 %263, %264
  store i32 %265, ptr %49, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #7
  %266 = load ptr, ptr %39, align 8, !tbaa !5
  store ptr %266, ptr %50, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #7
  %267 = load ptr, ptr %39, align 8, !tbaa !5
  %268 = load i32, ptr %49, align 4, !tbaa !9
  %269 = zext i32 %268 to i64
  %270 = getelementptr inbounds i8, ptr %267, i64 %269
  store ptr %270, ptr %51, align 8, !tbaa !5
  %271 = getelementptr inbounds [5 x i32], ptr %25, i64 0, i64 0
  call void @Hacl_Hash_SHA1_update_multi(ptr noundef %271, ptr noundef %144, i32 noundef 1)
  %272 = getelementptr inbounds [5 x i32], ptr %25, i64 0, i64 0
  %273 = load ptr, ptr %50, align 8, !tbaa !5
  %274 = load i32, ptr %47, align 4, !tbaa !9
  call void @Hacl_Hash_SHA1_update_multi(ptr noundef %272, ptr noundef %273, i32 noundef %274)
  %275 = getelementptr inbounds [5 x i32], ptr %25, i64 0, i64 0
  %276 = load i32, ptr %49, align 4, !tbaa !9
  %277 = zext i32 %276 to i64
  %278 = add i64 64, %277
  %279 = load ptr, ptr %51, align 8, !tbaa !5
  %280 = load i32, ptr %48, align 4, !tbaa !9
  call void @Hacl_Hash_SHA1_update_last(ptr noundef %275, i64 noundef %278, ptr noundef %279, i32 noundef %280)
  %281 = getelementptr inbounds [5 x i32], ptr %25, i64 0, i64 0
  %282 = load ptr, ptr %6, align 8, !tbaa !5
  call void @Hacl_Hash_SHA1_finish(ptr noundef %281, ptr noundef %282)
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 20, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %283 = load ptr, ptr %12, align 8
  call void @llvm.stackrestore.p0(ptr %283)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  ret void
}

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

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

; 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) #6

declare void @Hacl_Hash_SHA1_hash_oneshot(ptr noundef, ptr noundef, i32 noundef) #2

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

declare void @Hacl_Hash_SHA1_update_last(ptr noundef, i64 noundef, ptr noundef, i32 noundef) #2

declare void @Hacl_Hash_SHA1_update_multi(ptr noundef, ptr noundef, i32 noundef) #2

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

declare void @Hacl_Hash_SHA1_init(ptr noundef) #2

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

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 = { "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 = { noreturn 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 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!16, !10, i64 0}
!16 = !{!"K___uint32_t_uint32_t_s", !10, i64 0, !10, i64 4}
!17 = !{!16, !10, i64 4}
!18 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}


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

@__const.Hacl_HMAC_compute_sha1.s = external hidden unnamed_addr constant [5 x i32], align 16

; Function Attrs: nounwind uwtable
define dso_local void @Hacl_HMAC_compute_sha1(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4) local_unnamed_addr #0 {
  %6 = alloca [5 x i32], align 16
  %7 = alloca [64 x i8], align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %7, i8 0, i64 64, i1 false)
  %8 = icmp ult i32 %2, 65
  br i1 %8, label %9, label %11

9:                                                ; preds = %5
  %10 = zext nneg i32 %2 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %7, ptr align 1 %1, i64 %10, i1 false)
  br label %vector.ph

11:                                               ; preds = %5
  call void @Hacl_Hash_SHA1_hash_oneshot(ptr noundef nonnull %7, ptr noundef %1, i32 noundef %2) #5
  br label %vector.ph

vector.ph:                                        ; preds = %11, %9
  %12 = alloca [64 x i8], align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %12, i8 54, i64 64, i1 false)
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  %wide.load = load <16 x i8>, ptr %12, align 16, !tbaa !5
  %wide.load106 = load <16 x i8>, ptr %13, align 16, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %7, i64 16
  %wide.load107 = load <16 x i8>, ptr %7, align 16, !tbaa !5
  %wide.load108 = load <16 x i8>, ptr %14, align 16, !tbaa !5
  %15 = xor <16 x i8> %wide.load107, %wide.load
  %16 = xor <16 x i8> %wide.load108, %wide.load106
  store <16 x i8> %15, ptr %12, align 16, !tbaa !5
  store <16 x i8> %16, ptr %13, align 16, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %12, i64 32
  %18 = getelementptr inbounds i8, ptr %12, i64 48
  %wide.load.1 = load <16 x i8>, ptr %17, align 16, !tbaa !5
  %wide.load106.1 = load <16 x i8>, ptr %18, align 16, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %7, i64 32
  %20 = getelementptr inbounds i8, ptr %7, i64 48
  %wide.load107.1 = load <16 x i8>, ptr %19, align 16, !tbaa !5
  %wide.load108.1 = load <16 x i8>, ptr %20, align 16, !tbaa !5
  %21 = xor <16 x i8> %wide.load107.1, %wide.load.1
  %22 = xor <16 x i8> %wide.load108.1, %wide.load106.1
  store <16 x i8> %21, ptr %17, align 16, !tbaa !5
  store <16 x i8> %22, ptr %18, align 16, !tbaa !5
  %23 = alloca [64 x i8], align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %23, i8 92, i64 64, i1 false)
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  %wide.load115 = load <16 x i8>, ptr %23, align 16, !tbaa !5
  %wide.load116 = load <16 x i8>, ptr %24, align 16, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %7, i64 16
  %wide.load117 = load <16 x i8>, ptr %7, align 16, !tbaa !5
  %wide.load118 = load <16 x i8>, ptr %25, align 16, !tbaa !5
  %26 = xor <16 x i8> %wide.load117, %wide.load115
  %27 = xor <16 x i8> %wide.load118, %wide.load116
  store <16 x i8> %26, ptr %23, align 16, !tbaa !5
  store <16 x i8> %27, ptr %24, align 16, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %23, i64 32
  %29 = getelementptr inbounds i8, ptr %23, i64 48
  %wide.load115.1 = load <16 x i8>, ptr %28, align 16, !tbaa !5
  %wide.load116.1 = load <16 x i8>, ptr %29, align 16, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %7, i64 32
  %31 = getelementptr inbounds i8, ptr %7, i64 48
  %wide.load117.1 = load <16 x i8>, ptr %30, align 16, !tbaa !5
  %wide.load118.1 = load <16 x i8>, ptr %31, align 16, !tbaa !5
  %32 = xor <16 x i8> %wide.load117.1, %wide.load115.1
  %33 = xor <16 x i8> %wide.load118.1, %wide.load116.1
  store <16 x i8> %32, ptr %28, align 16, !tbaa !5
  store <16 x i8> %33, ptr %29, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %6) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(20) %6, ptr noundef nonnull align 16 dereferenceable(20) @__const.Hacl_HMAC_compute_sha1.s, i64 20, i1 false)
  %34 = icmp eq i32 %4, 0
  br i1 %34, label %35, label %36

35:                                               ; preds = %vector.ph
  call void @Hacl_Hash_SHA1_update_last(ptr noundef nonnull %6, i64 noundef 0, ptr noundef nonnull %12, i32 noundef 64) #5
  br label %48

36:                                               ; preds = %vector.ph
  %37 = lshr i32 %4, 6
  %38 = and i32 %4, 63
  %39 = icmp ugt i32 %4, 63
  %40 = icmp eq i32 %38, 0
  %or.cond = and i1 %39, %40
  %41 = add nsw i32 %37, -1
  %42 = shl nuw i32 %41, 6
  %43 = sub i32 %4, %42
  %.sroa.038.0 = select i1 %or.cond, i32 %41, i32 %37
  %.sroa.539.0 = select i1 %or.cond, i32 %43, i32 %38
  %44 = shl nuw i32 %.sroa.038.0, 6
  %45 = zext i32 %44 to i64
  %46 = getelementptr inbounds i8, ptr %3, i64 %45
  call void @Hacl_Hash_SHA1_update_multi(ptr noundef nonnull %6, ptr noundef nonnull %12, i32 noundef 1) #5
  call void @Hacl_Hash_SHA1_update_multi(ptr noundef nonnull %6, ptr noundef %3, i32 noundef %.sroa.038.0) #5
  %47 = add nuw nsw i64 %45, 64
  call void @Hacl_Hash_SHA1_update_last(ptr noundef nonnull %6, i64 noundef %47, ptr noundef %46, i32 noundef %.sroa.539.0) #5
  br label %48

48:                                               ; preds = %36, %35
  call void @Hacl_Hash_SHA1_finish(ptr noundef nonnull %6, ptr noundef nonnull %12) #5
  call void @Hacl_Hash_SHA1_init(ptr noundef nonnull %6) #5
  call void @Hacl_Hash_SHA1_update_multi(ptr noundef nonnull %6, ptr noundef nonnull %23, i32 noundef 1) #5
  call void @Hacl_Hash_SHA1_update_multi(ptr noundef nonnull %6, ptr noundef nonnull %12, i32 noundef 0) #5
  call void @Hacl_Hash_SHA1_update_last(ptr noundef nonnull %6, i64 noundef 64, ptr noundef nonnull %12, i32 noundef 20) #5
  call void @Hacl_Hash_SHA1_finish(ptr noundef nonnull %6, ptr noundef %0) #5
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %6) #5
  ret void
}

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

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

; 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

declare void @Hacl_Hash_SHA1_hash_oneshot(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

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

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

declare void @Hacl_Hash_SHA1_update_multi(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

declare void @Hacl_Hash_SHA1_finish(ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @Hacl_Hash_SHA1_init(ptr noundef) local_unnamed_addr #4

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopLoadEliminationPass,LoopRotatePass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass