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

/* Variables and functions */
int CHAR_BIT;
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  const unsigned long long bits = sizeof(off_t) * CHAR_BIT;
  const unsigned long long shift_bits = bits - 1;
  const unsigned long long off_max = 1LL << shift_bits;
  (void)printf("  type Offset_t is range -%llu .. %llu;\n", off_max - 1,
               off_max - 1);
  (void)printf("  for Offset_t'Size use %llu;\n", bits);
  (void)printf("  pragma Convention (C, Offset_t);\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
sub    $0x1,%rsi
mov    -0x20(%rbp),%rdx
sub    $0x1,%rdx
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2eb8(%rip),%rax
movslq (%rax),%rbx
shl    $0x2,%rbx
lea    -0x1(%rbx),%ecx
mov    $0xffffffffffffffff,%rdx
shl    %cl,%rdx
not    %rdx
lea    0xeba(%rip),%rdi
mov    %rdx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@CHAR_BIT = global i32 0
@.str = [41 x i8] c" type Offset_t is range -%llu .. %llu;\0A\00"
@.str.1 = [31 x i8] c" for Offset_t'Size use %llu;\0A\00"
@.str.2 = [36 x i8] c" pragma Convention (C, Offset_t);\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
%5 = load i32, i32* @CHAR_BIT
%6 = sext i32 %5 to i64
%7 = mul i64 4, %6
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = sub i64 %8, 1
store i64 %9, i64* %3
%10 = load i64, i64* %3
%11 = shl i64 1, %10
store i64 %11, i64* %4
%12 = load i64, i64* %4
%13 = sub i64 %12, 1
%14 = load i64, i64* %4
%15 = sub i64 %14, 1
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 %13, i64 %15)
%17 = load i64, i64* %2
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i64 %17)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
@.str = [41 x i8] c" type Offset_t is range -%llu .. %llu;\0A\00"
@.str.1 = [31 x i8] c" for Offset_t'Size use %llu;\0A\00"
@str = [35 x i8] c" pragma Convention (C, Offset_t);\00"
define i32 @main() {
%1 = load i32, i32* @CHAR_BIT
%2 = sext i32 %1 to i64
%3 = shl nsw i64 %2, 2
%4 = add nsw i64 %3, -1
%5 = shl nsw i64 -1, %4
%6 = xor i64 %5, -1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 %6, i64 %6)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i64 %3)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 0
}