#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 stat {
  int st_size;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ FIBMAP;
int /*<<< orphan*/ FIGETBSZ;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
scalar_t__ fstat(int, struct stat *);
scalar_t__ ioctl(int, int /*<<< orphan*/, int *);
scalar_t__ lseek(int, int, int /*<<< orphan*/);
unsigned char *malloc(int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int read(int, unsigned char *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
char *strerror(int /*<<< orphan*/);
int main(int argc, char **argv) {
  struct stat statinfo1;
  int fd1;
  int num_blocks;
  int block_size;
  int i;
  int sparse_blocks;
  int zero_blocks;
  int copied_blocks;
  int percent = -1;
  unsigned char *buffer1;
  if (argc != 2) {
    fprintf(stderr, "%s a sparse file info utility.\n", argv[0]);
    fprintf(stderr, "Usage: %s FILE1\n", argv[0]);
    exit(EXIT_FAILURE);
  }
  if ((fd1 = open(argv[1], O_RDONLY)) < 0) {
    fprintf(stderr, "Cannot open %s\n", argv[1]);
    exit(EXIT_FAILURE);
  }
  if (ioctl(fd1, FIGETBSZ, &block_size) < 0) {
    fprintf(stderr, "Cannot get block size\n");
    close(fd1);
    exit(EXIT_FAILURE);
  }
  if (fstat(fd1, &statinfo1) < 0) {
    fprintf(stderr, "Cannot stat %s\n", argv[1]);
    close(fd1);
    exit(EXIT_FAILURE);
  }
  num_blocks = (statinfo1.st_size + block_size - 1) / block_size;
  buffer1 = malloc(block_size);
  if (!buffer1) {
    fprintf(stderr, "Cannot allocate buffer\n");
    close(fd1);
    exit(EXIT_FAILURE);
  }
  sparse_blocks = 0;
  zero_blocks = 0;
  copied_blocks = 0;
  for (i = 0; i < num_blocks; i++) {
    int block = i;
    int nread = 0;
    if (ioctl(fd1, FIBMAP, &block)) {
      printf("ioctl failed: %s in block %d, are you root ?\n", strerror(errno),
             i);
      close(fd1);
      exit(EXIT_FAILURE);
    }
    if (percent != ((i + 1) * 100 / num_blocks)) {
      percent = (i + 1) * 100 / num_blocks;
      printf("%08d/%08d (%d%%), S:%08d, Z:%08d, C:%08d  \r", i + 1, num_blocks,
             percent, sparse_blocks, zero_blocks, copied_blocks);
      fflush(0);
    }
    if (!block) {
      if (lseek(fd1, block_size, SEEK_CUR) < 0) {
        fprintf(stderr, "Seek failed.\n");
        close(fd1);
        exit(EXIT_FAILURE);
      }
      sparse_blocks++;
      continue;
    }
    nread = read(fd1, buffer1, block_size);
    if (nread < block_size) {
      if (i != (num_blocks - 1)) {
        fprintf(stderr, "Unexpected short read.\n");
        close(fd1);
        exit(EXIT_FAILURE);
      }
    }
    int n;
    for (n = 0; n < nread; n++) {
      if (buffer1[n])
        break;
    }
    if (n == nread) {
      zero_blocks++;
      continue;
    } else {
      copied_blocks++;
      continue;
    }
  }
  close(fd1);
  fflush(stdout);
  printf("\n");
  printf("Report:\n");
  printf("%d byte block size\n", block_size);
  printf("  total %08d blocks\n", num_blocks);
  printf("  found %08d sparse blocks\n", sparse_blocks);
  printf("  found %08d zero blocks (can be made sparse)\n", zero_blocks);
  printf("  found %08d data blocks\n", copied_blocks);
  printf("  ------------------------------------\n");
  printf("  Sum:  %08d blocks accounted for.\n",
         (sparse_blocks + zero_blocks + copied_blocks));
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x38(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1231 <main+0x71>
mov    0x2dda(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe02(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2dbc(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe04(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2d86(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x2d98(%rip),%rax
mov    (%rax),%esi
call   10b0 <open@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    1280 <main+0xc0>
mov    0x2d6e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xdc6(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2d37(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x1c(%rbp),%edi
mov    0x2d56(%rip),%rax
mov    (%rax),%esi
lea    -0x24(%rbp),%rdx
call   1050 <ioctl@plt>
cmp    $0x0,%rax
jge    12cc <main+0x10c>
mov    0x2d22(%rip),%rax
mov    (%rax),%edi
lea    0xd92(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x1c(%rbp),%edi
call   1060 <close@plt>
mov    0x2ceb(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x1c(%rbp),%edi
lea    -0x18(%rbp),%rsi
call   10e0 <fstat@plt>
cmp    $0x0,%rax
jge    1317 <main+0x157>
mov    0x2cdf(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xd5e(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x1c(%rbp),%edi
call   1060 <close@plt>
mov    0x2ca0(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x18(%rbp),%eax
add    -0x24(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x24(%rbp)
mov    %eax,-0x20(%rbp)
mov    -0x24(%rbp),%edi
call   1090 <malloc@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    136b <main+0x1ab>
mov    0x2c83(%rip),%rax
mov    (%rax),%edi
lea    0xd1a(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x1c(%rbp),%edi
call   1060 <close@plt>
mov    0x2c4c(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1588 <main+0x3c8>
mov    -0x28(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x1c(%rbp),%edi
mov    0x2c0e(%rip),%rax
mov    (%rax),%esi
lea    -0x44(%rbp),%rdx
call   1050 <ioctl@plt>
cmp    $0x0,%rax
je     13f7 <main+0x237>
mov    0x2bfa(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
mov    %rax,%rsi
mov    -0x28(%rbp),%edx
lea    0xca6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%edi
call   1060 <close@plt>
mov    0x2bc0(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x38(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
imul   $0x64,%eax,%eax
cltd
idivl  -0x20(%rbp)
mov    %eax,%ecx
mov    -0x50(%rbp),%eax
cmp    %ecx,%eax
je     1456 <main+0x296>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
imul   $0x64,%eax,%eax
cltd
idivl  -0x20(%rbp)
mov    %eax,-0x38(%rbp)
mov    -0x28(%rbp),%esi
add    $0x1,%esi
mov    -0x20(%rbp),%edx
mov    -0x38(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
mov    -0x30(%rbp),%r9d
mov    -0x34(%rbp),%eax
lea    0xc69(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   10a0 <fflush@plt>
cmpl   $0x0,-0x44(%rbp)
jne    14b9 <main+0x2f9>
mov    -0x1c(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    0x2b7b(%rip),%rax
mov    (%rax),%edx
call   1040 <lseek@plt>
cmp    $0x0,%rax
jge    14ab <main+0x2eb>
mov    0x2b43(%rip),%rax
mov    (%rax),%edi
lea    0xc4c(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x1c(%rbp),%edi
call   1060 <close@plt>
mov    0x2b0c(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    157a <main+0x3ba>
mov    -0x1c(%rbp),%edi
mov    -0x40(%rbp),%rsi
mov    -0x24(%rbp),%edx
call   1070 <read@plt>
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    151a <main+0x35a>
mov    -0x28(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     1515 <main+0x355>
mov    0x2ad9(%rip),%rax
mov    (%rax),%edi
lea    0xbf0(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x1c(%rbp),%edi
call   1060 <close@plt>
mov    0x2aa2(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
jmp    151a <main+0x35a>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x48(%rbp),%eax
jge    1557 <main+0x397>
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1544 <main+0x384>
jmp    1557 <main+0x397>
jmp    1549 <main+0x389>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1521 <main+0x361>
mov    -0x4c(%rbp),%eax
cmp    -0x48(%rbp),%eax
jne    1571 <main+0x3b1>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    157a <main+0x3ba>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1387 <main+0x1c7>
mov    -0x1c(%rbp),%edi
call   1060 <close@plt>
mov    0x2a11(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
lea    0xbd6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xb4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xb45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xb48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xb4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%esi
lea    0xb57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%esi
lea    0xb75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xb81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
add    -0x30(%rbp),%esi
add    -0x34(%rbp),%esi
lea    0xb92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2965(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
cmp    $0x2,%edi
jne    1222 <main+0x42>
mov    0x8(%rbx),%rdi
mov    0x2dd7(%rip),%rax
mov    (%rax),%esi
call   10d0 <open@plt>
test   %eax,%eax
jns    1256 <main+0x76>
mov    0x2db5(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbx),%rdx
lea    0xe11(%rip),%rsi
jmp    124a <main+0x6a>
mov    0x2d9f(%rip),%rbp
mov    0x0(%rbp),%edi
mov    (%rbx),%rdx
lea    0xdca(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    0x0(%rbp),%edi
mov    (%rbx),%rdx
lea    0xdd6(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
jmp    12ed <main+0x10d>
mov    %eax,%ebp
mov    0x2d81(%rip),%rax
mov    (%rax),%esi
lea    0x14(%rsp),%rdx
mov    %ebp,%edi
call   1070 <ioctl@plt>
test   %rax,%rax
jns    1284 <main+0xa4>
mov    0x2d4f(%rip),%rax
mov    (%rax),%edi
lea    0xdbf(%rip),%rsi
jmp    12df <main+0xff>
lea    0x20(%rsp),%rsi
mov    %ebp,%edi
call   1100 <fstat@plt>
test   %rax,%rax
jns    12b2 <main+0xd2>
mov    0x2d2c(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbx),%rdx
lea    0xdaf(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
jmp    12e6 <main+0x106>
mov    0x20(%rsp),%eax
mov    0x14(%rsp),%edi
add    %edi,%eax
add    $0xffffffff,%eax
cltd
idiv   %edi
mov    %eax,%r13d
call   10b0 <malloc@plt>
test   %rax,%rax
jne    12fb <main+0x11b>
mov    0x2cf2(%rip),%rax
mov    (%rax),%edi
lea    0xd89(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    %ebp,%edi
call   1080 <close@plt>
mov    0x2cbc(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>
movl   $0x0,0x8(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
test   %r13d,%r13d
jle    1457 <main+0x277>
mov    %rax,%rbx
lea    -0x1(%r13),%eax
mov    %eax,0x24(%rsp)
movl   $0xffffffff,0x18(%rsp)
ff
xor    %r14d,%r14d
movl   $0x0,0xc(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0x8(%rsp)
jmp    1371 <main+0x191>
nopl   0x0(%rax)
xor    %edx,%edx
xor    %esi,%esi
cmp    %eax,%ecx
setne  %dl
sete   %sil
add    %esi,0x10(%rsp)
add    %edx,0xc(%rsp)
mov    %r15d,%r14d
cmp    %r13d,%r15d
je     1457 <main+0x277>
mov    %r14d,0x1c(%rsp)
mov    0x2c3b(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
lea    0x1c(%rsp),%rdx
call   1070 <ioctl@plt>
test   %rax,%rax
jne    1512 <main+0x332>
lea    0x1(%r14),%r15d
imul   $0x64,%r15d,%eax
cltd
idiv   %r13d
cmp    %eax,0x18(%rsp)
je     13dd <main+0x1fd>
mov    %eax,%r12d
mov    0xc(%rsp),%eax
mov    %eax,(%rsp)
lea    0xcf7(%rip),%rdi
mov    %r15d,%esi
mov    %r13d,%edx
mov    %r12d,%ecx
mov    0x8(%rsp),%r8d
mov    0x10(%rsp),%r9d
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
call   10c0 <fflush@plt>
mov    %r12d,0x18(%rsp)
cmpl   $0x0,0x1c(%rsp)
mov    0x14(%rsp),%edx
je     1430 <main+0x250>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1090 <read@plt>
cmp    0x14(%rsp),%eax
jge    1403 <main+0x223>
cmp    0x24(%rsp),%r14d
jne    1539 <main+0x359>
mov    %eax,%eax
xor    %ecx,%ecx
test   %eax,%eax
jle    1350 <main+0x170>
nop
cmpb   $0x0,(%rbx,%rcx,1)
jne    1350 <main+0x170>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1410 <main+0x230>
mov    %eax,%ecx
jmp    1350 <main+0x170>
nopw   0x0(%rax,%rax,1)
mov    0x2bb1(%rip),%rax
mov    (%rax),%eax
mov    %ebp,%edi
mov    %edx,%esi
mov    %eax,%edx
call   1060 <lseek@plt>
test   %rax,%rax
js     154e <main+0x36e>
addl   $0x1,0x8(%rsp)
jmp    1365 <main+0x185>
mov    %ebp,%edi
call   1080 <close@plt>
mov    0x2b43(%rip),%rax
mov    (%rax),%edi
call   10c0 <fflush@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd35(%rip),%rdi
call   1040 <puts@plt>
mov    0x14(%rsp),%esi
lea    0xc73(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc79(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc7d(%rip),%rdi
mov    0x8(%rsp),%r14d
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc83(%rip),%rdi
mov    0x10(%rsp),%ebx
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc9e(%rip),%rdi
mov    0xc(%rsp),%ebp
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xcd0(%rip),%rdi
call   1040 <puts@plt>
add    %r14d,%ebx
add    %ebp,%ebx
lea    0xc93(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2a95(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>
mov    0x2aa7(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
lea    0xb59(%rip),%rdi
mov    %rax,%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    12e6 <main+0x106>
mov    0x2a88(%rip),%rax
mov    (%rax),%edi
lea    0xb9f(%rip),%rsi
jmp    12df <main+0xff>
mov    0x2a73(%rip),%rax
mov    (%rax),%edi
lea    0xb7c(%rip),%rsi
jmp    12df <main+0xff>

LLVM IR (-O0):
%struct.stat = type { i32 }
@stderr = global i32 0
@.str = [32 x i8] c"%s a sparse file info utility.\0A\00"
@.str.1 = [17 x i8] c"Usage: %s FILE1\0A\00"
@EXIT_FAILURE = global i32 0
@O_RDONLY = global i32 0
@.str.2 = [16 x i8] c"Cannot open %s\0A\00"
@FIGETBSZ = global i32 0
@.str.3 = [23 x i8] c"Cannot get block size\0A\00"
@.str.4 = [16 x i8] c"Cannot stat %s\0A\00"
@.str.5 = [24 x i8] c"Cannot allocate buffer\0A\00"
@FIBMAP = global i32 0
@.str.6 = [46 x i8] c"ioctl failed: %s in block %d, are you root ?\0A\00"
@errno = global i32 0
@.str.7 = [44 x i8] c"%08d/%08d (%d%%), S:%08d, Z:%08d, C:%08d \0D\00"
@SEEK_CUR = global i32 0
@.str.8 = [14 x i8] c"Seek failed.\0A\00"
@.str.9 = [24 x i8] c"Unexpected short read.\0A\00"
@stdout = global i32 0
@.str.10 = [2 x i8] c"\0A\00"
@.str.11 = [9 x i8] c"Report:\0A\00"
@.str.12 = [20 x i8] c"%d byte block size\0A\00"
@.str.13 = [21 x i8] c" total %08d blocks\0A\00"
@.str.14 = [28 x i8] c" found %08d sparse blocks\0A\00"
@.str.15 = [47 x i8] c" found %08d zero blocks (can be made sparse)\0A\00"
@.str.16 = [26 x i8] c" found %08d data blocks\0A\00"
@.str.17 = [40 x i8] c" ------------------------------------\0A\00"
@.str.18 = [36 x i8] c" Sum: %08d blocks accounted for.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.stat
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 -1, i32* %14
%19 = load i32, i32* %4
%20 = icmp ne i32 %19, 2
br i1 %20, label %21, label %34
21: ; preds = %2
%22 = load i32, i32* @stderr
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 0
%25 = load i8*, i8** %24
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %25)
%27 = load i32, i32* @stderr
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 0
%30 = load i8*, i8** %29
%31 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %30)
%32 = load i32, i32* @EXIT_FAILURE
%33 = call i32 @exit(i32 %32)
unreachable
34: ; preds = %2
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = load i8*, i8** %36
%38 = load i32, i32* @O_RDONLY
%39 = call i32 @open(i8* %37, i32 %38)
store i32 %39, i32* %7
%40 = icmp slt i32 %39, 0
br i1 %40, label %41, label %49
41: ; preds = %34
%42 = load i32, i32* @stderr
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 1
%45 = load i8*, i8** %44
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %45)
%47 = load i32, i32* @EXIT_FAILURE
%48 = call i32 @exit(i32 %47)
unreachable
49: ; preds = %34
%50 = load i32, i32* %7
%51 = load i32, i32* @FIGETBSZ
%52 = call i64 @ioctl(i32 %50, i32 %51, i32* %9)
%53 = icmp slt i64 %52, 0
br i1 %53, label %54, label %61
54: ; preds = %49
%55 = load i32, i32* @stderr
%56 = call i32 (i32, i8*, ...) @fprintf(i32 %55, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%57 = load i32, i32* %7
%58 = call i32 @close(i32 %57)
%59 = load i32, i32* @EXIT_FAILURE
%60 = call i32 @exit(i32 %59)
unreachable
61: ; preds = %49
%62 = load i32, i32* %7
%63 = call i64 @fstat(i32 %62, %struct.stat* %6)
%64 = icmp slt i64 %63, 0
br i1 %64, label %65, label %75
65: ; preds = %61
%66 = load i32, i32* @stderr
%67 = load i8**, i8*** %5
%68 = getelementptr inbounds i8*, i8** %67, i64 1
%69 = load i8*, i8** %68
%70 = call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* %69)
%71 = load i32, i32* %7
%72 = call i32 @close(i32 %71)
%73 = load i32, i32* @EXIT_FAILURE
%74 = call i32 @exit(i32 %73)
unreachable
75: ; preds = %61
%76 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%77 = load i32, i32* %76
%78 = load i32, i32* %9
%79 = add nsw i32 %77, %78
%80 = sub nsw i32 %79, 1
%81 = load i32, i32* %9
%82 = sdiv i32 %80, %81
store i32 %82, i32* %8
%83 = load i32, i32* %9
%84 = call i8* @malloc(i32 %83)
store i8* %84, i8** %15
%85 = load i8*, i8** %15
%86 = icmp ne i8* %85, null
br i1 %86, label %94, label %87
87: ; preds = %75
%88 = load i32, i32* @stderr
%89 = call i32 (i32, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%90 = load i32, i32* %7
%91 = call i32 @close(i32 %90)
%92 = load i32, i32* @EXIT_FAILURE
%93 = call i32 @exit(i32 %92)
unreachable
94: ; preds = %75
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %10
br label %95
95: ; preds = %204, %94
%96 = load i32, i32* %10
%97 = load i32, i32* %8
%98 = icmp slt i32 %96, %97
br i1 %98, label %99, label %207
99: ; preds = %95
%100 = load i32, i32* %10
store i32 %100, i32* %16
store i32 0, i32* %17
%101 = load i32, i32* %7
%102 = load i32, i32* @FIBMAP
%103 = call i64 @ioctl(i32 %101, i32 %102, i32* %16)
%104 = icmp ne i64 %103, 0
br i1 %104, label %105, label %114
105: ; preds = %99
%106 = load i32, i32* @errno
%107 = call i8* @strerror(i32 %106)
%108 = load i32, i32* %10
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0), i8* %107, i32 %108)
%110 = load i32, i32* %7
%111 = call i32 @close(i32 %110)
%112 = load i32, i32* @EXIT_FAILURE
%113 = call i32 @exit(i32 %112)
unreachable
114: ; preds = %99
%115 = load i32, i32* %14
%116 = load i32, i32* %10
%117 = add nsw i32 %116, 1
%118 = mul nsw i32 %117, 100
%119 = load i32, i32* %8
%120 = sdiv i32 %118, %119
%121 = icmp ne i32 %115, %120
br i1 %121, label %122, label %137
122: ; preds = %114
%123 = load i32, i32* %10
%124 = add nsw i32 %123, 1
%125 = mul nsw i32 %124, 100
%126 = load i32, i32* %8
%127 = sdiv i32 %125, %126
store i32 %127, i32* %14
%128 = load i32, i32* %10
%129 = add nsw i32 %128, 1
%130 = load i32, i32* %8
%131 = load i32, i32* %14
%132 = load i32, i32* %11
%133 = load i32, i32* %12
%134 = load i32, i32* %13
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.7, i64 0, i64 0), i32 %129, i32 %130, i32 %131, i32 %132, i32 %133, i32 %134)
%136 = call i32 @fflush(i32 0)
br label %137
137: ; preds = %122, %114
%138 = load i32, i32* %16
%139 = icmp ne i32 %138, 0
br i1 %139, label %156, label %140
140: ; preds = %137
%141 = load i32, i32* %7
%142 = load i32, i32* %9
%143 = load i32, i32* @SEEK_CUR
%144 = call i64 @lseek(i32 %141, i32 %142, i32 %143)
%145 = icmp slt i64 %144, 0
br i1 %145, label %146, label %153
146: ; preds = %140
%147 = load i32, i32* @stderr
%148 = call i32 (i32, i8*, ...) @fprintf(i32 %147, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%149 = load i32, i32* %7
%150 = call i32 @close(i32 %149)
%151 = load i32, i32* @EXIT_FAILURE
%152 = call i32 @exit(i32 %151)
unreachable
153: ; preds = %140
%154 = load i32, i32* %11
%155 = add nsw i32 %154, 1
store i32 %155, i32* %11
br label %204
156: ; preds = %137
%157 = load i32, i32* %7
%158 = load i8*, i8** %15
%159 = load i32, i32* %9
%160 = call i32 @read(i32 %157, i8* %158, i32 %159)
store i32 %160, i32* %17
%161 = load i32, i32* %17
%162 = load i32, i32* %9
%163 = icmp slt i32 %161, %162
br i1 %163, label %164, label %177
164: ; preds = %156
%165 = load i32, i32* %10
%166 = load i32, i32* %8
%167 = sub nsw i32 %166, 1
%168 = icmp ne i32 %165, %167
br i1 %168, label %169, label %176
169: ; preds = %164
%170 = load i32, i32* @stderr
%171 = call i32 (i32, i8*, ...) @fprintf(i32 %170, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%172 = load i32, i32* %7
%173 = call i32 @close(i32 %172)
%174 = load i32, i32* @EXIT_FAILURE
%175 = call i32 @exit(i32 %174)
unreachable
176: ; preds = %164
br label %177
177: ; preds = %176, %156
store i32 0, i32* %18
br label %178
178: ; preds = %191, %177
%179 = load i32, i32* %18
%180 = load i32, i32* %17
%181 = icmp slt i32 %179, %180
br i1 %181, label %182, label %194
182: ; preds = %178
%183 = load i8*, i8** %15
%184 = load i32, i32* %18
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds i8, i8* %183, i64 %185
%187 = load i8, i8* %186
%188 = icmp ne i8 %187, 0
br i1 %188, label %189, label %190
189: ; preds = %182
br label %194
190: ; preds = %182
br label %191
191: ; preds = %190
%192 = load i32, i32* %18
%193 = add nsw i32 %192, 1
store i32 %193, i32* %18
br label %178
194: ; preds = %189, %178
%195 = load i32, i32* %18
%196 = load i32, i32* %17
%197 = icmp eq i32 %195, %196
br i1 %197, label %198, label %201
198: ; preds = %194
%199 = load i32, i32* %12
%200 = add nsw i32 %199, 1
store i32 %200, i32* %12
br label %204
201: ; preds = %194
%202 = load i32, i32* %13
%203 = add nsw i32 %202, 1
store i32 %203, i32* %13
br label %204
204: ; preds = %201, %198, %153
%205 = load i32, i32* %10
%206 = add nsw i32 %205, 1
store i32 %206, i32* %10
br label %95
207: ; preds = %95
%208 = load i32, i32* %7
%209 = call i32 @close(i32 %208)
%210 = load i32, i32* @stdout
%211 = call i32 @fflush(i32 %210)
%212 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%213 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
%214 = load i32, i32* %9
%215 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 %214)
%216 = load i32, i32* %8
%217 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0), i32 %216)
%218 = load i32, i32* %11
%219 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0), i32 %218)
%220 = load i32, i32* %12
%221 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.15, i64 0, i64 0), i32 %220)
%222 = load i32, i32* %13
%223 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i32 %222)
%224 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.17, i64 0, i64 0))
%225 = load i32, i32* %11
%226 = load i32, i32* %12
%227 = add nsw i32 %225, %226
%228 = load i32, i32* %13
%229 = add nsw i32 %227, %228
%230 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.18, i64 0, i64 0), i32 %229)
%231 = load i32, i32* @EXIT_SUCCESS
%232 = call i32 @exit(i32 %231)
unreachable
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@stderr = global i32 0
@.str = [32 x i8] c"%s a sparse file info utility.\0A\00"
@.str.1 = [17 x i8] c"Usage: %s FILE1\0A\00"
@EXIT_FAILURE = global i32 0
@O_RDONLY = global i32 0
@.str.2 = [16 x i8] c"Cannot open %s\0A\00"
@FIGETBSZ = global i32 0
@.str.3 = [23 x i8] c"Cannot get block size\0A\00"
@.str.4 = [16 x i8] c"Cannot stat %s\0A\00"
@.str.5 = [24 x i8] c"Cannot allocate buffer\0A\00"
@FIBMAP = global i32 0
@.str.6 = [46 x i8] c"ioctl failed: %s in block %d, are you root ?\0A\00"
@errno = global i32 0
@.str.7 = [44 x i8] c"%08d/%08d (%d%%), S:%08d, Z:%08d, C:%08d \0D\00"
@SEEK_CUR = global i32 0
@.str.8 = [14 x i8] c"Seek failed.\0A\00"
@.str.9 = [24 x i8] c"Unexpected short read.\0A\00"
@stdout = global i32 0
@.str.12 = [20 x i8] c"%d byte block size\0A\00"
@.str.13 = [21 x i8] c" total %08d blocks\0A\00"
@.str.14 = [28 x i8] c" found %08d sparse blocks\0A\00"
@.str.15 = [47 x i8] c" found %08d zero blocks (can be made sparse)\0A\00"
@.str.16 = [26 x i8] c" found %08d data blocks\0A\00"
@.str.18 = [36 x i8] c" Sum: %08d blocks accounted for.\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [8 x i8] c"Report:\00"
@str.19 = [39 x i8] c" ------------------------------------\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.stat
%4 = alloca i32
%5 = alloca i32
%6 = bitcast %struct.stat* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = icmp eq i32 %0, 2
br i1 %8, label %18, label %9
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %1
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i32, i32* @stderr
%14 = load i8*, i8** %1
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%16 = load i32, i32* @EXIT_FAILURE
%17 = tail call i32 @exit(i32 %16)
unreachable
18: ; preds = %2
%19 = getelementptr inbounds i8*, i8** %1, i64 1
%20 = load i8*, i8** %19
%21 = load i32, i32* @O_RDONLY
%22 = tail call i32 @open(i8* %20, i32 %21)
%23 = icmp slt i32 %22, 0
br i1 %23, label %24, label %30
24: ; preds = %18
%25 = load i32, i32* @stderr
%26 = load i8*, i8** %19
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %26)
%28 = load i32, i32* @EXIT_FAILURE
%29 = tail call i32 @exit(i32 %28)
unreachable
30: ; preds = %18
%31 = load i32, i32* @FIGETBSZ
%32 = call i64 @ioctl(i32 %22, i32 %31, i32* %4)
%33 = icmp slt i64 %32, 0
br i1 %33, label %34, label %40
34: ; preds = %30
%35 = load i32, i32* @stderr
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%37 = call i32 @close(i32 %22)
%38 = load i32, i32* @EXIT_FAILURE
%39 = call i32 @exit(i32 %38)
unreachable
40: ; preds = %30
%41 = call i64 @fstat(i32 %22, %struct.stat* %3)
%42 = icmp slt i64 %41, 0
br i1 %42, label %43, label %50
43: ; preds = %40
%44 = load i32, i32* @stderr
%45 = load i8*, i8** %19
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* %45)
%47 = call i32 @close(i32 %22)
%48 = load i32, i32* @EXIT_FAILURE
%49 = call i32 @exit(i32 %48)
unreachable
50: ; preds = %40
%51 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%52 = load i32, i32* %51
%53 = load i32, i32* %4
%54 = add i32 %52, -1
%55 = add i32 %54, %53
%56 = sdiv i32 %55, %53
%57 = call i8* @malloc(i32 %53)
%58 = icmp eq i8* %57, null
br i1 %58, label %64, label %59
59: ; preds = %50
%60 = icmp sgt i32 %56, 0
br i1 %60, label %61, label %150
61: ; preds = %59
%62 = bitcast i32* %5 to i8*
%63 = add nsw i32 %56, -1
br label %70
64: ; preds = %50
%65 = load i32, i32* @stderr
%66 = call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%67 = call i32 @close(i32 %22)
%68 = load i32, i32* @EXIT_FAILURE
%69 = call i32 @exit(i32 %68)
unreachable
70: ; preds = %61, %145
%71 = phi i32 [ 0, %61 ], [ %87, %145 ]
%72 = phi i32 [ -1, %61 ], [ %95, %145 ]
%73 = phi i32 [ 0, %61 ], [ %148, %145 ]
%74 = phi i32 [ 0, %61 ], [ %147, %145 ]
%75 = phi i32 [ 0, %61 ], [ %146, %145 ]
store i32 %71, i32* %5
%76 = load i32, i32* @FIBMAP
%77 = call i64 @ioctl(i32 %22, i32 %76, i32* %5)
%78 = icmp eq i64 %77, 0
br i1 %78, label %86, label %79
79: ; preds = %70
%80 = load i32, i32* @errno
%81 = call i8* @strerror(i32 %80)
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0), i8* %81, i32 %71)
%83 = call i32 @close(i32 %22)
%84 = load i32, i32* @EXIT_FAILURE
%85 = call i32 @exit(i32 %84)
unreachable
86: ; preds = %70
%87 = add nuw nsw i32 %71, 1
%88 = mul nsw i32 %87, 100
%89 = sdiv i32 %88, %56
%90 = icmp eq i32 %72, %89
br i1 %90, label %94, label %91
91: ; preds = %86
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.7, i64 0, i64 0), i32 %87, i32 %56, i32 %89, i32 %75, i32 %74, i32 %73)
%93 = call i32 @fflush(i32 0)
br label %94
94: ; preds = %91, %86
%95 = phi i32 [ %89, %91 ], [ %72, %86 ]
%96 = load i32, i32* %5
%97 = icmp eq i32 %96, 0
%98 = load i32, i32* %4
br i1 %97, label %99, label %111
99: ; preds = %94
%100 = load i32, i32* @SEEK_CUR
%101 = call i64 @lseek(i32 %22, i32 %98, i32 %100)
%102 = icmp slt i64 %101, 0
br i1 %102, label %103, label %109
103: ; preds = %99
%104 = load i32, i32* @stderr
%105 = call i32 (i32, i8*, ...) @fprintf(i32 %104, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%106 = call i32 @close(i32 %22)
%107 = load i32, i32* @EXIT_FAILURE
%108 = call i32 @exit(i32 %107)
unreachable
109: ; preds = %99
%110 = add nsw i32 %75, 1
br label %145
111: ; preds = %94
%112 = call i32 @read(i32 %22, i8* %57, i32 %98)
%113 = load i32, i32* %4
%114 = icmp sge i32 %112, %113
%115 = icmp eq i32 %71, %63
%116 = select i1 %114, i1 true, i1 %115
br i1 %116, label %117, label %121
117: ; preds = %111
%118 = icmp sgt i32 %112, 0
br i1 %118, label %119, label %137
119: ; preds = %117
%120 = zext i32 %112 to i64
br label %127
121: ; preds = %111
%122 = load i32, i32* @stderr
%123 = call i32 (i32, i8*, ...) @fprintf(i32 %122, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%124 = call i32 @close(i32 %22)
%125 = load i32, i32* @EXIT_FAILURE
%126 = call i32 @exit(i32 %125)
unreachable
127: ; preds = %119, %132
%128 = phi i64 [ 0, %119 ], [ %133, %132 ]
%129 = getelementptr inbounds i8, i8* %57, i64 %128
%130 = load i8, i8* %129
%131 = icmp eq i8 %130, 0
br i1 %131, label %132, label %135
132: ; preds = %127
%133 = add nuw nsw i64 %128, 1
%134 = icmp eq i64 %133, %120
br i1 %134, label %137, label %127
135: ; preds = %127
%136 = trunc i64 %128 to i32
br label %137
137: ; preds = %132, %135, %117
%138 = phi i32 [ 0, %117 ], [ %136, %135 ], [ %112, %132 ]
%139 = icmp eq i32 %138, %112
%140 = zext i1 %139 to i32
%141 = add nsw i32 %74, %140
%142 = xor i1 %139, true
%143 = zext i1 %142 to i32
%144 = add nsw i32 %73, %143
br label %145
145: ; preds = %137, %109
%146 = phi i32 [ %75, %137 ], [ %110, %109 ]
%147 = phi i32 [ %141, %137 ], [ %74, %109 ]
%148 = phi i32 [ %144, %137 ], [ %73, %109 ]
%149 = icmp eq i32 %87, %56
br i1 %149, label %150, label %70
150: ; preds = %145, %59
%151 = phi i32 [ 0, %59 ], [ %146, %145 ]
%152 = phi i32 [ 0, %59 ], [ %147, %145 ]
%153 = phi i32 [ 0, %59 ], [ %148, %145 ]
%154 = call i32 @close(i32 %22)
%155 = load i32, i32* @stdout
%156 = call i32 @fflush(i32 %155)
%157 = call i32 @putchar(i32 10)
%158 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%159 = load i32, i32* %4
%160 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 %159)
%161 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0), i32 %56)
%162 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0), i32 %151)
%163 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.15, i64 0, i64 0), i32 %152)
%164 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i32 %153)
%165 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.19, i64 0, i64 0))
%166 = add nsw i32 %152, %151
%167 = add nsw i32 %166, %153
%168 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.18, i64 0, i64 0), i32 %167)
%169 = load i32, i32* @EXIT_SUCCESS
%170 = call i32 @exit(i32 %169)
unreachable
}