#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ LongSITable();
int /*<<< orphan*/ LongUSTable();
int /*<<< orphan*/ ShortSITable();
int /*<<< orphan*/ ShortUSTable();
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ puts(char *);
scalar_t__ strlen(char *);
int main(int argc, char *argv[]) {
  printf("Executing %s\n", argv[0]);
  puts("Tables - A C program to compute atmosphere tables");
  puts("Ralph L. Carmichael, Public Domain Aeronautical Software");
  if (strlen("") > 0)
    printf("Modified by %s\n", "");
  printf("     version %s\n", "1.4 (31Oct2001)");
  LongUSTable();
  ShortUSTable();
  LongSITable();
  ShortSITable();
  puts("Four files added to your directory.");
  puts("Normal termination of tables.");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe6c(%rip),%rdi
call   1060 <printf@plt>
lea    0xe6e(%rip),%rdi
call   1040 <puts@plt>
lea    0xe94(%rip),%rdi
call   1040 <puts@plt>
lea    0xe55(%rip),%rdi
call   1050 <strlen@plt>
cmp    $0x0,%rax
jle    11da <main+0x6a>
lea    0xeab(%rip),%rdi
lea    0xe38(%rip),%rsi
call   1060 <printf@plt>
lea    0xea8(%rip),%rdi
lea    0xeb2(%rip),%rsi
call   1060 <printf@plt>
mov    $0x0,%al
call   1080 <LongUSTable@plt>
mov    $0x0,%al
call   1030 <ShortUSTable@plt>
mov    $0x0,%al
call   1070 <LongSITable@plt>
mov    $0x0,%al
call   1090 <ShortSITable@plt>
lea    0xe9a(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb2(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    (%rsi),%rsi
lea    0xe95(%rip),%rdi
call   1050 <printf@plt>
lea    0xe97(%rip),%rdi
call   1040 <puts@plt>
lea    0xebd(%rip),%rdi
call   1040 <puts@plt>
lea    0xeea(%rip),%rdi
lea    0xef4(%rip),%rsi
call   1050 <printf@plt>
xor    %eax,%eax
call   1070 <LongUSTable@plt>
xor    %eax,%eax
call   1030 <ShortUSTable@plt>
xor    %eax,%eax
call   1060 <LongSITable@plt>
xor    %eax,%eax
call   1080 <ShortSITable@plt>
lea    0xedc(%rip),%rdi
call   1040 <puts@plt>
lea    0xef4(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Executing %s\0A\00"
@.str.1 = [50 x i8] c"Tables - A C program to compute atmosphere tables\00"
@.str.2 = [57 x i8] c"Ralph L. Carmichael, Public Domain Aeronautical Software\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [16 x i8] c"Modified by %s\0A\00"
@.str.5 = [17 x i8] c" version %s\0A\00"
@.str.6 = [16 x i8] c"1.4 (31Oct2001)\00"
@.str.7 = [36 x i8] c"Four files added to your directory.\00"
@.str.8 = [30 x i8] c"Normal termination of tables.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 @puts(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @puts(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%12 = call i64 @strlen(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%13 = icmp sgt i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %16
16: ; preds = %14, %2
%17 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
%18 = call i32 (...) @LongUSTable()
%19 = call i32 (...) @ShortUSTable()
%20 = call i32 (...) @LongSITable()
%21 = call i32 (...) @ShortSITable()
%22 = call i32 @puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%23 = call i32 @puts(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Executing %s\0A\00"
@.str.1 = [50 x i8] c"Tables - A C program to compute atmosphere tables\00"
@.str.2 = [57 x i8] c"Ralph L. Carmichael, Public Domain Aeronautical Software\00"
@.str.5 = [17 x i8] c" version %s\0A\00"
@.str.6 = [16 x i8] c"1.4 (31Oct2001)\00"
@.str.7 = [36 x i8] c"Four files added to your directory.\00"
@.str.8 = [30 x i8] c"Normal termination of tables.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
%8 = tail call i32 (...) @LongUSTable()
%9 = tail call i32 (...) @ShortUSTable()
%10 = tail call i32 (...) @LongSITable()
%11 = tail call i32 (...) @ShortSITable()
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0))
ret i32 0
}