Welcome to the GBF Test Portal

This was built to track decompiler and CFG progress.

Decompiler Output

function public.getWeaponname(slot#0)
{
    lit#3 = "Bow";
    // RegionId(0)
    // RegionId(8)
    if (!(client.selectedweapons[slot#0] == lit#3)) 
    {
        lit#4 = "CustomBow";
        // RegionId(9)
        if (!(phi<idx=0, regions=()> == lit#4)) 
        {
            lit#5 = "Bomb";
            // RegionId(9)
            // RegionId(10)
            if (!(phi<idx=0, regions=()> == lit#5)) 
            {
                lit#6 = "CustomBomb";
                // RegionId(11)
                if (!(phi<idx=0, regions=()> == lit#6)) 
                {
                    lit#7 = "Horse";
                    // RegionId(11)
                    // RegionId(12)
                    if (!(phi<idx=0, regions=()> == lit#7)) 
                    {
                        lit#8 = "HorseNew";
                        // RegionId(13)
                        if (!(phi<idx=0, regions=()> == lit#8)) 
                        {
                            fn_call#12 = findweapon#11(client.selectedweapons[slot#0]);
                            temp.txt = fn_call.displayname;
                            builtin_fn_call#14 = temp.txt.length();
                            lit#15 = 1;
                            // RegionId(5)
                            if (builtin_fn_call#14 > lit#15) 
                            {
                                return temp.txt;
                            }
                            // RegionId(6)
                            else
                            {
                                lit#16 = "";
                                return lit#16;
                            }
                        }
                    }
                    lit#17 = "Mount";
                    return lit#17;
                }
            }
            lit#18 = "Bomb";
            return lit#18;
        }
    }
    lit#19 = "Bow";
    return lit#19;
}