#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 a;
  do {
    printf("zifra");
    scanf("%d", &a);
  } while (a<1, a> 9);
  if (a == 1)
    printf("one");
  if (a == 2)
    printf("two");
  if (a == 3)
    printf("three");
  if (a == 4)
    printf("four");
  if (a == 5)
    printf("five");
  if (a == 6)
    printf("six");
  if (a == 7)
    printf("seven");
  if (a == 8)
    printf("eight");
  if (a == 9)
    printf("nine");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x9,-0x8(%rbp)
jg     112f <main+0xf>
cmpl   $0x1,-0x8(%rbp)
jne    116b <main+0x4b>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x2,-0x8(%rbp)
jne    1181 <main+0x61>
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x3,-0x8(%rbp)
jne    1197 <main+0x77>
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x4,-0x8(%rbp)
jne    11ad <main+0x8d>
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x5,-0x8(%rbp)
jne    11c3 <main+0xa3>
lea    0xe5e(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x6,-0x8(%rbp)
jne    11d9 <main+0xb9>
lea    0xe4d(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x7,-0x8(%rbp)
jne    11ef <main+0xcf>
lea    0xe3b(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x8,-0x8(%rbp)
jne    1205 <main+0xe5>
lea    0xe2b(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x9,-0x8(%rbp)
jne    121b <main+0xfb>
lea    0xe1b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%r14
lea    0xecf(%rip),%r15
lea    0xc(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x9,%eax
jg     1140 <main+0x20>
cmp    $0x1,%eax
je     11b5 <main+0x95>
cmp    $0x2,%eax
je     11ca <main+0xaa>
cmp    $0x3,%eax
je     11df <main+0xbf>
cmp    $0x4,%eax
je     11f4 <main+0xd4>
cmp    $0x5,%eax
je     120d <main+0xed>
cmp    $0x6,%eax
je     1226 <main+0x106>
cmp    $0x7,%eax
je     123f <main+0x11f>
cmp    $0x8,%eax
je     1258 <main+0x138>
cmp    $0x9,%eax
jne    11a9 <main+0x89>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xe4d(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
cmp    $0x2,%eax
jne    1166 <main+0x46>
lea    0xe3c(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
cmp    $0x3,%eax
jne    116b <main+0x4b>
lea    0xe2b(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
cmp    $0x4,%eax
jne    1174 <main+0x54>
lea    0xe1c(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
cmp    $0x5,%eax
jne    117d <main+0x5d>
lea    0xe08(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
cmp    $0x6,%eax
jne    1186 <main+0x66>
lea    0xdf4(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
cmp    $0x7,%eax
jne    118f <main+0x6f>
lea    0xddf(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
cmp    $0x8,%eax
jne    1198 <main+0x78>
lea    0xdcc(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
cmp    $0x9,%eax
je     119d <main+0x7d>
jmp    11a9 <main+0x89>

LLVM IR (-O0):
@.str = [6 x i8] c"zifra\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"one\00"
@.str.3 = [4 x i8] c"two\00"
@.str.4 = [6 x i8] c"three\00"
@.str.5 = [5 x i8] c"four\00"
@.str.6 = [5 x i8] c"five\00"
@.str.7 = [4 x i8] c"six\00"
@.str.8 = [6 x i8] c"seven\00"
@.str.9 = [6 x i8] c"eight\00"
@.str.10 = [5 x i8] c"nine\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %6, %0
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
br label %6
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 1
%9 = zext i1 %8 to i32
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 9
br i1 %11, label %3, label %12
12: ; preds = %6
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %17
17: ; preds = %15, %12
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 2
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %22
22: ; preds = %20, %17
%23 = load i32, i32* %2
%24 = icmp eq i32 %23, 3
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %27
27: ; preds = %25, %22
%28 = load i32, i32* %2
%29 = icmp eq i32 %28, 4
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %32
32: ; preds = %30, %27
%33 = load i32, i32* %2
%34 = icmp eq i32 %33, 5
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %37
37: ; preds = %35, %32
%38 = load i32, i32* %2
%39 = icmp eq i32 %38, 6
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
br label %42
42: ; preds = %40, %37
%43 = load i32, i32* %2
%44 = icmp eq i32 %43, 7
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
br label %47
47: ; preds = %45, %42
%48 = load i32, i32* %2
%49 = icmp eq i32 %48, 8
br i1 %49, label %50, label %52
50: ; preds = %47
%51 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
br label %52
52: ; preds = %50, %47
%53 = load i32, i32* %2
%54 = icmp eq i32 %53, 9
br i1 %54, label %55, label %57
55: ; preds = %52
%56 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
br label %57
57: ; preds = %55, %52
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"zifra\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"one\00"
@.str.3 = [4 x i8] c"two\00"
@.str.4 = [6 x i8] c"three\00"
@.str.5 = [5 x i8] c"four\00"
@.str.6 = [5 x i8] c"five\00"
@.str.7 = [4 x i8] c"six\00"
@.str.8 = [6 x i8] c"seven\00"
@.str.9 = [6 x i8] c"eight\00"
@.str.10 = [5 x i8] c"nine\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%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 = icmp sgt i32 %6, 9
br i1 %7, label %3, label %8
8: ; preds = %3
%9 = icmp eq i32 %6, 1
br i1 %9, label %10, label %13
10: ; preds = %8
%11 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32, i32* %1
br label %13
13: ; preds = %10, %8
%14 = phi i32 [ %12, %10 ], [ %6, %8 ]
%15 = icmp eq i32 %14, 2
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%18 = load i32, i32* %1
br label %19
19: ; preds = %16, %13
%20 = phi i32 [ %18, %16 ], [ %14, %13 ]
%21 = icmp eq i32 %20, 3
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%24 = load i32, i32* %1
br label %25
25: ; preds = %22, %19
%26 = phi i32 [ %24, %22 ], [ %20, %19 ]
%27 = icmp eq i32 %26, 4
br i1 %27, label %28, label %31
28: ; preds = %25
%29 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%30 = load i32, i32* %1
br label %31
31: ; preds = %28, %25
%32 = phi i32 [ %30, %28 ], [ %26, %25 ]
%33 = icmp eq i32 %32, 5
br i1 %33, label %34, label %37
34: ; preds = %31
%35 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%36 = load i32, i32* %1
br label %37
37: ; preds = %34, %31
%38 = phi i32 [ %36, %34 ], [ %32, %31 ]
%39 = icmp eq i32 %38, 6
br i1 %39, label %40, label %43
40: ; preds = %37
%41 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%42 = load i32, i32* %1
br label %43
43: ; preds = %40, %37
%44 = phi i32 [ %42, %40 ], [ %38, %37 ]
%45 = icmp eq i32 %44, 7
br i1 %45, label %46, label %49
46: ; preds = %43
%47 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%48 = load i32, i32* %1
br label %49
49: ; preds = %46, %43
%50 = phi i32 [ %48, %46 ], [ %44, %43 ]
%51 = icmp eq i32 %50, 8
br i1 %51, label %52, label %55
52: ; preds = %49
%53 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%54 = load i32, i32* %1
br label %55
55: ; preds = %52, %49
%56 = phi i32 [ %54, %52 ], [ %50, %49 ]
%57 = icmp eq i32 %56, 9
br i1 %57, label %58, label %60
58: ; preds = %55
%59 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
br label %60
60: ; preds = %58, %55
ret i32 0
}