#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 */
typedef int off_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
int main(void) {
  off_t num = (1024 * 1024 * 1024 * 2ULL);
  if (((1024 * 1024 * 1024ULL) * 2) == num) {
    printf("%ld==%ld\n", num, ((1024 * 1024 * 1024ULL) * 2));
  }
  printf("%ld\n", (1024 * 1024 * 1024ULL));
  printf("%ld\n", ((1024 * 1024 * 1024ULL) * 2));
  printf("sizeof(SOFT):%d\n", sizeof((1024 * 1024 * 1024ULL)));
  printf("sizeof(int):%d\n", sizeof(int));
  printf("sizeof(off_t):%d\n", sizeof(off_t));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x80000000,-0x8(%rbp)
movslq -0x8(%rbp),%rcx
mov    $0x80000000,%eax
cmp    %rcx,%rax
jne    114e <main+0x3e>
mov    -0x8(%rbp),%esi
lea    0xebe(%rip),%rdi
mov    $0x80000000,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
mov    $0x40000000,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9d(%rip),%rdi
mov    $0x80000000,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8d(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8a(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x40000000,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x80000000,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%ld==%ld\0A\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
@.str.2 = [17 x i8] c"sizeof(SOFT):%d\0A\00"
@.str.3 = [16 x i8] c"sizeof(int):%d\0A\00"
@.str.4 = [18 x i8] c"sizeof(off_t):%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 -2147483648, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = icmp eq i64 2147483648, %4
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %7, i64 2147483648)
br label %9
9: ; preds = %6, %0
%10 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 1073741824)
%11 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 -2147483648)
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 8)
%13 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 4)
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 4)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%ld\0A\00"
@.str.2 = [17 x i8] c"sizeof(SOFT):%d\0A\00"
@.str.3 = [16 x i8] c"sizeof(int):%d\0A\00"
@.str.4 = [18 x i8] c"sizeof(off_t):%d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 1073741824)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 -2147483648)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 8)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 4)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 4)
ret i32 0
}