; LLVM IR from tezc/sc :: queue (queue_example)

; 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.sc_queue_int = type { i8, i64, i64, i64, ptr }

@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [27 x i8], align 1

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #1

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

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

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

; Function Attrs: nounwind uwtable
define dso_local void @example_int() #5 {
  %1 = alloca i32, align 4
  %2 = alloca %struct.sc_queue_int, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %2) #7
  br label %30

30:                                               ; preds = %0
  %31 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 0, ptr %31, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  store i64 8, ptr %32, align 8, !tbaa !12
  %33 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  store i64 0, ptr %33, align 8, !tbaa !13
  %34 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  store i64 0, ptr %34, align 8, !tbaa !14
  %35 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 32) #8
  %36 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  store ptr %35, ptr %36, align 8, !tbaa !15
  %37 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %38 = load ptr, ptr %37, align 8, !tbaa !15
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %42

40:                                               ; preds = %30
  %41 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 1, ptr %41, align 8, !tbaa !5
  br label %42

42:                                               ; preds = %40, %30
  br label %43

43:                                               ; preds = %42
  br label %44

44:                                               ; preds = %43
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %47 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  %48 = load i64, ptr %47, align 8, !tbaa !14
  %49 = add i64 %48, 1
  %50 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %51 = load i64, ptr %50, align 8, !tbaa !12
  %52 = sub i64 %51, 1
  %53 = and i64 %49, %52
  store i64 %53, ptr %6, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %54 = load i64, ptr %6, align 8, !tbaa !16
  %55 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %56 = load i64, ptr %55, align 8, !tbaa !13
  %57 = icmp eq i64 %54, %56
  br i1 %57, label %58, label %109

58:                                               ; preds = %46
  %59 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %60 = load i64, ptr %59, align 8, !tbaa !12
  %61 = icmp ugt i64 %60, 9223372036854775807
  br i1 %61, label %62, label %64

62:                                               ; preds = %58
  %63 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 1, ptr %63, align 8, !tbaa !5
  store i32 6, ptr %9, align 4
  br label %110

64:                                               ; preds = %58
  %65 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %66 = load i64, ptr %65, align 8, !tbaa !12
  %67 = mul i64 %66, 2
  store i64 %67, ptr %3, align 8, !tbaa !16
  %68 = load i64, ptr %3, align 8, !tbaa !16
  %69 = call noalias ptr @calloc(i64 noundef %68, i64 noundef 4) #8
  store ptr %69, ptr %7, align 8, !tbaa !17
  %70 = load ptr, ptr %7, align 8, !tbaa !17
  %71 = icmp eq ptr %70, null
  br i1 %71, label %72, label %74

72:                                               ; preds = %64
  %73 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 1, ptr %73, align 8, !tbaa !5
  store i32 6, ptr %9, align 4
  br label %110

74:                                               ; preds = %64
  %75 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %76 = load i64, ptr %75, align 8, !tbaa !12
  %77 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %78 = load i64, ptr %77, align 8, !tbaa !13
  %79 = sub i64 %76, %78
  %80 = mul i64 %79, 4
  store i64 %80, ptr %4, align 8, !tbaa !16
  %81 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %82 = load i64, ptr %81, align 8, !tbaa !13
  %83 = mul i64 %82, 4
  store i64 %83, ptr %5, align 8, !tbaa !16
  %84 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %85 = load ptr, ptr %84, align 8, !tbaa !15
  %86 = load i64, ptr %5, align 8, !tbaa !16
  %87 = getelementptr inbounds i8, ptr %85, i64 %86
  store ptr %87, ptr %8, align 8, !tbaa !17
  %88 = load ptr, ptr %7, align 8, !tbaa !17
  %89 = load ptr, ptr %8, align 8, !tbaa !17
  %90 = load i64, ptr %4, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %88, ptr align 1 %89, i64 %90, i1 false)
  %91 = load ptr, ptr %7, align 8, !tbaa !17
  %92 = load i64, ptr %4, align 8, !tbaa !16
  %93 = getelementptr inbounds i8, ptr %91, i64 %92
  %94 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %95 = load ptr, ptr %94, align 8, !tbaa !15
  %96 = load i64, ptr %5, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %93, ptr align 4 %95, i64 %96, i1 false)
  %97 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 0, ptr %97, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %99 = load i64, ptr %98, align 8, !tbaa !12
  %100 = sub i64 %99, 1
  %101 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  store i64 %100, ptr %101, align 8, !tbaa !14
  %102 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  store i64 0, ptr %102, align 8, !tbaa !13
  %103 = load i64, ptr %3, align 8, !tbaa !16
  %104 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  store i64 %103, ptr %104, align 8, !tbaa !12
  %105 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %106 = load ptr, ptr %105, align 8, !tbaa !15
  call void @free(ptr noundef %106) #7
  %107 = load ptr, ptr %7, align 8, !tbaa !17
  %108 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  store ptr %107, ptr %108, align 8, !tbaa !15
  br label %109

