long wind(data, maxl, rcp)
char *data;
long maxl;
struct res *rcp;
{
  int vis, goaway, pid;
  long ref;
  int r1, r2, r3, r4;
  char title[128];
  char *datap = data;
  char *lp, *getline(), *skipsp();
  char *outp(), *outs(), *outl(), *outc();
  char *strcpy();
  lp = skipsp(getline());
  strcpy(title, lp);
  if ((lp = getline()) == 0 ||
      sscanf(lp, "%d %d %d %d", &r1, &r2, &r3, &r4) != 4)
    fatal("bad rectangle");
  lp = skipsp(getline());
  vis = (*lp == 'V' || *lp == 'v' ? 1 : 0);
  lp = skipsp(getline());
  goaway = (*lp == 'G' || *lp == 'g' ? 1 : 0);
  if ((lp = getline()) == 0 || sscanf(lp, "%d", &pid) != 1)
    fatal("bad proc id");
  if ((lp = getline()) == 0 || sscanf(lp, "%ld", &ref) != 1)
    fatal("bad refcon");
  datap = outs(datap, r1, &maxl);
  datap = outs(datap, r2, &maxl);
  datap = outs(datap, r3, &maxl);
  datap = outs(datap, r4, &maxl);
  datap = outs(datap, pid, &maxl);
  datap = outc(datap, (char)vis, &maxl);
  datap = outc(datap, (char)0, &maxl);
  datap = outc(datap, (char)goaway, &maxl);
  datap = outc(datap, (char)0, &maxl);
  datap = outl(datap, (long)ref, &maxl);
  datap = outp(datap, title, &maxl, 1);
  return (datap - data);
}


