#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*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ reparentWindowTo(unsigned long, unsigned long,
                                    int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sscanf(char *, char *, unsigned long *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strtol(char *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ strtoul(char *, int /*<<< orphan*/ *, int);
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];
  unsigned long int ulong_progwinid;
  unsigned long int ulong_deskwinid;
  fprintf(stdout,
          "DESKTOPWINDOWHACK_HOTFIX: Received: %s as Program Window Id and %s "
          "as Desktop Window Id\n",
          progwinid, deskwinid);
  printf("ld: %ld\n", strtol(argv[1], NULL, 16));
  printf("lu: %lu\n", strtoul(argv[1], NULL, 16));
  printf("li: %li\n", strtoul(argv[1], NULL, 16));
  printf("lx: %lx\n", strtoul(argv[1], NULL, 16));
  printf("lo: %lo\n", strtoul(argv[1], NULL, 16));
  printf("0x08lx: 0x%08lx\n", strtoul(argv[1], NULL, 16));
  printf("08lx: %08lx\n", strtoul(argv[1], NULL, 16));
  printf("8lx: %8lx\n", strtoul(argv[1], NULL, 16));
  printf("#8lx: %#8lx\n", strtoul(argv[1], NULL, 16));
  sscanf(argv[1], "%08lx", &ulong_progwinid);
  sscanf(argv[2], "%08lx", &ulong_deskwinid);
  fprintf(stdout,
          "DESKTOPWINDOWHACK_HOTFIX: Received: Ox%08lx as Program Window Id "
          "(ulong) and 0x%08lx as Desktop Window Id (ulong)\n",
          ulong_progwinid, ulong_deskwinid);
  sscanf(argv[1], "0x%08lx", &ulong_progwinid);
  sscanf(argv[2], "0x%08lx", &ulong_deskwinid);
  fprintf(stdout,
          "DESKTOPWINDOWHACK_HOTFIX: Received: %08lx as Program Window Id "
          "(ulong) and %08lx as Desktop Window Id (ulong)\n",
          ulong_progwinid, ulong_deskwinid);
  sscanf(argv[1], "%9lx", &ulong_progwinid);
  sscanf(argv[2], "%9lx", &ulong_deskwinid);
  fprintf(stdout,
          "DESKTOPWINDOWHACK_HOTFIX: Received ( 9lx printed with format #8lx "
          "): %#8lx as Program Window Id (ulong) and %#8lx as Desktop Window "
          "Id (ulong)\n",
          ulong_progwinid, ulong_deskwinid);
  fprintf(stdout,
          "DESKTOPWINDOWHACK_HOTFIX: Received ( 9lx printed with format 9lx ): "
          "%9lx as Program Window Id (ulong) and %#8lx as Desktop Window Id "
          "(ulong)\n",
          ulong_progwinid, ulong_deskwinid);
  sscanf(argv[1], "0x%lx", &ulong_progwinid);
  sscanf(argv[2], "0x%lx", &ulong_deskwinid);
  fprintf(stdout,
          "DESKTOPWINDOWHACK_HOTFIX: Received ( 0x lx printed with format #lx "
          "): %#lx as Program Window Id (ulong) and %#lx as Desktop Window Id "
          "(ulong)\n",
          ulong_progwinid, ulong_deskwinid);
  puts("DESKTOPWINDOWHACK_HOTFIX: Shared Library test below for: "
       "libdesktopwindow");
  foo();
  reparentWindowTo(ulong_progwinid, ulong_deskwinid, 0, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    11e8 <main+0x58>
mov    0x2e29(%rip),%rax
mov    (%rax),%edi
lea    0xe40(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2e12(%rip),%rax
mov    (%rax),%edi
lea    0xe68(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <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    0x2dd1(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xe72(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   1060 <strtol@plt>
mov    %eax,%esi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
mov    %eax,%esi
lea    0xe8a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
mov    %eax,%esi
lea    0xe6f(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
mov    %eax,%esi
lea    0xe54(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
mov    %eax,%esi
lea    0xe39(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
mov    %eax,%esi
lea    0xe1e(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
mov    %eax,%esi
lea    0xe0b(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
mov    %eax,%esi
lea    0xdf4(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
mov    %eax,%esi
lea    0xddb(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe49(%rip),%rsi
lea    -0x28(%rbp),%rdx
call   1090 <sscanf@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe31(%rip),%rsi
lea    -0x30(%rbp),%rdx
call   1090 <sscanf@plt>
mov    0x2c3e(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
lea    0xd9b(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdf8(%rip),%rsi
lea    -0x28(%rbp),%rdx
call   1090 <sscanf@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xde0(%rip),%rsi
lea    -0x30(%rbp),%rdx
call   1090 <sscanf@plt>
mov    0x2bef(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
lea    0xdc7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe20(%rip),%rsi
lea    -0x28(%rbp),%rdx
call   1090 <sscanf@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe08(%rip),%rsi
lea    -0x30(%rbp),%rdx
call   1090 <sscanf@plt>
mov    0x2ba0(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
lea    0xdec(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2b81(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
lea    0xe5d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xed5(%rip),%rsi
lea    -0x28(%rbp),%rdx
call   1090 <sscanf@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xebd(%rip),%rsi
lea    -0x30(%rbp),%rdx
call   1090 <sscanf@plt>
mov    0x2b32(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
lea    0xea2(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
lea    0xf23(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1080 <foo@plt>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1070 <reparentWindowTo@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
cmp    $0x2,%edi
jle    1430 <main+0x2a0>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdx
mov    0x10(%rsi),%rcx
mov    0x2e20(%rip),%r13
mov    0x0(%r13),%edi
lea    0xec7(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1060 <strtol@plt>
lea    0xf02(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
lea    0xeed(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
lea    0xed8(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
lea    0xec3(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
lea    0xeae(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
lea    0xe99(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
lea    0xe8c(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
lea    0xe7b(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   10a0 <strtoul@plt>
lea    0xe68(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    0x8(%rbx),%rdi
lea    0xed8(%rip),%r12
lea    0x8(%rsp),%r14
mov    %r12,%rsi
mov    %r14,%rdx
call   1090 <sscanf@plt>
mov    0x10(%rbx),%rdi
mov    %rsp,%r15
mov    %r12,%rsi
mov    %r15,%rdx
call   1090 <sscanf@plt>
mov    0x0(%r13),%edi
mov    0x8(%rsp),%rdx
mov    (%rsp),%rcx
lea    0xe2d(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x8(%rbx),%rdi
lea    0xe8e(%rip),%r12
mov    %r12,%rsi
mov    %r14,%rdx
call   1090 <sscanf@plt>
mov    0x10(%rbx),%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1090 <sscanf@plt>
mov    0x0(%r13),%edi
mov    0x8(%rsp),%rdx
mov    (%rsp),%rcx
lea    0xe68(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x8(%rbx),%rdi
lea    0xec5(%rip),%r12
mov    %r12,%rsi
mov    %r14,%rdx
call   1090 <sscanf@plt>
mov    0x10(%rbx),%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1090 <sscanf@plt>
mov    0x0(%r13),%edi
mov    0x8(%rsp),%rdx
mov    (%rsp),%rcx
lea    0xe9c(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
mov    0x8(%rsp),%rdx
mov    (%rsp),%rcx
lea    0xf11(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x8(%rbx),%rdi
lea    0xf8d(%rip),%r12
mov    %r12,%rsi
mov    %r14,%rdx
call   1090 <sscanf@plt>
mov    0x10(%rbx),%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1090 <sscanf@plt>
mov    0x0(%r13),%edi
mov    0x8(%rsp),%rdx
mov    (%rsp),%rcx
lea    0xf65(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xfe6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1080 <foo@plt>
mov    0x8(%rsp),%rdi
mov    (%rsp),%rsi
xor    %edx,%edx
xor    %ecx,%ecx
call   1070 <reparentWindowTo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
mov    0x2ba9(%rip),%rbx
mov    (%rbx),%edi
lea    0xbc0(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xbef(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <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 = [9 x i8] c"ld: %ld\0A\00"
@.str.4 = [9 x i8] c"lu: %lu\0A\00"
@.str.5 = [9 x i8] c"li: %li\0A\00"
@.str.6 = [9 x i8] c"lx: %lx\0A\00"
@.str.7 = [9 x i8] c"lo: %lo\0A\00"
@.str.8 = [17 x i8] c"0x08lx: 0x%08lx\0A\00"
@.str.9 = [13 x i8] c"08lx: %08lx\0A\00"
@.str.10 = [11 x i8] c"8lx: %8lx\0A\00"
@.str.11 = [13 x i8] c"lx: %lx\0A\00"
@.str.12 = [6 x i8] c"%08lx\00"
@.str.13 = [115 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Received: Ox%08lx as Program Window Id (ulong) and 0x%08lx as Desktop Window Id (ulong)\0A\00"
@.str.14 = [8 x i8] c"0x%08lx\00"
@.str.15 = [111 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Received: %08lx as Program Window Id (ulong) and %08lx as Desktop Window Id (ulong)\0A\00"
@.str.16 = [5 x i8] c"%9lx\00"
@.str.17 = [144 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Received ( 9lx printed with formatlx ): %lx as Program Window Id (ulong) and %lx as Desktop Window Id (ulong)\0A\00"
@.str.18 = [142 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Received ( 9lx printed with format 9lx ): %9lx as Program Window Id (ulong) and %lx as Desktop Window Id (ulong)\0A\00"
@.str.19 = [6 x i8] c"0x%lx\00"
@.str.20 = [143 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Received ( 0x lx printed with format #lx ): %#lx as Program Window Id (ulong) and %#lx as Desktop Window Id (ulong)\0A\00"
@.str.21 = [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*
%8 = alloca i64
%9 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 3
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load i32, i32* @stderr
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
store i8* %21, i8** %6
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 2
%24 = load i8*, i8** %23
store i8* %24, i8** %7
%25 = load i32, i32* @stdout
%26 = load i8*, i8** %6
%27 = load i8*, i8** %7
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.2, i64 0, i64 0), i8* %26, i8* %27)
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = call i32 @strtol(i8* %31, i32* null, i32 16)
%33 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %32)
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 1
%36 = load i8*, i8** %35
%37 = call i32 @strtoul(i8* %36, i32* null, i32 16)
%38 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %37)
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 1
%41 = load i8*, i8** %40
%42 = call i32 @strtoul(i8* %41, i32* null, i32 16)
%43 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %42)
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 1
%46 = load i8*, i8** %45
%47 = call i32 @strtoul(i8* %46, i32* null, i32 16)
%48 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %47)
%49 = load i8**, i8*** %5
%50 = getelementptr inbounds i8*, i8** %49, i64 1
%51 = load i8*, i8** %50
%52 = call i32 @strtoul(i8* %51, i32* null, i32 16)
%53 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %52)
%54 = load i8**, i8*** %5
%55 = getelementptr inbounds i8*, i8** %54, i64 1
%56 = load i8*, i8** %55
%57 = call i32 @strtoul(i8* %56, i32* null, i32 16)
%58 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i32 %57)
%59 = load i8**, i8*** %5
%60 = getelementptr inbounds i8*, i8** %59, i64 1
%61 = load i8*, i8** %60
%62 = call i32 @strtoul(i8* %61, i32* null, i32 16)
%63 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 %62)
%64 = load i8**, i8*** %5
%65 = getelementptr inbounds i8*, i8** %64, i64 1
%66 = load i8*, i8** %65
%67 = call i32 @strtoul(i8* %66, i32* null, i32 16)
%68 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 %67)
%69 = load i8**, i8*** %5
%70 = getelementptr inbounds i8*, i8** %69, i64 1
%71 = load i8*, i8** %70
%72 = call i32 @strtoul(i8* %71, i32* null, i32 16)
%73 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 %72)
%74 = load i8**, i8*** %5
%75 = getelementptr inbounds i8*, i8** %74, i64 1
%76 = load i8*, i8** %75
%77 = call i32 @sscanf(i8* %76, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i64* %8)
%78 = load i8**, i8*** %5
%79 = getelementptr inbounds i8*, i8** %78, i64 2
%80 = load i8*, i8** %79
%81 = call i32 @sscanf(i8* %80, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i64* %9)
%82 = load i32, i32* @stdout
%83 = load i64, i64* %8
%84 = load i64, i64* %9
%85 = call i32 (i32, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str.13, i64 0, i64 0), i64 %83, i64 %84)
%86 = load i8**, i8*** %5
%87 = getelementptr inbounds i8*, i8** %86, i64 1
%88 = load i8*, i8** %87
%89 = call i32 @sscanf(i8* %88, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i64* %8)
%90 = load i8**, i8*** %5
%91 = getelementptr inbounds i8*, i8** %90, i64 2
%92 = load i8*, i8** %91
%93 = call i32 @sscanf(i8* %92, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i64* %9)
%94 = load i32, i32* @stdout
%95 = load i64, i64* %8
%96 = load i64, i64* %9
%97 = call i32 (i32, i8*, ...) @fprintf(i32 %94, i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.15, i64 0, i64 0), i64 %95, i64 %96)
%98 = load i8**, i8*** %5
%99 = getelementptr inbounds i8*, i8** %98, i64 1
%100 = load i8*, i8** %99
%101 = call i32 @sscanf(i8* %100, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i64* %8)
%102 = load i8**, i8*** %5
%103 = getelementptr inbounds i8*, i8** %102, i64 2
%104 = load i8*, i8** %103
%105 = call i32 @sscanf(i8* %104, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i64* %9)
%106 = load i32, i32* @stdout
%107 = load i64, i64* %8
%108 = load i64, i64* %9
%109 = call i32 (i32, i8*, ...) @fprintf(i32 %106, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.17, i64 0, i64 0), i64 %107, i64 %108)
%110 = load i32, i32* @stdout
%111 = load i64, i64* %8
%112 = load i64, i64* %9
%113 = call i32 (i32, i8*, ...) @fprintf(i32 %110, i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.18, i64 0, i64 0), i64 %111, i64 %112)
%114 = load i8**, i8*** %5
%115 = getelementptr inbounds i8*, i8** %114, i64 1
%116 = load i8*, i8** %115
%117 = call i32 @sscanf(i8* %116, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0), i64* %8)
%118 = load i8**, i8*** %5
%119 = getelementptr inbounds i8*, i8** %118, i64 2
%120 = load i8*, i8** %119
%121 = call i32 @sscanf(i8* %120, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0), i64* %9)
%122 = load i32, i32* @stdout
%123 = load i64, i64* %8
%124 = load i64, i64* %9
%125 = call i32 (i32, i8*, ...) @fprintf(i32 %122, i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.20, i64 0, i64 0), i64 %123, i64 %124)
%126 = call i32 @puts(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.21, i64 0, i64 0))
%127 = call i32 (...) @foo()
%128 = load i64, i64* %8
%129 = load i64, i64* %9
%130 = call i32 @reparentWindowTo(i64 %128, i64 %129, i32 0, i32 0)
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 = [9 x i8] c"ld: %ld\0A\00"
@.str.4 = [9 x i8] c"lu: %lu\0A\00"
@.str.5 = [9 x i8] c"li: %li\0A\00"
@.str.6 = [9 x i8] c"lx: %lx\0A\00"
@.str.7 = [9 x i8] c"lo: %lo\0A\00"
@.str.8 = [17 x i8] c"0x08lx: 0x%08lx\0A\00"
@.str.9 = [13 x i8] c"08lx: %08lx\0A\00"
@.str.10 = [11 x i8] c"8lx: %8lx\0A\00"
@.str.11 = [13 x i8] c"lx: %lx\0A\00"
@.str.12 = [6 x i8] c"%08lx\00"
@.str.13 = [115 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Received: Ox%08lx as Program Window Id (ulong) and 0x%08lx as Desktop Window Id (ulong)\0A\00"
@.str.14 = [8 x i8] c"0x%08lx\00"
@.str.15 = [111 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Received: %08lx as Program Window Id (ulong) and %08lx as Desktop Window Id (ulong)\0A\00"
@.str.16 = [5 x i8] c"%9lx\00"
@.str.17 = [144 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Received ( 9lx printed with formatlx ): %lx as Program Window Id (ulong) and %lx as Desktop Window Id (ulong)\0A\00"
@.str.18 = [142 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Received ( 9lx printed with format 9lx ): %9lx as Program Window Id (ulong) and %lx as Desktop Window Id (ulong)\0A\00"
@.str.19 = [6 x i8] c"0x%lx\00"
@.str.20 = [143 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Received ( 0x lx printed with format #lx ): %#lx as Program Window Id (ulong) and %#lx as Desktop Window Id (ulong)\0A\00"
@.str.21 = [74 x i8] c"DESKTOPWINDOWHACK_HOTFIX: Shared Library test below for: libdesktopwindow\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i64
%4 = alloca i64
%5 = icmp slt i32 %0, 3
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
%11 = tail call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = getelementptr inbounds i8*, i8** %1, i64 2
%16 = load i8*, i8** %15
%17 = bitcast i64* %3 to i8*
%18 = bitcast i64* %4 to i8*
%19 = load i32, i32* @stdout
%20 = tail call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.2, i64 0, i64 0), i8* %14, i8* %16)
%21 = load i8*, i8** %13
%22 = tail call i32 @strtol(i8* nocapture %21, i32* null, i32 16)
%23 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %22)
%24 = load i8*, i8** %13
%25 = tail call i32 @strtoul(i8* nocapture %24, i32* null, i32 16)
%26 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %25)
%27 = load i8*, i8** %13
%28 = tail call i32 @strtoul(i8* nocapture %27, i32* null, i32 16)
%29 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %28)
%30 = load i8*, i8** %13
%31 = tail call i32 @strtoul(i8* nocapture %30, i32* null, i32 16)
%32 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %31)
%33 = load i8*, i8** %13
%34 = tail call i32 @strtoul(i8* nocapture %33, i32* null, i32 16)
%35 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %34)
%36 = load i8*, i8** %13
%37 = tail call i32 @strtoul(i8* nocapture %36, i32* null, i32 16)
%38 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i32 %37)
%39 = load i8*, i8** %13
%40 = tail call i32 @strtoul(i8* nocapture %39, i32* null, i32 16)
%41 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 %40)
%42 = load i8*, i8** %13
%43 = tail call i32 @strtoul(i8* nocapture %42, i32* null, i32 16)
%44 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 %43)
%45 = load i8*, i8** %13
%46 = tail call i32 @strtoul(i8* nocapture %45, i32* null, i32 16)
%47 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 %46)
%48 = load i8*, i8** %13
%49 = call i32 @sscanf(i8* %48, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i64* %3)
%50 = load i8*, i8** %15
%51 = call i32 @sscanf(i8* %50, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i64* %4)
%52 = load i32, i32* @stdout
%53 = load i64, i64* %3
%54 = load i64, i64* %4
%55 = call i32 (i32, i8*, ...) @fprintf(i32 %52, i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str.13, i64 0, i64 0), i64 %53, i64 %54)
%56 = load i8*, i8** %13
%57 = call i32 @sscanf(i8* %56, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i64* %3)
%58 = load i8*, i8** %15
%59 = call i32 @sscanf(i8* %58, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i64* %4)
%60 = load i32, i32* @stdout
%61 = load i64, i64* %3
%62 = load i64, i64* %4
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.15, i64 0, i64 0), i64 %61, i64 %62)
%64 = load i8*, i8** %13
%65 = call i32 @sscanf(i8* %64, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i64* %3)
%66 = load i8*, i8** %15
%67 = call i32 @sscanf(i8* %66, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i64* %4)
%68 = load i32, i32* @stdout
%69 = load i64, i64* %3
%70 = load i64, i64* %4
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.17, i64 0, i64 0), i64 %69, i64 %70)
%72 = load i32, i32* @stdout
%73 = load i64, i64* %3
%74 = load i64, i64* %4
%75 = call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.18, i64 0, i64 0), i64 %73, i64 %74)
%76 = load i8*, i8** %13
%77 = call i32 @sscanf(i8* %76, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0), i64* %3)
%78 = load i8*, i8** %15
%79 = call i32 @sscanf(i8* %78, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0), i64* %4)
%80 = load i32, i32* @stdout
%81 = load i64, i64* %3
%82 = load i64, i64* %4
%83 = call i32 (i32, i8*, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.20, i64 0, i64 0), i64 %81, i64 %82)
%84 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @.str.21, i64 0, i64 0))
%85 = call i32 (...) @foo()
%86 = load i64, i64* %3
%87 = load i64, i64* %4
%88 = call i32 @reparentWindowTo(i64 %86, i64 %87, i32 0, i32 0)
ret i32 0
}