#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*/ BNCIO(int);
int /*<<< orphan*/ BNCIO2(int, int);
int /*<<< orphan*/ BNC_0();
int /*<<< orphan*/ BNC_1();
int /*<<< orphan*/ BNC_2();
int /*<<< orphan*/ BNC_3();
int /*<<< orphan*/ BNC_4();
int /*<<< orphan*/ BNC_5();
int /*<<< orphan*/ BNC_6();
int /*<<< orphan*/ BNC_7();
int /*<<< orphan*/ BNC_8();
int /*<<< orphan*/ BNC_9();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int BNCField() {
  int ii, jj = 46, stat = 99;
  char com1, data;
  printf("Field number (0-9), 0=turns curser off ?\n");
  scanf("%i", &ii);
  BNCIO(jj);
  BNCIO2(jj, ii);
  switch (ii) {
  case 0:
    BNC_0();
    break;
  case 1:
    BNC_1();
    break;
  case 2:
    BNC_2();
    break;
  case 3:
    BNC_3();
    break;
  case 4:
    BNC_4();
    break;
  case 5:
    BNC_5();
    break;
  case 6:
    BNC_6();
    break;
  case 7:
    BNC_7();
    break;
  case 8:
    BNC_8();
    break;
  case 9:
    BNC_9();
    break;
  default:
    BNC_0();
    break;
  }
  return (stat);
}


