#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int decchk(char *, int, char *);
int /*<<< orphan*/ *gets(char *);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int j, k, l, n, nbad = 0, ntot = 0;
  int iok, jok;
  char lin[128 + 2], ch, chh;
  lin[0] = '8';
  lin[1] = '6';
  lin[5] = '4';
  lin[6] = '1';
  for (j = 48; j <= 57; j++) {
    for (k = 48; k <= 57; k++) {
      for (l = 48; l <= 57; l++) {
        lin[3] = l;
        if (j != k) {
          ntot++;
          lin[2] = j;
          lin[4] = k;
          iok = decchk(lin, 7, &ch);
          lin[7] = ch;
          iok = decchk(lin, 8, &chh);
          lin[2] = k;
          lin[4] = j;
          jok = decchk(lin, 8, &chh);
          if (!iok || jok)
            nbad++;
        }
      }
    }
  }
  printf("%s %14s %3d\n", "Total tries:", " ", ntot);
  printf("%s %16s %3d\n", "Bad tries:", " ", nbad);
  printf("%s %11s %4.2f\n", "Fraction good:", " ",
         ((float)(ntot - nbad)) / ntot);
  for (;;) {
    printf("enter string terminated by x:\n");
    if (gets(lin) == NULL)
      break;
    for (j = 0; j < 128; j++)
      if (lin[j] == 'x')
        break;
    n = j;
    if (!n)
      break;
    iok = decchk(lin, n, &ch);
    lin[n] = ch;
    jok = decchk(lin, n + 1, &chh);
    lin[n + 1] = 0;
    printf("%s checks as %c\n", lin, jok ? 'T' : 'F');
  }
  printf("Normal completion\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movb   $0x38,-0xb0(%rbp)
movb   $0x36,-0xaf(%rbp)
movb   $0x34,-0xab(%rbp)
movb   $0x31,-0xaa(%rbp)
movl   $0x30,-0x8(%rbp)
cmpl   $0x39,-0x8(%rbp)
jg     1299 <main+0x169>
movl   $0x30,-0xc(%rbp)
cmpl   $0x39,-0xc(%rbp)
jg     1286 <main+0x156>
movl   $0x30,-0x10(%rbp)
cmpl   $0x39,-0x10(%rbp)
jg     1273 <main+0x143>
mov    -0x10(%rbp),%eax
mov    %al,-0xad(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1260 <main+0x130>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    %al,-0xae(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,-0xac(%rbp)
lea    -0xb0(%rbp),%rdi
mov    $0x7,%esi
lea    -0xb1(%rbp),%rdx
call   1030 <decchk@plt>
mov    %eax,-0x20(%rbp)
mov    -0xb1(%rbp),%al
mov    %al,-0xa9(%rbp)
lea    -0xb0(%rbp),%rdi
mov    $0x8,%esi
lea    -0xb2(%rbp),%rdx
call   1030 <decchk@plt>
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,-0xae(%rbp)
mov    -0x8(%rbp),%eax
mov    %al,-0xac(%rbp)
lea    -0xb0(%rbp),%rdi
mov    $0x8,%esi
lea    -0xb2(%rbp),%rdx
call   1030 <decchk@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     1252 <main+0x122>
cmpl   $0x0,-0x24(%rbp)
je     125b <main+0x12b>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1260 <main+0x130>
jmp    1265 <main+0x135>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1195 <main+0x65>
jmp    1278 <main+0x148>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1184 <main+0x54>
jmp    128b <main+0x15b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1173 <main+0x43>
mov    -0x1c(%rbp),%ecx
lea    0xd5d(%rip),%rdi
lea    0xd63(%rip),%rsi
lea    0xd69(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%ecx
lea    0xd5a(%rip),%rdi
lea    0xd60(%rip),%rsi
lea    0xd4a(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
sub    -0x18(%rbp),%eax
cvtsi2ss %eax,%xmm0
cvtsi2ssl -0x1c(%rbp),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd3f(%rip),%rdi
lea    0xd47(%rip),%rsi
lea    0xd17(%rip),%rdx
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xd41(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xb0(%rbp),%rdi
call   1050 <gets@plt>
cmp    $0x0,%rax
jne    1333 <main+0x203>
jmp    140c <main+0x2dc>
movl   $0x0,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jge    1374 <main+0x244>
movslq -0x8(%rbp),%rax
movsbl -0xb0(%rbp,%rax,1),%eax
ff
cmp    $0x78,%eax
jne    1361 <main+0x231>
jmp    1374 <main+0x244>
jmp    1366 <main+0x236>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    133a <main+0x20a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1389 <main+0x259>
jmp    140c <main+0x2dc>
lea    -0xb0(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0xb1(%rbp),%rdx
call   1030 <decchk@plt>
mov    %eax,-0x20(%rbp)
mov    -0xb1(%rbp),%cl
movslq -0x14(%rbp),%rax
mov    %cl,-0xb0(%rbp,%rax,1)
lea    -0xb0(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
lea    -0xb2(%rbp),%rdx
call   1030 <decchk@plt>
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x0,-0xb0(%rbp,%rax,1)
lea    -0xb0(%rbp),%rsi
mov    -0x24(%rbp),%ecx
mov    $0x46,%edx
mov    $0x54,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
lea    0xc71(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    130a <main+0x1da>
lea    0xc6f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
movw   $0x3638,0x10(%rsp)
movw   $0x3134,0x15(%rsp)
mov    $0x30,%r12d
xor    %ebp,%ebp
xor    %r15d,%r15d
jmp    117e <main+0x3e>
nopl   0x0(%rax)
add    $0x1,%r12d
cmp    $0x3a,%r12d
je     122d <main+0xed>
mov    $0x30,%edx
jmp    1198 <main+0x58>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%edx
cmp    $0x3a,%edx
je     1170 <main+0x30>
mov    $0xfffffff6,%r14d
jmp    11a5 <main+0x65>
inc    %r14d
je     1190 <main+0x50>
lea    0x3a(%r14),%eax
mov    %al,0x13(%rsp)
cmp    %edx,%r12d
je     11a0 <main+0x60>
add    $0x1,%ebp
mov    %r12b,0x12(%rsp)
mov    %dl,0x14(%rsp)
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x7,%esi
mov    %edx,%r13d
lea    0xe(%rsp),%rdx
call   1040 <decchk@plt>
movzbl 0xe(%rsp),%eax
mov    %al,0x17(%rsp)
mov    %rbx,%rdi
mov    $0x8,%esi
lea    0xf(%rsp),%rdx
call   1040 <decchk@plt>
mov    %eax,%ebx
mov    %r13b,0x12(%rsp)
mov    %r12b,0x14(%rsp)
lea    0x10(%rsp),%rdi
mov    $0x8,%esi
lea    0xf(%rsp),%rdx
call   1040 <decchk@plt>
mov    %r13d,%edx
test   %ebx,%ebx
sete   %cl
test   %eax,%eax
setne  %al
or     %cl,%al
movzbl %al,%eax
add    %eax,%r15d
jmp    11a0 <main+0x60>
lea    0xdcc(%rip),%rdi
lea    0xdd2(%rip),%rsi
lea    0xdd8(%rip),%r14
mov    %r14,%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdc7(%rip),%rdi
lea    0xdcd(%rip),%rsi
mov    %r14,%rdx
mov    %r15d,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
cvtsi2ss %ebp,%xmm0
sub    %r15d,%ebp
cvtsi2ss %ebp,%xmm1
divss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xdae(%rip),%rdi
lea    0xdb6(%rip),%rsi
mov    %r14,%rdx
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xdc5(%rip),%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rdi
call   1060 <gets@plt>
test   %rax,%rax
je     135f <main+0x21f>
lea    0x10(%rsp),%rbx
lea    0xf(%rsp),%r15
mov    $0x46,%r14d
lea    0xd85(%rip),%r12
lea    0xd8f(%rip),%r13
xor    %ebp,%ebp
jmp    12ed <main+0x1ad>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    $0x80,%rbp
je     12fa <main+0x1ba>
cmpb   $0x78,0x10(%rsp,%rbp,1)
jne    12e0 <main+0x1a0>
test   %ebp,%ebp
jne    12ff <main+0x1bf>
jmp    135f <main+0x21f>
mov    $0x80,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
lea    0xe(%rsp),%rdx
call   1040 <decchk@plt>
movzbl 0xe(%rsp),%eax
mov    %ebp,%ebp
mov    %al,0x10(%rsp,%rbp,1)
lea    0x1(%rbp),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
call   1040 <decchk@plt>
movb   $0x0,0x11(%rsp,%rbp,1)
test   %eax,%eax
mov    $0x54,%edx
cmove  %r14d,%edx
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1060 <gets@plt>
mov    $0x0,%ebp
test   %rax,%rax
jne    12ed <main+0x1ad>
lea    0xd1b(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%s %14s %3d\0A\00"
@.str.1 = [13 x i8] c"Total tries:\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [13 x i8] c"%s %16s %3d\0A\00"
@.str.4 = [11 x i8] c"Bad tries:\00"
@.str.5 = [15 x i8] c"%s %11s %4.2f\0A\00"
@.str.6 = [15 x i8] c"Fraction good:\00"
@.str.7 = [31 x i8] c"enter string terminated by x:\0A\00"
@.str.8 = [17 x i8] c"%s checks as %c\0A\00"
@.str.9 = [19 x i8] c"Normal completion\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [130 x i8]
%11 = alloca i8
%12 = alloca i8
store i32 0, i32* %1
store i32 0, i32* %6
store i32 0, i32* %7
%13 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 0
store i8 56, i8* %13
%14 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 1
store i8 54, i8* %14
%15 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 5
store i8 52, i8* %15
%16 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 6
store i8 49, i8* %16
store i32 48, i32* %2
br label %17
17: ; preds = %76, %0
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 57
br i1 %19, label %20, label %79
20: ; preds = %17
store i32 48, i32* %3
br label %21
21: ; preds = %72, %20
%22 = load i32, i32* %3
%23 = icmp sle i32 %22, 57
br i1 %23, label %24, label %75
24: ; preds = %21
store i32 48, i32* %4
br label %25
25: ; preds = %68, %24
%26 = load i32, i32* %4
%27 = icmp sle i32 %26, 57
br i1 %27, label %28, label %71
28: ; preds = %25
%29 = load i32, i32* %4
%30 = trunc i32 %29 to i8
%31 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 3
store i8 %30, i8* %31
%32 = load i32, i32* %2
%33 = load i32, i32* %3
%34 = icmp ne i32 %32, %33
br i1 %34, label %35, label %67
35: ; preds = %28
%36 = load i32, i32* %7
%37 = add nsw i32 %36, 1
store i32 %37, i32* %7
%38 = load i32, i32* %2
%39 = trunc i32 %38 to i8
%40 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 2
store i8 %39, i8* %40
%41 = load i32, i32* %3
%42 = trunc i32 %41 to i8
%43 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 4
store i8 %42, i8* %43
%44 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 0
%45 = call i32 @decchk(i8* %44, i32 7, i8* %11)
store i32 %45, i32* %8
%46 = load i8, i8* %11
%47 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 7
store i8 %46, i8* %47
%48 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 0
%49 = call i32 @decchk(i8* %48, i32 8, i8* %12)
store i32 %49, i32* %8
%50 = load i32, i32* %3
%51 = trunc i32 %50 to i8
%52 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 2
store i8 %51, i8* %52
%53 = load i32, i32* %2
%54 = trunc i32 %53 to i8
%55 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 4
store i8 %54, i8* %55
%56 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 0
%57 = call i32 @decchk(i8* %56, i32 8, i8* %12)
store i32 %57, i32* %9
%58 = load i32, i32* %8
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %63
60: ; preds = %35
%61 = load i32, i32* %9
%62 = icmp ne i32 %61, 0
br i1 %62, label %63, label %66
63: ; preds = %60, %35
%64 = load i32, i32* %6
%65 = add nsw i32 %64, 1
store i32 %65, i32* %6
br label %66
66: ; preds = %63, %60
br label %67
67: ; preds = %66, %28
br label %68
68: ; preds = %67
%69 = load i32, i32* %4
%70 = add nsw i32 %69, 1
store i32 %70, i32* %4
br label %25
71: ; preds = %25
br label %72
72: ; preds = %71
%73 = load i32, i32* %3
%74 = add nsw i32 %73, 1
store i32 %74, i32* %3
br label %21
75: ; preds = %21
br label %76
76: ; preds = %75
%77 = load i32, i32* %2
%78 = add nsw i32 %77, 1
store i32 %78, i32* %2
br label %17
79: ; preds = %17
%80 = load i32, i32* %7
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %80)
%82 = load i32, i32* %6
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %82)
%84 = load i32, i32* %7
%85 = load i32, i32* %6
%86 = sub nsw i32 %84, %85
%87 = sitofp i32 %86 to float
%88 = load i32, i32* %7
%89 = sitofp i32 %88 to float
%90 = fdiv float %87, %89
%91 = fpext float %90 to double
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), double %91)
br label %93
93: ; preds = %120, %79
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0))
%95 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 0
%96 = call i32* @gets(i8* %95)
%97 = icmp eq i32* %96, null
br i1 %97, label %98, label %99
98: ; preds = %93
br label %142
99: ; preds = %93
store i32 0, i32* %2
br label %100
100: ; preds = %112, %99
%101 = load i32, i32* %2
%102 = icmp slt i32 %101, 128
br i1 %102, label %103, label %115
103: ; preds = %100
%104 = load i32, i32* %2
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 %105
%107 = load i8, i8* %106
%108 = sext i8 %107 to i32
%109 = icmp eq i32 %108, 120
br i1 %109, label %110, label %111
110: ; preds = %103
br label %115
111: ; preds = %103
br label %112
112: ; preds = %111
%113 = load i32, i32* %2
%114 = add nsw i32 %113, 1
store i32 %114, i32* %2
br label %100
115: ; preds = %110, %100
%116 = load i32, i32* %2
store i32 %116, i32* %5
%117 = load i32, i32* %5
%118 = icmp ne i32 %117, 0
br i1 %118, label %120, label %119
119: ; preds = %115
br label %142
120: ; preds = %115
%121 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 0
%122 = load i32, i32* %5
%123 = call i32 @decchk(i8* %121, i32 %122, i8* %11)
store i32 %123, i32* %8
%124 = load i8, i8* %11
%125 = load i32, i32* %5
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 %126
store i8 %124, i8* %127
%128 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 0
%129 = load i32, i32* %5
%130 = add nsw i32 %129, 1
%131 = call i32 @decchk(i8* %128, i32 %130, i8* %12)
store i32 %131, i32* %9
%132 = load i32, i32* %5
%133 = add nsw i32 %132, 1
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 %134
store i8 0, i8* %135
%136 = getelementptr inbounds [130 x i8], [130 x i8]* %10, i64 0, i64 0
%137 = load i32, i32* %9
%138 = icmp ne i32 %137, 0
%139 = zext i1 %138 to i64
%140 = select i1 %138, i32 84, i32 70
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* %136, i32 %140)
br label %93
142: ; preds = %119, %98
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s %14s %3d\0A\00"
@.str.1 = [13 x i8] c"Total tries:\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [13 x i8] c"%s %16s %3d\0A\00"
@.str.4 = [11 x i8] c"Bad tries:\00"
@.str.5 = [15 x i8] c"%s %11s %4.2f\0A\00"
@.str.6 = [15 x i8] c"Fraction good:\00"
@.str.8 = [17 x i8] c"%s checks as %c\0A\00"
@str = [30 x i8] c"enter string terminated by x:\00"
@str.10 = [18 x i8] c"Normal completion\00"
define i32 @main() {
%1 = alloca [130 x i8]
%2 = alloca i8
%3 = alloca i8
%4 = getelementptr inbounds [130 x i8], [130 x i8]* %1, i64 0, i64 0
store i8 56, i8* %4
%5 = getelementptr inbounds [130 x i8], [130 x i8]* %1, i64 0, i64 1
store i8 54, i8* %5
%6 = getelementptr inbounds [130 x i8], [130 x i8]* %1, i64 0, i64 5
store i8 52, i8* %6
%7 = getelementptr inbounds [130 x i8], [130 x i8]* %1, i64 0, i64 6
store i8 49, i8* %7
%8 = getelementptr inbounds [130 x i8], [130 x i8]* %1, i64 0, i64 3
%9 = getelementptr inbounds [130 x i8], [130 x i8]* %1, i64 0, i64 2
%10 = getelementptr inbounds [130 x i8], [130 x i8]* %1, i64 0, i64 4
%11 = getelementptr inbounds [130 x i8], [130 x i8]* %1, i64 0, i64 7
br label %12
12: ; preds = %0, %47
%13 = phi i32 [ 0, %0 ], [ %41, %47 ]
%14 = phi i32 [ 0, %0 ], [ %40, %47 ]
%15 = phi i32 [ 48, %0 ], [ %48, %47 ]
%16 = trunc i32 %15 to i8
br label %17
17: ; preds = %12, %44
%18 = phi i32 [ %13, %12 ], [ %41, %44 ]
%19 = phi i32 [ %14, %12 ], [ %40, %44 ]
%20 = phi i32 [ 48, %12 ], [ %45, %44 ]
%21 = icmp eq i32 %15, %20
%22 = trunc i32 %20 to i8
br label %23
23: ; preds = %17, %39
%24 = phi i32 [ %18, %17 ], [ %41, %39 ]
%25 = phi i32 [ %19, %17 ], [ %40, %39 ]
%26 = phi i32 [ 48, %17 ], [ %42, %39 ]
%27 = trunc i32 %26 to i8
store i8 %27, i8* %8
br i1 %21, label %39, label %28
28: ; preds = %23
%29 = add nsw i32 %24, 1
store i8 %16, i8* %9
store i8 %22, i8* %10
%30 = call i32 @decchk(i8* %4, i32 7, i8* %2)
%31 = load i8, i8* %2
store i8 %31, i8* %11
%32 = call i32 @decchk(i8* %4, i32 8, i8* %3)
store i8 %22, i8* %9
store i8 %16, i8* %10
%33 = call i32 @decchk(i8* %4, i32 8, i8* %3)
%34 = icmp eq i32 %32, 0
%35 = icmp ne i32 %33, 0
%36 = select i1 %34, i1 true, i1 %35
%37 = zext i1 %36 to i32
%38 = add nsw i32 %25, %37
br label %39
39: ; preds = %28, %23
%40 = phi i32 [ %25, %23 ], [ %38, %28 ]
%41 = phi i32 [ %24, %23 ], [ %29, %28 ]
%42 = add nuw nsw i32 %26, 1
%43 = icmp eq i32 %42, 58
br i1 %43, label %44, label %23
44: ; preds = %39
%45 = add nuw nsw i32 %20, 1
%46 = icmp eq i32 %45, 58
br i1 %46, label %47, label %17
47: ; preds = %44
%48 = add nuw nsw i32 %15, 1
%49 = icmp eq i32 %48, 58
br i1 %49, label %50, label %12
50: ; preds = %47
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %41)
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %40)
%53 = sub nsw i32 %41, %40
%54 = sitofp i32 %53 to float
%55 = sitofp i32 %41 to float
%56 = fdiv float %54, %55
%57 = fpext float %56 to double
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), double %57)
%59 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%60 = call i32* @gets(i8* %4)
%61 = icmp eq i32* %60, null
br i1 %61, label %91, label %62
62: ; preds = %50, %70
%63 = phi i64 [ %71, %70 ], [ 0, %50 ]
%64 = getelementptr inbounds [130 x i8], [130 x i8]* %1, i64 0, i64 %63
%65 = load i8, i8* %64
%66 = icmp eq i8 %65, 120
br i1 %66, label %72, label %67
67: ; preds = %62
%68 = add nuw nsw i64 %63, 1
%69 = icmp eq i64 %68, 128
br i1 %69, label %75, label %70
70: ; preds = %67, %75
%71 = phi i64 [ %68, %67 ], [ 0, %75 ]
br label %62
72: ; preds = %62
%73 = trunc i64 %63 to i32
%74 = icmp eq i32 %73, 0
br i1 %74, label %91, label %75
75: ; preds = %67, %72
%76 = phi i32 [ %73, %72 ], [ 128, %67 ]
%77 = call i32 @decchk(i8* %4, i32 %76, i8* %2)
%78 = load i8, i8* %2
%79 = zext i32 %76 to i64
%80 = getelementptr inbounds [130 x i8], [130 x i8]* %1, i64 0, i64 %79
store i8 %78, i8* %80
%81 = add nuw nsw i32 %76, 1
%82 = call i32 @decchk(i8* %4, i32 %81, i8* %3)
%83 = zext i32 %81 to i64
%84 = getelementptr inbounds [130 x i8], [130 x i8]* %1, i64 0, i64 %83
store i8 0, i8* %84
%85 = icmp eq i32 %82, 0
%86 = select i1 %85, i32 70, i32 84
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* %4, i32 %86)
%88 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%89 = call i32* @gets(i8* %4)
%90 = icmp eq i32* %89, null
br i1 %90, label %91, label %70
91: ; preds = %75, %72, %50
%92 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.10, i64 0, i64 0))
ret i32 0
}