#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 /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ pause();
int /*<<< orphan*/ printf(char *);
char *rl_gets(char *);
int sscanf(char *, char *, char *, unsigned int *, unsigned int *);
int /*<<< orphan*/ stderr;
void wtest_read(int *adest, int *value) {
  char *cmd;
  char rw[100];
  unsigned int arg1 = -1;
  unsigned int arg2 = -1;
  while (1) {
    cmd = rl_gets("Enter a command ('h' for help) > ");
    if (cmd == 0) {
      printf("\n");
      printf("EOF \n");
      while (1)
        pause();
    }
    int status = sscanf(cmd, "%s%u%u", rw, &arg1, &arg2);
    fprintf(stderr, "st=%d ; cmd=%s ; arg1=%u ; arg2=%u\n", status, rw, arg1,
            arg2);
    switch (status) {
    case 1:
      switch (rw[0]) {
      case 'h':
        printf("  h   : help\n");
        printf("  c   : clear the programmable serpentin\n");
        printf("  f # : set frequence to X (0 < # < 2^24)\n");
        printf("  t # : enable/disable h1000 ticking (# in {0, 1})\n");
        printf("  n # : set number of frames to be looped (# in [|1, 32|])\n");
        printf("  s # @ : set the @-segment frame to # (# in [|1, 32|] and @ "
               "in [|0b0000000, 0b0000001, ..., 0b1111111|])\n");
        continue;
      case 'c':
        *adest = 11;
        *value = 0b000000000000000000000000;
        return;
      default:
        goto cmd_error;
      }
    case 2:
      switch (rw[0]) {
      case 'f':
        *adest = 10;
        *value =
            0b000000000000000000000000 | (arg1 & 0b001111111111111111111111);
        return;
      case 't':
        *adest = 12;
        *value = arg1 ? 1 : 0;
        return;
      case 'n':
        if (arg1 < 1 || arg1 > 32) {
          goto cmd_error;
        }
        *adest = 11;
        *value = 0b010000000000000000000000 | arg1;
        return;
      default:
        goto cmd_error;
      }
    case 3:
      switch (rw[0]) {
      case 's':
        if (arg1 < 1 || arg1 > 32 || arg2 > 0b1111111) {
          goto cmd_error;
        }
        *adest = 11;
        *value = 0b100000000000000000000000 | ((arg2 & 0b1111111) << 6) | arg1;
        return;
      default:
        goto cmd_error;
      }
    default:
    cmd_error:
      fprintf(stderr, "Invalid command\n");
      continue;
    }
  }
}


