#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*/ 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)malloc(1);
    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    11ad <main+0x3d>
mov    $0x1,%edi
call   1080 <malloc@plt>
movl   $0x1,-0x4(%rbp)
jmp    1206 <main+0x96>
lea    0xe4c(%rip),%rdi
call   1090 <atoi@plt>
mov    %eax,%edi
call   1050 <factorial@plt>
mov    $0x0,%al
call   1060 <marker1@plt>
mov    $0x2b,%edi
call   1030 <marker2@plt>
lea    0xe2a(%rip),%rdi
lea    0xe29(%rip),%rsi
call   1070 <marker3@plt>
mov    $0xa95fdb8,%edi
call   1040 <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    117a <main+0x1a>
mov    $0x1,%ebx
mov    $0x1,%edi
call   1080 <malloc@plt>
jmp    11b4 <main+0x54>
mov    $0x6,%edi
call   1050 <factorial@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <marker1@plt>
mov    $0x2b,%edi
call   1030 <marker2@plt>
lea    0xe62(%rip),%rdi
lea    0xe61(%rip),%rsi
call   1070 <marker3@plt>
mov    $0xa95fdb8,%edi
call   1040 <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**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 12345
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = call i32 @malloc(i32 1)
store i32 1, i32* %4
br label %23
12: ; preds = %3
%13 = call i32 @atoi(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @factorial(i32 %13)
%15 = call i32 (...) @marker1()
%16 = call i32 @marker2(i32 43)
%17 = 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))
%18 = call i32 @marker4(i64 177601976)
%19 = load i32, i32* %5
%20 = icmp eq i32 %19, 12345
%21 = zext i1 %20 to i32
store i32 %21, i32* %5
%22 = load i32, i32* %5
store i32 %22, i32* %4
br label %23
23: ; preds = %12, %10
%24 = load i32, i32* %4
ret i32 %24
}

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 %7
5: ; preds = %3
%6 = tail call i32 @malloc(i32 1)
br label %13
7: ; preds = %3
%8 = tail call i32 @factorial(i32 6)
%9 = tail call i32 (...) @marker1()
%10 = tail call i32 @marker2(i32 43)
%11 = 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))
%12 = tail call i32 @marker4(i64 177601976)
br label %13
13: ; preds = %7, %5
%14 = phi i32 [ 1, %5 ], [ 0, %7 ]
ret i32 %14
}