#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*/ exec_shlb(int, int, int);
int /*<<< orphan*/ exec_shll(int, int, int, int);
int /*<<< orphan*/ exec_shlw(int, int, int, int);
void exec_shl(int s2, int s0, int s1) {
  int o, s, z, a, c, p, flags_in;
  for (o = 0; o < 2; o++) {
    for (s = 0; s < 2; s++) {
      for (z = 0; z < 2; z++) {
        for (a = 0; a < 2; a++) {
          for (c = 0; c < 2; c++) {
            for (p = 0; p < 2; p++) {
              flags_in = (o ? 0x0800 : 0) | (s ? 0x0080 : 0) |
                         (z ? 0x0040 : 0) | (a ? 0x0010 : 0) |
                         (c ? 0x0001 : 0) | (p ? 0x0004 : 0);
              exec_shll(s2, s0, s1, flags_in);
              exec_shlw(s2, s0, s1, flags_in);
              exec_shlb(s0, s1, flags_in);
            }
          }
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<exec_shl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x2,-0x10(%rbp)
jge    12b1 <exec_shl+0x181>
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    129e <exec_shl+0x16e>
movl   $0x0,-0x18(%rbp)
cmpl   $0x2,-0x18(%rbp)
jge    128b <exec_shl+0x15b>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x2,-0x1c(%rbp)
jge    1278 <exec_shl+0x148>
movl   $0x0,-0x20(%rbp)
cmpl   $0x2,-0x20(%rbp)
jge    1265 <exec_shl+0x135>
movl   $0x0,-0x24(%rbp)
cmpl   $0x2,-0x24(%rbp)
jge    1252 <exec_shl+0x122>
mov    -0x10(%rbp),%edx
xor    %eax,%eax
mov    $0x800,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    -0x14(%rbp),%esi
xor    %ecx,%ecx
mov    $0x80,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
or     %ecx,%eax
mov    -0x18(%rbp),%esi
xor    %ecx,%ecx
mov    $0x40,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
or     %ecx,%eax
mov    -0x1c(%rbp),%esi
xor    %ecx,%ecx
mov    $0x10,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
or     %ecx,%eax
mov    -0x24(%rbp),%esi
xor    %ecx,%ecx
mov    $0x4,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x28(%rbp),%ecx
call   1040 <exec_shll@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x28(%rbp),%ecx
call   1050 <exec_shlw@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x28(%rbp),%edx
call   1030 <exec_shlb@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    119d <exec_shl+0x6d>
jmp    1257 <exec_shl+0x127>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    118c <exec_shl+0x5c>
jmp    126a <exec_shl+0x13a>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    117b <exec_shl+0x4b>
jmp    127d <exec_shl+0x14d>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    116a <exec_shl+0x3a>
jmp    1290 <exec_shl+0x160>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1159 <exec_shl+0x29>
jmp    12a3 <exec_shl+0x173>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1148 <exec_shl+0x18>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exec_shl>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %edx,%r15d
mov    %esi,%r12d
mov    %edi,%r14d
mov    $0x1,%al
nopl   0x0(%rax)
mov    %eax,0x8(%rsp)
not    %al
movzbl %al,%eax
and    $0x1,%eax
shl    $0xb,%eax
mov    %eax,0xc(%rsp)
mov    $0x1,%al
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,0x10(%rsp)
not    %al
movzbl %al,%eax
and    $0x1,%eax
shl    $0x7,%eax
or     0xc(%rsp),%eax
mov    %eax,0x14(%rsp)
mov    $0x1,%r13b
nopw   0x0(%rax,%rax,1)
mov    %r13d,%eax
not    %al
movzbl %al,%ebp
and    $0x1,%ebp
shl    $0x6,%ebp
or     0x14(%rsp),%ebp
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
call   1040 <exec_shll@plt>
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
call   1050 <exec_shlw@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebp,%edx
call   1030 <exec_shlb@plt>
mov    %ebp,%ebx
or     $0x4,%ebx
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
call   1040 <exec_shll@plt>
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
call   1050 <exec_shlw@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebx,%edx
call   1030 <exec_shlb@plt>
mov    %ebp,%ebx
or     $0x1,%ebx
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
call   1040 <exec_shll@plt>
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
call   1050 <exec_shlw@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebx,%edx
call   1030 <exec_shlb@plt>
mov    %ebp,%ebx
or     $0x5,%ebx
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
call   1040 <exec_shll@plt>
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
call   1050 <exec_shlw@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebx,%edx
call   1030 <exec_shlb@plt>
mov    %ebp,%ebx
or     $0x10,%ebx
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
call   1040 <exec_shll@plt>
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
call   1050 <exec_shlw@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebx,%edx
call   1030 <exec_shlb@plt>
mov    %ebp,%ebx
or     $0x14,%ebx
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
call   1040 <exec_shll@plt>
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
call   1050 <exec_shlw@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebx,%edx
call   1030 <exec_shlb@plt>
mov    %ebp,%ebx
or     $0x11,%ebx
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
call   1040 <exec_shll@plt>
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
call   1050 <exec_shlw@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebx,%edx
call   1030 <exec_shlb@plt>
or     $0x15,%ebp
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
call   1040 <exec_shll@plt>
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
call   1050 <exec_shlw@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebp,%edx
call   1030 <exec_shlb@plt>
test   $0x1,%r13b
mov    $0x0,%r13d
jne    1190 <exec_shl+0x60>
testb  $0x1,0x10(%rsp)
mov    $0x0,%eax
jne    1170 <exec_shl+0x40>
testb  $0x1,0x8(%rsp)
mov    $0x0,%eax
jne    1150 <exec_shl+0x20>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @exec_shl(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %14
14: ; preds = %101, %3
%15 = load i32, i32* %7
%16 = icmp slt i32 %15, 2
br i1 %16, label %17, label %104
17: ; preds = %14
store i32 0, i32* %8
br label %18
18: ; preds = %97, %17
%19 = load i32, i32* %8
%20 = icmp slt i32 %19, 2
br i1 %20, label %21, label %100
21: ; preds = %18
store i32 0, i32* %9
br label %22
22: ; preds = %93, %21
%23 = load i32, i32* %9
%24 = icmp slt i32 %23, 2
br i1 %24, label %25, label %96
25: ; preds = %22
store i32 0, i32* %10
br label %26
26: ; preds = %89, %25
%27 = load i32, i32* %10
%28 = icmp slt i32 %27, 2
br i1 %28, label %29, label %92
29: ; preds = %26
store i32 0, i32* %11
br label %30
30: ; preds = %85, %29
%31 = load i32, i32* %11
%32 = icmp slt i32 %31, 2
br i1 %32, label %33, label %88
33: ; preds = %30
store i32 0, i32* %12
br label %34
34: ; preds = %81, %33
%35 = load i32, i32* %12
%36 = icmp slt i32 %35, 2
br i1 %36, label %37, label %84
37: ; preds = %34
%38 = load i32, i32* %7
%39 = icmp ne i32 %38, 0
%40 = zext i1 %39 to i64
%41 = select i1 %39, i32 2048, i32 0
%42 = load i32, i32* %8
%43 = icmp ne i32 %42, 0
%44 = zext i1 %43 to i64
%45 = select i1 %43, i32 128, i32 0
%46 = or i32 %41, %45
%47 = load i32, i32* %9
%48 = icmp ne i32 %47, 0
%49 = zext i1 %48 to i64
%50 = select i1 %48, i32 64, i32 0
%51 = or i32 %46, %50
%52 = load i32, i32* %10
%53 = icmp ne i32 %52, 0
%54 = zext i1 %53 to i64
%55 = select i1 %53, i32 16, i32 0
%56 = or i32 %51, %55
%57 = load i32, i32* %11
%58 = icmp ne i32 %57, 0
%59 = zext i1 %58 to i64
%60 = select i1 %58, i32 1, i32 0
%61 = or i32 %56, %60
%62 = load i32, i32* %12
%63 = icmp ne i32 %62, 0
%64 = zext i1 %63 to i64
%65 = select i1 %63, i32 4, i32 0
%66 = or i32 %61, %65
store i32 %66, i32* %13
%67 = load i32, i32* %4
%68 = load i32, i32* %5
%69 = load i32, i32* %6
%70 = load i32, i32* %13
%71 = call i32 @exec_shll(i32 %67, i32 %68, i32 %69, i32 %70)
%72 = load i32, i32* %4
%73 = load i32, i32* %5
%74 = load i32, i32* %6
%75 = load i32, i32* %13
%76 = call i32 @exec_shlw(i32 %72, i32 %73, i32 %74, i32 %75)
%77 = load i32, i32* %5
%78 = load i32, i32* %6
%79 = load i32, i32* %13
%80 = call i32 @exec_shlb(i32 %77, i32 %78, i32 %79)
br label %81
81: ; preds = %37
%82 = load i32, i32* %12
%83 = add nsw i32 %82, 1
store i32 %83, i32* %12
br label %34
84: ; preds = %34
br label %85
85: ; preds = %84
%86 = load i32, i32* %11
%87 = add nsw i32 %86, 1
store i32 %87, i32* %11
br label %30
88: ; preds = %30
br label %89
89: ; preds = %88
%90 = load i32, i32* %10
%91 = add nsw i32 %90, 1
store i32 %91, i32* %10
br label %26
92: ; preds = %26
br label %93
93: ; preds = %92
%94 = load i32, i32* %9
%95 = add nsw i32 %94, 1
store i32 %95, i32* %9
br label %22
96: ; preds = %22
br label %97
97: ; preds = %96
%98 = load i32, i32* %8
%99 = add nsw i32 %98, 1
store i32 %99, i32* %8
br label %18
100: ; preds = %18
br label %101
101: ; preds = %100
%102 = load i32, i32* %7
%103 = add nsw i32 %102, 1
store i32 %103, i32* %7
br label %14
104: ; preds = %14
ret void
}

LLVM IR (-O2):
define void @exec_shl(i32 %0, i32 %1, i32 %2) {
br label %4
4: ; preds = %3, %47
%5 = phi i1 [ true, %3 ], [ false, %47 ]
%6 = select i1 %5, i32 0, i32 2048
br label %7
7: ; preds = %4, %46
%8 = phi i1 [ true, %4 ], [ false, %46 ]
%9 = select i1 %8, i32 0, i32 128
%10 = or i32 %9, %6
br label %11
11: ; preds = %7, %11
%12 = phi i1 [ true, %7 ], [ false, %11 ]
%13 = select i1 %12, i32 0, i32 64
%14 = or i32 %10, %13
%15 = tail call i32 @exec_shll(i32 %0, i32 %1, i32 %2, i32 %14)
%16 = tail call i32 @exec_shlw(i32 %0, i32 %1, i32 %2, i32 %14)
%17 = tail call i32 @exec_shlb(i32 %1, i32 %2, i32 %14)
%18 = or i32 %14, 4
%19 = tail call i32 @exec_shll(i32 %0, i32 %1, i32 %2, i32 %18)
%20 = tail call i32 @exec_shlw(i32 %0, i32 %1, i32 %2, i32 %18)
%21 = tail call i32 @exec_shlb(i32 %1, i32 %2, i32 %18)
%22 = or i32 %14, 1
%23 = tail call i32 @exec_shll(i32 %0, i32 %1, i32 %2, i32 %22)
%24 = tail call i32 @exec_shlw(i32 %0, i32 %1, i32 %2, i32 %22)
%25 = tail call i32 @exec_shlb(i32 %1, i32 %2, i32 %22)
%26 = or i32 %14, 5
%27 = tail call i32 @exec_shll(i32 %0, i32 %1, i32 %2, i32 %26)
%28 = tail call i32 @exec_shlw(i32 %0, i32 %1, i32 %2, i32 %26)
%29 = tail call i32 @exec_shlb(i32 %1, i32 %2, i32 %26)
%30 = or i32 %14, 16
%31 = tail call i32 @exec_shll(i32 %0, i32 %1, i32 %2, i32 %30)
%32 = tail call i32 @exec_shlw(i32 %0, i32 %1, i32 %2, i32 %30)
%33 = tail call i32 @exec_shlb(i32 %1, i32 %2, i32 %30)
%34 = or i32 %14, 20
%35 = tail call i32 @exec_shll(i32 %0, i32 %1, i32 %2, i32 %34)
%36 = tail call i32 @exec_shlw(i32 %0, i32 %1, i32 %2, i32 %34)
%37 = tail call i32 @exec_shlb(i32 %1, i32 %2, i32 %34)
%38 = or i32 %14, 17
%39 = tail call i32 @exec_shll(i32 %0, i32 %1, i32 %2, i32 %38)
%40 = tail call i32 @exec_shlw(i32 %0, i32 %1, i32 %2, i32 %38)
%41 = tail call i32 @exec_shlb(i32 %1, i32 %2, i32 %38)
%42 = or i32 %14, 21
%43 = tail call i32 @exec_shll(i32 %0, i32 %1, i32 %2, i32 %42)
%44 = tail call i32 @exec_shlw(i32 %0, i32 %1, i32 %2, i32 %42)
%45 = tail call i32 @exec_shlb(i32 %1, i32 %2, i32 %42)
br i1 %12, label %11, label %46
46: ; preds = %11
br i1 %8, label %7, label %47
47: ; preds = %46
br i1 %5, label %4, label %48
48: ; preds = %47
ret void
}