#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 main() {
  printf("--------------------Hello World---------------------\n");
  char *str = "hi";
  char *str2 = "hi";
  printf("=> %d\n", str == str2);
  char str3[] = "hi";
  char str4[] = "hi";
  printf("=> %d\n", str3 == str4);
  char const *str5 = "hi";
  char const *str6 = "hi";
  printf("=> %d\n", str5 == str6);
  char *const str7 = "hi";
  char *const str8 = "hi";
  printf("=> %d\n", str5 == str6);
  char const str9[] = "hi";
  char const str10[] = "hi";
  printf("=> %d\n", str9 == str10);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf09(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xefe(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0xed5(%rip),%ax
mov    %ax,-0x13(%rbp)
mov    0xecd(%rip),%al
mov    %al,-0x11(%rbp)
mov    0xec1(%rip),%ax
mov    %ax,-0x16(%rbp)
mov    0xeb9(%rip),%al
mov    %al,-0x14(%rbp)
lea    -0x13(%rbp),%rax
lea    -0x16(%rbp),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8c(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xe81(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe58(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xe4d(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0xe24(%rip),%ax
mov    %ax,-0x3b(%rbp)
mov    0xe1c(%rip),%al
mov    %al,-0x39(%rbp)
mov    0xe10(%rip),%ax
mov    %ax,-0x3e(%rbp)
mov    0xe08(%rip),%al
mov    %al,-0x3c(%rbp)
lea    -0x3b(%rbp),%rax
lea    -0x3e(%rbp),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [54 x i8] c"--------------------Hello World---------------------\0A\00"
@.str.1 = [3 x i8] c"hi\00"
@.str.2 = [7 x i8] c"=> %d\0A\00"
@__const.main.str3 = [3 x i8] c"hi\00"
@__const.main.str4 = [3 x i8] c"hi\00"
@__const.main.str9 = [3 x i8] c"hi\00"
@__const.main.str10 = [3 x i8] c"hi\00"
define i32 @main() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca [3 x i8]
%4 = alloca [3 x i8]
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [3 x i8]
%10 = alloca [3 x i8]
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
%12 = load i8*, i8** %1
%13 = load i8*, i8** %2
%14 = icmp eq i8* %12, %13
%15 = zext i1 %14 to i32
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %15)
%17 = bitcast [3 x i8]* %3 to i8*
%18 = bitcast [3 x i8]* %4 to i8*
%19 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%20 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%21 = icmp eq i8* %19, %20
%22 = zext i1 %21 to i32
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %22)
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %5
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %6
%24 = load i8*, i8** %5
%25 = load i8*, i8** %6
%26 = icmp eq i8* %24, %25
%27 = zext i1 %26 to i32
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %27)
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %8
%29 = load i8*, i8** %5
%30 = load i8*, i8** %6
%31 = icmp eq i8* %29, %30
%32 = zext i1 %31 to i32
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %32)
%34 = bitcast [3 x i8]* %9 to i8*
%35 = bitcast [3 x i8]* %10 to i8*
%36 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 0
%37 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
%38 = icmp eq i8* %36, %37
%39 = zext i1 %38 to i32
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %39)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [7 x i8] c"=> %d\0A\00"
@str = [53 x i8] c"--------------------Hello World---------------------\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 1)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 1)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 1)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 0)
ret i32 0
}