#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 fa_parseopt(int, char **);
int /*<<< orphan*/ fa_print(char *);
int /*<<< orphan*/ fa_print_err(char *);
int /*<<< orphan*/ fa_print_init(int, int, int, int, int, char *, char *,
                                 char *, int);
int /*<<< orphan*/ fa_print_uninit();
int main(int argc, char *argv[]) {
  int ret;
  fa_print_init(1, 1, 1, 1, 1, "./log/", "testlog", "TS", 3);
  ret = fa_parseopt(argc, argv);
  if (ret)
    fa_print_err("FAIL: now doing the abnormal things\n");
  else
    fa_print("SUCC: now doing the normal thing\n");
  ;
  fa_print_uninit();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%r8d
lea    0xe8d(%rip),%r9
lea    0xe8d(%rip),%r10
lea    0xe8e(%rip),%rax
mov    %r8d,%edi
mov    %r8d,%esi
mov    %r8d,%edx
mov    %r8d,%ecx
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
movl   $0x3,0x10(%rsp)
call   1040 <fa_print_init@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <fa_parseopt@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     11cd <main+0x7d>
lea    0xe4f(%rip),%rdi
call   1060 <fa_print_err@plt>
jmp    11d9 <main+0x89>
lea    0xe63(%rip),%rdi
call   1070 <fa_print@plt>
mov    $0x0,%al
call   1050 <fa_print_uninit@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
sub    $0x8,%rsp
lea    0xeac(%rip),%rax
lea    0xe9d(%rip),%r10
lea    0xe8f(%rip),%r9
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
push   $0x3
push   %rax
push   %r10
call   1040 <fa_print_init@plt>
add    $0x20,%rsp
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <fa_parseopt@plt>
test   %eax,%eax
je     11b5 <main+0x65>
lea    0xe64(%rip),%rdi
call   1060 <fa_print_err@plt>
jmp    11c1 <main+0x71>
lea    0xe7b(%rip),%rdi
call   1070 <fa_print@plt>
xor    %eax,%eax
call   1050 <fa_print_uninit@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"./log/\00"
@.str.1 = [8 x i8] c"testlog\00"
@.str.2 = [3 x i8] c"TS\00"
@.str.3 = [37 x i8] c"FAIL: now doing the abnormal things\0A\00"
@.str.4 = [34 x i8] c"SUCC: now doing the normal thing\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @fa_print_init(i32 1, i32 1, i32 1, i32 1, i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 3)
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @fa_parseopt(i32 %8, i8** %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @fa_print_err(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
br label %17
15: ; preds = %2
%16 = call i32 @fa_print(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
br label %17
17: ; preds = %15, %13
%18 = call i32 (...) @fa_print_uninit()
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"./log/\00"
@.str.1 = [8 x i8] c"testlog\00"
@.str.2 = [3 x i8] c"TS\00"
@.str.3 = [37 x i8] c"FAIL: now doing the abnormal things\0A\00"
@.str.4 = [34 x i8] c"SUCC: now doing the normal thing\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @fa_print_init(i32 1, i32 1, i32 1, i32 1, i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 3)
%4 = tail call i32 @fa_parseopt(i32 %0, i8** %1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @fa_print_err(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
br label %10
8: ; preds = %2
%9 = tail call i32 @fa_print(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
%11 = tail call i32 (...) @fa_print_uninit()
ret i32 0
}