#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 */
struct utsname {
  char *machine;
};
typedef int /*<<< orphan*/ __u8;
typedef int /*<<< orphan*/ __u64;
typedef int /*<<< orphan*/ __u32;
typedef int /*<<< orphan*/ __u16;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ uname(struct utsname *);
int main(int argc, char **argv) {
  struct utsname name;
  uname(&name);
  printf("arch   Size:  char  short  int  long   ptr long-long "
         " u8 u16 u32 u64\n");
  printf("%-12s  %3i   %3i   %3i   %3i   %3i   %3i      "
         "%3i %3i %3i %3i\n",
         name.machine, (int)sizeof(char), (int)sizeof(short), (int)sizeof(int),
         (int)sizeof(long), (int)sizeof(void *), (int)sizeof(long long),
         (int)sizeof(__u8), (int)sizeof(__u16), (int)sizeof(__u32),
         (int)sizeof(__u64));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
call   1040 <uname@plt>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xeee(%rip),%rdi
mov    $0x1,%edx
mov    $0x2,%ecx
mov    $0x4,%r8d
mov    $0x8,%r9d
movl   $0x8,(%rsp)
movl   $0x8,0x8(%rsp)
movl   $0x4,0x10(%rsp)
movl   $0x4,0x18(%rsp)
movl   $0x4,0x20(%rsp)
movl   $0x4,0x28(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsp,%rdi
call   1050 <uname@plt>
lea    0xeff(%rip),%rdi
call   1030 <puts@plt>
mov    (%rsp),%rsi
lea    0xeb0(%rip),%rdi
mov    $0x1,%edx
mov    $0x2,%ecx
mov    $0x4,%r8d
mov    $0x8,%r9d
xor    %eax,%eax
push   $0x4
push   $0x4
push   $0x4
push   $0x4
push   $0x8
push   $0x8
call   1040 <printf@plt>
add    $0x30,%rsp
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.utsname = type { i8* }
@.str = [70 x i8] c"arch Size: char short int long ptr long-long u8 u16 u32 u64\0A\00"
@.str.1 = [63 x i8] c"%-12s %3i %3i %3i %3i %3i %3i %3i %3i %3i %3i\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.utsname
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @uname(%struct.utsname* %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
%9 = getelementptr inbounds %struct.utsname, %struct.utsname* %6, i32 0, i32 0
%10 = load i8*, i8** %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), i8* %10, i32 1, i32 2, i32 4, i32 8, i32 8, i32 8, i32 4, i32 4, i32 4, i32 4)
ret i32 0
}

LLVM IR (-O2):
%struct.utsname = type { i8* }
@.str.1 = [63 x i8] c"%-12s %3i %3i %3i %3i %3i %3i %3i %3i %3i %3i\0A\00"
@str = [69 x i8] c"arch Size: char short int long ptr long-long u8 u16 u32 u64\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.utsname
%4 = bitcast %struct.utsname* %3 to i8*
%5 = call i32 @uname(%struct.utsname* %3)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str, i64 0, i64 0))
%7 = getelementptr inbounds %struct.utsname, %struct.utsname* %3, i64 0, i32 0
%8 = load i8*, i8** %7
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), i8* %8, i32 1, i32 2, i32 4, i32 8, i32 8, i32 8, i32 4, i32 4, i32 4, i32 4)
ret i32 0
}