#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 CHAR_BIT;
int /*<<< orphan*/ printf(char *, ...);
void c99_types() {
  printf("    mod c99 {\n");
  printf("        type %s = %c%d;\n", "c_longlong",
         ((((long long)-1) < 0) ? 'i' : 'u'),
         (((int)sizeof(long long)) * CHAR_BIT));
  printf("        type %s = %c%d;\n", "c_ulonglong",
         ((((unsigned long long)-1) < 0) ? 'i' : 'u'),
         (((int)sizeof(unsigned long long)) * CHAR_BIT));
  printf("        type %s = %c%d;\n", "intptr_t",
         ((((intptr_t)-1) < 0) ? 'i' : 'u'),
         (((int)sizeof(intptr_t)) * CHAR_BIT));
  printf("        type %s = %c%d;\n", "uintptr_t",
         ((((uintptr_t)-1) < 0) ? 'i' : 'u'),
         (((int)sizeof(uintptr_t)) * CHAR_BIT));
  printf("    }\n");
}


x86 assembly (clang, -O0):
<c99_types>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2eb7(%rip),%rax
mov    (%rax),%ecx
shl    $0x3,%ecx
lea    0xeda(%rip),%rdi
lea    0xeec(%rip),%rsi
mov    $0x69,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%ecx
shl    $0x3,%ecx
lea    0xeb4(%rip),%rdi
lea    0xed1(%rip),%rsi
mov    $0x75,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%ecx
shl    $0x3,%ecx
lea    0xe8e(%rip),%rdi
lea    0xeb8(%rip),%rsi
mov    $0x69,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e45(%rip),%rax
mov    (%rax),%ecx
shl    $0x3,%ecx
lea    0xe68(%rip),%rdi
lea    0xe91(%rip),%rsi
mov    $0x75,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<c99_types>:
push   %r14
push   %rbx
push   %rax
lea    0xf0f(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ea9(%rip),%r14
mov    (%r14),%ecx
shl    $0x3,%ecx
lea    0xebc(%rip),%rbx
lea    0xece(%rip),%rsi
mov    %rbx,%rdi
mov    $0x69,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r14),%ecx
shl    $0x3,%ecx
lea    0xebd(%rip),%rsi
mov    %rbx,%rdi
mov    $0x75,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r14),%ecx
shl    $0x3,%ecx
lea    0xeae(%rip),%rsi
mov    %rbx,%rdi
mov    $0x69,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r14),%ecx
shl    $0x3,%ecx
lea    0xe91(%rip),%rsi
mov    %rbx,%rdi
mov    $0x75,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe93(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c" mod c99 {\0A\00"
@.str.1 = [25 x i8] c" type %s = %c%d;\0A\00"
@.str.2 = [11 x i8] c"c_longlong\00"
@CHAR_BIT = global i32 0
@.str.3 = [12 x i8] c"c_ulonglong\00"
@.str.4 = [9 x i8] c"intptr_t\00"
@.str.5 = [10 x i8] c"uintptr_t\00"
@.str.6 = [7 x i8] c" }\0A\00"
define void @c99_types() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @CHAR_BIT
%3 = mul nsw i32 8, %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 105, i32 %3)
%5 = load i32, i32* @CHAR_BIT
%6 = mul nsw i32 8, %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 117, i32 %6)
%8 = load i32, i32* @CHAR_BIT
%9 = mul nsw i32 8, %8
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 105, i32 %9)
%11 = load i32, i32* @CHAR_BIT
%12 = mul nsw i32 8, %11
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 117, i32 %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [25 x i8] c" type %s = %c%d;\0A\00"
@.str.2 = [11 x i8] c"c_longlong\00"
@CHAR_BIT = global i32 0
@.str.3 = [12 x i8] c"c_ulonglong\00"
@.str.4 = [9 x i8] c"intptr_t\00"
@.str.5 = [10 x i8] c"uintptr_t\00"
@str = [14 x i8] c" mod c99 {\00"
@str.7 = [6 x i8] c" }\00"
define void @c99_types() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @CHAR_BIT
%3 = shl nsw i32 %2, 3
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 105, i32 %3)
%5 = load i32, i32* @CHAR_BIT
%6 = shl nsw i32 %5, 3
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 117, i32 %6)
%8 = load i32, i32* @CHAR_BIT
%9 = shl nsw i32 %8, 3
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 105, i32 %9)
%11 = load i32, i32* @CHAR_BIT
%12 = shl nsw i32 %11, 3
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 117, i32 %12)
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.7, i64 0, i64 0))
ret void
}