#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 */
typedef int /*<<< orphan*/ value;
typedef int /*<<< orphan*/ source;
typedef int /*<<< orphan*/ event_name;

/* Variables and functions */
int LipcAddIntParam(int, int /*<<< orphan*/);
int LipcAddStringParam(int, char *);
int /*<<< orphan*/ LipcClose(int);
char *LipcGetErrorString(int);
int LipcNewEvent(int, char *);
int LipcOpenEx(char *, int *);
int LipcSendEvent(int, int);
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ usage(char *);
int main(int argc, char **argv) {
  char source[255];
  char event_name[255];
  char value[255];
  int lipc_handle, event_handle;
  int lipc_status = 0;
  int is_int = 0;
  int is_value = 0;
  if (argc < 3) {
    usage(argv[0]);
  }
  snprintf(source, sizeof(source), "%s", argv[1]);
  snprintf(event_name, sizeof(event_name), "%s", argv[2]);
  if (argc >= 5) {
    is_value = 1;
    if (strcmp(argv[3], "-i") == 0) {
      is_int = 1;
    } else if (strcmp(argv[3], "-s") != 0) {
      usage(argv[0]);
    }
    snprintf(value, sizeof(value), "%s", argv[4]);
  }
  lipc_handle = LipcOpenEx(source, &lipc_status);
  if (!lipc_handle) {
    printf("Failed to open LIPC:lipc_status=%d\n", lipc_status);
    return lipc_status;
  }
  event_handle = LipcNewEvent(lipc_handle, event_name);
  if (!event_handle) {
    printf("Failed to create event\n");
    return 1;
  }
  if (is_value) {
    if (is_int) {
      lipc_status = LipcAddIntParam(event_handle, atoi(value));
    } else {
      lipc_status = LipcAddStringParam(event_handle, value);
    }
    if (lipc_status != 0) {
      printf("Failed to add param\n");
      return lipc_status;
    }
  }
  lipc_status = LipcSendEvent(lipc_handle, event_handle);
  LipcClose(lipc_handle);
  if (lipc_status == 0) {
    return 0;
  } else {
    printf("Failed to send event %s from %s (0x%x %s)\n", event_name, source,
           lipc_status, LipcGetErrorString(lipc_status));
    return lipc_status;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x340,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x31c(%rbp)
movl   $0x0,-0x320(%rbp)
movl   $0x0,-0x324(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    120d <main+0x4d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10b0 <usage@plt>
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
mov    $0xff,%esi
lea    0xdd8(%rip),%rdx
call   1060 <snprintf@plt>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rcx
mov    $0xff,%esi
lea    0xdb8(%rip),%rdx
call   1060 <snprintf@plt>
cmpl   $0x5,-0x8(%rbp)
jl     12dd <main+0x11d>
movl   $0x1,-0x324(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xd93(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    128e <main+0xce>
movl   $0x1,-0x320(%rbp)
jmp    12bd <main+0xfd>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xd69(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
je     12b8 <main+0xf8>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10b0 <usage@plt>
jmp    12bd <main+0xfd>
lea    -0x310(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rcx
mov    $0xff,%esi
lea    0xd28(%rip),%rdx
call   1060 <snprintf@plt>
lea    -0x110(%rbp),%rdi
lea    -0x31c(%rbp),%rsi
call   10a0 <LipcOpenEx@plt>
mov    %eax,-0x314(%rbp)
cmpl   $0x0,-0x314(%rbp)
jne    1325 <main+0x165>
mov    -0x31c(%rbp),%esi
lea    0xcf9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x31c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1490 <main+0x2d0>
mov    -0x314(%rbp),%edi
lea    -0x210(%rbp),%rsi
call   1030 <LipcNewEvent@plt>
mov    %eax,-0x318(%rbp)
cmpl   $0x0,-0x318(%rbp)
jne    1364 <main+0x1a4>
lea    0xcdc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1490 <main+0x2d0>
cmpl   $0x0,-0x324(%rbp)
je     13f4 <main+0x234>
cmpl   $0x0,-0x320(%rbp)
je     13ae <main+0x1ee>
mov    -0x318(%rbp),%eax
mov    %eax,-0x328(%rbp)
lea    -0x310(%rbp),%rdi
call   10d0 <atoi@plt>
mov    -0x328(%rbp),%edi
mov    %eax,%esi
call   1070 <LipcAddIntParam@plt>
mov    %eax,-0x31c(%rbp)
jmp    13c6 <main+0x206>
mov    -0x318(%rbp),%edi
lea    -0x310(%rbp),%rsi
call   1080 <LipcAddStringParam@plt>
mov    %eax,-0x31c(%rbp)
cmpl   $0x0,-0x31c(%rbp)
je     13ef <main+0x22f>
lea    0xc6b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x31c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1490 <main+0x2d0>
jmp    13f4 <main+0x234>
mov    -0x314(%rbp),%edi
mov    -0x318(%rbp),%esi
call   10e0 <LipcSendEvent@plt>
mov    %eax,-0x31c(%rbp)
mov    -0x314(%rbp),%edi
call   1040 <LipcClose@plt>
cmpl   $0x0,-0x31c(%rbp)
jne    142f <main+0x26f>
movl   $0x0,-0x4(%rbp)
jmp    1490 <main+0x2d0>
lea    -0x210(%rbp),%rax
mov    %rax,-0x340(%rbp)
lea    -0x110(%rbp),%rax
mov    %rax,-0x338(%rbp)
mov    -0x31c(%rbp),%eax
mov    %eax,-0x32c(%rbp)
mov    -0x31c(%rbp),%edi
call   10c0 <LipcGetErrorString@plt>
mov    -0x340(%rbp),%rsi
mov    -0x338(%rbp),%rdx
mov    -0x32c(%rbp),%ecx
mov    %rax,%r8
lea    0xbda(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x31c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x340,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x318,%rsp
mov    %rsi,%rbx
mov    %edi,%r15d
movl   $0x0,0xc(%rsp)
cmp    $0x2,%edi
jg     11f8 <main+0x28>
mov    (%rbx),%rdi
call   10c0 <usage@plt>
mov    0x8(%rbx),%rcx
lea    0xdfd(%rip),%rbp
lea    0x210(%rsp),%rdi
mov    $0xff,%esi
mov    %rbp,%rdx
call   1070 <snprintf@plt>
mov    0x10(%rbx),%rcx
lea    0x110(%rsp),%rdi
mov    $0xff,%esi
mov    %rbp,%rdx
call   1070 <snprintf@plt>
xor    %ebp,%ebp
cmp    $0x5,%r15d
jl     128e <main+0xbe>
mov    0x18(%rbx),%rdi
lea    0xdbf(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     126f <main+0x9f>
mov    0x18(%rbx),%rdi
lea    0xdad(%rip),%rsi
call   10a0 <strcmp@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     1274 <main+0xa4>
mov    (%rbx),%rdi
call   10c0 <usage@plt>
jmp    1274 <main+0xa4>
mov    $0x1,%ebp
mov    0x20(%rbx),%rcx
lea    0xd81(%rip),%rdx
lea    0x10(%rsp),%rdi
mov    $0xff,%esi
call   1070 <snprintf@plt>
lea    0x210(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   10b0 <LipcOpenEx@plt>
test   %eax,%eax
je     12dc <main+0x10c>
mov    %eax,%ebx
lea    0x110(%rsp),%rsi
mov    %eax,%edi
call   1040 <LipcNewEvent@plt>
test   %eax,%eax
je     12f0 <main+0x120>
mov    %eax,%r14d
cmp    $0x5,%r15d
jl     1326 <main+0x156>
test   %ebp,%ebp
je     1303 <main+0x133>
lea    0x10(%rsp),%rdi
call   10e0 <atoi@plt>
mov    %r14d,%edi
mov    %eax,%esi
call   1080 <LipcAddIntParam@plt>
jmp    1310 <main+0x140>
mov    0xc(%rsp),%esi
lea    0xd22(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    136d <main+0x19d>
lea    0xd61(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
jmp    1371 <main+0x1a1>
lea    0x10(%rsp),%rsi
mov    %r14d,%edi
call   1090 <LipcAddStringParam@plt>
mov    %eax,0xc(%rsp)
test   %eax,%eax
je     1326 <main+0x156>
lea    0xd50(%rip),%rdi
call   1030 <puts@plt>
jmp    136d <main+0x19d>
mov    %ebx,%edi
mov    %r14d,%esi
call   10f0 <LipcSendEvent@plt>
mov    %eax,0xc(%rsp)
mov    %ebx,%edi
call   1050 <LipcClose@plt>
mov    0xc(%rsp),%ebx
test   %ebx,%ebx
je     137f <main+0x1af>
mov    %ebx,%edi
call   10d0 <LipcGetErrorString@plt>
lea    0xcdc(%rip),%rdi
lea    0x110(%rsp),%rsi
lea    0x210(%rsp),%rdx
mov    %ebx,%ecx
mov    %rax,%r8
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%eax
add    $0x318,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
jmp    1371 <main+0x1a1>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"-i\00"
@.str.2 = [3 x i8] c"-s\00"
@.str.3 = [36 x i8] c"Failed to open LIPC:lipc_status=%d\0A\00"
@.str.4 = [24 x i8] c"Failed to create event\0A\00"
@.str.5 = [21 x i8] c"Failed to add param\0A\00"
@.str.6 = [43 x i8] c"Failed to send event %s from %s (0x%x %s)\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [255 x i8]
%7 = alloca [255 x i8]
%8 = alloca [255 x i8]
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 3
br i1 %15, label %16, label %21
16: ; preds = %2
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 0
%19 = load i8*, i8** %18
%20 = call i32 @usage(i8* %19)
br label %21
21: ; preds = %16, %2
%22 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32 @snprintf(i8* %22, i32 255, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %25)
%27 = getelementptr inbounds [255 x i8], [255 x i8]* %7, i64 0, i64 0
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 2
%30 = load i8*, i8** %29
%31 = call i32 @snprintf(i8* %27, i32 255, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %30)
%32 = load i32, i32* %4
%33 = icmp sge i32 %32, 5
br i1 %33, label %34, label %59
34: ; preds = %21
store i32 1, i32* %13
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 3
%37 = load i8*, i8** %36
%38 = call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %41
40: ; preds = %34
store i32 1, i32* %12
br label %53
41: ; preds = %34
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 3
%44 = load i8*, i8** %43
%45 = call i64 @strcmp(i8* %44, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%46 = icmp ne i64 %45, 0
br i1 %46, label %47, label %52
47: ; preds = %41
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 0
%50 = load i8*, i8** %49
%51 = call i32 @usage(i8* %50)
br label %52
52: ; preds = %47, %41
br label %53
53: ; preds = %52, %40
%54 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 0
%55 = load i8**, i8*** %5
%56 = getelementptr inbounds i8*, i8** %55, i64 4
%57 = load i8*, i8** %56
%58 = call i32 @snprintf(i8* %54, i32 255, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %57)
br label %59
59: ; preds = %53, %21
%60 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
%61 = call i32 @LipcOpenEx(i8* %60, i32* %11)
store i32 %61, i32* %9
%62 = load i32, i32* %9
%63 = icmp ne i32 %62, 0
br i1 %63, label %68, label %64
64: ; preds = %59
%65 = load i32, i32* %11
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %65)
%67 = load i32, i32* %11
store i32 %67, i32* %3
br label %115
68: ; preds = %59
%69 = load i32, i32* %9
%70 = getelementptr inbounds [255 x i8], [255 x i8]* %7, i64 0, i64 0
%71 = call i32 @LipcNewEvent(i32 %69, i8* %70)
store i32 %71, i32* %10
%72 = load i32, i32* %10
%73 = icmp ne i32 %72, 0
br i1 %73, label %76, label %74
74: ; preds = %68
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %3
br label %115
76: ; preds = %68
%77 = load i32, i32* %13
%78 = icmp ne i32 %77, 0
br i1 %78, label %79, label %98
79: ; preds = %76
%80 = load i32, i32* %12
%81 = icmp ne i32 %80, 0
br i1 %81, label %82, label %87
82: ; preds = %79
%83 = load i32, i32* %10
%84 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 0
%85 = call i32 @atoi(i8* %84)
%86 = call i32 @LipcAddIntParam(i32 %83, i32 %85)
store i32 %86, i32* %11
br label %91
87: ; preds = %79
%88 = load i32, i32* %10
%89 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 0
%90 = call i32 @LipcAddStringParam(i32 %88, i8* %89)
store i32 %90, i32* %11
br label %91
91: ; preds = %87, %82
%92 = load i32, i32* %11
%93 = icmp ne i32 %92, 0
br i1 %93, label %94, label %97
94: ; preds = %91
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%96 = load i32, i32* %11
store i32 %96, i32* %3
br label %115
97: ; preds = %91
br label %98
98: ; preds = %97, %76
%99 = load i32, i32* %9
%100 = load i32, i32* %10
%101 = call i32 @LipcSendEvent(i32 %99, i32 %100)
store i32 %101, i32* %11
%102 = load i32, i32* %9
%103 = call i32 @LipcClose(i32 %102)
%104 = load i32, i32* %11
%105 = icmp eq i32 %104, 0
br i1 %105, label %106, label %107
106: ; preds = %98
store i32 0, i32* %3
br label %115
107: ; preds = %98
%108 = getelementptr inbounds [255 x i8], [255 x i8]* %7, i64 0, i64 0
%109 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
%110 = load i32, i32* %11
%111 = load i32, i32* %11
%112 = call i8* @LipcGetErrorString(i32 %111)
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0), i8* %108, i8* %109, i32 %110, i8* %112)
%114 = load i32, i32* %11
store i32 %114, i32* %3
br label %115
115: ; preds = %107, %106, %94, %74, %64
%116 = load i32, i32* %3
ret i32 %116
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"-i\00"
@.str.2 = [3 x i8] c"-s\00"
@.str.3 = [36 x i8] c"Failed to open LIPC:lipc_status=%d\0A\00"
@.str.6 = [43 x i8] c"Failed to send event %s from %s (0x%x %s)\0A\00"
@str = [23 x i8] c"Failed to create event\00"
@str.7 = [20 x i8] c"Failed to add param\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [255 x i8]
%4 = alloca [255 x i8]
%5 = alloca [255 x i8]
%6 = alloca i32
%7 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [255 x i8], [255 x i8]* %4, i64 0, i64 0
%9 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%10 = bitcast i32* %6 to i8*
store i32 0, i32* %6
%11 = icmp slt i32 %0, 3
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i8*, i8** %1
%14 = tail call i32 @usage(i8* %13)
br label %15
15: ; preds = %12, %2
%16 = getelementptr inbounds i8*, i8** %1, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @snprintf(i8* %7, i32 255, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %17)
%19 = getelementptr inbounds i8*, i8** %1, i64 2
%20 = load i8*, i8** %19
%21 = call i32 @snprintf(i8* %8, i32 255, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %20)
%22 = icmp sgt i32 %0, 4
br i1 %22, label %23, label %40
23: ; preds = %15
%24 = getelementptr inbounds i8*, i8** %1, i64 3
%25 = load i8*, i8** %24
%26 = call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %35, label %28
28: ; preds = %23
%29 = load i8*, i8** %24
%30 = call i64 @strcmp(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %35, label %32
32: ; preds = %28
%33 = load i8*, i8** %1
%34 = call i32 @usage(i8* %33)
br label %35
35: ; preds = %23, %28, %32
%36 = phi i32 [ 0, %32 ], [ 0, %28 ], [ 1, %23 ]
%37 = getelementptr inbounds i8*, i8** %1, i64 4
%38 = load i8*, i8** %37
%39 = call i32 @snprintf(i8* %9, i32 255, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %38)
br label %40
40: ; preds = %35, %15
%41 = phi i32 [ %36, %35 ], [ 0, %15 ]
%42 = call i32 @LipcOpenEx(i8* %7, i32* %6)
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %48
44: ; preds = %40
%45 = load i32, i32* %6
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %45)
%47 = load i32, i32* %6
br label %76
48: ; preds = %40
%49 = call i32 @LipcNewEvent(i32 %42, i8* %8)
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %48
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %76
53: ; preds = %48
br i1 %22, label %54, label %67
54: ; preds = %53
%55 = icmp eq i32 %41, 0
br i1 %55, label %59, label %56
56: ; preds = %54
%57 = call i32 @atoi(i8* %9)
%58 = call i32 @LipcAddIntParam(i32 %49, i32 %57)
br label %61
59: ; preds = %54
%60 = call i32 @LipcAddStringParam(i32 %49, i8* %9)
br label %61
61: ; preds = %59, %56
%62 = phi i32 [ %60, %59 ], [ %58, %56 ]
store i32 %62, i32* %6
%63 = icmp eq i32 %62, 0
br i1 %63, label %67, label %64
64: ; preds = %61
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.7, i64 0, i64 0))
%66 = load i32, i32* %6
br label %76
67: ; preds = %61, %53
%68 = call i32 @LipcSendEvent(i32 %42, i32 %49)
store i32 %68, i32* %6
%69 = call i32 @LipcClose(i32 %42)
%70 = load i32, i32* %6
%71 = icmp eq i32 %70, 0
br i1 %71, label %76, label %72
72: ; preds = %67
%73 = call i8* @LipcGetErrorString(i32 %70)
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0), i8* %8, i8* %7, i32 %70, i8* %73)
%75 = load i32, i32* %6
br label %76
76: ; preds = %67, %72, %64, %51, %44
%77 = phi i32 [ %66, %64 ], [ %75, %72 ], [ 1, %51 ], [ %47, %44 ], [ 0, %67 ]
ret i32 %77
}