#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 EXIT_SUCCESS;
unsigned int pow(int, int);
int /*<<< orphan*/ printf(char *, unsigned int, ...);
int main(void) {
  unsigned int num = 32768;
  printf("%d\n", num);
  for (int i = 0; i < 15; i++) {
    num = num >> 1;
    printf("%5d\n", num);
  }
  unsigned int number = 66880;
  unsigned int twopwr4 = pow(2, 4);
  unsigned int division = number / twopwr4;
  unsigned int right_shift = number >> 4;
  printf("\n%d\n", number);
  printf("%d  / %d = %d\n", number, 4, division);
  printf("%d >> %d = %d\n", number, 4, right_shift);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x8000,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0xf,-0xc(%rbp)
jge    1180 <main+0x60>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114e <main+0x2e>
movl   $0x10540,-0x10(%rbp)
mov    $0x2,%edi
mov    $0x4,%esi
call   1040 <pow@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
xor    %edx,%edx
divl   -0x14(%rbp)
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
shr    $0x4,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
mov    -0x18(%rbp),%ecx
lea    0xe3f(%rip),%rdi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
mov    -0x1c(%rbp),%ecx
lea    0xe35(%rip),%rdi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2de9(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xede(%rip),%rdi
mov    $0x8000,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec5(%rip),%rbx
mov    %rbx,%rdi
mov    $0x4000,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2000,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1000,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x800,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x400,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x200,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x80,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x40,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x2,%edi
mov    $0x4,%esi
call   1040 <pow@plt>
mov    %eax,%ecx
mov    $0x10540,%eax
xor    %edx,%edx
div    %ecx
mov    %eax,%ebx
lea    0xdc6(%rip),%rdi
mov    $0x10540,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xdb8(%rip),%rdi
mov    $0x10540,%esi
mov    $0x4,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xdad(%rip),%rdi
mov    $0x10540,%esi
mov    $0x4,%edx
mov    $0x1054,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2d57(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [5 x i8] c"%5d\0A\00"
@.str.2 = [5 x i8] c"\0A%d\0A\00"
@.str.3 = [15 x i8] c"%d / %d = %d\0A\00"
@.str.4 = [15 x i8] c"%d >> %d = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 32768, i32* %2
%8 = load i32, i32* %2
%9 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
store i32 0, i32* %3
br label %10
10: ; preds = %18, %0
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 15
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = load i32, i32* %2
%15 = lshr i32 %14, 1
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %13
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %10
21: ; preds = %10
store i32 66880, i32* %4
%22 = call i32 @pow(i32 2, i32 4)
store i32 %22, i32* %5
%23 = load i32, i32* %4
%24 = load i32, i32* %5
%25 = udiv i32 %23, %24
store i32 %25, i32* %6
%26 = load i32, i32* %4
%27 = lshr i32 %26, 4
store i32 %27, i32* %7
%28 = load i32, i32* %4
%29 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %28)
%30 = load i32, i32* %4
%31 = load i32, i32* %6
%32 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %30, i32 4, i32 %31)
%33 = load i32, i32* %4
%34 = load i32, i32* %7
%35 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %33, i32 4, i32 %34)
%36 = load i32, i32* @EXIT_SUCCESS
ret i32 %36
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [5 x i8] c"%5d\0A\00"
@.str.2 = [5 x i8] c"\0A%d\0A\00"
@.str.3 = [15 x i8] c"%d / %d = %d\0A\00"
@.str.4 = [15 x i8] c"%d >> %d = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 32768)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 16384)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 8192)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4096)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 2048)
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 1024)
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 512)
%8 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 256)
%9 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 128)
%10 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 64)
%11 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 32)
%12 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 16)
%13 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 8)
%14 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4)
%15 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 2)
%16 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 1)
%17 = tail call i32 @pow(i32 2, i32 4)
%18 = udiv i32 66880, %17
%19 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 66880)
%20 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 66880, i32 4, i32 %18)
%21 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 66880, i32 4, i32 4180)
%22 = load i32, i32* @EXIT_SUCCESS
ret i32 %22
}