#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 */
void *Getc();
int /*<<< orphan*/ dump(int);
int /*<<< orphan*/ hash_algs(int);
int /*<<< orphan*/ memcmp(char *, char *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
extern int string_to_key(void) {
  int has_iv = 1;
  int type = Getc();
  int hash = Getc();
  switch (type) {
  case 0:
    printf("\tSimple string-to-key(s2k %d):\n", type);
    printf("\t");
    hash_algs(hash);
    break;
  case 1:
    printf("\tSalted string-to-key(s2k %d):\n", type);
    printf("\t");
    hash_algs(hash);
    printf("\t\tSalt - ");
    dump(8);
    printf("\n");
    break;
  case 2:
    printf("\tReserved string-to-key(s2k %d)\n", type);
    break;
  case 3:
    printf("\tIterated and salted string-to-key(s2k %d):\n", type);
    printf("\t");
    hash_algs(hash);
    printf("\t\tSalt - ");
    dump(8);
    printf("\n");
    {
      int count, c = Getc();
      count = (16 + (c & 15)) << ((c >> 4) + 6);
      printf("\t\tCount - %d(coded count %d)\n", count, c);
    }
    break;
  case 101:
    has_iv = 0;
    {
      char temp[4];
      int j, snlen;
      for (j = 0; j < 4; j++)
        temp[j] = Getc();
      if (!memcmp(temp, "GNU", 3)) {
        type = 1000 + temp[3];
        switch (type) {
        case 1001:
          printf("\tGnuPG gnu-dummy (s2k %d)\n", type);
          break;
        case 1002:
          snlen = Getc();
          printf("\tGnuPG gnu-divert-to-card (s2k %d)\n\tSerial Number: ",
                 type);
          dump(snlen);
          puts("");
          break;
        default:
          printf("\tGnuPG unknown extension (s2k %d)\n", type);
          break;
        }
      } else {
        printf("\tPrivate/experimental string-to-key(s2k %d)\n", type);
      }
    }
    break;
  default:
    printf("\tUnknown string-to-key(s2k %d)\n", type);
  }
  return has_iv;
}


x86 assembly (clang, -O0):
<string_to_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x1,-0x4(%rbp)
xor    %eax,%eax
mov    %al,-0x25(%rbp)
call   1080 <Getc@plt>
mov    %rax,%rcx
mov    -0x25(%rbp),%al
mov    %ecx,-0x8(%rbp)
call   1080 <Getc@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x24(%rbp)
test   %eax,%eax
je     11e1 <string_to_key+0x81>
jmp    119d <string_to_key+0x3d>
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
je     120d <string_to_key+0xad>
jmp    11ae <string_to_key+0x4e>
mov    -0x24(%rbp),%eax
sub    $0x2,%eax
je     125f <string_to_key+0xff>
jmp    11bf <string_to_key+0x5f>
mov    -0x24(%rbp),%eax
sub    $0x3,%eax
je     1275 <string_to_key+0x115>
jmp    11d0 <string_to_key+0x70>
mov    -0x24(%rbp),%eax
sub    $0x65,%eax
je     12fc <string_to_key+0x19c>
jmp    13fc <string_to_key+0x29c>
mov    -0x8(%rbp),%esi
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%edi
call   1070 <hash_algs@plt>
jmp    140d <string_to_key+0x2ad>
mov    -0x8(%rbp),%esi
lea    0xe0b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdfb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%edi
call   1070 <hash_algs@plt>
lea    0xe07(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x8,%edi
call   1050 <dump@plt>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    140d <string_to_key+0x2ad>
mov    -0x8(%rbp),%esi
lea    0xde3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    140d <string_to_key+0x2ad>
mov    -0x8(%rbp),%esi
lea    0xdee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%edi
call   1070 <hash_algs@plt>
lea    0xd9f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x8,%edi
call   1050 <dump@plt>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1080 <Getc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    $0xf,%eax
add    $0x10,%eax
mov    -0x14(%rbp),%ecx
sar    $0x4,%ecx
add    $0x6,%ecx
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xdaa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    140d <string_to_key+0x2ad>
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    1333 <string_to_key+0x1d3>
mov    $0x0,%al
call   1080 <Getc@plt>
mov    %al,%cl
movslq -0x1c(%rbp),%rax
mov    %cl,-0x18(%rbp,%rax,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    130a <string_to_key+0x1aa>
lea    -0x18(%rbp),%rdi
lea    0xd7a(%rip),%rsi
mov    $0x3,%edx
call   1060 <memcmp@plt>
cmp    $0x0,%eax
jne    13e6 <string_to_key+0x286>
movsbl -0x15(%rbp),%eax
add    $0x3e8,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x2c(%rbp)
sub    $0x3e9,%eax
je     1386 <string_to_key+0x226>
jmp    1373 <string_to_key+0x213>
mov    -0x2c(%rbp),%eax
sub    $0x3ea,%eax
je     139c <string_to_key+0x23c>
jmp    13d0 <string_to_key+0x270>
mov    -0x8(%rbp),%esi
lea    0xd2c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13e1 <string_to_key+0x281>
mov    $0x0,%al
call   1080 <Getc@plt>
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%esi
lea    0xd27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%edi
call   1050 <dump@plt>
lea    0xc5b(%rip),%rdi
call   1030 <puts@plt>
jmp    13e1 <string_to_key+0x281>
mov    -0x8(%rbp),%esi
lea    0xd31(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13f7 <string_to_key+0x297>
mov    -0x8(%rbp),%esi
lea    0xd3e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    140d <string_to_key+0x2ad>
mov    -0x8(%rbp),%esi
lea    0xd55(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_to_key>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1080 <Getc@plt>
mov    %rax,%rbp
xor    %eax,%eax
call   1080 <Getc@plt>
cmp    $0x3,%ebp
ja     11b4 <string_to_key+0x54>
mov    %rax,%rbx
mov    %ebp,%eax
lea    0xe7b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe7b(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
call   1070 <hash_algs@plt>
jmp    1300 <string_to_key+0x1a0>
cmp    $0x65,%ebp
jne    12f0 <string_to_key+0x190>
xor    %eax,%eax
call   1080 <Getc@plt>
mov    %al,0x4(%rsp)
xor    %eax,%eax
call   1080 <Getc@plt>
mov    %al,0x5(%rsp)
xor    %eax,%eax
call   1080 <Getc@plt>
mov    %al,0x6(%rsp)
xor    %eax,%eax
call   1080 <Getc@plt>
mov    %al,0x7(%rsp)
lea    0xed6(%rip),%rsi
lea    0x4(%rsp),%rdi
mov    $0x3,%edx
call   1060 <memcmp@plt>
test   %eax,%eax
je     130e <string_to_key+0x1ae>
lea    0xf2e(%rip),%rdi
xor    %ebp,%ebp
mov    $0x65,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1305 <string_to_key+0x1a5>
lea    0xe08(%rip),%rdi
mov    $0x1,%ebp
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
call   1070 <hash_algs@plt>
lea    0xdff(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x8,%edi
call   1050 <dump@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1305 <string_to_key+0x1a5>
lea    0xde2(%rip),%rdi
mov    $0x2,%esi
jmp    12f9 <string_to_key+0x199>
lea    0xdf5(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
call   1070 <hash_algs@plt>
lea    0xda6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x8,%edi
call   1050 <dump@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1080 <Getc@plt>
mov    %eax,%esi
and    $0xf,%esi
or     $0x10,%esi
mov    %eax,%ecx
shr    $0x4,%ecx
add    $0x6,%cl
shl    %cl,%esi
lea    0xdc3(%rip),%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1300 <string_to_key+0x1a0>
lea    0xe72(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
movsbl 0x7(%rsp),%esi
cmp    $0x2,%esi
je     1330 <string_to_key+0x1d0>
cmp    $0x1,%esi
jne    1356 <string_to_key+0x1f6>
lea    0xda6(%rip),%rdi
xor    %ebp,%ebp
mov    $0x3e9,%esi
jmp    1215 <string_to_key+0xb5>
xor    %ebp,%ebp
xor    %eax,%eax
call   1080 <Getc@plt>
mov    %rax,%rbx
lea    0xda2(%rip),%rdi
mov    $0x3ea,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%edi
jmp    125d <string_to_key+0xfd>
add    $0x3e8,%esi
lea    0xdb6(%rip),%rdi
xor    %ebp,%ebp
jmp    1215 <string_to_key+0xb5>

LLVM IR (-O0):
@.str = [32 x i8] c"\09Simple string-to-key(s2k %d):\0A\00"
@.str.1 = [2 x i8] c"\09\00"
@.str.2 = [32 x i8] c"\09Salted string-to-key(s2k %d):\0A\00"
@.str.3 = [10 x i8] c"\09\09Salt - \00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [33 x i8] c"\09Reserved string-to-key(s2k %d)\0A\00"
@.str.6 = [45 x i8] c"\09Iterated and salted string-to-key(s2k %d):\0A\00"
@.str.7 = [30 x i8] c"\09\09Count - %d(coded count %d)\0A\00"
@.str.8 = [4 x i8] c"GNU\00"
@.str.9 = [27 x i8] c"\09GnuPG gnu-dummy (s2k %d)\0A\00"
@.str.10 = [52 x i8] c"\09GnuPG gnu-divert-to-card (s2k %d)\0A\09Serial Number: \00"
@.str.11 = [1 x i8] zeroinitializer
@.str.12 = [35 x i8] c"\09GnuPG unknown extension (s2k %d)\0A\00"
@.str.13 = [45 x i8] c"\09Private/experimental string-to-key(s2k %d)\0A\00"
@.str.14 = [32 x i8] c"\09Unknown string-to-key(s2k %d)\0A\00"
define i32 @string_to_key() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [4 x i8]
%7 = alloca i32
%8 = alloca i32
store i32 1, i32* %1
%9 = call i8* (...) @Getc()
%10 = ptrtoint i8* %9 to i32
store i32 %10, i32* %2
%11 = call i8* (...) @Getc()
%12 = ptrtoint i8* %11 to i32
store i32 %12, i32* %3
%13 = load i32, i32* %2
switch i32 %13, label %95 [
i32 0, label %14
i32 1, label %20
i32 2, label %29
i32 3, label %32
i32 101, label %53
]
14: ; preds = %0
%15 = load i32, i32* %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%18 = load i32, i32* %3
%19 = call i32 @hash_algs(i32 %18)
br label %98
20: ; preds = %0
%21 = load i32, i32* %2
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %21)
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%24 = load i32, i32* %3
%25 = call i32 @hash_algs(i32 %24)
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%27 = call i32 @dump(i32 8)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %98
29: ; preds = %0
%30 = load i32, i32* %2
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 %30)
br label %98
32: ; preds = %0
%33 = load i32, i32* %2
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0), i32 %33)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%36 = load i32, i32* %3
%37 = call i32 @hash_algs(i32 %36)
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%39 = call i32 @dump(i32 8)
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%41 = call i8* (...) @Getc()
%42 = ptrtoint i8* %41 to i32
store i32 %42, i32* %5
%43 = load i32, i32* %5
%44 = and i32 %43, 15
%45 = add nsw i32 16, %44
%46 = load i32, i32* %5
%47 = ashr i32 %46, 4
%48 = add nsw i32 %47, 6
%49 = shl i32 %45, %48
store i32 %49, i32* %4
%50 = load i32, i32* %4
%51 = load i32, i32* %5
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i32 %50, i32 %51)
br label %98
53: ; preds = %0
store i32 0, i32* %1
store i32 0, i32* %7
br label %54
54: ; preds = %63, %53
%55 = load i32, i32* %7
%56 = icmp slt i32 %55, 4
br i1 %56, label %57, label %66
57: ; preds = %54
%58 = call i8* (...) @Getc()
%59 = ptrtoint i8* %58 to i8
%60 = load i32, i32* %7
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 %61
store i8 %59, i8* %62
br label %63
63: ; preds = %57
%64 = load i32, i32* %7
%65 = add nsw i32 %64, 1
store i32 %65, i32* %7
br label %54
66: ; preds = %54
%67 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%68 = call i32 @memcmp(i8* %67, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%69 = icmp ne i32 %68, 0
br i1 %69, label %91, label %70
70: ; preds = %66
%71 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 3
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = add nsw i32 1000, %73
store i32 %74, i32* %2
%75 = load i32, i32* %2
switch i32 %75, label %87 [
i32 1001, label %76
i32 1002, label %79
]
76: ; preds = %70
%77 = load i32, i32* %2
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0), i32 %77)
br label %90
79: ; preds = %70
%80 = call i8* (...) @Getc()
%81 = ptrtoint i8* %80 to i32
store i32 %81, i32* %8
%82 = load i32, i32* %2
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0), i32 %82)
%84 = load i32, i32* %8
%85 = call i32 @dump(i32 %84)
%86 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.11, i64 0, i64 0))
br label %90
87: ; preds = %70
%88 = load i32, i32* %2
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.12, i64 0, i64 0), i32 %88)
br label %90
90: ; preds = %87, %79, %76
br label %94
91: ; preds = %66
%92 = load i32, i32* %2
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.13, i64 0, i64 0), i32 %92)
br label %94
94: ; preds = %91, %90
br label %98
95: ; preds = %0
%96 = load i32, i32* %2
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.14, i64 0, i64 0), i32 %96)
br label %98
98: ; preds = %95, %94, %32, %29, %20, %14
%99 = load i32, i32* %1
ret i32 %99
}

