#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 */
char *malloc(int);
int /*<<< orphan*/ variableDefineNewVariable(char *);
int *variableReturnVariable(char *);
void setup() {
  char *trueName = malloc(sizeof(char) * 5);
  trueName = "true";
  char *falseName = malloc(sizeof(char) * 6);
  falseName = "false";
  variableDefineNewVariable(trueName);
  variableDefineNewVariable(falseName);
  int *var = variableReturnVariable(trueName);
  *var = 1;
  var = variableReturnVariable(falseName);
  *var = 0;
}


x86 assembly (clang, -O0):
<setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x5,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
lea    0xeb3(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    $0x6,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
lea    0xe9f(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <variableDefineNewVariable@plt>
mov    -0x10(%rbp),%rdi
call   1040 <variableDefineNewVariable@plt>
mov    -0x8(%rbp),%rdi
call   1030 <variableReturnVariable@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <variableReturnVariable@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rbx
mov    %rbx,%rdi
call   1040 <variableDefineNewVariable@plt>
lea    0xecb(%rip),%r14
mov    %r14,%rdi
call   1040 <variableDefineNewVariable@plt>
mov    %rbx,%rdi
call   1030 <variableReturnVariable@plt>
movl   $0x1,(%rax)
mov    %r14,%rdi
call   1030 <variableReturnVariable@plt>
movl   $0x0,(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define void @setup() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i32*
%4 = call i8* @malloc(i32 5)
store i8* %4, i8** %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
%5 = call i8* @malloc(i32 6)
store i8* %5, i8** %2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
%6 = load i8*, i8** %1
%7 = call i32 @variableDefineNewVariable(i8* %6)
%8 = load i8*, i8** %2
%9 = call i32 @variableDefineNewVariable(i8* %8)
%10 = load i8*, i8** %1
%11 = call i32* @variableReturnVariable(i8* %10)
store i32* %11, i32** %3
%12 = load i32*, i32** %3
store i32 1, i32* %12
%13 = load i8*, i8** %2
%14 = call i32* @variableReturnVariable(i8* %13)
store i32* %14, i32** %3
%15 = load i32*, i32** %3
store i32 0, i32* %15
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define void @setup() {
%1 = tail call i32 @variableDefineNewVariable(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @variableDefineNewVariable(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32* @variableReturnVariable(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
%4 = tail call i32* @variableReturnVariable(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %4
ret void
}