109:                                              ; preds = %74, %46
  store i32 0, ptr %9, align 4
  br label %110

110:                                              ; preds = %109, %72, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  %111 = load i32, ptr %9, align 4
  switch i32 %111, label %488 [
    i32 0, label %112
    i32 6, label %114
  ]

112:                                              ; preds = %110
  br label %113

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113, %110
  %115 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  %116 = load i8, ptr %115, align 8, !tbaa !5, !range !18, !noundef !19
  %117 = trunc i8 %116 to i1
  br i1 %117, label %118, label %119

118:                                              ; preds = %114
  br label %135

119:                                              ; preds = %114
  %120 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 0, ptr %120, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %122 = load ptr, ptr %121, align 8, !tbaa !15
  %123 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  %124 = load i64, ptr %123, align 8, !tbaa !14
  %125 = getelementptr inbounds i32, ptr %122, i64 %124
  store i32 2, ptr %125, align 4, !tbaa !20
  %126 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  %127 = load i64, ptr %126, align 8, !tbaa !14
  %128 = add i64 %127, 1
  %129 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %130 = load i64, ptr %129, align 8, !tbaa !12
  %131 = sub i64 %130, 1
  %132 = and i64 %128, %131
  %133 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  store i64 %132, ptr %133, align 8, !tbaa !14
  br label %134

134:                                              ; preds = %119
  br label %135

135:                                              ; preds = %134, %118
  br label %136

136:                                              ; preds = %135
  br label %137

137:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %138 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  %139 = load i64, ptr %138, align 8, !tbaa !14
  %140 = add i64 %139, 1
  %141 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %142 = load i64, ptr %141, align 8, !tbaa !12
  %143 = sub i64 %142, 1
  %144 = and i64 %140, %143
  store i64 %144, ptr %13, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %145 = load i64, ptr %13, align 8, !tbaa !16
  %146 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %147 = load i64, ptr %146, align 8, !tbaa !13
  %148 = icmp eq i64 %145, %147
  br i1 %148, label %149, label %200

149:                                              ; preds = %137
  %150 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %151 = load i64, ptr %150, align 8, !tbaa !12
  %152 = icmp ugt i64 %151, 9223372036854775807
  br i1 %152, label %153, label %155

153:                                              ; preds = %149
  %154 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 1, ptr %154, align 8, !tbaa !5
  store i32 10, ptr %9, align 4
  br label %201

155:                                              ; preds = %149
  %156 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %157 = load i64, ptr %156, align 8, !tbaa !12
  %158 = mul i64 %157, 2
  store i64 %158, ptr %10, align 8, !tbaa !16
  %159 = load i64, ptr %10, align 8, !tbaa !16
  %160 = call noalias ptr @calloc(i64 noundef %159, i64 noundef 4) #8
  store ptr %160, ptr %14, align 8, !tbaa !17
  %161 = load ptr, ptr %14, align 8, !tbaa !17
  %162 = icmp eq ptr %161, null
  br i1 %162, label %163, label %165

