#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*/ printf(char *);
int shr2(int);
int /*<<< orphan*/ sleep(int /*<<< orphan*/);
int main() {
  char *cptr = "String 1";
  int b[2] = {5, 8};
  b[0] = shr2(12);
  b[1] = shr2(17);
  b[0] = 6;
  b[1] = 9;
  printf("message 1\n");
  printf("message 2\n");
  printf("message 3\n");
  sleep(0);
  sleep(0);
  sleep(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    $0xc,%edi
call   1030 <shr2@plt>
mov    %eax,-0x18(%rbp)
mov    $0x11,%edi
call   1030 <shr2@plt>
mov    %eax,-0x14(%rbp)
movl   $0x6,-0x18(%rbp)
movl   $0x9,-0x14(%rbp)
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
lea    0xe83(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <sleep@plt>
xor    %edi,%edi
call   1050 <sleep@plt>
xor    %edi,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc,%edi
call   1040 <shr2@plt>
mov    $0x11,%edi
call   1040 <shr2@plt>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb2(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <sleep@plt>
xor    %edi,%edi
call   1050 <sleep@plt>
xor    %edi,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"String 1\00"
@__const.main.b = [2 x i32] [i32 5, i32 8]
@.str.1 = [11 x i8] c"message 1\0A\00"
@.str.2 = [11 x i8] c"message 2\0A\00"
@.str.3 = [11 x i8] c"message 3\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca [2 x i32]
store i32 0, i32* %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %2
%4 = bitcast [2 x i32]* %3 to i8*
%5 = call i32 @shr2(i32 12)
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
store i32 %5, i32* %6
%7 = call i32 @shr2(i32 17)
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
store i32 %7, i32* %8
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
store i32 6, i32* %9
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
store i32 9, i32* %10
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 @sleep(i32 0)
%15 = call i32 @sleep(i32 0)
%16 = call i32 @sleep(i32 0)
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"message 1\00"
@str.4 = [10 x i8] c"message 2\00"
@str.5 = [10 x i8] c"message 3\00"
define i32 @main() {
%1 = tail call i32 @shr2(i32 12)
%2 = tail call i32 @shr2(i32 17)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.5, i64 0, i64 0))
%6 = tail call i32 @sleep(i32 0)
%7 = tail call i32 @sleep(i32 0)
%8 = tail call i32 @sleep(i32 0)
ret i32 0
}