#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*/ lcd_clear(int);
int /*<<< orphan*/ lcd_msg(char *);
void lcd_disp_inv(int choose) {
  char msg1[] = "1:OK  %";
  char msg2[] = "2:OK%";
  char msg3[] = "3:OK  %";
  char msg4[] = "4:OK%";
  char msg5[] = "5:OK  %";
  char msg6[] = "6:OK%";
  char msg7[] = "1:BAD  %";
  char msg8[] = "2:BAD%";
  char msg9[] = "3:BAD  %";
  char msg10[] = "4:BAD%";
  char msg11[] = "5:BAD  %";
  char msg12[] = "6:BAD%";
  switch (choose) {
  case 1:
    lcd_msg(msg1);
    break;
  case 2:
    lcd_msg(msg2);
    lcd_clear(0xc0);
    break;
  case 3:
    lcd_msg(msg3);
    break;
  case 4:
    lcd_msg(msg4);
    lcd_clear(0x90);
    break;
  case 5:
    lcd_msg(msg5);
    break;
  case 6:
    lcd_msg(msg6);
    break;
  case 7:
    lcd_msg(msg7);
    break;
  case 8:
    lcd_msg(msg8);
    lcd_clear(0xc0);
    break;
  case 9:
    lcd_msg(msg9);
    break;
  case 10:
    lcd_msg(msg10);
    lcd_clear(0x90);
    break;
  case 11:
    lcd_msg(msg11);
    break;
  case 12:
    lcd_msg(msg12);
    break;
  }
}


