#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 mode_t;

/* Variables and functions */
unsigned int CHAR_BIT;
int S_IRGRP;
int S_IROTH;
int S_IRUSR;
int S_ISGID;
int S_ISUID;
int S_ISVTX;
int S_IWGRP;
int S_IWOTH;
int S_IWUSR;
int S_IXGRP;
int S_IXOTH;
int S_IXUSR;
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  const mode_t mode_max = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP |
                          S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH | S_ISUID |
                          S_ISGID | S_ISVTX;
  (void)printf("  type Mode_Integer_t is mod 8#%o# + 1;\n", mode_max);
  (void)printf("  for Mode_Integer_t'Size use %u;\n",
               (unsigned int)sizeof(mode_t) * CHAR_BIT);
  (void)printf("  pragma Convention (C, Mode_Integer_t);\n");
  return 0;
}


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    0x2e5b(%rip),%rax
mov    (%rax),%eax
mov    0x2e8a(%rip),%rcx
or     (%rcx),%eax
mov    0x2e99(%rip),%rcx
or     (%rcx),%eax
mov    0x2e50(%rip),%rcx
or     (%rcx),%eax
mov    0x2e77(%rip),%rcx
or     (%rcx),%eax
mov    0x2e5e(%rip),%rcx
or     (%rcx),%eax
mov    0x2e2d(%rip),%rcx
or     (%rcx),%eax
mov    0x2e0c(%rip),%rcx
or     (%rcx),%eax
mov    0x2e6b(%rip),%rcx
or     (%rcx),%eax
mov    0x2e52(%rip),%rcx
or     (%rcx),%eax
mov    0x2e19(%rip),%rcx
or     (%rcx),%eax
mov    0x2e58(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dfb(%rip),%rax
mov    (%rax),%esi
shl    $0x2,%esi
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2e60(%rip),%rax
mov    0x2e91(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2e9e(%rip),%rax
or     (%rax),%esi
mov    0x2e55(%rip),%rax
or     (%rax),%esi
mov    0x2e7c(%rip),%rax
or     (%rax),%esi
mov    0x2e63(%rip),%rax
or     (%rax),%esi
mov    0x2e32(%rip),%rax
or     (%rax),%esi
mov    0x2e11(%rip),%rax
or     (%rax),%esi
mov    0x2e70(%rip),%rax
or     (%rax),%esi
mov    0x2e57(%rip),%rax
or     (%rax),%esi
mov    0x2e1e(%rip),%rax
or     (%rax),%esi
mov    0x2e5d(%rip),%rax
or     (%rax),%esi
lea    0xe6c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e06(%rip),%rax
mov    (%rax),%esi
shl    $0x2,%esi
lea    0xe7b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe90(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IXUSR = global i32 0
@S_IRGRP = global i32 0
@S_IWGRP = global i32 0
@S_IXGRP = global i32 0
@S_IROTH = global i32 0
@S_IWOTH = global i32 0
@S_IXOTH = global i32 0
@S_ISUID = global i32 0
@S_ISGID = global i32 0
@S_ISVTX = global i32 0
@.str = [41 x i8] c" type Mode_Integer_t is mod 8#%o# + 1;\0A\00"
@.str.1 = [35 x i8] c" for Mode_Integer_t'Size use %u;\0A\00"
@CHAR_BIT = global i32 0
@.str.2 = [42 x i8] c" pragma Convention (C, Mode_Integer_t);\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @S_IRUSR
%8 = load i32, i32* @S_IWUSR
%9 = or i32 %7, %8
%10 = load i32, i32* @S_IXUSR
%11 = or i32 %9, %10
%12 = load i32, i32* @S_IRGRP
%13 = or i32 %11, %12
%14 = load i32, i32* @S_IWGRP
%15 = or i32 %13, %14
%16 = load i32, i32* @S_IXGRP
%17 = or i32 %15, %16
%18 = load i32, i32* @S_IROTH
%19 = or i32 %17, %18
%20 = load i32, i32* @S_IWOTH
%21 = or i32 %19, %20
%22 = load i32, i32* @S_IXOTH
%23 = or i32 %21, %22
%24 = load i32, i32* @S_ISUID
%25 = or i32 %23, %24
%26 = load i32, i32* @S_ISGID
%27 = or i32 %25, %26
%28 = load i32, i32* @S_ISVTX
%29 = or i32 %27, %28
store i32 %29, i32* %6
%30 = load i32, i32* %6
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %30)
%32 = load i32, i32* @CHAR_BIT
%33 = mul i32 4, %32
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %33)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IXUSR = global i32 0
@S_IRGRP = global i32 0
@S_IWGRP = global i32 0
@S_IXGRP = global i32 0
@S_IROTH = global i32 0
@S_IWOTH = global i32 0
@S_IXOTH = global i32 0
@S_ISUID = global i32 0
@S_ISGID = global i32 0
@S_ISVTX = global i32 0
@.str = [41 x i8] c" type Mode_Integer_t is mod 8#%o# + 1;\0A\00"
@.str.1 = [35 x i8] c" for Mode_Integer_t'Size use %u;\0A\00"
@CHAR_BIT = global i32 0
@str = [41 x i8] c" pragma Convention (C, Mode_Integer_t);\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @S_IRUSR
%4 = load i32, i32* @S_IWUSR
%5 = or i32 %4, %3
%6 = load i32, i32* @S_IXUSR
%7 = or i32 %5, %6
%8 = load i32, i32* @S_IRGRP
%9 = or i32 %7, %8
%10 = load i32, i32* @S_IWGRP
%11 = or i32 %9, %10
%12 = load i32, i32* @S_IXGRP
%13 = or i32 %11, %12
%14 = load i32, i32* @S_IROTH
%15 = or i32 %13, %14
%16 = load i32, i32* @S_IWOTH
%17 = or i32 %15, %16
%18 = load i32, i32* @S_IXOTH
%19 = or i32 %17, %18
%20 = load i32, i32* @S_ISUID
%21 = or i32 %19, %20
%22 = load i32, i32* @S_ISGID
%23 = or i32 %21, %22
%24 = load i32, i32* @S_ISVTX
%25 = or i32 %23, %24
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = load i32, i32* @CHAR_BIT
%28 = shl i32 %27, 2
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %28)
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret i32 0
}