; LLVM IR from jgaeddert/liquid-dsp :: src/framing/src (gmskframesync)

; 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.gmskframesync_s = type { ptr, i32, i32, float, ptr, ptr, %struct.framesyncstats_s, %struct.framedatastats_s, { float, float }, float, ptr, ptr, i32, float, float, i32, i32, float, ptr, float, float, float, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i8, i32, i32, i32, i32, i32, ptr, ptr, ptr, i32, i32, i32, i32, i32 }
%struct.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }
%struct.framedatastats_s = type { i32, i32, i32, i64 }

; Function Attrs: nounwind uwtable
define dso_local ptr @gmskframesync_create_set(i32 noundef %0, i32 noundef %1, float noundef %2, ptr noundef %3, ptr noundef %4) #0 {
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca float, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i8, align 1
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  store i32 %0, ptr %6, align 4, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !5
  store float %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !11
  store ptr %4, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %20 = call noalias ptr @malloc(i64 noundef 360) #6
  store ptr %20, ptr %11, align 8, !tbaa !11
  %21 = load ptr, ptr %9, align 8, !tbaa !11
  %22 = load ptr, ptr %11, align 8, !tbaa !11
  %23 = getelementptr inbounds %struct.gmskframesync_s, ptr %22, i32 0, i32 4
  store ptr %21, ptr %23, align 8, !tbaa !13
  %24 = load ptr, ptr %10, align 8, !tbaa !11
  %25 = load ptr, ptr %11, align 8, !tbaa !11
  %26 = getelementptr inbounds %struct.gmskframesync_s, ptr %25, i32 0, i32 5
  store ptr %24, ptr %26, align 8, !tbaa !18
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = load ptr, ptr %11, align 8, !tbaa !11
  %29 = getelementptr inbounds %struct.gmskframesync_s, ptr %28, i32 0, i32 1
  store i32 %27, ptr %29, align 8, !tbaa !19
  %30 = load i32, ptr %7, align 4, !tbaa !5
  %31 = load ptr, ptr %11, align 8, !tbaa !11
  %32 = getelementptr inbounds %struct.gmskframesync_s, ptr %31, i32 0, i32 2
  store i32 %30, ptr %32, align 4, !tbaa !20
  %33 = load float, ptr %8, align 4, !tbaa !9
  %34 = load ptr, ptr %11, align 8, !tbaa !11
  %35 = getelementptr inbounds %struct.gmskframesync_s, ptr %34, i32 0, i32 3
  store float %33, ptr %35, align 8, !tbaa !21
  %36 = load ptr, ptr %11, align 8, !tbaa !11
  %37 = getelementptr inbounds %struct.gmskframesync_s, ptr %36, i32 0, i32 3
  %38 = load float, ptr %37, align 8, !tbaa !21
  %39 = fadd float 1.000000e+00, %38
  %40 = fmul float 5.000000e-01, %39
  %41 = load ptr, ptr %11, align 8, !tbaa !11
  %42 = getelementptr inbounds %struct.gmskframesync_s, ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 8, !tbaa !19
  %44 = uitofp i32 %43 to float
  %45 = fdiv float %40, %44
  %46 = call ptr @iirfilt_crcf_create_lowpass(i32 noundef 3, float noundef %45)
  %47 = load ptr, ptr %11, align 8, !tbaa !11
  %48 = getelementptr inbounds %struct.gmskframesync_s, ptr %47, i32 0, i32 0
  store ptr %46, ptr %48, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %49 = load ptr, ptr %11, align 8, !tbaa !11
  %50 = getelementptr inbounds %struct.gmskframesync_s, ptr %49, i32 0, i32 24
  store i32 63, ptr %50, align 8, !tbaa !23
  %51 = load ptr, ptr %11, align 8, !tbaa !11
  %52 = getelementptr inbounds %struct.gmskframesync_s, ptr %51, i32 0, i32 24
  %53 = load i32, ptr %52, align 8, !tbaa !23
  %54 = zext i32 %53 to i64
  %55 = mul i64 %54, 4
  %56 = call noalias ptr @malloc(i64 noundef %55) #6
  %57 = load ptr, ptr %11, align 8, !tbaa !11
  %58 = getelementptr inbounds %struct.gmskframesync_s, ptr %57, i32 0, i32 25
  store ptr %56, ptr %58, align 8, !tbaa !24
  %59 = load ptr, ptr %11, align 8, !tbaa !11
  %60 = getelementptr inbounds %struct.gmskframesync_s, ptr %59, i32 0, i32 24
  %61 = load i32, ptr %60, align 8, !tbaa !23
  %62 = zext i32 %61 to i64
  %63 = mul i64 %62, 4
  %64 = call noalias ptr @malloc(i64 noundef %63) #6
  %65 = load ptr, ptr %11, align 8, !tbaa !11
  %66 = getelementptr inbounds %struct.gmskframesync_s, ptr %65, i32 0, i32 26
  store ptr %64, ptr %66, align 8, !tbaa !25
  %67 = load ptr, ptr %11, align 8, !tbaa !11
  %68 = getelementptr inbounds %struct.gmskframesync_s, ptr %67, i32 0, i32 24
  %69 = load i32, ptr %68, align 8, !tbaa !23
  %70 = load ptr, ptr %11, align 8, !tbaa !11
  %71 = getelementptr inbounds %struct.gmskframesync_s, ptr %70, i32 0, i32 1
  %72 = load i32, ptr %71, align 8, !tbaa !19
  %73 = mul i32 %69, %72
  %74 = zext i32 %73 to i64
  %75 = call ptr @llvm.stacksave.p0()
  store ptr %75, ptr %13, align 8
  %76 = alloca { float, float }, i64 %74, align 16
  store i64 %74, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %77 = call ptr @msequence_create(i32 noundef 6, i32 noundef 109, i32 noundef 1)
  store ptr %77, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %78 = load ptr, ptr %11, align 8, !tbaa !11
  %79 = getelementptr inbounds %struct.gmskframesync_s, ptr %78, i32 0, i32 1
  %80 = load i32, ptr %79, align 8, !tbaa !19
  %81 = load ptr, ptr %11, align 8, !tbaa !11
  %82 = getelementptr inbounds %struct.gmskframesync_s, ptr %81, i32 0, i32 2
  %83 = load i32, ptr %82, align 4, !tbaa !20
  %84 = load ptr, ptr %11, align 8, !tbaa !11
  %85 = getelementptr inbounds %struct.gmskframesync_s, ptr %84, i32 0, i32 3
  %86 = load float, ptr %85, align 8, !tbaa !21
  %87 = call ptr @gmskmod_create(i32 noundef %80, i32 noundef %83, float noundef %86)
  store ptr %87, ptr %16, align 8, !tbaa !11
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %148, %5
  %89 = load i32, ptr %12, align 4, !tbaa !5
  %90 = load ptr, ptr %11, align 8, !tbaa !11
  %91 = getelementptr inbounds %struct.gmskframesync_s, ptr %90, i32 0, i32 24
  %92 = load i32, ptr %91, align 8, !tbaa !23
  %93 = load ptr, ptr %11, align 8, !tbaa !11
  %94 = getelementptr inbounds %struct.gmskframesync_s, ptr %93, i32 0, i32 2
  %95 = load i32, ptr %94, align 4, !tbaa !20
  %96 = add i32 %92, %95
  %97 = icmp ult i32 %89, %96
  br i1 %97, label %98, label %151

98:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  %99 = load ptr, ptr %15, align 8, !tbaa !11
  %100 = call i32 @msequence_advance(ptr noundef %99)
  %101 = trunc i32 %100 to i8
  store i8 %101, ptr %17, align 1, !tbaa !26
  %102 = load i32, ptr %12, align 4, !tbaa !5
  %103 = load ptr, ptr %11, align 8, !tbaa !11
  %104 = getelementptr inbounds %struct.gmskframesync_s, ptr %103, i32 0, i32 24
  %105 = load i32, ptr %104, align 8, !tbaa !23
  %106 = icmp ult i32 %102, %105
  br i1 %106, label %107, label %119

107:                                              ; preds = %98
  %108 = load i8, ptr %17, align 1, !tbaa !26
  %109 = zext i8 %108 to i32
  %110 = icmp ne i32 %109, 0
  %111 = zext i1 %110 to i64
  %112 = select i1 %110, float 1.000000e+00, float -1.000000e+00
  %113 = load ptr, ptr %11, align 8, !tbaa !11
  %114 = getelementptr inbounds %struct.gmskframesync_s, ptr %113, i32 0, i32 25
  %115 = load ptr, ptr %114, align 8, !tbaa !24
  %116 = load i32, ptr %12, align 4, !tbaa !5
  %117 = zext i32 %116 to i64
  %118 = getelementptr inbounds float, ptr %115, i64 %117
  store float %112, ptr %118, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %107, %98
  %120 = load i32, ptr %12, align 4, !tbaa !5
  %121 = load ptr, ptr %11, align 8, !tbaa !11
  %122 = getelementptr inbounds %struct.gmskframesync_s, ptr %121, i32 0, i32 2
  %123 = load i32, ptr %122, align 4, !tbaa !20
  %124 = icmp ult i32 %120, %123
  br i1 %124, label %125, label %131

