#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*/ SYS_exit;
int /*<<< orphan*/ SYS_write;
int /*<<< orphan*/ bye(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ hello(int, char *, int, int /*<<< orphan*/);
void main() {
  int i;
  for (i = 0; i < 16; i++) {
    hello(1, "Hello World from arm world\n",
          sizeof("Hello World from arm world\n"), SYS_write);
  }
  bye(0, SYS_exit);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1166 <main+0x46>
mov    0x2ea0(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%edi
lea    0xeb2(%rip),%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <main+0xf>
mov    0x2e7b(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
call   1040 <bye@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2eb5(%rip),%r14
mov    (%r14),%ecx
lea    0xecb(%rip),%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    (%r14),%ecx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    (%r14),%ecx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    (%r14),%ecx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    (%r14),%ecx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    (%r14),%ecx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    (%r14),%ecx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    (%r14),%ecx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    (%r14),%ecx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    (%r14),%ecx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    (%r14),%ecx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    (%r14),%ecx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    (%r14),%ecx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    (%r14),%ecx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    (%r14),%ecx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    (%r14),%ecx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1c,%edx
call   1030 <hello@plt>
mov    0x2d5f(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <bye@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Hello World from arm world\0A\00"
@SYS_write = global i32 0
@SYS_exit = global i32 0
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 16
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* @SYS_write
%7 = call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %6)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
%12 = load i32, i32* @SYS_exit
%13 = call i32 @bye(i32 0, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Hello World from arm world\0A\00"
@SYS_write = global i32 0
@SYS_exit = global i32 0
define void @main() {
%1 = load i32, i32* @SYS_write
%2 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %1)
%3 = load i32, i32* @SYS_write
%4 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %3)
%5 = load i32, i32* @SYS_write
%6 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %5)
%7 = load i32, i32* @SYS_write
%8 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %7)
%9 = load i32, i32* @SYS_write
%10 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %9)
%11 = load i32, i32* @SYS_write
%12 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %11)
%13 = load i32, i32* @SYS_write
%14 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %13)
%15 = load i32, i32* @SYS_write
%16 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %15)
%17 = load i32, i32* @SYS_write
%18 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %17)
%19 = load i32, i32* @SYS_write
%20 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %19)
%21 = load i32, i32* @SYS_write
%22 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %21)
%23 = load i32, i32* @SYS_write
%24 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %23)
%25 = load i32, i32* @SYS_write
%26 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %25)
%27 = load i32, i32* @SYS_write
%28 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %27)
%29 = load i32, i32* @SYS_write
%30 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %29)
%31 = load i32, i32* @SYS_write
%32 = tail call i32 @hello(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 28, i32 %31)
%33 = load i32, i32* @SYS_exit
%34 = tail call i32 @bye(i32 0, i32 %33)
ret void
}