#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 B(int);
int M(int);
int /*<<< orphan*/ abort();
int bar(int, int /*<<< orphan*/);
int baz(int, int /*<<< orphan*/);
int foo(int);
int q(int);
scalar_t__ strcmp(char *, char *);
int toupper(int);
int main(int argc, char *argv[]) {
  if (q(2) != 42)
    do {
      ;
      abort();
    } while (0);
  if (B(B(2)) != 42)
    do {
      ;
      abort();
    } while (0);
  if (B(22) != 42)
    do {
      ;
      abort();
    } while (0);
  if (5 + 37 != 42)
    do {
      ;
      abort();
    } while (0);
  if (foo(bar(32, 0)) != 42)
    do {
      ;
      abort();
    } while (0);
  if (foo(bar(32, 0)) != 42)
    do {
      ;
      abort();
    } while (0);
  if (foo(foo(baz(22, 0))) != 42)
    do {
      ;
      abort();
    } while (0);
  if (toupper(10) != 42)
    do {
      ;
      abort();
    } while (0);
  if (2 + M(2 + M(9)) != 42)
    do {
      ;
      abort();
    } while (0);
  if (1 + B(1 + B(0)) != 42)
    do {
      ;
      abort();
    } while (0);
  {
    int insn = 6, i = 2, b = 2;
    if (((insn * 3 + 2) * i + 2) != 42)
      do {
        ;
        abort();
      } while (0);
    if (((insn * 3 + 2) * i + 2) != 42)
      do {
        ;
        abort();
      } while (0);
    if (((b * 4 + 2) * 4 + 2) != 42)
      do {
        ;
        abort();
      } while (0);
  }
  if (strcmp("forty", "forty"))
    do {
      ;
      abort();
    } while (0);
  if (strcmp("forty"
             "-two",
             "forty-two"))
    do {
      ;
      abort();
    } while (0);
  if (42 != 42 || 42 != 42 || 42 != 42 || 42 != 42)
    do {
      ;
      abort();
    } while (0);
  if (1 + q(1) != 42)
    do {
      ;
      abort();
    } while (0);
  if (1 + 2 + 4 + 35 != 42)
    do {
      ;
      abort();
    } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2,%edi
call   10b0 <q@plt>
cmp    $0x2a,%eax
je     11c5 <main+0x35>
jmp    11be <main+0x2e>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x2,%edi
call   1060 <B@plt>
mov    %eax,%edi
call   1060 <B@plt>
cmp    $0x2a,%eax
je     11eb <main+0x5b>
jmp    11e4 <main+0x54>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x16,%edi
call   1060 <B@plt>
cmp    $0x2a,%eax
je     120a <main+0x7a>
jmp    1203 <main+0x73>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x20,%edi
xor    %esi,%esi
call   1070 <bar@plt>
mov    %eax,%edi
call   1090 <foo@plt>
cmp    $0x2a,%eax
je     1232 <main+0xa2>
jmp    122b <main+0x9b>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x20,%edi
xor    %esi,%esi
call   1070 <bar@plt>
mov    %eax,%edi
call   1090 <foo@plt>
cmp    $0x2a,%eax
je     125a <main+0xca>
jmp    1253 <main+0xc3>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x16,%edi
xor    %esi,%esi
call   1040 <baz@plt>
mov    %eax,%edi
call   1090 <foo@plt>
mov    %eax,%edi
call   1090 <foo@plt>
cmp    $0x2a,%eax
je     1289 <main+0xf9>
jmp    1282 <main+0xf2>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xa,%edi
call   1050 <toupper@plt>
cmp    $0x2a,%eax
je     12a8 <main+0x118>
jmp    12a1 <main+0x111>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x9,%edi
call   10a0 <M@plt>
mov    %eax,%edi
add    $0x2,%edi
call   10a0 <M@plt>
add    $0x2,%eax
cmp    $0x2a,%eax
je     12d4 <main+0x144>
jmp    12cd <main+0x13d>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1060 <B@plt>
mov    %eax,%edi
add    $0x1,%edi
call   1060 <B@plt>
add    $0x1,%eax
cmp    $0x2a,%eax
je     12fd <main+0x16d>
jmp    12f6 <main+0x166>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0x6,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
movl   $0x2,-0x1c(%rbp)
imul   $0x3,-0x14(%rbp),%eax
add    $0x2,%eax
imul   -0x18(%rbp),%eax
add    $0x2,%eax
cmp    $0x2a,%eax
je     1335 <main+0x1a5>
jmp    132e <main+0x19e>
mov    $0x0,%al
call   1030 <abort@plt>
imul   $0x3,-0x14(%rbp),%eax
add    $0x2,%eax
imul   -0x18(%rbp),%eax
add    $0x2,%eax
cmp    $0x2a,%eax
je     1358 <main+0x1c8>
jmp    1351 <main+0x1c1>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x1c(%rbp),%eax
shl    $0x2,%eax
add    $0x2,%eax
shl    $0x2,%eax
add    $0x2,%eax
cmp    $0x2a,%eax
je     137c <main+0x1ec>
jmp    1375 <main+0x1e5>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xc7d(%rip),%rsi
mov    %rsi,%rdi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     13a1 <main+0x211>
jmp    139a <main+0x20a>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xc5e(%rip),%rsi
mov    %rsi,%rdi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     13c6 <main+0x236>
jmp    13bf <main+0x22f>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x1,%edi
call   10b0 <q@plt>
add    $0x1,%eax
cmp    $0x2a,%eax
je     13e8 <main+0x258>
jmp    13e1 <main+0x251>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   10b0 <q@plt>
cmp    $0x2a,%eax
jne    129d <main+0x10d>
mov    $0x2,%edi
call   1060 <B@plt>
mov    %eax,%edi
call   1060 <B@plt>
cmp    $0x2a,%eax
jne    129d <main+0x10d>
mov    $0x16,%edi
call   1060 <B@plt>
cmp    $0x2a,%eax
jne    129d <main+0x10d>
mov    $0x20,%edi
xor    %esi,%esi
call   1070 <bar@plt>
mov    %eax,%edi
call   1090 <foo@plt>
cmp    $0x2a,%eax
jne    129d <main+0x10d>
mov    $0x20,%edi
xor    %esi,%esi
call   1070 <bar@plt>
mov    %eax,%edi
call   1090 <foo@plt>
cmp    $0x2a,%eax
jne    129d <main+0x10d>
mov    $0x16,%edi
xor    %esi,%esi
call   1040 <baz@plt>
mov    %eax,%edi
call   1090 <foo@plt>
mov    %eax,%edi
call   1090 <foo@plt>
cmp    $0x2a,%eax
jne    129d <main+0x10d>
mov    $0xa,%edi
call   1050 <toupper@plt>
cmp    $0x2a,%eax
jne    129d <main+0x10d>
mov    $0x9,%edi
call   10a0 <M@plt>
lea    0x2(%rax),%edi
call   10a0 <M@plt>
cmp    $0x28,%eax
jne    129d <main+0x10d>
xor    %edi,%edi
call   1060 <B@plt>
lea    0x1(%rax),%edi
call   1060 <B@plt>
cmp    $0x29,%eax
jne    129d <main+0x10d>
lea    0xd97(%rip),%rdi
mov    %rdi,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
jne    129d <main+0x10d>
lea    0xd89(%rip),%rdi
mov    %rdi,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
jne    129d <main+0x10d>
mov    $0x1,%edi
call   10b0 <q@plt>
cmp    $0x29,%eax
jne    129d <main+0x10d>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"forty\00"
@.str.1 = [10 x i8] c"forty-two\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 @q(i32 2)
%10 = icmp ne i32 %9, 42
br i1 %10, label %11, label %15
11: ; preds = %2
br label %12
12: ; preds = %11
%13 = call i32 (...) @abort()
unreachable
14: ; No predecessors!
br label %15
15: ; preds = %14, %2
%16 = call i32 @B(i32 2)
%17 = call i32 @B(i32 %16)
%18 = icmp ne i32 %17, 42
br i1 %18, label %19, label %23
19: ; preds = %15
br label %20
20: ; preds = %19
%21 = call i32 (...) @abort()
unreachable
22: ; No predecessors!
br label %23
23: ; preds = %22, %15
%24 = call i32 @B(i32 22)
%25 = icmp ne i32 %24, 42
br i1 %25, label %26, label %30
26: ; preds = %23
br label %27
27: ; preds = %26
%28 = call i32 (...) @abort()
unreachable
29: ; No predecessors!
br label %30
30: ; preds = %29, %23
%31 = call i32 @bar(i32 32, i32 0)
%32 = call i32 @foo(i32 %31)
%33 = icmp ne i32 %32, 42
br i1 %33, label %34, label %38
34: ; preds = %30
br label %35
35: ; preds = %34
%36 = call i32 (...) @abort()
unreachable
37: ; No predecessors!
br label %38
38: ; preds = %37, %30
%39 = call i32 @bar(i32 32, i32 0)
%40 = call i32 @foo(i32 %39)
%41 = icmp ne i32 %40, 42
br i1 %41, label %42, label %46
42: ; preds = %38
br label %43
43: ; preds = %42
%44 = call i32 (...) @abort()
unreachable
45: ; No predecessors!
br label %46
46: ; preds = %45, %38
%47 = call i32 @baz(i32 22, i32 0)
%48 = call i32 @foo(i32 %47)
%49 = call i32 @foo(i32 %48)
%50 = icmp ne i32 %49, 42
br i1 %50, label %51, label %55
51: ; preds = %46
br label %52
52: ; preds = %51
%53 = call i32 (...) @abort()
unreachable
54: ; No predecessors!
br label %55
55: ; preds = %54, %46
%56 = call i32 @toupper(i32 10)
%57 = icmp ne i32 %56, 42
br i1 %57, label %58, label %62
58: ; preds = %55
br label %59
59: ; preds = %58
%60 = call i32 (...) @abort()
unreachable
61: ; No predecessors!
br label %62
62: ; preds = %61, %55
%63 = call i32 @M(i32 9)
%64 = add nsw i32 2, %63
%65 = call i32 @M(i32 %64)
%66 = add nsw i32 2, %65
%67 = icmp ne i32 %66, 42
br i1 %67, label %68, label %72
68: ; preds = %62
br label %69
69: ; preds = %68
%70 = call i32 (...) @abort()
unreachable
71: ; No predecessors!
br label %72
72: ; preds = %71, %62
%73 = call i32 @B(i32 0)
%74 = add nsw i32 1, %73
%75 = call i32 @B(i32 %74)
%76 = add nsw i32 1, %75
%77 = icmp ne i32 %76, 42
br i1 %77, label %78, label %82
78: ; preds = %72
br label %79
79: ; preds = %78
%80 = call i32 (...) @abort()
unreachable
81: ; No predecessors!
br label %82
82: ; preds = %81, %72
store i32 6, i32* %6
store i32 2, i32* %7
store i32 2, i32* %8
%83 = load i32, i32* %6
%84 = mul nsw i32 %83, 3
%85 = add nsw i32 %84, 2
%86 = load i32, i32* %7
%87 = mul nsw i32 %85, %86
%88 = add nsw i32 %87, 2
%89 = icmp ne i32 %88, 42
br i1 %89, label %90, label %94
90: ; preds = %82
br label %91
91: ; preds = %90
%92 = call i32 (...) @abort()
unreachable
93: ; No predecessors!
br label %94
94: ; preds = %93, %82
%95 = load i32, i32* %6
%96 = mul nsw i32 %95, 3
%97 = add nsw i32 %96, 2
%98 = load i32, i32* %7
%99 = mul nsw i32 %97, %98
%100 = add nsw i32 %99, 2
%101 = icmp ne i32 %100, 42
br i1 %101, label %102, label %106
102: ; preds = %94
br label %103
103: ; preds = %102
%104 = call i32 (...) @abort()
unreachable
105: ; No predecessors!
br label %106
106: ; preds = %105, %94
%107 = load i32, i32* %8
%108 = mul nsw i32 %107, 4
%109 = add nsw i32 %108, 2
%110 = mul nsw i32 %109, 4
%111 = add nsw i32 %110, 2
%112 = icmp ne i32 %111, 42
br i1 %112, label %113, label %117
113: ; preds = %106
br label %114
114: ; preds = %113
%115 = call i32 (...) @abort()
unreachable
116: ; No predecessors!
br label %117
117: ; preds = %116, %106
%118 = call i64 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%119 = icmp ne i64 %118, 0
br i1 %119, label %120, label %124
120: ; preds = %117
br label %121
121: ; preds = %120
%122 = call i32 (...) @abort()
unreachable
123: ; No predecessors!
br label %124
124: ; preds = %123, %117
%125 = call i64 @strcmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%126 = icmp ne i64 %125, 0
br i1 %126, label %127, label %131
127: ; preds = %124
br label %128
128: ; preds = %127
%129 = call i32 (...) @abort()
unreachable
130: ; No predecessors!
br label %131
131: ; preds = %130, %124
%132 = call i32 @q(i32 1)
%133 = add nsw i32 1, %132
%134 = icmp ne i32 %133, 42
br i1 %134, label %135, label %139
135: ; preds = %131
br label %136
136: ; preds = %135
%137 = call i32 (...) @abort()
unreachable
138: ; No predecessors!
br label %139
139: ; preds = %138, %131
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"forty\00"
@.str.1 = [10 x i8] c"forty-two\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @q(i32 2)
%4 = icmp eq i32 %3, 42
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
%8 = tail call i32 @B(i32 2)
%9 = tail call i32 @B(i32 %8)
%10 = icmp eq i32 %9, 42
br i1 %10, label %13, label %11
11: ; preds = %7
%12 = tail call i32 (...) @abort()
unreachable
13: ; preds = %7
%14 = tail call i32 @B(i32 22)
%15 = icmp eq i32 %14, 42
br i1 %15, label %18, label %16
16: ; preds = %13
%17 = tail call i32 (...) @abort()
unreachable
18: ; preds = %13
%19 = tail call i32 @bar(i32 32, i32 0)
%20 = tail call i32 @foo(i32 %19)
%21 = icmp eq i32 %20, 42
br i1 %21, label %24, label %22
22: ; preds = %18
%23 = tail call i32 (...) @abort()
unreachable
24: ; preds = %18
%25 = tail call i32 @bar(i32 32, i32 0)
%26 = tail call i32 @foo(i32 %25)
%27 = icmp eq i32 %26, 42
br i1 %27, label %30, label %28
28: ; preds = %24
%29 = tail call i32 (...) @abort()
unreachable
30: ; preds = %24
%31 = tail call i32 @baz(i32 22, i32 0)
%32 = tail call i32 @foo(i32 %31)
%33 = tail call i32 @foo(i32 %32)
%34 = icmp eq i32 %33, 42
br i1 %34, label %37, label %35
35: ; preds = %30
%36 = tail call i32 (...) @abort()
unreachable
37: ; preds = %30
%38 = tail call i32 @toupper(i32 10)
%39 = icmp eq i32 %38, 42
br i1 %39, label %42, label %40
40: ; preds = %37
%41 = tail call i32 (...) @abort()
unreachable
42: ; preds = %37
%43 = tail call i32 @M(i32 9)
%44 = add nsw i32 %43, 2
%45 = tail call i32 @M(i32 %44)
%46 = icmp eq i32 %45, 40
br i1 %46, label %49, label %47
47: ; preds = %42
%48 = tail call i32 (...) @abort()
unreachable
49: ; preds = %42
%50 = tail call i32 @B(i32 0)
%51 = add nsw i32 %50, 1
%52 = tail call i32 @B(i32 %51)
%53 = icmp eq i32 %52, 41
br i1 %53, label %56, label %54
54: ; preds = %49
%55 = tail call i32 (...) @abort()
unreachable
56: ; preds = %49
%57 = tail call i64 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%58 = icmp eq i64 %57, 0
br i1 %58, label %61, label %59
59: ; preds = %56
%60 = tail call i32 (...) @abort()
unreachable
61: ; preds = %56
%62 = tail call i64 @strcmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%63 = icmp eq i64 %62, 0
br i1 %63, label %66, label %64
64: ; preds = %61
%65 = tail call i32 (...) @abort()
unreachable
66: ; preds = %61
%67 = tail call i32 @q(i32 1)
%68 = icmp eq i32 %67, 41
br i1 %68, label %71, label %69
69: ; preds = %66
%70 = tail call i32 (...) @abort()
unreachable
71: ; preds = %66
ret i32 0
}