; LLVM IR from ShahjalalShohag/code-library :: Number Theory/Linear Diophantine Equation Three Variables with Nonnegative Solutions._99ad1d2f (Z2yonnnn)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef { i64, i64 } @_Z7inversenn(i64 noundef, i64 noundef, i64 noundef, i64 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef { i64, i64 } @_Z5countnnnn(i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i128 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef { i64, i64 } @_ZSt5__gcdInET_S0_S0_(i64 noundef, i64 noundef, i64 noundef, i64 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef { i64, i64 } @_Z2yonnnn(i64 noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4, i64 noundef %5, i128 noundef %6) #1 {
  %8 = alloca i128, align 16
  %9 = alloca i128, align 16
  %10 = alloca i128, align 16
  %11 = alloca i128, align 16
  %12 = alloca i128, align 16
  %13 = alloca i128, align 16
  %14 = alloca i128, align 16
  %15 = alloca i128, align 16
  %16 = alloca i128, align 16
  %17 = alloca i128, align 16
  %18 = alloca i128, align 16
  %19 = alloca i128, align 16
  %20 = alloca i128, align 16
  %21 = alloca i128, align 16
  %22 = alloca i128, align 16
  %23 = alloca i32, align 4
  %24 = alloca i128, align 16
  %25 = alloca i128, align 16
  %26 = alloca i128, align 16
  %27 = alloca i128, align 16
  %28 = alloca i128, align 16
  %29 = alloca i128, align 16
  %30 = alloca i128, align 16
  %31 = alloca i128, align 16
  %32 = alloca i128, align 16
  %33 = alloca i128, align 16
  %34 = alloca i128, align 16
  %35 = alloca i128, align 16
  %36 = alloca i128, align 16
  %37 = alloca i128, align 16
  %38 = alloca i128, align 16
  %39 = alloca i128, align 16
  %40 = alloca i128, align 16
  %41 = alloca i128, align 16
  %42 = alloca i128, align 16
  %43 = alloca i128, align 16
  %44 = alloca i128, align 16
  %45 = alloca i128, align 16
  %46 = alloca i128, align 16
  %47 = alloca i128, align 16
  %48 = alloca i128, align 16
  %49 = alloca i128, align 16
  %50 = alloca i128, align 16
  %51 = alloca i128, align 16
  %52 = alloca i128, align 16
  %53 = alloca i128, align 16
  %54 = alloca i128, align 16
  %55 = alloca i128, align 16
  %56 = alloca i128, align 16
  %57 = alloca i128, align 16
  %58 = alloca i128, align 16
  %59 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 0
  store i64 %0, ptr %59, align 16
  %60 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 1
  store i64 %1, ptr %60, align 8
  %61 = load i128, ptr %9, align 16, !tbaa !5
  %62 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 0
  store i64 %2, ptr %62, align 16
  %63 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 1
  store i64 %3, ptr %63, align 8
  %64 = load i128, ptr %10, align 16, !tbaa !5
  %65 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 0
  store i64 %4, ptr %65, align 16
  %66 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 1
  store i64 %5, ptr %66, align 8
  %67 = load i128, ptr %11, align 16, !tbaa !5
  store i128 %61, ptr %12, align 16, !tbaa !5
  store i128 %64, ptr %13, align 16, !tbaa !5
  store i128 %67, ptr %14, align 16, !tbaa !5
  store i128 %6, ptr %15, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #3
  %68 = load i128, ptr %12, align 16, !tbaa !5
  %69 = load i128, ptr %13, align 16, !tbaa !5
  store i128 %68, ptr %17, align 16, !tbaa !5
  %70 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 0
  %71 = load i64, ptr %70, align 16
  %72 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 1
  %73 = load i64, ptr %72, align 8
  store i128 %69, ptr %18, align 16, !tbaa !5
  %74 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 0
  %75 = load i64, ptr %74, align 16
  %76 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 1
  %77 = load i64, ptr %76, align 8
  %78 = call noundef { i64, i64 } @_ZSt5__gcdInET_S0_S0_(i64 noundef %71, i64 noundef %73, i64 noundef %75, i64 noundef %77)
  %79 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 0
  %80 = extractvalue { i64, i64 } %78, 0
  store i64 %80, ptr %79, align 16
  %81 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 1
  %82 = extractvalue { i64, i64 } %78, 1
  store i64 %82, ptr %81, align 8
  %83 = load i128, ptr %19, align 16, !tbaa !5
  %84 = load i128, ptr %14, align 16, !tbaa !5
  store i128 %83, ptr %20, align 16, !tbaa !5
  %85 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 0
  %86 = load i64, ptr %85, align 16
  %87 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 1
  %88 = load i64, ptr %87, align 8
  store i128 %84, ptr %21, align 16, !tbaa !5
  %89 = getelementptr inbounds { i64, i64 }, ptr %21, i32 0, i32 0
  %90 = load i64, ptr %89, align 16
  %91 = getelementptr inbounds { i64, i64 }, ptr %21, i32 0, i32 1
  %92 = load i64, ptr %91, align 8
  %93 = call noundef { i64, i64 } @_ZSt5__gcdInET_S0_S0_(i64 noundef %86, i64 noundef %88, i64 noundef %90, i64 noundef %92)
  %94 = getelementptr inbounds { i64, i64 }, ptr %22, i32 0, i32 0
  %95 = extractvalue { i64, i64 } %93, 0
  store i64 %95, ptr %94, align 16
  %96 = getelementptr inbounds { i64, i64 }, ptr %22, i32 0, i32 1
  %97 = extractvalue { i64, i64 } %93, 1
  store i64 %97, ptr %96, align 8
  %98 = load i128, ptr %22, align 16, !tbaa !5
  store i128 %98, ptr %16, align 16, !tbaa !5
  %99 = load i128, ptr %15, align 16, !tbaa !5
  %100 = load i128, ptr %16, align 16, !tbaa !5
  %101 = srem i128 %99, %100
  %102 = icmp ne i128 %101, 0
  br i1 %102, label %103, label %104

103:                                              ; preds = %7
  store i128 0, ptr %8, align 16
  store i32 1, ptr %23, align 4
  br label %284

104:                                              ; preds = %7
  %105 = load i128, ptr %16, align 16, !tbaa !5
  %106 = load i128, ptr %12, align 16, !tbaa !5
  %107 = sdiv i128 %106, %105
  store i128 %107, ptr %12, align 16, !tbaa !5
  %108 = load i128, ptr %16, align 16, !tbaa !5
  %109 = load i128, ptr %13, align 16, !tbaa !5
  %110 = sdiv i128 %109, %108
  store i128 %110, ptr %13, align 16, !tbaa !5
  %111 = load i128, ptr %16, align 16, !tbaa !5
  %112 = load i128, ptr %14, align 16, !tbaa !5
  %113 = sdiv i128 %112, %111
  store i128 %113, ptr %14, align 16, !tbaa !5
  %114 = load i128, ptr %16, align 16, !tbaa !5
  %115 = load i128, ptr %15, align 16, !tbaa !5
  %116 = sdiv i128 %115, %114
  store i128 %116, ptr %15, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #3
  %117 = load i128, ptr %13, align 16, !tbaa !5
  %118 = load i128, ptr %14, align 16, !tbaa !5
  store i128 %117, ptr %25, align 16, !tbaa !5
  %119 = getelementptr inbounds { i64, i64 }, ptr %25, i32 0, i32 0
  %120 = load i64, ptr %119, align 16
  %121 = getelementptr inbounds { i64, i64 }, ptr %25, i32 0, i32 1
  %122 = load i64, ptr %121, align 8
  store i128 %118, ptr %26, align 16, !tbaa !5
  %123 = getelementptr inbounds { i64, i64 }, ptr %26, i32 0, i32 0
  %124 = load i64, ptr %123, align 16
  %125 = getelementptr inbounds { i64, i64 }, ptr %26, i32 0, i32 1
  %126 = load i64, ptr %125, align 8
  %127 = call noundef { i64, i64 } @_ZSt5__gcdInET_S0_S0_(i64 noundef %120, i64 noundef %122, i64 noundef %124, i64 noundef %126)
  %128 = getelementptr inbounds { i64, i64 }, ptr %27, i32 0, i32 0
  %129 = extractvalue { i64, i64 } %127, 0
  store i64 %129, ptr %128, align 16
  %130 = getelementptr inbounds { i64, i64 }, ptr %27, i32 0, i32 1
  %131 = extractvalue { i64, i64 } %127, 1
  store i64 %131, ptr %130, align 8
  %132 = load i128, ptr %27, align 16, !tbaa !5
  store i128 %132, ptr %24, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #3
  %133 = load i128, ptr %14, align 16, !tbaa !5
  %134 = load i128, ptr %12, align 16, !tbaa !5
  store i128 %133, ptr %29, align 16, !tbaa !5
  %135 = getelementptr inbounds { i64, i64 }, ptr %29, i32 0, i32 0
  %136 = load i64, ptr %135, align 16
  %137 = getelementptr inbounds { i64, i64 }, ptr %29, i32 0, i32 1
  %138 = load i64, ptr %137, align 8
  store i128 %134, ptr %30, align 16, !tbaa !5
  %139 = getelementptr inbounds { i64, i64 }, ptr %30, i32 0, i32 0
  %140 = load i64, ptr %139, align 16
  %141 = getelementptr inbounds { i64, i64 }, ptr %30, i32 0, i32 1
  %142 = load i64, ptr %141, align 8
  %143 = call noundef { i64, i64 } @_ZSt5__gcdInET_S0_S0_(i64 noundef %136, i64 noundef %138, i64 noundef %140, i64 noundef %142)
  %144 = getelementptr inbounds { i64, i64 }, ptr %31, i32 0, i32 0
  %145 = extractvalue { i64, i64 } %143, 0
  store i64 %145, ptr %144, align 16
  %146 = getelementptr inbounds { i64, i64 }, ptr %31, i32 0, i32 1
  %147 = extractvalue { i64, i64 } %143, 1
  store i64 %147, ptr %146, align 8
  %148 = load i128, ptr %31, align 16, !tbaa !5
  store i128 %148, ptr %28, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #3
  %149 = load i128, ptr %12, align 16, !tbaa !5
  %150 = load i128, ptr %13, align 16, !tbaa !5
  store i128 %149, ptr %33, align 16, !tbaa !5
  %151 = getelementptr inbounds { i64, i64 }, ptr %33, i32 0, i32 0
  %152 = load i64, ptr %151, align 16
  %153 = getelementptr inbounds { i64, i64 }, ptr %33, i32 0, i32 1
  %154 = load i64, ptr %153, align 8
  store i128 %150, ptr %34, align 16, !tbaa !5
  %155 = getelementptr inbounds { i64, i64 }, ptr %34, i32 0, i32 0
  %156 = load i64, ptr %155, align 16
  %157 = getelementptr inbounds { i64, i64 }, ptr %34, i32 0, i32 1
  %158 = load i64, ptr %157, align 8
  %159 = call noundef { i64, i64 } @_ZSt5__gcdInET_S0_S0_(i64 noundef %152, i64 noundef %154, i64 noundef %156, i64 noundef %158)
  %160 = getelementptr inbounds { i64, i64 }, ptr %35, i32 0, i32 0
  %161 = extractvalue { i64, i64 } %159, 0
  store i64 %161, ptr %160, align 16
  %162 = getelementptr inbounds { i64, i64 }, ptr %35, i32 0, i32 1
  %163 = extractvalue { i64, i64 } %159, 1
  store i64 %163, ptr %162, align 8
  %164 = load i128, ptr %35, align 16, !tbaa !5
  store i128 %164, ptr %32, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #3
  %165 = load i128, ptr %12, align 16, !tbaa !5
  %166 = load i128, ptr %24, align 16, !tbaa !5
  store i128 %165, ptr %37, align 16, !tbaa !5
  %167 = getelementptr inbounds { i64, i64 }, ptr %37, i32 0, i32 0
  %168 = load i64, ptr %167, align 16
  %169 = getelementptr inbounds { i64, i64 }, ptr %37, i32 0, i32 1
  %170 = load i64, ptr %169, align 8
  store i128 %166, ptr %38, align 16, !tbaa !5
  %171 = getelementptr inbounds { i64, i64 }, ptr %38, i32 0, i32 0
  %172 = load i64, ptr %171, align 16
  %173 = getelementptr inbounds { i64, i64 }, ptr %38, i32 0, i32 1
  %174 = load i64, ptr %173, align 8
  %175 = call noundef { i64, i64 } @_Z7inversenn(i64 noundef %168, i64 noundef %170, i64 noundef %172, i64 noundef %174)
  %176 = getelementptr inbounds { i64, i64 }, ptr %39, i32 0, i32 0
  %177 = extractvalue { i64, i64 } %175, 0
  store i64 %177, ptr %176, align 16
  %178 = getelementptr inbounds { i64, i64 }, ptr %39, i32 0, i32 1
  %179 = extractvalue { i64, i64 } %175, 1
  store i64 %179, ptr %178, align 8
  %180 = load i128, ptr %39, align 16, !tbaa !5
  store i128 %180, ptr %36, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #3
  %181 = load i128, ptr %13, align 16, !tbaa !5
  %182 = load i128, ptr %28, align 16, !tbaa !5
  store i128 %181, ptr %41, align 16, !tbaa !5
  %183 = getelementptr inbounds { i64, i64 }, ptr %41, i32 0, i32 0
  %184 = load i64, ptr %183, align 16
  %185 = getelementptr inbounds { i64, i64 }, ptr %41, i32 0, i32 1
  %186 = load i64, ptr %185, align 8
  store i128 %182, ptr %42, align 16, !tbaa !5
  %187 = getelementptr inbounds { i64, i64 }, ptr %42, i32 0, i32 0
  %188 = load i64, ptr %187, align 16
  %189 = getelementptr inbounds { i64, i64 }, ptr %42, i32 0, i32 1
  %190 = load i64, ptr %189, align 8
  %191 = call noundef { i64, i64 } @_Z7inversenn(i64 noundef %184, i64 noundef %186, i64 noundef %188, i64 noundef %190)
  %192 = getelementptr inbounds { i64, i64 }, ptr %43, i32 0, i32 0
  %193 = extractvalue { i64, i64 } %191, 0
  store i64 %193, ptr %192, align 16
  %194 = getelementptr inbounds { i64, i64 }, ptr %43, i32 0, i32 1
  %195 = extractvalue { i64, i64 } %191, 1
  store i64 %195, ptr %194, align 8
  %196 = load i128, ptr %43, align 16, !tbaa !5
  store i128 %196, ptr %40, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %44) #3
  %197 = load i128, ptr %14, align 16, !tbaa !5
  %198 = load i128, ptr %32, align 16, !tbaa !5
  store i128 %197, ptr %45, align 16, !tbaa !5
  %199 = getelementptr inbounds { i64, i64 }, ptr %45, i32 0, i32 0
  %200 = load i64, ptr %199, align 16
  %201 = getelementptr inbounds { i64, i64 }, ptr %45, i32 0, i32 1
  %202 = load i64, ptr %201, align 8
  store i128 %198, ptr %46, align 16, !tbaa !5
  %203 = getelementptr inbounds { i64, i64 }, ptr %46, i32 0, i32 0
  %204 = load i64, ptr %203, align 16
  %205 = getelementptr inbounds { i64, i64 }, ptr %46, i32 0, i32 1
  %206 = load i64, ptr %205, align 8
  %207 = call noundef { i64, i64 } @_Z7inversenn(i64 noundef %200, i64 noundef %202, i64 noundef %204, i64 noundef %206)
  %208 = getelementptr inbounds { i64, i64 }, ptr %47, i32 0, i32 0
  %209 = extractvalue { i64, i64 } %207, 0
  store i64 %209, ptr %208, align 16
  %210 = getelementptr inbounds { i64, i64 }, ptr %47, i32 0, i32 1
  %211 = extractvalue { i64, i64 } %207, 1
  store i64 %211, ptr %210, align 8
  %212 = load i128, ptr %47, align 16, !tbaa !5
  store i128 %212, ptr %44, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %48) #3
  %213 = load i128, ptr %15, align 16, !tbaa !5
  %214 = load i128, ptr %36, align 16, !tbaa !5
  %215 = mul nsw i128 %213, %214
  %216 = load i128, ptr %24, align 16, !tbaa !5
  %217 = srem i128 %215, %216
  store i128 %217, ptr %48, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %49) #3
  %218 = load i128, ptr %15, align 16, !tbaa !5
  %219 = load i128, ptr %40, align 16, !tbaa !5
  %220 = mul nsw i128 %218, %219
  %221 = load i128, ptr %28, align 16, !tbaa !5
  %222 = srem i128 %220, %221
  store i128 %222, ptr %49, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %50) #3
  %223 = load i128, ptr %15, align 16, !tbaa !5
  %224 = load i128, ptr %44, align 16, !tbaa !5
  %225 = mul nsw i128 %223, %224
  %226 = load i128, ptr %32, align 16, !tbaa !5
  %227 = srem i128 %225, %226
  store i128 %227, ptr %50, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #3
  %228 = load i128, ptr %12, align 16, !tbaa !5
  %229 = load i128, ptr %28, align 16, !tbaa !5
  %230 = sdiv i128 %228, %229
  %231 = load i128, ptr %32, align 16, !tbaa !5
  %232 = sdiv i128 %230, %231
  store i128 %232, ptr %51, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %52) #3
  %233 = load i128, ptr %13, align 16, !tbaa !5
  %234 = load i128, ptr %32, align 16, !tbaa !5
  %235 = sdiv i128 %233, %234
  %236 = load i128, ptr %24, align 16, !tbaa !5
  %237 = sdiv i128 %235, %236
  store i128 %237, ptr %52, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %53) #3
  %238 = load i128, ptr %14, align 16, !tbaa !5
  %239 = load i128, ptr %24, align 16, !tbaa !5
  %240 = sdiv i128 %238, %239
  %241 = load i128, ptr %28, align 16, !tbaa !5
  %242 = sdiv i128 %240, %241
  store i128 %242, ptr %53, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %54) #3
  %243 = load i128, ptr %15, align 16, !tbaa !5
  %244 = load i128, ptr %12, align 16, !tbaa !5
  %245 = load i128, ptr %48, align 16, !tbaa !5
  %246 = mul nsw i128 %244, %245
  %247 = sub nsw i128 %243, %246
  %248 = load i128, ptr %13, align 16, !tbaa !5
  %249 = load i128, ptr %49, align 16, !tbaa !5
  %250 = mul nsw i128 %248, %249
  %251 = sub nsw i128 %247, %250
  %252 = load i128, ptr %14, align 16, !tbaa !5
  %253 = load i128, ptr %50, align 16, !tbaa !5
  %254 = mul nsw i128 %252, %253
  %255 = sub nsw i128 %251, %254
  %256 = load i128, ptr %24, align 16, !tbaa !5
  %257 = sdiv i128 %255, %256
  %258 = load i128, ptr %28, align 16, !tbaa !5
  %259 = sdiv i128 %257, %258
  %260 = load i128, ptr %32, align 16, !tbaa !5
  %261 = sdiv i128 %259, %260
  store i128 %261, ptr %54, align 16, !tbaa !5
  %262 = load i128, ptr %51, align 16, !tbaa !5
  %263 = load i128, ptr %52, align 16, !tbaa !5
  %264 = load i128, ptr %53, align 16, !tbaa !5
  %265 = load i128, ptr %54, align 16, !tbaa !5
  store i128 %262, ptr %55, align 16, !tbaa !5
  %266 = getelementptr inbounds { i64, i64 }, ptr %55, i32 0, i32 0
  %267 = load i64, ptr %266, align 16
  %268 = getelementptr inbounds { i64, i64 }, ptr %55, i32 0, i32 1
  %269 = load i64, ptr %268, align 8
  store i128 %263, ptr %56, align 16, !tbaa !5
  %270 = getelementptr inbounds { i64, i64 }, ptr %56, i32 0, i32 0
  %271 = load i64, ptr %270, align 16
  %272 = getelementptr inbounds { i64, i64 }, ptr %56, i32 0, i32 1
  %273 = load i64, ptr %272, align 8
  store i128 %264, ptr %57, align 16, !tbaa !5
  %274 = getelementptr inbounds { i64, i64 }, ptr %57, i32 0, i32 0
  %275 = load i64, ptr %274, align 16
  %276 = getelementptr inbounds { i64, i64 }, ptr %57, i32 0, i32 1
  %277 = load i64, ptr %276, align 8
  %278 = call noundef { i64, i64 } @_Z5countnnnn(i64 noundef %267, i64 noundef %269, i64 noundef %271, i64 noundef %273, i64 noundef %275, i64 noundef %277, i128 noundef %265)
  %279 = getelementptr inbounds { i64, i64 }, ptr %58, i32 0, i32 0
  %280 = extractvalue { i64, i64 } %278, 0
  store i64 %280, ptr %279, align 16
  %281 = getelementptr inbounds { i64, i64 }, ptr %58, i32 0, i32 1
  %282 = extractvalue { i64, i64 } %278, 1
  store i64 %282, ptr %281, align 8
  %283 = load i128, ptr %58, align 16, !tbaa !5
  store i128 %283, ptr %8, align 16
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %54) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %53) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %52) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %44) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #3
  br label %284

