#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 int /*<<< orphan*/ MYSQL;

/* Variables and functions */
int /*<<< orphan*/ getpass(char const *);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ *mysql_init(int /*<<< orphan*/ *);
int /*<<< orphan*/ mysql_query(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ *mysql_real_connect(int /*<<< orphan*/ *, char *, char *,
                                       char *, char *, int /*<<< orphan*/,
                                       int /*<<< orphan*/ *,
                                       int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
int main() {
  char qbuf_0[200];
  MYSQL *connect;
  connect = mysql_init(NULL);
  connect = mysql_real_connect(connect, "localhost", "rasbas", "RASBAS!@#$1234",
                               "rasbas", 0, NULL, 0);
  mysql_query(connect, "DROP TABLE admin");
  mysql_query(connect, "CREATE TABLE admin(username text, password text)");
  system("clear");
  printf("\n\n\n     ============================================");
  printf("\n     [                                          ]");
  printf("\n     [          RAS-BAS 1.0 °ü¸®ÀÚ µî·Ï         ]");
  printf("\n     [                                          ]");
  printf("\n     [  º» ÇÁ·Î±×·¥Àº º¸¾ÈÀ» À§ÇØ ROOT °èÁ¤¿¡¼­ ]");
  printf("\n     [  ÀÛµ¿µÇ´Â °ÍÀ» ÃßÀüµå¸®´Â ¹ÙÀÔ´Ï´Ù.      ]");
  printf("\n     [                                          ]");
  printf("\n     [  ¾Æ!! ºñ¹Ð¹øÈ£´Â º¸ÀÌÁö ¾Ê¾Æµµ ÀÔ·ÂµÇ´Ï  ]");
  printf("\n     [  ³î¶óÁö ¸¶½Ã±æ.. ^^?                     ]");
  printf("\n     [                                          ]");
  printf("\n     ============================================");
  printf("\n\n     °è¼ÓÇÏ½Ã·Á¸é ENTERÀ» ´­·¯ÁÖ¼¼¿ä.");
  char stay[2];
  gets(stay);
  char ID[20];
  char PW1[20];
  char PW2[20];
  system("clear");
  printf("\n\n     °ü¸®ÀÚ ID : ");
  scanf("%s", ID);
  printf("\n\n     ÆÐ½º¿öµå´Â º¸ÀÌÁö ¾Ê½À´Ï´Ù. \n");
  const char *prompt = "\n     °ü¸®ÀÚ PW : ";
  strcpy(PW1, getpass(prompt));
  const char *prompt2 = "\n     ´Ù½Ã ÀÔ·ÂÇØÁÖ¼¼¿ä : ";
  strcpy(PW2, getpass(prompt2));
  if (!strcmp(PW1, PW2) == 0) {
    while (!strcmp(PW1, PW2) == 0) {
      system("clear");
      printf("\n\n     ºñ¹Ð¹øÈ£°¡ ¸ÂÁö ¾Ê½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØÁÖ¼¼¿ä. ¤¾¤¾¤¾");
      printf("\n\n     °ü¸®ÀÚ ID : ");
      scanf("%s", ID);
      printf("\n\n     ÆÐ½º¿öµå´Â º¸ÀÌÁö ¾Ê½À´Ï´Ù. \n");
      const char *prompt3 = "\n     °ü¸®ÀÚ PW : ";
      strcpy(PW1, getpass(prompt3));
      const char *prompt4 = "\n     ´Ù½Ã ÀÔ·ÂÇØÁÖ¼¼¿ä : ";
      strcpy(PW2, getpass(prompt4));
    }
  }
  sprintf(qbuf_0,
          "INSERT INTO admin (username, password) VALUES ('%s', SHA('%s'))", ID,
          PW1);
  mysql_query(connect, qbuf_0);
  system("clear");
  printf("\n\n\n     ============================================");
  printf("\n     [                                          ]");
  printf("\n     [     °ü¸®ÀÚ °èÁ¤ µî·ÏÀ» ¿Ï·áÇÏ¿´½À´Ï´Ù.   ]");
  printf("\n     [                                          ]");
  printf("\n     [               °ü¸®ÀÚ µî·Ï ID : %s    ]", ID);
  printf("\n     [                                          ]");
  printf("\n     ============================================ \n\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10b0 <mysql_init@plt>
mov    %rax,-0xd8(%rbp)
mov    -0xd8(%rbp),%rdi
lea    0xe20(%rip),%rsi
lea    0xe23(%rip),%r8
lea    0xe23(%rip),%rcx
xor    %r9d,%r9d
xor    %eax,%eax
mov    %r8,%rdx
movq   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1090 <mysql_real_connect@plt>
mov    %rax,-0xd8(%rbp)
mov    -0xd8(%rbp),%rdi
lea    0xe00(%rip),%rsi
call   1040 <mysql_query@plt>
mov    -0xd8(%rbp),%rdi
lea    0xdfe(%rip),%rsi
call   1040 <mysql_query@plt>
lea    0xe23(%rip),%rdi
call   1050 <system@plt>
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf02(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf47(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xdd4(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd93(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf5c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0xda(%rbp),%rdi
call   1080 <gets@plt>
lea    0xd63(%rip),%rdi
call   1050 <system@plt>
lea    0xf76(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0xf0(%rbp),%rsi
lea    0xf7b(%rip),%rdi
call   10a0 <scanf@plt>
lea    0xf72(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xfa1(%rip),%rax
mov    %rax,-0x138(%rbp)
lea    -0x110(%rbp),%rax
mov    %rax,-0x160(%rbp)
mov    -0x138(%rbp),%rdi
call   10c0 <getpass@plt>
mov    -0x160(%rbp),%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
lea    0xf84(%rip),%rax
mov    %rax,-0x140(%rbp)
lea    -0x130(%rbp),%rax
mov    %rax,-0x158(%rbp)
mov    -0x140(%rbp),%rdi
call   10c0 <getpass@plt>
mov    -0x158(%rbp),%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
lea    -0x110(%rbp),%rdi
lea    -0x130(%rbp),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
jne    14b5 <main+0x305>
jmp    13cd <main+0x21d>
lea    -0x110(%rbp),%rdi
lea    -0x130(%rbp),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
jne    14b0 <main+0x300>
lea    0xc65(%rip),%rdi
call   1050 <system@plt>
lea    0xf16(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0xf0(%rbp),%rsi
lea    0xe6f(%rip),%rdi
call   10a0 <scanf@plt>
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe95(%rip),%rax
mov    %rax,-0x148(%rbp)
lea    -0x110(%rbp),%rax
mov    %rax,-0x170(%rbp)
mov    -0x148(%rbp),%rdi
call   10c0 <getpass@plt>
mov    -0x170(%rbp),%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
lea    0xe78(%rip),%rax
mov    %rax,-0x150(%rbp)
lea    -0x130(%rbp),%rax
mov    %rax,-0x168(%rbp)
mov    -0x150(%rbp),%rdi
call   10c0 <getpass@plt>
mov    -0x168(%rbp),%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
jmp    13cd <main+0x21d>
jmp    14b5 <main+0x305>
lea    -0xd0(%rbp),%rdi
lea    -0xf0(%rbp),%rdx
lea    -0x110(%rbp),%rcx
lea    0xeb5(%rip),%rsi
call   10d0 <sprintf@plt>
mov    -0xd8(%rbp),%rdi
lea    -0xd0(%rbp),%rsi
call   1040 <mysql_query@plt>
lea    0xb72(%rip),%rdi
call   1050 <system@plt>
lea    0xb6c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xb93(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xb77(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0xf0(%rbp),%rsi
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xb54(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x138,%rsp
xor    %edi,%edi
call   10c0 <mysql_init@plt>
lea    0xe21(%rip),%rsi
lea    0xe2b(%rip),%rcx
lea    0xe1d(%rip),%rdx
mov    %rax,%rdi
mov    %rdx,%r8
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   10a0 <mysql_real_connect@plt>
add    $0x10,%rsp
mov    %rax,%rbx
lea    0xe13(%rip),%rsi
mov    %rax,%rdi
call   1050 <mysql_query@plt>
lea    0xe15(%rip),%rsi
mov    %rbx,0x8(%rsp)
mov    %rbx,%rdi
call   1050 <mysql_query@plt>
lea    0xe32(%rip),%r14
mov    %r14,%rdi
call   1060 <system@plt>
lea    0xe29(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xe50(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xe72(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xe97(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xeda(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xf13(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xf58(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xda8(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xf71(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0x6(%rsp),%rdi
call   1090 <gets@plt>
mov    %r14,%rdi
call   1060 <system@plt>
lea    0xf91(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xf9d(%rip),%rdi
lea    0x30(%rsp),%rsi
call   10b0 <scanf@plt>
lea    0x113a(%rip),%rdi
call   1040 <puts@plt>
lea    0xf83(%rip),%rdi
call   10d0 <getpass@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
lea    0xf81(%rip),%rdi
call   10d0 <getpass@plt>
lea    0x50(%rsp),%rbp
mov    %rbp,%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
je     1402 <main+0x242>
lea    0x30(%rsp),%rbp
lea    0x10e0(%rip),%r15
lea    0xf2e(%rip),%r14
lea    0x10(%rsp),%r12
lea    0xf3b(%rip),%r13
lea    0x50(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0xccb(%rip),%rdi
call   1060 <system@plt>
lea    0xf3f(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xedc(%rip),%rdi
mov    %rbp,%rsi
call   10b0 <scanf@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   10d0 <getpass@plt>
mov    %r12,%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
mov    %r13,%rdi
call   10d0 <getpass@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
jne    1390 <main+0x1d0>
lea    0xf40(%rip),%rsi
lea    0x70(%rsp),%rbp
lea    0x30(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %rbp,%rdi
mov    %rbx,%rdx
call   10e0 <sprintf@plt>
mov    0x8(%rsp),%rdi
mov    %rbp,%rsi
call   1050 <mysql_query@plt>
lea    0xc2b(%rip),%rdi
call   1060 <system@plt>
lea    0xc25(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xc4c(%rip),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xf27(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xf60(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xf7e(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x138,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"localhost\00"
@.str.1 = [7 x i8] c"rasbas\00"
@.str.2 = [15 x i8] c"RASBAS!@#$1234\00"
@.str.3 = [17 x i8] c"DROP TABLE admin\00"
@.str.4 = [49 x i8] c"CREATE TABLE admin(username text, password text)\00"
@.str.5 = [6 x i8] c"clear\00"
@.str.6 = [53 x i8] c"\0A\0A\0A ============================================\00"
@.str.7 = [51 x i8] c"\0A [ ]\00"
@.str.8 = [61 x i8] c"\0A [ RAS-BAS 1.0 \C2\B0\C3\BC\C2\B8\C2\AE\C3\80\C3\9A \C2\B5\C3\AE\C2\B7\C3\8F ]\00"
@.str.9 = [81 x i8] c"\0A [ \C2\BA\C2\BB \C3\87\C3\81\C2\B7\C3\8E\C2\B1\C3\97\C2\B7\C2\A5\C3\80\C2\BA \C2\BA\C2\B8\C2\BE\C3\88\C3\80\C2\BB \C3\80\C2\A7\C3\87\C3\98 ROOT \C2\B0\C3\A8\C3\81\C2\A4\C2\BF\C2\A1\C2\BC\C2\AD ]\00"
@.str.10 = [81 x i8] c"\0A [ \C3\80\C3\9B\C2\B5\C2\BF\C2\B5\C3\87\C2\B4\C3\82 \C2\B0\C3\8D\C3\80\C2\BB \C3\83\C3\9F\C3\80\C3\BC\C2\B5\C3\A5\C2\B8\C2\AE\C2\B4\C3\82 \C2\B9\C3\99\C3\80\C3\94\C2\B4\C3\8F\C2\B4\C3\99. ]\00"
@.str.11 = [83 x i8] c"\0A [ \C2\BE\C3\86!! \C2\BA\C3\B1\C2\B9\C3\90\C2\B9\C3\B8\C3\88\C2\A3\C2\B4\C3\82 \C2\BA\C2\B8\C3\80\C3\8C\C3\81\C3\B6 \C2\BE\C3\8A\C2\BE\C3\86\C2\B5\C2\B5 \C3\80\C3\94\C2\B7\C3\82\C2\B5\C3\87\C2\B4\C3\8F ]\00"
@.str.12 = [63 x i8] c"\0A [ \C2\B3\C3\AE\C2\B6\C3\B3\C3\81\C3\B6 \C2\B8\C2\B6\C2\BD\C3\83\C2\B1\C3\A6.. ^^? ]\00"
@.str.13 = [51 x i8] c"\0A ============================================\00"
@.str.14 = [64 x i8] c"\0A\0A \C2\B0\C3\A8\C2\BC\C3\93\C3\87\C3\8F\C2\BD\C3\83\C2\B7\C3\81\C2\B8\C3\A9 ENTER\C3\80\C2\BB \C2\B4\C2\AD\C2\B7\C2\AF\C3\81\C3\96\C2\BC\C2\BC\C2\BF\C3\A4.\00"
@.str.15 = [26 x i8] c"\0A\0A \C2\B0\C3\BC\C2\B8\C2\AE\C3\80\C3\9A ID : \00"
@.str.16 = [3 x i8] c"%s\00"
@.str.17 = [61 x i8] c"\0A\0A \C3\86\C3\90\C2\BD\C2\BA\C2\BF\C3\B6\C2\B5\C3\A5\C2\B4\C3\82 \C2\BA\C2\B8\C3\80\C3\8C\C3\81\C3\B6 \C2\BE\C3\8A\C2\BD\C3\80\C2\B4\C3\8F\C2\B4\C3\99. \0A\00"
@.str.18 = [25 x i8] c"\0A \C2\B0\C3\BC\C2\B8\C2\AE\C3\80\C3\9A PW : \00"
@.str.19 = [43 x i8] c"\0A \C2\B4\C3\99\C2\BD\C3\83 \C3\80\C3\94\C2\B7\C3\82\C3\87\C3\98\C3\81\C3\96\C2\BC\C2\BC\C2\BF\C3\A4 : \00"
@.str.20 = [103 x i8] c"\0A\0A \C2\BA\C3\B1\C2\B9\C3\90\C2\B9\C3\B8\C3\88\C2\A3\C2\B0\C2\A1 \C2\B8\C3\82\C3\81\C3\B6 \C2\BE\C3\8A\C2\BD\C3\80\C2\B4\C3\8F\C2\B4\C3\99. \C2\B4\C3\99\C2\BD\C3\83 \C3\80\C3\94\C2\B7\C3\82\C3\87\C3\98\C3\81\C3\96\C2\BC\C2\BC\C2\BF\C3\A4. \C2\A4\C2\BE\C2\A4\C2\BE\C2\A4\C2\BE\00"
@.str.21 = [64 x i8] c"INSERT INTO admin (username, password) VALUES ('%s', SHA('%s'))\00"
@.str.22 = [81 x i8] c"\0A [ \C2\B0\C3\BC\C2\B8\C2\AE\C3\80\C3\9A \C2\B0\C3\A8\C3\81\C2\A4 \C2\B5\C3\AE\C2\B7\C3\8F\C3\80\C2\BB \C2\BF\C3\8F\C2\B7\C3\A1\C3\87\C3\8F\C2\BF\C2\B4\C2\BD\C3\80\C2\B4\C3\8F\C2\B4\C3\99. ]\00"
@.str.23 = [57 x i8] c"\0A [ \C2\B0\C3\BC\C2\B8\C2\AE\C3\80\C3\9A \C2\B5\C3\AE\C2\B7\C3\8F ID : %s ]\00"
@.str.24 = [55 x i8] c"\0A ============================================ \0A\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
%3 = alloca i32*
%4 = alloca [2 x i8]
%5 = alloca [20 x i8]
%6 = alloca [20 x i8]
%7 = alloca [20 x i8]
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
store i32 0, i32* %1
%12 = call i32* @mysql_init(i32* null)
store i32* %12, i32** %3
%13 = load i32*, i32** %3
%14 = call i32* @mysql_real_connect(i32* %13, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 0, i32* null, i32 0)
store i32* %14, i32** %3
%15 = load i32*, i32** %3
%16 = call i32 @mysql_query(i32* %15, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%17 = load i32*, i32** %3
%18 = call i32 @mysql_query(i32* %17, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
%19 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.8, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.9, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.10, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.11, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.12, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.13, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.14, i64 0, i64 0))
%32 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
%33 = call i32 @gets(i8* %32)
%34 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0))
%36 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%37 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8* %36)
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.17, i64 0, i64 0))
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.18, i64 0, i64 0), i8** %8
%39 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%40 = load i8*, i8** %8
%41 = call i32 @getpass(i8* %40)
%42 = call i32 @strcpy(i8* %39, i32 %41)
store i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.19, i64 0, i64 0), i8** %9
%43 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%44 = load i8*, i8** %9
%45 = call i32 @getpass(i8* %44)
%46 = call i32 @strcpy(i8* %43, i32 %45)
%47 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%48 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%49 = call i32 @strcmp(i8* %47, i8* %48)
%50 = icmp ne i32 %49, 0
%51 = xor i1 %50, true
%52 = zext i1 %51 to i32
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %79
54: ; preds = %0
br label %55
55: ; preds = %63, %54
%56 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%57 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%58 = call i32 @strcmp(i8* %56, i8* %57)
%59 = icmp ne i32 %58, 0
%60 = xor i1 %59, true
%61 = zext i1 %60 to i32
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %78
63: ; preds = %55
%64 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.20, i64 0, i64 0))
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0))
%67 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%68 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8* %67)
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.17, i64 0, i64 0))
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.18, i64 0, i64 0), i8** %10
%70 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%71 = load i8*, i8** %10
%72 = call i32 @getpass(i8* %71)
%73 = call i32 @strcpy(i8* %70, i32 %72)
store i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.19, i64 0, i64 0), i8** %11
%74 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%75 = load i8*, i8** %11
%76 = call i32 @getpass(i8* %75)
%77 = call i32 @strcpy(i8* %74, i32 %76)
br label %55
78: ; preds = %55
br label %79
79: ; preds = %78, %0
%80 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%81 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%82 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%83 = call i32 @sprintf(i8* %80, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.21, i64 0, i64 0), i8* %81, i8* %82)
%84 = load i32*, i32** %3
%85 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%86 = call i32 @mysql_query(i32* %84, i8* %85)
%87 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0))
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.22, i64 0, i64 0))
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
%92 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.23, i64 0, i64 0), i8* %92)
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.24, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"localhost\00"
@.str.1 = [7 x i8] c"rasbas\00"
@.str.2 = [15 x i8] c"RASBAS!@#$1234\00"
@.str.3 = [17 x i8] c"DROP TABLE admin\00"
@.str.4 = [49 x i8] c"CREATE TABLE admin(username text, password text)\00"
@.str.5 = [6 x i8] c"clear\00"
@.str.6 = [53 x i8] c"\0A\0A\0A ============================================\00"
@.str.7 = [51 x i8] c"\0A [ ]\00"
@.str.8 = [61 x i8] c"\0A [ RAS-BAS 1.0 \C2\B0\C3\BC\C2\B8\C2\AE\C3\80\C3\9A \C2\B5\C3\AE\C2\B7\C3\8F ]\00"
@.str.9 = [81 x i8] c"\0A [ \C2\BA\C2\BB \C3\87\C3\81\C2\B7\C3\8E\C2\B1\C3\97\C2\B7\C2\A5\C3\80\C2\BA \C2\BA\C2\B8\C2\BE\C3\88\C3\80\C2\BB \C3\80\C2\A7\C3\87\C3\98 ROOT \C2\B0\C3\A8\C3\81\C2\A4\C2\BF\C2\A1\C2\BC\C2\AD ]\00"
@.str.10 = [81 x i8] c"\0A [ \C3\80\C3\9B\C2\B5\C2\BF\C2\B5\C3\87\C2\B4\C3\82 \C2\B0\C3\8D\C3\80\C2\BB \C3\83\C3\9F\C3\80\C3\BC\C2\B5\C3\A5\C2\B8\C2\AE\C2\B4\C3\82 \C2\B9\C3\99\C3\80\C3\94\C2\B4\C3\8F\C2\B4\C3\99. ]\00"
@.str.11 = [83 x i8] c"\0A [ \C2\BE\C3\86!! \C2\BA\C3\B1\C2\B9\C3\90\C2\B9\C3\B8\C3\88\C2\A3\C2\B4\C3\82 \C2\BA\C2\B8\C3\80\C3\8C\C3\81\C3\B6 \C2\BE\C3\8A\C2\BE\C3\86\C2\B5\C2\B5 \C3\80\C3\94\C2\B7\C3\82\C2\B5\C3\87\C2\B4\C3\8F ]\00"
@.str.12 = [63 x i8] c"\0A [ \C2\B3\C3\AE\C2\B6\C3\B3\C3\81\C3\B6 \C2\B8\C2\B6\C2\BD\C3\83\C2\B1\C3\A6.. ^^? ]\00"
@.str.13 = [51 x i8] c"\0A ============================================\00"
@.str.14 = [64 x i8] c"\0A\0A \C2\B0\C3\A8\C2\BC\C3\93\C3\87\C3\8F\C2\BD\C3\83\C2\B7\C3\81\C2\B8\C3\A9 ENTER\C3\80\C2\BB \C2\B4\C2\AD\C2\B7\C2\AF\C3\81\C3\96\C2\BC\C2\BC\C2\BF\C3\A4.\00"
@.str.15 = [26 x i8] c"\0A\0A \C2\B0\C3\BC\C2\B8\C2\AE\C3\80\C3\9A ID : \00"
@.str.16 = [3 x i8] c"%s\00"
@.str.18 = [25 x i8] c"\0A \C2\B0\C3\BC\C2\B8\C2\AE\C3\80\C3\9A PW : \00"
@.str.19 = [43 x i8] c"\0A \C2\B4\C3\99\C2\BD\C3\83 \C3\80\C3\94\C2\B7\C3\82\C3\87\C3\98\C3\81\C3\96\C2\BC\C2\BC\C2\BF\C3\A4 : \00"
@.str.20 = [103 x i8] c"\0A\0A \C2\BA\C3\B1\C2\B9\C3\90\C2\B9\C3\B8\C3\88\C2\A3\C2\B0\C2\A1 \C2\B8\C3\82\C3\81\C3\B6 \C2\BE\C3\8A\C2\BD\C3\80\C2\B4\C3\8F\C2\B4\C3\99. \C2\B4\C3\99\C2\BD\C3\83 \C3\80\C3\94\C2\B7\C3\82\C3\87\C3\98\C3\81\C3\96\C2\BC\C2\BC\C2\BF\C3\A4. \C2\A4\C2\BE\C2\A4\C2\BE\C2\A4\C2\BE\00"
@.str.21 = [64 x i8] c"INSERT INTO admin (username, password) VALUES ('%s', SHA('%s'))\00"
@.str.22 = [81 x i8] c"\0A [ \C2\B0\C3\BC\C2\B8\C2\AE\C3\80\C3\9A \C2\B0\C3\A8\C3\81\C2\A4 \C2\B5\C3\AE\C2\B7\C3\8F\C3\80\C2\BB \C2\BF\C3\8F\C2\B7\C3\A1\C3\87\C3\8F\C2\BF\C2\B4\C2\BD\C3\80\C2\B4\C3\8F\C2\B4\C3\99. ]\00"
@.str.23 = [57 x i8] c"\0A [ \C2\B0\C3\BC\C2\B8\C2\AE\C3\80\C3\9A \C2\B5\C3\AE\C2\B7\C3\8F ID : %s ]\00"
@str.25 = [54 x i8] c"\0A ============================================ \0A\0A\00"
@str.26 = [60 x i8] c"\0A\0A \C3\86\C3\90\C2\BD\C2\BA\C2\BF\C3\B6\C2\B5\C3\A5\C2\B4\C3\82 \C2\BA\C2\B8\C3\80\C3\8C\C3\81\C3\B6 \C2\BE\C3\8A\C2\BD\C3\80\C2\B4\C3\8F\C2\B4\C3\99. \00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = alloca [2 x i8]
%3 = alloca [20 x i8]
%4 = alloca [20 x i8]
%5 = alloca [20 x i8]
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%7 = tail call i32* @mysql_init(i32* null)
%8 = tail call i32* @mysql_real_connect(i32* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 0, i32* null, i32 0)
%9 = tail call i32 @mysql_query(i32* %8, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%10 = tail call i32 @mysql_query(i32* %8, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
%11 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str.8, i64 0, i64 0))
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.9, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.10, i64 0, i64 0))
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @.str.11, i64 0, i64 0))
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.12, i64 0, i64 0))
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.13, i64 0, i64 0))
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.14, i64 0, i64 0))
%24 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%25 = call i32 @gets(i8* %24)
%26 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%27 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%28 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%29 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0))
%31 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8* %26)
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.26, i64 0, i64 0))
%33 = call i32 @getpass(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.18, i64 0, i64 0))
%34 = call i32 @strcpy(i8* %27, i32 %33)
%35 = call i32 @getpass(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.19, i64 0, i64 0))
%36 = call i32 @strcpy(i8* %28, i32 %35)
%37 = call i32 @strcmp(i8* %27, i8* %28)
%38 = icmp eq i32 %37, 0
br i1 %38, label %51, label %39
39: ; preds = %0, %39
%40 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([103 x i8], [103 x i8]* @.str.20, i64 0, i64 0))
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0))
%43 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8* %26)
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.26, i64 0, i64 0))
%45 = call i32 @getpass(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.18, i64 0, i64 0))
%46 = call i32 @strcpy(i8* %27, i32 %45)
%47 = call i32 @getpass(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.19, i64 0, i64 0))
%48 = call i32 @strcpy(i8* %28, i32 %47)
%49 = call i32 @strcmp(i8* %27, i8* %28)
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %39
51: ; preds = %39, %0
%52 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.21, i64 0, i64 0), i8* %26, i8* %27)
%53 = call i32 @mysql_query(i32* %8, i8* %6)
%54 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0))
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.22, i64 0, i64 0))
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.23, i64 0, i64 0), i8* %26)
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
%61 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.25, i64 0, i64 0))
ret i32 0
}