#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 spwd {
  char *sp_namp;
  char *sp_pwdp;
  long sp_lstchg;
  long sp_min;
  long sp_max;
  long sp_warn;
  long sp_inact;
  long sp_expire;
  unsigned long sp_flag;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
scalar_t__ fprintf(int /*<<< orphan*/ *, char *, ...);
scalar_t__ putc(char, int /*<<< orphan*/ *);
int putspent(const struct spwd *p, FILE *stream) {
  int errors = 0;
  if (fprintf(stream, "%s:%s:", p->sp_namp, p->sp_pwdp ? p->sp_pwdp : "") < 0)
    ++errors;
  if ((p->sp_lstchg != (long int)-1 &&
       fprintf(stream, "%ld:", p->sp_lstchg) < 0) ||
      (p->sp_lstchg == (long int)-1 && putc(':', stream) == EOF))
    ++errors;
  if ((p->sp_min != (long int)-1 && fprintf(stream, "%ld:", p->sp_min) < 0) ||
      (p->sp_min == (long int)-1 && putc(':', stream) == EOF))
    ++errors;
  if ((p->sp_max != (long int)-1 && fprintf(stream, "%ld:", p->sp_max) < 0) ||
      (p->sp_max == (long int)-1 && putc(':', stream) == EOF))
    ++errors;
  if ((p->sp_warn != (long int)-1 && fprintf(stream, "%ld:", p->sp_warn) < 0) ||
      (p->sp_warn == (long int)-1 && putc(':', stream) == EOF))
    ++errors;
  if ((p->sp_inact != (long int)-1 &&
       fprintf(stream, "%ld:", p->sp_inact) < 0) ||
      (p->sp_inact == (long int)-1 && putc(':', stream) == EOF))
    ++errors;
  if ((p->sp_expire != (long int)-1 &&
       fprintf(stream, "%ld:", p->sp_expire) < 0) ||
      (p->sp_expire == (long int)-1 && putc(':', stream) == EOF))
    ++errors;
  if (p->sp_flag != ~0ul && fprintf(stream, "%ld", p->sp_flag) < 0)
    ++errors;
  if (putc('\n', stream) == EOF)
    ++errors;
  return errors ? -1 : 0;
}


