#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*/ fn1();
int /*<<< orphan*/ fn2();
scalar_t__ foo(int, int);
int /*<<< orphan*/ t3(int);
void t11(int i, int j) {
  (long)foo((i), (j));
  ((long)foo(i, j));
  (long)0;
  ;
  ((long)0);
  (t3(i), fn2());
  ((t3(i), fn2()));
  (foo((i), (j)) ? 0 : t3(i), 1);
  ((foo(i, j) ? 0 : t3(i), 1));
  (foo((i), (j)), 1);
  ((foo(i, j), 1));
  fn1();
  fn2();
}


x86 assembly (clang, -O0):
<t11>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <foo@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <foo@plt>
mov    -0x4(%rbp),%edi
call   1030 <t3@plt>
mov    $0x0,%al
call   1060 <fn2@plt>
mov    -0x4(%rbp),%edi
call   1030 <t3@plt>
mov    $0x0,%al
call   1060 <fn2@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <foo@plt>
cmp    $0x0,%rax
je     119c <t11+0x5c>
jmp    11a4 <t11+0x64>
mov    -0x4(%rbp),%edi
call   1030 <t3@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <foo@plt>
cmp    $0x0,%rax
je     11be <t11+0x7e>
jmp    11c6 <t11+0x86>
mov    -0x4(%rbp),%edi
call   1030 <t3@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <foo@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <foo@plt>
mov    $0x0,%al
call   1040 <fn1@plt>
mov    $0x0,%al
call   1060 <fn2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t11>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1050 <foo@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <foo@plt>
mov    %ebp,%edi
call   1030 <t3@plt>
xor    %eax,%eax
call   1060 <fn2@plt>
mov    %ebp,%edi
call   1030 <t3@plt>
xor    %eax,%eax
call   1060 <fn2@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <foo@plt>
test   %rax,%rax
jne    1186 <t11+0x46>
mov    %ebp,%edi
call   1030 <t3@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <foo@plt>
test   %rax,%rax
jne    119b <t11+0x5b>
mov    %ebp,%edi
call   1030 <t3@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <foo@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <foo@plt>
xor    %eax,%eax
call   1040 <fn1@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <fn2@plt>

LLVM IR (-O0):
define void @t11(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i64 @foo(i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i64 @foo(i32 %8, i32 %9)
%11 = load i32, i32* %3
%12 = call i32 @t3(i32 %11)
%13 = call i32 (...) @fn2()
%14 = load i32, i32* %3
%15 = call i32 @t3(i32 %14)
%16 = call i32 (...) @fn2()
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = call i64 @foo(i32 %17, i32 %18)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %2
br label %25
22: ; preds = %2
%23 = load i32, i32* %3
%24 = call i32 @t3(i32 %23)
br label %25
25: ; preds = %22, %21
%26 = phi i32 [ 0, %21 ], [ %24, %22 ]
%27 = load i32, i32* %3
%28 = load i32, i32* %4
%29 = call i64 @foo(i32 %27, i32 %28)
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %25
br label %35
32: ; preds = %25
%33 = load i32, i32* %3
%34 = call i32 @t3(i32 %33)
br label %35
35: ; preds = %32, %31
%36 = phi i32 [ 0, %31 ], [ %34, %32 ]
%37 = load i32, i32* %3
%38 = load i32, i32* %4
%39 = call i64 @foo(i32 %37, i32 %38)
%40 = load i32, i32* %3
%41 = load i32, i32* %4
%42 = call i64 @foo(i32 %40, i32 %41)
%43 = call i32 (...) @fn1()
%44 = call i32 (...) @fn2()
ret void
}

LLVM IR (-O2):
define void @t11(i32 %0, i32 %1) {
%3 = tail call i64 @foo(i32 %0, i32 %1)
%4 = tail call i64 @foo(i32 %0, i32 %1)
%5 = tail call i32 @t3(i32 %0)
%6 = tail call i32 (...) @fn2()
%7 = tail call i32 @t3(i32 %0)
%8 = tail call i32 (...) @fn2()
%9 = tail call i64 @foo(i32 %0, i32 %1)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = tail call i32 @t3(i32 %0)
br label %13
13: ; preds = %2, %11
%14 = tail call i64 @foo(i32 %0, i32 %1)
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = tail call i32 @t3(i32 %0)
br label %18
18: ; preds = %13, %16
%19 = tail call i64 @foo(i32 %0, i32 %1)
%20 = tail call i64 @foo(i32 %0, i32 %1)
%21 = tail call i32 (...) @fn1()
%22 = tail call i32 (...) @fn2()
ret void
}