CoolFace
Modelpublic

Aboudek/ASM_TO_LLVM_V2

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
extr_wfinit.c_CreateSavedWindows.ll263 linesDownload Raw Back to src
1; ModuleID = 'winfile/src/extr_wfinit.c_CreateSavedWindows.c'2source_filename = "winfile/src/extr_wfinit.c_CreateSavedWindows.c"3target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"4target triple = "x86_64-unknown-linux-gnu"5 6%struct.TYPE_7__ = type { i32, i32, %struct.TYPE_6__, %struct.TYPE_5__, ptr, i32, i32, i32 }7%struct.TYPE_6__ = type { i32, i32 }8%struct.TYPE_5__ = type { i64, i64, i64, i64 }9 10@MAXPATHLEN = dso_local global i32 0, align 411@szDirKeyFormat = dso_local global i32 0, align 412@szSettings = dso_local global i32 0, align 413@szNULL = dso_local global i32 0, align 414@szTheINIFile = dso_local global i32 0, align 415@dwNewView = dso_local global i32 0, align 416@dwNewSort = dso_local global i32 0, align 417@dwNewAttribs = dso_local global i32 0, align 418@SWP_NOSIZE = dso_local global i32 0, align 419@SWP_NOZORDER = dso_local global i32 0, align 420@SWP_NOACTIVATE = dso_local global i32 0, align 421@szOriginalDirPath = dso_local global ptr null, align 822@szStarDotStar = dso_local global i32 0, align 423@CW_USEDEFAULT = dso_local global i64 0, align 824@FALSE = dso_local global i32 0, align 425@TRUE = dso_local global i32 0, align 426 27; Function Attrs: noinline nounwind optnone uwtable28define dso_local i32 @CreateSavedWindows() #0 {29  %1 = alloca i32, align 430  %2 = alloca ptr, align 831  %3 = alloca i64, align 832  %4 = alloca [10 x i64], align 1633  %5 = alloca %struct.TYPE_7__, align 834  %6 = alloca i64, align 835  %7 = alloca i32, align 436  %8 = alloca i32, align 437  %9 = alloca i32, align 438  %10 = alloca i32, align 439  %11 = load i32, ptr @MAXPATHLEN, align 440  %12 = mul nsw i32 2, %1141  %13 = add nsw i32 %12, 4942  %14 = zext i32 %13 to i6443  %15 = call ptr @llvm.stacksave()44  store ptr %15, ptr %2, align 845  %16 = alloca i64, i64 %14, align 1646  store i64 %14, ptr %3, align 847  %17 = load i32, ptr @MAXPATHLEN, align 448  %18 = mul nsw i32 2, %1749  %19 = zext i32 %18 to i6450  %20 = alloca i64, i64 %19, align 1651  store i64 %19, ptr %6, align 852  store i32 1, ptr %7, align 453  store i32 0, ptr %9, align 454  br label %2155 5621:                                               ; preds = %106, %057  %22 = getelementptr inbounds [10 x i64], ptr %4, i64 0, i64 058  %23 = load i32, ptr @szDirKeyFormat, align 459  %24 = load i32, ptr %7, align 460  %25 = add nsw i32 %24, 161  store i32 %25, ptr %7, align 462  %26 = call i32 @wsprintf(ptr noundef %22, i32 noundef %23, i32 noundef %24)63  %27 = load i32, ptr @szSettings, align 464  %28 = getelementptr inbounds [10 x i64], ptr %4, i64 0, i64 065  %29 = load i32, ptr @szNULL, align 466  %30 = call i32 @COUNTOF(ptr noundef %16)67  %31 = load i32, ptr @szTheINIFile, align 468  %32 = call i32 @GetPrivateProfileString(i32 noundef %27, ptr noundef %28, i32 noundef %29, ptr noundef %16, i32 noundef %30, i32 noundef %31)69  %33 = load i64, ptr %16, align 1670  %34 = icmp ne i64 %33, 071  br i1 %34, label %35, label %10572 7335:                                               ; preds = %2174  %36 = call i32 @GetSavedWindow(ptr noundef %16, ptr noundef %5)75  %37 = getelementptr inbounds %struct.TYPE_7__, ptr %5, i32 0, i32 476  %38 = load ptr, ptr %37, align 877  %39 = call i32 @lstrcpy(ptr noundef %20, ptr noundef %38)78  %40 = call i32 @StripFilespec(ptr noundef %20)79  %41 = call i32 @StripBackslash(ptr noundef %20)80  %42 = call i32 @CheckDirExists(ptr noundef %20)81  %43 = icmp ne i32 %42, 082  br i1 %43, label %45, label %4483 8444:                                               ; preds = %3585  br label %10686 8745:                                               ; preds = %3588  %46 = getelementptr inbounds %struct.TYPE_7__, ptr %5, i32 0, i32 789  %47 = load i32, ptr %46, align 890  store i32 %47, ptr @dwNewView, align 491  %48 = getelementptr inbounds %struct.TYPE_7__, ptr %5, i32 0, i32 692  %49 = load i32, ptr %48, align 493  store i32 %49, ptr @dwNewSort, align 494  %50 = getelementptr inbounds %struct.TYPE_7__, ptr %5, i32 0, i32 595  %51 = load i32, ptr %50, align 896  store i32 %51, ptr @dwNewAttribs, align 497  %52 = getelementptr inbounds %struct.TYPE_7__, ptr %5, i32 0, i32 498  %53 = load ptr, ptr %52, align 899  %54 = getelementptr inbounds %struct.TYPE_7__, ptr %5, i32 0, i32 3100  %55 = getelementptr inbounds %struct.TYPE_5__, ptr %54, i32 0, i32 2101  %56 = load i64, ptr %55, align 8102  %57 = getelementptr inbounds %struct.TYPE_7__, ptr %5, i32 0, i32 3103  %58 = getelementptr inbounds %struct.TYPE_5__, ptr %57, i32 0, i32 0104  %59 = load i64, ptr %58, align 8105  %60 = getelementptr inbounds %struct.TYPE_7__, ptr %5, i32 0, i32 3106  %61 = getelementptr inbounds %struct.TYPE_5__, ptr %60, i32 0, i32 3107  %62 = load i64, ptr %61, align 8108  %63 = getelementptr inbounds %struct.TYPE_7__, ptr %5, i32 0, i32 3109  %64 = getelementptr inbounds %struct.TYPE_5__, ptr %63, i32 0, i32 2110  %65 = load i64, ptr %64, align 8111  %66 = sub nsw i64 %62, %65112  %67 = getelementptr inbounds %struct.TYPE_7__, ptr %5, i32 0, i32 3113  %68 = getelementptr inbounds %struct.TYPE_5__, ptr %67, i32 0, i32 1114  %69 = load i64, ptr %68, align 8115  %70 = getelementptr inbounds %struct.TYPE_7__, ptr %5, i32 0, i32 3116  %71 = getelementptr inbounds %struct.TYPE_5__, ptr %70, i32 0, i32 0117  %72 = load i64, ptr %71, align 8118  %73 = sub nsw i64 %69, %72119  %74 = getelementptr inbounds %struct.TYPE_7__, ptr %5, i32 0, i32 0120  %75 = load i32, ptr %74, align 8121  %76 = call i32 @CreateTreeWindow(ptr noundef %53, i64 noundef %56, i64 noundef %59, i64 noundef %66, i64 noundef %73, i32 noundef %75)122  store i32 %76, ptr %8, align 4123  %77 = load i32, ptr %8, align 4124  %78 = icmp ne i32 %77, 0125  br i1 %78, label %80, label %79126 12779:                                               ; preds = %45128  br label %106129 13080:                                               ; preds = %45131  %81 = load i32, ptr %9, align 4132  %82 = add nsw i32 %81, 1133  store i32 %82, ptr %9, align 4134  %83 = load i32, ptr %8, align 4135  %84 = call i64 @IsIconic(i32 noundef %83)136  %85 = icmp ne i64 %84, 0137  br i1 %85, label %86, label %100138 13986:                                               ; preds = %80140  %87 = load i32, ptr %8, align 4141  %88 = getelementptr inbounds %struct.TYPE_7__, ptr %5, i32 0, i32 2142  %89 = getelementptr inbounds %struct.TYPE_6__, ptr %88, i32 0, i32 1143  %90 = load i32, ptr %89, align 4144  %91 = getelementptr inbounds %struct.TYPE_7__, ptr %5, i32 0, i32 2145  %92 = getelementptr inbounds %struct.TYPE_6__, ptr %91, i32 0, i32 0146  %93 = load i32, ptr %92, align 8147  %94 = load i32, ptr @SWP_NOSIZE, align 4148  %95 = load i32, ptr @SWP_NOZORDER, align 4149  %96 = or i32 %94, %95150  %97 = load i32, ptr @SWP_NOACTIVATE, align 4151  %98 = or i32 %96, %97152  %99 = call i32 @SetWindowPos(i32 noundef %87, ptr noundef null, i32 noundef %90, i32 noundef %93, i32 noundef 0, i32 noundef 0, i32 noundef %98)153  br label %100154 155100:                                              ; preds = %86, %80156  %101 = load i32, ptr %8, align 4157  %102 = getelementptr inbounds %struct.TYPE_7__, ptr %5, i32 0, i32 1158  %103 = load i32, ptr %102, align 4159  %104 = call i32 @ShowWindow(i32 noundef %101, i32 noundef %103)160  br label %105161 162105:                                              ; preds = %100, %21163  br label %106164 165106:                                              ; preds = %105, %79, %44166  %107 = load i64, ptr %16, align 16167  %108 = icmp ne i64 %107, 0168  br i1 %108, label %21, label %109, !llvm.loop !6169 170109:                                              ; preds = %106171  %110 = load i32, ptr %9, align 4172  %111 = icmp ne i32 %110, 0173  br i1 %111, label %128, label %112174 175112:                                              ; preds = %109176  %113 = load ptr, ptr @szOriginalDirPath, align 8177  %114 = call i32 @lstrcpy(ptr noundef %16, ptr noundef %113)178  %115 = call i32 @AddBackslash(ptr noundef %16)179  %116 = load i32, ptr @szStarDotStar, align 4180  %117 = call i32 @lstrcat(ptr noundef %16, i32 noundef %116)181  %118 = load i64, ptr @CW_USEDEFAULT, align 8182  %119 = load i64, ptr @CW_USEDEFAULT, align 8183  %120 = call i32 @CreateTreeWindow(ptr noundef %16, i64 noundef %118, i64 noundef 0, i64 noundef %119, i64 noundef 0, i32 noundef -1)184  store i32 %120, ptr %8, align 4185  %121 = load i32, ptr %8, align 4186  %122 = icmp ne i32 %121, 0187  br i1 %122, label %125, label %123188 189123:                                              ; preds = %112190  %124 = load i32, ptr @FALSE, align 4191  store i32 %124, ptr %1, align 4192  store i32 1, ptr %10, align 4193  br label %130194 195125:                                              ; preds = %112196  %126 = load i32, ptr %9, align 4197  %127 = add nsw i32 %126, 1198  store i32 %127, ptr %9, align 4199  br label %128200 201128:                                              ; preds = %125, %109202  %129 = load i32, ptr @TRUE, align 4203  store i32 %129, ptr %1, align 4204  store i32 1, ptr %10, align 4205  br label %130206 207130:                                              ; preds = %128, %123208  %131 = load ptr, ptr %2, align 8209  call void @llvm.stackrestore(ptr %131)210  %132 = load i32, ptr %1, align 4211  ret i32 %132212}213 214; Function Attrs: nocallback nofree nosync nounwind willreturn215declare ptr @llvm.stacksave() #1216 217declare i32 @wsprintf(ptr noundef, i32 noundef, i32 noundef) #2218 219declare i32 @GetPrivateProfileString(i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) #2220 221declare i32 @COUNTOF(ptr noundef) #2222 223declare i32 @GetSavedWindow(ptr noundef, ptr noundef) #2224 225declare i32 @lstrcpy(ptr noundef, ptr noundef) #2226 227declare i32 @StripFilespec(ptr noundef) #2228 229declare i32 @StripBackslash(ptr noundef) #2230 231declare i32 @CheckDirExists(ptr noundef) #2232 233declare i32 @CreateTreeWindow(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i32 noundef) #2234 235declare i64 @IsIconic(i32 noundef) #2236 237declare i32 @SetWindowPos(i32 noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2238 239declare i32 @ShowWindow(i32 noundef, i32 noundef) #2240 241declare i32 @AddBackslash(ptr noundef) #2242 243declare i32 @lstrcat(ptr noundef, i32 noundef) #2244 245; Function Attrs: nocallback nofree nosync nounwind willreturn246declare void @llvm.stackrestore(ptr) #1247 248attributes #0 = { noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }249attributes #1 = { nocallback nofree nosync nounwind willreturn }250attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }251 252!llvm.module.flags = !{!0, !1, !2, !3, !4}253!llvm.ident = !{!5}254 255!0 = !{i32 1, !"wchar_size", i32 4}256!1 = !{i32 7, !"PIC Level", i32 2}257!2 = !{i32 7, !"PIE Level", i32 2}258!3 = !{i32 7, !"uwtable", i32 2}259!4 = !{i32 7, !"frame-pointer", i32 2}260!5 = !{!"clang version 15.0.3"}261!6 = distinct !{!6, !7}262!7 = !{!"llvm.loop.mustprogress"}263