#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*/ bdiranner(char *);
int /*<<< orphan*/ diranner(char *);
int /*<<< orphan*/ fscanner(char *);
int /*<<< orphan*/ fxscanner(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc <= 1) {
    printf("a demonstration of a spaceless scan\n");
  } else if ((argc == 2)) {
    fscanner(argv[1]);
    fxscanner(argv[1]);
    diranner(argv[1]);
    bdiranner(argv[1]);
  }
}


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)
cmpl   $0x1,-0x8(%rbp)
jg     1181 <main+0x31>
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
jmp    11c4 <main+0x74>
cmpl   $0x2,-0x8(%rbp)
jne    11bf <main+0x6f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <fscanner@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <fxscanner@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <diranner@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <bdiranner@plt>
jmp    11c4 <main+0x74>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x1,%edi
jg     1164 <main+0x14>
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
jmp    1190 <main+0x40>
cmp    $0x2,%edi
jne    1190 <main+0x40>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <fscanner@plt>
mov    0x8(%rbx),%rdi
call   1060 <fxscanner@plt>
mov    0x8(%rbx),%rdi
call   1050 <diranner@plt>
mov    0x8(%rbx),%rdi
call   1070 <bdiranner@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"a demonstration of a spaceless scan\0A\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 i32, i32* %4
%7 = icmp sle i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
br label %31
10: ; preds = %2
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 2
br i1 %12, label %13, label %30
13: ; preds = %10
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @fscanner(i8* %16)
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
%21 = call i32 @fxscanner(i8* %20)
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = call i32 @diranner(i8* %24)
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 1
%28 = load i8*, i8** %27
%29 = call i32 @bdiranner(i8* %28)
br label %30
30: ; preds = %13, %10
br label %31
31: ; preds = %30, %8
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
@str = [36 x i8] c"a demonstration of a spaceless scan\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
br label %18
6: ; preds = %2
%7 = icmp eq i32 %0, 2
br i1 %7, label %8, label %18
8: ; preds = %6
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @fscanner(i8* %10)
%12 = load i8*, i8** %9
%13 = tail call i32 @fxscanner(i8* %12)
%14 = load i8*, i8** %9
%15 = tail call i32 @diranner(i8* %14)
%16 = load i8*, i8** %9
%17 = tail call i32 @bdiranner(i8* %16)
br label %18
18: ; preds = %6, %8, %4
ret i32 0
}