x86 assembly (clang, -O0):
<BNCField>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x2e,-0x8(%rbp)
movl   $0x63,-0xc(%rbp)
lea    0xe2b(%rip),%rdi
call   1030 <printf@plt>
lea    0xe49(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   10a0 <scanf@plt>
mov    -0x8(%rbp),%edi
call   10b0 <BNCIO@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1040 <BNCIO2@plt>
mov    -0x4(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x9,%rax
ja     12c2 <BNCField+0xe2>
mov    -0x18(%rbp),%rax
lea    0xdbf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1050 <BNC_0@plt>
jmp    12c9 <BNCField+0xe9>
mov    $0x0,%al
call   10c0 <BNC_1@plt>
jmp    12c9 <BNCField+0xe9>
mov    $0x0,%al
call   1060 <BNC_2@plt>
jmp    12c9 <BNCField+0xe9>
mov    $0x0,%al
call   10d0 <BNC_3@plt>
jmp    12c9 <BNCField+0xe9>
mov    $0x0,%al
call   1070 <BNC_4@plt>
jmp    12c9 <BNCField+0xe9>
mov    $0x0,%al
call   10f0 <BNC_5@plt>
jmp    12c9 <BNCField+0xe9>
mov    $0x0,%al
call   1090 <BNC_6@plt>
jmp    12c9 <BNCField+0xe9>
mov    $0x0,%al
call   1100 <BNC_7@plt>
jmp    12c9 <BNCField+0xe9>
mov    $0x0,%al
call   1080 <BNC_8@plt>
jmp    12c9 <BNCField+0xe9>
mov    $0x0,%al
call   10e0 <BNC_9@plt>
jmp    12c9 <BNCField+0xe9>
mov    $0x0,%al
call   1050 <BNC_0@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BNCField>:
push   %rax
lea    0xe43(%rip),%rdi
call   1030 <puts@plt>
lea    0xe34(%rip),%rdi
lea    0x4(%rsp),%rsi
call   10a0 <scanf@plt>
mov    $0x2e,%edi
call   10b0 <BNCIO@plt>
mov    0x4(%rsp),%esi
mov    $0x2e,%edi
call   1040 <BNCIO2@plt>
mov    0x4(%rsp),%eax
cmp    $0x9,%rax
ja     1230 <BNCField+0x50>
lea    0xdd9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %eax,%eax
call   1050 <BNC_0@plt>
jmp    1288 <BNCField+0xa8>
xor    %eax,%eax
call   10c0 <BNC_1@plt>
jmp    1288 <BNCField+0xa8>
xor    %eax,%eax
call   1060 <BNC_2@plt>
jmp    1288 <BNCField+0xa8>
xor    %eax,%eax
call   10d0 <BNC_3@plt>
jmp    1288 <BNCField+0xa8>
xor    %eax,%eax
call   1070 <BNC_4@plt>
jmp    1288 <BNCField+0xa8>
xor    %eax,%eax
call   10f0 <BNC_5@plt>
jmp    1288 <BNCField+0xa8>
xor    %eax,%eax
call   1090 <BNC_6@plt>
jmp    1288 <BNCField+0xa8>
xor    %eax,%eax
call   1100 <BNC_7@plt>
jmp    1288 <BNCField+0xa8>
xor    %eax,%eax
call   10e0 <BNC_9@plt>
jmp    1288 <BNCField+0xa8>
xor    %eax,%eax
call   1080 <BNC_8@plt>
mov    $0x63,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Field number (0-9), 0=turns curser off ?\0A\00"
@.str.1 = [3 x i8] c"%i\00"
define i32 @BNCField() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
store i32 46, i32* %2
store i32 99, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %2
%9 = call i32 @BNCIO(i32 %8)
%10 = load i32, i32* %2
%11 = load i32, i32* %1
%12 = call i32 @BNCIO2(i32 %10, i32 %11)
%13 = load i32, i32* %1
switch i32 %13, label %34 [
i32 0, label %14
i32 1, label %16
i32 2, label %18
i32 3, label %20
i32 4, label %22
i32 5, label %24
i32 6, label %26
i32 7, label %28
i32 8, label %30
i32 9, label %32
]
14: ; preds = %0
%15 = call i32 (...) @BNC_0()
br label %36
16: ; preds = %0
%17 = call i32 (...) @BNC_1()
br label %36
18: ; preds = %0
%19 = call i32 (...) @BNC_2()
br label %36
20: ; preds = %0
%21 = call i32 (...) @BNC_3()
br label %36
22: ; preds = %0
%23 = call i32 (...) @BNC_4()
br label %36
24: ; preds = %0
%25 = call i32 (...) @BNC_5()
br label %36
26: ; preds = %0
%27 = call i32 (...) @BNC_6()
br label %36
28: ; preds = %0
%29 = call i32 (...) @BNC_7()
br label %36
30: ; preds = %0
%31 = call i32 (...) @BNC_8()
br label %36
32: ; preds = %0
%33 = call i32 (...) @BNC_9()
br label %36
34: ; preds = %0
%35 = call i32 (...) @BNC_0()
br label %36
36: ; preds = %34, %32, %30, %28, %26, %24, %22, %20, %18, %16, %14
%37 = load i32, i32* %3
ret i32 %37
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%i\00"
@str = [41 x i8] c"Field number (0-9), 0=turns curser off ?\00"
define i32 @BNCField() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = call i32 @BNCIO(i32 46)
%6 = load i32, i32* %1
%7 = call i32 @BNCIO2(i32 46, i32 %6)
%8 = load i32, i32* %1
switch i32 %8, label %29 [
i32 0, label %9
i32 1, label %11
i32 2, label %13
i32 3, label %15
i32 4, label %17
i32 5, label %19
i32 6, label %21
i32 7, label %23
i32 8, label %25
i32 9, label %27
]
9: ; preds = %0
%10 = call i32 (...) @BNC_0()
br label %31
11: ; preds = %0
%12 = call i32 (...) @BNC_1()
br label %31
13: ; preds = %0
%14 = call i32 (...) @BNC_2()
br label %31
15: ; preds = %0
%16 = call i32 (...) @BNC_3()
br label %31
17: ; preds = %0
%18 = call i32 (...) @BNC_4()
br label %31
19: ; preds = %0
%20 = call i32 (...) @BNC_5()
br label %31
21: ; preds = %0
%22 = call i32 (...) @BNC_6()
br label %31
23: ; preds = %0
%24 = call i32 (...) @BNC_7()
br label %31
25: ; preds = %0
%26 = call i32 (...) @BNC_8()
br label %31
27: ; preds = %0
%28 = call i32 (...) @BNC_9()
br label %31
29: ; preds = %0
%30 = call i32 (...) @BNC_0()
br label %31
31: ; preds = %29, %27, %25, %23, %21, %19, %17, %15, %13, %11, %9
ret i32 99
}