x86 assembly (clang, -O0):
<wtest_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x84(%rbp)
ff ff ff
movl   $0xffffffff,-0x88(%rbp)
ff ff ff
lea    0xe82(%rip),%rdi
call   1050 <rl_gets@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    11b6 <wtest_read+0x66>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <pause@plt>
jmp    11aa <wtest_read+0x5a>
mov    -0x18(%rbp),%rdi
lea    0xe67(%rip),%rsi
lea    -0x80(%rbp),%rdx
mov    %rdx,-0x98(%rbp)
lea    -0x84(%rbp),%rcx
lea    -0x88(%rbp),%r8
call   1070 <sscanf@plt>
mov    -0x98(%rbp),%rcx
mov    %eax,-0x8c(%rbp)
mov    0x2ded(%rip),%rax
mov    (%rax),%edi
mov    -0x8c(%rbp),%edx
mov    -0x84(%rbp),%r8d
mov    -0x88(%rbp),%r9d
lea    0xe1f(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    -0x8c(%rbp),%eax
mov    %eax,-0x90(%rbp)
sub    $0x1,%eax
je     1259 <wtest_read+0x109>
jmp    1231 <wtest_read+0xe1>
mov    -0x90(%rbp),%eax
sub    $0x2,%eax
je     12f0 <wtest_read+0x1a0>
jmp    1245 <wtest_read+0xf5>
mov    -0x90(%rbp),%eax
sub    $0x3,%eax
je     13c1 <wtest_read+0x271>
jmp    142f <wtest_read+0x2df>
movsbl -0x80(%rbp),%eax
mov    %eax,-0x9c(%rbp)
sub    $0x63,%eax
je     12d2 <wtest_read+0x182>
jmp    1271 <wtest_read+0x121>
mov    -0x9c(%rbp),%eax
sub    $0x68,%eax
jne    12eb <wtest_read+0x19b>
jmp    1285 <wtest_read+0x135>
lea    0xdc7(%rip),%rdi
call   1030 <printf@plt>
lea    0xdc9(%rip),%rdi
call   1030 <printf@plt>
lea    0xde7(%rip),%rdi
call   1030 <printf@plt>
lea    0xe06(%rip),%rdi
call   1030 <printf@plt>
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
lea    0xe5e(%rip),%rdi
call   1030 <printf@plt>
jmp    1177 <wtest_read+0x27>
mov    -0x8(%rbp),%rax
movl   $0xb,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    1450 <wtest_read+0x300>
jmp    1434 <wtest_read+0x2e4>
movsbl -0x80(%rbp),%eax
mov    %eax,-0xa0(%rbp)
sub    $0x66,%eax
je     1330 <wtest_read+0x1e0>
jmp    1308 <wtest_read+0x1b8>
mov    -0xa0(%rbp),%eax
sub    $0x6e,%eax
je     137c <wtest_read+0x22c>
jmp    131c <wtest_read+0x1cc>
mov    -0xa0(%rbp),%eax
sub    $0x74,%eax
je     1354 <wtest_read+0x204>
jmp    13bc <wtest_read+0x26c>
mov    -0x8(%rbp),%rax
movl   $0xa,(%rax)
mov    -0x84(%rbp),%ecx
and    $0x3fffff,%ecx
or     $0x0,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1450 <wtest_read+0x300>
mov    -0x8(%rbp),%rax
movl   $0xc,(%rax)
mov    -0x84(%rbp),%edx
xor    %ecx,%ecx
mov    $0x1,%eax
cmp    $0x0,%edx
cmovne %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1450 <wtest_read+0x300>
cmpl   $0x1,-0x84(%rbp)
jb     1396 <wtest_read+0x246>
cmpl   $0x20,-0x84(%rbp)
jbe    139b <wtest_read+0x24b>
jmp    1434 <wtest_read+0x2e4>
mov    -0x8(%rbp),%rax
movl   $0xb,(%rax)
mov    -0x84(%rbp),%ecx
or     $0x400000,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1450 <wtest_read+0x300>
jmp    1434 <wtest_read+0x2e4>
mov    -0x80(%rbp),%al
sub    $0x73,%al
jne    142a <wtest_read+0x2da>
jmp    13d1 <wtest_read+0x281>
cmpl   $0x1,-0x84(%rbp)
jb     13f8 <wtest_read+0x2a8>
cmpl   $0x20,-0x84(%rbp)
ja     13f8 <wtest_read+0x2a8>
cmpl   $0x7f,-0x88(%rbp)
jbe    13fd <wtest_read+0x2ad>
jmp    1434 <wtest_read+0x2e4>
mov    -0x8(%rbp),%rax
movl   $0xb,(%rax)
mov    -0x88(%rbp),%ecx
and    $0x7f,%ecx
shl    $0x6,%ecx
or     $0x800000,%ecx
or     -0x84(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1450 <wtest_read+0x300>
jmp    1434 <wtest_read+0x2e4>
jmp    1434 <wtest_read+0x2e4>
mov    0x2ba5(%rip),%rax
mov    (%rax),%edi
lea    0xd4d(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    1177 <wtest_read+0x27>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wtest_read>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rsi,0x18(%rsp)
mov    %rdi,0x10(%rsp)
movl   $0xffffffff,0x8(%rsp)
ff
movl   $0xffffffff,0xc(%rsp)
ff
lea    0xe6e(%rip),%rdi
call   1060 <rl_gets@plt>
test   %rax,%rax
je     1313 <wtest_read+0x1b3>
lea    0x20(%rsp),%rbx
lea    0xc(%rsp),%rbp
mov    0x2e2f(%rip),%r13
lea    0xe71(%rip),%r14
lea    0xe41(%rip),%r15
jmp    11f3 <wtest_read+0x93>
cmp    $0x63,%eax
je     1339 <wtest_read+0x1d9>
nopw   0x0(%rax,%rax,1)
mov    0x0(%r13),%edi
lea    0xe72(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %r15,%rdi
call   1060 <rl_gets@plt>
test   %rax,%rax
je     1313 <wtest_read+0x1b3>
mov    %rax,%rdi
lea    0xe25(%rip),%rsi
mov    %rbx,%rdx
lea    0x8(%rsp),%rcx
mov    %rbp,%r8
call   1080 <sscanf@plt>
mov    %eax,%r12d
mov    0x0(%r13),%edi
mov    0x8(%rsp),%r8d
mov    0xc(%rsp),%r9d
mov    %r14,%rsi
mov    %eax,%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   1050 <fprintf@plt>
cmp    $0x3,%r12d
je     12a0 <wtest_read+0x140>
cmp    $0x2,%r12d
je     12d0 <wtest_read+0x170>
cmp    $0x1,%r12d
jne    11d0 <wtest_read+0x70>
movsbl 0x20(%rsp),%eax
cmp    $0x68,%eax
jne    11c1 <wtest_read+0x61>
lea    0xe06(%rip),%rdi
call   1040 <puts@plt>
lea    0xe07(%rip),%rdi
call   1040 <puts@plt>
lea    0xe24(%rip),%rdi
call   1040 <puts@plt>
lea    0xe42(%rip),%rdi
call   1040 <puts@plt>
lea    0xe69(%rip),%rdi
call   1040 <puts@plt>
lea    0xe98(%rip),%rdi
call   1040 <puts@plt>
jmp    11e2 <wtest_read+0x82>
xchg   %ax,%ax
cmpb   $0x73,0x20(%rsp)
jne    11d0 <wtest_read+0x70>
mov    0x8(%rsp),%eax
lea    -0x21(%rax),%ecx
cmp    $0xffffffe0,%ecx
jb     11d0 <wtest_read+0x70>
mov    0xc(%rsp),%ecx
cmp    $0x7f,%ecx
ja     11d0 <wtest_read+0x70>
jmp    1348 <wtest_read+0x1e8>
nopw   0x0(%rax,%rax,1)
movsbl 0x20(%rsp),%eax
cmp    $0x6e,%eax
je     12f1 <wtest_read+0x191>
cmp    $0x74,%eax
je     1362 <wtest_read+0x202>
cmp    $0x66,%eax
jne    11d0 <wtest_read+0x70>
jmp    1379 <wtest_read+0x219>
mov    0x8(%rsp),%eax
lea    -0x21(%rax),%ecx
cmp    $0xffffffe0,%ecx
jb     11d0 <wtest_read+0x70>
mov    0x10(%rsp),%rcx
movl   $0xb,(%rcx)
or     $0x400000,%eax
jmp    138d <wtest_read+0x22d>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe72(%rip),%rdi
call   1040 <puts@plt>
nopl   0x0(%rax)
xor    %eax,%eax
call   1070 <pause@plt>
jmp    1330 <wtest_read+0x1d0>
mov    0x10(%rsp),%rax
movl   $0xb,(%rax)
xor    %eax,%eax
jmp    138d <wtest_read+0x22d>
mov    0x10(%rsp),%rdx
movl   $0xb,(%rdx)
and    $0x7f,%ecx
shl    $0x6,%ecx
or     %ecx,%eax
or     $0x800000,%eax
jmp    138d <wtest_read+0x22d>
mov    0x10(%rsp),%rax
movl   $0xc,(%rax)
xor    %eax,%eax
cmpl   $0x0,0x8(%rsp)
setne  %al
jmp    138d <wtest_read+0x22d>
mov    0x10(%rsp),%rax
movl   $0xa,(%rax)
mov    $0x3fffff,%eax
and    0x8(%rsp),%eax
mov    0x18(%rsp),%rcx
mov    %eax,(%rcx)
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Enter a command ('h' for help) > \00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [6 x i8] c"EOF \0A\00"
@.str.3 = [7 x i8] c"%s%u%u\00"
@stderr = global i32 0
@.str.4 = [36 x i8] c"st=%d ; cmd=%s ; arg1=%u ; arg2=%u\0A\00"
@.str.5 = [14 x i8] c" h : help\0A\00"
@.str.6 = [42 x i8] c" c : clear the programmable serpentin\0A\00"
@.str.7 = [43 x i8] c" f # : set frequence to X (0 < # < 2^24)\0A\00"
@.str.8 = [52 x i8] c" t # : enable/disable h1000 ticking (# in {0, 1})\0A\00"
@.str.9 = [60 x i8] c" n # : set number of frames to be looped (# in [|1, 32|])\0A\00"
@.str.10 = [107 x i8] c" s # @ : set the @-segment frame to # (# in [|1, 32|] and @ in [|0b0000000, 0b0000001, ..., 0b1111111|])\0A\00"
@.str.11 = [17 x i8] c"Invalid command\0A\00"
define void @wtest_read(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca [100 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 -1, i32* %7
store i32 -1, i32* %8
br label %10
10: ; preds = %2, %34, %100
%11 = call i8* @rl_gets(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %19
14: ; preds = %10
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %17
17: ; preds = %14, %17
%18 = call i32 (...) @pause()
br label %17
19: ; preds = %10
%20 = load i8*, i8** %5
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%22 = call i32 @sscanf(i8* %20, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %21, i32* %7, i32* %8)
store i32 %22, i32* %9
%23 = load i32, i32* @stderr
%24 = load i32, i32* %9
%25 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%26 = load i32, i32* %7
%27 = load i32, i32* %8
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 %24, i8* %25, i32 %26, i32 %27)
%29 = load i32, i32* %9
switch i32 %29, label %99 [
i32 1, label %30
i32 2, label %45
i32 3, label %75
]
30: ; preds = %19
%31 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
switch i32 %33, label %44 [
i32 104, label %34
i32 99, label %41
]
34: ; preds = %30
%35 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%36 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
%37 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0))
%38 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0))
%39 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
%40 = call i32 @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.10, i64 0, i64 0))
br label %10
41: ; preds = %30
%42 = load i32*, i32** %3
store i32 11, i32* %42
%43 = load i32*, i32** %4
store i32 0, i32* %43
br label %103
44: ; preds = %30
br label %100
45: ; preds = %19
%46 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
switch i32 %48, label %74 [
i32 102, label %49
i32 116, label %55
i32 110, label %62
]
49: ; preds = %45
%50 = load i32*, i32** %3
store i32 10, i32* %50
%51 = load i32, i32* %7
%52 = and i32 %51, 4194303
%53 = or i32 0, %52
%54 = load i32*, i32** %4
store i32 %53, i32* %54
br label %103
55: ; preds = %45
%56 = load i32*, i32** %3
store i32 12, i32* %56
%57 = load i32, i32* %7
%58 = icmp ne i32 %57, 0
%59 = zext i1 %58 to i64
%60 = select i1 %58, i32 1, i32 0
%61 = load i32*, i32** %4
store i32 %60, i32* %61
br label %103
62: ; preds = %45
%63 = load i32, i32* %7
%64 = icmp ult i32 %63, 1
br i1 %64, label %68, label %65
65: ; preds = %62
%66 = load i32, i32* %7
%67 = icmp ugt i32 %66, 32
br i1 %67, label %68, label %69
68: ; preds = %65, %62
br label %100
69: ; preds = %65
%70 = load i32*, i32** %3
store i32 11, i32* %70
%71 = load i32, i32* %7
%72 = or i32 4194304, %71
%73 = load i32*, i32** %4
store i32 %72, i32* %73
br label %103
74: ; preds = %45
br label %100
75: ; preds = %19
%76 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%77 = load i8, i8* %76
%78 = sext i8 %77 to i32
switch i32 %78, label %98 [
i32 115, label %79
]
79: ; preds = %75
%80 = load i32, i32* %7
%81 = icmp ult i32 %80, 1
br i1 %81, label %88, label %82
82: ; preds = %79
%83 = load i32, i32* %7
%84 = icmp ugt i32 %83, 32
br i1 %84, label %88, label %85
85: ; preds = %82
%86 = load i32, i32* %8
%87 = icmp ugt i32 %86, 127
br i1 %87, label %88, label %89
88: ; preds = %85, %82, %79
br label %100
89: ; preds = %85
%90 = load i32*, i32** %3
store i32 11, i32* %90
%91 = load i32, i32* %8
%92 = and i32 %91, 127
%93 = shl i32 %92, 6
%94 = or i32 8388608, %93
%95 = load i32, i32* %7
%96 = or i32 %94, %95
%97 = load i32*, i32** %4
store i32 %96, i32* %97
br label %103
98: ; preds = %75
br label %100
99: ; preds = %19
br label %100
100: ; preds = %99, %98, %88, %74, %68, %44
%101 = load i32, i32* @stderr
%102 = call i32 (i32, i8*, ...) @fprintf(i32 %101, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
br label %10
103: ; preds = %89, %69, %55, %49, %41
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Enter a command ('h' for help) > \00"
@.str.3 = [7 x i8] c"%s%u%u\00"
@stderr = global i32 0
@.str.4 = [36 x i8] c"st=%d ; cmd=%s ; arg1=%u ; arg2=%u\0A\00"
@.str.11 = [17 x i8] c"Invalid command\0A\00"
@str = [13 x i8] c" h : help\00"
@str.12 = [41 x i8] c" c : clear the programmable serpentin\00"
@str.13 = [42 x i8] c" f # : set frequence to X (0 < # < 2^24)\00"
@str.14 = [51 x i8] c" t # : enable/disable h1000 ticking (# in {0, 1})\00"
@str.15 = [59 x i8] c" n # : set number of frames to be looped (# in [|1, 32|])\00"
@str.16 = [106 x i8] c" s # @ : set the @-segment frame to # (# in [|1, 32|] and @ in [|0b0000000, 0b0000001, ..., 0b1111111|])\00"
@str.17 = [5 x i8] c"EOF \00"
define void @wtest_read(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
%3 = alloca [100 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%7 = bitcast i32* %4 to i8*
store i32 -1, i32* %4
%8 = bitcast i32* %5 to i8*
store i32 -1, i32* %5
%9 = call i8* @rl_gets(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %16
11: ; preds = %68, %2
%12 = call i32 @putchar(i32 10)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.17, i64 0, i64 0))
br label %14
14: ; preds = %14, %11
%15 = call i32 (...) @pause()
br label %14
16: ; preds = %2, %68
%17 = phi i8* [ %69, %68 ], [ %9, %2 ]
%18 = call i32 @sscanf(i8* %17, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %6, i32* %4, i32* %5)
%19 = load i32, i32* @stderr
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 %18, i8* %6, i32 %20, i32 %21)
switch i32 %18, label %65 [
i32 1, label %23
i32 2, label %34
i32 3, label %50
]
23: ; preds = %16
%24 = load i8, i8* %6
%25 = sext i8 %24 to i32
switch i32 %25, label %65 [
i32 104, label %26
i32 99, label %33
]
26: ; preds = %23
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.12, i64 0, i64 0))
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.13, i64 0, i64 0))
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.14, i64 0, i64 0))
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.15, i64 0, i64 0))
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @str.16, i64 0, i64 0))
br label %68
33: ; preds = %23
store i32 11, i32* %0
br label %71
34: ; preds = %16
%35 = load i8, i8* %6
%36 = sext i8 %35 to i32
switch i32 %36, label %65 [
i32 102, label %37
i32 116, label %40
i32 110, label %44
]
37: ; preds = %34
store i32 10, i32* %0
%38 = load i32, i32* %4
%39 = and i32 %38, 4194303
br label %71
40: ; preds = %34
store i32 12, i32* %0
%41 = load i32, i32* %4
%42 = icmp ne i32 %41, 0
%43 = zext i1 %42 to i32
br label %71
44: ; preds = %34
%45 = load i32, i32* %4
%46 = add i32 %45, -33
%47 = icmp ult i32 %46, -32
br i1 %47, label %65, label %48
48: ; preds = %44
store i32 11, i32* %0
%49 = or i32 %45, 4194304
br label %71
50: ; preds = %16
%51 = load i8, i8* %6
%52 = icmp eq i8 %51, 115
br i1 %52, label %53, label %65
53: ; preds = %50
%54 = load i32, i32* %4
%55 = add i32 %54, -33
%56 = icmp ult i32 %55, -32
%57 = load i32, i32* %5
%58 = icmp ugt i32 %57, 127
%59 = select i1 %56, i1 true, i1 %58
br i1 %59, label %65, label %60
60: ; preds = %53
store i32 11, i32* %0
%61 = shl nuw nsw i32 %57, 6
%62 = and i32 %61, 8128
%63 = or i32 %54, %62
%64 = or i32 %63, 8388608
br label %71
65: ; preds = %16, %50, %53, %34, %44, %23
%66 = load i32, i32* @stderr
%67 = call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
br label %68
68: ; preds = %65, %26
%69 = call i8* @rl_gets(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%70 = icmp eq i8* %69, null
br i1 %70, label %11, label %16
71: ; preds = %33, %37, %40, %48, %60
%72 = phi i32 [ 0, %33 ], [ %39, %37 ], [ %43, %40 ], [ %49, %48 ], [ %64, %60 ]
store i32 %72, i32* %1
ret void
}