163:                                              ; preds = %155
  %164 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 1, ptr %164, align 8, !tbaa !5
  store i32 10, ptr %9, align 4
  br label %201

165:                                              ; preds = %155
  %166 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %167 = load i64, ptr %166, align 8, !tbaa !12
  %168 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %169 = load i64, ptr %168, align 8, !tbaa !13
  %170 = sub i64 %167, %169
  %171 = mul i64 %170, 4
  store i64 %171, ptr %11, align 8, !tbaa !16
  %172 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %173 = load i64, ptr %172, align 8, !tbaa !13
  %174 = mul i64 %173, 4
  store i64 %174, ptr %12, align 8, !tbaa !16
  %175 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %176 = load ptr, ptr %175, align 8, !tbaa !15
  %177 = load i64, ptr %12, align 8, !tbaa !16
  %178 = getelementptr inbounds i8, ptr %176, i64 %177
  store ptr %178, ptr %15, align 8, !tbaa !17
  %179 = load ptr, ptr %14, align 8, !tbaa !17
  %180 = load ptr, ptr %15, align 8, !tbaa !17
  %181 = load i64, ptr %11, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %179, ptr align 1 %180, i64 %181, i1 false)
  %182 = load ptr, ptr %14, align 8, !tbaa !17
  %183 = load i64, ptr %11, align 8, !tbaa !16
  %184 = getelementptr inbounds i8, ptr %182, i64 %183
  %185 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %186 = load ptr, ptr %185, align 8, !tbaa !15
  %187 = load i64, ptr %12, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %184, ptr align 4 %186, i64 %187, i1 false)
  %188 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 0, ptr %188, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %190 = load i64, ptr %189, align 8, !tbaa !12
  %191 = sub i64 %190, 1
  %192 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  store i64 %191, ptr %192, align 8, !tbaa !14
  %193 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  store i64 0, ptr %193, align 8, !tbaa !13
  %194 = load i64, ptr %10, align 8, !tbaa !16
  %195 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  store i64 %194, ptr %195, align 8, !tbaa !12
  %196 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %197 = load ptr, ptr %196, align 8, !tbaa !15
  call void @free(ptr noundef %197) #7
  %198 = load ptr, ptr %14, align 8, !tbaa !17
  %199 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  store ptr %198, ptr %199, align 8, !tbaa !15
  br label %200

200:                                              ; preds = %165, %137
  store i32 0, ptr %9, align 4
  br label %201

201:                                              ; preds = %200, %163, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %202 = load i32, ptr %9, align 4
  switch i32 %202, label %488 [
    i32 0, label %203
    i32 10, label %205
  ]

203:                                              ; preds = %201
  br label %204

204:                                              ; preds = %203
  br label %205

205:                                              ; preds = %204, %201
  %206 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  %207 = load i8, ptr %206, align 8, !tbaa !5, !range !18, !noundef !19
  %208 = trunc i8 %207 to i1
  br i1 %208, label %209, label %210

209:                                              ; preds = %205
  br label %226

210:                                              ; preds = %205
  %211 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 0, ptr %211, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %213 = load ptr, ptr %212, align 8, !tbaa !15
  %214 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  %215 = load i64, ptr %214, align 8, !tbaa !14
  %216 = getelementptr inbounds i32, ptr %213, i64 %215
  store i32 3, ptr %216, align 4, !tbaa !20
  %217 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  %218 = load i64, ptr %217, align 8, !tbaa !14
  %219 = add i64 %218, 1
  %220 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %221 = load i64, ptr %220, align 8, !tbaa !12
  %222 = sub i64 %221, 1
  %223 = and i64 %219, %222
  %224 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  store i64 %223, ptr %224, align 8, !tbaa !14
  br label %225

225:                                              ; preds = %210
  br label %226

226:                                              ; preds = %225, %209
  br label %227

227:                                              ; preds = %226
  br label %228

228:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %229 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  %230 = load i64, ptr %229, align 8, !tbaa !14
  %231 = add i64 %230, 1
  %232 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %233 = load i64, ptr %232, align 8, !tbaa !12
  %234 = sub i64 %233, 1
  %235 = and i64 %231, %234
  store i64 %235, ptr %19, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %236 = load i64, ptr %19, align 8, !tbaa !16
  %237 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %238 = load i64, ptr %237, align 8, !tbaa !13
  %239 = icmp eq i64 %236, %238
  br i1 %239, label %240, label %291

240:                                              ; preds = %228
  %241 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %242 = load i64, ptr %241, align 8, !tbaa !12
  %243 = icmp ugt i64 %242, 9223372036854775807
  br i1 %243, label %244, label %246

244:                                              ; preds = %240
  %245 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 1, ptr %245, align 8, !tbaa !5
  store i32 14, ptr %9, align 4
  br label %292

246:                                              ; preds = %240
  %247 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %248 = load i64, ptr %247, align 8, !tbaa !12
  %249 = mul i64 %248, 2
  store i64 %249, ptr %16, align 8, !tbaa !16
  %250 = load i64, ptr %16, align 8, !tbaa !16
  %251 = call noalias ptr @calloc(i64 noundef %250, i64 noundef 4) #8
  store ptr %251, ptr %20, align 8, !tbaa !17
  %252 = load ptr, ptr %20, align 8, !tbaa !17
  %253 = icmp eq ptr %252, null
  br i1 %253, label %254, label %256

254:                                              ; preds = %246
  %255 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 1, ptr %255, align 8, !tbaa !5
  store i32 14, ptr %9, align 4
  br label %292

256:                                              ; preds = %246
  %257 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %258 = load i64, ptr %257, align 8, !tbaa !12
  %259 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %260 = load i64, ptr %259, align 8, !tbaa !13
  %261 = sub i64 %258, %260
  %262 = mul i64 %261, 4
  store i64 %262, ptr %17, align 8, !tbaa !16
  %263 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %264 = load i64, ptr %263, align 8, !tbaa !13
  %265 = mul i64 %264, 4
  store i64 %265, ptr %18, align 8, !tbaa !16
  %266 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %267 = load ptr, ptr %266, align 8, !tbaa !15
  %268 = load i64, ptr %18, align 8, !tbaa !16
  %269 = getelementptr inbounds i8, ptr %267, i64 %268
  store ptr %269, ptr %21, align 8, !tbaa !17
  %270 = load ptr, ptr %20, align 8, !tbaa !17
  %271 = load ptr, ptr %21, align 8, !tbaa !17
  %272 = load i64, ptr %17, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %270, ptr align 1 %271, i64 %272, i1 false)
  %273 = load ptr, ptr %20, align 8, !tbaa !17
  %274 = load i64, ptr %17, align 8, !tbaa !16
  %275 = getelementptr inbounds i8, ptr %273, i64 %274
  %276 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %277 = load ptr, ptr %276, align 8, !tbaa !15
  %278 = load i64, ptr %18, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %275, ptr align 4 %277, i64 %278, i1 false)
  %279 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 0, ptr %279, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %281 = load i64, ptr %280, align 8, !tbaa !12
  %282 = sub i64 %281, 1
  %283 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  store i64 %282, ptr %283, align 8, !tbaa !14
  %284 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  store i64 0, ptr %284, align 8, !tbaa !13
  %285 = load i64, ptr %16, align 8, !tbaa !16
  %286 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  store i64 %285, ptr %286, align 8, !tbaa !12
  %287 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %288 = load ptr, ptr %287, align 8, !tbaa !15
  call void @free(ptr noundef %288) #7
  %289 = load ptr, ptr %20, align 8, !tbaa !17
  %290 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  store ptr %289, ptr %290, align 8, !tbaa !15
  br label %291

291:                                              ; preds = %256, %228
  store i32 0, ptr %9, align 4
  br label %292

292:                                              ; preds = %291, %254, %244
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  %293 = load i32, ptr %9, align 4
  switch i32 %293, label %488 [
    i32 0, label %294
    i32 14, label %296
  ]

294:                                              ; preds = %292
  br label %295

