#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*/ flushall();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
scalar_t__ strcmp(char *, char *);
int main(void) {
  char *country_list[10] = {"Australia", "Belgium", "China",  "Denmark",
                            "England",   "France",  "Greece", "Ireland",
                            "Scotland",  "Wales"};
  char *capital_list[] = {"Canberra",  "Brussels", "Beijing", "Copenhagen",
                          "London",    "Paris",    "Athens",  "Dublin",
                          "Edinburgh", "Cardiff"};
  char enter_country[15];
  int i;
  scanf("%s", enter_country);
  for (i = 0; i < 12; i++) {
    if (strcmp(enter_country, country_list[i]) == 0) {
      printf("Country is here");
      getchar();
      getchar();
      return 0;
    } else {
      printf("Country not present: please enter another country");
      getchar();
      getchar();
      return 0;
    }
  }
  getchar();
  flushall();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
lea    0x2c03(%rip),%rsi
mov    $0x50,%edx
call   1070 <memcpy@plt>
lea    -0xb0(%rbp),%rdi
lea    0x2c3b(%rip),%rsi
mov    $0x50,%edx
call   1070 <memcpy@plt>
lea    -0xbf(%rbp),%rsi
lea    0xef2(%rip),%rdi
call   1080 <scanf@plt>
movl   $0x0,-0xc4(%rbp)
cmpl   $0xc,-0xc4(%rbp)
jge    1237 <main+0xd7>
lea    -0xbf(%rbp),%rdi
movslq -0xc4(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1211 <main+0xb1>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
movl   $0x0,-0x4(%rbp)
jmp    124c <main+0xec>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
movl   $0x0,-0x4(%rbp)
jmp    124c <main+0xec>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    $0x0,%al
call   1040 <flushall@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xebe(%rip),%rdi
lea    0x1(%rsp),%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
lea    0xea0(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
lea    0xe9b(%rip),%rax
lea    0xea4(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Australia\00"
@.str.1 = [8 x i8] c"Belgium\00"
@.str.2 = [6 x i8] c"China\00"
@.str.3 = [8 x i8] c"Denmark\00"
@.str.4 = [8 x i8] c"England\00"
@.str.5 = [7 x i8] c"France\00"
@.str.6 = [7 x i8] c"Greece\00"
@.str.7 = [8 x i8] c"Ireland\00"
@.str.8 = [9 x i8] c"Scotland\00"
@.str.9 = [6 x i8] c"Wales\00"
@__const.main.country_list = [10 x i8*] [i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i32 0, i32 0)]
@.str.10 = [9 x i8] c"Canberra\00"
@.str.11 = [9 x i8] c"Brussels\00"
@.str.12 = [8 x i8] c"Beijing\00"
@.str.13 = [11 x i8] c"Copenhagen\00"
@.str.14 = [7 x i8] c"London\00"
@.str.15 = [6 x i8] c"Paris\00"
@.str.16 = [7 x i8] c"Athens\00"
@.str.17 = [7 x i8] c"Dublin\00"
@.str.18 = [10 x i8] c"Edinburgh\00"
@.str.19 = [8 x i8] c"Cardiff\00"
@__const.main.capital_list = [10 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i32 0, i32 0)]
@.str.20 = [3 x i8] c"%s\00"
@.str.21 = [16 x i8] c"Country is here\00"
@.str.22 = [50 x i8] c"Country not present: please enter another country\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8*]
%3 = alloca [10 x i8*]
%4 = alloca [15 x i8]
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [10 x i8*]* %2 to i8*
%7 = bitcast [10 x i8*]* %3 to i8*
%8 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i8* %8)
store i32 0, i32* %5
br label %10
10: ; preds = %29, %0
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 12
br i1 %12, label %13, label %32
13: ; preds = %10
%14 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 0
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 %16
%18 = load i8*, i8** %17
%19 = call i64 @strcmp(i8* %14, i8* %18)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %25
21: ; preds = %13
%22 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.21, i64 0, i64 0))
%23 = call i32 (...) @getchar()
%24 = call i32 (...) @getchar()
store i32 0, i32* %1
br label %35
25: ; preds = %13
%26 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.22, i64 0, i64 0))
%27 = call i32 (...) @getchar()
%28 = call i32 (...) @getchar()
store i32 0, i32* %1
br label %35
29: ; No predecessors!
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %10
32: ; preds = %10
%33 = call i32 (...) @getchar()
%34 = call i32 (...) @flushall()
store i32 0, i32* %1
br label %35
35: ; preds = %32, %25, %21
%36 = load i32, i32* %1
ret i32 %36
}

LLVM IR (-O2):
@.str = [10 x i8] c"Australia\00"
@.str.20 = [3 x i8] c"%s\00"
@.str.21 = [16 x i8] c"Country is here\00"
@.str.22 = [50 x i8] c"Country not present: please enter another country\00"
define i32 @main() {
%1 = alloca [15 x i8]
%2 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i8* %2)
%4 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.22, i64 0, i64 0)
%7 = call i32 @printf(i8* dereferenceable(1) %6)
%8 = call i32 (...) @getchar()
%9 = call i32 (...) @getchar()
ret i32 0
}