#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 strlen(char *);
int /*<<< orphan*/ usage(char *);
int /*<<< orphan*/ xlat_maps(char *, char *, char *, char *);
int main(int argc, char **argv) {
  char *alpha_map_p;
  char *numer_map_p;
  char *alpha_map_c;
  char *numer_map_c;
  if (argc != 5)
    usage(argv[0]);
  alpha_map_p = argv[1];
  numer_map_p = argv[2];
  alpha_map_c = argv[3];
  numer_map_c = argv[4];
  if (strlen(alpha_map_p) != 26)
    usage(argv[0]);
  if (strlen(numer_map_p) != 10)
    usage(argv[0]);
  if (strlen(alpha_map_c) != 26)
    usage(argv[0]);
  if (strlen(numer_map_c) != 10)
    usage(argv[0]);
  xlat_maps(alpha_map_p, numer_map_p, alpha_map_c, numer_map_c);
  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   $0x5,-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,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x1a,%eax
je     11aa <main+0x7a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <usage@plt>
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0xa,%eax
je     11c8 <main+0x98>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <usage@plt>
mov    -0x28(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x1a,%eax
je     11e6 <main+0xb6>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <usage@plt>
mov    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0xa,%eax
je     1204 <main+0xd4>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <usage@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
call   1030 <xlat_maps@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rsi,%rbx
cmp    $0x5,%edi
je     1149 <main+0x19>
mov    (%rbx),%rdi
call   1050 <usage@plt>
mov    0x8(%rbx),%r14
mov    0x10(%rbx),%r15
mov    0x18(%rbx),%r12
mov    0x20(%rbx),%r13
mov    %r14,%rdi
call   1040 <strlen@plt>
cmp    $0x1a,%eax
je     116e <main+0x3e>
mov    (%rbx),%rdi
call   1050 <usage@plt>
mov    %r15,%rdi
call   1040 <strlen@plt>
cmp    $0xa,%eax
je     1183 <main+0x53>
mov    (%rbx),%rdi
call   1050 <usage@plt>
mov    %r12,%rdi
call   1040 <strlen@plt>
cmp    $0x1a,%eax
je     1198 <main+0x68>
mov    (%rbx),%rdi
call   1050 <usage@plt>
mov    %r13,%rdi
call   1040 <strlen@plt>
cmp    $0xa,%eax
je     11ad <main+0x7d>
mov    (%rbx),%rdi
call   1050 <usage@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
call   1030 <xlat_maps@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
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 i8*
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, 5
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** %6
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 2
%23 = load i8*, i8** %22
store i8* %23, i8** %7
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 3
%26 = load i8*, i8** %25
store i8* %26, i8** %8
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 4
%29 = load i8*, i8** %28
store i8* %29, i8** %9
%30 = load i8*, i8** %6
%31 = call i32 @strlen(i8* %30)
%32 = icmp ne i32 %31, 26
br i1 %32, label %33, label %38
33: ; preds = %17
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 0
%36 = load i8*, i8** %35
%37 = call i32 @usage(i8* %36)
br label %38
38: ; preds = %33, %17
%39 = load i8*, i8** %7
%40 = call i32 @strlen(i8* %39)
%41 = icmp ne i32 %40, 10
br i1 %41, label %42, label %47
42: ; preds = %38
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 0
%45 = load i8*, i8** %44
%46 = call i32 @usage(i8* %45)
br label %47
47: ; preds = %42, %38
%48 = load i8*, i8** %8
%49 = call i32 @strlen(i8* %48)
%50 = icmp ne i32 %49, 26
br i1 %50, label %51, label %56
51: ; preds = %47
%52 = load i8**, i8*** %5
%53 = getelementptr inbounds i8*, i8** %52, i64 0
%54 = load i8*, i8** %53
%55 = call i32 @usage(i8* %54)
br label %56
56: ; preds = %51, %47
%57 = load i8*, i8** %9
%58 = call i32 @strlen(i8* %57)
%59 = icmp ne i32 %58, 10
br i1 %59, label %60, label %65
60: ; preds = %56
%61 = load i8**, i8*** %5
%62 = getelementptr inbounds i8*, i8** %61, i64 0
%63 = load i8*, i8** %62
%64 = call i32 @usage(i8* %63)
br label %65
65: ; preds = %60, %56
%66 = load i8*, i8** %6
%67 = load i8*, i8** %7
%68 = load i8*, i8** %8
%69 = load i8*, i8** %9
%70 = call i32 @xlat_maps(i8* %66, i8* %67, i8* %68, i8* %69)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 5
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 = getelementptr inbounds i8*, i8** %1, i64 4
%15 = load i8*, i8** %14
%16 = tail call i32 @strlen(i8* %9)
%17 = icmp eq i32 %16, 26
br i1 %17, label %21, label %18
18: ; preds = %7
%19 = load i8*, i8** %1
%20 = tail call i32 @usage(i8* %19)
br label %21
21: ; preds = %18, %7
%22 = tail call i32 @strlen(i8* %11)
%23 = icmp eq i32 %22, 10
br i1 %23, label %27, label %24
24: ; preds = %21
%25 = load i8*, i8** %1
%26 = tail call i32 @usage(i8* %25)
br label %27
27: ; preds = %24, %21
%28 = tail call i32 @strlen(i8* %13)
%29 = icmp eq i32 %28, 26
br i1 %29, label %33, label %30
30: ; preds = %27
%31 = load i8*, i8** %1
%32 = tail call i32 @usage(i8* %31)
br label %33
33: ; preds = %30, %27
%34 = tail call i32 @strlen(i8* %15)
%35 = icmp eq i32 %34, 10
br i1 %35, label %39, label %36
36: ; preds = %33
%37 = load i8*, i8** %1
%38 = tail call i32 @usage(i8* %37)
br label %39
39: ; preds = %36, %33
%40 = tail call i32 @xlat_maps(i8* %9, i8* %11, i8* %13, i8* %15)
ret i32 0
}