; LLVM IR from cryptid-org/cryptid-native :: dependencies/gmp/src (mini-gmp)

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

; 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: nounwind uwtable
declare dso_local void @mpz_init(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_clear(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_set_si(ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_set_ui(ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @mpz_sgn(ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_abs(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_neg(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_swap(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_add(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_sub(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_mul_2exp(ptr noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_tdiv_qr(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_divexact(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_divexact_ui(ptr noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i64 @mpz_make_odd(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @mpz_gcdext(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #1 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca [1 x %struct.__mpz_struct], align 16
  %12 = alloca [1 x %struct.__mpz_struct], align 16
  %13 = alloca [1 x %struct.__mpz_struct], align 16
  %14 = alloca [1 x %struct.__mpz_struct], align 16
  %15 = alloca [1 x %struct.__mpz_struct], align 16
  %16 = alloca [1 x %struct.__mpz_struct], align 16
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i32, align 4
  %23 = alloca i64, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #2
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #2
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #2
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #2
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #2
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #2
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.__mpz_struct, ptr %29, i32 0, i32 1
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %33, label %50

33:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #2
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = call i32 @mpz_sgn(ptr noundef %34)
  %36 = sext i32 %35 to i64
  store i64 %36, ptr %21, align 8, !tbaa !12
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  call void @mpz_abs(ptr noundef %37, ptr noundef %38)
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %43

41:                                               ; preds = %33
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  call void @mpz_set_ui(ptr noundef %42, i64 noundef 0)
  br label %43

43:                                               ; preds = %41, %33
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = icmp ne ptr %44, null
  br i1 %45, label %46, label %49

46:                                               ; preds = %43
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = load i64, ptr %21, align 8, !tbaa !12
  call void @mpz_set_si(ptr noundef %47, i64 noundef %48)
  br label %49

49:                                               ; preds = %46, %43
  store i32 1, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #2
  br label %326

50:                                               ; preds = %5
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.__mpz_struct, ptr %51, i32 0, i32 1
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %72

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #2
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = call i32 @mpz_sgn(ptr noundef %56)
  %58 = sext i32 %57 to i64
  store i64 %58, ptr %23, align 8, !tbaa !12
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  call void @mpz_abs(ptr noundef %59, ptr noundef %60)
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = icmp ne ptr %61, null
  br i1 %62, label %63, label %66

63:                                               ; preds = %55
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = load i64, ptr %23, align 8, !tbaa !12
  call void @mpz_set_si(ptr noundef %64, i64 noundef %65)
  br label %66

66:                                               ; preds = %63, %55
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %71

69:                                               ; preds = %66
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  call void @mpz_set_ui(ptr noundef %70, i64 noundef 0)
  br label %71

71:                                               ; preds = %69, %66
  store i32 1, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #2
  br label %326

72:                                               ; preds = %50
  %73 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %11, i64 0, i64 0
  call void @mpz_init(ptr noundef %73)
  %74 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  call void @mpz_init(ptr noundef %74)
  %75 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  call void @mpz_init(ptr noundef %75)
  %76 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  call void @mpz_init(ptr noundef %76)
  %77 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  call void @mpz_init(ptr noundef %77)
  %78 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %16, i64 0, i64 0
  call void @mpz_init(ptr noundef %78)
  %79 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %11, i64 0, i64 0
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  call void @mpz_abs(ptr noundef %79, ptr noundef %80)
  %81 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %11, i64 0, i64 0
  %82 = call i64 @mpz_make_odd(ptr noundef %81)
  store i64 %82, ptr %17, align 8, !tbaa !12
  %83 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  call void @mpz_abs(ptr noundef %83, ptr noundef %84)
  %85 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  %86 = call i64 @mpz_make_odd(ptr noundef %85)
  store i64 %86, ptr %18, align 8, !tbaa !12
  %87 = load i64, ptr %17, align 8, !tbaa !12
  %88 = load i64, ptr %18, align 8, !tbaa !12
  %89 = icmp ult i64 %87, %88
  br i1 %89, label %90, label %92

90:                                               ; preds = %72
  %91 = load i64, ptr %17, align 8, !tbaa !12
  br label %94

92:                                               ; preds = %72
  %93 = load i64, ptr %18, align 8, !tbaa !12
  br label %94

94:                                               ; preds = %92, %90
  %95 = phi i64 [ %91, %90 ], [ %93, %92 ]
  store i64 %95, ptr %19, align 8, !tbaa !12
  %96 = load i64, ptr %19, align 8, !tbaa !12
  %97 = load i64, ptr %17, align 8, !tbaa !12
  %98 = sub i64 %97, %96
  store i64 %98, ptr %17, align 8, !tbaa !12
  %99 = load i64, ptr %19, align 8, !tbaa !12
  %100 = load i64, ptr %18, align 8, !tbaa !12
  %101 = sub i64 %100, %99
  store i64 %101, ptr %18, align 8, !tbaa !12
  %102 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %11, i64 0, i64 0
  %103 = getelementptr inbounds %struct.__mpz_struct, ptr %102, i32 0, i32 1
  %104 = load i32, ptr %103, align 4, !tbaa !9
  %105 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  %106 = getelementptr inbounds %struct.__mpz_struct, ptr %105, i32 0, i32 1
  %107 = load i32, ptr %106, align 4, !tbaa !9
  %108 = icmp slt i32 %104, %107
  br i1 %108, label %109, label %130

109:                                              ; preds = %94
  %110 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %11, i64 0, i64 0
  %111 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  call void @mpz_swap(ptr noundef %110, ptr noundef %111)
  br label %112

112:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #2
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %113, ptr %24, align 8, !tbaa !5
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %114, ptr %9, align 8, !tbaa !5
  %115 = load ptr, ptr %24, align 8, !tbaa !5
  store ptr %115, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #2
  br label %116

116:                                              ; preds = %112
  br label %117

117:                                              ; preds = %116
  br label %118

118:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #2
  %119 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %119, ptr %25, align 8, !tbaa !5
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %120, ptr %7, align 8, !tbaa !5
  %121 = load ptr, ptr %25, align 8, !tbaa !5
  store ptr %121, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #2
  br label %122

122:                                              ; preds = %118
  br label %123

123:                                              ; preds = %122
  br label %124

124:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #2
  %125 = load i64, ptr %17, align 8, !tbaa !12
  store i64 %125, ptr %26, align 8, !tbaa !12
  %126 = load i64, ptr %18, align 8, !tbaa !12
  store i64 %126, ptr %17, align 8, !tbaa !12
  %127 = load i64, ptr %26, align 8, !tbaa !12
  store i64 %127, ptr %18, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #2
  br label %128

128:                                              ; preds = %124
  br label %129

129:                                              ; preds = %128
  br label %130

130:                                              ; preds = %129, %94
  %131 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %132 = load i64, ptr %17, align 8, !tbaa !12
  call void @mpz_setbit(ptr noundef %131, i64 noundef %132)
  %133 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %16, i64 0, i64 0
  %134 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %11, i64 0, i64 0
  %135 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %11, i64 0, i64 0
  %136 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  call void @mpz_tdiv_qr(ptr noundef %133, ptr noundef %134, ptr noundef %135, ptr noundef %136)
  %137 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %16, i64 0, i64 0
  %138 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %16, i64 0, i64 0
  %139 = load i64, ptr %17, align 8, !tbaa !12
  call void @mpz_mul_2exp(ptr noundef %137, ptr noundef %138, i64 noundef %139)
  %140 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  %141 = load i64, ptr %18, align 8, !tbaa !12
  call void @mpz_setbit(ptr noundef %140, i64 noundef %141)
  %142 = load i64, ptr %17, align 8, !tbaa !12
  %143 = load i64, ptr %18, align 8, !tbaa !12
  %144 = add i64 %142, %143
  store i64 %144, ptr %20, align 8, !tbaa !12
  %145 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %11, i64 0, i64 0
  %146 = getelementptr inbounds %struct.__mpz_struct, ptr %145, i32 0, i32 1
  %147 = load i32, ptr %146, align 4, !tbaa !9
  %148 = icmp sgt i32 %147, 0
  br i1 %148, label %149, label %215

149:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #2
  %150 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %11, i64 0, i64 0
  %151 = call i64 @mpz_make_odd(ptr noundef %150)
  store i64 %151, ptr %27, align 8, !tbaa !12
  %152 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %153 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %154 = load i64, ptr %27, align 8, !tbaa !12
  call void @mpz_mul_2exp(ptr noundef %152, ptr noundef %153, i64 noundef %154)
  %155 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %156 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %157 = load i64, ptr %27, align 8, !tbaa !12
  call void @mpz_mul_2exp(ptr noundef %155, ptr noundef %156, i64 noundef %157)
  %158 = load i64, ptr %27, align 8, !tbaa !12
  %159 = load i64, ptr %20, align 8, !tbaa !12
  %160 = add i64 %159, %158
  store i64 %160, ptr %20, align 8, !tbaa !12
  br label %161

161:                                              ; preds = %213, %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #2
  %162 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %11, i64 0, i64 0
  %163 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  %164 = call i32 @mpz_cmp(ptr noundef %162, ptr noundef %163)
  store i32 %164, ptr %28, align 4, !tbaa !14
  %165 = load i32, ptr %28, align 4, !tbaa !14
  %166 = icmp eq i32 %165, 0
  br i1 %166, label %167, label %168

167:                                              ; preds = %161
  store i32 8, ptr %22, align 4
  br label %211

168:                                              ; preds = %161
  %169 = load i32, ptr %28, align 4, !tbaa !14
  %170 = icmp slt i32 %169, 0
  br i1 %170, label %171, label %189

171:                                              ; preds = %168
  %172 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  %173 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  %174 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %11, i64 0, i64 0
  call void @mpz_sub(ptr noundef %172, ptr noundef %173, ptr noundef %174)
  %175 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %176 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %177 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %16, i64 0, i64 0
  call void @mpz_add(ptr noundef %175, ptr noundef %176, ptr noundef %177)
  %178 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %179 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %180 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  call void @mpz_add(ptr noundef %178, ptr noundef %179, ptr noundef %180)
  %181 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  %182 = call i64 @mpz_make_odd(ptr noundef %181)
  store i64 %182, ptr %27, align 8, !tbaa !12
  %183 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %16, i64 0, i64 0
  %184 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %16, i64 0, i64 0
  %185 = load i64, ptr %27, align 8, !tbaa !12
  call void @mpz_mul_2exp(ptr noundef %183, ptr noundef %184, i64 noundef %185)
  %186 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  %187 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  %188 = load i64, ptr %27, align 8, !tbaa !12
  call void @mpz_mul_2exp(ptr noundef %186, ptr noundef %187, i64 noundef %188)
  br label %207

189:                                              ; preds = %168
  %190 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %11, i64 0, i64 0
  %191 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %11, i64 0, i64 0
  %192 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  call void @mpz_sub(ptr noundef %190, ptr noundef %191, ptr noundef %192)
  %193 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %16, i64 0, i64 0
  %194 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %195 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %16, i64 0, i64 0
  call void @mpz_add(ptr noundef %193, ptr noundef %194, ptr noundef %195)
  %196 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  %197 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %198 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  call void @mpz_add(ptr noundef %196, ptr noundef %197, ptr noundef %198)
  %199 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %11, i64 0, i64 0
  %200 = call i64 @mpz_make_odd(ptr noundef %199)
  store i64 %200, ptr %27, align 8, !tbaa !12
  %201 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %202 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %203 = load i64, ptr %27, align 8, !tbaa !12
  call void @mpz_mul_2exp(ptr noundef %201, ptr noundef %202, i64 noundef %203)
  %204 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %205 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %206 = load i64, ptr %27, align 8, !tbaa !12
  call void @mpz_mul_2exp(ptr noundef %204, ptr noundef %205, i64 noundef %206)
  br label %207

207:                                              ; preds = %189, %171
  %208 = load i64, ptr %27, align 8, !tbaa !12
  %209 = load i64, ptr %20, align 8, !tbaa !12
  %210 = add i64 %209, %208
  store i64 %210, ptr %20, align 8, !tbaa !12
  store i32 0, ptr %22, align 4
  br label %211

211:                                              ; preds = %207, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #2
  %212 = load i32, ptr %22, align 4
  switch i32 %212, label %329 [
    i32 0, label %213
    i32 8, label %214
  ]

213:                                              ; preds = %211
  br label %161

214:                                              ; preds = %211
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #2
  br label %215

215:                                              ; preds = %214, %130
  %216 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  %217 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  %218 = load i64, ptr %19, align 8, !tbaa !12
  call void @mpz_mul_2exp(ptr noundef %216, ptr noundef %217, i64 noundef %218)
  %219 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %220 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  call void @mpz_neg(ptr noundef %219, ptr noundef %220)
  %221 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  %222 = load ptr, ptr %10, align 8, !tbaa !5
  %223 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  call void @mpz_divexact(ptr noundef %221, ptr noundef %222, ptr noundef %223)
  %224 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  %225 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  call void @mpz_abs(ptr noundef %224, ptr noundef %225)
  %226 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %16, i64 0, i64 0
  %227 = load ptr, ptr %9, align 8, !tbaa !5
  %228 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  call void @mpz_divexact(ptr noundef %226, ptr noundef %227, ptr noundef %228)
  %229 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %16, i64 0, i64 0
  %230 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %16, i64 0, i64 0
  call void @mpz_abs(ptr noundef %229, ptr noundef %230)
  br label %231

231:                                              ; preds = %270, %215
  %232 = load i64, ptr %20, align 8, !tbaa !12
  %233 = add i64 %232, -1
  store i64 %233, ptr %20, align 8, !tbaa !12
  %234 = icmp ugt i64 %232, 0
  br i1 %234, label %235, label %275

235:                                              ; preds = %231
  %236 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %237 = getelementptr inbounds %struct.__mpz_struct, ptr %236, i32 0, i32 1
  %238 = load i32, ptr %237, align 4, !tbaa !9
  %239 = icmp ne i32 %238, 0
  %240 = zext i1 %239 to i32
  %241 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %242 = getelementptr inbounds %struct.__mpz_struct, ptr %241, i32 0, i32 2
  %243 = load ptr, ptr %242, align 8, !tbaa !15
  %244 = getelementptr inbounds i64, ptr %243, i64 0
  %245 = load i64, ptr %244, align 8, !tbaa !12
  %246 = trunc i64 %245 to i32
  %247 = and i32 %240, %246
  %248 = icmp ne i32 %247, 0
  br i1 %248, label %263, label %249

249:                                              ; preds = %235
  %250 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %251 = getelementptr inbounds %struct.__mpz_struct, ptr %250, i32 0, i32 1
  %252 = load i32, ptr %251, align 4, !tbaa !9
  %253 = icmp ne i32 %252, 0
  %254 = zext i1 %253 to i32
  %255 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %256 = getelementptr inbounds %struct.__mpz_struct, ptr %255, i32 0, i32 2
  %257 = load ptr, ptr %256, align 8, !tbaa !15
  %258 = getelementptr inbounds i64, ptr %257, i64 0
  %259 = load i64, ptr %258, align 8, !tbaa !12
  %260 = trunc i64 %259 to i32
  %261 = and i32 %254, %260
  %262 = icmp ne i32 %261, 0
  br i1 %262, label %263, label %270

263:                                              ; preds = %249, %235
  %264 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %265 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %266 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  call void @mpz_sub(ptr noundef %264, ptr noundef %265, ptr noundef %266)
  %267 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %268 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %269 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %16, i64 0, i64 0
  call void @mpz_add(ptr noundef %267, ptr noundef %268, ptr noundef %269)
  br label %270

270:                                              ; preds = %263, %249
  %271 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %272 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  call void @mpz_divexact_ui(ptr noundef %271, ptr noundef %272, i64 noundef 2)
  %273 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %274 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  call void @mpz_divexact_ui(ptr noundef %273, ptr noundef %274, i64 noundef 2)
  br label %231, !llvm.loop !16

275:                                              ; preds = %231
  %276 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  %277 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %278 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  call void @mpz_add(ptr noundef %276, ptr noundef %277, ptr noundef %278)
  %279 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %280 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  %281 = call i32 @mpz_cmpabs(ptr noundef %279, ptr noundef %280)
  %282 = icmp sgt i32 %281, 0
  br i1 %282, label %283, label %289

283:                                              ; preds = %275
  %284 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %285 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  call void @mpz_swap(ptr noundef %284, ptr noundef %285)
  %286 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %287 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %288 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %16, i64 0, i64 0
  call void @mpz_sub(ptr noundef %286, ptr noundef %287, ptr noundef %288)
  br label %289

289:                                              ; preds = %283, %275
  %290 = load ptr, ptr %9, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.__mpz_struct, ptr %290, i32 0, i32 1
  %292 = load i32, ptr %291, align 4, !tbaa !9
  %293 = icmp slt i32 %292, 0
  br i1 %293, label %294, label %297

294:                                              ; preds = %289
  %295 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  %296 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  call void @mpz_neg(ptr noundef %295, ptr noundef %296)
  br label %297

297:                                              ; preds = %294, %289
  %298 = load ptr, ptr %10, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.__mpz_struct, ptr %298, i32 0, i32 1
  %300 = load i32, ptr %299, align 4, !tbaa !9
  %301 = icmp slt i32 %300, 0
  br i1 %301, label %302, label %305

302:                                              ; preds = %297
  %303 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  %304 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  call void @mpz_neg(ptr noundef %303, ptr noundef %304)
  br label %305

305:                                              ; preds = %302, %297
  %306 = load ptr, ptr %6, align 8, !tbaa !5
  %307 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  call void @mpz_swap(ptr noundef %306, ptr noundef %307)
  %308 = load ptr, ptr %7, align 8, !tbaa !5
  %309 = icmp ne ptr %308, null
  br i1 %309, label %310, label %313

310:                                              ; preds = %305
  %311 = load ptr, ptr %7, align 8, !tbaa !5
  %312 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  call void @mpz_swap(ptr noundef %311, ptr noundef %312)
  br label %313

313:                                              ; preds = %310, %305
  %314 = load ptr, ptr %8, align 8, !tbaa !5
  %315 = icmp ne ptr %314, null
  br i1 %315, label %316, label %319

316:                                              ; preds = %313
  %317 = load ptr, ptr %8, align 8, !tbaa !5
  %318 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  call void @mpz_swap(ptr noundef %317, ptr noundef %318)
  br label %319

319:                                              ; preds = %316, %313
  %320 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %11, i64 0, i64 0
  call void @mpz_clear(ptr noundef %320)
  %321 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %12, i64 0, i64 0
  call void @mpz_clear(ptr noundef %321)
  %322 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %13, i64 0, i64 0
  call void @mpz_clear(ptr noundef %322)
  %323 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %14, i64 0, i64 0
  call void @mpz_clear(ptr noundef %323)
  %324 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %15, i64 0, i64 0
  call void @mpz_clear(ptr noundef %324)
  %325 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %16, i64 0, i64 0
  call void @mpz_clear(ptr noundef %325)
  store i32 0, ptr %22, align 4
  br label %326

326:                                              ; preds = %319, %71, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #2
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #2
  %327 = load i32, ptr %22, align 4
  switch i32 %327, label %329 [
    i32 0, label %328
    i32 1, label %328
  ]

328:                                              ; preds = %326, %326
  ret void

329:                                              ; preds = %326, %211
  unreachable
}

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_setbit(ptr noundef, i64 noundef) #1

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

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

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


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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_init(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_clear(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_set_si(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_set_ui(ptr noundef, i64 noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_abs(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_neg(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_swap(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_add(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_sub(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_mul_2exp(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_tdiv_qr(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_divexact(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_divexact_ui(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i64 @mpz_make_odd(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @mpz_gcdext(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = alloca [1 x %struct.__mpz_struct], align 16
  %7 = alloca [1 x %struct.__mpz_struct], align 16
  %8 = alloca [1 x %struct.__mpz_struct], align 16
  %9 = alloca [1 x %struct.__mpz_struct], align 16
  %10 = alloca [1 x %struct.__mpz_struct], align 16
  %11 = alloca [1 x %struct.__mpz_struct], align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #3
  %12 = getelementptr inbounds i8, ptr %3, i64 4
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %21

15:                                               ; preds = %5
  %16 = tail call i32 @mpz_sgn(ptr noundef %4)
  %17 = sext i32 %16 to i64
  tail call void @mpz_abs(ptr noundef %0, ptr noundef %4)
  %.not88 = icmp eq ptr %1, null
  br i1 %.not88, label %19, label %18

18:                                               ; preds = %15
  tail call void @mpz_set_ui(ptr noundef nonnull %1, i64 noundef 0)
  br label %19

19:                                               ; preds = %18, %15
  %.not89 = icmp eq ptr %2, null
  br i1 %.not89, label %97, label %20

20:                                               ; preds = %19
  tail call void @mpz_set_si(ptr noundef nonnull %2, i64 noundef %17)
  br label %97

21:                                               ; preds = %5
  %22 = getelementptr inbounds i8, ptr %4, i64 4
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %31

25:                                               ; preds = %21
  %26 = tail call i32 @mpz_sgn(ptr noundef nonnull %3)
  tail call void @mpz_abs(ptr noundef %0, ptr noundef nonnull %3)
  %.not86 = icmp eq ptr %1, null
  br i1 %.not86, label %29, label %27

27:                                               ; preds = %25
  %28 = sext i32 %26 to i64
  tail call void @mpz_set_si(ptr noundef nonnull %1, i64 noundef %28)
  br label %29

29:                                               ; preds = %27, %25
  %.not87 = icmp eq ptr %2, null
  br i1 %.not87, label %97, label %30

30:                                               ; preds = %29
  tail call void @mpz_set_ui(ptr noundef nonnull %2, i64 noundef 0)
  br label %97

31:                                               ; preds = %21
  call void @mpz_init(ptr noundef nonnull %6)
  call void @mpz_init(ptr noundef nonnull %7)
  call void @mpz_init(ptr noundef nonnull %8)
  call void @mpz_init(ptr noundef nonnull %9)
  call void @mpz_init(ptr noundef nonnull %10)
  call void @mpz_init(ptr noundef nonnull %11)
  call void @mpz_abs(ptr noundef nonnull %6, ptr noundef nonnull %3)
  %32 = call i64 @mpz_make_odd(ptr noundef nonnull %6)
  call void @mpz_abs(ptr noundef nonnull %7, ptr noundef nonnull %4)
  %33 = call i64 @mpz_make_odd(ptr noundef nonnull %7)
  %34 = call i64 @llvm.umin.i64(i64 %32, i64 %33)
  %35 = sub i64 %32, %34
  %36 = sub i64 %33, %34
  %37 = getelementptr inbounds i8, ptr %6, i64 4
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %7, i64 4
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = icmp slt i32 %38, %40
  br i1 %41, label %42, label %43

42:                                               ; preds = %31
  call void @mpz_swap(ptr noundef nonnull %6, ptr noundef nonnull %7)
  br label %43

43:                                               ; preds = %42, %31
  %.071 = phi i64 [ %35, %42 ], [ %36, %31 ]
  %.069 = phi i64 [ %36, %42 ], [ %35, %31 ]
  %.068 = phi ptr [ %3, %42 ], [ %4, %31 ]
  %.067 = phi ptr [ %4, %42 ], [ %3, %31 ]
  %.066 = phi ptr [ %1, %42 ], [ %2, %31 ]
  %.0 = phi ptr [ %2, %42 ], [ %1, %31 ]
  call void @mpz_setbit(ptr noundef nonnull %10, i64 noundef %.069)
  call void @mpz_tdiv_qr(ptr noundef nonnull %11, ptr noundef nonnull %6, ptr noundef nonnull %6, ptr noundef nonnull %7)
  call void @mpz_mul_2exp(ptr noundef nonnull %11, ptr noundef nonnull %11, i64 noundef %.069)
  call void @mpz_setbit(ptr noundef nonnull %9, i64 noundef %.071)
  %44 = add i64 %36, %35
  %45 = load i32, ptr %37, align 4, !tbaa !5
  %46 = icmp sgt i32 %45, 0
  br i1 %46, label %47, label %.thread

47:                                               ; preds = %43
  %48 = call i64 @mpz_make_odd(ptr noundef nonnull %6)
  call void @mpz_mul_2exp(ptr noundef nonnull %10, ptr noundef nonnull %10, i64 noundef %48)
  call void @mpz_mul_2exp(ptr noundef nonnull %8, ptr noundef nonnull %8, i64 noundef %48)
  %49 = add i64 %48, %44
  %50 = call i32 @mpz_cmp(ptr noundef nonnull %6, ptr noundef nonnull %7)
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %.thread, label %.lr.ph

.lr.ph:                                           ; preds = %47, %58
  %52 = phi i32 [ %60, %58 ], [ %50, %47 ]
  %.07293 = phi i64 [ %59, %58 ], [ %49, %47 ]
  %53 = icmp slt i32 %52, 0
  br i1 %53, label %54, label %56

54:                                               ; preds = %.lr.ph
  call void @mpz_sub(ptr noundef nonnull %7, ptr noundef nonnull %7, ptr noundef nonnull %6)
  call void @mpz_add(ptr noundef nonnull %10, ptr noundef nonnull %10, ptr noundef nonnull %11)
  call void @mpz_add(ptr noundef nonnull %8, ptr noundef nonnull %8, ptr noundef nonnull %9)
  %55 = call i64 @mpz_make_odd(ptr noundef nonnull %7)
  call void @mpz_mul_2exp(ptr noundef nonnull %11, ptr noundef nonnull %11, i64 noundef %55)
  call void @mpz_mul_2exp(ptr noundef nonnull %9, ptr noundef nonnull %9, i64 noundef %55)
  br label %58

56:                                               ; preds = %.lr.ph
  call void @mpz_sub(ptr noundef nonnull %6, ptr noundef nonnull %6, ptr noundef nonnull %7)
  call void @mpz_add(ptr noundef nonnull %11, ptr noundef nonnull %10, ptr noundef nonnull %11)
  call void @mpz_add(ptr noundef nonnull %9, ptr noundef nonnull %8, ptr noundef nonnull %9)
  %57 = call i64 @mpz_make_odd(ptr noundef nonnull %6)
  call void @mpz_mul_2exp(ptr noundef nonnull %10, ptr noundef nonnull %10, i64 noundef %57)
  call void @mpz_mul_2exp(ptr noundef nonnull %8, ptr noundef nonnull %8, i64 noundef %57)
  br label %58

58:                                               ; preds = %54, %56
  %.065 = phi i64 [ %55, %54 ], [ %57, %56 ]
  %59 = add i64 %.065, %.07293
  %60 = call i32 @mpz_cmp(ptr noundef nonnull %6, ptr noundef nonnull %7)
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %.thread, label %.lr.ph

.thread:                                          ; preds = %58, %47, %43
  %.2 = phi i64 [ %44, %43 ], [ %49, %47 ], [ %59, %58 ]
  call void @mpz_mul_2exp(ptr noundef nonnull %7, ptr noundef nonnull %7, i64 noundef %34)
  call void @mpz_neg(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @mpz_divexact(ptr noundef nonnull %9, ptr noundef %.068, ptr noundef nonnull %7)
  call void @mpz_abs(ptr noundef nonnull %9, ptr noundef nonnull %9)
  call void @mpz_divexact(ptr noundef nonnull %11, ptr noundef %.067, ptr noundef nonnull %7)
  call void @mpz_abs(ptr noundef nonnull %11, ptr noundef nonnull %11)
  %.not94 = icmp eq i64 %.2, 0
  br i1 %.not94, label %._crit_edge, label %.lr.ph95

.lr.ph95:                                         ; preds = %.thread
  %62 = getelementptr inbounds i8, ptr %8, i64 4
  %63 = getelementptr inbounds i8, ptr %8, i64 8
  %64 = getelementptr inbounds i8, ptr %10, i64 4
  %65 = getelementptr inbounds i8, ptr %10, i64 8
  br label %66

66:                                               ; preds = %.lr.ph95, %78
  %.in = phi i64 [ %.2, %.lr.ph95 ], [ %67, %78 ]
  %67 = add i64 %.in, -1
  %68 = load i32, ptr %62, align 4, !tbaa !5
  %.not80 = icmp eq i32 %68, 0
  %69 = load ptr, ptr %63, align 8, !tbaa !11
  %70 = load i64, ptr %69, align 8, !tbaa !12
  %71 = and i64 %70, 1
  %.not8182 = icmp eq i64 %71, 0
  %.not81 = select i1 %.not80, i1 true, i1 %.not8182
  br i1 %.not81, label %72, label %77

72:                                               ; preds = %66
  %73 = load i32, ptr %64, align 4, !tbaa !5
  %.not83 = icmp eq i32 %73, 0
  %74 = load ptr, ptr %65, align 8, !tbaa !11
  %75 = load i64, ptr %74, align 8, !tbaa !12
  %76 = and i64 %75, 1
  %.not8485 = icmp eq i64 %76, 0
  %.not84 = select i1 %.not83, i1 true, i1 %.not8485
  br i1 %.not84, label %78, label %77

77:                                               ; preds = %72, %66
  call void @mpz_sub(ptr noundef nonnull %8, ptr noundef nonnull %8, ptr noundef nonnull %9)
  call void @mpz_add(ptr noundef nonnull %10, ptr noundef nonnull %10, ptr noundef nonnull %11)
  br label %78

78:                                               ; preds = %77, %72
  call void @mpz_divexact_ui(ptr noundef nonnull %8, ptr noundef nonnull %8, i64 noundef 2)
  call void @mpz_divexact_ui(ptr noundef nonnull %10, ptr noundef nonnull %10, i64 noundef 2)
  %.not = icmp eq i64 %67, 0
  br i1 %.not, label %._crit_edge, label %66, !llvm.loop !14

._crit_edge:                                      ; preds = %78, %.thread
  call void @mpz_add(ptr noundef nonnull %9, ptr noundef nonnull %8, ptr noundef nonnull %9)
  %79 = call i32 @mpz_cmpabs(ptr noundef nonnull %8, ptr noundef nonnull %9)
  %80 = icmp sgt i32 %79, 0
  br i1 %80, label %81, label %82

81:                                               ; preds = %._crit_edge
  call void @mpz_swap(ptr noundef nonnull %8, ptr noundef nonnull %9)
  call void @mpz_sub(ptr noundef nonnull %10, ptr noundef nonnull %10, ptr noundef nonnull %11)
  br label %82

82:                                               ; preds = %81, %._crit_edge
  %83 = getelementptr inbounds i8, ptr %.067, i64 4
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = icmp slt i32 %84, 0
  br i1 %85, label %86, label %87

86:                                               ; preds = %82
  call void @mpz_neg(ptr noundef nonnull %8, ptr noundef nonnull %8)
  br label %87

87:                                               ; preds = %86, %82
  %88 = getelementptr inbounds i8, ptr %.068, i64 4
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = icmp slt i32 %89, 0
  br i1 %90, label %91, label %92

91:                                               ; preds = %87
  call void @mpz_neg(ptr noundef nonnull %10, ptr noundef nonnull %10)
  br label %92

92:                                               ; preds = %91, %87
  call void @mpz_swap(ptr noundef %0, ptr noundef nonnull %7)
  %.not78 = icmp eq ptr %.0, null
  br i1 %.not78, label %94, label %93

93:                                               ; preds = %92
  call void @mpz_swap(ptr noundef nonnull %.0, ptr noundef nonnull %8)
  br label %94

94:                                               ; preds = %93, %92
  %.not79 = icmp eq ptr %.066, null
  br i1 %.not79, label %96, label %95

95:                                               ; preds = %94
  call void @mpz_swap(ptr noundef nonnull %.066, ptr noundef nonnull %10)
  br label %96

96:                                               ; preds = %95, %94
  call void @mpz_clear(ptr noundef nonnull %6)
  call void @mpz_clear(ptr noundef nonnull %7)
  call void @mpz_clear(ptr noundef nonnull %8)
  call void @mpz_clear(ptr noundef nonnull %9)
  call void @mpz_clear(ptr noundef nonnull %10)
  call void @mpz_clear(ptr noundef nonnull %11)
  br label %97

97:                                               ; preds = %29, %30, %19, %20, %96
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_setbit(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !7, i64 4}
!6 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass