; LLVM IR from facebook/hermes :: API/hermes_sandbox/external (hermes_sandbox_impl_opt_compiled_0)

; 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.w2c_hermes = type { ptr, ptr, ptr, i32, i32, i32, %struct.wasm_rt_memory_t, %struct.wasm_rt_funcref_table_t }
%struct.wasm_rt_memory_t = type { ptr, i64, i64, i64, i8 }
%struct.wasm_rt_funcref_table_t = type { ptr, i32, i32 }

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_0x28anonymous0x20namespace0x290x3A0x3Abigint_to_string0x28HermesABIRuntime0x2A0x2C0x20HermesABIBigInt0x2C0x20unsigned0x20int0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.w2c_hermes, ptr %20, i32 0, i32 3
  %22 = load i32, ptr %21, align 8, !tbaa !11
  store i32 %22, ptr %14, align 4, !tbaa !9
  store i32 192, ptr %15, align 4, !tbaa !9
  %23 = load i32, ptr %15, align 4, !tbaa !9
  %24 = load i32, ptr %14, align 4, !tbaa !9
  %25 = sub i32 %24, %23
  store i32 %25, ptr %14, align 4, !tbaa !9
  %26 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %26, ptr %9, align 4, !tbaa !9
  %27 = load i32, ptr %14, align 4, !tbaa !9
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.w2c_hermes, ptr %28, i32 0, i32 3
  store i32 %27, ptr %29, align 8, !tbaa !11
  %30 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %30, ptr %14, align 4, !tbaa !9
  store i32 37, ptr %15, align 4, !tbaa !9
  %31 = load i32, ptr %15, align 4, !tbaa !9
  %32 = load i32, ptr %14, align 4, !tbaa !9
  %33 = sub i32 %32, %31
  store i32 %33, ptr %14, align 4, !tbaa !9
  store i32 -36, ptr %15, align 4, !tbaa !9
  %34 = load i32, ptr %14, align 4, !tbaa !9
  %35 = load i32, ptr %15, align 4, !tbaa !9
  %36 = icmp ule i32 %34, %35
  %37 = zext i1 %36 to i32
  store i32 %37, ptr %14, align 4, !tbaa !9
  %38 = load i32, ptr %14, align 4, !tbaa !9
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %50

40:                                               ; preds = %4
  %41 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %41, ptr %14, align 4, !tbaa !9
  store i32 96, ptr %15, align 4, !tbaa !9
  %42 = load i32, ptr %15, align 4, !tbaa !9
  %43 = load i32, ptr %14, align 4, !tbaa !9
  %44 = add i32 %43, %42
  store i32 %44, ptr %14, align 4, !tbaa !9
  store i32 56582, ptr %15, align 4, !tbaa !9
  store i32 30, ptr %16, align 4, !tbaa !9
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = load i32, ptr %14, align 4, !tbaa !9
  %47 = load i32, ptr %15, align 4, !tbaa !9
  %48 = load i32, ptr %16, align 4, !tbaa !9
  call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x3A0x3A_0x5Fassign_external0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef %45, i32 noundef %46, i32 noundef %47, i32 noundef %48)
  store i32 1, ptr %14, align 4, !tbaa !9
  %49 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %49, ptr %8, align 4, !tbaa !9
  br label %197

50:                                               ; preds = %4
  %51 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %51, ptr %14, align 4, !tbaa !9
  %52 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %52, ptr %15, align 4, !tbaa !9
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.w2c_hermes, ptr %53, i32 0, i32 6
  %55 = load i32, ptr %15, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = add i64 %56, 4
  %58 = call i32 @i32_load(ptr noundef %54, i64 noundef %57)
  store i32 %58, ptr %15, align 4, !tbaa !9
  %59 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %59, ptr %10, align 4, !tbaa !9
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.w2c_hermes, ptr %60, i32 0, i32 6
  %62 = load i32, ptr %14, align 4, !tbaa !9
  %63 = zext i32 %62 to i64
  %64 = add i64 %63, 16
  %65 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %61, i64 noundef %64, i32 noundef %65)
  %66 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %66, ptr %14, align 4, !tbaa !9
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.w2c_hermes, ptr %67, i32 0, i32 6
  %69 = load i32, ptr %14, align 4, !tbaa !9
  %70 = zext i32 %69 to i64
  %71 = add i64 %70, 4
  %72 = call i32 @i32_load(ptr noundef %68, i64 noundef %71)
  store i32 %72, ptr %14, align 4, !tbaa !9
  %73 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %73, ptr %11, align 4, !tbaa !9
  %74 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %74, ptr %14, align 4, !tbaa !9
  store i32 164, ptr %15, align 4, !tbaa !9
  %75 = load i32, ptr %15, align 4, !tbaa !9
  %76 = load i32, ptr %14, align 4, !tbaa !9
  %77 = add i32 %76, %75
  store i32 %77, ptr %14, align 4, !tbaa !9
  %78 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %78, ptr %12, align 4, !tbaa !9
  %79 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %79, ptr %15, align 4, !tbaa !9
  store i32 24, ptr %16, align 4, !tbaa !9
  %80 = load i32, ptr %16, align 4, !tbaa !9
  %81 = load i32, ptr %15, align 4, !tbaa !9
  %82 = add i32 %81, %80
  store i32 %82, ptr %15, align 4, !tbaa !9
  %83 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %83, ptr %13, align 4, !tbaa !9
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.w2c_hermes, ptr %84, i32 0, i32 6
  %86 = load i32, ptr %14, align 4, !tbaa !9
  %87 = zext i32 %86 to i64
  %88 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %85, i64 noundef %87, i32 noundef %88)
  %89 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %89, ptr %14, align 4, !tbaa !9
  store i64 17179869185, ptr %19, align 8, !tbaa !17
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.w2c_hermes, ptr %90, i32 0, i32 6
  %92 = load i32, ptr %14, align 4, !tbaa !9
  %93 = zext i32 %92 to i64
  %94 = add i64 %93, 156
  %95 = load i64, ptr %19, align 8, !tbaa !17
  call void @i64_store(ptr noundef %91, i64 noundef %94, i64 noundef %95)
  %96 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %96, ptr %14, align 4, !tbaa !9
  %97 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %97, ptr %15, align 4, !tbaa !9
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.w2c_hermes, ptr %98, i32 0, i32 6
  %100 = load i32, ptr %14, align 4, !tbaa !9
  %101 = zext i32 %100 to i64
  %102 = add i64 %101, 152
  %103 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %99, i64 noundef %102, i32 noundef %103)
  %104 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %104, ptr %14, align 4, !tbaa !9
  %105 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %105, ptr %15, align 4, !tbaa !9
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.w2c_hermes, ptr %106, i32 0, i32 6
  %108 = load i32, ptr %14, align 4, !tbaa !9
  %109 = zext i32 %108 to i64
  %110 = add i64 %109, 20
  %111 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %107, i64 noundef %110, i32 noundef %111)
  %112 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %112, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %15, align 4, !tbaa !9
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.w2c_hermes, ptr %113, i32 0, i32 6
  %115 = load i32, ptr %14, align 4, !tbaa !9
  %116 = zext i32 %115 to i64
  %117 = add i64 %116, 188
  %118 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %114, i64 noundef %117, i32 noundef %118)
  %119 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %119, ptr %14, align 4, !tbaa !9
  %120 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %120, ptr %15, align 4, !tbaa !9
  store i32 152, ptr %16, align 4, !tbaa !9
  %121 = load i32, ptr %16, align 4, !tbaa !9
  %122 = load i32, ptr %15, align 4, !tbaa !9
  %123 = add i32 %122, %121
  store i32 %123, ptr %15, align 4, !tbaa !9
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.w2c_hermes, ptr %124, i32 0, i32 6
  %126 = load i32, ptr %14, align 4, !tbaa !9
  %127 = zext i32 %126 to i64
  %128 = add i64 %127, 184
  %129 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %125, i64 noundef %128, i32 noundef %129)
  %130 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %130, ptr %14, align 4, !tbaa !9
  %131 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %131, ptr %15, align 4, !tbaa !9
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.w2c_hermes, ptr %132, i32 0, i32 6
  %134 = load i32, ptr %14, align 4, !tbaa !9
  %135 = zext i32 %134 to i64
  %136 = add i64 %135, 180
  %137 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %133, i64 noundef %136, i32 noundef %137)
  %138 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %138, ptr %14, align 4, !tbaa !9
  %139 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %139, ptr %15, align 4, !tbaa !9
  store i32 16, ptr %16, align 4, !tbaa !9
  %140 = load i32, ptr %16, align 4, !tbaa !9
  %141 = load i32, ptr %15, align 4, !tbaa !9
  %142 = add i32 %141, %140
  store i32 %142, ptr %15, align 4, !tbaa !9
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.w2c_hermes, ptr %143, i32 0, i32 6
  %145 = load i32, ptr %14, align 4, !tbaa !9
  %146 = zext i32 %145 to i64
  %147 = add i64 %146, 4
  %148 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %144, i64 noundef %147, i32 noundef %148)
  %149 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %149, ptr %14, align 4, !tbaa !9
  %150 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %150, ptr %15, align 4, !tbaa !9
  %151 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %151, ptr %16, align 4, !tbaa !9
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.w2c_hermes, ptr %152, i32 0, i32 6
  %154 = load i32, ptr %16, align 4, !tbaa !9
  %155 = zext i32 %154 to i64
  %156 = add i64 %155, 8
  %157 = call i32 @i32_load(ptr noundef %153, i64 noundef %156)
  store i32 %157, ptr %16, align 4, !tbaa !9
  %158 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %158, ptr %17, align 4, !tbaa !9
  store i32 255, ptr %18, align 4, !tbaa !9
  %159 = load i32, ptr %18, align 4, !tbaa !9
  %160 = load i32, ptr %17, align 4, !tbaa !9
  %161 = and i32 %160, %159
  store i32 %161, ptr %17, align 4, !tbaa !9
  %162 = load ptr, ptr %5, align 8, !tbaa !5
  %163 = load i32, ptr %14, align 4, !tbaa !9
  %164 = load i32, ptr %15, align 4, !tbaa !9
  %165 = load i32, ptr %16, align 4, !tbaa !9
  %166 = load i32, ptr %17, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ABigIntPrimitive0x3A0x3AtoString0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3APseudoHandle0x3Chermes0x3A0x3Avm0x3A0x3ABigIntPrimitive0x3E0x2C0x20unsigned0x20char0x29(ptr noundef %162, i32 noundef %163, i32 noundef %164, i32 noundef %165, i32 noundef %166)
  %167 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %167, ptr %14, align 4, !tbaa !9
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.w2c_hermes, ptr %168, i32 0, i32 6
  %170 = load i32, ptr %14, align 4, !tbaa !9
  %171 = zext i32 %170 to i64
  %172 = call i32 @i32_load(ptr noundef %169, i64 noundef %171)
  store i32 %172, ptr %14, align 4, !tbaa !9
  %173 = load i32, ptr %14, align 4, !tbaa !9
  %174 = icmp ne i32 %173, 0
  br i1 %174, label %175, label %188

175:                                              ; preds = %50
  %176 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %176, ptr %14, align 4, !tbaa !9
  %177 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %177, ptr %15, align 4, !tbaa !9
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.w2c_hermes, ptr %178, i32 0, i32 6
  %180 = load i32, ptr %15, align 4, !tbaa !9
  %181 = zext i32 %180 to i64
  %182 = add i64 %181, 8
  %183 = call i64 @i64_load(ptr noundef %179, i64 noundef %182)
  store i64 %183, ptr %19, align 8, !tbaa !17
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = load i32, ptr %14, align 4, !tbaa !9
  %186 = load i64, ptr %19, align 8, !tbaa !17
  %187 = call i32 @w2c_hermes_HermesABIManagedPointer0x2A0x200x28anonymous0x20namespace0x290x3A0x3AHermesABIRuntimeImpl0x3A0x3AcreatePointerImpl0x3CHermesABIObject0x3E0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef %184, i32 noundef %185, i64 noundef %186)
  store i32 %187, ptr %14, align 4, !tbaa !9
  br label %189

188:                                              ; preds = %50
  store i32 5, ptr %14, align 4, !tbaa !9
  br label %189

189:                                              ; preds = %188, %175
  %190 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %190, ptr %8, align 4, !tbaa !9
  %191 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %191, ptr %14, align 4, !tbaa !9
  store i32 16, ptr %15, align 4, !tbaa !9
  %192 = load i32, ptr %15, align 4, !tbaa !9
  %193 = load i32, ptr %14, align 4, !tbaa !9
  %194 = add i32 %193, %192
  store i32 %194, ptr %14, align 4, !tbaa !9
  %195 = load ptr, ptr %5, align 8, !tbaa !5
  %196 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A0x7EGCScope0x280x29(ptr noundef %195, i32 noundef %196)
  br label %197

197:                                              ; preds = %189, %40
  %198 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %198, ptr %14, align 4, !tbaa !9
  store i32 192, ptr %15, align 4, !tbaa !9
  %199 = load i32, ptr %15, align 4, !tbaa !9
  %200 = load i32, ptr %14, align 4, !tbaa !9
  %201 = add i32 %200, %199
  store i32 %201, ptr %14, align 4, !tbaa !9
  %202 = load i32, ptr %14, align 4, !tbaa !9
  %203 = load ptr, ptr %5, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.w2c_hermes, ptr %203, i32 0, i32 3
  store i32 %202, ptr %204, align 8, !tbaa !11
  %205 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %205, ptr %14, align 4, !tbaa !9
  %206 = load i32, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret i32 %206
}

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @i32_load(ptr noundef, i64 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @i32_store(ptr noundef, i64 noundef, i32 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @i64_store(ptr noundef, i64 noundef, i64 noundef) #2

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

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

declare void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A0x7EGCScope0x280x29(ptr noundef, i32 noundef) #3

declare void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x3A0x3A_0x5Fassign_external0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #3

declare void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ABigIntPrimitive0x3A0x3AtoString0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3APseudoHandle0x3Chermes0x3A0x3Avm0x3A0x3ABigIntPrimitive0x3E0x2C0x20unsigned0x20char0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3

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

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

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


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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_0x28anonymous0x20namespace0x290x3A0x3Abigint_to_string0x28HermesABIRuntime0x2A0x2C0x20HermesABIBigInt0x2C0x20unsigned0x20int0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %0, i64 24
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = add i32 %6, -192
  store i32 %7, ptr %5, align 8, !tbaa !5
  %8 = add i32 %3, -37
  %9 = icmp ult i32 %8, -35
  br i1 %9, label %10, label %12

10:                                               ; preds = %4
  %11 = add i32 %1, 96
  tail call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x3A0x3A_0x5Fassign_external0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef nonnull %0, i32 noundef %11, i32 noundef 56582, i32 noundef 30) #3
  br label %42

12:                                               ; preds = %4
  %13 = getelementptr inbounds i8, ptr %0, i64 40
  %14 = zext i32 %1 to i64
  %15 = add nuw nsw i64 %14, 4
  %16 = tail call i32 @i32_load(ptr noundef nonnull %13, i64 noundef %15)
  %17 = zext i32 %7 to i64
  %18 = add nuw nsw i64 %17, 16
  tail call void @i32_store(ptr noundef nonnull %13, i64 noundef %18, i32 noundef %16)
  %19 = zext i32 %16 to i64
  %20 = add nuw nsw i64 %19, 4
  %21 = tail call i32 @i32_load(ptr noundef nonnull %13, i64 noundef %20)
  %22 = add i32 %6, -28
  %23 = add i32 %6, -168
  %24 = zext i32 %22 to i64
  tail call void @i32_store(ptr noundef nonnull %13, i64 noundef %24, i32 noundef %23)
  %25 = add nuw nsw i64 %17, 156
  tail call void @i64_store(ptr noundef nonnull %13, i64 noundef %25, i64 noundef 17179869185)
  %26 = add nuw nsw i64 %17, 152
  tail call void @i32_store(ptr noundef nonnull %13, i64 noundef %26, i32 noundef %22)
  %27 = add nuw nsw i64 %17, 20
  tail call void @i32_store(ptr noundef nonnull %13, i64 noundef %27, i32 noundef %21)
  %28 = add nuw nsw i64 %17, 188
  tail call void @i32_store(ptr noundef nonnull %13, i64 noundef %28, i32 noundef 0)
  %29 = add i32 %6, -40
  %30 = add nuw nsw i64 %17, 184
  tail call void @i32_store(ptr noundef nonnull %13, i64 noundef %30, i32 noundef %29)
  %31 = add nuw nsw i64 %17, 180
  tail call void @i32_store(ptr noundef nonnull %13, i64 noundef %31, i32 noundef %23)
  %32 = add i32 %6, -176
  tail call void @i32_store(ptr noundef nonnull %13, i64 noundef %20, i32 noundef %32)
  %33 = zext i32 %2 to i64
  %34 = add nuw nsw i64 %33, 8
  %35 = tail call i32 @i32_load(ptr noundef nonnull %13, i64 noundef %34)
  tail call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ABigIntPrimitive0x3A0x3AtoString0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3APseudoHandle0x3Chermes0x3A0x3Avm0x3A0x3ABigIntPrimitive0x3E0x2C0x20unsigned0x20char0x29(ptr noundef nonnull %0, i32 noundef %7, i32 noundef %16, i32 noundef %35, i32 noundef %3) #3
  %36 = tail call i32 @i32_load(ptr noundef nonnull %13, i64 noundef %17)
  %.not = icmp eq i32 %36, 0
  br i1 %.not, label %41, label %37

37:                                               ; preds = %12
  %38 = add nuw nsw i64 %17, 8
  %39 = tail call i64 @i64_load(ptr noundef nonnull %13, i64 noundef %38)
  %40 = tail call i32 @w2c_hermes_HermesABIManagedPointer0x2A0x200x28anonymous0x20namespace0x290x3A0x3AHermesABIRuntimeImpl0x3A0x3AcreatePointerImpl0x3CHermesABIObject0x3E0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef nonnull %0, i32 noundef %1, i64 noundef %39)
  br label %41

41:                                               ; preds = %12, %37
  %.0116 = phi i32 [ %40, %37 ], [ 5, %12 ]
  tail call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A0x7EGCScope0x280x29(ptr noundef nonnull %0, i32 noundef %32) #3
  br label %42

42:                                               ; preds = %41, %10
  %.0 = phi i32 [ 1, %10 ], [ %.0116, %41 ]
  store i32 %6, ptr %5, align 8, !tbaa !5
  ret i32 %.0
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @i32_load(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @i32_store(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @i64_store(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

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

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

declare void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A0x7EGCScope0x280x29(ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x3A0x3A_0x5Fassign_external0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ABigIntPrimitive0x3A0x3AtoString0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3APseudoHandle0x3Chermes0x3A0x3Avm0x3A0x3ABigIntPrimitive0x3E0x2C0x20unsigned0x20char0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !10, i64 24}
!6 = !{!"w2c_hermes", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !11, i64 40, !14, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"", !7, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32}
!12 = !{!"long", !8, i64 0}
!13 = !{!"_Bool", !8, i64 0}
!14 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12}


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