x86 assembly (clang, -O0):
<wind>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0xc8(%rbp)
mov    $0x0,%al
call   1080 <getline@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1090 <skipsp@plt>
mov    %rax,-0xd0(%rbp)
lea    -0xc0(%rbp),%rdi
mov    -0xd0(%rbp),%rsi
call   1030 <strcpy@plt>
mov    $0x0,%al
call   1080 <getline@plt>
mov    %rax,-0xd0(%rbp)
cmp    $0x0,%rax
je     1223 <wind+0x93>
mov    -0xd0(%rbp),%rdi
lea    0xdfd(%rip),%rsi
lea    -0x34(%rbp),%rdx
lea    -0x38(%rbp),%rcx
lea    -0x3c(%rbp),%r8
lea    -0x40(%rbp),%r9
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x4,%eax
je     1231 <wind+0xa1>
lea    0xde2(%rip),%rdi
mov    $0x0,%al
call   10b0 <fatal@plt>
mov    $0x0,%al
call   1080 <getline@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1090 <skipsp@plt>
mov    %rax,-0xd0(%rbp)
mov    -0xd0(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x56,%ecx
mov    %al,-0xd1(%rbp)
je     127a <wind+0xea>
mov    -0xd0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x76,%eax
sete   %al
mov    %al,-0xd1(%rbp)
mov    -0xd1(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1080 <getline@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1090 <skipsp@plt>
mov    %rax,-0xd0(%rbp)
mov    -0xd0(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x47,%ecx
mov    %al,-0xd2(%rbp)
je     12d9 <wind+0x149>
mov    -0xd0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x67,%eax
sete   %al
mov    %al,-0xd2(%rbp)
mov    -0xd2(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1080 <getline@plt>
mov    %rax,-0xd0(%rbp)
cmp    $0x0,%rax
je     1329 <wind+0x199>
mov    -0xd0(%rbp),%rdi
lea    0xcf4(%rip),%rsi
lea    -0x24(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     1337 <wind+0x1a7>
lea    0xcea(%rip),%rdi
mov    $0x0,%al
call   10b0 <fatal@plt>
mov    $0x0,%al
call   1080 <getline@plt>
mov    %rax,-0xd0(%rbp)
cmp    $0x0,%rax
je     1371 <wind+0x1e1>
mov    -0xd0(%rbp),%rdi
lea    0xcc9(%rip),%rsi
lea    -0x30(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     137f <wind+0x1ef>
lea    0xcb2(%rip),%rdi
mov    $0x0,%al
call   10b0 <fatal@plt>
mov    -0xc8(%rbp),%rdi
mov    -0x34(%rbp),%esi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   10a0 <outs@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rdi
mov    -0x38(%rbp),%esi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   10a0 <outs@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rdi
mov    -0x3c(%rbp),%esi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   10a0 <outs@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rdi
mov    -0x40(%rbp),%esi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   10a0 <outs@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rdi
mov    -0x24(%rbp),%esi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   10a0 <outs@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rdi
mov    -0x1c(%rbp),%eax
movsbl %al,%esi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1070 <outc@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rdi
xor    %esi,%esi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1070 <outc@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rdi
mov    -0x20(%rbp),%eax
movsbl %al,%esi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1070 <outc@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rdi
xor    %esi,%esi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1070 <outc@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rdi
mov    -0x30(%rbp),%rsi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1050 <outl@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
lea    -0x10(%rbp),%rdx
mov    $0x1,%ecx
mov    $0x0,%al
call   1040 <outp@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wind>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xb0,%rsp
mov    %rdi,%r14
mov    %rsi,0x28(%rsp)
xor    %eax,%eax
call   1080 <getline@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1090 <skipsp@plt>
lea    0x30(%rsp),%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
call   1080 <getline@plt>
test   %rax,%rax
je     11fb <wind+0x6b>
lea    0xe28(%rip),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0xc(%rsp),%r9
mov    %rax,%rdi
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x4,%eax
je     1209 <wind+0x79>
lea    0xe0a(%rip),%rdi
xor    %eax,%eax
call   10b0 <fatal@plt>
xor    %eax,%eax
call   1080 <getline@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1090 <skipsp@plt>
mov    (%rax),%r12b
xor    %eax,%eax
call   1080 <getline@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1090 <skipsp@plt>
mov    (%rax),%bl
xor    %eax,%eax
call   1080 <getline@plt>
test   %rax,%rax
je     1257 <wind+0xc7>
lea    0xdc6(%rip),%rsi
lea    0x1c(%rsp),%rdx
mov    %rax,%rdi
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     1265 <wind+0xd5>
lea    0xdbc(%rip),%rdi
xor    %eax,%eax
call   10b0 <fatal@plt>
xor    %eax,%eax
call   1080 <getline@plt>
test   %rax,%rax
je     128c <wind+0xfc>
lea    0xdae(%rip),%rsi
lea    0x20(%rsp),%rdx
mov    %rax,%rdi
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     129a <wind+0x10a>
lea    0xd97(%rip),%rdi
xor    %eax,%eax
call   10b0 <fatal@plt>
and    $0xdf,%bl
xor    %r15d,%r15d
cmp    $0x47,%bl
sete   %r15b
and    $0xdf,%r12b
xor    %ebp,%ebp
cmp    $0x56,%r12b
sete   %bpl
mov    0x18(%rsp),%esi
lea    0x28(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10a0 <outs@plt>
mov    0x14(%rsp),%esi
mov    %rax,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10a0 <outs@plt>
mov    0x10(%rsp),%esi
mov    %rax,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10a0 <outs@plt>
mov    0xc(%rsp),%esi
mov    %rax,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10a0 <outs@plt>
mov    0x1c(%rsp),%esi
mov    %rax,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10a0 <outs@plt>
mov    %rax,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <outc@plt>
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <outc@plt>
mov    %rax,%rdi
mov    %r15d,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <outc@plt>
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <outc@plt>
mov    0x20(%rsp),%rsi
mov    %rax,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <outl@plt>
lea    0x30(%rsp),%rsi
mov    %rax,%rdi
mov    %rbx,%rdx
mov    $0x1,%ecx
xor    %eax,%eax
call   1040 <outp@plt>
sub    %r14,%rax
add    $0xb0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.res = type opaque
@.str = [12 x i8] c"%d %d %d %d\00"
@.str.1 = [14 x i8] c"bad rectangle\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [12 x i8] c"bad proc id\00"
@.str.4 = [4 x i8] c"%ld\00"
@.str.5 = [11 x i8] c"bad refcon\00"
define i64 @wind(i8* %0, i64 %1, %struct.res* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca %struct.res*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca [128 x i8]
%16 = alloca i8*
%17 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store %struct.res* %2, %struct.res** %6
%18 = load i8*, i8** %4
store i8* %18, i8** %16
%19 = call i8* (...) @getline()
%20 = call i8* (i8*, ...) bitcast (i8* (...)* @skipsp to i8* (i8*, ...)*)(i8* %19)
store i8* %20, i8** %17
%21 = getelementptr inbounds [128 x i8], [128 x i8]* %15, i64 0, i64 0
%22 = load i8*, i8** %17
%23 = call i8* @strcpy(i8* %21, i8* %22)
%24 = call i8* (...) @getline()
store i8* %24, i8** %17
%25 = icmp eq i8* %24, null
br i1 %25, label %30, label %26
26: ; preds = %3
%27 = load i8*, i8** %17
%28 = call i32 (i8*, i8*, ...) @sscanf(i8* %27, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %11, i32* %12, i32* %13, i32* %14)
%29 = icmp ne i32 %28, 4
br i1 %29, label %30, label %32
30: ; preds = %26, %3
%31 = call i32 (i8*, ...) bitcast (i32 (...)* @fatal to i32 (i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %32
32: ; preds = %30, %26
%33 = call i8* (...) @getline()
%34 = call i8* (i8*, ...) bitcast (i8* (...)* @skipsp to i8* (i8*, ...)*)(i8* %33)
store i8* %34, i8** %17
%35 = load i8*, i8** %17
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp eq i32 %37, 86
br i1 %38, label %44, label %39
39: ; preds = %32
%40 = load i8*, i8** %17
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 118
br label %44
44: ; preds = %39, %32
%45 = phi i1 [ true, %32 ], [ %43, %39 ]
%46 = zext i1 %45 to i64
%47 = select i1 %45, i32 1, i32 0
store i32 %47, i32* %7
%48 = call i8* (...) @getline()
%49 = call i8* (i8*, ...) bitcast (i8* (...)* @skipsp to i8* (i8*, ...)*)(i8* %48)
store i8* %49, i8** %17
%50 = load i8*, i8** %17
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = icmp eq i32 %52, 71
br i1 %53, label %59, label %54
54: ; preds = %44
%55 = load i8*, i8** %17
%56 = load i8, i8* %55
%57 = sext i8 %56 to i32
%58 = icmp eq i32 %57, 103
br label %59
59: ; preds = %54, %44
%60 = phi i1 [ true, %44 ], [ %58, %54 ]
%61 = zext i1 %60 to i64
%62 = select i1 %60, i32 1, i32 0
store i32 %62, i32* %8
%63 = call i8* (...) @getline()
store i8* %63, i8** %17
%64 = icmp eq i8* %63, null
br i1 %64, label %69, label %65
65: ; preds = %59
%66 = load i8*, i8** %17
%67 = call i32 (i8*, i8*, ...) @sscanf(i8* %66, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %9)
%68 = icmp ne i32 %67, 1
br i1 %68, label %69, label %71
69: ; preds = %65, %59
%70 = call i32 (i8*, ...) bitcast (i32 (...)* @fatal to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
br label %71
71: ; preds = %69, %65
%72 = call i8* (...) @getline()
store i8* %72, i8** %17
%73 = icmp eq i8* %72, null
br i1 %73, label %78, label %74
74: ; preds = %71
%75 = load i8*, i8** %17
%76 = call i32 (i8*, i8*, ...) @sscanf(i8* %75, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i64* %10)
%77 = icmp ne i32 %76, 1
br i1 %77, label %78, label %80
78: ; preds = %74, %71
%79 = call i32 (i8*, ...) bitcast (i32 (...)* @fatal to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %80
80: ; preds = %78, %74
%81 = load i8*, i8** %16
%82 = load i32, i32* %11
%83 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outs to i8* (i8*, i32, i64*, ...)*)(i8* %81, i32 %82, i64* %5)
store i8* %83, i8** %16
%84 = load i8*, i8** %16
%85 = load i32, i32* %12
%86 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outs to i8* (i8*, i32, i64*, ...)*)(i8* %84, i32 %85, i64* %5)
store i8* %86, i8** %16
%87 = load i8*, i8** %16
%88 = load i32, i32* %13
%89 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outs to i8* (i8*, i32, i64*, ...)*)(i8* %87, i32 %88, i64* %5)
store i8* %89, i8** %16
%90 = load i8*, i8** %16
%91 = load i32, i32* %14
%92 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outs to i8* (i8*, i32, i64*, ...)*)(i8* %90, i32 %91, i64* %5)
store i8* %92, i8** %16
%93 = load i8*, i8** %16
%94 = load i32, i32* %9
%95 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outs to i8* (i8*, i32, i64*, ...)*)(i8* %93, i32 %94, i64* %5)
store i8* %95, i8** %16
%96 = load i8*, i8** %16
%97 = load i32, i32* %7
%98 = trunc i32 %97 to i8
%99 = sext i8 %98 to i32
%100 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outc to i8* (i8*, i32, i64*, ...)*)(i8* %96, i32 %99, i64* %5)
store i8* %100, i8** %16
%101 = load i8*, i8** %16
%102 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outc to i8* (i8*, i32, i64*, ...)*)(i8* %101, i32 0, i64* %5)
store i8* %102, i8** %16
%103 = load i8*, i8** %16
%104 = load i32, i32* %8
%105 = trunc i32 %104 to i8
%106 = sext i8 %105 to i32
%107 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outc to i8* (i8*, i32, i64*, ...)*)(i8* %103, i32 %106, i64* %5)
store i8* %107, i8** %16
%108 = load i8*, i8** %16
%109 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outc to i8* (i8*, i32, i64*, ...)*)(i8* %108, i32 0, i64* %5)
store i8* %109, i8** %16
%110 = load i8*, i8** %16
%111 = load i64, i64* %10
%112 = call i8* (i8*, i64, i64*, ...) bitcast (i8* (...)* @outl to i8* (i8*, i64, i64*, ...)*)(i8* %110, i64 %111, i64* %5)
store i8* %112, i8** %16
%113 = load i8*, i8** %16
%114 = getelementptr inbounds [128 x i8], [128 x i8]* %15, i64 0, i64 0
%115 = call i8* (i8*, i8*, i64*, i32, ...) bitcast (i8* (...)* @outp to i8* (i8*, i8*, i64*, i32, ...)*)(i8* %113, i8* %114, i64* %5, i32 1)
store i8* %115, i8** %16
%116 = load i8*, i8** %16
%117 = load i8*, i8** %4
%118 = ptrtoint i8* %116 to i64
%119 = ptrtoint i8* %117 to i64
%120 = sub i64 %118, %119
ret i64 %120
}

LLVM IR (-O2):
%struct.res = type opaque
@.str = [12 x i8] c"%d %d %d %d\00"
@.str.1 = [14 x i8] c"bad rectangle\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [12 x i8] c"bad proc id\00"
@.str.4 = [4 x i8] c"%ld\00"
@.str.5 = [11 x i8] c"bad refcon\00"
define i64 @wind(i8* %0, i64 %1, %struct.res* nocapture readnone %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [128 x i8]
store i64 %1, i64* %4
%12 = bitcast i32* %5 to i8*
%13 = bitcast i64* %6 to i8*
%14 = bitcast i32* %7 to i8*
%15 = bitcast i32* %8 to i8*
%16 = bitcast i32* %9 to i8*
%17 = bitcast i32* %10 to i8*
%18 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%19 = tail call i8* (...) @getline()
%20 = tail call i8* (i8*, ...) bitcast (i8* (...)* @skipsp to i8* (i8*, ...)*)(i8* %19)
%21 = call i8* @strcpy(i8* %18, i8* dereferenceable(1) %20)
%22 = call i8* (...) @getline()
%23 = icmp eq i8* %22, null
br i1 %23, label %27, label %24
24: ; preds = %3
%25 = call i32 (i8*, i8*, ...) @sscanf(i8* %22, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %7, i32* %8, i32* %9, i32* %10)
%26 = icmp eq i32 %25, 4
br i1 %26, label %29, label %27
27: ; preds = %24, %3
%28 = call i32 (i8*, ...) bitcast (i32 (...)* @fatal to i32 (i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %29
29: ; preds = %27, %24
%30 = call i8* (...) @getline()
%31 = call i8* (i8*, ...) bitcast (i8* (...)* @skipsp to i8* (i8*, ...)*)(i8* %30)
%32 = load i8, i8* %31
%33 = call i8* (...) @getline()
%34 = call i8* (i8*, ...) bitcast (i8* (...)* @skipsp to i8* (i8*, ...)*)(i8* %33)
%35 = load i8, i8* %34
%36 = call i8* (...) @getline()
%37 = icmp eq i8* %36, null
br i1 %37, label %41, label %38
38: ; preds = %29
%39 = call i32 (i8*, i8*, ...) @sscanf(i8* %36, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %5)
%40 = icmp eq i32 %39, 1
br i1 %40, label %43, label %41
41: ; preds = %38, %29
%42 = call i32 (i8*, ...) bitcast (i32 (...)* @fatal to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
br label %43
43: ; preds = %41, %38
%44 = call i8* (...) @getline()
%45 = icmp eq i8* %44, null
br i1 %45, label %49, label %46
46: ; preds = %43
%47 = call i32 (i8*, i8*, ...) @sscanf(i8* %44, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i64* %6)
%48 = icmp eq i32 %47, 1
br i1 %48, label %51, label %49
49: ; preds = %46, %43
%50 = call i32 (i8*, ...) bitcast (i32 (...)* @fatal to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %51
51: ; preds = %49, %46
%52 = and i8 %35, -33
%53 = icmp eq i8 %52, 71
%54 = zext i1 %53 to i32
%55 = and i8 %32, -33
%56 = icmp eq i8 %55, 86
%57 = zext i1 %56 to i32
%58 = load i32, i32* %7
%59 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outs to i8* (i8*, i32, i64*, ...)*)(i8* %0, i32 %58, i64* %4)
%60 = load i32, i32* %8
%61 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outs to i8* (i8*, i32, i64*, ...)*)(i8* %59, i32 %60, i64* %4)
%62 = load i32, i32* %9
%63 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outs to i8* (i8*, i32, i64*, ...)*)(i8* %61, i32 %62, i64* %4)
%64 = load i32, i32* %10
%65 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outs to i8* (i8*, i32, i64*, ...)*)(i8* %63, i32 %64, i64* %4)
%66 = load i32, i32* %5
%67 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outs to i8* (i8*, i32, i64*, ...)*)(i8* %65, i32 %66, i64* %4)
%68 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outc to i8* (i8*, i32, i64*, ...)*)(i8* %67, i32 %57, i64* %4)
%69 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outc to i8* (i8*, i32, i64*, ...)*)(i8* %68, i32 0, i64* %4)
%70 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outc to i8* (i8*, i32, i64*, ...)*)(i8* %69, i32 %54, i64* %4)
%71 = call i8* (i8*, i32, i64*, ...) bitcast (i8* (...)* @outc to i8* (i8*, i32, i64*, ...)*)(i8* %70, i32 0, i64* %4)
%72 = load i64, i64* %6
%73 = call i8* (i8*, i64, i64*, ...) bitcast (i8* (...)* @outl to i8* (i8*, i64, i64*, ...)*)(i8* %71, i64 %72, i64* %4)
%74 = call i8* (i8*, i8*, i64*, i32, ...) bitcast (i8* (...)* @outp to i8* (i8*, i8*, i64*, i32, ...)*)(i8* %73, i8* %18, i64* %4, i32 1)
%75 = ptrtoint i8* %74 to i64
%76 = ptrtoint i8* %0 to i64
%77 = sub i64 %75, %76
ret i64 %77
}