#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 O_CREAT;
int O_WRONLY;
int S_IRGRP;
int S_IROTH;
int S_IRUSR;
int S_IWUSR;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int open(char *, int, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ write(int, ...);
int main(void) {
  struct file_magic_12_1_7 {
    unsigned short sysstat_magic;
    unsigned short format_magic;
    unsigned char sysstat_version;
    unsigned char sysstat_patchlevel;
    unsigned char sysstat_sublevel;
    unsigned char sysstat_extraversion;
    unsigned int header_size;
    unsigned int upgraded;
    unsigned int hdr_types_nr[3];
    unsigned char pad[48];
  };
  struct file_magic_12_1_7 f_magic = {.sysstat_magic = 0xd596,
                                      .format_magic = 0x2175,
                                      .sysstat_version = 12,
                                      .sysstat_patchlevel = 1,
                                      .sysstat_sublevel = 7,
                                      .sysstat_extraversion = 0,
                                      .upgraded = 0,
                                      .hdr_types_nr = {1, 1, 12}};
  struct file_header_12_1_7 {
    unsigned long long sa_ust_time;
    unsigned long sa_hz __attribute__((aligned(8)));
    unsigned int sa_cpu_nr __attribute__((aligned(8)));
    unsigned int sa_act_nr;
    int sa_year;
    unsigned int act_types_nr[3];
    unsigned int rec_types_nr[3];
    unsigned int act_size;
    unsigned int rec_size;
    unsigned int extra_next;
    unsigned char sa_day;
    unsigned char sa_month;
    char sa_sizeof_long;
    char sa_sysname[65];
    char sa_nodename[65];
    char sa_release[65];
    char sa_machine[65];
  };
  struct file_header_12_1_7 f_header = {.sa_ust_time = 1568533161,
                                        .sa_hz = 100,
                                        .sa_cpu_nr = 3,
                                        .sa_act_nr = (1 ? 3 : 2),
                                        .sa_year = 2019,
                                        .act_types_nr = {0, 0, 9},
                                        .rec_types_nr = {2, 0, 1},
                                        .extra_next = 0,
                                        .sa_day = 15,
                                        .sa_month = 9,
                                        .sa_sizeof_long = 8,
                                        .sa_sysname = "Linux",
                                        .sa_nodename = "localhost.localdomain",
                                        .sa_release = "5.0.16-100.fc28.x86_64",
                                        .sa_machine = "x86_64"};
  struct file_activity_12_1_7 {
    unsigned int id;
    unsigned int magic;
    int nr;
    int nr2;
    int has_nr;
    int size;
    unsigned int types_nr[3];
  };
  struct file_activity_12_1_7 f_activity_a_cpu = {.id = 1,
                                                  .magic = 0x8b,
                                                  .nr = 3,
                                                  .nr2 = 1,
                                                  .has_nr = 1,
                                                  .types_nr = {10, 0, 0}};
  struct file_activity_12_1_7 f_activity_a_pcsw = {.id = 2,
                                                   .magic = 0xff,
                                                   .nr = 1,
                                                   .nr2 = 1,
                                                   .has_nr = 0,
                                                   .types_nr = {0, 1, 0}};
  struct file_activity_12_1_7 f_activity_a_unknown = {.id = 0xff,
                                                      .magic = 0x8a,
                                                      .nr = 2,
                                                      .nr2 = 1,
                                                      .has_nr = 1,
                                                      .types_nr = {1, 1, 0}};
  struct record_header_12_1_7 {
    unsigned long long uptime_cs;
    unsigned long long ust_time;
    unsigned int extra_next;
    unsigned char record_type;
    unsigned char hour;
    unsigned char minute;
    unsigned char second;
  };
  struct record_header_12_1_7 r_header_1 = {.uptime_cs = 15000,
                                            .ust_time = 1568540000,
                                            .extra_next = 0,
                                            .record_type = 1,
                                            .hour = 11,
                                            .minute = 5,
                                            .second = 58};
  struct record_header_12_1_7 r_header_2 = {.uptime_cs = 15200,
                                            .ust_time = 1568540200,
                                            .extra_next = 0,
                                            .record_type = 1,
                                            .hour = 11,
                                            .minute = 6,
                                            .second = 1};
  struct stats_cpu_12_1_7 {
    unsigned long long cpu_user;
    unsigned long long cpu_nice;
    unsigned long long cpu_sys;
    unsigned long long cpu_idle;
    unsigned long long cpu_iowait;
    unsigned long long cpu_steal;
    unsigned long long cpu_hardirq;
    unsigned long long cpu_softirq;
    unsigned long long cpu_guest;
    unsigned long long cpu_guest_nice;
  };
  struct stats_cpu_12_1_7 s_cpu_0_1 = {.cpu_user = 1000,
                                       .cpu_nice = 0,
                                       .cpu_sys = 500,
                                       .cpu_idle = 0,
                                       .cpu_iowait = 0,
                                       .cpu_steal = 0,
                                       .cpu_hardirq = 0,
                                       .cpu_softirq = 0,
                                       .cpu_guest = 0,
                                       .cpu_guest_nice = 0};
  struct stats_cpu_12_1_7 s_cpu_1_1 = {.cpu_user = 1000,
                                       .cpu_nice = 0,
                                       .cpu_sys = 0,
                                       .cpu_idle = 0,
                                       .cpu_iowait = 0,
                                       .cpu_steal = 0,
                                       .cpu_hardirq = 0,
                                       .cpu_softirq = 0,
                                       .cpu_guest = 0,
                                       .cpu_guest_nice = 0};
  struct stats_cpu_12_1_7 s_cpu_2_1 = {.cpu_user = 0,
                                       .cpu_nice = 0,
                                       .cpu_sys = 500,
                                       .cpu_idle = 0,
                                       .cpu_iowait = 0,
                                       .cpu_steal = 0,
                                       .cpu_hardirq = 0,
                                       .cpu_softirq = 0,
                                       .cpu_guest = 0,
                                       .cpu_guest_nice = 0};
  struct stats_cpu_12_1_7 s_cpu_0_2 = {.cpu_user = 1100,
                                       .cpu_nice = 0,
                                       .cpu_sys = 500,
                                       .cpu_idle = 100,
                                       .cpu_iowait = 0,
                                       .cpu_steal = 0,
                                       .cpu_hardirq = 0,
                                       .cpu_softirq = 0,
                                       .cpu_guest = 0,
                                       .cpu_guest_nice = 0};
  struct stats_cpu_12_1_7 s_cpu_1_2 = {.cpu_user = 1100,
                                       .cpu_nice = 0,
                                       .cpu_sys = 0,
                                       .cpu_idle = 0,
                                       .cpu_iowait = 0,
                                       .cpu_steal = 0,
                                       .cpu_hardirq = 0,
                                       .cpu_softirq = 0,
                                       .cpu_guest = 0,
                                       .cpu_guest_nice = 0};
  struct stats_cpu_12_1_7 s_cpu_2_2 = {.cpu_user = 0,
                                       .cpu_nice = 0,
                                       .cpu_sys = 500,
                                       .cpu_idle = 100,
                                       .cpu_iowait = 0,
                                       .cpu_steal = 0,
                                       .cpu_hardirq = 0,
                                       .cpu_softirq = 0,
                                       .cpu_guest = 0,
                                       .cpu_guest_nice = 0};
  struct stats_pcsw_ukwn {
    unsigned long processes __attribute__((aligned(8)));
  };
  struct stats_pcsw_ukwn s_pcsw_1 = {.processes = 543};
  struct stats_pcsw_ukwn s_pcsw_2 = {.processes = 643};
  struct stats_unknown {
    unsigned long long unknown_ull;
    unsigned long unknown_ul __attribute__((aligned(8)));
  };
  struct stats_unknown s_ukwn_0_1 = {.unknown_ull = 123456789,
                                     .unknown_ul = 12345};
  struct stats_unknown s_ukwn_1_1 = {.unknown_ull = 987654321,
                                     .unknown_ul = 54321};
  struct stats_unknown s_ukwn_0_2 = {.unknown_ull = 234567891,
                                     .unknown_ul = 23456};
  struct stats_unknown s_ukwn_1_2 = {.unknown_ull = 198765432,
                                     .unknown_ul = 65432};
  int fd;
  int nr_cpu, nr_ukwn;
  char fname[16];
  if (1) {
    strcpy(fname, "data-ukwn");
  } else {
    strcpy(fname, "data-ukwn0");
  }
  if ((fd = open(fname, O_CREAT | O_WRONLY,
                 S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0) {
    perror("open");
    exit(1);
  }
  f_magic.header_size = sizeof(struct file_header_12_1_7);
  if (write(fd, &f_magic, sizeof(struct file_magic_12_1_7)) < 0) {
    perror("write file magic");
    exit(1);
  }
  f_header.act_size = sizeof(struct file_activity_12_1_7);
  f_header.rec_size = sizeof(struct record_header_12_1_7);
  if (write(fd, &f_header, sizeof(struct file_header_12_1_7)) < 0) {
    perror("write file header");
    exit(1);
  }
  if (1) {
    f_activity_a_cpu.size = sizeof(struct stats_cpu_12_1_7);
    if (write(fd, &f_activity_a_cpu, sizeof(struct file_activity_12_1_7)) < 0) {
      perror("write file activity A_CPU");
      exit(1);
    }
  }
  f_activity_a_pcsw.size = sizeof(struct stats_pcsw_ukwn);
  if (write(fd, &f_activity_a_pcsw, sizeof(struct file_activity_12_1_7)) < 0) {
    perror("write file activity A_PCSW");
    exit(1);
  }
  f_activity_a_unknown.size = sizeof(struct stats_unknown);
  if (write(fd, &f_activity_a_unknown, sizeof(struct file_activity_12_1_7)) <
      0) {
    perror("write file activity A_UNKNOWN");
    exit(1);
  }
  if (write(fd, &r_header_1, sizeof(struct record_header_12_1_7)) < 0) {
    perror("write STAT #1 record");
    exit(1);
  }
  if (1) {
    nr_cpu = 3;
    if (write(fd, &nr_cpu, sizeof(int)) < 0) {
      perror("write nr_cpu #1");
      exit(1);
    }
    if (write(fd, &s_cpu_0_1, sizeof(struct stats_cpu_12_1_7)) < 0) {
      perror("write CPU stats 0_1");
      exit(1);
    }
    if (write(fd, &s_cpu_1_1, sizeof(struct stats_cpu_12_1_7)) < 0) {
      perror("write CPU stats 1_1");
      exit(1);
    }
    if (write(fd, &s_cpu_2_1, sizeof(struct stats_cpu_12_1_7)) < 0) {
      perror("write CPU stats 2_1");
      exit(1);
    }
  }
  if (write(fd, &s_pcsw_1, sizeof(struct stats_pcsw_ukwn)) < 0) {
    perror("write PCSW stats 1");
    exit(1);
  }
  nr_ukwn = 2;
  if (write(fd, &nr_ukwn, sizeof(int)) < 0) {
    perror("write nr_ukwn #1");
    exit(1);
  }
  if (write(fd, &s_ukwn_0_1, sizeof(struct stats_unknown)) < 0) {
    perror("write UNKNOWN stats 0_1");
    exit(1);
  }
  if (write(fd, &s_ukwn_1_1, sizeof(struct stats_unknown)) < 0) {
    perror("write UNKNOWN stats 1_1");
    exit(1);
  }
  if (write(fd, &r_header_2, sizeof(struct record_header_12_1_7)) < 0) {
    perror("write STAT #2 record");
    exit(1);
  }
  if (1) {
    nr_cpu = 3;
    if (write(fd, &nr_cpu, sizeof(int)) < 0) {
      perror("write nr_cpu #2");
      exit(1);
    }
    if (write(fd, &s_cpu_0_2, sizeof(struct stats_cpu_12_1_7)) < 0) {
      perror("write CPU stats 0_2");
      exit(1);
    }
    if (write(fd, &s_cpu_1_2, sizeof(struct stats_cpu_12_1_7)) < 0) {
      perror("write CPU stats 1_2");
      exit(1);
    }
    if (write(fd, &s_cpu_2_2, sizeof(struct stats_cpu_12_1_7)) < 0) {
      perror("write CPU stats 2_2");
      exit(1);
    }
  }
  if (write(fd, &s_pcsw_2, sizeof(struct stats_pcsw_ukwn)) < 0) {
    perror("write PCSW stats 2");
    exit(1);
  }
  nr_ukwn = 2;
  if (write(fd, &nr_ukwn, sizeof(int)) < 0) {
    perror("write nr_ukwn #2");
    exit(1);
  }
  if (write(fd, &s_ukwn_0_2, sizeof(struct stats_unknown)) < 0) {
    perror("write UNKNOWN stats 0_2");
    exit(1);
  }
  if (write(fd, &s_ukwn_1_2, sizeof(struct stats_unknown)) < 0) {
    perror("write UNKNOWN stats 1_2");
    exit(1);
  }
  close(fd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x490,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xe63(%rip),%rsi
mov    $0x4c,%edx
call   1070 <memcpy@plt>
lea    -0x198(%rbp),%rdi
lea    0xe9b(%rip),%rsi
mov    $0x148,%edx
call   1070 <memcpy@plt>
lea    -0x1c0(%rbp),%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1050 <memset@plt>
movl   $0x1,-0x1c0(%rbp)
movl   $0x8b,-0x1bc(%rbp)
movl   $0x3,-0x1b8(%rbp)
movl   $0x1,-0x1b4(%rbp)
movl   $0x1,-0x1b0(%rbp)
movl   $0xa,-0x1a8(%rbp)
lea    -0x1e8(%rbp),%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1050 <memset@plt>
movl   $0x2,-0x1e8(%rbp)
movl   $0xff,-0x1e4(%rbp)
movl   $0x1,-0x1e0(%rbp)
movl   $0x1,-0x1dc(%rbp)
movl   $0x1,-0x1cc(%rbp)
lea    -0x210(%rbp),%rdi
lea    0xf37(%rip),%rsi
mov    $0x24,%edx
call   1070 <memcpy@plt>
mov    0xf4e(%rip),%rax
mov    %rax,-0x228(%rbp)
mov    0xf48(%rip),%rax
mov    %rax,-0x220(%rbp)
mov    0xf42(%rip),%rax
mov    %rax,-0x218(%rbp)
mov    0xf3c(%rip),%rax
mov    %rax,-0x240(%rbp)
mov    0xf36(%rip),%rax
mov    %rax,-0x238(%rbp)
mov    0xf30(%rip),%rax
mov    %rax,-0x230(%rbp)
lea    -0x290(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1050 <memset@plt>
movq   $0x3e8,-0x290(%rbp)
movq   $0x1f4,-0x280(%rbp)
lea    -0x2e0(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1050 <memset@plt>
movq   $0x3e8,-0x2e0(%rbp)
lea    -0x330(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1050 <memset@plt>
movq   $0x1f4,-0x320(%rbp)
lea    -0x380(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1050 <memset@plt>
movq   $0x44c,-0x380(%rbp)
movq   $0x1f4,-0x370(%rbp)
movq   $0x64,-0x368(%rbp)
lea    -0x3d0(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1050 <memset@plt>
movq   $0x44c,-0x3d0(%rbp)
lea    -0x420(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1050 <memset@plt>
movq   $0x1f4,-0x410(%rbp)
movq   $0x64,-0x408(%rbp)
mov    0xe4a(%rip),%rax
mov    %rax,-0x428(%rbp)
mov    0xe44(%rip),%rax
mov    %rax,-0x430(%rbp)
mov    0xe3e(%rip),%rax
mov    %rax,-0x440(%rbp)
mov    0xe38(%rip),%rax
mov    %rax,-0x438(%rbp)
mov    0xe32(%rip),%rax
mov    %rax,-0x450(%rbp)
mov    0xe2c(%rip),%rax
mov    %rax,-0x448(%rbp)
mov    0xe26(%rip),%rax
mov    %rax,-0x460(%rbp)
mov    0xe20(%rip),%rax
mov    %rax,-0x458(%rbp)
mov    0xe1a(%rip),%rax
mov    %rax,-0x470(%rbp)
mov    0xe14(%rip),%rax
mov    %rax,-0x468(%rbp)
lea    -0x490(%rbp),%rdi
lea    0xe07(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x490(%rbp),%rdi
mov    0x2bac(%rip),%rax
mov    (%rax),%esi
mov    0x2b5b(%rip),%rax
or     (%rax),%esi
mov    0x2b62(%rip),%rax
mov    (%rax),%edx
mov    0x2b79(%rip),%rax
or     (%rax),%edx
mov    0x2b60(%rip),%rax
or     (%rax),%edx
mov    0x2b4f(%rip),%rax
or     (%rax),%edx
call   1080 <open@plt>
mov    %eax,-0x474(%rbp)
cmp    $0x0,%eax
jge    14a5 <main+0x325>
lea    0xdb4(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
movl   $0x148,-0x48(%rbp)
mov    -0x474(%rbp),%edi
lea    -0x50(%rbp),%rsi
mov    $0x4c,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    14e2 <main+0x362>
lea    0xd7c(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
movl   $0x24,-0x164(%rbp)
movl   $0x18,-0x160(%rbp)
mov    -0x474(%rbp),%edi
lea    -0x198(%rbp),%rsi
mov    $0x148,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    152f <main+0x3af>
lea    0xd40(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
movl   $0x50,-0x1ac(%rbp)
mov    -0x474(%rbp),%edi
lea    -0x1c0(%rbp),%rsi
mov    $0x24,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    1572 <main+0x3f2>
lea    0xd0f(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
movl   $0x8,-0x1d4(%rbp)
mov    -0x474(%rbp),%edi
lea    -0x1e8(%rbp),%rsi
mov    $0x24,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    15b5 <main+0x435>
lea    0xce6(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
movl   $0x10,-0x1fc(%rbp)
mov    -0x474(%rbp),%edi
lea    -0x210(%rbp),%rsi
mov    $0x24,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    15f8 <main+0x478>
lea    0xcbe(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x474(%rbp),%edi
lea    -0x228(%rbp),%rsi
mov    $0x18,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    1631 <main+0x4b1>
lea    0xca3(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
movl   $0x3,-0x478(%rbp)
mov    -0x474(%rbp),%edi
lea    -0x478(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    1674 <main+0x4f4>
lea    0xc75(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x474(%rbp),%edi
lea    -0x290(%rbp),%rsi
mov    $0x50,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    16ad <main+0x52d>
lea    0xc4c(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x474(%rbp),%edi
lea    -0x2e0(%rbp),%rsi
mov    $0x50,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    16e6 <main+0x566>
lea    0xc27(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x474(%rbp),%edi
lea    -0x330(%rbp),%rsi
mov    $0x50,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    171f <main+0x59f>
lea    0xc02(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x474(%rbp),%edi
lea    -0x428(%rbp),%rsi
mov    $0x8,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    1758 <main+0x5d8>
lea    0xbdd(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
movl   $0x2,-0x47c(%rbp)
mov    -0x474(%rbp),%edi
lea    -0x47c(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    179b <main+0x61b>
lea    0xbad(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x474(%rbp),%edi
lea    -0x440(%rbp),%rsi
mov    $0x10,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    17d4 <main+0x654>
lea    0xb85(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x474(%rbp),%edi
lea    -0x450(%rbp),%rsi
mov    $0x10,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    180d <main+0x68d>
lea    0xb64(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x474(%rbp),%edi
lea    -0x240(%rbp),%rsi
mov    $0x18,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    1846 <main+0x6c6>
lea    0xb43(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
movl   $0x3,-0x478(%rbp)
mov    -0x474(%rbp),%edi
lea    -0x478(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    1889 <main+0x709>
lea    0xb15(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x474(%rbp),%edi
lea    -0x380(%rbp),%rsi
mov    $0x50,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    18c2 <main+0x742>
lea    0xaec(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x474(%rbp),%edi
lea    -0x3d0(%rbp),%rsi
mov    $0x50,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    18fb <main+0x77b>
lea    0xac7(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x474(%rbp),%edi
lea    -0x420(%rbp),%rsi
mov    $0x50,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    1934 <main+0x7b4>
lea    0xaa2(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x474(%rbp),%edi
lea    -0x430(%rbp),%rsi
mov    $0x8,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    196d <main+0x7ed>
lea    0xa7d(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
movl   $0x2,-0x47c(%rbp)
mov    -0x474(%rbp),%edi
lea    -0x47c(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    19b0 <main+0x830>
lea    0xa4d(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x474(%rbp),%edi
lea    -0x460(%rbp),%rsi
mov    $0x10,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    19e9 <main+0x869>
lea    0xa25(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x474(%rbp),%edi
lea    -0x470(%rbp),%rsi
mov    $0x10,%edx
mov    $0x0,%al
call   1040 <write@plt>
cmp    $0x0,%rax
jge    1a22 <main+0x8a2>
lea    0xa04(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x474(%rbp),%edi
call   1060 <close@plt>
xor    %eax,%eax
add    $0x490,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x4c0,%rsp
movups 0xf2d(%rip),%xmm0
movups %xmm0,0x20c(%rsp)
movups 0xf12(%rip),%xmm0
movaps %xmm0,0x200(%rsp)
movups 0xef3(%rip),%xmm0
movaps %xmm0,0x1f0(%rsp)
movups 0xed4(%rip),%xmm0
movaps %xmm0,0x1e0(%rsp)
movups 0xeb5(%rip),%xmm0
movaps %xmm0,0x1d0(%rsp)
lea    0xef6(%rip),%rsi
lea    0x378(%rsp),%rdi
mov    $0x148,%edx
call   1060 <memcpy@plt>
xorps  %xmm0,%xmm0
movups %xmm0,0x64(%rsp)
movaps 0xe15(%rip),%xmm1
movaps %xmm1,0x50(%rsp)
movl   $0x1,0x60(%rsp)
movl   $0xa,0x68(%rsp)
movaps %xmm0,0x30(%rsp)
movl   $0x0,0x40(%rsp)
movaps 0xdfc(%rip),%xmm1
movaps %xmm1,0x20(%rsp)
movl   $0x1,0x3c(%rsp)
mov    0x1001(%rip),%eax
mov    %eax,0xa0(%rsp)
movups 0xfe3(%rip),%xmm1
movaps %xmm1,0x90(%rsp)
movups 0xfc4(%rip),%xmm1
movaps %xmm1,0x80(%rsp)
mov    0xfed(%rip),%rax
mov    %rax,0x120(%rsp)
movups 0xfce(%rip),%xmm1
movaps %xmm1,0x110(%rsp)
mov    0xfe7(%rip),%rax
mov    %rax,0x100(%rsp)
movups 0xfc8(%rip),%xmm1
movaps %xmm1,0xf0(%rsp)
movups %xmm0,0x188(%rsp)
movups %xmm0,0x1b8(%rsp)
movups %xmm0,0x1a8(%rsp)
movups %xmm0,0x198(%rsp)
movq   $0x0,0x1c8(%rsp)
movq   $0x3e8,0x180(%rsp)
movq   $0x1f4,0x190(%rsp)
movups %xmm0,0x2f8(%rsp)
movups %xmm0,0x2e8(%rsp)
movups %xmm0,0x2d8(%rsp)
movups %xmm0,0x2c8(%rsp)
movq   $0x0,0x308(%rsp)
movq   $0x3e8,0x2c0(%rsp)
movaps %xmm0,0x230(%rsp)
movaps %xmm0,0x260(%rsp)
movaps %xmm0,0x250(%rsp)
movaps %xmm0,0x240(%rsp)
movaps %xmm0,0x220(%rsp)
movq   $0x1f4,0x230(%rsp)
movups %xmm0,0x148(%rsp)
movups %xmm0,0x138(%rsp)
movups %xmm0,0x168(%rsp)
movups %xmm0,0x158(%rsp)
movq   $0x0,0x178(%rsp)
movq   $0x44c,0x130(%rsp)
movaps 0xca9(%rip),%xmm1
movups %xmm1,0x140(%rsp)
movups %xmm0,0x2a8(%rsp)
movups %xmm0,0x298(%rsp)
movups %xmm0,0x288(%rsp)
movups %xmm0,0x278(%rsp)
movq   $0x0,0x2b8(%rsp)
movq   $0x44c,0x270(%rsp)
movaps %xmm0,0x350(%rsp)
movaps %xmm0,0x340(%rsp)
movaps %xmm0,0x330(%rsp)
movaps %xmm0,0x310(%rsp)
movaps %xmm1,0x320(%rsp)
movq   $0x21f,0x18(%rsp)
movq   $0x283,0x10(%rsp)
movups 0xc38(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movups 0xc39(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movups 0xc3a(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movups 0xc3b(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
lea    0xe2c(%rip),%rsi
lea    0x360(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    0x2bad(%rip),%rax
mov    0x2b5e(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2b63(%rip),%rax
mov    0x2b7c(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
mov    0x2b61(%rip),%rax
or     (%rax),%edx
mov    0x2b50(%rip),%rax
or     (%rax),%edx
mov    %rbx,%rdi
call   1070 <open@plt>
test   %eax,%eax
js     17a7 <main+0x637>
mov    %eax,%ebx
movl   $0x148,0x1d8(%rsp)
lea    0x1d0(%rsp),%rsi
mov    $0x4c,%edx
mov    %eax,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     17b3 <main+0x643>
movabs $0x1800000024,%rax
mov    %rax,0x3ac(%rsp)
lea    0x378(%rsp),%rsi
mov    $0x148,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     17bf <main+0x64f>
movl   $0x50,0x64(%rsp)
lea    0x50(%rsp),%rsi
mov    $0x24,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     17cb <main+0x65b>
movl   $0x8,0x34(%rsp)
lea    0x20(%rsp),%rsi
mov    $0x24,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     17d7 <main+0x667>
movl   $0x10,0x94(%rsp)
lea    0x80(%rsp),%rsi
mov    $0x24,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     17e3 <main+0x673>
lea    0x110(%rsp),%rsi
mov    $0x18,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     17ef <main+0x67f>
movl   $0x3,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x4,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     17fb <main+0x68b>
lea    0x180(%rsp),%rsi
mov    $0x50,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     1807 <main+0x697>
lea    0x2c0(%rsp),%rsi
mov    $0x50,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     1813 <main+0x6a3>
lea    0x220(%rsp),%rsi
mov    $0x50,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     181c <main+0x6ac>
lea    0x18(%rsp),%rsi
mov    $0x8,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     1825 <main+0x6b5>
movl   $0x2,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x4,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     182e <main+0x6be>
lea    0xe0(%rsp),%rsi
mov    $0x10,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     1837 <main+0x6c7>
lea    0xd0(%rsp),%rsi
mov    $0x10,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     1840 <main+0x6d0>
lea    0xf0(%rsp),%rsi
mov    $0x18,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     1849 <main+0x6d9>
movl   $0x3,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x4,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     1852 <main+0x6e2>
lea    0x130(%rsp),%rsi
mov    $0x50,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     185b <main+0x6eb>
lea    0x270(%rsp),%rsi
mov    $0x50,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     1864 <main+0x6f4>
lea    0x310(%rsp),%rsi
mov    $0x50,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     186d <main+0x6fd>
lea    0x10(%rsp),%rsi
mov    $0x8,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     1876 <main+0x706>
movl   $0x2,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x4,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     187f <main+0x70f>
lea    0xc0(%rsp),%rsi
mov    $0x10,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     1888 <main+0x718>
lea    0xb0(%rsp),%rsi
mov    $0x10,%edx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <write@plt>
test   %rax,%rax
js     1891 <main+0x721>
mov    %ebx,%edi
call   1050 <close@plt>
xor    %eax,%eax
add    $0x4c0,%rsp
pop    %rbx
ret
lea    0xabc(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xab5(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xaba(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xac0(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xace(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xadd(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xaef(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xaf8(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xafc(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xb04(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xb0f(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xb1a(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xb24(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xb2c(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xb3b(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xb4a(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xb56(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xb5d(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xb68(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xb73(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xb7e(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xb88(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xb90(%rip),%rdi
jmp    1898 <main+0x728>
lea    0xb9f(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
%struct.file_magic_12_1_7 = type { i16, i16, i8, i8, i8, i8, i32, i32, [3 x i32], [48 x i8] }
%struct.file_header_12_1_7 = type { i64, i64, i32, i32, i32, [3 x i32], [3 x i32], i32, i32, i32, i8, i8, i8, [65 x i8], [65 x i8], [65 x i8], [65 x i8] }
%struct.file_activity_12_1_7 = type { i32, i32, i32, i32, i32, i32, [3 x i32] }
%struct.record_header_12_1_7 = type { i64, i64, i32, i8, i8, i8, i8 }
%struct.stats_pcsw_ukwn = type { i64 }
%struct.stats_unknown = type { i64, i64 }
%struct.stats_cpu_12_1_7 = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
@__const.main.f_magic = %struct.file_magic_12_1_7 { i16 -10858, i16 8565, i8 12, i8 1, i8 7, i8 0, i32 0, i32 0, [3 x i32] [i32 1, i32 1, i32 12], [48 x i8] zeroinitializer }
@__const.main.f_header = %struct.file_header_12_1_7 { i64 1568533161, i64 100, i32 3, i32 3, i32 2019, [3 x i32] [i32 0, i32 0, i32 9], [3 x i32] [i32 2, i32 0, i32 1], i32 0, i32 0, i32 0, i8 15, i8 9, i8 8, [65 x i8] c"Linux\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [65 x i8] c"localhost.localdomain\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [65 x i8] c"5.0.16-100.fc28.x86_64\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [65 x i8] c"x86_64\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00" }
@__const.main.f_activity_a_unknown = %struct.file_activity_12_1_7 { i32 255, i32 138, i32 2, i32 1, i32 1, i32 0, [3 x i32] [i32 1, i32 1, i32 0] }
@__const.main.r_header_1 = %struct.record_header_12_1_7 { i64 15000, i64 1568540000, i32 0, i8 1, i8 11, i8 5, i8 58 }
@__const.main.r_header_2 = %struct.record_header_12_1_7 { i64 15200, i64 1568540200, i32 0, i8 1, i8 11, i8 6, i8 1 }
@__const.main.s_pcsw_1 = %struct.stats_pcsw_ukwn { i64 543 }
@__const.main.s_pcsw_2 = %struct.stats_pcsw_ukwn { i64 643 }
@__const.main.s_ukwn_0_1 = %struct.stats_unknown { i64 123456789, i64 12345 }
@__const.main.s_ukwn_1_1 = %struct.stats_unknown { i64 987654321, i64 54321 }
@__const.main.s_ukwn_0_2 = %struct.stats_unknown { i64 234567891, i64 23456 }
@__const.main.s_ukwn_1_2 = %struct.stats_unknown { i64 198765432, i64 65432 }
@.str = [10 x i8] c"data-ukwn\00"
@O_CREAT = global i32 0
@O_WRONLY = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IRGRP = global i32 0
@S_IROTH = global i32 0
@.str.1 = [5 x i8] c"open\00"
@.str.2 = [17 x i8] c"write file magic\00"
@.str.3 = [18 x i8] c"write file header\00"
@.str.4 = [26 x i8] c"write file activity A_CPU\00"
@.str.5 = [27 x i8] c"write file activity A_PCSW\00"
@.str.6 = [30 x i8] c"write file activity A_UNKNOWN\00"
@.str.7 = [21 x i8] c"write STAT record\00"
@.str.8 = [16 x i8] c"write nr_cpu\00"
@.str.9 = [20 x i8] c"write CPU stats 0_1\00"
@.str.10 = [20 x i8] c"write CPU stats 1_1\00"
@.str.11 = [20 x i8] c"write CPU stats 2_1\00"
@.str.12 = [19 x i8] c"write PCSW stats 1\00"
@.str.13 = [17 x i8] c"write nr_ukwn\00"
@.str.14 = [24 x i8] c"write UNKNOWN stats 0_1\00"
@.str.15 = [24 x i8] c"write UNKNOWN stats 1_1\00"
@.str.16 = [21 x i8] c"write STAT record\00"
@.str.17 = [16 x i8] c"write nr_cpu\00"
@.str.18 = [20 x i8] c"write CPU stats 0_2\00"
@.str.19 = [20 x i8] c"write CPU stats 1_2\00"
@.str.20 = [20 x i8] c"write CPU stats 2_2\00"
@.str.21 = [19 x i8] c"write PCSW stats 2\00"
@.str.22 = [17 x i8] c"write nr_ukwn\00"
@.str.23 = [24 x i8] c"write UNKNOWN stats 0_2\00"
@.str.24 = [24 x i8] c"write UNKNOWN stats 1_2\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.file_magic_12_1_7
%3 = alloca %struct.file_header_12_1_7
%4 = alloca %struct.file_activity_12_1_7
%5 = alloca %struct.file_activity_12_1_7
%6 = alloca %struct.file_activity_12_1_7
%7 = alloca %struct.record_header_12_1_7
%8 = alloca %struct.record_header_12_1_7
%9 = alloca %struct.stats_cpu_12_1_7
%10 = alloca %struct.stats_cpu_12_1_7
%11 = alloca %struct.stats_cpu_12_1_7
%12 = alloca %struct.stats_cpu_12_1_7
%13 = alloca %struct.stats_cpu_12_1_7
%14 = alloca %struct.stats_cpu_12_1_7
%15 = alloca %struct.stats_pcsw_ukwn
%16 = alloca %struct.stats_pcsw_ukwn
%17 = alloca %struct.stats_unknown
%18 = alloca %struct.stats_unknown
%19 = alloca %struct.stats_unknown
%20 = alloca %struct.stats_unknown
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca [16 x i8]
store i32 0, i32* %1
%25 = bitcast %struct.file_magic_12_1_7* %2 to i8*
%26 = bitcast %struct.file_header_12_1_7* %3 to i8*
%27 = bitcast %struct.file_activity_12_1_7* %4 to i8*
%28 = bitcast i8* %27 to %struct.file_activity_12_1_7*
%29 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %28, i32 0, i32 0
store i32 1, i32* %29
%30 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %28, i32 0, i32 1
store i32 139, i32* %30
%31 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %28, i32 0, i32 2
store i32 3, i32* %31
%32 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %28, i32 0, i32 3
store i32 1, i32* %32
%33 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %28, i32 0, i32 4
store i32 1, i32* %33
%34 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %28, i32 0, i32 6
%35 = getelementptr inbounds [3 x i32], [3 x i32]* %34, i32 0, i32 0
store i32 10, i32* %35
%36 = bitcast %struct.file_activity_12_1_7* %5 to i8*
%37 = bitcast i8* %36 to %struct.file_activity_12_1_7*
%38 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %37, i32 0, i32 0
store i32 2, i32* %38
%39 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %37, i32 0, i32 1
store i32 255, i32* %39
%40 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %37, i32 0, i32 2
store i32 1, i32* %40
%41 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %37, i32 0, i32 3
store i32 1, i32* %41
%42 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %37, i32 0, i32 6
%43 = getelementptr inbounds [3 x i32], [3 x i32]* %42, i32 0, i32 1
store i32 1, i32* %43
%44 = bitcast %struct.file_activity_12_1_7* %6 to i8*
%45 = bitcast %struct.record_header_12_1_7* %7 to i8*
%46 = bitcast %struct.record_header_12_1_7* %8 to i8*
%47 = bitcast %struct.stats_cpu_12_1_7* %9 to i8*
%48 = bitcast i8* %47 to %struct.stats_cpu_12_1_7*
%49 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %48, i32 0, i32 0
store i64 1000, i64* %49
%50 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %48, i32 0, i32 2
store i64 500, i64* %50
%51 = bitcast %struct.stats_cpu_12_1_7* %10 to i8*
%52 = bitcast i8* %51 to %struct.stats_cpu_12_1_7*
%53 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %52, i32 0, i32 0
store i64 1000, i64* %53
%54 = bitcast %struct.stats_cpu_12_1_7* %11 to i8*
%55 = bitcast i8* %54 to %struct.stats_cpu_12_1_7*
%56 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %55, i32 0, i32 2
store i64 500, i64* %56
%57 = bitcast %struct.stats_cpu_12_1_7* %12 to i8*
%58 = bitcast i8* %57 to %struct.stats_cpu_12_1_7*
%59 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %58, i32 0, i32 0
store i64 1100, i64* %59
%60 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %58, i32 0, i32 2
store i64 500, i64* %60
%61 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %58, i32 0, i32 3
store i64 100, i64* %61
%62 = bitcast %struct.stats_cpu_12_1_7* %13 to i8*
%63 = bitcast i8* %62 to %struct.stats_cpu_12_1_7*
%64 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %63, i32 0, i32 0
store i64 1100, i64* %64
%65 = bitcast %struct.stats_cpu_12_1_7* %14 to i8*
%66 = bitcast i8* %65 to %struct.stats_cpu_12_1_7*
%67 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %66, i32 0, i32 2
store i64 500, i64* %67
%68 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %66, i32 0, i32 3
store i64 100, i64* %68
%69 = bitcast %struct.stats_pcsw_ukwn* %15 to i8*
%70 = bitcast %struct.stats_pcsw_ukwn* %16 to i8*
%71 = bitcast %struct.stats_unknown* %17 to i8*
%72 = bitcast %struct.stats_unknown* %18 to i8*
%73 = bitcast %struct.stats_unknown* %19 to i8*
%74 = bitcast %struct.stats_unknown* %20 to i8*
%75 = getelementptr inbounds [16 x i8], [16 x i8]* %24, i64 0, i64 0
%76 = call i32 @strcpy(i8* %75, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%77 = getelementptr inbounds [16 x i8], [16 x i8]* %24, i64 0, i64 0
%78 = load i32, i32* @O_CREAT
%79 = load i32, i32* @O_WRONLY
%80 = or i32 %78, %79
%81 = load i32, i32* @S_IRUSR
%82 = load i32, i32* @S_IWUSR
%83 = or i32 %81, %82
%84 = load i32, i32* @S_IRGRP
%85 = or i32 %83, %84
%86 = load i32, i32* @S_IROTH
%87 = or i32 %85, %86
%88 = call i32 @open(i8* %77, i32 %80, i32 %87)
store i32 %88, i32* %21
%89 = icmp slt i32 %88, 0
br i1 %89, label %90, label %93
90: ; preds = %0
%91 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%92 = call i32 @exit(i32 1)
unreachable
93: ; preds = %0
%94 = getelementptr inbounds %struct.file_magic_12_1_7, %struct.file_magic_12_1_7* %2, i32 0, i32 6
store i32 328, i32* %94
%95 = load i32, i32* %21
%96 = call i64 (i32, ...) @write(i32 %95, %struct.file_magic_12_1_7* %2, i64 76)
%97 = icmp slt i64 %96, 0
br i1 %97, label %98, label %101
98: ; preds = %93
%99 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%100 = call i32 @exit(i32 1)
unreachable
101: ; preds = %93
%102 = getelementptr inbounds %struct.file_header_12_1_7, %struct.file_header_12_1_7* %3, i32 0, i32 7
store i32 36, i32* %102
%103 = getelementptr inbounds %struct.file_header_12_1_7, %struct.file_header_12_1_7* %3, i32 0, i32 8
store i32 24, i32* %103
%104 = load i32, i32* %21
%105 = call i64 (i32, ...) @write(i32 %104, %struct.file_header_12_1_7* %3, i64 328)
%106 = icmp slt i64 %105, 0
br i1 %106, label %107, label %110
107: ; preds = %101
%108 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%109 = call i32 @exit(i32 1)
unreachable
110: ; preds = %101
%111 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %4, i32 0, i32 5
store i32 80, i32* %111
%112 = load i32, i32* %21
%113 = call i64 (i32, ...) @write(i32 %112, %struct.file_activity_12_1_7* %4, i64 36)
%114 = icmp slt i64 %113, 0
br i1 %114, label %115, label %118
115: ; preds = %110
%116 = call i32 @perror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%117 = call i32 @exit(i32 1)
unreachable
118: ; preds = %110
%119 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %5, i32 0, i32 5
store i32 8, i32* %119
%120 = load i32, i32* %21
%121 = call i64 (i32, ...) @write(i32 %120, %struct.file_activity_12_1_7* %5, i64 36)
%122 = icmp slt i64 %121, 0
br i1 %122, label %123, label %126
123: ; preds = %118
%124 = call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%125 = call i32 @exit(i32 1)
unreachable
126: ; preds = %118
%127 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %6, i32 0, i32 5
store i32 16, i32* %127
%128 = load i32, i32* %21
%129 = call i64 (i32, ...) @write(i32 %128, %struct.file_activity_12_1_7* %6, i64 36)
%130 = icmp slt i64 %129, 0
br i1 %130, label %131, label %134
131: ; preds = %126
%132 = call i32 @perror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%133 = call i32 @exit(i32 1)
unreachable
134: ; preds = %126
%135 = load i32, i32* %21
%136 = call i64 (i32, ...) @write(i32 %135, %struct.record_header_12_1_7* %7, i64 24)
%137 = icmp slt i64 %136, 0
br i1 %137, label %138, label %141
138: ; preds = %134
%139 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
%140 = call i32 @exit(i32 1)
unreachable
141: ; preds = %134
store i32 3, i32* %22
%142 = load i32, i32* %21
%143 = call i64 (i32, ...) @write(i32 %142, i32* %22, i64 4)
%144 = icmp slt i64 %143, 0
br i1 %144, label %145, label %148
145: ; preds = %141
%146 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%147 = call i32 @exit(i32 1)
unreachable
148: ; preds = %141
%149 = load i32, i32* %21
%150 = call i64 (i32, ...) @write(i32 %149, %struct.stats_cpu_12_1_7* %9, i64 80)
%151 = icmp slt i64 %150, 0
br i1 %151, label %152, label %155
152: ; preds = %148
%153 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%154 = call i32 @exit(i32 1)
unreachable
155: ; preds = %148
%156 = load i32, i32* %21
%157 = call i64 (i32, ...) @write(i32 %156, %struct.stats_cpu_12_1_7* %10, i64 80)
%158 = icmp slt i64 %157, 0
br i1 %158, label %159, label %162
159: ; preds = %155
%160 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
%161 = call i32 @exit(i32 1)
unreachable
162: ; preds = %155
%163 = load i32, i32* %21
%164 = call i64 (i32, ...) @write(i32 %163, %struct.stats_cpu_12_1_7* %11, i64 80)
%165 = icmp slt i64 %164, 0
br i1 %165, label %166, label %169
166: ; preds = %162
%167 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0))
%168 = call i32 @exit(i32 1)
unreachable
169: ; preds = %162
%170 = load i32, i32* %21
%171 = call i64 (i32, ...) @write(i32 %170, %struct.stats_pcsw_ukwn* %15, i64 8)
%172 = icmp slt i64 %171, 0
br i1 %172, label %173, label %176
173: ; preds = %169
%174 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0))
%175 = call i32 @exit(i32 1)
unreachable
176: ; preds = %169
store i32 2, i32* %23
%177 = load i32, i32* %21
%178 = call i64 (i32, ...) @write(i32 %177, i32* %23, i64 4)
%179 = icmp slt i64 %178, 0
br i1 %179, label %180, label %183
180: ; preds = %176
%181 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0))
%182 = call i32 @exit(i32 1)
unreachable
183: ; preds = %176
%184 = load i32, i32* %21
%185 = call i64 (i32, ...) @write(i32 %184, %struct.stats_unknown* %17, i64 16)
%186 = icmp slt i64 %185, 0
br i1 %186, label %187, label %190
187: ; preds = %183
%188 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0))
%189 = call i32 @exit(i32 1)
unreachable
190: ; preds = %183
%191 = load i32, i32* %21
%192 = call i64 (i32, ...) @write(i32 %191, %struct.stats_unknown* %18, i64 16)
%193 = icmp slt i64 %192, 0
br i1 %193, label %194, label %197
194: ; preds = %190
%195 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.15, i64 0, i64 0))
%196 = call i32 @exit(i32 1)
unreachable
197: ; preds = %190
%198 = load i32, i32* %21
%199 = call i64 (i32, ...) @write(i32 %198, %struct.record_header_12_1_7* %8, i64 24)
%200 = icmp slt i64 %199, 0
br i1 %200, label %201, label %204
201: ; preds = %197
%202 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0))
%203 = call i32 @exit(i32 1)
unreachable
204: ; preds = %197
store i32 3, i32* %22
%205 = load i32, i32* %21
%206 = call i64 (i32, ...) @write(i32 %205, i32* %22, i64 4)
%207 = icmp slt i64 %206, 0
br i1 %207, label %208, label %211
208: ; preds = %204
%209 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.17, i64 0, i64 0))
%210 = call i32 @exit(i32 1)
unreachable
211: ; preds = %204
%212 = load i32, i32* %21
%213 = call i64 (i32, ...) @write(i32 %212, %struct.stats_cpu_12_1_7* %12, i64 80)
%214 = icmp slt i64 %213, 0
br i1 %214, label %215, label %218
215: ; preds = %211
%216 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.18, i64 0, i64 0))
%217 = call i32 @exit(i32 1)
unreachable
218: ; preds = %211
%219 = load i32, i32* %21
%220 = call i64 (i32, ...) @write(i32 %219, %struct.stats_cpu_12_1_7* %13, i64 80)
%221 = icmp slt i64 %220, 0
br i1 %221, label %222, label %225
222: ; preds = %218
%223 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.19, i64 0, i64 0))
%224 = call i32 @exit(i32 1)
unreachable
225: ; preds = %218
%226 = load i32, i32* %21
%227 = call i64 (i32, ...) @write(i32 %226, %struct.stats_cpu_12_1_7* %14, i64 80)
%228 = icmp slt i64 %227, 0
br i1 %228, label %229, label %232
229: ; preds = %225
%230 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.20, i64 0, i64 0))
%231 = call i32 @exit(i32 1)
unreachable
232: ; preds = %225
%233 = load i32, i32* %21
%234 = call i64 (i32, ...) @write(i32 %233, %struct.stats_pcsw_ukwn* %16, i64 8)
%235 = icmp slt i64 %234, 0
br i1 %235, label %236, label %239
236: ; preds = %232
%237 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0))
%238 = call i32 @exit(i32 1)
unreachable
239: ; preds = %232
store i32 2, i32* %23
%240 = load i32, i32* %21
%241 = call i64 (i32, ...) @write(i32 %240, i32* %23, i64 4)
%242 = icmp slt i64 %241, 0
br i1 %242, label %243, label %246
243: ; preds = %239
%244 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.22, i64 0, i64 0))
%245 = call i32 @exit(i32 1)
unreachable
246: ; preds = %239
%247 = load i32, i32* %21
%248 = call i64 (i32, ...) @write(i32 %247, %struct.stats_unknown* %19, i64 16)
%249 = icmp slt i64 %248, 0
br i1 %249, label %250, label %253
250: ; preds = %246
%251 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.23, i64 0, i64 0))
%252 = call i32 @exit(i32 1)
unreachable
253: ; preds = %246
%254 = load i32, i32* %21
%255 = call i64 (i32, ...) @write(i32 %254, %struct.stats_unknown* %20, i64 16)
%256 = icmp slt i64 %255, 0
br i1 %256, label %257, label %260
257: ; preds = %253
%258 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.24, i64 0, i64 0))
%259 = call i32 @exit(i32 1)
unreachable
260: ; preds = %253
%261 = load i32, i32* %21
%262 = call i32 @close(i32 %261)
ret i32 0
}

LLVM IR (-O2):
%struct.file_magic_12_1_7 = type { i16, i16, i8, i8, i8, i8, i32, i32, [3 x i32], [48 x i8] }
%struct.file_header_12_1_7 = type { i64, i64, i32, i32, i32, [3 x i32], [3 x i32], i32, i32, i32, i8, i8, i8, [65 x i8], [65 x i8], [65 x i8], [65 x i8] }
%struct.file_activity_12_1_7 = type { i32, i32, i32, i32, i32, i32, [3 x i32] }
%struct.record_header_12_1_7 = type { i64, i64, i32, i8, i8, i8, i8 }
%struct.stats_unknown = type { i64, i64 }
%struct.stats_cpu_12_1_7 = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
%struct.stats_pcsw_ukwn = type { i64 }
@__const.main.f_magic = %struct.file_magic_12_1_7 { i16 -10858, i16 8565, i8 12, i8 1, i8 7, i8 0, i32 0, i32 0, [3 x i32] [i32 1, i32 1, i32 12], [48 x i8] zeroinitializer }
@__const.main.f_header = %struct.file_header_12_1_7 { i64 1568533161, i64 100, i32 3, i32 3, i32 2019, [3 x i32] [i32 0, i32 0, i32 9], [3 x i32] [i32 2, i32 0, i32 1], i32 0, i32 0, i32 0, i8 15, i8 9, i8 8, [65 x i8] c"Linux\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [65 x i8] c"localhost.localdomain\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [65 x i8] c"5.0.16-100.fc28.x86_64\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [65 x i8] c"x86_64\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00" }
@__const.main.f_activity_a_unknown = %struct.file_activity_12_1_7 { i32 255, i32 138, i32 2, i32 1, i32 1, i32 0, [3 x i32] [i32 1, i32 1, i32 0] }
@__const.main.r_header_1 = %struct.record_header_12_1_7 { i64 15000, i64 1568540000, i32 0, i8 1, i8 11, i8 5, i8 58 }
@__const.main.r_header_2 = %struct.record_header_12_1_7 { i64 15200, i64 1568540200, i32 0, i8 1, i8 11, i8 6, i8 1 }
@__const.main.s_ukwn_0_1 = %struct.stats_unknown { i64 123456789, i64 12345 }
@__const.main.s_ukwn_1_1 = %struct.stats_unknown { i64 987654321, i64 54321 }
@__const.main.s_ukwn_0_2 = %struct.stats_unknown { i64 234567891, i64 23456 }
@__const.main.s_ukwn_1_2 = %struct.stats_unknown { i64 198765432, i64 65432 }
@.str = [10 x i8] c"data-ukwn\00"
@O_CREAT = global i32 0
@O_WRONLY = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IRGRP = global i32 0
@S_IROTH = global i32 0
@.str.1 = [5 x i8] c"open\00"
@.str.2 = [17 x i8] c"write file magic\00"
@.str.3 = [18 x i8] c"write file header\00"
@.str.4 = [26 x i8] c"write file activity A_CPU\00"
@.str.5 = [27 x i8] c"write file activity A_PCSW\00"
@.str.6 = [30 x i8] c"write file activity A_UNKNOWN\00"
@.str.7 = [21 x i8] c"write STAT record\00"
@.str.8 = [16 x i8] c"write nr_cpu\00"
@.str.9 = [20 x i8] c"write CPU stats 0_1\00"
@.str.10 = [20 x i8] c"write CPU stats 1_1\00"
@.str.11 = [20 x i8] c"write CPU stats 2_1\00"
@.str.12 = [19 x i8] c"write PCSW stats 1\00"
@.str.13 = [17 x i8] c"write nr_ukwn\00"
@.str.14 = [24 x i8] c"write UNKNOWN stats 0_1\00"
@.str.15 = [24 x i8] c"write UNKNOWN stats 1_1\00"
@.str.16 = [21 x i8] c"write STAT record\00"
@.str.17 = [16 x i8] c"write nr_cpu\00"
@.str.18 = [20 x i8] c"write CPU stats 0_2\00"
@.str.19 = [20 x i8] c"write CPU stats 1_2\00"
@.str.20 = [20 x i8] c"write CPU stats 2_2\00"
@.str.21 = [19 x i8] c"write PCSW stats 2\00"
@.str.22 = [17 x i8] c"write nr_ukwn\00"
@.str.23 = [24 x i8] c"write UNKNOWN stats 0_2\00"
@.str.24 = [24 x i8] c"write UNKNOWN stats 1_2\00"
define i32 @main() {
%1 = alloca %struct.file_magic_12_1_7
%2 = alloca %struct.file_header_12_1_7
%3 = alloca %struct.file_activity_12_1_7
%4 = alloca %struct.file_activity_12_1_7
%5 = alloca %struct.file_activity_12_1_7
%6 = alloca %struct.record_header_12_1_7
%7 = alloca %struct.record_header_12_1_7
%8 = alloca %struct.stats_cpu_12_1_7
%9 = alloca %struct.stats_cpu_12_1_7
%10 = alloca %struct.stats_cpu_12_1_7
%11 = alloca %struct.stats_cpu_12_1_7
%12 = alloca %struct.stats_cpu_12_1_7
%13 = alloca %struct.stats_cpu_12_1_7
%14 = alloca %struct.stats_pcsw_ukwn
%15 = alloca %struct.stats_pcsw_ukwn
%16 = alloca %struct.stats_unknown
%17 = alloca %struct.stats_unknown
%18 = alloca %struct.stats_unknown
%19 = alloca %struct.stats_unknown
%20 = alloca i32
%21 = alloca i32
%22 = alloca [16 x i8]
%23 = bitcast %struct.file_magic_12_1_7* %1 to i8*
%24 = bitcast %struct.file_header_12_1_7* %2 to i8*
%25 = bitcast %struct.file_activity_12_1_7* %3 to i8*
%26 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %3, i64 0, i32 5
%27 = bitcast i32* %26 to i8*
%28 = bitcast %struct.file_activity_12_1_7* %3 to <4 x i32>*
store <4 x i32> <i32 1, i32 139, i32 3, i32 1>, <4 x i32>* %28
%29 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %3, i64 0, i32 4
store i32 1, i32* %29
%30 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %3, i64 0, i32 6, i64 0
store i32 10, i32* %30
%31 = bitcast %struct.file_activity_12_1_7* %4 to i8*
%32 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %4, i64 0, i32 4
%33 = bitcast i32* %32 to i8*
%34 = bitcast %struct.file_activity_12_1_7* %4 to <4 x i32>*
store <4 x i32> <i32 2, i32 255, i32 1, i32 1>, <4 x i32>* %34
%35 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %4, i64 0, i32 6, i64 1
store i32 1, i32* %35
%36 = bitcast %struct.file_activity_12_1_7* %5 to i8*
%37 = bitcast %struct.record_header_12_1_7* %6 to i8*
%38 = bitcast %struct.record_header_12_1_7* %7 to i8*
%39 = bitcast %struct.stats_cpu_12_1_7* %8 to i8*
%40 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %8, i64 0, i32 1
%41 = bitcast i64* %40 to i8*
%42 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %8, i64 0, i32 0
store i64 1000, i64* %42
%43 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %8, i64 0, i32 2
store i64 500, i64* %43
%44 = bitcast %struct.stats_cpu_12_1_7* %9 to i8*
%45 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %9, i64 0, i32 1
%46 = bitcast i64* %45 to i8*
%47 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %9, i64 0, i32 0
store i64 1000, i64* %47
%48 = bitcast %struct.stats_cpu_12_1_7* %10 to i8*
%49 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %10, i64 0, i32 2
store i64 500, i64* %49
%50 = bitcast %struct.stats_cpu_12_1_7* %11 to i8*
%51 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %11, i64 0, i32 1
%52 = bitcast i64* %51 to i8*
%53 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %11, i64 0, i32 0
store i64 1100, i64* %53
%54 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %11, i64 0, i32 2
%55 = bitcast i64* %54 to <2 x i64>*
store <2 x i64> <i64 500, i64 100>, <2 x i64>* %55
%56 = bitcast %struct.stats_cpu_12_1_7* %12 to i8*
%57 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %12, i64 0, i32 1
%58 = bitcast i64* %57 to i8*
%59 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %12, i64 0, i32 0
store i64 1100, i64* %59
%60 = bitcast %struct.stats_cpu_12_1_7* %13 to i8*
%61 = getelementptr inbounds %struct.stats_cpu_12_1_7, %struct.stats_cpu_12_1_7* %13, i64 0, i32 2
%62 = bitcast i64* %61 to <2 x i64>*
store <2 x i64> <i64 500, i64 100>, <2 x i64>* %62
%63 = bitcast %struct.stats_pcsw_ukwn* %14 to i8*
%64 = getelementptr inbounds %struct.stats_pcsw_ukwn, %struct.stats_pcsw_ukwn* %14, i64 0, i32 0
store i64 543, i64* %64
%65 = bitcast %struct.stats_pcsw_ukwn* %15 to i8*
%66 = getelementptr inbounds %struct.stats_pcsw_ukwn, %struct.stats_pcsw_ukwn* %15, i64 0, i32 0
store i64 643, i64* %66
%67 = bitcast %struct.stats_unknown* %16 to i8*
%68 = bitcast %struct.stats_unknown* %17 to i8*
%69 = bitcast %struct.stats_unknown* %18 to i8*
%70 = bitcast %struct.stats_unknown* %19 to i8*
%71 = bitcast i32* %20 to i8*
%72 = bitcast i32* %21 to i8*
%73 = getelementptr inbounds [16 x i8], [16 x i8]* %22, i64 0, i64 0
%74 = call i32 @strcpy(i8* %73, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%75 = load i32, i32* @O_CREAT
%76 = load i32, i32* @O_WRONLY
%77 = or i32 %76, %75
%78 = load i32, i32* @S_IRUSR
%79 = load i32, i32* @S_IWUSR
%80 = or i32 %79, %78
%81 = load i32, i32* @S_IRGRP
%82 = or i32 %80, %81
%83 = load i32, i32* @S_IROTH
%84 = or i32 %82, %83
%85 = call i32 @open(i8* %73, i32 %77, i32 %84)
%86 = icmp slt i32 %85, 0
br i1 %86, label %87, label %90
87: ; preds = %0
%88 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%89 = call i32 @exit(i32 1)
unreachable
90: ; preds = %0
%91 = getelementptr inbounds %struct.file_magic_12_1_7, %struct.file_magic_12_1_7* %1, i64 0, i32 6
store i32 328, i32* %91
%92 = call i64 (i32, ...) @write(i32 %85, %struct.file_magic_12_1_7* %1, i64 76)
%93 = icmp slt i64 %92, 0
br i1 %93, label %94, label %97
94: ; preds = %90
%95 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%96 = call i32 @exit(i32 1)
unreachable
97: ; preds = %90
%98 = getelementptr inbounds %struct.file_header_12_1_7, %struct.file_header_12_1_7* %2, i64 0, i32 7
store i32 36, i32* %98
%99 = getelementptr inbounds %struct.file_header_12_1_7, %struct.file_header_12_1_7* %2, i64 0, i32 8
store i32 24, i32* %99
%100 = call i64 (i32, ...) @write(i32 %85, %struct.file_header_12_1_7* %2, i64 328)
%101 = icmp slt i64 %100, 0
br i1 %101, label %102, label %105
102: ; preds = %97
%103 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%104 = call i32 @exit(i32 1)
unreachable
105: ; preds = %97
%106 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %3, i64 0, i32 5
store i32 80, i32* %106
%107 = call i64 (i32, ...) @write(i32 %85, %struct.file_activity_12_1_7* %3, i64 36)
%108 = icmp slt i64 %107, 0
br i1 %108, label %109, label %112
109: ; preds = %105
%110 = call i32 @perror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%111 = call i32 @exit(i32 1)
unreachable
112: ; preds = %105
%113 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %4, i64 0, i32 5
store i32 8, i32* %113
%114 = call i64 (i32, ...) @write(i32 %85, %struct.file_activity_12_1_7* %4, i64 36)
%115 = icmp slt i64 %114, 0
br i1 %115, label %116, label %119
116: ; preds = %112
%117 = call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%118 = call i32 @exit(i32 1)
unreachable
119: ; preds = %112
%120 = getelementptr inbounds %struct.file_activity_12_1_7, %struct.file_activity_12_1_7* %5, i64 0, i32 5
store i32 16, i32* %120
%121 = call i64 (i32, ...) @write(i32 %85, %struct.file_activity_12_1_7* %5, i64 36)
%122 = icmp slt i64 %121, 0
br i1 %122, label %123, label %126
123: ; preds = %119
%124 = call i32 @perror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%125 = call i32 @exit(i32 1)
unreachable
126: ; preds = %119
%127 = call i64 (i32, ...) @write(i32 %85, %struct.record_header_12_1_7* %6, i64 24)
%128 = icmp slt i64 %127, 0
br i1 %128, label %129, label %132
129: ; preds = %126
%130 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
%131 = call i32 @exit(i32 1)
unreachable
132: ; preds = %126
store i32 3, i32* %20
%133 = call i64 (i32, ...) @write(i32 %85, i32* %20, i64 4)
%134 = icmp slt i64 %133, 0
br i1 %134, label %135, label %138
135: ; preds = %132
%136 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%137 = call i32 @exit(i32 1)
unreachable
138: ; preds = %132
%139 = call i64 (i32, ...) @write(i32 %85, %struct.stats_cpu_12_1_7* %8, i64 80)
%140 = icmp slt i64 %139, 0
br i1 %140, label %141, label %144
141: ; preds = %138
%142 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%143 = call i32 @exit(i32 1)
unreachable
144: ; preds = %138
%145 = call i64 (i32, ...) @write(i32 %85, %struct.stats_cpu_12_1_7* %9, i64 80)
%146 = icmp slt i64 %145, 0
br i1 %146, label %147, label %150
147: ; preds = %144
%148 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
%149 = call i32 @exit(i32 1)
unreachable
150: ; preds = %144
%151 = call i64 (i32, ...) @write(i32 %85, %struct.stats_cpu_12_1_7* %10, i64 80)
%152 = icmp slt i64 %151, 0
br i1 %152, label %153, label %156
153: ; preds = %150
%154 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0))
%155 = call i32 @exit(i32 1)
unreachable
156: ; preds = %150
%157 = call i64 (i32, ...) @write(i32 %85, %struct.stats_pcsw_ukwn* %14, i64 8)
%158 = icmp slt i64 %157, 0
br i1 %158, label %159, label %162
159: ; preds = %156
%160 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0))
%161 = call i32 @exit(i32 1)
unreachable
162: ; preds = %156
store i32 2, i32* %21
%163 = call i64 (i32, ...) @write(i32 %85, i32* %21, i64 4)
%164 = icmp slt i64 %163, 0
br i1 %164, label %165, label %168
165: ; preds = %162
%166 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0))
%167 = call i32 @exit(i32 1)
unreachable
168: ; preds = %162
%169 = call i64 (i32, ...) @write(i32 %85, %struct.stats_unknown* %16, i64 16)
%170 = icmp slt i64 %169, 0
br i1 %170, label %171, label %174
171: ; preds = %168
%172 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0))
%173 = call i32 @exit(i32 1)
unreachable
174: ; preds = %168
%175 = call i64 (i32, ...) @write(i32 %85, %struct.stats_unknown* %17, i64 16)
%176 = icmp slt i64 %175, 0
br i1 %176, label %177, label %180
177: ; preds = %174
%178 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.15, i64 0, i64 0))
%179 = call i32 @exit(i32 1)
unreachable
180: ; preds = %174
%181 = call i64 (i32, ...) @write(i32 %85, %struct.record_header_12_1_7* %7, i64 24)
%182 = icmp slt i64 %181, 0
br i1 %182, label %183, label %186
183: ; preds = %180
%184 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0))
%185 = call i32 @exit(i32 1)
unreachable
186: ; preds = %180
store i32 3, i32* %20
%187 = call i64 (i32, ...) @write(i32 %85, i32* %20, i64 4)
%188 = icmp slt i64 %187, 0
br i1 %188, label %189, label %192
189: ; preds = %186
%190 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.17, i64 0, i64 0))
%191 = call i32 @exit(i32 1)
unreachable
192: ; preds = %186
%193 = call i64 (i32, ...) @write(i32 %85, %struct.stats_cpu_12_1_7* %11, i64 80)
%194 = icmp slt i64 %193, 0
br i1 %194, label %195, label %198
195: ; preds = %192
%196 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.18, i64 0, i64 0))
%197 = call i32 @exit(i32 1)
unreachable
198: ; preds = %192
%199 = call i64 (i32, ...) @write(i32 %85, %struct.stats_cpu_12_1_7* %12, i64 80)
%200 = icmp slt i64 %199, 0
br i1 %200, label %201, label %204
201: ; preds = %198
%202 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.19, i64 0, i64 0))
%203 = call i32 @exit(i32 1)
unreachable
204: ; preds = %198
%205 = call i64 (i32, ...) @write(i32 %85, %struct.stats_cpu_12_1_7* %13, i64 80)
%206 = icmp slt i64 %205, 0
br i1 %206, label %207, label %210
207: ; preds = %204
%208 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.20, i64 0, i64 0))
%209 = call i32 @exit(i32 1)
unreachable
210: ; preds = %204
%211 = call i64 (i32, ...) @write(i32 %85, %struct.stats_pcsw_ukwn* %15, i64 8)
%212 = icmp slt i64 %211, 0
br i1 %212, label %213, label %216
213: ; preds = %210
%214 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0))
%215 = call i32 @exit(i32 1)
unreachable
216: ; preds = %210
store i32 2, i32* %21
%217 = call i64 (i32, ...) @write(i32 %85, i32* %21, i64 4)
%218 = icmp slt i64 %217, 0
br i1 %218, label %219, label %222
219: ; preds = %216
%220 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.22, i64 0, i64 0))
%221 = call i32 @exit(i32 1)
unreachable
222: ; preds = %216
%223 = call i64 (i32, ...) @write(i32 %85, %struct.stats_unknown* %18, i64 16)
%224 = icmp slt i64 %223, 0
br i1 %224, label %225, label %228
225: ; preds = %222
%226 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.23, i64 0, i64 0))
%227 = call i32 @exit(i32 1)
unreachable
228: ; preds = %222
%229 = call i64 (i32, ...) @write(i32 %85, %struct.stats_unknown* %19, i64 16)
%230 = icmp slt i64 %229, 0
br i1 %230, label %231, label %234
231: ; preds = %228
%232 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.24, i64 0, i64 0))
%233 = call i32 @exit(i32 1)
unreachable
234: ; preds = %228
%235 = call i32 @close(i32 %85)
ret i32 0
}