#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*/ __wrap_write(int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void _start(void) {
  volatile int x = 0;
  while (++x < 65000)
    ;
  {
    volatile int z1, z2, z3;
    z1 += z2 * z3;
  }
  __wrap_write(1, "hi there\n", strlen("hi there\n"));
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0xfde8,%eax
jge    1148 <_start+0x28>
jmp    112f <_start+0xf>
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%eax
imul   %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
lea    0xea0(%rip),%rdi
call   1030 <strlen@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xe8d(%rip),%rsi
call   1040 <__wrap_write@plt>
jmp    1178 <_start+0x58>

x86 assembly (clang, -O2):
<_start>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,(%rsp)
nopl   0x0(%rax)
mov    (%rsp),%eax
lea    0x1(%rax),%ecx
mov    %ecx,(%rsp)
cmp    $0xfde7,%eax
jl     1130 <_start+0x10>
mov    0x8(%rsp),%eax
imul   0x4(%rsp),%eax
add    %eax,0xc(%rsp)
lea    0xeac(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <__wrap_write@plt>
nopl   0x0(%rax,%rax,1)
jmp    1170 <_start+0x50>

LLVM IR (-O0):
@.str = [10 x i8] c"hi there\0A\00"
define void @_start() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store volatile i32 0, i32* %1
br label %5
5: ; preds = %9, %0
%6 = load volatile i32, i32* %1
%7 = add nsw i32 %6, 1
store volatile i32 %7, i32* %1
%8 = icmp slt i32 %7, 65000
br i1 %8, label %9, label %10
9: ; preds = %5
br label %5
10: ; preds = %5
%11 = load volatile i32, i32* %3
%12 = load volatile i32, i32* %4
%13 = mul nsw i32 %11, %12
%14 = load volatile i32, i32* %2
%15 = add nsw i32 %14, %13
store volatile i32 %15, i32* %2
%16 = call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%17 = call i32 @__wrap_write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %18, %10
br label %18
}

LLVM IR (-O2):
@.str = [10 x i8] c"hi there\0A\00"
define void @_start() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
store volatile i32 0, i32* %1
br label %6
6: ; preds = %6, %0
%7 = load volatile i32, i32* %1
%8 = add nsw i32 %7, 1
store volatile i32 %8, i32* %1
%9 = icmp slt i32 %7, 64999
br i1 %9, label %6, label %10
10: ; preds = %6
%11 = bitcast i32* %2 to i8*
%12 = bitcast i32* %3 to i8*
%13 = bitcast i32* %4 to i8*
%14 = load volatile i32, i32* %3
%15 = load volatile i32, i32* %4
%16 = mul nsw i32 %15, %14
%17 = load volatile i32, i32* %2
%18 = add nsw i32 %17, %16
store volatile i32 %18, i32* %2
%19 = tail call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%20 = tail call i32 @__wrap_write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %21, %10
br label %21
}