#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*/ BanglaNumber(char *, char **, char *, int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ *gets(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, size_t, char *);
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  char number[15];
  size_t testCaseTimes = 0;
  fflush(stdin);
  while (gets(number) != NULL) {
    char *outputString = (char *)malloc(sizeof(char));
    *outputString = '\0';
    BanglaNumber(number, &outputString, "", 2);
    while (number[0] != '\0') {
      BanglaNumber(number, &outputString, " shata ", 1);
      BanglaNumber(number, &outputString, " hajar ", 2);
      BanglaNumber(number, &outputString, " lakh ", 2);
      BanglaNumber(number, &outputString, " kuti ", 2);
    }
    printf("%d. %s\n", ++testCaseTimes, outputString);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x28(%rbp)
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
call   1070 <fflush@plt>
lea    -0x1f(%rbp),%rdi
call   1050 <gets@plt>
cmp    $0x0,%rax
je     1254 <main+0x104>
mov    $0x1,%edi
call   1060 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x1f(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    0xe72(%rip),%rdx
mov    $0x2,%ecx
call   1040 <BanglaNumber@plt>
movsbl -0x1f(%rbp),%eax
cmp    $0x0,%eax
je     1233 <main+0xe3>
lea    -0x1f(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    0xe27(%rip),%rdx
mov    $0x1,%ecx
call   1040 <BanglaNumber@plt>
lea    -0x1f(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    0xe16(%rip),%rdx
mov    $0x2,%ecx
call   1040 <BanglaNumber@plt>
lea    -0x1f(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    0xe05(%rip),%rdx
mov    $0x2,%ecx
call   1040 <BanglaNumber@plt>
lea    -0x1f(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    0xdf3(%rip),%rdx
mov    $0x2,%ecx
call   1040 <BanglaNumber@plt>
jmp    11bd <main+0x6d>
mov    -0x28(%rbp),%rsi
add    $0x1,%rsi
mov    %rsi,-0x28(%rbp)
mov    -0x30(%rbp),%rdx
lea    0xdd4(%rip),%rdi
call   1030 <printf@plt>
jmp    117c <main+0x2c>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
call   1070 <fflush@plt>
lea    0x19(%rsp),%rdi
call   1050 <gets@plt>
test   %rax,%rax
je     1255 <main+0x105>
xor    %eax,%eax
mov    %rax,0x8(%rsp)
lea    0x19(%rsp),%rbx
lea    0x10(%rsp),%r12
lea    0xe69(%rip),%rbp
lea    0xe6a(%rip),%r14
lea    0xe6b(%rip),%r13
lea    0xe6b(%rip),%r15
jmp    11dc <main+0x8c>
xchg   %ax,%ax
mov    0x8(%rsp),%rsi
add    $0x1,%rsi
mov    0x10(%rsp),%rdx
lea    0xe59(%rip),%rdi
mov    %rsi,0x8(%rsp)
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1050 <gets@plt>
test   %rax,%rax
je     1255 <main+0x105>
mov    $0x1,%edi
call   1060 <malloc@plt>
mov    %rax,0x10(%rsp)
movb   $0x0,(%rax)
mov    %rbx,%rdi
mov    %r12,%rsi
lea    0xe2a(%rip),%rdx
nopl   0x0(%rax,%rax,1)
mov    $0x2,%ecx
call   1040 <BanglaNumber@plt>
cmpb   $0x0,0x19(%rsp)
je     11b0 <main+0x60>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %rbp,%rdx
mov    $0x1,%ecx
call   1040 <BanglaNumber@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r14,%rdx
mov    $0x2,%ecx
call   1040 <BanglaNumber@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    $0x2,%ecx
call   1040 <BanglaNumber@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
jmp    1200 <main+0xb0>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [8 x i8] c" shata \00"
@.str.2 = [8 x i8] c" hajar \00"
@.str.3 = [7 x i8] c" lakh \00"
@.str.4 = [7 x i8] c" kuti \00"
@.str.5 = [8 x i8] c"%d. %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [15 x i8]
%7 = alloca i64
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* %7
%9 = load i32, i32* @stdin
%10 = call i32 @fflush(i32 %9)
br label %11
11: ; preds = %35, %2
%12 = getelementptr inbounds [15 x i8], [15 x i8]* %6, i64 0, i64 0
%13 = call i32* @gets(i8* %12)
%14 = icmp ne i32* %13, null
br i1 %14, label %15, label %40
15: ; preds = %11
%16 = call i64 @malloc(i32 1)
%17 = inttoptr i64 %16 to i8*
store i8* %17, i8** %8
%18 = load i8*, i8** %8
store i8 0, i8* %18
%19 = getelementptr inbounds [15 x i8], [15 x i8]* %6, i64 0, i64 0
%20 = call i32 @BanglaNumber(i8* %19, i8** %8, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 2)
br label %21
21: ; preds = %26, %15
%22 = getelementptr inbounds [15 x i8], [15 x i8]* %6, i64 0, i64 0
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %35
26: ; preds = %21
%27 = getelementptr inbounds [15 x i8], [15 x i8]* %6, i64 0, i64 0
%28 = call i32 @BanglaNumber(i8* %27, i8** %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 1)
%29 = getelementptr inbounds [15 x i8], [15 x i8]* %6, i64 0, i64 0
%30 = call i32 @BanglaNumber(i8* %29, i8** %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 2)
%31 = getelementptr inbounds [15 x i8], [15 x i8]* %6, i64 0, i64 0
%32 = call i32 @BanglaNumber(i8* %31, i8** %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 2)
%33 = getelementptr inbounds [15 x i8], [15 x i8]* %6, i64 0, i64 0
%34 = call i32 @BanglaNumber(i8* %33, i8** %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 2)
br label %21
35: ; preds = %21
%36 = load i64, i64* %7
%37 = add i64 %36, 1
store i64 %37, i64* %7
%38 = load i8*, i8** %8
%39 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i64 %37, i8* %38)
br label %11
40: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [8 x i8] c" shata \00"
@.str.2 = [8 x i8] c" hajar \00"
@.str.3 = [7 x i8] c" lakh \00"
@.str.4 = [7 x i8] c" kuti \00"
@.str.5 = [8 x i8] c"%d. %s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [15 x i8]
%4 = alloca i8*
%5 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%6 = load i32, i32* @stdin
%7 = tail call i32 @fflush(i32 %6)
%8 = call i32* @gets(i8* %5)
%9 = icmp eq i32* %8, null
br i1 %9, label %32, label %10
10: ; preds = %2
%11 = bitcast i8** %4 to i8*
br label %12
12: ; preds = %10, %26
%13 = phi i64 [ 0, %10 ], [ %27, %26 ]
%14 = call i64 @malloc(i32 1)
%15 = inttoptr i64 %14 to i8*
store i8* %15, i8** %4
store i8 0, i8* %15
%16 = call i32 @BanglaNumber(i8* %5, i8** %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 2)
%17 = load i8, i8* %5
%18 = icmp eq i8 %17, 0
br i1 %18, label %26, label %19
19: ; preds = %12, %19
%20 = call i32 @BanglaNumber(i8* %5, i8** %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 1)
%21 = call i32 @BanglaNumber(i8* %5, i8** %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 2)
%22 = call i32 @BanglaNumber(i8* %5, i8** %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 2)
%23 = call i32 @BanglaNumber(i8* %5, i8** %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 2)
%24 = load i8, i8* %5
%25 = icmp eq i8 %24, 0
br i1 %25, label %26, label %19
26: ; preds = %19, %12
%27 = add i64 %13, 1
%28 = load i8*, i8** %4
%29 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i64 %27, i8* %28)
%30 = call i32* @gets(i8* %5)
%31 = icmp eq i32* %30, null
br i1 %31, label %32, label %12
32: ; preds = %26, %2
ret i32 0
}