#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 pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  long int iMax32 = pow(2, (32 - 1)) - 1;
  long int iMax16 = pow(2, (16 - 1)) - 1;
  if ((iMax32 + 1) > iMax32)
    printf("os 64 bits (%ld, %ld)\n", iMax32, iMax32 + 1);
  else if ((iMax16 + 1) > iMax16)
    printf("os 32 bits (%ld, %ld)\n", iMax16, iMax16 + 1);
  else
    printf("os 16 bits\n");
}


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
mov    $0x1f,%esi
call   1040 <pow@plt>
sub    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    $0x2,%edi
mov    $0xf,%esi
call   1040 <pow@plt>
sub    $0x1,%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
cmp    -0x18(%rbp),%rax
jle    1197 <main+0x77>
mov    -0x18(%rbp),%rsi
mov    -0x18(%rbp),%rdx
add    $0x1,%rdx
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11db <main+0xbb>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
cmp    -0x20(%rbp),%rax
jle    11c8 <main+0xa8>
mov    -0x20(%rbp),%rsi
mov    -0x20(%rbp),%rdx
add    $0x1,%rdx
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d6 <main+0xb6>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11db <main+0xbb>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x2,%edi
mov    $0x1f,%esi
call   1040 <pow@plt>
movslq %eax,%rbx
lea    -0x1(%rbx),%r14
mov    $0x2,%edi
mov    $0xf,%esi
call   1040 <pow@plt>
lea    0xeb0(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [23 x i8] c"os 64 bits (%ld, %ld)\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @pow(i32 2, i32 31)
%4 = add nsw i32 %3, -1
%5 = sext i32 %4 to i64
%6 = tail call i32 @pow(i32 2, i32 15)
%7 = add nsw i64 %5, 1
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i64 %5, i64 %7)
ret i32 0
}