#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*/ putbit0();
int /*<<< orphan*/ putbit1();
void output2(int x, int y) {
  int mask;
  putbit0();
  mask = (1 << 11);
  while (mask >>= 1) {
    if (x & mask)
      putbit1();
    else
      putbit0();
  }
  mask = (1 << 4);
  while (mask >>= 1) {
    if (y & mask)
      putbit1();
    else
      putbit0();
  }
}


x86 assembly (clang, -O0):
<output2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <putbit0@plt>
movl   $0x800,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1175 <output2+0x55>
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
cmp    $0x0,%eax
je     1169 <output2+0x49>
mov    $0x0,%al
call   1030 <putbit1@plt>
jmp    1170 <output2+0x50>
mov    $0x0,%al
call   1040 <putbit0@plt>
jmp    113c <output2+0x1c>
movl   $0x10,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     11b5 <output2+0x95>
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
cmp    $0x0,%eax
je     11a9 <output2+0x89>
mov    $0x0,%al
call   1030 <putbit1@plt>
jmp    11b0 <output2+0x90>
mov    $0x0,%al
call   1040 <putbit0@plt>
jmp    117c <output2+0x5c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output2>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <putbit0@plt>
xor    %eax,%eax
test   $0x400,%ebp
jne    113f <output2+0x1f>
call   1040 <putbit0@plt>
jmp    1144 <output2+0x24>
call   1030 <putbit1@plt>
xor    %eax,%eax
test   $0x200,%ebp
jne    1155 <output2+0x35>
call   1040 <putbit0@plt>
jmp    115a <output2+0x3a>
call   1030 <putbit1@plt>
xor    %eax,%eax
test   $0x100,%ebp
jne    116b <output2+0x4b>
call   1040 <putbit0@plt>
jmp    1170 <output2+0x50>
call   1030 <putbit1@plt>
xor    %eax,%eax
test   $0x80,%bpl
jne    117f <output2+0x5f>
call   1040 <putbit0@plt>
jmp    1184 <output2+0x64>
call   1030 <putbit1@plt>
xor    %eax,%eax
test   $0x40,%bpl
jne    1193 <output2+0x73>
call   1040 <putbit0@plt>
jmp    1198 <output2+0x78>
call   1030 <putbit1@plt>
xor    %eax,%eax
test   $0x20,%bpl
jne    11a7 <output2+0x87>
call   1040 <putbit0@plt>
jmp    11ac <output2+0x8c>
call   1030 <putbit1@plt>
xor    %eax,%eax
test   $0x10,%bpl
jne    11bb <output2+0x9b>
call   1040 <putbit0@plt>
jmp    11c0 <output2+0xa0>
call   1030 <putbit1@plt>
xor    %eax,%eax
test   $0x8,%bpl
jne    11cf <output2+0xaf>
call   1040 <putbit0@plt>
jmp    11d4 <output2+0xb4>
call   1030 <putbit1@plt>
xor    %eax,%eax
test   $0x4,%bpl
jne    11e3 <output2+0xc3>
call   1040 <putbit0@plt>
jmp    11e8 <output2+0xc8>
call   1030 <putbit1@plt>
xor    %eax,%eax
test   $0x2,%bpl
jne    11f7 <output2+0xd7>
call   1040 <putbit0@plt>
jmp    11fc <output2+0xdc>
call   1030 <putbit1@plt>
xor    %eax,%eax
test   $0x1,%bpl
jne    120b <output2+0xeb>
call   1040 <putbit0@plt>
jmp    1210 <output2+0xf0>
call   1030 <putbit1@plt>
xor    %eax,%eax
test   $0x8,%bl
jne    121e <output2+0xfe>
call   1040 <putbit0@plt>
jmp    1223 <output2+0x103>
call   1030 <putbit1@plt>
xor    %eax,%eax
test   $0x4,%bl
jne    1231 <output2+0x111>
call   1040 <putbit0@plt>
jmp    1236 <output2+0x116>
call   1030 <putbit1@plt>
xor    %eax,%eax
test   $0x2,%bl
jne    1244 <output2+0x124>
call   1040 <putbit0@plt>
jmp    1249 <output2+0x129>
call   1030 <putbit1@plt>
xor    %eax,%eax
add    $0x8,%rsp
test   $0x1,%bl
jne    125b <output2+0x13b>
pop    %rbx
pop    %rbp
jmp    1040 <putbit0@plt>
pop    %rbx
pop    %rbp
jmp    1030 <putbit1@plt>

LLVM IR (-O0):
define void @output2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 (...) @putbit0()
store i32 2048, i32* %5
br label %7
7: ; preds = %20, %2
%8 = load i32, i32* %5
%9 = ashr i32 %8, 1
store i32 %9, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i32, i32* %3
%13 = load i32, i32* %5
%14 = and i32 %12, %13
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = call i32 (...) @putbit1()
br label %20
18: ; preds = %11
%19 = call i32 (...) @putbit0()
br label %20
20: ; preds = %18, %16
br label %7
21: ; preds = %7
store i32 16, i32* %5
br label %22
22: ; preds = %35, %21
%23 = load i32, i32* %5
%24 = ashr i32 %23, 1
store i32 %24, i32* %5
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %36
26: ; preds = %22
%27 = load i32, i32* %4
%28 = load i32, i32* %5
%29 = and i32 %27, %28
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %26
%32 = call i32 (...) @putbit1()
br label %35
33: ; preds = %26
%34 = call i32 (...) @putbit0()
br label %35
35: ; preds = %33, %31
br label %22
36: ; preds = %22
ret void
}

LLVM IR (-O2):
define void @output2(i32 %0, i32 %1) {
%3 = tail call i32 (...) @putbit0()
%4 = and i32 %0, 1024
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @putbit1()
br label %10
8: ; preds = %2
%9 = tail call i32 (...) @putbit0()
br label %10
10: ; preds = %8, %6
%11 = and i32 %0, 512
%12 = icmp eq i32 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @putbit1()
br label %17
15: ; preds = %10
%16 = tail call i32 (...) @putbit0()
br label %17
17: ; preds = %15, %13
%18 = and i32 %0, 256
%19 = icmp eq i32 %18, 0
br i1 %19, label %22, label %20
20: ; preds = %17
%21 = tail call i32 (...) @putbit1()
br label %24
22: ; preds = %17
%23 = tail call i32 (...) @putbit0()
br label %24
24: ; preds = %22, %20
%25 = and i32 %0, 128
%26 = icmp eq i32 %25, 0
br i1 %26, label %29, label %27
27: ; preds = %24
%28 = tail call i32 (...) @putbit1()
br label %31
29: ; preds = %24
%30 = tail call i32 (...) @putbit0()
br label %31
31: ; preds = %29, %27
%32 = and i32 %0, 64
%33 = icmp eq i32 %32, 0
br i1 %33, label %36, label %34
34: ; preds = %31
%35 = tail call i32 (...) @putbit1()
br label %38
36: ; preds = %31
%37 = tail call i32 (...) @putbit0()
br label %38
38: ; preds = %36, %34
%39 = and i32 %0, 32
%40 = icmp eq i32 %39, 0
br i1 %40, label %43, label %41
41: ; preds = %38
%42 = tail call i32 (...) @putbit1()
br label %45
43: ; preds = %38
%44 = tail call i32 (...) @putbit0()
br label %45
45: ; preds = %43, %41
%46 = and i32 %0, 16
%47 = icmp eq i32 %46, 0
br i1 %47, label %50, label %48
48: ; preds = %45
%49 = tail call i32 (...) @putbit1()
br label %52
50: ; preds = %45
%51 = tail call i32 (...) @putbit0()
br label %52
52: ; preds = %50, %48
%53 = and i32 %0, 8
%54 = icmp eq i32 %53, 0
br i1 %54, label %57, label %55
55: ; preds = %52
%56 = tail call i32 (...) @putbit1()
br label %59
57: ; preds = %52
%58 = tail call i32 (...) @putbit0()
br label %59
59: ; preds = %57, %55
%60 = and i32 %0, 4
%61 = icmp eq i32 %60, 0
br i1 %61, label %64, label %62
62: ; preds = %59
%63 = tail call i32 (...) @putbit1()
br label %66
64: ; preds = %59
%65 = tail call i32 (...) @putbit0()
br label %66
66: ; preds = %64, %62
%67 = and i32 %0, 2
%68 = icmp eq i32 %67, 0
br i1 %68, label %71, label %69
69: ; preds = %66
%70 = tail call i32 (...) @putbit1()
br label %73
71: ; preds = %66
%72 = tail call i32 (...) @putbit0()
br label %73
73: ; preds = %71, %69
%74 = and i32 %0, 1
%75 = icmp eq i32 %74, 0
br i1 %75, label %78, label %76
76: ; preds = %73
%77 = tail call i32 (...) @putbit1()
br label %80
78: ; preds = %73
%79 = tail call i32 (...) @putbit0()
br label %80
80: ; preds = %78, %76
%81 = and i32 %1, 8
%82 = icmp eq i32 %81, 0
br i1 %82, label %85, label %83
83: ; preds = %80
%84 = tail call i32 (...) @putbit1()
br label %87
85: ; preds = %80
%86 = tail call i32 (...) @putbit0()
br label %87
87: ; preds = %85, %83
%88 = and i32 %1, 4
%89 = icmp eq i32 %88, 0
br i1 %89, label %92, label %90
90: ; preds = %87
%91 = tail call i32 (...) @putbit1()
br label %94
92: ; preds = %87
%93 = tail call i32 (...) @putbit0()
br label %94
94: ; preds = %92, %90
%95 = and i32 %1, 2
%96 = icmp eq i32 %95, 0
br i1 %96, label %99, label %97
97: ; preds = %94
%98 = tail call i32 (...) @putbit1()
br label %101
99: ; preds = %94
%100 = tail call i32 (...) @putbit0()
br label %101
101: ; preds = %99, %97
%102 = and i32 %1, 1
%103 = icmp eq i32 %102, 0
br i1 %103, label %106, label %104
104: ; preds = %101
%105 = tail call i32 (...) @putbit1()
br label %108
106: ; preds = %101
%107 = tail call i32 (...) @putbit0()
br label %108
108: ; preds = %106, %104
ret void
}