#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*/ printf(char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ tobf_f(char *);
int /*<<< orphan*/ tobf_s(char *);
int /*<<< orphan*/ warning();
int main(int argc, char *argv[]) {
  if (argc < 3) {
    warning();
  }
  if (argc == 3) {
    if (strcmp(argv[1], "-s") == 0) {
      tobf_s(argv[2]);
    } else if (strcmp(argv[1], "-f") == 0) {
      tobf_f(argv[2]);
    } else {
      warning();
    }
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1177 <main+0x27>
mov    $0x0,%al
call   1030 <warning@plt>
cmpl   $0x3,-0x8(%rbp)
jne    11f2 <main+0xa2>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe70(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    11b1 <main+0x61>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1070 <tobf_s@plt>
jmp    11ed <main+0x9d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe43(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    11e1 <main+0x91>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <tobf_f@plt>
jmp    11e8 <main+0x98>
mov    $0x0,%al
call   1030 <warning@plt>
jmp    11ed <main+0x9d>
jmp    11f2 <main+0xa2>
lea    0xe0d(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jg     115f <main+0xf>
xor    %eax,%eax
call   1040 <warning@plt>
jmp    11a5 <main+0x55>
cmp    $0x3,%edi
jne    11a5 <main+0x55>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
lea    0xe8e(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     119c <main+0x4c>
mov    0x8(%rbx),%rdi
lea    0xe7c(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    1156 <main+0x6>
mov    0x10(%rbx),%rdi
call   1050 <tobf_f@plt>
jmp    11a5 <main+0x55>
mov    0x10(%rbx),%rdi
call   1070 <tobf_s@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-s\00"
@.str.1 = [3 x i8] c"-f\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @warning()
br label %10
10: ; preds = %8, %2
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 3
br i1 %12, label %13, label %39
13: ; preds = %10
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i64 @strcmp(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %24
19: ; preds = %13
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 2
%22 = load i8*, i8** %21
%23 = call i32 @tobf_s(i8* %22)
br label %38
24: ; preds = %13
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i64 @strcmp(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %35
30: ; preds = %24
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 2
%33 = load i8*, i8** %32
%34 = call i32 @tobf_f(i8* %33)
br label %37
35: ; preds = %24
%36 = call i32 (...) @warning()
br label %37
37: ; preds = %35, %30
br label %38
38: ; preds = %37, %19
br label %39
39: ; preds = %38, %10
%40 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"-s\00"
@.str.1 = [3 x i8] c"-f\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @warning()
br label %27
6: ; preds = %2
%7 = icmp eq i32 %0, 3
br i1 %7, label %8, label %27
8: ; preds = %6
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %8
%14 = getelementptr inbounds i8*, i8** %1, i64 2
%15 = load i8*, i8** %14
%16 = tail call i32 @tobf_s(i8* %15)
br label %27
17: ; preds = %8
%18 = load i8*, i8** %9
%19 = tail call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %25
21: ; preds = %17
%22 = getelementptr inbounds i8*, i8** %1, i64 2
%23 = load i8*, i8** %22
%24 = tail call i32 @tobf_f(i8* %23)
br label %27
25: ; preds = %17
%26 = tail call i32 (...) @warning()
br label %27
27: ; preds = %4, %13, %25, %21, %6
%28 = tail call i32 @putchar(i32 10)
ret i32 0
}