#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*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
int main(int argc, char **argv) {
  char s[100];
  if (argc > 2) {
    sprintf(s, "WRONG should be hidden branch left %s", argv[1]);
    sprintf(s, "most recent left %s", argv[1]);
  } else {
    sprintf(s, "WRONG should be hidden branch right %s", argv[1]);
    sprintf(s, "most recent right %s", argv[1]);
  }
  system(s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    1178 <main+0x58>
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xeaa(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xeb8(%rip),%rsi
call   1040 <sprintf@plt>
jmp    11a8 <main+0x88>
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xeaf(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xebe(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <system@plt>
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    %rsi,%r14
cmp    $0x3,%edi
mov    0x8(%rsi),%rdx
lea    0xec6(%rip),%rax
lea    0xef9(%rip),%rsi
cmovge %rax,%rsi
lea    0xeda(%rip),%rax
lea    0xf0e(%rip),%rbx
cmovge %rax,%rbx
mov    %rsp,%r15
mov    %r15,%rdi
call   1040 <sprintf@plt>
mov    0x8(%r14),%rdx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <sprintf@plt>
mov    %r15,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [38 x i8] c"WRONG should be hidden branch left %s\00"
@.str.1 = [20 x i8] c"most recent left %s\00"
@.str.2 = [39 x i8] c"WRONG should be hidden branch right %s\00"
@.str.3 = [21 x i8] c"most recent right %s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 2
br i1 %8, label %9, label %20
9: ; preds = %2
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = call i32 @sprintf(i8* %15, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %18)
br label %31
20: ; preds = %2
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = call i32 @sprintf(i8* %21, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i8* %24)
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = call i32 @sprintf(i8* %26, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* %29)
br label %31
31: ; preds = %20, %9
%32 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%33 = call i32 @system(i8* %32)
%34 = load i32, i32* %3
ret i32 %34
}

LLVM IR (-O2):
@.str = [38 x i8] c"WRONG should be hidden branch left %s\00"
@.str.1 = [20 x i8] c"most recent left %s\00"
@.str.2 = [39 x i8] c"WRONG should be hidden branch right %s\00"
@.str.3 = [21 x i8] c"most recent right %s\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = icmp sgt i32 %0, 2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = select i1 %5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0)
%9 = select i1 %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0)
%10 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) %8, i8* %7)
%11 = load i8*, i8** %6
%12 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) %9, i8* %11)
%13 = call i32 @system(i8* %4)
ret i32 0
}