#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*/ apply_maps(char *, char *, char *);
int strlen(char *);
int /*<<< orphan*/ usage(char *);
int main(int argc, char **argv) {
  char *file_name;
  char *alpha_map;
  char *numer_map;
  int i;
  if (argc != 4)
    usage(argv[0]);
  alpha_map = argv[1];
  numer_map = argv[2];
  file_name = argv[3];
  if (strlen(alpha_map) != 26)
    usage(argv[0]);
  if (strlen(numer_map) != 10)
    usage(argv[0]);
  apply_maps(alpha_map, numer_map, file_name);
  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)
cmpl   $0x4,-0x8(%rbp)
je     115c <main+0x2c>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x1a,%eax
je     119e <main+0x6e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <usage@plt>
mov    -0x28(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0xa,%eax
je     11bc <main+0x8c>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <usage@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <apply_maps@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x4,%edi
je     1148 <main+0x18>
mov    (%rbx),%rdi
call   1050 <usage@plt>
mov    0x8(%rbx),%r14
mov    0x10(%rbx),%r15
mov    0x18(%rbx),%r12
mov    %r14,%rdi
call   1040 <strlen@plt>
cmp    $0x1a,%eax
je     1169 <main+0x39>
mov    (%rbx),%rdi
call   1050 <usage@plt>
mov    %r15,%rdi
call   1040 <strlen@plt>
cmp    $0xa,%eax
je     117e <main+0x4e>
mov    (%rbx),%rdi
call   1050 <usage@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1030 <apply_maps@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 4
br i1 %11, label %12, label %17
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
%16 = call i32 @usage(i8* %15)
br label %17
17: ; preds = %12, %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
store i8* %20, i8** %7
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 2
%23 = load i8*, i8** %22
store i8* %23, i8** %8
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 3
%26 = load i8*, i8** %25
store i8* %26, i8** %6
%27 = load i8*, i8** %7
%28 = call i32 @strlen(i8* %27)
%29 = icmp ne i32 %28, 26
br i1 %29, label %30, label %35
30: ; preds = %17
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 0
%33 = load i8*, i8** %32
%34 = call i32 @usage(i8* %33)
br label %35
35: ; preds = %30, %17
%36 = load i8*, i8** %8
%37 = call i32 @strlen(i8* %36)
%38 = icmp ne i32 %37, 10
br i1 %38, label %39, label %44
39: ; preds = %35
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 0
%42 = load i8*, i8** %41
%43 = call i32 @usage(i8* %42)
br label %44
44: ; preds = %39, %35
%45 = load i8*, i8** %7
%46 = load i8*, i8** %8
%47 = load i8*, i8** %6
%48 = call i32 @apply_maps(i8* %45, i8* %46, i8* %47)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 4
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @usage(i8* %5)
br label %7
7: ; preds = %4, %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8*, i8** %1, i64 3
%13 = load i8*, i8** %12
%14 = tail call i32 @strlen(i8* %9)
%15 = icmp eq i32 %14, 26
br i1 %15, label %19, label %16
16: ; preds = %7
%17 = load i8*, i8** %1
%18 = tail call i32 @usage(i8* %17)
br label %19
19: ; preds = %16, %7
%20 = tail call i32 @strlen(i8* %11)
%21 = icmp eq i32 %20, 10
br i1 %21, label %25, label %22
22: ; preds = %19
%23 = load i8*, i8** %1
%24 = tail call i32 @usage(i8* %23)
br label %25
25: ; preds = %22, %19
%26 = tail call i32 @apply_maps(i8* %9, i8* %11, i8* %13)
ret i32 0
}