#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
int main(void) {
  system("COLOR 2");
  int checker = 0;
label:
  printf("*********************************************************\n          "
         " Jestem Kalkulatorem Szesnastkowym. \n           Jak chcesz to "
         "sprawdz moja biografie \n           (6. "
         "Informacje)\n********************************************************"
         "*\n\n\n");
  printf("Wybierz co chcesz zrobic (Wpisz cyfre)\n");
  printf("1. Dodawanie\n");
  printf("2. Mnozenie\n");
  printf("3. Odejmowanie\n");
  printf("4. Dzielenie\n");
  printf("5. Reszta\n");
  printf("6. Informacje\n");
  printf("7. Wyjscie\n\n\n");
  printf("                                  *Uwaga*\n");
  printf("Wartosci wpisuj w formie np. 5AD, 6AC itd... czyli jesli "
         "powiem:\nwpisz pierwsza wartosc to oczekuje od Ciebie\n");
  printf("5AD\n\n\n");
  scanf("%d", &checker);
  if (checker == 1) {
    printf("\n\n***DODAWANIE***\n\n");
    int x, y;
    printf("Wpisz pierwsza wartosc\n");
    scanf("%x", &x);
    printf("Wpisz druga wartosc\n");
    scanf("%x", &y);
    printf("Dodawanie liczb: %2X i %2X = %2X\n\n\n", x, y, x + y);
    int w;
    printf("Czy chcesz zebym nas zabral do menu wyboru? \n1 - TAK(Zabierz mnie "
           "do menu) \n2 - NIE(Skonczylem meczarnie)\n");
    scanf("%i", &w);
    if (w == 1)
      goto label;
    if (w == 2)
      system("PAUSE");
  }
  if (checker == 2) {
    printf("\n\n***MNOZENIE***\n\n");
    int x, y;
    printf("Wpisz pierwsza wartosc\n");
    scanf("%x", &x);
    printf("Wpisz druga wartosc\n");
    scanf("%x", &y);
    printf("Mnozenie liczb: %2X i %2X = %2X\n\n\n", x, y, x * y);
    int w;
    printf("Czy chcesz zebym nas zabral do menu wyboru? \n1 - TAK(Zabierz mnie "
           "do menu) \n2 - NIE(Skonczylem meczarnie)\n");
    scanf("%i", &w);
    if (w == 1)
      goto label;
    if (w == 2)
      system("PAUSE");
  }
  if (checker == 3) {
    printf("\n\n***ODEJMOWANIE***\n\n");
    int x, y;
    printf("Wpisz pierwsza wartosc\n");
    scanf("%x", &x);
    printf("Wpisz druga wartosc\n");
    scanf("%x", &y);
    printf("Odejmowanie liczb: %2X i %2X = %2X\n\n\n", x, y, x - y);
    int w;
    printf("Czy chcesz zebym nas zabral do menu wyboru? \n1 - TAK(Zabierz mnie "
           "do menu) \n2 - NIE(Skonczylem meczarnie)\n");
    scanf("%i", &w);
    if (w == 1)
      goto label;
    if (w == 2)
      system("PAUSE");
  }
  if (checker == 4) {
    printf("\n\n***DZIELENIE***\n\n");
    int x, y;
    printf("Wpisz pierwsza wartosc\n");
    scanf("%x", &x);
    printf("Wpisz druga wartosc\n");
    scanf("%x", &y);
    printf("Dzielenie liczb: %2X i %2X = %2X\n\n\n", x, y, x / y);
    int w;
    printf("Czy chcesz zebym nas zabral do menu wyboru? \n1 - TAK(Zabierz mnie "
           "do menu) \n2 - NIE(Skonczylem meczarnie)\n");
    scanf("%i", &w);
    if (w == 1)
      goto label;
    if (w == 2)
      system("PAUSE");
  }
  if (checker == 5) {
    printf("\n\n***RESZTA***\n\n");
    int x, y;
    printf("Wpisz pierwsza wartosc\n");
    scanf("%x", &x);
    printf("Wpisz druga wartosc\n");
    scanf("%x", &y);
    printf("Reszta miêdzy: %2X i %2X = %2X\n\n\n", x, y, x % y);
    int w;
    printf("Czy chcesz zebym nas zabral do menu wyboru? \n1 - TAK(Zabierz mnie "
           "do menu) \n2 - NIE(Skonczylem meczarnie)\n");
    scanf("%i", &w);
    if (w == 1)
      goto label;
    if (w == 2)
      system("PAUSE");
  }
  if (checker == 6) {
    printf("\n\n***************************************************************"
           "*********\n");
    printf(
        "Mam na imie kalkulator szesnastkowy albo po prostu Andrzejek :) \n");
    printf("Urodzilem sie 5 marca 2017 roku\n");
    printf("Zostalem napisany w CodeBlocksie przez Trolita\n");
    printf("Jestem tu by Ci pomoc. Chce Ci pokazac rezultaty dzialania na "
           "liczbach\nszesnastkowych."
           " Ty je rozwiazujesz na kartce papieru, potem mi mowisz\nco ja mam "
           "policzyc i sprawdzasz.");
    printf("\n*****************************************************************"
           "*******\n\n\n");
    int w;
    printf("Czy chcesz zebym nas zabral do menu wyboru? \n1 - TAK(Zabierz mnie "
           "do menu) \n2 - NIE(Skonczylem meczarnie)\n");
    scanf("%i", &w);
    if (w == 1)
      goto label;
    if (w == 2)
      system("PAUSE");
  }
  if (checker == 7) {
    printf("\n\nWCISNIJ ENTER\n");
    printf("WCISNIJ ENTER!!!.......\n");
    printf("WCISNIJ ENTER!!!.......\n");
    printf("WCISNIJ ENTER!!!.......\n");
    printf("WCISNIJ ENTER!!!.......\n");
    return 0;
    system("pause");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <system@plt>
movl   $0x0,-0x8(%rbp)
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfad(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfad(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfab(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfc9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x102a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x1023(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    12c0 <main+0x190>
lea    0x100c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x1012(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x101c(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0x100f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xffe(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
lea    0xffa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x1010(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x106d(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x1,-0x14(%rbp)
jne    12a5 <main+0x175>
jmp    1152 <main+0x22>
cmpl   $0x2,-0x14(%rbp)
jne    12bb <main+0x18b>
lea    0x1047(%rip),%rdi
call   1030 <system@plt>
jmp    12c0 <main+0x190>
cmpl   $0x2,-0x8(%rbp)
jne    1377 <main+0x247>
lea    0x1032(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf5c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf66(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xf59(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf48(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
lea    0xfee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf59(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfb6(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x1,-0x20(%rbp)
jne    135c <main+0x22c>
jmp    1152 <main+0x22>
cmpl   $0x2,-0x20(%rbp)
jne    1372 <main+0x242>
lea    0xf90(%rip),%rdi
call   1030 <system@plt>
jmp    1377 <main+0x247>
cmpl   $0x3,-0x8(%rbp)
jne    142d <main+0x2fd>
lea    0xfb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeaf(%rip),%rdi
lea    -0x24(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe91(%rip),%rdi
lea    -0x28(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
mov    -0x24(%rbp),%ecx
sub    -0x28(%rbp),%ecx
lea    0xf71(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf00(%rip),%rdi
lea    -0x2c(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x1,-0x2c(%rbp)
jne    1412 <main+0x2e2>
jmp    1152 <main+0x22>
cmpl   $0x2,-0x2c(%rbp)
jne    1428 <main+0x2f8>
lea    0xeda(%rip),%rdi
call   1030 <system@plt>
jmp    142d <main+0x2fd>
cmpl   $0x4,-0x8(%rbp)
jne    14ec <main+0x3bc>
lea    0xf37(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdef(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdf9(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xddb(%rip),%rdi
lea    -0x34(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x30(%rbp),%esi
mov    -0x34(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x30(%rbp),%eax
cltd
idivl  -0x34(%rbp)
mov    -0x4c(%rbp),%edx
mov    %eax,%ecx
lea    0xeec(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xde4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe41(%rip),%rdi
lea    -0x38(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x1,-0x38(%rbp)
jne    14d1 <main+0x3a1>
jmp    1152 <main+0x22>
cmpl   $0x2,-0x38(%rbp)
jne    14e7 <main+0x3b7>
lea    0xe1b(%rip),%rdi
call   1030 <system@plt>
jmp    14ec <main+0x3bc>
cmpl   $0x5,-0x8(%rbp)
jne    15ab <main+0x47b>
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd30(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd3a(%rip),%rdi
lea    -0x3c(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xd2d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd1c(%rip),%rdi
lea    -0x40(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x3c(%rbp),%esi
mov    -0x40(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x3c(%rbp),%eax
cltd
idivl  -0x40(%rbp)
mov    %edx,%ecx
mov    -0x50(%rbp),%edx
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd25(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd82(%rip),%rdi
lea    -0x44(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x1,-0x44(%rbp)
jne    1590 <main+0x460>
jmp    1152 <main+0x22>
cmpl   $0x2,-0x44(%rbp)
jne    15a6 <main+0x476>
lea    0xd5c(%rip),%rdi
call   1030 <system@plt>
jmp    15ab <main+0x47b>
cmpl   $0x6,-0x8(%rbp)
jne    1651 <main+0x521>
lea    0xe25(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf6c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc7f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xcdc(%rip),%rdi
lea    -0x48(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x1,-0x48(%rbp)
jne    1636 <main+0x506>
jmp    1152 <main+0x22>
cmpl   $0x2,-0x48(%rbp)
jne    164c <main+0x51c>
lea    0xcb6(%rip),%rdi
call   1030 <system@plt>
jmp    1651 <main+0x521>
cmpl   $0x7,-0x8(%rbp)
jne    16a8 <main+0x578>
lea    0xf59(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf5c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf4e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf40(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf32(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeab(%rip),%rdi
call   1040 <system@plt>
movl   $0x0,0x14(%rsp)
lea    0x1010(%rip),%rdi
lea    0x10fa(%rip),%r14
lea    0x111a(%rip),%r15
lea    0x1120(%rip),%r13
lea    0x1125(%rip),%r12
jmp    1196 <main+0x56>
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%r14
lea    0x111c(%rip),%rbp
lea    0x1122(%rip),%rbx
call   1030 <puts@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    %r12,%r13
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0x10ed(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ef(%rip),%rdi
call   1030 <puts@plt>
lea    0x10f0(%rip),%rdi
call   1030 <puts@plt>
lea    0x110e(%rip),%rdi
call   1030 <puts@plt>
lea    0x1170(%rip),%rdi
call   1030 <puts@plt>
lea    0xde9(%rip),%rdi
lea    0x14(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x14(%rsp),%eax
cmp    $0x1,%eax
mov    %r15,%r12
je     1260 <main+0x120>
cmp    $0x2,%eax
je     130f <main+0x1cf>
cmp    $0x3,%eax
je     13ba <main+0x27a>
cmp    $0x4,%eax
jne    1538 <main+0x3f8>
jmp    1464 <main+0x324>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rbp
lea    0x12b8(%rip),%rdi
call   1030 <puts@plt>
lea    0x12bf(%rip),%rdi
call   1030 <puts@plt>
lea    0xd89(%rip),%r14
mov    %r14,%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
lea    0x12b6(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
lea    0x10(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x8(%rsp),%esi
mov    0x10(%rsp),%edx
lea    (%rdx,%rsi,1),%ecx
lea    0xd54(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1298(%rip),%rdi
call   1030 <puts@plt>
lea    0xd5e(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x1,%eax
je     14f0 <main+0x3b0>
cmp    $0x2,%eax
jne    12fc <main+0x1bc>
lea    0xd3e(%rip),%rdi
call   1040 <system@plt>
mov    0x14(%rsp),%eax
mov    %rbp,%r14
mov    %r12,%r15
cmp    $0x2,%eax
jne    123e <main+0xfe>
lea    0x11fa(%rip),%rdi
call   1030 <puts@plt>
lea    0x1213(%rip),%rdi
call   1030 <puts@plt>
lea    0xcdd(%rip),%rbp
mov    %rbp,%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
lea    0x120a(%rip),%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
lea    0x10(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x8(%rsp),%esi
mov    0x10(%rsp),%edx
mov    %edx,%ecx
imul   %esi,%ecx
lea    0xcd3(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x11ea(%rip),%rdi
call   1030 <puts@plt>
lea    0xcb0(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x1,%eax
je     14f3 <main+0x3b3>
cmp    $0x2,%eax
mov    %r12,%r15
jne    13ad <main+0x26d>
lea    0xc8d(%rip),%rdi
call   1040 <system@plt>
mov    0x14(%rsp),%eax
cmp    $0x3,%eax
jne    1247 <main+0x107>
lea    0x113a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1168(%rip),%rdi
call   1030 <puts@plt>
lea    0xc32(%rip),%rbp
mov    %rbp,%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
lea    0x115f(%rip),%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
lea    0x10(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x8(%rsp),%esi
mov    0x10(%rsp),%edx
mov    %esi,%ecx
sub    %edx,%ecx
lea    0xc4c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1140(%rip),%rdi
call   1030 <puts@plt>
lea    0xc06(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x1,%eax
je     14f3 <main+0x3b3>
cmp    $0x2,%eax
jne    1454 <main+0x314>
lea    0xbe6(%rip),%rdi
call   1040 <system@plt>
mov    0x14(%rsp),%eax
mov    %r12,%r15
cmp    $0x4,%eax
jne    1538 <main+0x3f8>
lea    0x107d(%rip),%rdi
call   1030 <puts@plt>
lea    0x10be(%rip),%rdi
call   1030 <puts@plt>
lea    0xb88(%rip),%rbp
mov    %rbp,%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
lea    0x10b5(%rip),%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
lea    0x10(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x8(%rsp),%esi
mov    0x10(%rsp),%ecx
mov    %esi,%eax
cltd
idiv   %ecx
lea    0xbc7(%rip),%rdi
mov    %ecx,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1091(%rip),%rdi
call   1030 <puts@plt>
lea    0xb57(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x1,%eax
jne    1520 <main+0x3e0>
jmp    14f3 <main+0x3b3>
mov    %rbp,%r14
mov    %r12,%r15
lea    0xc7c(%rip),%rdi
mov    %r13,%r12
lea    0xd97(%rip),%r13
lea    0xdab(%rip),%rbp
jmp    11a4 <main+0x64>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    $0x2,%eax
jne    1531 <main+0x3f1>
lea    0xb09(%rip),%rdi
call   1040 <system@plt>
mov    0x14(%rsp),%eax
mov    %r12,%r15
mov    %r13,%r12
lea    0xd5c(%rip),%r13
mov    %r14,%rbx
lea    0xc2d(%rip),%r14
cmp    $0x5,%eax
jne    15f8 <main+0x4b8>
lea    0xf7c(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcd(%rip),%rdi
call   1030 <puts@plt>
lea    0xa97(%rip),%rbp
mov    %rbp,%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
lea    0xfc4(%rip),%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
lea    0x10(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x8(%rsp),%esi
mov    0x10(%rsp),%ebp
mov    %esi,%eax
cltd
idiv   %ebp
mov    %edx,%ecx
lea    0xaf8(%rip),%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xfa0(%rip),%rdi
call   1030 <puts@plt>
lea    0xa66(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x1,%eax
je     1190 <main+0x50>
cmp    $0x2,%eax
jne    15f4 <main+0x4b4>
lea    0xa46(%rip),%rdi
call   1040 <system@plt>
mov    0x14(%rsp),%eax
cmp    $0x6,%eax
jne    168a <main+0x54a>
lea    0xda9(%rip),%rdi
call   1030 <puts@plt>
lea    0xde8(%rip),%rdi
call   1030 <puts@plt>
lea    0xe1d(%rip),%rdi
call   1030 <puts@plt>
lea    0xe31(%rip),%rdi
call   1030 <puts@plt>
lea    0xa93(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe46(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0e(%rip),%rdi
call   1030 <puts@plt>
lea    0x9d4(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x8(%rsp),%eax
cmp    $0x1,%eax
je     1190 <main+0x50>
cmp    $0x2,%eax
jne    1686 <main+0x546>
lea    0x9b4(%rip),%rdi
call   1040 <system@plt>
mov    0x14(%rsp),%eax
cmp    $0x7,%eax
jne    16c2 <main+0x582>
lea    0xcf3(%rip),%rdi
call   1030 <puts@plt>
lea    0xcf7(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"COLOR 2\00"
@.str.1 = [242 x i8] c"*********************************************************\0A Jestem Kalkulatorem Szesnastkowym. \0A Jak chcesz to sprawdz moja biografie \0A (6. Informacje)\0A*********************************************************\0A\0A\0A\00"
@.str.2 = [40 x i8] c"Wybierz co chcesz zrobic (Wpisz cyfre)\0A\00"
@.str.3 = [14 x i8] c"1. Dodawanie\0A\00"
@.str.4 = [13 x i8] c"2. Mnozenie\0A\00"
@.str.5 = [16 x i8] c"3. Odejmowanie\0A\00"
@.str.6 = [14 x i8] c"4. Dzielenie\0A\00"
@.str.7 = [11 x i8] c"5. Reszta\0A\00"
@.str.8 = [15 x i8] c"6. Informacje\0A\00"
@.str.9 = [14 x i8] c"7. Wyjscie\0A\0A\0A\00"
@.str.10 = [43 x i8] c" *Uwaga*\0A\00"
@.str.11 = [111 x i8] c"Wartosci wpisuj w formie np. 5AD, 6AC itd... czyli jesli powiem:\0Awpisz pierwsza wartosc to oczekuje od Ciebie\0A\00"
@.str.12 = [7 x i8] c"5AD\0A\0A\0A\00"
@.str.13 = [3 x i8] c"%d\00"
@.str.14 = [20 x i8] c"\0A\0A***DODAWANIE***\0A\0A\00"
@.str.15 = [24 x i8] c"Wpisz pierwsza wartosc\0A\00"
@.str.16 = [3 x i8] c"%x\00"
@.str.17 = [21 x i8] c"Wpisz druga wartosc\0A\00"
@.str.18 = [36 x i8] c"Dodawanie liczb: %2X i %2X = %2X\0A\0A\0A\00"
@.str.19 = [107 x i8] c"Czy chcesz zebym nas zabral do menu wyboru? \0A1 - TAK(Zabierz mnie do menu) \0A2 - NIE(Skonczylem meczarnie)\0A\00"
@.str.20 = [3 x i8] c"%i\00"
@.str.21 = [6 x i8] c"PAUSE\00"
@.str.22 = [19 x i8] c"\0A\0A***MNOZENIE***\0A\0A\00"
@.str.23 = [35 x i8] c"Mnozenie liczb: %2X i %2X = %2X\0A\0A\0A\00"
@.str.24 = [22 x i8] c"\0A\0A***ODEJMOWANIE***\0A\0A\00"
@.str.25 = [38 x i8] c"Odejmowanie liczb: %2X i %2X = %2X\0A\0A\0A\00"
@.str.26 = [20 x i8] c"\0A\0A***DZIELENIE***\0A\0A\00"
@.str.27 = [36 x i8] c"Dzielenie liczb: %2X i %2X = %2X\0A\0A\0A\00"
@.str.28 = [17 x i8] c"\0A\0A***RESZTA***\0A\0A\00"
@.str.29 = [35 x i8] c"Reszta mi\C3\AAdzy: %2X i %2X = %2X\0A\0A\0A\00"
@.str.30 = [76 x i8] c"\0A\0A************************************************************************\0A\00"
@.str.31 = [66 x i8] c"Mam na imie kalkulator szesnastkowy albo po prostu Andrzejek :) \0A\00"
@.str.32 = [33 x i8] c"Urodzilem sie 5 marca 2017 roku\0A\00"
@.str.33 = [48 x i8] c"Zostalem napisany w CodeBlocksie przez Trolita\0A\00"
@.str.34 = [174 x i8] c"Jestem tu by Ci pomoc. Chce Ci pokazac rezultaty dzialania na liczbach\0Aszesnastkowych. Ty je rozwiazujesz na kartce papieru, potem mi mowisz\0Aco ja mam policzyc i sprawdzasz.\00"
@.str.35 = [77 x i8] c"\0A************************************************************************\0A\0A\0A\00"
@.str.36 = [17 x i8] c"\0A\0AWCISNIJ ENTER\0A\00"
@.str.37 = [25 x i8] c"WCISNIJ ENTER!!!.......\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 0, i32* %1
%19 = call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %20
20: ; preds = %177, %156, %130, %104, %78, %52, %0
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([242 x i8], [242 x i8]* @.str.1, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.10, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.11, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%33 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i32* %2)
%34 = load i32, i32* %2
%35 = icmp eq i32 %34, 1
br i1 %35, label %36, label %59
36: ; preds = %20
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0))
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.15, i64 0, i64 0))
%39 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %3)
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0))
%41 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %4)
%42 = load i32, i32* %3
%43 = load i32, i32* %4
%44 = load i32, i32* %3
%45 = load i32, i32* %4
%46 = add nsw i32 %44, %45
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.18, i64 0, i64 0), i32 %42, i32 %43, i32 %46)
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.19, i64 0, i64 0))
%49 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %5)
%50 = load i32, i32* %5
%51 = icmp eq i32 %50, 1
br i1 %51, label %52, label %53
52: ; preds = %36
br label %20
53: ; preds = %36
%54 = load i32, i32* %5
%55 = icmp eq i32 %54, 2
br i1 %55, label %56, label %58
56: ; preds = %53
%57 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
br label %58
58: ; preds = %56, %53
br label %59
59: ; preds = %58, %20
%60 = load i32, i32* %2
%61 = icmp eq i32 %60, 2
br i1 %61, label %62, label %85
62: ; preds = %59
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.22, i64 0, i64 0))
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.15, i64 0, i64 0))
%65 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %6)
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0))
%67 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %7)
%68 = load i32, i32* %6
%69 = load i32, i32* %7
%70 = load i32, i32* %6
%71 = load i32, i32* %7
%72 = mul nsw i32 %70, %71
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.23, i64 0, i64 0), i32 %68, i32 %69, i32 %72)
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.19, i64 0, i64 0))
%75 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %8)
%76 = load i32, i32* %8
%77 = icmp eq i32 %76, 1
br i1 %77, label %78, label %79
78: ; preds = %62
br label %20
79: ; preds = %62
%80 = load i32, i32* %8
%81 = icmp eq i32 %80, 2
br i1 %81, label %82, label %84
82: ; preds = %79
%83 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
br label %84
84: ; preds = %82, %79
br label %85
85: ; preds = %84, %59
%86 = load i32, i32* %2
%87 = icmp eq i32 %86, 3
br i1 %87, label %88, label %111
88: ; preds = %85
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.24, i64 0, i64 0))
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.15, i64 0, i64 0))
%91 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %9)
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0))
%93 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %10)
%94 = load i32, i32* %9
%95 = load i32, i32* %10
%96 = load i32, i32* %9
%97 = load i32, i32* %10
%98 = sub nsw i32 %96, %97
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.25, i64 0, i64 0), i32 %94, i32 %95, i32 %98)
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.19, i64 0, i64 0))
%101 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %11)
%102 = load i32, i32* %11
%103 = icmp eq i32 %102, 1
br i1 %103, label %104, label %105
104: ; preds = %88
br label %20
105: ; preds = %88
%106 = load i32, i32* %11
%107 = icmp eq i32 %106, 2
br i1 %107, label %108, label %110
108: ; preds = %105
%109 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
br label %110
110: ; preds = %108, %105
br label %111
111: ; preds = %110, %85
%112 = load i32, i32* %2
%113 = icmp eq i32 %112, 4
br i1 %113, label %114, label %137
114: ; preds = %111
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.26, i64 0, i64 0))
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.15, i64 0, i64 0))
%117 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %12)
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0))
%119 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %13)
%120 = load i32, i32* %12
%121 = load i32, i32* %13
%122 = load i32, i32* %12
%123 = load i32, i32* %13
%124 = sdiv i32 %122, %123
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.27, i64 0, i64 0), i32 %120, i32 %121, i32 %124)
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.19, i64 0, i64 0))
%127 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %14)
%128 = load i32, i32* %14
%129 = icmp eq i32 %128, 1
br i1 %129, label %130, label %131
130: ; preds = %114
br label %20
131: ; preds = %114
%132 = load i32, i32* %14
%133 = icmp eq i32 %132, 2
br i1 %133, label %134, label %136
134: ; preds = %131
%135 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
br label %136
136: ; preds = %134, %131
br label %137
137: ; preds = %136, %111
%138 = load i32, i32* %2
%139 = icmp eq i32 %138, 5
br i1 %139, label %140, label %163
140: ; preds = %137
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.28, i64 0, i64 0))
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.15, i64 0, i64 0))
%143 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %15)
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0))
%145 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %16)
%146 = load i32, i32* %15
%147 = load i32, i32* %16
%148 = load i32, i32* %15
%149 = load i32, i32* %16
%150 = srem i32 %148, %149
%151 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.29, i64 0, i64 0), i32 %146, i32 %147, i32 %150)
%152 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.19, i64 0, i64 0))
%153 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %17)
%154 = load i32, i32* %17
%155 = icmp eq i32 %154, 1
br i1 %155, label %156, label %157
156: ; preds = %140
br label %20
157: ; preds = %140
%158 = load i32, i32* %17
%159 = icmp eq i32 %158, 2
br i1 %159, label %160, label %162
160: ; preds = %157
%161 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
br label %162
162: ; preds = %160, %157
br label %163
163: ; preds = %162, %137
%164 = load i32, i32* %2
%165 = icmp eq i32 %164, 6
br i1 %165, label %166, label %184
166: ; preds = %163
%167 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.30, i64 0, i64 0))
%168 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.31, i64 0, i64 0))
%169 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.32, i64 0, i64 0))
%170 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.33, i64 0, i64 0))
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str.34, i64 0, i64 0))
%172 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.35, i64 0, i64 0))
%173 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.19, i64 0, i64 0))
%174 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %18)
%175 = load i32, i32* %18
%176 = icmp eq i32 %175, 1
br i1 %176, label %177, label %178
177: ; preds = %166
br label %20
178: ; preds = %166
%179 = load i32, i32* %18
%180 = icmp eq i32 %179, 2
br i1 %180, label %181, label %183
181: ; preds = %178
%182 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
br label %183
183: ; preds = %181, %178
br label %184
184: ; preds = %183, %163
%185 = load i32, i32* %2
%186 = icmp eq i32 %185, 7
br i1 %186, label %187, label %193
187: ; preds = %184
%188 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.36, i64 0, i64 0))
%189 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.37, i64 0, i64 0))
%190 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.37, i64 0, i64 0))
%191 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.37, i64 0, i64 0))
%192 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.37, i64 0, i64 0))
store i32 0, i32* %1
br label %193
193: ; preds = %187, %184
%194 = load i32, i32* %1
ret i32 %194
}

