#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*/ atoi(char *);
int /*<<< orphan*/ factorial(int /*<<< orphan*/);
int /*<<< orphan*/ free(void *);
void *malloc(int);
int /*<<< orphan*/ marker1();
int /*<<< orphan*/ marker2(int);
int /*<<< orphan*/ marker3(char *, char *);
int /*<<< orphan*/ marker4(long);
int main(int argc, char **argv, char **envp) {
  if (argc == 12345) {
    void *p = malloc(1);
    free(p);
    return 1;
  }
  factorial(atoi("6"));
  marker1();
  marker2(43);
  marker3("stack", "trace");
  marker4(177601976L);
  argc = (argc == 12345);
  return argc;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x3039,-0x8(%rbp)
jne    11ca <main+0x4a>
mov    $0x1,%edi
call   1090 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movl   $0x1,-0x4(%rbp)
jmp    1223 <main+0xa3>
lea    0xe2f(%rip),%rdi
call   10a0 <atoi@plt>
mov    %eax,%edi
call   1060 <factorial@plt>
mov    $0x0,%al
call   1070 <marker1@plt>
mov    $0x2b,%edi
call   1040 <marker2@plt>
lea    0xe0d(%rip),%rdi
lea    0xe0c(%rip),%rsi
call   1080 <marker3@plt>
mov    $0xa95fdb8,%edi
call   1050 <marker4@plt>
cmpl   $0x3039,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x3039,%edi
jne    1192 <main+0x22>
mov    $0x1,%ebx
mov    $0x1,%edi
call   1090 <malloc@plt>
mov    %rax,%rdi
call   1030 <free@plt>
jmp    11cc <main+0x5c>
mov    $0x6,%edi
call   1060 <factorial@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1070 <marker1@plt>
mov    $0x2b,%edi
call   1040 <marker2@plt>
lea    0xe4a(%rip),%rdi
lea    0xe49(%rip),%rsi
call   1080 <marker3@plt>
mov    $0xa95fdb8,%edi
call   1050 <marker4@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"6\00"
@.str.1 = [6 x i8] c"stack\00"
@.str.2 = [6 x i8] c"trace\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i8*
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 12345
br i1 %10, label %11, label %15
11: ; preds = %3
%12 = call i8* @malloc(i32 1)
store i8* %12, i8** %8
%13 = load i8*, i8** %8
%14 = call i32 @free(i8* %13)
store i32 1, i32* %4
br label %26
15: ; preds = %3
%16 = call i32 @atoi(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%17 = call i32 @factorial(i32 %16)
%18 = call i32 (...) @marker1()
%19 = call i32 @marker2(i32 43)
%20 = call i32 @marker3(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%21 = call i32 @marker4(i64 177601976)
%22 = load i32, i32* %5
%23 = icmp eq i32 %22, 12345
%24 = zext i1 %23 to i32
store i32 %24, i32* %5
%25 = load i32, i32* %5
store i32 %25, i32* %4
br label %26
26: ; preds = %15, %11
%27 = load i32, i32* %4
ret i32 %27
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"stack\00"
@.str.2 = [6 x i8] c"trace\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = icmp eq i32 %0, 12345
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
%7 = tail call i32 @free(i8* %6)
br label %14
8: ; preds = %3
%9 = tail call i32 @factorial(i32 6)
%10 = tail call i32 (...) @marker1()
%11 = tail call i32 @marker2(i32 43)
%12 = tail call i32 @marker3(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%13 = tail call i32 @marker4(i64 177601976)
br label %14
14: ; preds = %8, %5
%15 = phi i32 [ 1, %5 ], [ 0, %8 ]
ret i32 %15
}