#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_dev;
  int st_ino;
  int st_mode;
  int st_nlink;
  int st_uid;
  int st_gid;
  int st_rdev;
  int st_size;
  int st_blksize;
  int st_blocks;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int snprintf(char *, int, char *, int);
int /*<<< orphan*/ stderr;
int longest_len(struct stat s, int *maxlen) {
  char buf[160];
  int len;
  *maxlen = 0;
  len = snprintf(buf, 160, "%lu", s.st_dev);
  if (len < 0) {
    fprintf(stderr, "snprintf returned %d when printing st_dev\n", len);
    return 1;
  } else if (len > *maxlen) {
    *maxlen = len;
  }
  len = snprintf(buf, 160, "%lu", s.st_ino);
  if (len < 0) {
    fprintf(stderr, "snprintf returned %d when printing st_ino\n", len);
    return 1;
  } else if (len > *maxlen) {
    *maxlen = len;
  }
  len = snprintf(buf, 160, "%d", s.st_mode);
  if (len < 0) {
    fprintf(stderr, "snprintf returned %d when printing st_mode\n", len);
    return 1;
  } else if (len > *maxlen) {
    *maxlen = len;
  }
  len = snprintf(buf, 160, "%lu", s.st_nlink);
  if (len < 0) {
    fprintf(stderr, "snprintf returned %d when printing st_nlink\n", len);
    return 1;
  } else if (len > *maxlen) {
    *maxlen = len;
  }
  len = snprintf(buf, 160, "%d", s.st_uid);
  if (len < 0) {
    fprintf(stderr, "snprintf returned %d when printing st_uid\n", len);
    return 1;
  } else if (len > *maxlen) {
    *maxlen = len;
  }
  len = snprintf(buf, 160, "%d", s.st_gid);
  if (len < 0) {
    fprintf(stderr, "snprintf returned %d when printing st_gid\n", len);
    return 1;
  } else if (len > *maxlen) {
    *maxlen = len;
  }
  len = snprintf(buf, 160, "%lu", s.st_rdev);
  if (len < 0) {
    fprintf(stderr, "snprintf returned %d when printing st_rdev\n", len);
    return 1;
  } else if (len > *maxlen) {
    *maxlen = len;
  }
  len = snprintf(buf, 160, "%lu", s.st_size);
  if (len < 0) {
    fprintf(stderr, "snprintf returned %d when printing st_size\n", len);
    return 1;
  } else if (len > *maxlen) {
    *maxlen = len;
  }
  len = snprintf(buf, 160, "%lu", s.st_blksize);
  if (len < 0) {
    fprintf(stderr, "snprintf returned %d when printing st_blksize\n", len);
    return 1;
  } else if (len > *maxlen) {
    *maxlen = len;
  }
  len = snprintf(buf, 160, "%lu", s.st_blocks);
  if (len < 0) {
    fprintf(stderr, "snprintf returned %d when printing st_blocks\n", len);
    return 1;
  } else if (len > *maxlen) {
    *maxlen = len;
  }
  return 0;
}


x86 assembly (clang, -O0):
<longest_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
lea    0x10(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
movl   $0x0,(%rcx)
lea    -0xb0(%rbp),%rdi
mov    (%rax),%ecx
mov    $0xa0,%esi
lea    0xea7(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0xb4(%rbp)
cmpl   $0x0,-0xb4(%rbp)
jge    1198 <longest_len+0x78>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
mov    -0xb4(%rbp),%edx
lea    0xe7d(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1639 <longest_len+0x519>
mov    -0xb4(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jle    11b6 <longest_len+0x96>
mov    -0xb4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    11bb <longest_len+0x9b>
mov    -0xc0(%rbp),%rax
lea    -0xb0(%rbp),%rdi
mov    0x4(%rax),%ecx
mov    $0xa0,%esi
lea    0xe28(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0xb4(%rbp)
cmpl   $0x0,-0xb4(%rbp)
jge    1217 <longest_len+0xf7>
mov    0x2de9(%rip),%rax
mov    (%rax),%edi
mov    -0xb4(%rbp),%edx
lea    0xe29(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1639 <longest_len+0x519>
mov    -0xb4(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jle    1235 <longest_len+0x115>
mov    -0xb4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    123a <longest_len+0x11a>
mov    -0xc0(%rbp),%rax
lea    -0xb0(%rbp),%rdi
mov    0x8(%rax),%ecx
mov    $0xa0,%esi
lea    0xe03(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0xb4(%rbp)
cmpl   $0x0,-0xb4(%rbp)
jge    1296 <longest_len+0x176>
mov    0x2d6a(%rip),%rax
mov    (%rax),%edi
mov    -0xb4(%rbp),%edx
lea    0xdd8(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1639 <longest_len+0x519>
mov    -0xb4(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jle    12b4 <longest_len+0x194>
mov    -0xb4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    12b9 <longest_len+0x199>
mov    -0xc0(%rbp),%rax
lea    -0xb0(%rbp),%rdi
mov    0xc(%rax),%ecx
mov    $0xa0,%esi
lea    0xd2a(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0xb4(%rbp)
cmpl   $0x0,-0xb4(%rbp)
jge    1315 <longest_len+0x1f5>
mov    0x2ceb(%rip),%rax
mov    (%rax),%edi
mov    -0xb4(%rbp),%edx
lea    0xd85(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1639 <longest_len+0x519>
mov    -0xb4(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jle    1333 <longest_len+0x213>
mov    -0xb4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1338 <longest_len+0x218>
mov    -0xc0(%rbp),%rax
lea    -0xb0(%rbp),%rdi
mov    0x10(%rax),%ecx
mov    $0xa0,%esi
lea    0xd05(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0xb4(%rbp)
cmpl   $0x0,-0xb4(%rbp)
jge    1394 <longest_len+0x274>
mov    0x2c6c(%rip),%rax
mov    (%rax),%edi
mov    -0xb4(%rbp),%edx
lea    0xd33(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1639 <longest_len+0x519>
mov    -0xb4(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jle    13b2 <longest_len+0x292>
mov    -0xb4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    13b7 <longest_len+0x297>
mov    -0xc0(%rbp),%rax
lea    -0xb0(%rbp),%rdi
mov    0x14(%rax),%ecx
mov    $0xa0,%esi
lea    0xc86(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0xb4(%rbp)
cmpl   $0x0,-0xb4(%rbp)
jge    1413 <longest_len+0x2f3>
mov    0x2bed(%rip),%rax
mov    (%rax),%edi
mov    -0xb4(%rbp),%edx
lea    0xcdf(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1639 <longest_len+0x519>
mov    -0xb4(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jle    1431 <longest_len+0x311>
mov    -0xb4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1436 <longest_len+0x316>
mov    -0xc0(%rbp),%rax
lea    -0xb0(%rbp),%rdi
mov    0x18(%rax),%ecx
mov    $0xa0,%esi
lea    0xbad(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0xb4(%rbp)
cmpl   $0x0,-0xb4(%rbp)
jge    1492 <longest_len+0x372>
mov    0x2b6e(%rip),%rax
mov    (%rax),%edi
mov    -0xb4(%rbp),%edx
lea    0xc8b(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1639 <longest_len+0x519>
mov    -0xb4(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jle    14b0 <longest_len+0x390>
mov    -0xb4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    14b5 <longest_len+0x395>
mov    -0xc0(%rbp),%rax
lea    -0xb0(%rbp),%rdi
mov    0x1c(%rax),%ecx
mov    $0xa0,%esi
lea    0xb2e(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0xb4(%rbp)
cmpl   $0x0,-0xb4(%rbp)
jge    1511 <longest_len+0x3f1>
mov    0x2aef(%rip),%rax
mov    (%rax),%edi
mov    -0xb4(%rbp),%edx
lea    0xc38(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1639 <longest_len+0x519>
mov    -0xb4(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jle    152f <longest_len+0x40f>
mov    -0xb4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1534 <longest_len+0x414>
mov    -0xc0(%rbp),%rax
lea    -0xb0(%rbp),%rdi
mov    0x20(%rax),%ecx
mov    $0xa0,%esi
lea    0xaaf(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0xb4(%rbp)
cmpl   $0x0,-0xb4(%rbp)
jge    1590 <longest_len+0x470>
mov    0x2a70(%rip),%rax
mov    (%rax),%edi
mov    -0xb4(%rbp),%edx
lea    0xbe5(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1639 <longest_len+0x519>
mov    -0xb4(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jle    15ae <longest_len+0x48e>
mov    -0xb4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    15b3 <longest_len+0x493>
mov    -0xc0(%rbp),%rax
lea    -0xb0(%rbp),%rdi
mov    0x24(%rax),%ecx
mov    $0xa0,%esi
lea    0xa30(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0xb4(%rbp)
cmpl   $0x0,-0xb4(%rbp)
jge    160f <longest_len+0x4ef>
mov    0x29f1(%rip),%rax
mov    (%rax),%edi
mov    -0xb4(%rbp),%edx
lea    0xb95(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1639 <longest_len+0x519>
mov    -0xb4(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jle    162d <longest_len+0x50d>
mov    -0xb4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1632 <longest_len+0x512>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<longest_len>:
push   %r14
push   %rbx
sub    $0xa8,%rsp
mov    %rdi,%rbx
movl   $0x0,(%rdi)
mov    0xc0(%rsp),%ecx
lea    0xebf(%rip),%rdx
mov    %rsp,%rdi
mov    $0xa0,%esi
call   1030 <snprintf@plt>
test   %eax,%eax
js     12c7 <longest_len+0x1a7>
lea    0xc0(%rsp),%r14
cmp    (%rbx),%eax
jle    1164 <longest_len+0x44>
mov    %eax,(%rbx)
mov    0x4(%r14),%ecx
lea    0xe91(%rip),%rdx
mov    %rsp,%rdi
mov    $0xa0,%esi
call   1030 <snprintf@plt>
test   %eax,%eax
js     12dc <longest_len+0x1bc>
cmp    (%rbx),%eax
jle    118a <longest_len+0x6a>
mov    %eax,(%rbx)
mov    0x8(%r14),%ecx
lea    0xec5(%rip),%rdx
mov    %rsp,%rdi
mov    $0xa0,%esi
call   1030 <snprintf@plt>
test   %eax,%eax
js     12ee <longest_len+0x1ce>
cmp    (%rbx),%eax
jle    11b0 <longest_len+0x90>
mov    %eax,(%rbx)
mov    0xc(%r14),%ecx
lea    0xe45(%rip),%rdx
mov    %rsp,%rdi
mov    $0xa0,%esi
call   1030 <snprintf@plt>
test   %eax,%eax
js     1300 <longest_len+0x1e0>
cmp    (%rbx),%eax
jle    11d6 <longest_len+0xb6>
mov    %eax,(%rbx)
mov    0x10(%r14),%ecx
lea    0xe79(%rip),%rdx
mov    %rsp,%rdi
mov    $0xa0,%esi
call   1030 <snprintf@plt>
test   %eax,%eax
js     1312 <longest_len+0x1f2>
cmp    (%rbx),%eax
jle    11fc <longest_len+0xdc>
mov    %eax,(%rbx)
mov    0x14(%r14),%ecx
lea    0xe53(%rip),%rdx
mov    %rsp,%rdi
mov    $0xa0,%esi
call   1030 <snprintf@plt>
test   %eax,%eax
js     1324 <longest_len+0x204>
cmp    (%rbx),%eax
jle    1222 <longest_len+0x102>
mov    %eax,(%rbx)
mov    0x18(%r14),%ecx
lea    0xdd3(%rip),%rdx
mov    %rsp,%rdi
mov    $0xa0,%esi
call   1030 <snprintf@plt>
test   %eax,%eax
js     1336 <longest_len+0x216>
cmp    (%rbx),%eax
jle    1248 <longest_len+0x128>
mov    %eax,(%rbx)
mov    0x1c(%r14),%ecx
lea    0xdad(%rip),%rdx
mov    %rsp,%rdi
mov    $0xa0,%esi
call   1030 <snprintf@plt>
test   %eax,%eax
js     1348 <longest_len+0x228>
cmp    (%rbx),%eax
jle    126e <longest_len+0x14e>
mov    %eax,(%rbx)
mov    0x20(%r14),%ecx
lea    0xd87(%rip),%rdx
mov    %rsp,%rdi
mov    $0xa0,%esi
call   1030 <snprintf@plt>
test   %eax,%eax
js     135a <longest_len+0x23a>
cmp    (%rbx),%eax
jle    1294 <longest_len+0x174>
mov    %eax,(%rbx)
mov    0x24(%r14),%ecx
lea    0xd61(%rip),%rdx
mov    %rsp,%rdi
mov    $0xa0,%esi
call   1030 <snprintf@plt>
mov    %eax,%edx
test   %eax,%eax
js     1381 <longest_len+0x261>
xor    %eax,%eax
cmp    (%rbx),%edx
jle    1376 <longest_len+0x256>
mov    %edx,(%rbx)
jmp    1376 <longest_len+0x256>
mov    0x2d12(%rip),%rcx
mov    (%rcx),%edi
lea    0xd2d(%rip),%rsi
jmp    136a <longest_len+0x24a>
mov    0x2cfd(%rip),%rcx
mov    (%rcx),%edi
lea    0xd43(%rip),%rsi
jmp    136a <longest_len+0x24a>
mov    0x2ceb(%rip),%rcx
mov    (%rcx),%edi
lea    0xd5f(%rip),%rsi
jmp    136a <longest_len+0x24a>
mov    0x2cd9(%rip),%rcx
mov    (%rcx),%edi
lea    0xd79(%rip),%rsi
jmp    136a <longest_len+0x24a>
mov    0x2cc7(%rip),%rcx
mov    (%rcx),%edi
lea    0xd94(%rip),%rsi
jmp    136a <longest_len+0x24a>
mov    0x2cb5(%rip),%rcx
mov    (%rcx),%edi
lea    0xdad(%rip),%rsi
jmp    136a <longest_len+0x24a>
mov    0x2ca3(%rip),%rcx
mov    (%rcx),%edi
lea    0xdc6(%rip),%rsi
jmp    136a <longest_len+0x24a>
mov    0x2c91(%rip),%rcx
mov    (%rcx),%edi
lea    0xde0(%rip),%rsi
jmp    136a <longest_len+0x24a>
mov    0x2c7f(%rip),%rcx
mov    (%rcx),%edi
lea    0xdfa(%rip),%rsi
mov    %eax,%edx
call   1040 <fprintf@plt>
mov    $0x1,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2c58(%rip),%rax
mov    (%rax),%edi
lea    0xe02(%rip),%rsi
jmp    136c <longest_len+0x24c>

LLVM IR (-O0):
%struct.stat = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
@.str = [4 x i8] c"%lu\00"
@stderr = global i32 0
@.str.1 = [43 x i8] c"snprintf returned %d when printing st_dev\0A\00"
@.str.2 = [43 x i8] c"snprintf returned %d when printing st_ino\0A\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [44 x i8] c"snprintf returned %d when printing st_mode\0A\00"
@.str.5 = [45 x i8] c"snprintf returned %d when printing st_nlink\0A\00"
@.str.6 = [43 x i8] c"snprintf returned %d when printing st_uid\0A\00"
@.str.7 = [43 x i8] c"snprintf returned %d when printing st_gid\0A\00"
@.str.8 = [44 x i8] c"snprintf returned %d when printing st_rdev\0A\00"
@.str.9 = [44 x i8] c"snprintf returned %d when printing st_size\0A\00"
@.str.10 = [47 x i8] c"snprintf returned %d when printing st_blksize\0A\00"
@.str.11 = [46 x i8] c"snprintf returned %d when printing st_blocks\0A\00"
define i32 @longest_len(%struct.stat* byval(%struct.stat) align 8 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca [160 x i8]
%6 = alloca i32
store i32* %1, i32** %4
%7 = load i32*, i32** %4
store i32 0, i32* %7
%8 = getelementptr inbounds [160 x i8], [160 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @snprintf(i8* %8, i32 160, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %2
%15 = load i32, i32* @stderr
%16 = load i32, i32* %6
%17 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %16)
store i32 1, i32* %3
br label %208
18: ; preds = %2
%19 = load i32, i32* %6
%20 = load i32*, i32** %4
%21 = load i32, i32* %20
%22 = icmp sgt i32 %19, %21
br i1 %22, label %23, label %26
23: ; preds = %18
%24 = load i32, i32* %6
%25 = load i32*, i32** %4
store i32 %24, i32* %25
br label %26
26: ; preds = %23, %18
br label %27
27: ; preds = %26
%28 = getelementptr inbounds [160 x i8], [160 x i8]* %5, i64 0, i64 0
%29 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 1
%30 = load i32, i32* %29
%31 = call i32 @snprintf(i8* %28, i32 160, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %30)
store i32 %31, i32* %6
%32 = load i32, i32* %6
%33 = icmp slt i32 %32, 0
br i1 %33, label %34, label %38
34: ; preds = %27
%35 = load i32, i32* @stderr
%36 = load i32, i32* %6
%37 = call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %36)
store i32 1, i32* %3
br label %208
38: ; preds = %27
%39 = load i32, i32* %6
%40 = load i32*, i32** %4
%41 = load i32, i32* %40
%42 = icmp sgt i32 %39, %41
br i1 %42, label %43, label %46
43: ; preds = %38
%44 = load i32, i32* %6
%45 = load i32*, i32** %4
store i32 %44, i32* %45
br label %46
46: ; preds = %43, %38
br label %47
47: ; preds = %46
%48 = getelementptr inbounds [160 x i8], [160 x i8]* %5, i64 0, i64 0
%49 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 2
%50 = load i32, i32* %49
%51 = call i32 @snprintf(i8* %48, i32 160, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %50)
store i32 %51, i32* %6
%52 = load i32, i32* %6
%53 = icmp slt i32 %52, 0
br i1 %53, label %54, label %58
54: ; preds = %47
%55 = load i32, i32* @stderr
%56 = load i32, i32* %6
%57 = call i32 @fprintf(i32 %55, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0), i32 %56)
store i32 1, i32* %3
br label %208
58: ; preds = %47
%59 = load i32, i32* %6
%60 = load i32*, i32** %4
%61 = load i32, i32* %60
%62 = icmp sgt i32 %59, %61
br i1 %62, label %63, label %66
63: ; preds = %58
%64 = load i32, i32* %6
%65 = load i32*, i32** %4
store i32 %64, i32* %65
br label %66
66: ; preds = %63, %58
br label %67
67: ; preds = %66
%68 = getelementptr inbounds [160 x i8], [160 x i8]* %5, i64 0, i64 0
%69 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 3
%70 = load i32, i32* %69
%71 = call i32 @snprintf(i8* %68, i32 160, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %70)
store i32 %71, i32* %6
%72 = load i32, i32* %6
%73 = icmp slt i32 %72, 0
br i1 %73, label %74, label %78
74: ; preds = %67
%75 = load i32, i32* @stderr
%76 = load i32, i32* %6
%77 = call i32 @fprintf(i32 %75, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0), i32 %76)
store i32 1, i32* %3
br label %208
78: ; preds = %67
%79 = load i32, i32* %6
%80 = load i32*, i32** %4
%81 = load i32, i32* %80
%82 = icmp sgt i32 %79, %81
br i1 %82, label %83, label %86
83: ; preds = %78
%84 = load i32, i32* %6
%85 = load i32*, i32** %4
store i32 %84, i32* %85
br label %86
86: ; preds = %83, %78
br label %87
87: ; preds = %86
%88 = getelementptr inbounds [160 x i8], [160 x i8]* %5, i64 0, i64 0
%89 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 4
%90 = load i32, i32* %89
%91 = call i32 @snprintf(i8* %88, i32 160, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %90)
store i32 %91, i32* %6
%92 = load i32, i32* %6
%93 = icmp slt i32 %92, 0
br i1 %93, label %94, label %98
94: ; preds = %87
%95 = load i32, i32* @stderr
%96 = load i32, i32* %6
%97 = call i32 @fprintf(i32 %95, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0), i32 %96)
store i32 1, i32* %3
br label %208
98: ; preds = %87
%99 = load i32, i32* %6
%100 = load i32*, i32** %4
%101 = load i32, i32* %100
%102 = icmp sgt i32 %99, %101
br i1 %102, label %103, label %106
103: ; preds = %98
%104 = load i32, i32* %6
%105 = load i32*, i32** %4
store i32 %104, i32* %105
br label %106
106: ; preds = %103, %98
br label %107
107: ; preds = %106
%108 = getelementptr inbounds [160 x i8], [160 x i8]* %5, i64 0, i64 0
%109 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 5
%110 = load i32, i32* %109
%111 = call i32 @snprintf(i8* %108, i32 160, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %110)
store i32 %111, i32* %6
%112 = load i32, i32* %6
%113 = icmp slt i32 %112, 0
br i1 %113, label %114, label %118
114: ; preds = %107
%115 = load i32, i32* @stderr
%116 = load i32, i32* %6
%117 = call i32 @fprintf(i32 %115, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i32 %116)
store i32 1, i32* %3
br label %208
118: ; preds = %107
%119 = load i32, i32* %6
%120 = load i32*, i32** %4
%121 = load i32, i32* %120
%122 = icmp sgt i32 %119, %121
br i1 %122, label %123, label %126
123: ; preds = %118
%124 = load i32, i32* %6
%125 = load i32*, i32** %4
store i32 %124, i32* %125
br label %126
126: ; preds = %123, %118
br label %127
127: ; preds = %126
%128 = getelementptr inbounds [160 x i8], [160 x i8]* %5, i64 0, i64 0
%129 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 6
%130 = load i32, i32* %129
%131 = call i32 @snprintf(i8* %128, i32 160, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %130)
store i32 %131, i32* %6
%132 = load i32, i32* %6
%133 = icmp slt i32 %132, 0
br i1 %133, label %134, label %138
134: ; preds = %127
%135 = load i32, i32* @stderr
%136 = load i32, i32* %6
%137 = call i32 @fprintf(i32 %135, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0), i32 %136)
store i32 1, i32* %3
br label %208
138: ; preds = %127
%139 = load i32, i32* %6
%140 = load i32*, i32** %4
%141 = load i32, i32* %140
%142 = icmp sgt i32 %139, %141
br i1 %142, label %143, label %146
143: ; preds = %138
%144 = load i32, i32* %6
%145 = load i32*, i32** %4
store i32 %144, i32* %145
br label %146
146: ; preds = %143, %138
br label %147
147: ; preds = %146
%148 = getelementptr inbounds [160 x i8], [160 x i8]* %5, i64 0, i64 0
%149 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 7
%150 = load i32, i32* %149
%151 = call i32 @snprintf(i8* %148, i32 160, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %150)
store i32 %151, i32* %6
%152 = load i32, i32* %6
%153 = icmp slt i32 %152, 0
br i1 %153, label %154, label %158
154: ; preds = %147
%155 = load i32, i32* @stderr
%156 = load i32, i32* %6
%157 = call i32 @fprintf(i32 %155, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), i32 %156)
store i32 1, i32* %3
br label %208
158: ; preds = %147
%159 = load i32, i32* %6
%160 = load i32*, i32** %4
%161 = load i32, i32* %160
%162 = icmp sgt i32 %159, %161
br i1 %162, label %163, label %166
163: ; preds = %158
%164 = load i32, i32* %6
%165 = load i32*, i32** %4
store i32 %164, i32* %165
br label %166
166: ; preds = %163, %158
br label %167
167: ; preds = %166
%168 = getelementptr inbounds [160 x i8], [160 x i8]* %5, i64 0, i64 0
%169 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 8
%170 = load i32, i32* %169
%171 = call i32 @snprintf(i8* %168, i32 160, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %170)
store i32 %171, i32* %6
%172 = load i32, i32* %6
%173 = icmp slt i32 %172, 0
br i1 %173, label %174, label %178
174: ; preds = %167
%175 = load i32, i32* @stderr
%176 = load i32, i32* %6
%177 = call i32 @fprintf(i32 %175, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0), i32 %176)
store i32 1, i32* %3
br label %208
178: ; preds = %167
%179 = load i32, i32* %6
%180 = load i32*, i32** %4
%181 = load i32, i32* %180
%182 = icmp sgt i32 %179, %181
br i1 %182, label %183, label %186
183: ; preds = %178
%184 = load i32, i32* %6
%185 = load i32*, i32** %4
store i32 %184, i32* %185
br label %186
186: ; preds = %183, %178
br label %187
187: ; preds = %186
%188 = getelementptr inbounds [160 x i8], [160 x i8]* %5, i64 0, i64 0
%189 = getelementptr inbounds %struct.stat, %struct.stat* %0, i32 0, i32 9
%190 = load i32, i32* %189
%191 = call i32 @snprintf(i8* %188, i32 160, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %190)
store i32 %191, i32* %6
%192 = load i32, i32* %6
%193 = icmp slt i32 %192, 0
br i1 %193, label %194, label %198
194: ; preds = %187
%195 = load i32, i32* @stderr
%196 = load i32, i32* %6
%197 = call i32 @fprintf(i32 %195, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.11, i64 0, i64 0), i32 %196)
store i32 1, i32* %3
br label %208
198: ; preds = %187
%199 = load i32, i32* %6
%200 = load i32*, i32** %4
%201 = load i32, i32* %200
%202 = icmp sgt i32 %199, %201
br i1 %202, label %203, label %206
203: ; preds = %198
%204 = load i32, i32* %6
%205 = load i32*, i32** %4
store i32 %204, i32* %205
br label %206
206: ; preds = %203, %198
br label %207
207: ; preds = %206
store i32 0, i32* %3
br label %208
208: ; preds = %207, %194, %174, %154, %134, %114, %94, %74, %54, %34, %14
%209 = load i32, i32* %3
ret i32 %209
}

LLVM IR (-O2):
%struct.stat = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
@.str = [4 x i8] c"%lu\00"
@stderr = global i32 0
@.str.1 = [43 x i8] c"snprintf returned %d when printing st_dev\0A\00"
@.str.2 = [43 x i8] c"snprintf returned %d when printing st_ino\0A\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [44 x i8] c"snprintf returned %d when printing st_mode\0A\00"
@.str.5 = [45 x i8] c"snprintf returned %d when printing st_nlink\0A\00"
@.str.6 = [43 x i8] c"snprintf returned %d when printing st_uid\0A\00"
@.str.7 = [43 x i8] c"snprintf returned %d when printing st_gid\0A\00"
@.str.8 = [44 x i8] c"snprintf returned %d when printing st_rdev\0A\00"
@.str.9 = [44 x i8] c"snprintf returned %d when printing st_size\0A\00"
@.str.10 = [47 x i8] c"snprintf returned %d when printing st_blksize\0A\00"
@.str.11 = [46 x i8] c"snprintf returned %d when printing st_blocks\0A\00"
define i32 @longest_len(%struct.stat* nocapture byval(%struct.stat) align 8 %0, i32* %1) {
%3 = alloca [160 x i8]
%4 = getelementptr inbounds [160 x i8], [160 x i8]* %3, i64 0, i64 0
store i32 0, i32* %1
%5 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 @snprintf(i8* %4, i32 160, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %124
12: ; preds = %2
%13 = load i32, i32* %1
%14 = icmp sgt i32 %7, %13
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 %7, i32* %1
br label %16
16: ; preds = %12, %15
%17 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 1
%18 = load i32, i32* %17
%19 = call i32 @snprintf(i8* %4, i32 160, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = icmp slt i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %16
%22 = load i32, i32* @stderr
%23 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %19)
br label %124
24: ; preds = %16
%25 = load i32, i32* %1
%26 = icmp sgt i32 %19, %25
br i1 %26, label %27, label %28
27: ; preds = %24
store i32 %19, i32* %1
br label %28
28: ; preds = %24, %27
%29 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 2
%30 = load i32, i32* %29
%31 = call i32 @snprintf(i8* %4, i32 160, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %30)
%32 = icmp slt i32 %31, 0
br i1 %32, label %33, label %36
33: ; preds = %28
%34 = load i32, i32* @stderr
%35 = call i32 @fprintf(i32 %34, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0), i32 %31)
br label %124
36: ; preds = %28
%37 = load i32, i32* %1
%38 = icmp sgt i32 %31, %37
br i1 %38, label %39, label %40
39: ; preds = %36
store i32 %31, i32* %1
br label %40
40: ; preds = %36, %39
%41 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 3
%42 = load i32, i32* %41
%43 = call i32 @snprintf(i8* %4, i32 160, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %42)
%44 = icmp slt i32 %43, 0
br i1 %44, label %45, label %48
45: ; preds = %40
%46 = load i32, i32* @stderr
%47 = call i32 @fprintf(i32 %46, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0), i32 %43)
br label %124
48: ; preds = %40
%49 = load i32, i32* %1
%50 = icmp sgt i32 %43, %49
br i1 %50, label %51, label %52
51: ; preds = %48
store i32 %43, i32* %1
br label %52
52: ; preds = %48, %51
%53 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 4
%54 = load i32, i32* %53
%55 = call i32 @snprintf(i8* %4, i32 160, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %54)
%56 = icmp slt i32 %55, 0
br i1 %56, label %57, label %60
57: ; preds = %52
%58 = load i32, i32* @stderr
%59 = call i32 @fprintf(i32 %58, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0), i32 %55)
br label %124
60: ; preds = %52
%61 = load i32, i32* %1
%62 = icmp sgt i32 %55, %61
br i1 %62, label %63, label %64
63: ; preds = %60
store i32 %55, i32* %1
br label %64
64: ; preds = %60, %63
%65 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 5
%66 = load i32, i32* %65
%67 = call i32 @snprintf(i8* %4, i32 160, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %66)
%68 = icmp slt i32 %67, 0
br i1 %68, label %69, label %72
69: ; preds = %64
%70 = load i32, i32* @stderr
%71 = call i32 @fprintf(i32 %70, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i32 %67)
br label %124
72: ; preds = %64
%73 = load i32, i32* %1
%74 = icmp sgt i32 %67, %73
br i1 %74, label %75, label %76
75: ; preds = %72
store i32 %67, i32* %1
br label %76
76: ; preds = %72, %75
%77 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 6
%78 = load i32, i32* %77
%79 = call i32 @snprintf(i8* %4, i32 160, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %78)
%80 = icmp slt i32 %79, 0
br i1 %80, label %81, label %84
81: ; preds = %76
%82 = load i32, i32* @stderr
%83 = call i32 @fprintf(i32 %82, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0), i32 %79)
br label %124
84: ; preds = %76
%85 = load i32, i32* %1
%86 = icmp sgt i32 %79, %85
br i1 %86, label %87, label %88
87: ; preds = %84
store i32 %79, i32* %1
br label %88
88: ; preds = %84, %87
%89 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 7
%90 = load i32, i32* %89
%91 = call i32 @snprintf(i8* %4, i32 160, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %90)
%92 = icmp slt i32 %91, 0
br i1 %92, label %93, label %96
93: ; preds = %88
%94 = load i32, i32* @stderr
%95 = call i32 @fprintf(i32 %94, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), i32 %91)
br label %124
96: ; preds = %88
%97 = load i32, i32* %1
%98 = icmp sgt i32 %91, %97
br i1 %98, label %99, label %100
99: ; preds = %96
store i32 %91, i32* %1
br label %100
100: ; preds = %96, %99
%101 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 8
%102 = load i32, i32* %101
%103 = call i32 @snprintf(i8* %4, i32 160, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %102)
%104 = icmp slt i32 %103, 0
br i1 %104, label %105, label %108
105: ; preds = %100
%106 = load i32, i32* @stderr
%107 = call i32 @fprintf(i32 %106, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0), i32 %103)
br label %124
108: ; preds = %100
%109 = load i32, i32* %1
%110 = icmp sgt i32 %103, %109
br i1 %110, label %111, label %112
111: ; preds = %108
store i32 %103, i32* %1
br label %112
112: ; preds = %108, %111
%113 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 9
%114 = load i32, i32* %113
%115 = call i32 @snprintf(i8* %4, i32 160, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %114)
%116 = icmp slt i32 %115, 0
br i1 %116, label %117, label %120
117: ; preds = %112
%118 = load i32, i32* @stderr
%119 = call i32 @fprintf(i32 %118, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.11, i64 0, i64 0), i32 %115)
br label %124
120: ; preds = %112
%121 = load i32, i32* %1
%122 = icmp sgt i32 %115, %121
br i1 %122, label %123, label %124
123: ; preds = %120
store i32 %115, i32* %1
br label %124
124: ; preds = %123, %120, %117, %105, %93, %81, %69, %57, %45, %33, %21, %9
%125 = phi i32 [ 1, %9 ], [ 1, %21 ], [ 1, %33 ], [ 1, %45 ], [ 1, %57 ], [ 1, %69 ], [ 1, %81 ], [ 1, %93 ], [ 1, %105 ], [ 1, %117 ], [ 0, %120 ], [ 0, %123 ]
ret i32 %125
}