#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);
int /*<<< orphan*/ foo();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  if (argc < 3) {
    fprintf(stderr,
            "DESKTOPWINDOWHACK_HOTFIX: Error: invalid number of argmuments\n");
    fprintf(stderr, "Usage: ./desktopwindowhack_hotfix <program_window_id> "
                    "<desktop_window_id>\n");
    exit(1);
  }
  char *progwinid = argv[1];
  char *deskwinid = argv[2];
  fprintf(stdout, "DESKTOPWINDOWHACK_HOTFIX: Received: %s as Program Window Id "
                  "and %s as Desktop Window Id\n");
  puts("DESKTOPWINDOWHACK_HOTFIX: Shared Library test below for: "
       "libdesktopwindow");
  foo();
  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   $0x3,-0x8(%rbp)
jge    1194 <main+0x54>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
lea    0xe90(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e25(%rip),%rax
mov    (%rax),%edi
lea    0xece(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xf1b(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1050 <foo@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jle    1172 <main+0x32>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xf34(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xf81(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <foo@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    0x2e67(%rip),%rbx
mov    (%rbx),%edi
lea    0xe7e(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeaf(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [63 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Error: invalid number of argmuments\0A\00"
@.str.1 = [75 x i8] c"Usage: ./desktopwindowhack_hotfix <program_window_id> <desktop_window_id>\0A\00"
@stdout = global i32 0
@.str.2 = [89 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Received: %s as Program Window Id and %s as Desktop Window Id\0A\00"
@.str.3 = [74 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Shared Library test below for: libdesktopwindow\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 slt i32 %8, 3
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %2
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
store i8* %19, i8** %6
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 2
%22 = load i8*, i8** %21
store i8* %22, i8** %7
%23 = load i32, i32* @stdout
%24 = call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.2, i64 0, i64 0))
%25 = call i32 @puts(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.3, i64 0, i64 0))
%26 = call i32 (...) @foo()
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [63 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Error: invalid number of argmuments\0A\00"
@.str.1 = [75 x i8] c"Usage: ./desktopwindowhack_hotfix <program_window_id> <desktop_window_id>\0A\00"
@stdout = global i32 0
@.str.2 = [89 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Received: %s as Program Window Id and %s as Desktop Window Id\0A\00"
@.str.3 = [74 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Shared Library test below for: libdesktopwindow\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %2
%11 = load i32, i32* @stdout
%12 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.2, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @.str.3, i64 0, i64 0))
%14 = tail call i32 (...) @foo()
ret i32 0
}