125:                                              ; preds = %119
  %126 = load ptr, ptr %16, align 8, !tbaa !11
  %127 = load i8, ptr %17, align 1, !tbaa !26
  %128 = zext i8 %127 to i32
  %129 = getelementptr inbounds { float, float }, ptr %76, i64 0
  %130 = call i32 @gmskmod_modulate(ptr noundef %126, i32 noundef %128, ptr noundef %129)
  br label %147

131:                                              ; preds = %119
  %132 = load ptr, ptr %16, align 8, !tbaa !11
  %133 = load i8, ptr %17, align 1, !tbaa !26
  %134 = zext i8 %133 to i32
  %135 = load i32, ptr %12, align 4, !tbaa !5
  %136 = load ptr, ptr %11, align 8, !tbaa !11
  %137 = getelementptr inbounds %struct.gmskframesync_s, ptr %136, i32 0, i32 2
  %138 = load i32, ptr %137, align 4, !tbaa !20
  %139 = sub i32 %135, %138
  %140 = load ptr, ptr %11, align 8, !tbaa !11
  %141 = getelementptr inbounds %struct.gmskframesync_s, ptr %140, i32 0, i32 1
  %142 = load i32, ptr %141, align 8, !tbaa !19
  %143 = mul i32 %139, %142
  %144 = zext i32 %143 to i64
  %145 = getelementptr inbounds { float, float }, ptr %76, i64 %144
  %146 = call i32 @gmskmod_modulate(ptr noundef %132, i32 noundef %134, ptr noundef %145)
  br label %147

147:                                              ; preds = %131, %125
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %12, align 4, !tbaa !5
  %150 = add i32 %149, 1
  store i32 %150, ptr %12, align 4, !tbaa !5
  br label %88, !llvm.loop !27

