#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 main() {
  int score = 0;
  printf("Score: ");
  scanf("%d", &score);
  if (score >= 1 && score <= 3) {
    score = score * 10;
    printf("New Score: %d\n", score);
  } else if ((score >= 4 && score <= 6)) {
    score = score * 100;
    printf("New Score: %d\n", score);
  } else if ((score >= 7 && score <= 9)) {
    score = score * 1000;
    printf("New Score: %d\n", score);
  } else {
    printf("Invalid score.The score should be between 1 and 9\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jl     1185 <main+0x65>
cmpl   $0x3,-0x8(%rbp)
jg     1185 <main+0x65>
imul   $0xa,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1202 <main+0xe2>
cmpl   $0x4,-0x8(%rbp)
jl     11b6 <main+0x96>
cmpl   $0x6,-0x8(%rbp)
jg     11b6 <main+0x96>
imul   $0x64,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11fd <main+0xdd>
cmpl   $0x7,-0x8(%rbp)
jl     11ea <main+0xca>
cmpl   $0x9,-0x8(%rbp)
jg     11ea <main+0xca>
imul   $0x3e8,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f8 <main+0xd8>
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11fd <main+0xdd>
jmp    1202 <main+0xe2>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xec0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeba(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
lea    -0x1(%rax),%ecx
cmp    $0x2,%ecx
ja     116b <main+0x3b>
add    %eax,%eax
lea    (%rax,%rax,4),%esi
jmp    1186 <main+0x56>
lea    -0x4(%rax),%ecx
cmp    $0x2,%ecx
ja     1178 <main+0x48>
imul   $0x64,%eax,%esi
jmp    1186 <main+0x56>
lea    -0x7(%rax),%ecx
cmp    $0x2,%ecx
ja     119c <main+0x6c>
imul   $0x3e8,%eax,%esi
mov    %esi,0x4(%rsp)
lea    0xe7a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xe77(%rip),%rdi
call   1030 <puts@plt>
jmp    1198 <main+0x68>

LLVM IR (-O0):
@.str = [8 x i8] c"Score: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [15 x i8] c"New Score: %d\0A\00"
@.str.3 = [51 x i8] c"Invalid score.The score should be between 1 and 9\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 1
br i1 %6, label %7, label %15
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 3
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = load i32, i32* %2
%12 = mul nsw i32 %11, 10
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %13)
br label %41
15: ; preds = %7, %0
%16 = load i32, i32* %2
%17 = icmp sge i32 %16, 4
br i1 %17, label %18, label %26
18: ; preds = %15
%19 = load i32, i32* %2
%20 = icmp sle i32 %19, 6
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = load i32, i32* %2
%23 = mul nsw i32 %22, 100
store i32 %23, i32* %2
%24 = load i32, i32* %2
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %24)
br label %40
26: ; preds = %18, %15
%27 = load i32, i32* %2
%28 = icmp sge i32 %27, 7
br i1 %28, label %29, label %37
29: ; preds = %26
%30 = load i32, i32* %2
%31 = icmp sle i32 %30, 9
br i1 %31, label %32, label %37
32: ; preds = %29
%33 = load i32, i32* %2
%34 = mul nsw i32 %33, 1000
store i32 %34, i32* %2
%35 = load i32, i32* %2
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %35)
br label %39
37: ; preds = %29, %26
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
br label %39
39: ; preds = %37, %32
br label %40
40: ; preds = %39, %21
br label %41
41: ; preds = %40, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"Score: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [15 x i8] c"New Score: %d\0A\00"
@str = [50 x i8] c"Invalid score.The score should be between 1 and 9\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = add i32 %5, -1
%7 = icmp ult i32 %6, 3
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = mul nuw nsw i32 %5, 10
store i32 %9, i32* %1
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %9)
br label %25
11: ; preds = %0
%12 = add i32 %5, -4
%13 = icmp ult i32 %12, 3
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = mul nuw nsw i32 %5, 100
store i32 %15, i32* %1
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %15)
br label %25
17: ; preds = %11
%18 = add i32 %5, -7
%19 = icmp ult i32 %18, 3
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = mul nuw nsw i32 %5, 1000
store i32 %21, i32* %1
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %21)
br label %25
23: ; preds = %17
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
br label %25
25: ; preds = %14, %23, %20, %8
ret i32 0
}