#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 */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ close_pt6312();
int /*<<< orphan*/ init_pt6312();
int /*<<< orphan*/ memset(scalar_t__ *, int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
int /*<<< orphan*/ updateDisplay(scalar_t__ *, int /*<<< orphan*/, int);
int main(int argc, char *argv[]) {
  uint8_t data[22];
  int grid;
  char val[8] = {0};
  init_pt6312();
  printf("=== DISPLAY TEST ===\n\n");
  if (argc == 2) {
    if (!strcmp(argv[1], "--all-grids")) {
      memset(data, 255, 22);
      updateDisplay(data, 0, 22);
    } else if (!strcmp(argv[1], "--clear")) {
      memset(data, 0, 22);
      updateDisplay(data, 0, 22);
    } else if (!strcmp(argv[1], "--help") || !strcmp(argv[1], "-h")) {
      printf("Usage:\n   --all-grids: show all grids activated\n"
             "   --clear: deactivate all grids\n"
             "   --help: show this text\n\n"
             "   No parameters: test individual grids interactively\n\n");
    }
  } else
    while (1) {
      memset(data, 0, 22);
      printf("Grid? [1-22, 0:end] ");
      scanf("%d", &grid);
      if (grid < 0 || grid > 22)
        continue;
      else if (!grid)
        break;
      grid--;
      printf("Value (16bit) ? ");
      scanf("%6s", &val);
      uint16_t num;
      if (!strncmp(val, "0x", 2))
        sscanf(&val[2], "%X", &num);
      else
        num = atoi(val);
      data[grid * 2 + 1] = (uint8_t)((num & 0xFF00) >> 8);
      data[grid * 2] = (uint8_t)(num & 0xFF);
      updateDisplay(data, 0, 22);
    }
  close_pt6312();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xcc(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1050 <memset@plt>
mov    $0x0,%al
call   1070 <init_pt6312@plt>
lea    0xe26(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x2,-0x8(%rbp)
jne    12d1 <main+0x131>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe1f(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1234 <main+0x94>
lea    -0xc0(%rbp),%rdi
mov    $0xff,%esi
mov    $0x16,%edx
call   1050 <memset@plt>
lea    -0xc0(%rbp),%rdi
xor    %esi,%esi
mov    $0x16,%edx
call   10a0 <updateDisplay@plt>
jmp    12cc <main+0x12c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xde0(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    127c <main+0xdc>
lea    -0xc0(%rbp),%rdi
xor    %esi,%esi
mov    $0x16,%edx
call   1050 <memset@plt>
lea    -0xc0(%rbp),%rdi
xor    %esi,%esi
mov    $0x16,%edx
call   10a0 <updateDisplay@plt>
jmp    12c7 <main+0x127>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xda0(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
je     12b6 <main+0x116>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd8a(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    12c2 <main+0x122>
lea    0xd78(%rip),%rdi
call   1040 <printf@plt>
jmp    12c7 <main+0x127>
jmp    12cc <main+0x12c>
jmp    142b <main+0x28b>
jmp    12d6 <main+0x136>
lea    -0xc0(%rbp),%rdi
xor    %esi,%esi
mov    $0x16,%edx
call   1050 <memset@plt>
lea    0xde9(%rip),%rdi
call   1040 <printf@plt>
lea    0xdf2(%rip),%rdi
lea    -0xc4(%rbp),%rsi
mov    $0x0,%al
call   10b0 <scanf@plt>
cmpl   $0x0,-0xc4(%rbp)
jl     1324 <main+0x184>
cmpl   $0x16,-0xc4(%rbp)
jle    1329 <main+0x189>
jmp    12d6 <main+0x136>
cmpl   $0x0,-0xc4(%rbp)
jne    133b <main+0x19b>
jmp    1426 <main+0x286>
jmp    1340 <main+0x1a0>
mov    -0xc4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc4(%rbp)
lea    0xd9b(%rip),%rdi
call   1040 <printf@plt>
lea    0xda0(%rip),%rdi
lea    -0xcc(%rbp),%rsi
mov    $0x0,%al
call   10b0 <scanf@plt>
lea    -0xcc(%rbp),%rdi
lea    0xd88(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    13b4 <main+0x214>
lea    -0xcc(%rbp),%rdi
add    $0x2,%rdi
lea    0xd66(%rip),%rsi
lea    -0xd0(%rbp),%rdx
call   1090 <sscanf@plt>
jmp    13c6 <main+0x226>
lea    -0xcc(%rbp),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0xd0(%rbp)
mov    -0xd0(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0xc4(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
mov    %rcx,-0xc0(%rbp,%rax,8)
ff
mov    -0xd0(%rbp),%eax
and    $0xff,%eax
movslq %eax,%rcx
mov    -0xc4(%rbp),%eax
shl    $0x1,%eax
cltq
mov    %rcx,-0xc0(%rbp,%rax,8)
ff
lea    -0xc0(%rbp),%rdi
xor    %esi,%esi
mov    $0x16,%edx
call   10a0 <updateDisplay@plt>
jmp    12d6 <main+0x136>
jmp    142b <main+0x28b>
mov    $0x0,%al
call   1080 <close_pt6312@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
movq   $0x0,0x8(%rsp)
xor    %eax,%eax
call   1080 <init_pt6312@plt>
lea    0xe74(%rip),%rdi
call   1040 <puts@plt>
cmp    $0x2,%ebp
jne    1254 <main+0xa4>
mov    0x8(%rbx),%rbx
lea    0xe0e(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     1348 <main+0x198>
lea    0xe03(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     1357 <main+0x1a7>
lea    0xdf4(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     1243 <main+0x93>
lea    0xde8(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
jne    137a <main+0x1ca>
lea    0xe1d(%rip),%rdi
call   1040 <puts@plt>
jmp    137a <main+0x1ca>
lea    0x10(%rsp),%rbx
lea    0xdbe(%rip),%r15
lea    0xdcc(%rip),%r12
mov    %rsp,%r13
lea    0x8(%rsp),%rbp
lea    0xdd5(%rip),%r14
jmp    12ba <main+0x10a>
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
call   10d0 <atoi@plt>
mov    %eax,0x4(%rsp)
movzbl %ah,%ecx
movslq (%rsp),%rdx
lea    (%rdx,%rdx,1),%rsi
shl    $0x4,%rdx
mov    %rcx,0x18(%rsp,%rdx,1)
movzbl %al,%eax
movslq %esi,%rcx
mov    %rax,0x10(%rsp,%rcx,8)
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x16,%edx
call   10b0 <updateDisplay@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x16,%edx
call   1060 <memset@plt>
mov    %r15,%rdi
call   1050 <printf@plt>
mov    %r12,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   10c0 <scanf@plt>
mov    (%rsp),%eax
cmp    $0x16,%eax
ja     12ba <main+0x10a>
test   %eax,%eax
je     137a <main+0x1ca>
add    $0xffffffff,%eax
mov    %eax,(%rsp)
lea    0xd3b(%rip),%rdi
call   1050 <printf@plt>
lea    0xd40(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10c0 <scanf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
jne    1280 <main+0xd0>
lea    0xa(%rsp),%rdi
lea    0xd19(%rip),%rsi
lea    0x4(%rsp),%rdx
call   10a0 <sscanf@plt>
mov    0x4(%rsp),%eax
jmp    128c <main+0xdc>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xff,%esi
jmp    1361 <main+0x1b1>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x16,%edx
call   1060 <memset@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x16,%edx
call   10b0 <updateDisplay@plt>
xor    %eax,%eax
call   1090 <close_pt6312@plt>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"=== DISPLAY TEST ===\0A\0A\00"
@.str.1 = [12 x i8] c"--all-grids\00"
@.str.2 = [8 x i8] c"--clear\00"
@.str.3 = [7 x i8] c"--help\00"
@.str.4 = [3 x i8] c"-h\00"
@.str.5 = [164 x i8] c"Usage:\0A --all-grids: show all grids activated\0A --clear: deactivate all grids\0A --help: show this text\0A\0A No parameters: test individual grids interactively\0A\0A\00"
@.str.6 = [21 x i8] c"Grid? [1-22, 0:end] \00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [17 x i8] c"Value (16bit) ? \00"
@.str.9 = [4 x i8] c"%6s\00"
@.str.10 = [3 x i8] c"0x\00"
@.str.11 = [3 x i8] c"%X\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [22 x i64]
%7 = alloca i32
%8 = alloca [8 x i8]
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = bitcast [8 x i8]* %8 to i8*
%11 = call i32 (...) @init_pt6312()
%12 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* %4
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %54
15: ; preds = %2
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = call i32 @strcmp(i8* %18, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%20 = icmp ne i32 %19, 0
br i1 %20, label %26, label %21
21: ; preds = %15
%22 = getelementptr inbounds [22 x i64], [22 x i64]* %6, i64 0, i64 0
%23 = call i32 @memset(i64* %22, i32 255, i32 22)
%24 = getelementptr inbounds [22 x i64], [22 x i64]* %6, i64 0, i64 0
%25 = call i32 @updateDisplay(i64* %24, i32 0, i32 22)
br label %53
26: ; preds = %15
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = call i32 @strcmp(i8* %29, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%31 = icmp ne i32 %30, 0
br i1 %31, label %37, label %32
32: ; preds = %26
%33 = getelementptr inbounds [22 x i64], [22 x i64]* %6, i64 0, i64 0
%34 = call i32 @memset(i64* %33, i32 0, i32 22)
%35 = getelementptr inbounds [22 x i64], [22 x i64]* %6, i64 0, i64 0
%36 = call i32 @updateDisplay(i64* %35, i32 0, i32 22)
br label %52
37: ; preds = %26
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 1
%40 = load i8*, i8** %39
%41 = call i32 @strcmp(i8* %40, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%42 = icmp ne i32 %41, 0
br i1 %42, label %43, label %49
43: ; preds = %37
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 1
%46 = load i8*, i8** %45
%47 = call i32 @strcmp(i8* %46, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%48 = icmp ne i32 %47, 0
br i1 %48, label %51, label %49
49: ; preds = %43, %37
%50 = call i32 @printf(i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.5, i64 0, i64 0))
br label %51
51: ; preds = %49, %43
br label %52
52: ; preds = %51, %32
br label %53
53: ; preds = %52, %21
br label %105
54: ; preds = %2
br label %55
55: ; preds = %54, %65, %85
%56 = getelementptr inbounds [22 x i64], [22 x i64]* %6, i64 0, i64 0
%57 = call i32 @memset(i64* %56, i32 0, i32 22)
%58 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%59 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %7)
%60 = load i32, i32* %7
%61 = icmp slt i32 %60, 0
br i1 %61, label %65, label %62
62: ; preds = %55
%63 = load i32, i32* %7
%64 = icmp sgt i32 %63, 22
br i1 %64, label %65, label %66
65: ; preds = %62, %55
br label %55
66: ; preds = %62
%67 = load i32, i32* %7
%68 = icmp ne i32 %67, 0
br i1 %68, label %70, label %69
69: ; preds = %66
br label %104
70: ; preds = %66
br label %71
71: ; preds = %70
%72 = load i32, i32* %7
%73 = add nsw i32 %72, -1
store i32 %73, i32* %7
%74 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%75 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), [8 x i8]* %8)
%76 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%77 = call i32 @strncmp(i8* %76, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32 2)
%78 = icmp ne i32 %77, 0
br i1 %78, label %82, label %79
79: ; preds = %71
%80 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 2
%81 = call i32 @sscanf(i8* %80, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %9)
br label %85
82: ; preds = %71
%83 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%84 = call i32 @atoi(i8* %83)
store i32 %84, i32* %9
br label %85
85: ; preds = %82, %79
%86 = load i32, i32* %9
%87 = and i32 %86, 65280
%88 = ashr i32 %87, 8
%89 = sext i32 %88 to i64
%90 = load i32, i32* %7
%91 = mul nsw i32 %90, 2
%92 = add nsw i32 %91, 1
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [22 x i64], [22 x i64]* %6, i64 0, i64 %93
store i64 %89, i64* %94
%95 = load i32, i32* %9
%96 = and i32 %95, 255
%97 = sext i32 %96 to i64
%98 = load i32, i32* %7
%99 = mul nsw i32 %98, 2
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [22 x i64], [22 x i64]* %6, i64 0, i64 %100
store i64 %97, i64* %101
%102 = getelementptr inbounds [22 x i64], [22 x i64]* %6, i64 0, i64 0
%103 = call i32 @updateDisplay(i64* %102, i32 0, i32 22)
br label %55
104: ; preds = %69
br label %105
105: ; preds = %104, %53
%106 = call i32 (...) @close_pt6312()
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [12 x i8] c"--all-grids\00"
@.str.2 = [8 x i8] c"--clear\00"
@.str.3 = [7 x i8] c"--help\00"
@.str.4 = [3 x i8] c"-h\00"
@.str.6 = [21 x i8] c"Grid? [1-22, 0:end] \00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [17 x i8] c"Value (16bit) ? \00"
@.str.9 = [4 x i8] c"%6s\00"
@.str.10 = [3 x i8] c"0x\00"
@.str.11 = [3 x i8] c"%X\00"
@str = [22 x i8] c"=== DISPLAY TEST ===\0A\00"
@str.12 = [163 x i8] c"Usage:\0A --all-grids: show all grids activated\0A --clear: deactivate all grids\0A --help: show this text\0A\0A No parameters: test individual grids interactively\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [22 x i64]
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
%7 = bitcast [22 x i64]* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast i64* %5 to i8*
store i64 0, i64* %5
%10 = tail call i32 (...) @init_pt6312()
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%12 = icmp eq i32 %0, 2
br i1 %12, label %18, label %13
13: ; preds = %2
%14 = bitcast i64* %5 to [8 x i8]*
%15 = getelementptr inbounds [22 x i64], [22 x i64]* %3, i64 0, i64 0
%16 = bitcast i32* %6 to i8*
%17 = getelementptr inbounds [8 x i8], [8 x i8]* %14, i64 0, i64 2
br label %42
18: ; preds = %2
%19 = getelementptr inbounds i8*, i8** %1, i64 1
%20 = load i8*, i8** %19
%21 = tail call i32 @strcmp(i8* dereferenceable(1) %20, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %27
23: ; preds = %18
%24 = getelementptr inbounds [22 x i64], [22 x i64]* %3, i64 0, i64 0
%25 = call i32 @memset(i64* %24, i32 255, i32 22)
%26 = call i32 @updateDisplay(i64* %24, i32 0, i32 22)
br label %77
27: ; preds = %18
%28 = tail call i32 @strcmp(i8* dereferenceable(1) %20, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %34
30: ; preds = %27
%31 = getelementptr inbounds [22 x i64], [22 x i64]* %3, i64 0, i64 0
%32 = call i32 @memset(i64* %31, i32 0, i32 22)
%33 = call i32 @updateDisplay(i64* %31, i32 0, i32 22)
br label %77
34: ; preds = %27
%35 = tail call i32 @strcmp(i8* dereferenceable(1) %20, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%36 = icmp eq i32 %35, 0
br i1 %36, label %40, label %37
37: ; preds = %34
%38 = tail call i32 @strcmp(i8* dereferenceable(1) %20, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%39 = icmp eq i32 %38, 0
br i1 %39, label %40, label %77
40: ; preds = %37, %34
%41 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([163 x i8], [163 x i8]* @str.12, i64 0, i64 0))
br label %77
42: ; preds = %76, %13
%43 = call i32 @memset(i64* %15, i32 0, i32 22)
%44 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%45 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %4)
%46 = load i32, i32* %4
%47 = icmp ugt i32 %46, 22
br i1 %47, label %76, label %48
48: ; preds = %42
%49 = icmp eq i32 %46, 0
br i1 %49, label %77, label %50
50: ; preds = %48
%51 = add nsw i32 %46, -1
store i32 %51, i32* %4
%52 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%53 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i64* %5)
%54 = call i32 @strncmp(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32 2)
%55 = icmp eq i32 %54, 0
br i1 %55, label %56, label %59
56: ; preds = %50
%57 = call i32 @sscanf(i8* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %6)
%58 = load i32, i32* %6
br label %61
59: ; preds = %50
%60 = call i32 @atoi(i8* %9)
store i32 %60, i32* %6
br label %61
61: ; preds = %59, %56
%62 = phi i32 [ %60, %59 ], [ %58, %56 ]
%63 = lshr i32 %62, 8
%64 = and i32 %63, 255
%65 = zext i32 %64 to i64
%66 = load i32, i32* %4
%67 = shl nsw i32 %66, 1
%68 = or i32 %67, 1
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [22 x i64], [22 x i64]* %3, i64 0, i64 %69
store i64 %65, i64* %70
%71 = and i32 %62, 255
%72 = zext i32 %71 to i64
%73 = sext i32 %67 to i64
%74 = getelementptr inbounds [22 x i64], [22 x i64]* %3, i64 0, i64 %73
store i64 %72, i64* %74
%75 = call i32 @updateDisplay(i64* %15, i32 0, i32 22)
br label %76
76: ; preds = %61, %42
br label %42
77: ; preds = %48, %23, %37, %40, %30
%78 = call i32 (...) @close_pt6312()
ret i32 0
}