295:                                              ; preds = %294
  br label %296

296:                                              ; preds = %295, %292
  %297 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  %298 = load i8, ptr %297, align 8, !tbaa !5, !range !18, !noundef !19
  %299 = trunc i8 %298 to i1
  br i1 %299, label %300, label %301

300:                                              ; preds = %296
  br label %317

301:                                              ; preds = %296
  %302 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 0, ptr %302, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %304 = load ptr, ptr %303, align 8, !tbaa !15
  %305 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  %306 = load i64, ptr %305, align 8, !tbaa !14
  %307 = getelementptr inbounds i32, ptr %304, i64 %306
  store i32 4, ptr %307, align 4, !tbaa !20
  %308 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  %309 = load i64, ptr %308, align 8, !tbaa !14
  %310 = add i64 %309, 1
  %311 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %312 = load i64, ptr %311, align 8, !tbaa !12
  %313 = sub i64 %312, 1
  %314 = and i64 %310, %313
  %315 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  store i64 %314, ptr %315, align 8, !tbaa !14
  br label %316

316:                                              ; preds = %301
  br label %317

317:                                              ; preds = %316, %300
  br label %318

318:                                              ; preds = %317
  br label %319

319:                                              ; preds = %318
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %320 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  %321 = load i64, ptr %320, align 8, !tbaa !14
  %322 = add i64 %321, 1
  %323 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %324 = load i64, ptr %323, align 8, !tbaa !12
  %325 = sub i64 %324, 1
  %326 = and i64 %322, %325
  store i64 %326, ptr %25, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %327 = load i64, ptr %25, align 8, !tbaa !16
  %328 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %329 = load i64, ptr %328, align 8, !tbaa !13
  %330 = icmp eq i64 %327, %329
  br i1 %330, label %331, label %382

331:                                              ; preds = %319
  %332 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %333 = load i64, ptr %332, align 8, !tbaa !12
  %334 = icmp ugt i64 %333, 9223372036854775807
  br i1 %334, label %335, label %337

335:                                              ; preds = %331
  %336 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 1, ptr %336, align 8, !tbaa !5
  store i32 18, ptr %9, align 4
  br label %383

337:                                              ; preds = %331
  %338 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %339 = load i64, ptr %338, align 8, !tbaa !12
  %340 = mul i64 %339, 2
  store i64 %340, ptr %22, align 8, !tbaa !16
  %341 = load i64, ptr %22, align 8, !tbaa !16
  %342 = call noalias ptr @calloc(i64 noundef %341, i64 noundef 4) #8
  store ptr %342, ptr %26, align 8, !tbaa !17
  %343 = load ptr, ptr %26, align 8, !tbaa !17
  %344 = icmp eq ptr %343, null
  br i1 %344, label %345, label %347

345:                                              ; preds = %337
  %346 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 1, ptr %346, align 8, !tbaa !5
  store i32 18, ptr %9, align 4
  br label %383

