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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeeb(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xec7(%rip),%rdi
call   1040 <shr1@plt>
xor    %edi,%edi
call   1030 <shr2@plt>
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    0xe82(%rip),%rdi
call   1040 <shr1@plt>
lea    0xe81(%rip),%rdi
call   1040 <shr1@plt>
lea    0xe80(%rip),%rdi
call   1040 <shr1@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee2(%rip),%rdi
call   1040 <shr1@plt>
xor    %edi,%edi
call   1030 <shr2@plt>
mov    $0xc,%edi
call   1030 <shr2@plt>
mov    $0x11,%edi
call   1030 <shr2@plt>
lea    0xeb1(%rip),%rdi
call   1040 <shr1@plt>
lea    0xeb0(%rip),%rdi
call   1040 <shr1@plt>
lea    0xeaf(%rip),%rdi
call   1040 <shr1@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 = [1 x i8] zeroinitializer
@.str.2 = [11 x i8] c"message 1\0A\00"
@.str.3 = [11 x i8] c"message 2\0A\00"
@.str.4 = [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 @shr1(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @shr2(i32 0)
%7 = call i32 @shr2(i32 12)
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
store i32 %7, i32* %8
%9 = call i32 @shr2(i32 17)
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
store i32 %9, i32* %10
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
store i32 6, i32* %11
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
store i32 9, i32* %12
%13 = call i32 @shr1(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @shr1(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @shr1(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

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