#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 /*<<< orphan*/ die(char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  printf("/* Automatically generated by gen_art_config.c */\n"
         "\n"
         "#define ART_SIZEOF_CHAR %d\n"
         "#define ART_SIZEOF_SHORT %d\n"
         "#define ART_SIZEOF_INT %d\n"
         "#define ART_SIZEOF_LONG %d\n"
         "\n",
         sizeof(char), sizeof(short), sizeof(int), sizeof(long));
  if (sizeof(char) == 1)
    printf("typedef unsigned char art_u8;\n");
  else
    die("sizeof(char) != 1");
  if (sizeof(short) == 2)
    printf("typedef unsigned short art_u16;\n");
  else
    die("sizeof(short) != 2");
  if (sizeof(int) == 4)
    printf("typedef unsigned int art_u32;\n");
  else if (sizeof(long) == 4)
    printf("typedef unsigned long art_u32;\n");
  else
    die("sizeof(int) != 4 and sizeof(long) != 4");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x4,%ecx
mov    $0x8,%r8d
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x4,%ecx
mov    $0x8,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf56(%rip),%rdi
call   1030 <puts@plt>
lea    0xf68(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7c(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [161 x i8] c"/* Automatically generated by gen_art_config.c */\0A\0A#define ART_SIZEOF_CHAR %d\0A#define ART_SIZEOF_SHORT %d\0A#define ART_SIZEOF_INT %d\0A#define ART_SIZEOF_LONG %d\0A\0A\00"
@.str.1 = [31 x i8] c"typedef unsigned char art_u8;\0A\00"
@.str.2 = [33 x i8] c"typedef unsigned short art_u16;\0A\00"
@.str.3 = [31 x i8] c"typedef unsigned int art_u32;\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str, i64 0, i64 0), i64 1, i64 2, i64 4, i64 8)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [161 x i8] c"/* Automatically generated by gen_art_config.c */\0A\0A#define ART_SIZEOF_CHAR %d\0A#define ART_SIZEOF_SHORT %d\0A#define ART_SIZEOF_INT %d\0A#define ART_SIZEOF_LONG %d\0A\0A\00"
@str = [30 x i8] c"typedef unsigned char art_u8;\00"
@str.4 = [32 x i8] c"typedef unsigned short art_u16;\00"
@str.5 = [30 x i8] c"typedef unsigned int art_u32;\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([161 x i8], [161 x i8]* @.str, i64 0, i64 0), i64 1, i64 2, i64 4, i64 8)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.4, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}