151:                                              ; preds = %88
  %152 = load ptr, ptr %16, align 8, !tbaa !11
  %153 = call i32 @gmskmod_destroy(ptr noundef %152)
  %154 = load ptr, ptr %15, align 8, !tbaa !11
  %155 = call i32 @msequence_destroy(ptr noundef %154)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store float 5.000000e-01, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store float 0x3FA99999A0000000, ptr %19, align 4, !tbaa !9
  %156 = load ptr, ptr %11, align 8, !tbaa !11
  %157 = getelementptr inbounds %struct.gmskframesync_s, ptr %156, i32 0, i32 24
  %158 = load i32, ptr %157, align 8, !tbaa !23
  %159 = load ptr, ptr %11, align 8, !tbaa !11
  %160 = getelementptr inbounds %struct.gmskframesync_s, ptr %159, i32 0, i32 1
  %161 = load i32, ptr %160, align 8, !tbaa !19
  %162 = mul i32 %158, %161
  %163 = load float, ptr %18, align 4, !tbaa !9
  %164 = load float, ptr %19, align 4, !tbaa !9
  %165 = call ptr @detector_cccf_create(ptr noundef %76, i32 noundef %162, float noundef %163, float noundef %164)
  %166 = load ptr, ptr %11, align 8, !tbaa !11
  %167 = getelementptr inbounds %struct.gmskframesync_s, ptr %166, i32 0, i32 18
  store ptr %165, ptr %167, align 8, !tbaa !29
  %168 = load ptr, ptr %11, align 8, !tbaa !11
  %169 = getelementptr inbounds %struct.gmskframesync_s, ptr %168, i32 0, i32 1
  %170 = load i32, ptr %169, align 8, !tbaa !19
  %171 = load ptr, ptr %11, align 8, !tbaa !11
  %172 = getelementptr inbounds %struct.gmskframesync_s, ptr %171, i32 0, i32 24
  %173 = load i32, ptr %172, align 8, !tbaa !23
  %174 = load ptr, ptr %11, align 8, !tbaa !11
  %175 = getelementptr inbounds %struct.gmskframesync_s, ptr %174, i32 0, i32 2
  %176 = load i32, ptr %175, align 4, !tbaa !20
  %177 = add i32 %173, %176
  %178 = mul i32 %170, %177
  %179 = call ptr @windowcf_create(i32 noundef %178)
  %180 = load ptr, ptr %11, align 8, !tbaa !11
  %181 = getelementptr inbounds %struct.gmskframesync_s, ptr %180, i32 0, i32 22
  store ptr %179, ptr %181, align 8, !tbaa !30
  %182 = load ptr, ptr %11, align 8, !tbaa !11
  %183 = getelementptr inbounds %struct.gmskframesync_s, ptr %182, i32 0, i32 12
  store i32 32, ptr %183, align 8, !tbaa !31
  %184 = load ptr, ptr %11, align 8, !tbaa !11
  %185 = getelementptr inbounds %struct.gmskframesync_s, ptr %184, i32 0, i32 12
  %186 = load i32, ptr %185, align 8, !tbaa !31
  %187 = load ptr, ptr %11, align 8, !tbaa !11
  %188 = getelementptr inbounds %struct.gmskframesync_s, ptr %187, i32 0, i32 1
  %189 = load i32, ptr %188, align 8, !tbaa !19
  %190 = load ptr, ptr %11, align 8, !tbaa !11
  %191 = getelementptr inbounds %struct.gmskframesync_s, ptr %190, i32 0, i32 2
  %192 = load i32, ptr %191, align 4, !tbaa !20
  %193 = load ptr, ptr %11, align 8, !tbaa !11
  %194 = getelementptr inbounds %struct.gmskframesync_s, ptr %193, i32 0, i32 3
  %195 = load float, ptr %194, align 8, !tbaa !21
  %196 = call ptr @firpfb_rrrf_create_rnyquist(i32 noundef 12, i32 noundef %186, i32 noundef %189, i32 noundef %192, float noundef %195)
  %197 = load ptr, ptr %11, align 8, !tbaa !11
  %198 = getelementptr inbounds %struct.gmskframesync_s, ptr %197, i32 0, i32 10
  store ptr %196, ptr %198, align 8, !tbaa !32
  %199 = load ptr, ptr %11, align 8, !tbaa !11
  %200 = getelementptr inbounds %struct.gmskframesync_s, ptr %199, i32 0, i32 12
  %201 = load i32, ptr %200, align 8, !tbaa !31
  %202 = load ptr, ptr %11, align 8, !tbaa !11
  %203 = getelementptr inbounds %struct.gmskframesync_s, ptr %202, i32 0, i32 1
  %204 = load i32, ptr %203, align 8, !tbaa !19
  %205 = load ptr, ptr %11, align 8, !tbaa !11
  %206 = getelementptr inbounds %struct.gmskframesync_s, ptr %205, i32 0, i32 2
  %207 = load i32, ptr %206, align 4, !tbaa !20
  %208 = load ptr, ptr %11, align 8, !tbaa !11
  %209 = getelementptr inbounds %struct.gmskframesync_s, ptr %208, i32 0, i32 3
  %210 = load float, ptr %209, align 8, !tbaa !21
  %211 = call ptr @firpfb_rrrf_create_drnyquist(i32 noundef 12, i32 noundef %201, i32 noundef %204, i32 noundef %207, float noundef %210)
  %212 = load ptr, ptr %11, align 8, !tbaa !11
  %213 = getelementptr inbounds %struct.gmskframesync_s, ptr %212, i32 0, i32 11
  store ptr %211, ptr %213, align 8, !tbaa !33
  %214 = call ptr @nco_crcf_create(i32 noundef 0)
  %215 = load ptr, ptr %11, align 8, !tbaa !11
  %216 = getelementptr inbounds %struct.gmskframesync_s, ptr %215, i32 0, i32 23
  store ptr %214, ptr %216, align 8, !tbaa !34
  %217 = load ptr, ptr %11, align 8, !tbaa !11
  %218 = getelementptr inbounds %struct.gmskframesync_s, ptr %217, i32 0, i32 30
  store ptr null, ptr %218, align 8, !tbaa !35
  %219 = load ptr, ptr %11, align 8, !tbaa !11
  %220 = getelementptr inbounds %struct.gmskframesync_s, ptr %219, i32 0, i32 31
  store ptr null, ptr %220, align 8, !tbaa !36
  %221 = load ptr, ptr %11, align 8, !tbaa !11
  %222 = getelementptr inbounds %struct.gmskframesync_s, ptr %221, i32 0, i32 32
  store ptr null, ptr %222, align 8, !tbaa !37
  %223 = load ptr, ptr %11, align 8, !tbaa !11
  %224 = getelementptr inbounds %struct.gmskframesync_s, ptr %223, i32 0, i32 33
  store ptr null, ptr %224, align 8, !tbaa !38
  %225 = load ptr, ptr %11, align 8, !tbaa !11
  %226 = call i32 @gmskframesync_set_header_len(ptr noundef %225, i32 noundef 8)
  %227 = load ptr, ptr %11, align 8, !tbaa !11
  %228 = getelementptr inbounds %struct.gmskframesync_s, ptr %227, i32 0, i32 40
  store i32 1, ptr %228, align 8, !tbaa !39
  %229 = load ptr, ptr %11, align 8, !tbaa !11
  %230 = getelementptr inbounds %struct.gmskframesync_s, ptr %229, i32 0, i32 36
  store i32 6, ptr %230, align 8, !tbaa !40
  %231 = load ptr, ptr %11, align 8, !tbaa !11
  %232 = getelementptr inbounds %struct.gmskframesync_s, ptr %231, i32 0, i32 37
  store i32 1, ptr %232, align 4, !tbaa !41
  %233 = load ptr, ptr %11, align 8, !tbaa !11
  %234 = getelementptr inbounds %struct.gmskframesync_s, ptr %233, i32 0, i32 38
  store i32 1, ptr %234, align 8, !tbaa !42
  %235 = load ptr, ptr %11, align 8, !tbaa !11
  %236 = getelementptr inbounds %struct.gmskframesync_s, ptr %235, i32 0, i32 40
  %237 = load i32, ptr %236, align 8, !tbaa !39
  %238 = load ptr, ptr %11, align 8, !tbaa !11
  %239 = getelementptr inbounds %struct.gmskframesync_s, ptr %238, i32 0, i32 36
  %240 = load i32, ptr %239, align 8, !tbaa !40
  %241 = load ptr, ptr %11, align 8, !tbaa !11
  %242 = getelementptr inbounds %struct.gmskframesync_s, ptr %241, i32 0, i32 37
  %243 = load i32, ptr %242, align 4, !tbaa !41
  %244 = load ptr, ptr %11, align 8, !tbaa !11
  %245 = getelementptr inbounds %struct.gmskframesync_s, ptr %244, i32 0, i32 38
  %246 = load i32, ptr %245, align 8, !tbaa !42
  %247 = call ptr @packetizer_create(i32 noundef %237, i32 noundef %240, i32 noundef %243, i32 noundef %246)
  %248 = load ptr, ptr %11, align 8, !tbaa !11
  %249 = getelementptr inbounds %struct.gmskframesync_s, ptr %248, i32 0, i32 43
  store ptr %247, ptr %249, align 8, !tbaa !43
  %250 = load ptr, ptr %11, align 8, !tbaa !11
  %251 = getelementptr inbounds %struct.gmskframesync_s, ptr %250, i32 0, i32 43
  %252 = load ptr, ptr %251, align 8, !tbaa !43
  %253 = call i32 @packetizer_get_enc_msg_len(ptr noundef %252)
  %254 = load ptr, ptr %11, align 8, !tbaa !11
  %255 = getelementptr inbounds %struct.gmskframesync_s, ptr %254, i32 0, i32 39
  store i32 %253, ptr %255, align 4, !tbaa !44
  %256 = load ptr, ptr %11, align 8, !tbaa !11
  %257 = getelementptr inbounds %struct.gmskframesync_s, ptr %256, i32 0, i32 40
  %258 = load i32, ptr %257, align 8, !tbaa !39
  %259 = zext i32 %258 to i64
  %260 = mul i64 %259, 1
  %261 = call noalias ptr @malloc(i64 noundef %260) #6
  %262 = load ptr, ptr %11, align 8, !tbaa !11
  %263 = getelementptr inbounds %struct.gmskframesync_s, ptr %262, i32 0, i32 42
  store ptr %261, ptr %263, align 8, !tbaa !45
  %264 = load ptr, ptr %11, align 8, !tbaa !11
  %265 = getelementptr inbounds %struct.gmskframesync_s, ptr %264, i32 0, i32 39
  %266 = load i32, ptr %265, align 4, !tbaa !44
  %267 = zext i32 %266 to i64
  %268 = mul i64 %267, 1
  %269 = call noalias ptr @malloc(i64 noundef %268) #6
  %270 = load ptr, ptr %11, align 8, !tbaa !11
  %271 = getelementptr inbounds %struct.gmskframesync_s, ptr %270, i32 0, i32 41
  store ptr %269, ptr %271, align 8, !tbaa !46
  %272 = load ptr, ptr %11, align 8, !tbaa !11
  %273 = call i32 @gmskframesync_reset(ptr noundef %272)
  %274 = load ptr, ptr %11, align 8, !tbaa !11
  %275 = call i32 @gmskframesync_reset_framedatastats(ptr noundef %274)
  %276 = load ptr, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  %277 = load ptr, ptr %13, align 8
  call void @llvm.stackrestore.p0(ptr %277)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  ret ptr %276
}