x86 assembly (clang, -O0):
<lcd_disp_inv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
movabs $0x2520204b4f3a31,%rax
mov    %rax,-0x10(%rbp)
movw   $0x25,-0x14(%rbp)
movl   $0x4b4f3a32,-0x18(%rbp)
movabs $0x2520204b4f3a33,%rax
mov    %rax,-0x20(%rbp)
movw   $0x25,-0x24(%rbp)
movl   $0x4b4f3a34,-0x28(%rbp)
movabs $0x2520204b4f3a35,%rax
mov    %rax,-0x30(%rbp)
movw   $0x25,-0x34(%rbp)
movl   $0x4b4f3a36,-0x38(%rbp)
movabs $0x2520204441423a31,%rax
20 20 25
mov    %rax,-0x48(%rbp)
movb   $0x0,-0x40(%rbp)
movl   $0x254441,-0x4d(%rbp)
movl   $0x41423a32,-0x50(%rbp)
movabs $0x2520204441423a33,%rax
20 20 25
mov    %rax,-0x60(%rbp)
movb   $0x0,-0x58(%rbp)
movl   $0x254441,-0x65(%rbp)
movl   $0x41423a34,-0x68(%rbp)
movabs $0x2520204441423a35,%rax
20 20 25
mov    %rax,-0x78(%rbp)
movb   $0x0,-0x70(%rbp)
movl   $0x254441,-0x7d(%rbp)
movl   $0x41423a36,-0x80(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x88(%rbp)
sub    $0xb,%eax
ja     12d9 <lcd_disp_inv+0x1b9>
mov    -0x88(%rbp),%rax
lea    0xdfb(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0x10(%rbp),%rdi
call   1030 <lcd_msg@plt>
jmp    12d9 <lcd_disp_inv+0x1b9>
lea    -0x18(%rbp),%rdi
call   1030 <lcd_msg@plt>
mov    $0xc0,%edi
call   1040 <lcd_clear@plt>
jmp    12d9 <lcd_disp_inv+0x1b9>
lea    -0x20(%rbp),%rdi
call   1030 <lcd_msg@plt>
jmp    12d9 <lcd_disp_inv+0x1b9>
lea    -0x28(%rbp),%rdi
call   1030 <lcd_msg@plt>
mov    $0x90,%edi
call   1040 <lcd_clear@plt>
jmp    12d9 <lcd_disp_inv+0x1b9>
lea    -0x30(%rbp),%rdi
call   1030 <lcd_msg@plt>
jmp    12d9 <lcd_disp_inv+0x1b9>
lea    -0x38(%rbp),%rdi
call   1030 <lcd_msg@plt>
jmp    12d9 <lcd_disp_inv+0x1b9>
lea    -0x48(%rbp),%rdi
call   1030 <lcd_msg@plt>
jmp    12d9 <lcd_disp_inv+0x1b9>
lea    -0x50(%rbp),%rdi
call   1030 <lcd_msg@plt>
mov    $0xc0,%edi
call   1040 <lcd_clear@plt>
jmp    12d9 <lcd_disp_inv+0x1b9>
lea    -0x60(%rbp),%rdi
call   1030 <lcd_msg@plt>
jmp    12d9 <lcd_disp_inv+0x1b9>
lea    -0x68(%rbp),%rdi
call   1030 <lcd_msg@plt>
mov    $0x90,%edi
call   1040 <lcd_clear@plt>
jmp    12d9 <lcd_disp_inv+0x1b9>
lea    -0x78(%rbp),%rdi
call   1030 <lcd_msg@plt>
jmp    12d9 <lcd_disp_inv+0x1b9>
lea    -0x80(%rbp),%rdi
call   1030 <lcd_msg@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_disp_inv>:
sub    $0x78,%rsp
movabs $0x2520204b4f3a31,%rax
mov    %rax,0x70(%rsp)
movw   $0x25,0x14(%rsp)
movl   $0x4b4f3a32,0x10(%rsp)
4b
lea    0x2(%rax),%rcx
mov    %rcx,0x68(%rsp)
movw   $0x25,0xc(%rsp)
movl   $0x4b4f3a34,0x8(%rsp)
4b
or     $0x4,%rax
mov    %rax,0x60(%rsp)
movw   $0x25,0x4(%rsp)
movl   $0x4b4f3a36,(%rsp)
movabs $0x2520204441423a31,%rax
20 20 25
mov    %rax,0x50(%rsp)
movb   $0x0,0x58(%rsp)
movl   $0x254441,0x2b(%rsp)
movl   $0x41423a32,0x28(%rsp)
41
movabs $0x2520204441423a33,%rax
20 20 25
mov    %rax,0x40(%rsp)
movb   $0x0,0x48(%rsp)
movl   $0x254441,0x23(%rsp)
movl   $0x41423a34,0x20(%rsp)
41
movabs $0x2520204441423a35,%rax
20 20 25
mov    %rax,0x30(%rsp)
movb   $0x0,0x38(%rsp)
movl   $0x254441,0x1b(%rsp)
movl   $0x41423a36,0x18(%rsp)
41
add    $0xffffffff,%edi
cmp    $0xb,%edi
ja     126a <lcd_disp_inv+0x14a>
lea    0xe10(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0x70(%rsp),%rdi
jmp    1265 <lcd_disp_inv+0x145>
lea    0x10(%rsp),%rdi
jmp    122d <lcd_disp_inv+0x10d>
lea    0x68(%rsp),%rdi
jmp    1265 <lcd_disp_inv+0x145>
lea    0x8(%rsp),%rdi
jmp    1245 <lcd_disp_inv+0x125>
lea    0x60(%rsp),%rdi
jmp    1265 <lcd_disp_inv+0x145>
mov    %rsp,%rdi
jmp    1265 <lcd_disp_inv+0x145>
lea    0x50(%rsp),%rdi
jmp    1265 <lcd_disp_inv+0x145>
lea    0x28(%rsp),%rdi
call   1030 <lcd_msg@plt>
mov    $0xc0,%edi
jmp    124f <lcd_disp_inv+0x12f>
lea    0x40(%rsp),%rdi
jmp    1265 <lcd_disp_inv+0x145>
lea    0x20(%rsp),%rdi
call   1030 <lcd_msg@plt>
mov    $0x90,%edi
call   1040 <lcd_clear@plt>
add    $0x78,%rsp
ret
lea    0x30(%rsp),%rdi
jmp    1265 <lcd_disp_inv+0x145>
lea    0x18(%rsp),%rdi
call   1030 <lcd_msg@plt>
add    $0x78,%rsp
ret

LLVM IR (-O0):
@__const.lcd_disp_inv.msg1 = [8 x i8] c"1:OK %\00"
@__const.lcd_disp_inv.msg2 = [6 x i8] c"2:OK%\00"
@__const.lcd_disp_inv.msg3 = [8 x i8] c"3:OK %\00"
@__const.lcd_disp_inv.msg4 = [6 x i8] c"4:OK%\00"
@__const.lcd_disp_inv.msg5 = [8 x i8] c"5:OK %\00"
@__const.lcd_disp_inv.msg6 = [6 x i8] c"6:OK%\00"
@__const.lcd_disp_inv.msg7 = [9 x i8] c"1:BAD %\00"
@__const.lcd_disp_inv.msg8 = [7 x i8] c"2:BAD%\00"
@__const.lcd_disp_inv.msg9 = [9 x i8] c"3:BAD %\00"
@__const.lcd_disp_inv.msg10 = [7 x i8] c"4:BAD%\00"
@__const.lcd_disp_inv.msg11 = [9 x i8] c"5:BAD %\00"
@__const.lcd_disp_inv.msg12 = [7 x i8] c"6:BAD%\00"
define void @lcd_disp_inv(i32 %0) {
%2 = alloca i32
%3 = alloca [8 x i8]
%4 = alloca [6 x i8]
%5 = alloca [8 x i8]
%6 = alloca [6 x i8]
%7 = alloca [8 x i8]
%8 = alloca [6 x i8]
%9 = alloca [9 x i8]
%10 = alloca [7 x i8]
%11 = alloca [9 x i8]
%12 = alloca [7 x i8]
%13 = alloca [9 x i8]
%14 = alloca [7 x i8]
store i32 %0, i32* %2
%15 = bitcast [8 x i8]* %3 to i8*
%16 = bitcast [6 x i8]* %4 to i8*
%17 = bitcast [8 x i8]* %5 to i8*
%18 = bitcast [6 x i8]* %6 to i8*
%19 = bitcast [8 x i8]* %7 to i8*
%20 = bitcast [6 x i8]* %8 to i8*
%21 = bitcast [9 x i8]* %9 to i8*
%22 = bitcast [7 x i8]* %10 to i8*
%23 = bitcast [9 x i8]* %11 to i8*
%24 = bitcast [7 x i8]* %12 to i8*
%25 = bitcast [9 x i8]* %13 to i8*
%26 = bitcast [7 x i8]* %14 to i8*
%27 = load i32, i32* %2
switch i32 %27, label %68 [
i32 1, label %28
i32 2, label %31
i32 3, label %35
i32 4, label %38
i32 5, label %42
i32 6, label %45
i32 7, label %48
i32 8, label %51
i32 9, label %55
i32 10, label %58
i32 11, label %62
i32 12, label %65
]
28: ; preds = %1
%29 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%30 = call i32 @lcd_msg(i8* %29)
br label %68
31: ; preds = %1
%32 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%33 = call i32 @lcd_msg(i8* %32)
%34 = call i32 @lcd_clear(i32 192)
br label %68
35: ; preds = %1
%36 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%37 = call i32 @lcd_msg(i8* %36)
br label %68
38: ; preds = %1
%39 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%40 = call i32 @lcd_msg(i8* %39)
%41 = call i32 @lcd_clear(i32 144)
br label %68
42: ; preds = %1
%43 = getelementptr inbounds [8 x i8], [8 x i8]* %7, i64 0, i64 0
%44 = call i32 @lcd_msg(i8* %43)
br label %68
45: ; preds = %1
%46 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
%47 = call i32 @lcd_msg(i8* %46)
br label %68
48: ; preds = %1
%49 = getelementptr inbounds [9 x i8], [9 x i8]* %9, i64 0, i64 0
%50 = call i32 @lcd_msg(i8* %49)
br label %68
51: ; preds = %1
%52 = getelementptr inbounds [7 x i8], [7 x i8]* %10, i64 0, i64 0
%53 = call i32 @lcd_msg(i8* %52)
%54 = call i32 @lcd_clear(i32 192)
br label %68
55: ; preds = %1
%56 = getelementptr inbounds [9 x i8], [9 x i8]* %11, i64 0, i64 0
%57 = call i32 @lcd_msg(i8* %56)
br label %68
58: ; preds = %1
%59 = getelementptr inbounds [7 x i8], [7 x i8]* %12, i64 0, i64 0
%60 = call i32 @lcd_msg(i8* %59)
%61 = call i32 @lcd_clear(i32 144)
br label %68
62: ; preds = %1
%63 = getelementptr inbounds [9 x i8], [9 x i8]* %13, i64 0, i64 0
%64 = call i32 @lcd_msg(i8* %63)
br label %68
65: ; preds = %1
%66 = getelementptr inbounds [7 x i8], [7 x i8]* %14, i64 0, i64 0
%67 = call i32 @lcd_msg(i8* %66)
br label %68
68: ; preds = %1, %65, %62, %58, %55, %51, %48, %45, %42, %38, %35, %31, %28
ret void
}

LLVM IR (-O2):
@__const.lcd_disp_inv.msg2 = [6 x i8] c"2:OK%\00"
@__const.lcd_disp_inv.msg4 = [6 x i8] c"4:OK%\00"
@__const.lcd_disp_inv.msg6 = [6 x i8] c"6:OK%\00"
@__const.lcd_disp_inv.msg7 = [9 x i8] c"1:BAD %\00"
@__const.lcd_disp_inv.msg8 = [7 x i8] c"2:BAD%\00"
@__const.lcd_disp_inv.msg9 = [9 x i8] c"3:BAD %\00"
@__const.lcd_disp_inv.msg10 = [7 x i8] c"4:BAD%\00"
@__const.lcd_disp_inv.msg11 = [9 x i8] c"5:BAD %\00"
@__const.lcd_disp_inv.msg12 = [7 x i8] c"6:BAD%\00"
define void @lcd_disp_inv(i32 %0) {
%2 = alloca i64
%3 = alloca [6 x i8]
%4 = alloca i64
%5 = alloca [6 x i8]
%6 = alloca i64
%7 = alloca [6 x i8]
%8 = alloca [9 x i8]
%9 = alloca [7 x i8]
%10 = alloca [9 x i8]
%11 = alloca [7 x i8]
%12 = alloca [9 x i8]
%13 = alloca [7 x i8]
%14 = bitcast i64* %2 to i8*
store i64 10449897212820017, i64* %2
%15 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%16 = bitcast i64* %4 to i8*
store i64 10449897212820019, i64* %4
%17 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 0
%18 = bitcast i64* %6 to i8*
store i64 10449897212820021, i64* %6
%19 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%20 = getelementptr inbounds [9 x i8], [9 x i8]* %8, i64 0, i64 0
%21 = getelementptr inbounds [7 x i8], [7 x i8]* %9, i64 0, i64 0
%22 = getelementptr inbounds [9 x i8], [9 x i8]* %10, i64 0, i64 0
%23 = getelementptr inbounds [7 x i8], [7 x i8]* %11, i64 0, i64 0
%24 = getelementptr inbounds [9 x i8], [9 x i8]* %12, i64 0, i64 0
%25 = getelementptr inbounds [7 x i8], [7 x i8]* %13, i64 0, i64 0
switch i32 %0, label %54 [
i32 1, label %26
i32 2, label %28
i32 3, label %31
i32 4, label %33
i32 5, label %36
i32 6, label %38
i32 7, label %40
i32 8, label %42
i32 9, label %45
i32 10, label %47
i32 11, label %50
i32 12, label %52
]
26: ; preds = %1
%27 = call i32 @lcd_msg(i8* %14)
br label %54
28: ; preds = %1
%29 = call i32 @lcd_msg(i8* %15)
%30 = call i32 @lcd_clear(i32 192)
br label %54
31: ; preds = %1
%32 = call i32 @lcd_msg(i8* %16)
br label %54
33: ; preds = %1
%34 = call i32 @lcd_msg(i8* %17)
%35 = call i32 @lcd_clear(i32 144)
br label %54
36: ; preds = %1
%37 = call i32 @lcd_msg(i8* %18)
br label %54
38: ; preds = %1
%39 = call i32 @lcd_msg(i8* %19)
br label %54
40: ; preds = %1
%41 = call i32 @lcd_msg(i8* %20)
br label %54
42: ; preds = %1
%43 = call i32 @lcd_msg(i8* %21)
%44 = call i32 @lcd_clear(i32 192)
br label %54
45: ; preds = %1
%46 = call i32 @lcd_msg(i8* %22)
br label %54
47: ; preds = %1
%48 = call i32 @lcd_msg(i8* %23)
%49 = call i32 @lcd_clear(i32 144)
br label %54
50: ; preds = %1
%51 = call i32 @lcd_msg(i8* %24)
br label %54
52: ; preds = %1
%53 = call i32 @lcd_msg(i8* %25)
br label %54
54: ; preds = %1, %52, %50, %47, %45, %42, %40, %38, %36, %33, %31, %28, %26
ret void
}