#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 */
char *decode_crlf(void *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ printf(char *, char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, char const *, char *, char *,
                           char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char const *);
void *strtok(char *, char *);
void process_result(char *line, const char *suite) {
  char extra_info[81];
  char dash_line[81];
  const char *type = strtok(line, "\t");
  const char *name = strtok(NULL, "\t");
  const char *file = strtok(NULL, "\t");
  char *line_num = strtok(NULL, "\t");
  char *check = strtok(NULL, "\t");
  char *n_checks = strtok(NULL, "\t");
  char *msg = decode_crlf(strtok(NULL, "\t"));
  int extra_info_len =
      strlen(file) + strlen(line_num) + strlen(check) + strlen(n_checks) + 7;
  if (msg == NULL) {
    fprintf(stderr, "Allocation error.\n");
    exit(19);
  }
  printf("%s\n", ("========================================"
                  "========================================"));
  printf("%-5s: %s.%s\n", *type == 'E' ? "ERROR" : "FAIL", suite, name);
  strcpy(dash_line, ("----------------------------------------"
                     "----------------------------------------"));
  sprintf(extra_info, " %s, %s, %s/%s ", file, line_num, check, n_checks);
  memcpy(dash_line + (80 - extra_info_len), extra_info, extra_info_len);
  printf("%s\n\n", dash_line);
  printf("%s\n\n", msg);
  free(msg);
}


x86 assembly (clang, -O0):
<process_result>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe42(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0xd8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe2b(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0xe0(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe14(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0xe8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xdfd(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0xf0(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xde6(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0xf8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xdcf(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0x100(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xdb8(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,%rdi
call   1070 <decode_crlf@plt>
mov    %rax,-0x108(%rbp)
mov    -0xe8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x118(%rbp)
mov    -0xf0(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x118(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x114(%rbp)
mov    -0xf8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x114(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x110(%rbp)
mov    -0x100(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x110(%rbp),%eax
add    %ecx,%eax
add    $0x7,%eax
mov    %eax,-0x10c(%rbp)
cmpq   $0x0,-0x108(%rbp)
jne    12f2 <process_result+0x152>
mov    0x2d06(%rip),%rax
mov    (%rax),%edi
lea    0xd1f(%rip),%rsi
call   1080 <fprintf@plt>
mov    $0x13,%edi
call   10c0 <exit@plt>
lea    0xd76(%rip),%rdi
lea    0xd15(%rip),%rsi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0xd8(%rbp),%rax
movsbl (%rax),%ecx
lea    0xd61(%rip),%rsi
lea    0xd54(%rip),%rax
cmp    $0x45,%ecx
cmove  %rax,%rsi
mov    -0x10(%rbp),%rdx
mov    -0xe0(%rbp),%rcx
lea    0xd2e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0xd0(%rbp),%rdi
lea    0xd31(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x70(%rbp),%rdi
mov    -0xe8(%rbp),%rdx
mov    -0xf0(%rbp),%rcx
mov    -0xf8(%rbp),%r8
mov    -0x100(%rbp),%r9
lea    0xd56(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0xd0(%rbp),%rdi
mov    $0x50,%eax
sub    -0x10c(%rbp),%eax
cltq
add    %rax,%rdi
lea    -0x70(%rbp),%rsi
mov    -0x10c(%rbp),%edx
call   1090 <memcpy@plt>
lea    -0xd0(%rbp),%rsi
lea    0xd2d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x108(%rbp),%rsi
lea    0xd18(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x108(%rbp),%rdi
call   1030 <free@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_result>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
mov    %rsi,0x28(%rsp)
lea    0xe43(%rip),%rbx
mov    %rbx,%rsi
call   10a0 <strtok@plt>
mov    %rax,(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   10a0 <strtok@plt>
mov    %rax,0x10(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   10a0 <strtok@plt>
mov    %rax,%r14
xor    %edi,%edi
mov    %rbx,%rsi
call   10a0 <strtok@plt>
mov    %rax,%rbp
xor    %edi,%edi
mov    %rbx,%rsi
call   10a0 <strtok@plt>
mov    %rax,%r13
xor    %edi,%edi
mov    %rbx,%rsi
call   10a0 <strtok@plt>
mov    %rax,%r12
xor    %edi,%edi
mov    %rbx,%rsi
call   10a0 <strtok@plt>
mov    %rax,%rdi
call   1070 <decode_crlf@plt>
mov    %rax,%rbx
mov    %r14,0x20(%rsp)
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    %eax,%r15d
mov    %rbp,0x18(%rsp)
mov    %rbp,%rdi
call   1050 <strlen@plt>
mov    %eax,%r14d
mov    %r13,0x8(%rsp)
mov    %r13,%rdi
mov    %r12,%r13
mov    %rbx,%r12
call   1050 <strlen@plt>
mov    %eax,%ebx
mov    %r13,%rdi
call   1050 <strlen@plt>
test   %r12,%r12
je     134f <process_result+0x1af>
add    %r15d,%r14d
add    %ebx,%r14d
add    %eax,%r14d
lea    0x7(%r14),%r15d
lea    0xdf4(%rip),%rdi
lea    0xd93(%rip),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    (%rsp),%rax
cmpb   $0x45,(%rax)
lea    0xddc(%rip),%rax
lea    0xddb(%rip),%rsi
cmove  %rax,%rsi
lea    0xdbd(%rip),%rdi
mov    0x28(%rsp),%rdx
mov    0x10(%rsp),%rcx
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xdbd(%rip),%rsi
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strcpy@plt>
lea    0xdfa(%rip),%rsi
lea    0x90(%rsp),%rbp
mov    %rbp,%rdi
mov    0x20(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    0x8(%rsp),%r8
mov    %r13,%r9
call   10b0 <sprintf@plt>
mov    $0x49,%eax
sub    %r14d,%eax
cltq
lea    (%rsp,%rax,1),%rdi
add    $0x30,%rdi
mov    %rbp,%rsi
mov    %r15d,%edx
call   1090 <memcpy@plt>
lea    0xdc4(%rip),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbp,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r12,%rdi
call   1030 <free@plt>
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c8a(%rip),%rax
mov    (%rax),%edi
lea    0xca3(%rip),%rsi
call   1080 <fprintf@plt>
mov    $0x13,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\09\00"
@stderr = global i32 0
@.str.1 = [19 x i8] c"Allocation error.\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [81 x i8] c"================================================================================\00"
@.str.4 = [13 x i8] c"%-5s: %s.%s\0A\00"
@.str.5 = [6 x i8] c"ERROR\00"
@.str.6 = [5 x i8] c"FAIL\00"
@.str.7 = [81 x i8] c"--------------------------------------------------------------------------------\00"
@.str.8 = [16 x i8] c" %s, %s, %s/%s \00"
@.str.9 = [5 x i8] c"%s\0A\0A\00"
define void @process_result(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [81 x i8]
%6 = alloca [81 x i8]
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%15 = load i8*, i8** %3
%16 = call i8* @strtok(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %16, i8** %7
%17 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %17, i8** %8
%18 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %18, i8** %9
%19 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %19, i8** %10
%20 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %20, i8** %11
%21 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %21, i8** %12
%22 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%23 = call i8* @decode_crlf(i8* %22)
store i8* %23, i8** %13
%24 = load i8*, i8** %9
%25 = call i32 @strlen(i8* %24)
%26 = load i8*, i8** %10
%27 = call i32 @strlen(i8* %26)
%28 = add nsw i32 %25, %27
%29 = load i8*, i8** %11
%30 = call i32 @strlen(i8* %29)
%31 = add nsw i32 %28, %30
%32 = load i8*, i8** %12
%33 = call i32 @strlen(i8* %32)
%34 = add nsw i32 %31, %33
%35 = add nsw i32 %34, 7
store i32 %35, i32* %14
%36 = load i8*, i8** %13
%37 = icmp eq i8* %36, null
br i1 %37, label %38, label %42
38: ; preds = %2
%39 = load i32, i32* @stderr
%40 = call i32 @fprintf(i32 %39, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%41 = call i32 @exit(i32 19)
unreachable
42: ; preds = %2
%43 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.3, i64 0, i64 0))
%44 = load i8*, i8** %7
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = icmp eq i32 %46, 69
%48 = zext i1 %47 to i64
%49 = select i1 %47, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0)
%50 = load i8*, i8** %4
%51 = load i8*, i8** %8
%52 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* %49, i8* %50, i8* %51)
%53 = getelementptr inbounds [81 x i8], [81 x i8]* %6, i64 0, i64 0
%54 = call i32 @strcpy(i8* %53, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.7, i64 0, i64 0))
%55 = getelementptr inbounds [81 x i8], [81 x i8]* %5, i64 0, i64 0
%56 = load i8*, i8** %9
%57 = load i8*, i8** %10
%58 = load i8*, i8** %11
%59 = load i8*, i8** %12
%60 = call i32 @sprintf(i8* %55, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8* %56, i8* %57, i8* %58, i8* %59)
%61 = getelementptr inbounds [81 x i8], [81 x i8]* %6, i64 0, i64 0
%62 = load i32, i32* %14
%63 = sub nsw i32 80, %62
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8, i8* %61, i64 %64
%66 = getelementptr inbounds [81 x i8], [81 x i8]* %5, i64 0, i64 0
%67 = load i32, i32* %14
%68 = call i32 @memcpy(i8* %65, i8* %66, i32 %67)
%69 = getelementptr inbounds [81 x i8], [81 x i8]* %6, i64 0, i64 0
%70 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8* %69)
%71 = load i8*, i8** %13
%72 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8* %71)
%73 = load i8*, i8** %13
%74 = call i32 @free(i8* %73)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\09\00"
@stderr = global i32 0
@.str.1 = [19 x i8] c"Allocation error.\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [81 x i8] c"================================================================================\00"
@.str.4 = [13 x i8] c"%-5s: %s.%s\0A\00"
@.str.5 = [6 x i8] c"ERROR\00"
@.str.6 = [5 x i8] c"FAIL\00"
@.str.7 = [81 x i8] c"--------------------------------------------------------------------------------\00"
@.str.8 = [16 x i8] c" %s, %s, %s/%s \00"
@.str.9 = [5 x i8] c"%s\0A\0A\00"
define void @process_result(i8* %0, i8* %1) {
%3 = alloca [81 x i8]
%4 = alloca [81 x i8]
%5 = getelementptr inbounds [81 x i8], [81 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [81 x i8], [81 x i8]* %4, i64 0, i64 0
%7 = tail call i8* @strtok(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%13 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = tail call i8* @decode_crlf(i8* %13)
%15 = tail call i32 @strlen(i8* %9)
%16 = tail call i32 @strlen(i8* %10)
%17 = add nsw i32 %16, %15
%18 = tail call i32 @strlen(i8* %11)
%19 = add nsw i32 %17, %18
%20 = tail call i32 @strlen(i8* %12)
%21 = add nsw i32 %19, %20
%22 = icmp eq i8* %14, null
br i1 %22, label %23, label %27
23: ; preds = %2
%24 = load i32, i32* @stderr
%25 = tail call i32 @fprintf(i32 %24, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%26 = tail call i32 @exit(i32 19)
unreachable
27: ; preds = %2
%28 = add nsw i32 %21, 7
%29 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.3, i64 0, i64 0))
%30 = load i8, i8* %7
%31 = icmp eq i8 %30, 69
%32 = select i1 %31, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0)
%33 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* %32, i8* %1, i8* %8)
%34 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.7, i64 0, i64 0))
%35 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8* %9, i8* %10, i8* %11, i8* %12)
%36 = sub i32 73, %21
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [81 x i8], [81 x i8]* %4, i64 0, i64 %37
%39 = call i32 @memcpy(i8* %38, i8* %5, i32 %28)
%40 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8* %6)
%41 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8* %14)
%42 = call i32 @free(i8* %14)
ret void
}