#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 atoii(char *);
int /*<<< orphan*/ getchar();
int getline(char *, int);
int /*<<< orphan*/ itoaa(int, char *);
int /*<<< orphan*/ printf(char *, ...);
int strindexx(char *, char *);
int strindexxx(char *, char *);
int strlenn(char *);
int main() {
  int len, num, value, index, indexx;
  value = 22;
  char a[] = "Hola";
  char b[100];
  char c[100];
  char d[] = "hello world";
  char e[] = "wor";
  char f[] = "-12";
  len = strlenn(a);
  printf("%d\n", len);
  printf("Enter string\n");
  num = getline(b, 100);
  printf("%d\n", num);
  itoaa(value, c);
  printf("%s\n", c);
  getchar();
  index = strindexxx(d, e);
  printf("%d\n", index);
  indexx = strindexx(d, e);
  printf("%d\n", indexx);
  getchar();
  printf("%d\n", atoii(f));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x16,-0x10(%rbp)
mov    0xe61(%rip),%eax
mov    %eax,-0x1d(%rbp)
mov    0xe5c(%rip),%al
mov    %al,-0x19(%rbp)
mov    0xe53(%rip),%rax
mov    %rax,-0x10c(%rbp)
mov    0xe4e(%rip),%eax
mov    %eax,-0x104(%rbp)
mov    0xe46(%rip),%eax
mov    %eax,-0x110(%rbp)
mov    0xe3e(%rip),%eax
mov    %eax,-0x114(%rbp)
lea    -0x1d(%rbp),%rdi
call   1080 <strlenn@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe26(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    $0x64,%esi
call   1090 <getline@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xdf3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%edi
lea    -0x100(%rbp),%rsi
call   1060 <itoaa@plt>
lea    -0x100(%rbp),%rsi
lea    0xde1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1070 <getchar@plt>
lea    -0x10c(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   1030 <strindexxx@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xda1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x10c(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   10a0 <strindexx@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xd7a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1070 <getchar@plt>
lea    -0x114(%rbp),%rdi
call   1040 <atoii@plt>
mov    %eax,%esi
lea    0xd57(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x100,%rsp
movb   $0x0,0x4(%rsp)
movl   $0x616c6f48,(%rsp)
movabs $0x6f77206f6c6c6568,%rax
20 77 6f
mov    %rax,0x10(%rsp)
movl   $0x646c72,0x18(%rsp)
movl   $0x726f77,0xc(%rsp)
movl   $0x32312d,0x8(%rsp)
mov    %rsp,%rdi
call   1090 <strlenn@plt>
lea    0xe33(%rip),%r14
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe24(%rip),%rdi
call   1030 <puts@plt>
lea    0x90(%rsp),%rdi
mov    $0x64,%esi
call   10a0 <getline@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x20(%rsp),%rbx
mov    $0x16,%edi
mov    %rbx,%rsi
call   1070 <itoaa@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1080 <getchar@plt>
lea    0x10(%rsp),%rbx
lea    0xc(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strindexxx@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   10b0 <strindexx@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   1080 <getchar@plt>
lea    0x8(%rsp),%rdi
call   1050 <atoii@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.a = [5 x i8] c"Hola\00"
@__const.main.d = [12 x i8] c"hello world\00"
@__const.main.e = [4 x i8] c"wor\00"
@__const.main.f = [4 x i8] c"-12\00"
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [14 x i8] c"Enter string\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [5 x i8]
%8 = alloca [100 x i8]
%9 = alloca [100 x i8]
%10 = alloca [12 x i8]
%11 = alloca [4 x i8]
%12 = alloca [4 x i8]
store i32 0, i32* %1
store i32 22, i32* %4
%13 = bitcast [5 x i8]* %7 to i8*
%14 = bitcast [12 x i8]* %10 to i8*
%15 = bitcast [4 x i8]* %11 to i8*
%16 = bitcast [4 x i8]* %12 to i8*
%17 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%18 = call i32 @strlenn(i8* %17)
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %19)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%22 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%23 = call i32 @getline(i8* %22, i32 100)
store i32 %23, i32* %3
%24 = load i32, i32* %3
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %24)
%26 = load i32, i32* %4
%27 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%28 = call i32 @itoaa(i32 %26, i8* %27)
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %29)
%31 = call i32 (...) @getchar()
%32 = getelementptr inbounds [12 x i8], [12 x i8]* %10, i64 0, i64 0
%33 = getelementptr inbounds [4 x i8], [4 x i8]* %11, i64 0, i64 0
%34 = call i32 @strindexxx(i8* %32, i8* %33)
store i32 %34, i32* %5
%35 = load i32, i32* %5
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %35)
%37 = getelementptr inbounds [12 x i8], [12 x i8]* %10, i64 0, i64 0
%38 = getelementptr inbounds [4 x i8], [4 x i8]* %11, i64 0, i64 0
%39 = call i32 @strindexx(i8* %37, i8* %38)
store i32 %39, i32* %6
%40 = load i32, i32* %6
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %40)
%42 = call i32 (...) @getchar()
%43 = getelementptr inbounds [4 x i8], [4 x i8]* %12, i64 0, i64 0
%44 = call i32 @atoii(i8* %43)
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %44)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [5 x i8] c"Hola\00"
@__const.main.d = [12 x i8] c"hello world\00"
@.str = [4 x i8] c"%d\0A\00"
@str = [13 x i8] c"Enter string\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = alloca [12 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%11 = bitcast i32* %5 to i8*
store i32 7499639, i32* %5
%12 = bitcast i32* %6 to i8*
store i32 3289389, i32* %6
%13 = call i32 @strlenn(i8* %7)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%16 = call i32 @getline(i8* %8, i32 100)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = call i32 @itoaa(i32 22, i8* %9)
%19 = call i32 @puts(i8* %9)
%20 = call i32 (...) @getchar()
%21 = call i32 @strindexxx(i8* %10, i8* %11)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %21)
%23 = call i32 @strindexx(i8* %10, i8* %11)
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = call i32 (...) @getchar()
%26 = call i32 @atoii(i8* %12)
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %26)
ret i32 0
}