#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ gettext_init();
int /*<<< orphan*/ jn_dbus_fini();
int /*<<< orphan*/ jn_dbus_init();
int /*<<< orphan*/ jn_dbus_listen_events();
int /*<<< orphan*/ jn_notify_fini();
int /*<<< orphan*/ jn_notify_init();
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  gettext_init();
  if (argc != 1) {
    printf("Usage: %s\n", argv[0]);
    exit(254);
  }
  if (!jn_notify_init()) {
    fprintf(stderr, "Unable to initialize libnotify\n");
    exit(1);
  }
  if (!jn_dbus_init()) {
    fprintf(stderr, "Unable to initialize D-Bus\n");
    exit(1);
  }
  jn_dbus_listen_events();
  jn_dbus_fini();
  jn_notify_fini();
  return 0;
}


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)
mov    $0x0,%al
call   1060 <gettext_init@plt>
cmpl   $0x1,-0x8(%rbp)
je     11d4 <main+0x44>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe3b(%rip),%rdi
call   1040 <printf@plt>
mov    $0xfe,%edi
call   10a0 <exit@plt>
mov    $0x0,%al
call   1050 <jn_notify_init@plt>
cmp    $0x0,%eax
jne    1203 <main+0x73>
mov    0x2df5(%rip),%rax
mov    (%rax),%edi
lea    0xe17(%rip),%rsi
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    $0x0,%al
call   1070 <jn_dbus_init@plt>
cmp    $0x0,%eax
jne    1232 <main+0xa2>
mov    0x2dc6(%rip),%rax
mov    (%rax),%edi
lea    0xe08(%rip),%rsi
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    $0x0,%al
call   1030 <jn_dbus_listen_events@plt>
mov    $0x0,%al
call   10b0 <jn_dbus_fini@plt>
mov    $0x0,%al
call   1090 <jn_notify_fini@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1060 <gettext_init@plt>
cmp    $0x1,%ebp
jne    11d8 <main+0x48>
xor    %eax,%eax
call   1050 <jn_notify_init@plt>
test   %eax,%eax
je     11f1 <main+0x61>
xor    %eax,%eax
call   1070 <jn_dbus_init@plt>
test   %eax,%eax
je     1203 <main+0x73>
xor    %eax,%eax
call   1030 <jn_dbus_listen_events@plt>
xor    %eax,%eax
call   10b0 <jn_dbus_fini@plt>
xor    %eax,%eax
call   1090 <jn_notify_fini@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    (%rbx),%rsi
lea    0xe1e(%rip),%rdi
call   1040 <printf@plt>
mov    $0xfe,%edi
call   10a0 <exit@plt>
mov    0x2de8(%rip),%rax
mov    (%rax),%edi
lea    0xe0a(%rip),%rsi
jmp    1213 <main+0x83>
mov    0x2dd6(%rip),%rax
mov    (%rax),%edi
lea    0xe18(%rip),%rsi
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Usage: %s\0A\00"
@stderr = global i32 0
@.str.1 = [32 x i8] c"Unable to initialize libnotify\0A\00"
@.str.2 = [28 x i8] c"Unable to initialize D-Bus\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 = call i32 (...) @gettext_init()
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @exit(i32 254)
unreachable
15: ; preds = %2
%16 = call i32 (...) @jn_notify_init()
%17 = icmp ne i32 %16, 0
br i1 %17, label %22, label %18
18: ; preds = %15
%19 = load i32, i32* @stderr
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 @exit(i32 1)
unreachable
22: ; preds = %15
%23 = call i32 (...) @jn_dbus_init()
%24 = icmp ne i32 %23, 0
br i1 %24, label %29, label %25
25: ; preds = %22
%26 = load i32, i32* @stderr
%27 = call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%28 = call i32 @exit(i32 1)
unreachable
29: ; preds = %22
%30 = call i32 (...) @jn_dbus_listen_events()
%31 = call i32 (...) @jn_dbus_fini()
%32 = call i32 (...) @jn_notify_fini()
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"Usage: %s\0A\00"
@stderr = global i32 0
@.str.1 = [32 x i8] c"Unable to initialize libnotify\0A\00"
@.str.2 = [28 x i8] c"Unable to initialize D-Bus\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 (...) @gettext_init()
%4 = icmp eq i32 %0, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i8*, i8** %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = tail call i32 @exit(i32 254)
unreachable
9: ; preds = %2
%10 = tail call i32 (...) @jn_notify_init()
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* @stderr
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %9
%17 = tail call i32 (...) @jn_dbus_init()
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = load i32, i32* @stderr
%21 = tail call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%22 = tail call i32 @exit(i32 1)
unreachable
23: ; preds = %16
%24 = tail call i32 (...) @jn_dbus_listen_events()
%25 = tail call i32 (...) @jn_dbus_fini()
%26 = tail call i32 (...) @jn_notify_fini()
ret i32 0
}