#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*/ moveForward(double);
int /*<<< orphan*/ setHost(char *);
int /*<<< orphan*/ setPermission(char *);
int /*<<< orphan*/ sleep(double);
int /*<<< orphan*/ turn(int);
int main(void) {
  char temp_base_url[64] = "http://somehost:someport/verb?";
  char permissions[64] = "&id=somevalue";
  int loopCounter = 0;
  setHost(temp_base_url);
  setPermission(permissions);
  while (1) {
    for (loopCounter = 0; loopCounter < 500; loopCounter++) {
      turn(-9);
      sleep(.1);
    }
    for (loopCounter = 0; loopCounter < 1000; loopCounter++) {
      moveForward(-.1);
      sleep(.1);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xe93(%rip),%rsi
mov    $0x40,%edx
call   1070 <memcpy@plt>
lea    -0x90(%rbp),%rdi
lea    0xebb(%rip),%rsi
mov    $0x40,%edx
call   1070 <memcpy@plt>
movl   $0x0,-0x94(%rbp)
lea    -0x50(%rbp),%rdi
call   1040 <setHost@plt>
lea    -0x90(%rbp),%rdi
call   1030 <setPermission@plt>
movl   $0x0,-0x94(%rbp)
cmpl   $0x1f4,-0x94(%rbp)
jge    1203 <main+0xa3>
mov    $0xfffffff7,%edi
call   1050 <turn@plt>
movsd  0xe16(%rip),%xmm0
call   1080 <sleep@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    11c8 <main+0x68>
movl   $0x0,-0x94(%rbp)
cmpl   $0x3e8,-0x94(%rbp)
jge    124b <main+0xeb>
movsd  0xde3(%rip),%xmm0
call   1060 <moveForward@plt>
movsd  0xdce(%rip),%xmm0
call   1080 <sleep@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    120d <main+0xad>
jmp    11be <main+0x5e>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xea9(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xe8d(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xef1(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe9d(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x40(%rsp),%rdi
call   1040 <setHost@plt>
mov    %rsp,%rdi
call   1030 <setPermission@plt>
nopl   0x0(%rax)
xor    %ebx,%ebx
mov    $0xfffffff7,%edi
call   1050 <turn@plt>
movsd  0xe1c(%rip),%xmm0
call   1070 <sleep@plt>
add    $0x1,%ebx
cmp    $0x1f4,%ebx
jne    11d2 <main+0x82>
mov    $0x3e8,%ebx
nopl   0x0(%rax)
movsd  0xe00(%rip),%xmm0
call   1060 <moveForward@plt>
movsd  0xdeb(%rip),%xmm0
call   1070 <sleep@plt>
add    $0xffffffff,%ebx
jne    1200 <main+0xb0>
jmp    11d0 <main+0x80>

LLVM IR (-O0):
@__const.main.temp_base_url = [64 x i8] c"http://somehost:someport/verb?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.permissions = [64 x i8] c"&id=somevalue\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x i8]
%3 = alloca [64 x i8]
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [64 x i8]* %2 to i8*
%6 = bitcast [64 x i8]* %3 to i8*
store i32 0, i32* %4
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%8 = call i32 @setHost(i8* %7)
%9 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%10 = call i32 @setPermission(i8* %9)
br label %11
11: ; preds = %0, %31
store i32 0, i32* %4
br label %12
12: ; preds = %18, %11
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 500
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = call i32 @turn(i32 -9)
%17 = call i32 @sleep(double 1.000000e-01)
br label %18
18: ; preds = %15
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %12
21: ; preds = %12
store i32 0, i32* %4
br label %22
22: ; preds = %28, %21
%23 = load i32, i32* %4
%24 = icmp slt i32 %23, 1000
br i1 %24, label %25, label %31
25: ; preds = %22
%26 = call i32 @moveForward(double -1.000000e-01)
%27 = call i32 @sleep(double 1.000000e-01)
br label %28
28: ; preds = %25
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
store i32 %30, i32* %4
br label %22
31: ; preds = %22
br label %11
}

LLVM IR (-O2):
@__const.main.temp_base_url = [64 x i8] c"http://somehost:someport/verb?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.permissions = [64 x i8] c"&id=somevalue\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main() {
%1 = alloca [64 x i8]
%2 = alloca [64 x i8]
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%5 = call i32 @setHost(i8* %3)
%6 = call i32 @setPermission(i8* %4)
br label %7
7: ; preds = %13, %0
%8 = phi i32 [ 0, %0 ], [ %14, %13 ]
%9 = call i32 @turn(i32 -9)
%10 = call i32 @sleep(double 1.000000e-01)
%11 = add nuw nsw i32 %8, 1
%12 = icmp eq i32 %11, 500
br i1 %12, label %15, label %13
13: ; preds = %15, %7
%14 = phi i32 [ %11, %7 ], [ 0, %15 ]
br label %7
15: ; preds = %7, %15
%16 = phi i32 [ %19, %15 ], [ 0, %7 ]
%17 = call i32 @moveForward(double -1.000000e-01)
%18 = call i32 @sleep(double 1.000000e-01)
%19 = add nuw nsw i32 %16, 1
%20 = icmp eq i32 %19, 1000
br i1 %20, label %13, label %15
}