#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 buildString(char **, int);
char *device();
int /*<<< orphan*/ eipa_free(void **, int, char *);
testAll() {
  char *deviceStr = device();
  char *str[2] = {"Option -d -- device", deviceStr};
  eipa_free((void **)(&(deviceStr)), 817,
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/WikiDreams/CUDA-SAK/refs/heads/master/"
            "Cuda-SAK/functions.c");
  return buildString(str, 2);
}


x86 assembly (clang, -O0):
<testAll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <device@plt>
mov    %rax,-0x8(%rbp)
lea    0xeb6(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x331,%esi
lea    0xeae(%rip),%rdx
call   1050 <eipa_free@plt>
lea    -0x20(%rbp),%rdi
mov    $0x2,%esi
call   1040 <buildString@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testAll>:
sub    $0x28,%rsp
xor    %eax,%eax
call   1030 <device@plt>
mov    %rax,0x8(%rsp)
lea    0xeb9(%rip),%rcx
mov    %rcx,0x10(%rsp)
mov    %rax,0x18(%rsp)
lea    0xebc(%rip),%rdx
lea    0x8(%rsp),%rdi
mov    $0x331,%esi
call   1050 <eipa_free@plt>
lea    0x10(%rsp),%rdi
mov    $0x2,%esi
call   1040 <buildString@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Option -d -- device\00"
@.str.1 = [149 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/WikiDreams/CUDA-SAK/refs/heads/master/Cuda-SAK/functions.c\00"
define i32 @testAll() {
%1 = alloca i8*
%2 = alloca [2 x i8*]
%3 = call i8* (...) @device()
store i8* %3, i8** %1
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds i8*, i8** %4, i64 1
%6 = load i8*, i8** %1
store i8* %6, i8** %5
%7 = call i32 @eipa_free(i8** %1, i32 817, i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str.1, i64 0, i64 0))
%8 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
%9 = call i32 @buildString(i8** %8, i32 2)
ret i32 %9
}

LLVM IR (-O2):
@.str = [20 x i8] c"Option -d -- device\00"
@.str.1 = [149 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/WikiDreams/CUDA-SAK/refs/heads/master/Cuda-SAK/functions.c\00"
define i32 @testAll() {
%1 = alloca i8*
%2 = alloca [2 x i8*]
%3 = bitcast i8** %1 to i8*
%4 = tail call i8* (...) @device()
store i8* %4, i8** %1
%5 = bitcast [2 x i8*]* %2 to i8*
%6 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 1
store i8* %4, i8** %7
%8 = call i32 @eipa_free(i8** %1, i32 817, i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @buildString(i8** %6, i32 2)
ret i32 %9
}