#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*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stelute();
void low_level(void) {
  stelute();
  int v, v2;
  int r = 10;
  int x = 0;
  printf("Now enter a number to be multimplied by %d %c %c ", r, 1, 16);
  scanf("%d", &v);
  v2 = v;
  v2 <<= r;
  puts("");
  printf("Nice pick, cool!\n\n");
  printf("So %d multiplied by %d equals....\n\t\t\t\t%d %c", v, r, v2, 2);
  while ("getchar() != '\n")
    continue;
}


x86 assembly (clang, -O0):
<low_level>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <stelute@plt>
movl   $0xa,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe99(%rip),%rdi
mov    $0x1,%edx
mov    $0x10,%ecx
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb3(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
lea    0xea7(%rip),%rdi
call   1030 <puts@plt>
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xe85(%rip),%rdi
mov    $0x2,%r8d
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11d0 <low_level+0x90>

x86 assembly (clang, -O2):
<low_level>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1060 <stelute@plt>
lea    0xe9d(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    $0x10,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb2(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1070 <scanf@plt>
mov    0xc(%rsp),%ebx
shl    $0xa,%ebx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebf(%rip),%rdi
call   1040 <puts@plt>
mov    0xc(%rsp),%esi
lea    0xe83(%rip),%rdi
mov    $0xa,%edx
mov    %ebx,%ecx
mov    $0x2,%r8d
xor    %eax,%eax
call   1050 <printf@plt>
cs nopw 0x0(%rax,%rax,1)
jmp    11d0 <low_level+0x80>

LLVM IR (-O0):
@.str = [50 x i8] c"Now enter a number to be multimplied by %d %c %c \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [19 x i8] c"Nice pick, cool!\0A\0A\00"
@.str.4 = [44 x i8] c"So %d multiplied by %d equals....\0A\09\09\09\09%d %c\00"
@.str.5 = [16 x i8] c"getchar() != '\0A\00"
define void @low_level() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (...) @stelute()
store i32 10, i32* %3
store i32 0, i32* %4
%6 = load i32, i32* %3
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %6, i32 1, i32 16)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = load i32, i32* %1
store i32 %9, i32* %2
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = shl i32 %11, %10
store i32 %12, i32* %2
%13 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%15 = load i32, i32* %1
%16 = load i32, i32* %3
%17 = load i32, i32* %2
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0), i32 %15, i32 %16, i32 %17, i32 2)
br label %19
19: ; preds = %0, %19
br label %19
}

LLVM IR (-O2):
@.str = [50 x i8] c"Now enter a number to be multimplied by %d %c %c \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.4 = [44 x i8] c"So %d multiplied by %d equals....\0A\09\09\09\09%d %c\00"
@str = [18 x i8] c"Nice pick, cool!\0A\00"
define void @low_level() {
%1 = alloca i32
%2 = tail call i32 (...) @stelute()
%3 = bitcast i32* %1 to i8*
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 10, i32 1, i32 16)
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = shl i32 %6, 10
%8 = call i32 @putchar(i32 10)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%10 = load i32, i32* %1
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0), i32 %10, i32 10, i32 %7, i32 2)
br label %12
12: ; preds = %12, %0
br label %12
}