LLVM IR (-O2):
@.str = [32 x i8] c"\09Simple string-to-key(s2k %d):\0A\00"
@.str.2 = [32 x i8] c"\09Salted string-to-key(s2k %d):\0A\00"
@.str.3 = [10 x i8] c"\09\09Salt - \00"
@.str.5 = [33 x i8] c"\09Reserved string-to-key(s2k %d)\0A\00"
@.str.6 = [45 x i8] c"\09Iterated and salted string-to-key(s2k %d):\0A\00"
@.str.7 = [30 x i8] c"\09\09Count - %d(coded count %d)\0A\00"
@.str.8 = [4 x i8] c"GNU\00"
@.str.9 = [27 x i8] c"\09GnuPG gnu-dummy (s2k %d)\0A\00"
@.str.10 = [52 x i8] c"\09GnuPG gnu-divert-to-card (s2k %d)\0A\09Serial Number: \00"
@.str.12 = [35 x i8] c"\09GnuPG unknown extension (s2k %d)\0A\00"
@.str.13 = [45 x i8] c"\09Private/experimental string-to-key(s2k %d)\0A\00"
@.str.14 = [32 x i8] c"\09Unknown string-to-key(s2k %d)\0A\00"
define i32 @string_to_key() {
%1 = alloca [4 x i8]
%2 = tail call i8* (...) @Getc()
%3 = ptrtoint i8* %2 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i8* (...) @Getc()
%6 = ptrtoint i8* %5 to i64
%7 = trunc i64 %6 to i32
switch i32 %4, label %74 [
i32 0, label %8
i32 1, label %12
i32 2, label %19
i32 3, label %21
i32 101, label %37
]
8: ; preds = %0
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 0)
%10 = tail call i32 @putchar(i32 9)
%11 = tail call i32 @hash_algs(i32 %7)
br label %76
12: ; preds = %0
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 1)
%14 = tail call i32 @putchar(i32 9)
%15 = tail call i32 @hash_algs(i32 %7)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%17 = tail call i32 @dump(i32 8)
%18 = tail call i32 @putchar(i32 10)
br label %76
19: ; preds = %0
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 2)
br label %76
21: ; preds = %0
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0), i32 3)
%23 = tail call i32 @putchar(i32 9)
%24 = tail call i32 @hash_algs(i32 %7)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%26 = tail call i32 @dump(i32 8)
%27 = tail call i32 @putchar(i32 10)
%28 = tail call i8* (...) @Getc()
%29 = ptrtoint i8* %28 to i64
%30 = trunc i64 %29 to i32
%31 = and i32 %30, 15
%32 = or i32 %31, 16
%33 = ashr i32 %30, 4
%34 = add nsw i32 %33, 6
%35 = shl i32 %32, %34
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i32 %35, i32 %30)
br label %76
37: ; preds = %0
%38 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%39 = tail call i8* (...) @Getc()
%40 = ptrtoint i8* %39 to i64
%41 = trunc i64 %40 to i8
store i8 %41, i8* %38
%42 = tail call i8* (...) @Getc()
%43 = ptrtoint i8* %42 to i64
%44 = trunc i64 %43 to i8
%45 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 1
store i8 %44, i8* %45
%46 = tail call i8* (...) @Getc()
%47 = ptrtoint i8* %46 to i64
%48 = trunc i64 %47 to i8
%49 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 2
store i8 %48, i8* %49
%50 = tail call i8* (...) @Getc()
%51 = ptrtoint i8* %50 to i64
%52 = trunc i64 %51 to i8
%53 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 3
store i8 %52, i8* %53
%54 = call i32 @memcmp(i8* %38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%55 = icmp eq i32 %54, 0
br i1 %55, label %56, label %71
56: ; preds = %37
%57 = load i8, i8* %53
%58 = sext i8 %57 to i32
switch i32 %58, label %68 [
i32 1, label %59
i32 2, label %61
]
59: ; preds = %56
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0), i32 1001)
br label %73
61: ; preds = %56
%62 = call i8* (...) @Getc()
%63 = ptrtoint i8* %62 to i64
%64 = trunc i64 %63 to i32
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0), i32 1002)
%66 = call i32 @dump(i32 %64)
%67 = call i32 @putchar(i32 10)
br label %73
68: ; preds = %56
%69 = add nsw i32 %58, 1000
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.12, i64 0, i64 0), i32 %69)
br label %73
71: ; preds = %37
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.13, i64 0, i64 0), i32 101)
br label %73
73: ; preds = %59, %61, %68, %71
br label %76
74: ; preds = %0
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.14, i64 0, i64 0), i32 %4)
br label %76
76: ; preds = %74, %73, %21, %19, %12, %8
%77 = phi i32 [ 1, %74 ], [ 0, %73 ], [ 1, %21 ], [ 1, %19 ], [ 1, %12 ], [ 1, %8 ]
ret i32 %77
}