void usage(x) int x;
{
  printf("\n ABERED:- AberMUD(dirt3) zone editor version %s %s\n", "1.3",
         "Copyright (C) J.Willie");
  printf("--------------------------------------------------------%s\n",
         "----------------");
  if (!x)
    return;
  printf("\nSee README file for additional info about copying/usage\n\n");
  printf("Credits:       -Author   : James Willie (Ithor)\n");
  printf("               -Debugging: Mary Jones (Larken)\n\n");
  if (x < 2)
    return;
  printf("Usage: abered zonename\n");
  printf("       eg abered eforest (to edit elven forest)\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    0xefc(%rip),%rsi
lea    0xef9(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
lea    0xf37(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
jne    116b <usage+0x4b>
jmp    11c7 <usage+0xa7>
lea    0xf2b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x2,-0x4(%rbp)
jge    11a4 <usage+0x84>
jmp    11c7 <usage+0xa7>
lea    0xf8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
lea    0xef4(%rip),%rsi
lea    0xef1(%rip),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xefa(%rip),%rdi
lea    0xf2f(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
je     1191 <usage+0x61>
lea    0xf2e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf80(%rip),%rdi
call   1030 <puts@plt>
cmp    $0x2,%ebx
jge    1193 <usage+0x63>
pop    %rbx
ret
lea    0xf9d(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [53 x i8] c"\0A ABERED:- AberMUD(dirt3) zone editor version %s %s\0A\00"
@.str.1 = [4 x i8] c"1.3\00"
@.str.2 = [23 x i8] c"Copyright (C) J.Willie\00"
@.str.3 = [60 x i8] c"--------------------------------------------------------%s\0A\00"
@.str.4 = [17 x i8] c"----------------\00"
@.str.5 = [59 x i8] c"\0ASee README file for additional info about copying/usage\0A\0A\00"
@.str.6 = [49 x i8] c"Credits: -Author : James Willie (Ithor)\0A\00"
@.str.7 = [49 x i8] c" -Debugging: Mary Jones (Larken)\0A\0A\00"
@.str.8 = [24 x i8] c"Usage: abered zonename\0A\00"
@.str.9 = [49 x i8] c" eg abered eforest (to edit elven forest)\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
br label %18
8: ; preds = %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.7, i64 0, i64 0))
%12 = load i32, i32* %2
%13 = icmp slt i32 %12, 2
br i1 %13, label %14, label %15
14: ; preds = %8
br label %18
15: ; preds = %8
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0))
unreachable
18: ; preds = %14, %7
ret void
}

LLVM IR (-O2):
@.str = [53 x i8] c"\0A ABERED:- AberMUD(dirt3) zone editor version %s %s\0A\00"
@.str.1 = [4 x i8] c"1.3\00"
@.str.2 = [23 x i8] c"Copyright (C) J.Willie\00"
@.str.3 = [60 x i8] c"--------------------------------------------------------%s\0A\00"
@.str.4 = [17 x i8] c"----------------\00"
@str = [58 x i8] c"\0ASee README file for additional info about copying/usage\0A\00"
@str.10 = [48 x i8] c"Credits: -Author : James Willie (Ithor)\00"
@str.11 = [48 x i8] c" -Debugging: Mary Jones (Larken)\0A\00"
@str.12 = [23 x i8] c"Usage: abered zonename\00"
@str.13 = [48 x i8] c" eg abered eforest (to edit elven forest)\00"
define void @usage(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%4 = icmp eq i32 %0, 0
br i1 %4, label %13, label %5
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.10, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.11, i64 0, i64 0))
%9 = icmp slt i32 %0, 2
br i1 %9, label %13, label %10
10: ; preds = %5
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.12, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.13, i64 0, i64 0))
tail call void @exit(i32 0)
unreachable
13: ; preds = %5, %1
ret void
}