LLVM IR (-O2):
@.str = [8 x i8] c"COLOR 2\00"
@.str.13 = [3 x i8] c"%d\00"
@.str.16 = [3 x i8] c"%x\00"
@.str.18 = [36 x i8] c"Dodawanie liczb: %2X i %2X = %2X\0A\0A\0A\00"
@.str.20 = [3 x i8] c"%i\00"
@.str.21 = [6 x i8] c"PAUSE\00"
@.str.23 = [35 x i8] c"Mnozenie liczb: %2X i %2X = %2X\0A\0A\0A\00"
@.str.25 = [38 x i8] c"Odejmowanie liczb: %2X i %2X = %2X\0A\0A\0A\00"
@.str.27 = [36 x i8] c"Dzielenie liczb: %2X i %2X = %2X\0A\0A\0A\00"
@.str.29 = [35 x i8] c"Reszta mi\C3\AAdzy: %2X i %2X = %2X\0A\0A\0A\00"
@.str.34 = [174 x i8] c"Jestem tu by Ci pomoc. Chce Ci pokazac rezultaty dzialania na liczbach\0Aszesnastkowych. Ty je rozwiazujesz na kartce papieru, potem mi mowisz\0Aco ja mam policzyc i sprawdzasz.\00"
@str = [241 x i8] c"*********************************************************\0A Jestem Kalkulatorem Szesnastkowym. \0A Jak chcesz to sprawdz moja biografie \0A (6. Informacje)\0A*********************************************************\0A\0A\00"
@str.38 = [39 x i8] c"Wybierz co chcesz zrobic (Wpisz cyfre)\00"
@str.39 = [13 x i8] c"1. Dodawanie\00"
@str.40 = [12 x i8] c"2. Mnozenie\00"
@str.41 = [15 x i8] c"3. Odejmowanie\00"
@str.42 = [13 x i8] c"4. Dzielenie\00"
@str.43 = [10 x i8] c"5. Reszta\00"
@str.44 = [14 x i8] c"6. Informacje\00"
@str.45 = [13 x i8] c"7. Wyjscie\0A\0A\00"
@str.46 = [42 x i8] c" *Uwaga*\00"
@str.47 = [110 x i8] c"Wartosci wpisuj w formie np. 5AD, 6AC itd... czyli jesli powiem:\0Awpisz pierwsza wartosc to oczekuje od Ciebie\00"
@str.48 = [6 x i8] c"5AD\0A\0A\00"
@str.49 = [16 x i8] c"\0A\0AWCISNIJ ENTER\00"
@str.53 = [24 x i8] c"WCISNIJ ENTER!!!.......\00"
@str.54 = [75 x i8] c"\0A\0A************************************************************************\00"
@str.55 = [65 x i8] c"Mam na imie kalkulator szesnastkowy albo po prostu Andrzejek :) \00"
@str.56 = [32 x i8] c"Urodzilem sie 5 marca 2017 roku\00"
@str.57 = [47 x i8] c"Zostalem napisany w CodeBlocksie przez Trolita\00"
@str.58 = [76 x i8] c"\0A************************************************************************\0A\0A\00"
@str.60 = [16 x i8] c"\0A\0A***RESZTA***\0A\00"
@str.64 = [19 x i8] c"\0A\0A***DZIELENIE***\0A\00"
@str.68 = [21 x i8] c"\0A\0A***ODEJMOWANIE***\0A\00"
@str.72 = [18 x i8] c"\0A\0A***MNOZENIE***\0A\00"
@str.76 = [19 x i8] c"\0A\0A***DODAWANIE***\0A\00"
@str.77 = [23 x i8] c"Wpisz pierwsza wartosc\00"
@str.78 = [20 x i8] c"Wpisz druga wartosc\00"
@str.79 = [106 x i8] c"Czy chcesz zebym nas zabral do menu wyboru? \0A1 - TAK(Zabierz mnie do menu) \0A2 - NIE(Skonczylem meczarnie)\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = tail call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%19 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%20 = bitcast i32* %2 to i8*
%21 = bitcast i32* %3 to i8*
%22 = bitcast i32* %4 to i8*
%23 = bitcast i32* %5 to i8*
%24 = bitcast i32* %6 to i8*
%25 = bitcast i32* %7 to i8*
%26 = bitcast i32* %8 to i8*
%27 = bitcast i32* %9 to i8*
%28 = bitcast i32* %10 to i8*
%29 = bitcast i32* %11 to i8*
%30 = bitcast i32* %12 to i8*
%31 = bitcast i32* %13 to i8*
%32 = bitcast i32* %14 to i8*
%33 = bitcast i32* %15 to i8*
%34 = bitcast i32* %16 to i8*
%35 = bitcast i32* %17 to i8*
br label %36
36: ; preds = %70, %0
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([241 x i8], [241 x i8]* @str, i64 0, i64 0))
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.38, i64 0, i64 0))
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.39, i64 0, i64 0))
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.40, i64 0, i64 0))
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.41, i64 0, i64 0))
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.42, i64 0, i64 0))
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.43, i64 0, i64 0))
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.44, i64 0, i64 0))
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.45, i64 0, i64 0))
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.46, i64 0, i64 0))
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([110 x i8], [110 x i8]* @str.47, i64 0, i64 0))
%48 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.48, i64 0, i64 0))
%49 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i32* %1)
%50 = load i32, i32* %1
%51 = icmp eq i32 %50, 1
br i1 %51, label %52, label %71
52: ; preds = %36
%53 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.76, i64 0, i64 0))
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.77, i64 0, i64 0))
%55 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %2)
%56 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.78, i64 0, i64 0))
%57 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %3)
%58 = load i32, i32* %2
%59 = load i32, i32* %3
%60 = add nsw i32 %59, %58
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.18, i64 0, i64 0), i32 %58, i32 %59, i32 %60)
%62 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @str.79, i64 0, i64 0))
%63 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %4)
%64 = load i32, i32* %4
switch i32 %64, label %67 [
i32 1, label %69
i32 2, label %65
]
65: ; preds = %52
%66 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
br label %67
67: ; preds = %65, %52
%68 = load i32, i32* %1
br label %71
69: ; preds = %52
br label %70
70: ; preds = %69, %91, %112, %133, %154, %172
br label %36
71: ; preds = %67, %36
%72 = phi i32 [ %68, %67 ], [ %50, %36 ]
%73 = icmp eq i32 %72, 2
br i1 %73, label %74, label %92
74: ; preds = %71
%75 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.72, i64 0, i64 0))
%76 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.77, i64 0, i64 0))
%77 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %5)
%78 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.78, i64 0, i64 0))
%79 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %6)
%80 = load i32, i32* %5
%81 = load i32, i32* %6
%82 = mul nsw i32 %81, %80
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.23, i64 0, i64 0), i32 %80, i32 %81, i32 %82)
%84 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @str.79, i64 0, i64 0))
%85 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %7)
%86 = load i32, i32* %7
switch i32 %86, label %89 [
i32 1, label %91
i32 2, label %87
]
87: ; preds = %74
%88 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
br label %89
89: ; preds = %87, %74
%90 = load i32, i32* %1
br label %92
91: ; preds = %74
br label %70
92: ; preds = %89, %71
%93 = phi i32 [ %90, %89 ], [ %72, %71 ]
%94 = icmp eq i32 %93, 3
br i1 %94, label %95, label %113
95: ; preds = %92
%96 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.68, i64 0, i64 0))
%97 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.77, i64 0, i64 0))
%98 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %8)
%99 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.78, i64 0, i64 0))
%100 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %9)
%101 = load i32, i32* %8
%102 = load i32, i32* %9
%103 = sub nsw i32 %101, %102
%104 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.25, i64 0, i64 0), i32 %101, i32 %102, i32 %103)
%105 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @str.79, i64 0, i64 0))
%106 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %10)
%107 = load i32, i32* %10
switch i32 %107, label %110 [
i32 1, label %112
i32 2, label %108
]
108: ; preds = %95
%109 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
br label %110
110: ; preds = %108, %95
%111 = load i32, i32* %1
br label %113
112: ; preds = %95
br label %70
113: ; preds = %110, %92
%114 = phi i32 [ %111, %110 ], [ %93, %92 ]
%115 = icmp eq i32 %114, 4
br i1 %115, label %116, label %134
116: ; preds = %113
%117 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.64, i64 0, i64 0))
%118 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.77, i64 0, i64 0))
%119 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %11)
%120 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.78, i64 0, i64 0))
%121 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %12)
%122 = load i32, i32* %11
%123 = load i32, i32* %12
%124 = sdiv i32 %122, %123
%125 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.27, i64 0, i64 0), i32 %122, i32 %123, i32 %124)
%126 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @str.79, i64 0, i64 0))
%127 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %13)
%128 = load i32, i32* %13
switch i32 %128, label %131 [
i32 1, label %133
i32 2, label %129
]
129: ; preds = %116
%130 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
br label %131
131: ; preds = %129, %116
%132 = load i32, i32* %1
br label %134
133: ; preds = %116
br label %70
134: ; preds = %131, %113
%135 = phi i32 [ %132, %131 ], [ %114, %113 ]
%136 = icmp eq i32 %135, 5
br i1 %136, label %137, label %155
137: ; preds = %134
%138 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.60, i64 0, i64 0))
%139 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.77, i64 0, i64 0))
%140 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %14)
%141 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.78, i64 0, i64 0))
%142 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %15)
%143 = load i32, i32* %14
%144 = load i32, i32* %15
%145 = srem i32 %143, %144
%146 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.29, i64 0, i64 0), i32 %143, i32 %144, i32 %145)
%147 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @str.79, i64 0, i64 0))
%148 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %16)
%149 = load i32, i32* %16
switch i32 %149, label %152 [
i32 1, label %154
i32 2, label %150
]
150: ; preds = %137
%151 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
br label %152
152: ; preds = %150, %137
%153 = load i32, i32* %1
br label %155
154: ; preds = %137
br label %70
155: ; preds = %152, %134
%156 = phi i32 [ %153, %152 ], [ %135, %134 ]
%157 = icmp eq i32 %156, 6
br i1 %157, label %158, label %173
158: ; preds = %155
%159 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str.54, i64 0, i64 0))
%160 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.55, i64 0, i64 0))
%161 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.56, i64 0, i64 0))
%162 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.57, i64 0, i64 0))
%163 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([174 x i8], [174 x i8]* @.str.34, i64 0, i64 0))
%164 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.58, i64 0, i64 0))
%165 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @str.79, i64 0, i64 0))
%166 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %17)
%167 = load i32, i32* %17
switch i32 %167, label %170 [
i32 1, label %172
i32 2, label %168
]
168: ; preds = %158
%169 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
br label %170
170: ; preds = %158, %168
%171 = load i32, i32* %1
br label %173
172: ; preds = %158
br label %70
173: ; preds = %155, %170
%174 = phi i32 [ %171, %170 ], [ %156, %155 ]
%175 = icmp eq i32 %174, 7
br i1 %175, label %176, label %182
176: ; preds = %173
%177 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.49, i64 0, i64 0))
%178 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.53, i64 0, i64 0))
%179 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.53, i64 0, i64 0))
%180 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.53, i64 0, i64 0))
%181 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.53, i64 0, i64 0))
br label %182
182: ; preds = %173, %176
ret i32 0
}