#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 */
char *CheckHttpRequest(char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  char *word;
  char *sup;
  if (argc != 2) {
    printf("USAGE: %s WORD\n", argv[0]);
    return -1;
  }
  word = argv[1];
  sup = CheckHttpRequest(word);
  if (sup)
    printf("\n\n\n%s\n", sup);
  else
    printf("RICHIESTA NON CORRETTA\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1161 <main+0x41>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b1 <main+0x91>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <CheckHttpRequest@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     119c <main+0x7c>
mov    -0x20(%rbp),%rsi
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11aa <main+0x8a>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jne    1159 <main+0x29>
mov    0x8(%rsi),%rdi
call   1050 <CheckHttpRequest@plt>
test   %rax,%rax
je     1171 <main+0x41>
lea    0xec5(%rip),%rdi
xor    %ebx,%ebx
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    117f <main+0x4f>
mov    (%rsi),%rsi
lea    0xe9d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xffffffff,%ebx
jmp    117f <main+0x4f>
lea    0xe9f(%rip),%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"USAGE: %s WORD\0A\00"
@.str.1 = [7 x i8] c"\0A\0A\0A%s\0A\00"
@.str.2 = [24 x i8] c"RICHIESTA NON CORRETTA\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 2
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %13)
store i32 -1, i32* %3
br label %29
15: ; preds = %2
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
store i8* %18, i8** %6
%19 = load i8*, i8** %6
%20 = call i8* @CheckHttpRequest(i8* %19)
store i8* %20, i8** %7
%21 = load i8*, i8** %7
%22 = icmp ne i8* %21, null
br i1 %22, label %23, label %26
23: ; preds = %15
%24 = load i8*, i8** %7
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %24)
br label %28
26: ; preds = %15
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
br label %28
28: ; preds = %26, %23
store i32 0, i32* %3
br label %29
29: ; preds = %28, %10
%30 = load i32, i32* %3
ret i32 %30
}

LLVM IR (-O2):
@.str = [16 x i8] c"USAGE: %s WORD\0A\00"
@.str.1 = [7 x i8] c"\0A\0A\0A%s\0A\00"
@str = [23 x i8] c"RICHIESTA NON CORRETTA\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %16
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i8* @CheckHttpRequest(i8* %9)
%11 = icmp eq i8* %10, null
br i1 %11, label %14, label %12
12: ; preds = %7
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %10)
br label %16
14: ; preds = %7
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %16
16: ; preds = %12, %14, %4
%17 = phi i32 [ -1, %4 ], [ 0, %14 ], [ 0, %12 ]
ret i32 %17
}