#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*/ printf(char *);
void gen_stat(void) {
  printf("   STAT_NAME  : constant String := \"stat\";\n");
  printf("   FSTAT_NAME : constant String := \"fstat\";\n");
  printf("   type Stat_Type is record\n");
  printf("      st_dev     : dev_t;\n");
  if (0) {
    printf("      pad1       : Interfaces.C.unsigned_short;\n");
  }
  printf("      st_ino     : ino_t;\n");
  printf("      st_mode    : mode_t;\n");
  printf("      st_nlink   : nlink_t;\n");
  printf("      st_uid     : uid_t;\n");
  printf("      st_gid     : gid_t;\n");
  printf("      st_rdev    : dev_t;\n");
  if (0) {
    printf("      pad2       : Interfaces.C.unsigned_short;\n");
  }
  printf("      st_size    : off_t;\n");
  printf("      st_blksize : blksize_t;\n");
  printf("      st_blocks  : blkcnt_t;\n");
  printf("      st_atim    : Timespec;\n");
  printf("      st_mtim    : Timespec;\n");
  printf("      st_ctim    : Timespec;\n");
  if (0) {
    printf("      pad3       : Interfaces.C.unsigned_long;\n");
    printf("      pad4       : Interfaces.C.unsigned_long;\n");
  }
  printf("   end record;\n");
  printf("   pragma Convention (C_Pass_By_Copy, Stat_Type);\n");
  printf("\n");
}


x86 assembly (clang, -O0):
<gen_stat>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
call   1030 <printf@plt>
lea    0xf26(%rip),%rdi
call   1030 <printf@plt>
lea    0xf37(%rip),%rdi
call   1030 <printf@plt>
lea    0xf46(%rip),%rdi
call   1030 <printf@plt>
lea    0xf55(%rip),%rdi
call   1030 <printf@plt>
lea    0xf65(%rip),%rdi
call   1030 <printf@plt>
lea    0xf76(%rip),%rdi
call   1030 <printf@plt>
lea    0xf85(%rip),%rdi
call   1030 <printf@plt>
lea    0xf94(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa3(%rip),%rdi
call   1030 <printf@plt>
lea    0xfb2(%rip),%rdi
call   1030 <printf@plt>
lea    0xfc5(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd7(%rip),%rdi
call   1030 <printf@plt>
lea    0xfe9(%rip),%rdi
call   1030 <printf@plt>
lea    0xffb(%rip),%rdi
call   1030 <printf@plt>
lea    0x100d(%rip),%rdi
call   1030 <printf@plt>
lea    0x1011(%rip),%rdi
call   1030 <printf@plt>
lea    0xe37(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_stat>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xef7(%rip),%rdi
call   1040 <puts@plt>
lea    0xf17(%rip),%rdi
call   1040 <puts@plt>
lea    0xf27(%rip),%rdi
call   1040 <puts@plt>
lea    0xf35(%rip),%rdi
call   1040 <puts@plt>
lea    0xf43(%rip),%rdi
call   1040 <puts@plt>
lea    0xf52(%rip),%rdi
call   1040 <puts@plt>
lea    0xf62(%rip),%rdi
call   1040 <puts@plt>
lea    0xf70(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7e(%rip),%rdi
call   1040 <puts@plt>
lea    0xf8c(%rip),%rdi
call   1040 <puts@plt>
lea    0xf9a(%rip),%rdi
call   1040 <puts@plt>
lea    0xfac(%rip),%rdi
call   1040 <puts@plt>
lea    0xfbd(%rip),%rdi
call   1040 <puts@plt>
lea    0xfce(%rip),%rdi
call   1040 <puts@plt>
lea    0xfdf(%rip),%rdi
call   1040 <puts@plt>
lea    0xff0(%rip),%rdi
call   1040 <puts@plt>
lea    0xff3(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [44 x i8] c" STAT_NAME : constant String := \22stat\22;\0A\00"
@.str.1 = [45 x i8] c" FSTAT_NAME : constant String := \22fstat\22;\0A\00"
@.str.2 = [29 x i8] c" type Stat_Type is record\0A\00"
@.str.3 = [27 x i8] c" st_dev : dev_t;\0A\00"
@.str.4 = [27 x i8] c" st_ino : ino_t;\0A\00"
@.str.5 = [28 x i8] c" st_mode : mode_t;\0A\00"
@.str.6 = [29 x i8] c" st_nlink : nlink_t;\0A\00"
@.str.7 = [27 x i8] c" st_uid : uid_t;\0A\00"
@.str.8 = [27 x i8] c" st_gid : gid_t;\0A\00"
@.str.9 = [27 x i8] c" st_rdev : dev_t;\0A\00"
@.str.10 = [27 x i8] c" st_size : off_t;\0A\00"
@.str.11 = [31 x i8] c" st_blksize : blksize_t;\0A\00"
@.str.12 = [30 x i8] c" st_blocks : blkcnt_t;\0A\00"
@.str.13 = [30 x i8] c" st_atim : Timespec;\0A\00"
@.str.14 = [30 x i8] c" st_mtim : Timespec;\0A\00"
@.str.15 = [30 x i8] c" st_ctim : Timespec;\0A\00"
@.str.16 = [16 x i8] c" end record;\0A\00"
@.str.17 = [51 x i8] c" pragma Convention (C_Pass_By_Copy, Stat_Type);\0A\00"
@.str.18 = [2 x i8] c"\0A\00"
define void @gen_stat() {
%1 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.17, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [43 x i8] c" STAT_NAME : constant String := \22stat\22;\00"
@str.19 = [44 x i8] c" FSTAT_NAME : constant String := \22fstat\22;\00"
@str.20 = [28 x i8] c" type Stat_Type is record\00"
@str.21 = [26 x i8] c" st_dev : dev_t;\00"
@str.22 = [26 x i8] c" st_ino : ino_t;\00"
@str.23 = [27 x i8] c" st_mode : mode_t;\00"
@str.24 = [28 x i8] c" st_nlink : nlink_t;\00"
@str.25 = [26 x i8] c" st_uid : uid_t;\00"
@str.26 = [26 x i8] c" st_gid : gid_t;\00"
@str.27 = [26 x i8] c" st_rdev : dev_t;\00"
@str.28 = [26 x i8] c" st_size : off_t;\00"
@str.29 = [30 x i8] c" st_blksize : blksize_t;\00"
@str.30 = [29 x i8] c" st_blocks : blkcnt_t;\00"
@str.31 = [29 x i8] c" st_atim : Timespec;\00"
@str.32 = [29 x i8] c" st_mtim : Timespec;\00"
@str.33 = [29 x i8] c" st_ctim : Timespec;\00"
@str.34 = [15 x i8] c" end record;\00"
@str.35 = [50 x i8] c" pragma Convention (C_Pass_By_Copy, Stat_Type);\00"
define void @gen_stat() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.19, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.20, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.21, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.22, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.23, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.24, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.25, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.26, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.27, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.28, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.29, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.30, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.31, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.32, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.33, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.34, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.35, i64 0, i64 0))
%19 = tail call i32 @putchar(i32 10)
ret void
}