347:                                              ; preds = %337
  %348 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %349 = load i64, ptr %348, align 8, !tbaa !12
  %350 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %351 = load i64, ptr %350, align 8, !tbaa !13
  %352 = sub i64 %349, %351
  %353 = mul i64 %352, 4
  store i64 %353, ptr %23, align 8, !tbaa !16
  %354 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %355 = load i64, ptr %354, align 8, !tbaa !13
  %356 = mul i64 %355, 4
  store i64 %356, ptr %24, align 8, !tbaa !16
  %357 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %358 = load ptr, ptr %357, align 8, !tbaa !15
  %359 = load i64, ptr %24, align 8, !tbaa !16
  %360 = getelementptr inbounds i8, ptr %358, i64 %359
  store ptr %360, ptr %27, align 8, !tbaa !17
  %361 = load ptr, ptr %26, align 8, !tbaa !17
  %362 = load ptr, ptr %27, align 8, !tbaa !17
  %363 = load i64, ptr %23, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %361, ptr align 1 %362, i64 %363, i1 false)
  %364 = load ptr, ptr %26, align 8, !tbaa !17
  %365 = load i64, ptr %23, align 8, !tbaa !16
  %366 = getelementptr inbounds i8, ptr %364, i64 %365
  %367 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %368 = load ptr, ptr %367, align 8, !tbaa !15
  %369 = load i64, ptr %24, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %366, ptr align 4 %368, i64 %369, i1 false)
  %370 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 0, ptr %370, align 8, !tbaa !5
  %371 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %372 = load i64, ptr %371, align 8, !tbaa !12
  %373 = sub i64 %372, 1
  %374 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  store i64 %373, ptr %374, align 8, !tbaa !14
  %375 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  store i64 0, ptr %375, align 8, !tbaa !13
  %376 = load i64, ptr %22, align 8, !tbaa !16
  %377 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  store i64 %376, ptr %377, align 8, !tbaa !12
  %378 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %379 = load ptr, ptr %378, align 8, !tbaa !15
  call void @free(ptr noundef %379) #7
  %380 = load ptr, ptr %26, align 8, !tbaa !17
  %381 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  store ptr %380, ptr %381, align 8, !tbaa !15
  br label %382

382:                                              ; preds = %347, %319
  store i32 0, ptr %9, align 4
  br label %383

383:                                              ; preds = %382, %345, %335
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  %384 = load i32, ptr %9, align 4
  switch i32 %384, label %488 [
    i32 0, label %385
    i32 18, label %387
  ]

385:                                              ; preds = %383
  br label %386

386:                                              ; preds = %385
  br label %387

387:                                              ; preds = %386, %383
  %388 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  %389 = load i8, ptr %388, align 8, !tbaa !5, !range !18, !noundef !19
  %390 = trunc i8 %389 to i1
  br i1 %390, label %391, label %392

391:                                              ; preds = %387
  br label %408

392:                                              ; preds = %387
  %393 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 0, ptr %393, align 8, !tbaa !5
  %394 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %395 = load i64, ptr %394, align 8, !tbaa !13
  %396 = sub i64 %395, 1
  %397 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %398 = load i64, ptr %397, align 8, !tbaa !12
  %399 = sub i64 %398, 1
  %400 = and i64 %396, %399
  %401 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  store i64 %400, ptr %401, align 8, !tbaa !13
  %402 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %403 = load ptr, ptr %402, align 8, !tbaa !15
  %404 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %405 = load i64, ptr %404, align 8, !tbaa !13
  %406 = getelementptr inbounds i32, ptr %403, i64 %405
  store i32 1, ptr %406, align 4, !tbaa !20
  br label %407

407:                                              ; preds = %392
  br label %408

408:                                              ; preds = %407, %391
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  store i64 1, ptr %28, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %409 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %410 = load i64, ptr %409, align 8, !tbaa !13
  store i64 %410, ptr %29, align 8, !tbaa !16
  br label %411

411:                                              ; preds = %441, %408
  %412 = load i64, ptr %28, align 8, !tbaa !16
  %413 = icmp ne i64 %412, 0
  br i1 %413, label %414, label %419

414:                                              ; preds = %411
  %415 = load i64, ptr %29, align 8, !tbaa !16
  %416 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  %417 = load i64, ptr %416, align 8, !tbaa !14
  %418 = icmp ne i64 %415, %417
  br label %419

419:                                              ; preds = %414, %411
  %420 = phi i1 [ false, %411 ], [ %418, %414 ]
  br i1 %420, label %422, label %421

421:                                              ; preds = %419
  store i32 20, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %453

422:                                              ; preds = %419
  %423 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %424 = load ptr, ptr %423, align 8, !tbaa !15
  %425 = load i64, ptr %29, align 8, !tbaa !16
  %426 = getelementptr inbounds i32, ptr %424, i64 %425
  %427 = load i32, ptr %426, align 4, !tbaa !20
  store i32 %427, ptr %1, align 4, !tbaa !20
  br label %428

428:                                              ; preds = %434, %422
  %429 = load i64, ptr %28, align 8, !tbaa !16
  %430 = icmp ne i64 %429, 0
  br i1 %430, label %431, label %440

