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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, long);
void word_sizes(FILE *f) {
  fprintf(f, "#define MACH_SHORT_SIZE %ld\n", (long)sizeof(short));
  fprintf(f, "#define MACH_INT_SIZE %ld\n", (long)sizeof(int));
  fprintf(f, "#define MACH_LONG_SIZE %ld\n", (long)sizeof(long));
  fprintf(f, "#define MACH_FLOAT_SIZE %ld\n", (long)sizeof(float));
  fprintf(f, "#define MACH_DOUBLE_SIZE %ld\n", (long)sizeof(double));
}


x86 assembly (clang, -O0):
<word_sizes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x2,%edx
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xee1(%rip),%rsi
mov    $0x4,%edx
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xee7(%rip),%rsi
mov    $0x8,%edx
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeee(%rip),%rsi
mov    $0x4,%edx
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xef6(%rip),%rsi
mov    $0x8,%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<word_sizes>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
mov    $0x2,%edx
call   1030 <fprintf@plt>
lea    0xef1(%rip),%rsi
mov    $0x4,%edx
mov    %rbx,%rdi
call   1030 <fprintf@plt>
lea    0xef8(%rip),%rsi
mov    $0x8,%edx
mov    %rbx,%rdi
call   1030 <fprintf@plt>
lea    0xf00(%rip),%rsi
mov    $0x4,%edx
mov    %rbx,%rdi
call   1030 <fprintf@plt>
lea    0xf09(%rip),%rsi
mov    $0x8,%edx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"#define MACH_SHORT_SIZE %ld\0A\00"
@.str.1 = [27 x i8] c"#define MACH_INT_SIZE %ld\0A\00"
@.str.2 = [28 x i8] c"#define MACH_LONG_SIZE %ld\0A\00"
@.str.3 = [29 x i8] c"#define MACH_FLOAT_SIZE %ld\0A\00"
@.str.4 = [30 x i8] c"#define MACH_DOUBLE_SIZE %ld\0A\00"
define void @word_sizes(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 2)
%5 = load i32*, i32** %2
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i64 4)
%7 = load i32*, i32** %2
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i64 8)
%9 = load i32*, i32** %2
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i64 4)
%11 = load i32*, i32** %2
%12 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i64 8)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"#define MACH_SHORT_SIZE %ld\0A\00"
@.str.1 = [27 x i8] c"#define MACH_INT_SIZE %ld\0A\00"
@.str.2 = [28 x i8] c"#define MACH_LONG_SIZE %ld\0A\00"
@.str.3 = [29 x i8] c"#define MACH_FLOAT_SIZE %ld\0A\00"
@.str.4 = [30 x i8] c"#define MACH_DOUBLE_SIZE %ld\0A\00"
define void @word_sizes(i32* nocapture %0) {
%2 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 2)
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i64 4)
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i64 8)
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i64 4)
%6 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i64 8)
ret void
}