x86 assembly (clang, -O0):
<putspent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     116a <putspent+0x4a>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x30(%rbp)
jmp    117a <putspent+0x5a>
lea    0xe9a(%rip),%rax
mov    %rax,-0x30(%rbp)
jmp    117a <putspent+0x5a>
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rcx
lea    0xe73(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
cmp    $0x0,%rax
jge    11a7 <putspent+0x87>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0xffffffffffffffff,0x10(%rax)
je     11da <putspent+0xba>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0xe3e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
cmp    $0x0,%rax
jl     1207 <putspent+0xe7>
mov    -0x8(%rbp),%rax
cmpq   $0xffffffffffffffff,0x10(%rax)
jne    1210 <putspent+0xf0>
mov    -0x10(%rbp),%rsi
mov    $0x3a,%edi
call   1030 <putc@plt>
mov    0x2dea(%rip),%rcx
cmp    (%rcx),%rax
jne    1210 <putspent+0xf0>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0xffffffffffffffff,0x18(%rax)
je     1243 <putspent+0x123>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rdx
lea    0xdd5(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
cmp    $0x0,%rax
jl     1270 <putspent+0x150>
mov    -0x8(%rbp),%rax
cmpq   $0xffffffffffffffff,0x18(%rax)
jne    1279 <putspent+0x159>
mov    -0x10(%rbp),%rsi
mov    $0x3a,%edi
call   1030 <putc@plt>
mov    0x2d81(%rip),%rcx
cmp    (%rcx),%rax
jne    1279 <putspent+0x159>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0xffffffffffffffff,0x20(%rax)
je     12ac <putspent+0x18c>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rdx
lea    0xd6c(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
cmp    $0x0,%rax
jl     12d9 <putspent+0x1b9>
mov    -0x8(%rbp),%rax
cmpq   $0xffffffffffffffff,0x20(%rax)
jne    12e2 <putspent+0x1c2>
mov    -0x10(%rbp),%rsi
mov    $0x3a,%edi
call   1030 <putc@plt>
mov    0x2d18(%rip),%rcx
cmp    (%rcx),%rax
jne    12e2 <putspent+0x1c2>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0xffffffffffffffff,0x28(%rax)
je     1315 <putspent+0x1f5>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%rdx
lea    0xd03(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
cmp    $0x0,%rax
jl     1342 <putspent+0x222>
mov    -0x8(%rbp),%rax
cmpq   $0xffffffffffffffff,0x28(%rax)
jne    134b <putspent+0x22b>
mov    -0x10(%rbp),%rsi
mov    $0x3a,%edi
call   1030 <putc@plt>
mov    0x2caf(%rip),%rcx
cmp    (%rcx),%rax
jne    134b <putspent+0x22b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0xffffffffffffffff,0x30(%rax)
je     137e <putspent+0x25e>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%rdx
lea    0xc9a(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
cmp    $0x0,%rax
jl     13ab <putspent+0x28b>
mov    -0x8(%rbp),%rax
cmpq   $0xffffffffffffffff,0x30(%rax)
jne    13b4 <putspent+0x294>
mov    -0x10(%rbp),%rsi
mov    $0x3a,%edi
call   1030 <putc@plt>
mov    0x2c46(%rip),%rcx
cmp    (%rcx),%rax
jne    13b4 <putspent+0x294>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0xffffffffffffffff,0x38(%rax)
je     13e7 <putspent+0x2c7>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%rdx
lea    0xc31(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
cmp    $0x0,%rax
jl     1414 <putspent+0x2f4>
mov    -0x8(%rbp),%rax
cmpq   $0xffffffffffffffff,0x38(%rax)
jne    141d <putspent+0x2fd>
mov    -0x10(%rbp),%rsi
mov    $0x3a,%edi
call   1030 <putc@plt>
mov    0x2bdd(%rip),%rcx
cmp    (%rcx),%rax
jne    141d <putspent+0x2fd>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0xffffffffffffffff,0x40(%rax)
je     1459 <putspent+0x339>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    0x40(%rax),%rdx
lea    0xbcd(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
cmp    $0x0,%rax
jge    1459 <putspent+0x339>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0xa,%edi
call   1030 <putc@plt>
mov    0x2b7a(%rip),%rcx
cmp    (%rcx),%rax
jne    1480 <putspent+0x360>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putspent>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdx
mov    0x8(%rdi),%rax
test   %rax,%rax
lea    0xecf(%rip),%rcx
cmovne %rax,%rcx
lea    0xeb9(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rax,%r15
shr    $0x3f,%r15
mov    0x10(%rbx),%rdx
cmp    $0xffffffffffffffff,%rdx
je     117f <putspent+0x5f>
lea    0xe9e(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
test   %rax,%rax
js     1198 <putspent+0x78>
cmpq   $0xffffffffffffffff,0x10(%rbx)
jne    119c <putspent+0x7c>
mov    $0x3a,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    0x2e55(%rip),%rcx
cmp    (%rcx),%rax
jne    119c <putspent+0x7c>
add    $0x1,%r15d
mov    0x18(%rbx),%rdx
cmp    $0xffffffffffffffff,%rdx
je     11c3 <putspent+0xa3>
lea    0xe5a(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
test   %rax,%rax
js     11dc <putspent+0xbc>
cmpq   $0xffffffffffffffff,0x18(%rbx)
jne    11e0 <putspent+0xc0>
mov    $0x3a,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    0x2e11(%rip),%rcx
cmp    (%rcx),%rax
jne    11e0 <putspent+0xc0>
add    $0x1,%r15d
mov    0x20(%rbx),%rdx
cmp    $0xffffffffffffffff,%rdx
je     1207 <putspent+0xe7>
lea    0xe16(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
test   %rax,%rax
js     1220 <putspent+0x100>
cmpq   $0xffffffffffffffff,0x20(%rbx)
jne    1224 <putspent+0x104>
mov    $0x3a,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    0x2dcd(%rip),%rcx
cmp    (%rcx),%rax
jne    1224 <putspent+0x104>
add    $0x1,%r15d
mov    0x28(%rbx),%rdx
cmp    $0xffffffffffffffff,%rdx
je     124b <putspent+0x12b>
lea    0xdd2(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
test   %rax,%rax
js     1264 <putspent+0x144>
cmpq   $0xffffffffffffffff,0x28(%rbx)
jne    1268 <putspent+0x148>
mov    $0x3a,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    0x2d89(%rip),%rcx
cmp    (%rcx),%rax
jne    1268 <putspent+0x148>
add    $0x1,%r15d
mov    0x30(%rbx),%rdx
cmp    $0xffffffffffffffff,%rdx
je     128f <putspent+0x16f>
lea    0xd8e(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
test   %rax,%rax
js     12a8 <putspent+0x188>
cmpq   $0xffffffffffffffff,0x30(%rbx)
jne    12ac <putspent+0x18c>
mov    $0x3a,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    0x2d45(%rip),%rcx
cmp    (%rcx),%rax
jne    12ac <putspent+0x18c>
add    $0x1,%r15d
mov    0x38(%rbx),%rdx
cmp    $0xffffffffffffffff,%rdx
je     12d3 <putspent+0x1b3>
lea    0xd4a(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
test   %rax,%rax
js     12ec <putspent+0x1cc>
cmpq   $0xffffffffffffffff,0x38(%rbx)
jne    12f0 <putspent+0x1d0>
mov    $0x3a,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    0x2d01(%rip),%rcx
cmp    (%rcx),%rax
jne    12f0 <putspent+0x1d0>
add    $0x1,%r15d
mov    0x40(%rbx),%rdx
cmp    $0xffffffffffffffff,%rdx
je     1312 <putspent+0x1f2>
lea    0xd0b(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
shr    $0x3f,%rax
add    %eax,%r15d
mov    $0xa,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    0x2cc2(%rip),%rcx
xor    %edx,%edx
cmp    (%rcx),%rax
sete   %dl
neg    %edx
xor    %eax,%eax
cmp    %edx,%r15d
setne  %al
neg    %eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
%struct.spwd = type { i8*, i8*, i64, i64, i64, i64, i64, i64, i64 }
@.str = [7 x i8] c"%s:%s:\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [5 x i8] c"%ld:\00"
@EOF = global i64 0
@.str.3 = [4 x i8] c"%ld\00"
define i32 @putspent(%struct.spwd* nocapture %0, i32* nocapture %1) {
%3 = getelementptr inbounds %struct.spwd, %struct.spwd* %0, i64 0, i32 0
%4 = load i8*, i8** %3
%5 = getelementptr inbounds %struct.spwd, %struct.spwd* %0, i64 0, i32 1
%6 = load i8*, i8** %5
%7 = icmp eq i8* %6, null
%8 = select i1 %7, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %6
%9 = tail call i64 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %8)
%10 = lshr i64 %9, 63
%11 = trunc i64 %10 to i32
%12 = getelementptr inbounds %struct.spwd, %struct.spwd* %0, i64 0, i32 2
%13 = load i64, i64* %12
%14 = icmp eq i64 %13, -1
br i1 %14, label %21, label %15
15: ; preds = %2
%16 = tail call i64 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %13)
%17 = icmp slt i64 %16, 0
br i1 %17, label %25, label %18
18: ; preds = %15
%19 = load i64, i64* %12
%20 = icmp eq i64 %19, -1
br i1 %20, label %21, label %27
21: ; preds = %2, %18
%22 = tail call i64 @putc(i8 signext 58, i32* %1)
%23 = load i64, i64* @EOF
%24 = icmp eq i64 %22, %23
br i1 %24, label %25, label %27
25: ; preds = %21, %15
%26 = add nuw nsw i32 %11, 1
br label %27
27: ; preds = %25, %21, %18
%28 = phi i32 [ %26, %25 ], [ %11, %21 ], [ %11, %18 ]
%29 = getelementptr inbounds %struct.spwd, %struct.spwd* %0, i64 0, i32 3
%30 = load i64, i64* %29
%31 = icmp eq i64 %30, -1
br i1 %31, label %38, label %32
32: ; preds = %27
%33 = tail call i64 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %30)
%34 = icmp slt i64 %33, 0
br i1 %34, label %42, label %35
35: ; preds = %32
%36 = load i64, i64* %29
%37 = icmp eq i64 %36, -1
br i1 %37, label %38, label %44
38: ; preds = %27, %35
%39 = tail call i64 @putc(i8 signext 58, i32* %1)
%40 = load i64, i64* @EOF
%41 = icmp eq i64 %39, %40
br i1 %41, label %42, label %44
42: ; preds = %38, %32
%43 = add nuw nsw i32 %28, 1
br label %44
44: ; preds = %42, %38, %35
%45 = phi i32 [ %43, %42 ], [ %28, %38 ], [ %28, %35 ]
%46 = getelementptr inbounds %struct.spwd, %struct.spwd* %0, i64 0, i32 4
%47 = load i64, i64* %46
%48 = icmp eq i64 %47, -1
br i1 %48, label %55, label %49
49: ; preds = %44
%50 = tail call i64 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %47)
%51 = icmp slt i64 %50, 0
br i1 %51, label %59, label %52
52: ; preds = %49
%53 = load i64, i64* %46
%54 = icmp eq i64 %53, -1
br i1 %54, label %55, label %61
55: ; preds = %44, %52
%56 = tail call i64 @putc(i8 signext 58, i32* %1)
%57 = load i64, i64* @EOF
%58 = icmp eq i64 %56, %57
br i1 %58, label %59, label %61
59: ; preds = %55, %49
%60 = add nuw nsw i32 %45, 1
br label %61
61: ; preds = %59, %55, %52
%62 = phi i32 [ %60, %59 ], [ %45, %55 ], [ %45, %52 ]
%63 = getelementptr inbounds %struct.spwd, %struct.spwd* %0, i64 0, i32 5
%64 = load i64, i64* %63
%65 = icmp eq i64 %64, -1
br i1 %65, label %72, label %66
66: ; preds = %61
%67 = tail call i64 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %64)
%68 = icmp slt i64 %67, 0
br i1 %68, label %76, label %69
69: ; preds = %66
%70 = load i64, i64* %63
%71 = icmp eq i64 %70, -1
br i1 %71, label %72, label %78
72: ; preds = %61, %69
%73 = tail call i64 @putc(i8 signext 58, i32* %1)
%74 = load i64, i64* @EOF
%75 = icmp eq i64 %73, %74
br i1 %75, label %76, label %78
76: ; preds = %72, %66
%77 = add nuw nsw i32 %62, 1
br label %78
78: ; preds = %76, %72, %69
%79 = phi i32 [ %77, %76 ], [ %62, %72 ], [ %62, %69 ]
%80 = getelementptr inbounds %struct.spwd, %struct.spwd* %0, i64 0, i32 6
%81 = load i64, i64* %80
%82 = icmp eq i64 %81, -1
br i1 %82, label %89, label %83
83: ; preds = %78
%84 = tail call i64 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %81)
%85 = icmp slt i64 %84, 0
br i1 %85, label %93, label %86
86: ; preds = %83
%87 = load i64, i64* %80
%88 = icmp eq i64 %87, -1
br i1 %88, label %89, label %95
89: ; preds = %78, %86
%90 = tail call i64 @putc(i8 signext 58, i32* %1)
%91 = load i64, i64* @EOF
%92 = icmp eq i64 %90, %91
br i1 %92, label %93, label %95
93: ; preds = %89, %83
%94 = add nuw nsw i32 %79, 1
br label %95
95: ; preds = %93, %89, %86
%96 = phi i32 [ %94, %93 ], [ %79, %89 ], [ %79, %86 ]
%97 = getelementptr inbounds %struct.spwd, %struct.spwd* %0, i64 0, i32 7
%98 = load i64, i64* %97
%99 = icmp eq i64 %98, -1
br i1 %99, label %106, label %100
100: ; preds = %95
%101 = tail call i64 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %98)
%102 = icmp slt i64 %101, 0
br i1 %102, label %110, label %103
103: ; preds = %100
%104 = load i64, i64* %97
%105 = icmp eq i64 %104, -1
br i1 %105, label %106, label %112
106: ; preds = %95, %103
%107 = tail call i64 @putc(i8 signext 58, i32* %1)
%108 = load i64, i64* @EOF
%109 = icmp eq i64 %107, %108
br i1 %109, label %110, label %112
110: ; preds = %106, %100
%111 = add nuw nsw i32 %96, 1
br label %112
112: ; preds = %110, %106, %103
%113 = phi i32 [ %111, %110 ], [ %96, %106 ], [ %96, %103 ]
%114 = getelementptr inbounds %struct.spwd, %struct.spwd* %0, i64 0, i32 8
%115 = load i64, i64* %114
%116 = icmp eq i64 %115, -1
br i1 %116, label %122, label %117
117: ; preds = %112
%118 = tail call i64 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 %115)
%119 = lshr i64 %118, 63
%120 = trunc i64 %119 to i32
%121 = add nuw nsw i32 %113, %120
br label %122
122: ; preds = %117, %112
%123 = phi i32 [ %113, %112 ], [ %121, %117 ]
%124 = tail call i64 @putc(i8 signext 10, i32* %1)
%125 = load i64, i64* @EOF
%126 = icmp eq i64 %124, %125
%127 = sext i1 %126 to i32
%128 = icmp ne i32 %123, %127
%129 = sext i1 %128 to i32
ret i32 %129
}