431:                                              ; preds = %428
  %432 = load i32, ptr %1, align 4, !tbaa !20
  %433 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %432)
  br label %434

434:                                              ; preds = %431
  %435 = load i64, ptr %28, align 8, !tbaa !16
  %436 = icmp ne i64 %435, 0
  %437 = xor i1 %436, true
  %438 = zext i1 %437 to i32
  %439 = sext i32 %438 to i64
  store i64 %439, ptr %28, align 8, !tbaa !16
  br label %428, !llvm.loop !22

440:                                              ; preds = %428
  br label %441

441:                                              ; preds = %440
  %442 = load i64, ptr %28, align 8, !tbaa !16
  %443 = icmp ne i64 %442, 0
  %444 = xor i1 %443, true
  %445 = zext i1 %444 to i32
  %446 = sext i32 %445 to i64
  store i64 %446, ptr %28, align 8, !tbaa !16
  %447 = load i64, ptr %29, align 8, !tbaa !16
  %448 = add i64 %447, 1
  %449 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %450 = load i64, ptr %449, align 8, !tbaa !12
  %451 = sub i64 %450, 1
  %452 = and i64 %448, %451
  store i64 %452, ptr %29, align 8, !tbaa !16
  br label %411, !llvm.loop !24

453:                                              ; preds = %421
  %454 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %455 = load ptr, ptr %454, align 8, !tbaa !15
  %456 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  %457 = load i64, ptr %456, align 8, !tbaa !14
  %458 = sub i64 %457, 1
  %459 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %460 = load i64, ptr %459, align 8, !tbaa !12
  %461 = sub i64 %460, 1
  %462 = and i64 %458, %461
  %463 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  store i64 %462, ptr %463, align 8, !tbaa !14
  %464 = getelementptr inbounds i32, ptr %455, i64 %462
  %465 = load i32, ptr %464, align 4, !tbaa !20
  store i32 %465, ptr %1, align 4, !tbaa !20
  %466 = load i32, ptr %1, align 4, !tbaa !20
  %467 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %466)
  %468 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %469 = load ptr, ptr %468, align 8, !tbaa !15
  %470 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  %471 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  %472 = load i64, ptr %471, align 8, !tbaa !12
  %473 = call i64 @sc_queue_inc_first(ptr noundef %470, i64 noundef %472)
  %474 = getelementptr inbounds i32, ptr %469, i64 %473
  %475 = load i32, ptr %474, align 4, !tbaa !20
  store i32 %475, ptr %1, align 4, !tbaa !20
  %476 = load i32, ptr %1, align 4, !tbaa !20
  %477 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %476)
  br label %478

478:                                              ; preds = %453
  %479 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  %480 = load ptr, ptr %479, align 8, !tbaa !15
  call void @free(ptr noundef %480) #7
  %481 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 4
  store ptr null, ptr %481, align 8, !tbaa !15
  %482 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 1
  store i64 0, ptr %482, align 8, !tbaa !12
  %483 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 2
  store i64 0, ptr %483, align 8, !tbaa !13
  %484 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 3
  store i64 0, ptr %484, align 8, !tbaa !14
  %485 = getelementptr inbounds %struct.sc_queue_int, ptr %2, i32 0, i32 0
  store i8 0, ptr %485, align 8, !tbaa !5
  br label %486

486:                                              ; preds = %478
  br label %487

487:                                              ; preds = %486
  call void @llvm.lifetime.end.p0(i64 40, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #7
  ret void

488:                                              ; preds = %383, %292, %201, %110
  unreachable
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @sc_queue_inc_first(ptr noundef, i64 noundef) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind allocsize(0,1) "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0,1) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"sc_queue_int", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !11, i64 32}
!7 = !{!"_Bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !10, i64 8}
!13 = !{!6, !10, i64 16}
!14 = !{!6, !10, i64 24}
!15 = !{!6, !11, i64 32}
!16 = !{!10, !10, i64 0}
!17 = !{!11, !11, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!21, !21, i64 0}
!21 = !{!"int", !8, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.sc_queue_int = type { i8, i64, i64, i64, ptr }

@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [27 x i8], align 1

; 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 nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @example_int() local_unnamed_addr #4 {
  %1 = alloca %struct.sc_queue_int, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %1) #7
  %2 = getelementptr inbounds i8, ptr %1, i64 8
  store i64 8, ptr %2, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %1, i64 16
  %4 = getelementptr inbounds i8, ptr %1, i64 24
  %5 = tail call noalias dereferenceable_or_null(32) ptr @calloc(i64 noundef 1, i64 noundef 32) #8
  %6 = getelementptr inbounds i8, ptr %1, i64 32
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %3, i8 0, i64 16, i1 false)
  store ptr %5, ptr %6, align 8, !tbaa !12
  %7 = icmp eq ptr %5, null
  br i1 %7, label %thread-pre-split69, label %8

8:                                                ; preds = %0
  store i32 2, ptr %5, align 4, !tbaa !13
  %9 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 3, ptr %9, align 4, !tbaa !13
  store i8 0, ptr %1, align 8, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %5, i64 8
  store i32 4, ptr %10, align 4, !tbaa !13
  store i64 3, ptr %4, align 8, !tbaa !16
  br label %11

thread-pre-split69:                               ; preds = %0
  store i8 1, ptr %1, align 8, !tbaa !15
  br label %11

11:                                               ; preds = %8, %thread-pre-split69
  %12 = phi i64 [ 0, %thread-pre-split69 ], [ 3, %8 ]
  br i1 %7, label %15, label %13

13:                                               ; preds = %11
  store i8 0, ptr %1, align 8, !tbaa !15
  store i64 7, ptr %3, align 8, !tbaa !17
  %14 = getelementptr inbounds i8, ptr %5, i64 28
  store i32 1, ptr %14, align 4, !tbaa !13
  %.pre = load i64, ptr %4, align 8
  br label %15

15:                                               ; preds = %11, %13
  %16 = phi i64 [ %12, %11 ], [ %.pre, %13 ]
  %17 = phi i64 [ 0, %11 ], [ 7, %13 ]
  %.not71 = icmp eq i64 %17, %16
  %.pre73 = load i64, ptr %2, align 8
  %.pre77 = add i64 %.pre73, -1
  br i1 %.not71, label %._crit_edge, label %.critedge

._crit_edge:                                      ; preds = %.critedge, %15
  %18 = add i64 %16, -1
  %19 = and i64 %.pre77, %18
  store i64 %19, ptr %4, align 8, !tbaa !16
  %20 = getelementptr inbounds i32, ptr %5, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !13
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %21)
  %23 = call i64 @sc_queue_inc_first(ptr noundef nonnull %3, i64 noundef %.pre73)
  %24 = getelementptr inbounds i32, ptr %5, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !13
  %26 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %25)
  %27 = load ptr, ptr %6, align 8, !tbaa !12
  call void @free(ptr noundef %27) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #7
  ret void

.critedge:                                        ; preds = %15, %.critedge
  %.072 = phi i64 [ %32, %.critedge ], [ %17, %15 ]
  %28 = getelementptr inbounds i32, ptr %5, i64 %.072
  %29 = load i32, ptr %28, align 4, !tbaa !13
  %30 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %29)
  %31 = add i64 %.072, 1
  %32 = and i64 %.pre77, %31
  %.not = icmp eq i64 %32, %16
  br i1 %.not, label %._crit_edge, label %.critedge, !llvm.loop !18
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @sc_queue_inc_first(ptr noundef, i64 noundef) local_unnamed_addr #5

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) 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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, 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 #3 = { nofree 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 = { 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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0,1) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 8}
!6 = !{!"sc_queue_int", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !11, i64 32}
!7 = !{!"_Bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !11, i64 32}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = !{!6, !7, i64 0}
!16 = !{!6, !10, i64 24}
!17 = !{!6, !10, i64 16}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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