#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *const, char const *const,
                          char const *const, char const *const,
                          char const *const, char const *const,
                          char const *const, char const *const);
__attribute__((noreturn)) void examples(const char *const programName) {
  printf("\nRequest activation for Office2013 using V4 protocol from "
         "192.168.1.5:1688\n"
         "\t%s -l O15 -4 192.168.1.5\n"
         "\t%s -l O15 -4 192.168.1.5:1688\n\n"
         "Request activation for Windows Server 2012 using V4 protocol from "
         "localhost:1688\n"
         "\t%s -4 -l Windows -k 8665cb71-468c-4aa3-a337-cb9bc9d5eaac\n"
         "\t%s -4 -l 2012\n"
         "\t%s -4 -l 2012 [::1]:1688\n"
         "\t%s -4 -l 12 127.0.0.2:1688\n\n"
         "Send 100,000 requests to localhost:1688\n"
         "\t%s -n 100000 -l Office2010\n\n"
         "Request Activation for Windows 8 from 10.0.0.1:4711 and pretend to "
         "be Steve Ballmer\n"
         "\t%s -l Windows8 -w steveb1.redmond.microsoft.com 10.0.0.1:4711\n\n",
         programName, programName, programName, programName, programName,
         programName, programName, programName);
  exit(0);
}


x86 assembly (clang, -O0):
<examples>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    -0x8(%rbp),%r9
mov    -0x8(%rbp),%r11
mov    -0x8(%rbp),%r10
mov    -0x8(%rbp),%rax
lea    0xead(%rip),%rdi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<examples>:
push   %rax
mov    %rdi,%rcx
sub    $0x8,%rsp
lea    0xed1(%rip),%rdi
mov    %rcx,%rsi
mov    %rcx,%rdx
mov    %rcx,%r8
mov    %rcx,%r9
push   %rcx
push   %rcx
push   %rcx
call   1030 <printf@plt>
add    $0x20,%rsp
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [560 x i8] c"\0ARequest activation for Office2013 using V4 protocol from 192.168.1.5:1688\0A\09%s -l O15 -4 192.168.1.5\0A\09%s -l O15 -4 192.168.1.5:1688\0A\0ARequest activation for Windows Server 2012 using V4 protocol from localhost:1688\0A\09%s -4 -l Windows -k 8665cb71-468c-4aa3-a337-cb9bc9d5eaac\0A\09%s -4 -l 2012\0A\09%s -4 -l 2012 [::1]:1688\0A\09%s -4 -l 12 127.0.0.2:1688\0A\0ASend 100,000 requests to localhost:1688\0A\09%s -n 100000 -l Office2010\0A\0ARequest Activation for Windows 8 from 10.0.0.1:4711 and pretend to be Steve Ballmer\0A\09%s -l Windows8 -w steveb1.redmond.microsoft.com 10.0.0.1:4711\0A\0A\00"
define void @examples(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = load i8*, i8** %2
%9 = load i8*, i8** %2
%10 = load i8*, i8** %2
%11 = call i32 @printf(i8* getelementptr inbounds ([560 x i8], [560 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4, i8* %5, i8* %6, i8* %7, i8* %8, i8* %9, i8* %10)
%12 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [560 x i8] c"\0ARequest activation for Office2013 using V4 protocol from 192.168.1.5:1688\0A\09%s -l O15 -4 192.168.1.5\0A\09%s -l O15 -4 192.168.1.5:1688\0A\0ARequest activation for Windows Server 2012 using V4 protocol from localhost:1688\0A\09%s -4 -l Windows -k 8665cb71-468c-4aa3-a337-cb9bc9d5eaac\0A\09%s -4 -l 2012\0A\09%s -4 -l 2012 [::1]:1688\0A\09%s -4 -l 12 127.0.0.2:1688\0A\0ASend 100,000 requests to localhost:1688\0A\09%s -n 100000 -l Office2010\0A\0ARequest Activation for Windows 8 from 10.0.0.1:4711 and pretend to be Steve Ballmer\0A\09%s -l Windows8 -w steveb1.redmond.microsoft.com 10.0.0.1:4711\0A\0A\00"
define void @examples(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([560 x i8], [560 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0, i8* %0, i8* %0, i8* %0, i8* %0, i8* %0, i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}