; 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

declare ptr @iirfilt_crcf_create_lowpass(i32 noundef, float noundef) #3

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

declare ptr @msequence_create(i32 noundef, i32 noundef, i32 noundef) #3

declare ptr @gmskmod_create(i32 noundef, i32 noundef, float noundef) #3

declare i32 @msequence_advance(ptr noundef) #3

declare i32 @gmskmod_modulate(ptr noundef, i32 noundef, ptr noundef) #3

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

declare i32 @gmskmod_destroy(ptr noundef) #3

declare i32 @msequence_destroy(ptr noundef) #3

declare ptr @detector_cccf_create(ptr noundef, i32 noundef, float noundef, float noundef) #3

declare ptr @windowcf_create(i32 noundef) #3

declare ptr @firpfb_rrrf_create_rnyquist(i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef) #3

declare ptr @firpfb_rrrf_create_drnyquist(i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef) #3

declare ptr @nco_crcf_create(i32 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @gmskframesync_set_header_len(ptr noundef, i32 noundef) #0

declare ptr @packetizer_create(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3

declare i32 @packetizer_get_enc_msg_len(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @gmskframesync_reset(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @gmskframesync_reset_framedatastats(ptr noundef) #0

; 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 = { 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 = { "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 = { nounwind }
attributes #6 = { 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, !12, i64 24}
!14 = !{!"gmskframesync_s", !12, i64 0, !6, i64 8, !6, i64 12, !10, i64 16, !12, i64 24, !12, i64 32, !15, i64 40, !16, i64 88, !7, i64 112, !10, i64 120, !12, i64 128, !12, i64 136, !6, i64 144, !10, i64 148, !10, i64 152, !6, i64 156, !6, i64 160, !10, i64 164, !12, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !12, i64 192, !12, i64 200, !6, i64 208, !12, i64 216, !12, i64 224, !6, i64 232, !6, i64 236, !6, i64 240, !12, i64 248, !12, i64 256, !12, i64 264, !12, i64 272, !6, i64 280, !7, i64 284, !6, i64 288, !6, i64 292, !6, i64 296, !6, i64 300, !6, i64 304, !12, i64 312, !12, i64 320, !12, i64 328, !6, i64 336, !6, i64 340, !6, i64 344, !6, i64 348, !6, i64 352}
!15 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !12, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44}
!16 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !17, i64 16}
!17 = !{!"long", !7, i64 0}
!18 = !{!14, !12, i64 32}
!19 = !{!14, !6, i64 8}
!20 = !{!14, !6, i64 12}
!21 = !{!14, !10, i64 16}
!22 = !{!14, !12, i64 0}
!23 = !{!14, !6, i64 208}
!24 = !{!14, !12, i64 216}
!25 = !{!14, !12, i64 224}
!26 = !{!7, !7, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!14, !12, i64 168}
!30 = !{!14, !12, i64 192}
!31 = !{!14, !6, i64 144}
!32 = !{!14, !12, i64 128}
!33 = !{!14, !12, i64 136}
!34 = !{!14, !12, i64 200}
!35 = !{!14, !12, i64 248}
!36 = !{!14, !12, i64 256}
!37 = !{!14, !12, i64 264}
!38 = !{!14, !12, i64 272}
!39 = !{!14, !6, i64 304}
!40 = !{!14, !6, i64 288}
!41 = !{!14, !6, i64 292}
!42 = !{!14, !6, i64 296}
!43 = !{!14, !12, i64 328}
!44 = !{!14, !6, i64 300}
!45 = !{!14, !12, i64 320}
!46 = !{!14, !12, i64 312}


; 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: nounwind uwtable
define dso_local noundef ptr @gmskframesync_create_set(i32 noundef %0, i32 noundef %1, float noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %6 = tail call noalias dereferenceable_or_null(360) ptr @malloc(i64 noundef 360) #4
  %7 = getelementptr inbounds i8, ptr %6, i64 24
  store ptr %3, ptr %7, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %6, i64 32
  store ptr %4, ptr %8, align 8, !tbaa !15
  %9 = getelementptr inbounds i8, ptr %6, i64 8
  store i32 %0, ptr %9, align 8, !tbaa !16
  %10 = getelementptr inbounds i8, ptr %6, i64 12
  store i32 %1, ptr %10, align 4, !tbaa !17
  %11 = getelementptr inbounds i8, ptr %6, i64 16
  store float %2, ptr %11, align 8, !tbaa !18
  %12 = fadd float %2, 1.000000e+00
  %13 = fmul float %12, 5.000000e-01
  %14 = uitofp i32 %0 to float
  %15 = fdiv float %13, %14
  %16 = tail call ptr @iirfilt_crcf_create_lowpass(i32 noundef 3, float noundef %15) #5
  store ptr %16, ptr %6, align 8, !tbaa !19
  %17 = getelementptr inbounds i8, ptr %6, i64 208
  store i32 63, ptr %17, align 8, !tbaa !20
  %18 = tail call noalias dereferenceable_or_null(252) ptr @malloc(i64 noundef 252) #4
  %19 = getelementptr inbounds i8, ptr %6, i64 216
  store ptr %18, ptr %19, align 8, !tbaa !21
  %20 = tail call noalias dereferenceable_or_null(252) ptr @malloc(i64 noundef 252) #4
  %21 = getelementptr inbounds i8, ptr %6, i64 224
  store ptr %20, ptr %21, align 8, !tbaa !22
  %22 = mul i32 %0, 63
  %23 = zext i32 %22 to i64
  %24 = alloca { float, float }, i64 %23, align 16
  %25 = tail call ptr @msequence_create(i32 noundef 6, i32 noundef 109, i32 noundef 1) #5
  %26 = tail call ptr @gmskmod_create(i32 noundef %0, i32 noundef %1, float noundef %2) #5
  %.not90 = icmp eq i32 %1, -63
  br i1 %.not90, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %5
  %27 = zext i32 %1 to i64
  %28 = add i32 %1, 63
  %29 = zext i32 %28 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %36
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %36 ]
  %30 = call i32 @msequence_advance(ptr noundef %25) #5
  %31 = icmp ult i64 %indvars.iv, 63
  br i1 %31, label %32, label %36

32:                                               ; preds = %.lr.ph
  %33 = and i32 %30, 255
  %.not = icmp eq i32 %33, 0
  %34 = select i1 %.not, float -1.000000e+00, float 1.000000e+00
  %35 = getelementptr inbounds float, ptr %18, i64 %indvars.iv
  store float %34, ptr %35, align 4, !tbaa !23
  br label %36

36:                                               ; preds = %32, %.lr.ph
  %37 = icmp ult i64 %indvars.iv, %27
  %38 = and i32 %30, 255
  %39 = trunc nuw i64 %indvars.iv to i32
  %40 = sub i32 %39, %1
  %41 = mul i32 %40, %0
  %42 = zext i32 %41 to i64
  %.sink.idx = select i1 %37, i64 0, i64 %42
  %.sink = getelementptr inbounds { float, float }, ptr %24, i64 %.sink.idx
  %43 = call i32 @gmskmod_modulate(ptr noundef %26, i32 noundef %38, ptr noundef nonnull %.sink) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %44 = icmp ult i64 %indvars.iv.next, %29
  br i1 %44, label %.lr.ph, label %._crit_edge, !llvm.loop !24

._crit_edge:                                      ; preds = %36, %5
  %.pre-phi = phi i32 [ 0, %5 ], [ %28, %36 ]
  %45 = call i32 @gmskmod_destroy(ptr noundef %26) #5
  %46 = call i32 @msequence_destroy(ptr noundef %25) #5
  %47 = call ptr @detector_cccf_create(ptr noundef nonnull %24, i32 noundef %22, float noundef 5.000000e-01, float noundef 0x3FA99999A0000000) #5
  %48 = getelementptr inbounds i8, ptr %6, i64 168
  store ptr %47, ptr %48, align 8, !tbaa !26
  %49 = mul i32 %.pre-phi, %0
  %50 = call ptr @windowcf_create(i32 noundef %49) #5
  %51 = getelementptr inbounds i8, ptr %6, i64 192
  store ptr %50, ptr %51, align 8, !tbaa !27
  %52 = getelementptr inbounds i8, ptr %6, i64 144
  store i32 32, ptr %52, align 8, !tbaa !28
  %53 = call ptr @firpfb_rrrf_create_rnyquist(i32 noundef 12, i32 noundef 32, i32 noundef %0, i32 noundef %1, float noundef %2) #5
  %54 = getelementptr inbounds i8, ptr %6, i64 128
  store ptr %53, ptr %54, align 8, !tbaa !29
  %55 = call ptr @firpfb_rrrf_create_drnyquist(i32 noundef 12, i32 noundef 32, i32 noundef %0, i32 noundef %1, float noundef %2) #5
  %56 = getelementptr inbounds i8, ptr %6, i64 136
  store ptr %55, ptr %56, align 8, !tbaa !30
  %57 = call ptr @nco_crcf_create(i32 noundef 0) #5
  %58 = getelementptr inbounds i8, ptr %6, i64 200
  store ptr %57, ptr %58, align 8, !tbaa !31
  %59 = getelementptr inbounds i8, ptr %6, i64 248
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %59, i8 0, i64 32, i1 false)
  %60 = call i32 @gmskframesync_set_header_len(ptr noundef nonnull %6, i32 noundef 8)
  %61 = getelementptr inbounds i8, ptr %6, i64 304
  store i32 1, ptr %61, align 8, !tbaa !32
  %62 = getelementptr inbounds i8, ptr %6, i64 288
  store i32 6, ptr %62, align 8, !tbaa !33
  %63 = getelementptr inbounds i8, ptr %6, i64 292
  store i32 1, ptr %63, align 4, !tbaa !34
  %64 = getelementptr inbounds i8, ptr %6, i64 296
  store i32 1, ptr %64, align 8, !tbaa !35
  %65 = call ptr @packetizer_create(i32 noundef 1, i32 noundef 6, i32 noundef 1, i32 noundef 1) #5
  %66 = getelementptr inbounds i8, ptr %6, i64 328
  store ptr %65, ptr %66, align 8, !tbaa !36
  %67 = call i32 @packetizer_get_enc_msg_len(ptr noundef %65) #5
  %68 = getelementptr inbounds i8, ptr %6, i64 300
  store i32 %67, ptr %68, align 4, !tbaa !37
  %69 = load i32, ptr %61, align 8, !tbaa !32
  %70 = zext i32 %69 to i64
  %71 = call noalias ptr @malloc(i64 noundef %70) #4
  %72 = getelementptr inbounds i8, ptr %6, i64 320
  store ptr %71, ptr %72, align 8, !tbaa !38
  %73 = zext i32 %67 to i64
  %74 = call noalias ptr @malloc(i64 noundef %73) #4
  %75 = getelementptr inbounds i8, ptr %6, i64 312
  store ptr %74, ptr %75, align 8, !tbaa !39
  %76 = call i32 @gmskframesync_reset(ptr noundef nonnull %6)
  %77 = call i32 @gmskframesync_reset_framedatastats(ptr noundef nonnull %6)
  ret ptr %6
}

; 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

declare ptr @iirfilt_crcf_create_lowpass(i32 noundef, float noundef) local_unnamed_addr #2

declare ptr @msequence_create(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare ptr @gmskmod_create(i32 noundef, i32 noundef, float noundef) local_unnamed_addr #2

declare i32 @msequence_advance(ptr noundef) local_unnamed_addr #2

declare i32 @gmskmod_modulate(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @gmskmod_destroy(ptr noundef) local_unnamed_addr #2

declare i32 @msequence_destroy(ptr noundef) local_unnamed_addr #2

declare ptr @detector_cccf_create(ptr noundef, i32 noundef, float noundef, float noundef) local_unnamed_addr #2

declare ptr @windowcf_create(i32 noundef) local_unnamed_addr #2

declare ptr @firpfb_rrrf_create_rnyquist(i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #2

declare ptr @firpfb_rrrf_create_drnyquist(i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #2

declare ptr @nco_crcf_create(i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @gmskframesync_set_header_len(ptr noundef, i32 noundef) local_unnamed_addr #0

declare ptr @packetizer_create(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @packetizer_get_enc_msg_len(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @gmskframesync_reset(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @gmskframesync_reset_framedatastats(ptr noundef) local_unnamed_addr #0

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

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 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 = { "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 allocsize(0) }
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, !7, i64 24}
!6 = !{!"gmskframesync_s", !7, i64 0, !10, i64 8, !10, i64 12, !11, i64 16, !7, i64 24, !7, i64 32, !12, i64 40, !13, i64 88, !8, i64 112, !11, i64 120, !7, i64 128, !7, i64 136, !10, i64 144, !11, i64 148, !11, i64 152, !10, i64 156, !10, i64 160, !11, i64 164, !7, i64 168, !11, i64 176, !11, i64 180, !11, i64 184, !7, i64 192, !7, i64 200, !10, i64 208, !7, i64 216, !7, i64 224, !10, i64 232, !10, i64 236, !10, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !7, i64 272, !10, i64 280, !8, i64 284, !10, i64 288, !10, i64 292, !10, i64 296, !10, i64 300, !10, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !10, i64 352}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44}
!13 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !14, i64 16}
!14 = !{!"long", !8, i64 0}
!15 = !{!6, !7, i64 32}
!16 = !{!6, !10, i64 8}
!17 = !{!6, !10, i64 12}
!18 = !{!6, !11, i64 16}
!19 = !{!6, !7, i64 0}
!20 = !{!6, !10, i64 208}
!21 = !{!6, !7, i64 216}
!22 = !{!6, !7, i64 224}
!23 = !{!11, !11, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!6, !7, i64 168}
!27 = !{!6, !7, i64 192}
!28 = !{!6, !10, i64 144}
!29 = !{!6, !7, i64 128}
!30 = !{!6, !7, i64 136}
!31 = !{!6, !7, i64 200}
!32 = !{!6, !10, i64 304}
!33 = !{!6, !10, i64 288}
!34 = !{!6, !10, i64 292}
!35 = !{!6, !10, i64 296}
!36 = !{!6, !7, i64 328}
!37 = !{!6, !10, i64 300}
!38 = !{!6, !7, i64 320}
!39 = !{!6, !7, i64 312}


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass