#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*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  long long int target;
  int powNum;
  target = 1;
  scanf("%d", &powNum);
  if (1 <= powNum && powNum <= 32) {
    printf("2^%d = %lld\n", powNum, target << powNum);
  } else {
    printf("Input data must be in the range from 1 to 32.\n");
    exit(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
lea    0xeb2(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x1,%eax
cmp    -0x14(%rbp),%eax
jg     1191 <main+0x61>
cmpl   $0x20,-0x14(%rbp)
jg     1191 <main+0x61>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
shl    %cl,%rdx
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a9 <main+0x79>
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%ecx
lea    -0x1(%rcx),%eax
cmp    $0x1f,%eax
ja     117a <main+0x3a>
mov    $0x1,%edx
shl    %cl,%rdx
lea    0xe96(%rip),%rdi
mov    %ecx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xe8f(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [13 x i8] c"2^%d = %lld\0A\00"
@.str.2 = [47 x i8] c"Input data must be in the range from 1 to 32.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32
store i32 0, i32* %1
store i64 1, i64* %2
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = load i32, i32* %3
%6 = icmp sle i32 1, %5
br i1 %6, label %7, label %17
7: ; preds = %0
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 32
br i1 %9, label %10, label %17
10: ; preds = %7
%11 = load i32, i32* %3
%12 = load i64, i64* %2
%13 = load i32, i32* %3
%14 = zext i32 %13 to i64
%15 = shl i64 %12, %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %11, i64 %15)
br label %20
17: ; preds = %7, %0
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
%19 = call i32 @exit(i32 1)
unreachable
20: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [13 x i8] c"2^%d = %lld\0A\00"
@str = [46 x i8] c"Input data must be in the range from 1 to 32.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = add i32 %4, -1
%6 = icmp ult i32 %5, 32
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = zext i32 %4 to i64
%9 = shl nuw nsw i64 1, %8
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %4, i64 %9)
ret i32 0
11: ; preds = %0
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%13 = call i32 @exit(i32 1)
unreachable
}