CoolFace
Modelpublic

Aboudek/ASM_TO_LLVM_V2

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
extr_interface.c_register_new_command.ll71 linesDownload Raw Back to tg
1; ModuleID = 'tg/extr_interface.c_register_new_command.c'2source_filename = "tg/extr_interface.c_register_new_command.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.command = type { i64 }7 8@commands = dso_local global ptr null, align 89@MAX_COMMANDS_SIZE = dso_local global i32 0, align 410 11; Function Attrs: noinline nounwind optnone uwtable12define dso_local void @register_new_command(ptr noundef %0) #0 {13  %2 = alloca ptr, align 814  %3 = alloca i32, align 415  store ptr %0, ptr %2, align 816  store i32 0, ptr %3, align 417  br label %418 194:                                                ; preds = %12, %120  %5 = load ptr, ptr @commands, align 821  %6 = load i32, ptr %3, align 422  %7 = sext i32 %6 to i6423  %8 = getelementptr inbounds %struct.command, ptr %5, i64 %724  %9 = getelementptr inbounds %struct.command, ptr %8, i32 0, i32 025  %10 = load i64, ptr %9, align 826  %11 = icmp ne i64 %10, 027  br i1 %11, label %12, label %1528 2912:                                               ; preds = %430  %13 = load i32, ptr %3, align 431  %14 = add nsw i32 %13, 132  store i32 %14, ptr %3, align 433  br label %4, !llvm.loop !634 3515:                                               ; preds = %436  %16 = load i32, ptr %3, align 437  %17 = load i32, ptr @MAX_COMMANDS_SIZE, align 438  %18 = sub nsw i32 %17, 139  %19 = icmp slt i32 %16, %1840  %20 = zext i1 %19 to i3241  %21 = call i32 @assert(i32 noundef %20)42  %22 = load ptr, ptr @commands, align 843  %23 = load i32, ptr %3, align 444  %24 = sext i32 %23 to i6445  %25 = getelementptr inbounds %struct.command, ptr %22, i64 %2446  %26 = load ptr, ptr %2, align 847  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %26, i64 8, i1 false)48  ret void49}50 51declare i32 @assert(i32 noundef) #152 53; Function Attrs: argmemonly nocallback nofree nounwind willreturn54declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #255 56attributes #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" }57attributes #1 = { "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" }58attributes #2 = { argmemonly nocallback nofree nounwind willreturn }59 60!llvm.module.flags = !{!0, !1, !2, !3, !4}61!llvm.ident = !{!5}62 63!0 = !{i32 1, !"wchar_size", i32 4}64!1 = !{i32 7, !"PIC Level", i32 2}65!2 = !{i32 7, !"PIE Level", i32 2}66!3 = !{i32 7, !"uwtable", i32 2}67!4 = !{i32 7, !"frame-pointer", i32 2}68!5 = !{!"clang version 15.0.3"}69!6 = distinct !{!6, !7}70!7 = !{!"llvm.loop.mustprogress"}71