284:                                              ; preds = %104, %103
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #3
  %285 = load { i64, i64 }, ptr %8, align 16
  ret { i64, i64 } %285
}

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


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

; Function Attrs: mustprogress uwtable
declare dso_local noundef { i64, i64 } @_Z7inversenn(i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef { i64, i64 } @_Z5countnnnn(i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i128 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef { i64, i64 } @_ZSt5__gcdInET_S0_S0_(i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef { i64, i64 } @_Z2yonnnn(i64 noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4, i64 noundef %5, i128 noundef %6) local_unnamed_addr #0 {
  %8 = tail call noundef { i64, i64 } @_ZSt5__gcdInET_S0_S0_(i64 noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3)
  %9 = extractvalue { i64, i64 } %8, 0
  %10 = extractvalue { i64, i64 } %8, 1
  %11 = tail call noundef { i64, i64 } @_ZSt5__gcdInET_S0_S0_(i64 noundef %9, i64 noundef %10, i64 noundef %4, i64 noundef %5)
  %12 = extractvalue { i64, i64 } %11, 0
  %13 = extractvalue { i64, i64 } %11, 1
  %.sroa.268.0.insert.ext = zext i64 %13 to i128
  %.sroa.268.0.insert.shift = shl nuw i128 %.sroa.268.0.insert.ext, 64
  %.sroa.067.0.insert.ext = zext i64 %12 to i128
  %.sroa.067.0.insert.insert = or disjoint i128 %.sroa.268.0.insert.shift, %.sroa.067.0.insert.ext
  %14 = sdiv i128 %6, %.sroa.067.0.insert.insert
  %15 = mul i128 %14, %.sroa.067.0.insert.insert
  %.decomposed = sub i128 %6, %15
  %.not = icmp eq i128 %.decomposed, 0
  br i1 %.not, label %16, label %57

16:                                               ; preds = %7
  %.sroa.2112.0.insert.ext = zext i64 %5 to i128
  %.sroa.2112.0.insert.shift = shl nuw i128 %.sroa.2112.0.insert.ext, 64
  %.sroa.0111.0.insert.ext = zext i64 %4 to i128
  %.sroa.0111.0.insert.insert = or disjoint i128 %.sroa.2112.0.insert.shift, %.sroa.0111.0.insert.ext
  %.sroa.2114.0.insert.ext = zext i64 %3 to i128
  %.sroa.2114.0.insert.shift = shl nuw i128 %.sroa.2114.0.insert.ext, 64
  %.sroa.0113.0.insert.ext = zext i64 %2 to i128
  %.sroa.0113.0.insert.insert = or disjoint i128 %.sroa.2114.0.insert.shift, %.sroa.0113.0.insert.ext
  %.sroa.2116.0.insert.ext = zext i64 %1 to i128
  %.sroa.2116.0.insert.shift = shl nuw i128 %.sroa.2116.0.insert.ext, 64
  %.sroa.0115.0.insert.ext = zext i64 %0 to i128
  %.sroa.0115.0.insert.insert = or disjoint i128 %.sroa.2116.0.insert.shift, %.sroa.0115.0.insert.ext
  %17 = sdiv i128 %.sroa.0115.0.insert.insert, %.sroa.067.0.insert.insert
  %18 = sdiv i128 %.sroa.0113.0.insert.insert, %.sroa.067.0.insert.insert
  %19 = sdiv i128 %.sroa.0111.0.insert.insert, %.sroa.067.0.insert.insert
  %.sroa.060.0.extract.trunc = trunc i128 %18 to i64
  %.sroa.261.0.extract.shift = lshr i128 %18, 64
  %.sroa.261.0.extract.trunc = trunc nuw i128 %.sroa.261.0.extract.shift to i64
  %.sroa.058.0.extract.trunc = trunc i128 %19 to i64
  %.sroa.259.0.extract.shift = lshr i128 %19, 64
  %.sroa.259.0.extract.trunc = trunc nuw i128 %.sroa.259.0.extract.shift to i64
  %20 = tail call noundef { i64, i64 } @_ZSt5__gcdInET_S0_S0_(i64 noundef %.sroa.060.0.extract.trunc, i64 noundef %.sroa.261.0.extract.trunc, i64 noundef %.sroa.058.0.extract.trunc, i64 noundef %.sroa.259.0.extract.trunc)
  %21 = extractvalue { i64, i64 } %20, 0
  %22 = extractvalue { i64, i64 } %20, 1
  %.sroa.257.0.insert.ext = zext i64 %22 to i128
  %.sroa.257.0.insert.shift = shl nuw i128 %.sroa.257.0.insert.ext, 64
  %.sroa.056.0.insert.ext = zext i64 %21 to i128
  %.sroa.056.0.insert.insert = or disjoint i128 %.sroa.257.0.insert.shift, %.sroa.056.0.insert.ext
  %.sroa.047.0.extract.trunc = trunc i128 %17 to i64
  %.sroa.248.0.extract.shift = lshr i128 %17, 64
  %.sroa.248.0.extract.trunc = trunc nuw i128 %.sroa.248.0.extract.shift to i64
  %23 = tail call noundef { i64, i64 } @_ZSt5__gcdInET_S0_S0_(i64 noundef %.sroa.058.0.extract.trunc, i64 noundef %.sroa.259.0.extract.trunc, i64 noundef %.sroa.047.0.extract.trunc, i64 noundef %.sroa.248.0.extract.trunc)
  %24 = extractvalue { i64, i64 } %23, 0
  %25 = extractvalue { i64, i64 } %23, 1
  %.sroa.246.0.insert.ext = zext i64 %25 to i128
  %.sroa.246.0.insert.shift = shl nuw i128 %.sroa.246.0.insert.ext, 64
  %.sroa.045.0.insert.ext = zext i64 %24 to i128
  %.sroa.045.0.insert.insert = or disjoint i128 %.sroa.246.0.insert.shift, %.sroa.045.0.insert.ext
  %26 = tail call noundef { i64, i64 } @_ZSt5__gcdInET_S0_S0_(i64 noundef %.sroa.047.0.extract.trunc, i64 noundef %.sroa.248.0.extract.trunc, i64 noundef %.sroa.060.0.extract.trunc, i64 noundef %.sroa.261.0.extract.trunc)
  %27 = extractvalue { i64, i64 } %26, 0
  %28 = extractvalue { i64, i64 } %26, 1
  %.sroa.235.0.insert.ext = zext i64 %28 to i128
  %.sroa.235.0.insert.shift = shl nuw i128 %.sroa.235.0.insert.ext, 64
  %.sroa.034.0.insert.ext = zext i64 %27 to i128
  %.sroa.034.0.insert.insert = or disjoint i128 %.sroa.235.0.insert.shift, %.sroa.034.0.insert.ext
  %29 = tail call noundef { i64, i64 } @_Z7inversenn(i64 noundef %.sroa.047.0.extract.trunc, i64 noundef %.sroa.248.0.extract.trunc, i64 noundef %21, i64 noundef %22)
  %30 = extractvalue { i64, i64 } %29, 0
  %31 = extractvalue { i64, i64 } %29, 1
  %.sroa.228.0.insert.ext = zext i64 %31 to i128
  %.sroa.228.0.insert.shift = shl nuw i128 %.sroa.228.0.insert.ext, 64
  %.sroa.027.0.insert.ext = zext i64 %30 to i128
  %.sroa.027.0.insert.insert = or disjoint i128 %.sroa.228.0.insert.shift, %.sroa.027.0.insert.ext
  %32 = tail call noundef { i64, i64 } @_Z7inversenn(i64 noundef %.sroa.060.0.extract.trunc, i64 noundef %.sroa.261.0.extract.trunc, i64 noundef %24, i64 noundef %25)
  %33 = extractvalue { i64, i64 } %32, 0
  %34 = extractvalue { i64, i64 } %32, 1
  %.sroa.221.0.insert.ext = zext i64 %34 to i128
  %.sroa.221.0.insert.shift = shl nuw i128 %.sroa.221.0.insert.ext, 64
  %.sroa.020.0.insert.ext = zext i64 %33 to i128
  %.sroa.020.0.insert.insert = or disjoint i128 %.sroa.221.0.insert.shift, %.sroa.020.0.insert.ext
  %35 = tail call noundef { i64, i64 } @_Z7inversenn(i64 noundef %.sroa.058.0.extract.trunc, i64 noundef %.sroa.259.0.extract.trunc, i64 noundef %27, i64 noundef %28)
  %36 = extractvalue { i64, i64 } %35, 0
  %37 = extractvalue { i64, i64 } %35, 1
  %.sroa.214.0.insert.ext = zext i64 %37 to i128
  %.sroa.214.0.insert.shift = shl nuw i128 %.sroa.214.0.insert.ext, 64
  %.sroa.013.0.insert.ext = zext i64 %36 to i128
  %.sroa.013.0.insert.insert = or disjoint i128 %.sroa.214.0.insert.shift, %.sroa.013.0.insert.ext
  %38 = mul nsw i128 %.sroa.027.0.insert.insert, %14
  %39 = srem i128 %38, %.sroa.056.0.insert.insert
  %40 = mul nsw i128 %.sroa.020.0.insert.insert, %14
  %41 = srem i128 %40, %.sroa.045.0.insert.insert
  %42 = mul nsw i128 %.sroa.013.0.insert.insert, %14
  %43 = srem i128 %42, %.sroa.034.0.insert.insert
  %44 = sdiv i128 %17, %.sroa.045.0.insert.insert
  %45 = sdiv i128 %44, %.sroa.034.0.insert.insert
  %46 = sdiv i128 %18, %.sroa.034.0.insert.insert
  %47 = sdiv i128 %46, %.sroa.056.0.insert.insert
  %48 = sdiv i128 %19, %.sroa.056.0.insert.insert
  %49 = sdiv i128 %48, %.sroa.045.0.insert.insert
  %.neg = mul i128 %39, %17
  %.neg118 = mul i128 %41, %18
  %.neg120 = mul i128 %43, %19
  %reass.add = add i128 %.neg118, %.neg
  %reass.add122 = add i128 %reass.add, %.neg120
  %50 = sub i128 %14, %reass.add122
  %51 = sdiv i128 %50, %.sroa.056.0.insert.insert
  %52 = sdiv i128 %51, %.sroa.045.0.insert.insert
  %53 = sdiv i128 %52, %.sroa.034.0.insert.insert
  %.sroa.05.0.extract.trunc = trunc i128 %45 to i64
  %.sroa.26.0.extract.shift = lshr i128 %45, 64
  %.sroa.26.0.extract.trunc = trunc nuw i128 %.sroa.26.0.extract.shift to i64
  %.sroa.03.0.extract.trunc = trunc i128 %47 to i64
  %.sroa.24.0.extract.shift = lshr i128 %47, 64
  %.sroa.24.0.extract.trunc = trunc nuw i128 %.sroa.24.0.extract.shift to i64
  %.sroa.01.0.extract.trunc = trunc i128 %49 to i64
  %.sroa.22.0.extract.shift = lshr i128 %49, 64
  %.sroa.22.0.extract.trunc = trunc nuw i128 %.sroa.22.0.extract.shift to i64
  %54 = tail call noundef { i64, i64 } @_Z5countnnnn(i64 noundef %.sroa.05.0.extract.trunc, i64 noundef %.sroa.26.0.extract.trunc, i64 noundef %.sroa.03.0.extract.trunc, i64 noundef %.sroa.24.0.extract.trunc, i64 noundef %.sroa.01.0.extract.trunc, i64 noundef %.sroa.22.0.extract.trunc, i128 noundef %53)
  %55 = extractvalue { i64, i64 } %54, 0
  %56 = extractvalue { i64, i64 } %54, 1
  br label %57

57:                                               ; preds = %7, %16
  %.sroa.0117.0 = phi i64 [ %55, %16 ], [ 0, %7 ]
  %.sroa.3.0 = phi i64 [ %56, %16 ], [ 0, %7 ]
  %.fca.0.insert = insertvalue { i64, i64 } poison, i64 %.sroa.0117.0, 0
  %.fca.1.insert = insertvalue { i64, i64 } %.fca.0.insert, i64 %.sroa.3.0, 1
  ret { i64, i64 } %.fca.1.insert
}

attributes #0 = { mustprogress 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 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" }

!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)"}


; Effective O3 passes: DivRemPairsPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass