#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*/ Rfree(char *, char *);
char *Rstrdup(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void Test1(void) {
  char *str =
      Rstrdup(("01"), "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                      "outputs/2022-01-22/02-19-57/repos/Tathar/roclick/refs/"
                      "heads/master/src/rmalloc/rtest.c"
                      ":"
                      "142");
  strcpy(str, "012");
  Rfree((str), "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/Tathar/roclick/refs/heads/"
               "master/src/rmalloc/rtest.c"
               ":"
               "144");
}


x86 assembly (clang, -O0):
<Test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xebd(%rip),%rsi
call   1050 <Rstrdup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xf3c(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
lea    0xf30(%rip),%rsi
call   1040 <Rfree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Test1>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xec4(%rip),%rsi
call   1050 <Rstrdup@plt>
mov    %rax,%rbx
lea    0xf48(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
lea    0xf3d(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <Rfree@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"01\00"
@.str.1 = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Tathar/roclick/refs/heads/master/src/rmalloc/rtest.c:142\00"
@.str.2 = [4 x i8] c"012\00"
@.str.3 = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Tathar/roclick/refs/heads/master/src/rmalloc/rtest.c:144\00"
define void @Test1() {
%1 = alloca i8*
%2 = call i8* @Rstrdup(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%5 = load i8*, i8** %1
%6 = call i32 @Rfree(i8* %5, i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"01\00"
@.str.1 = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Tathar/roclick/refs/heads/master/src/rmalloc/rtest.c:142\00"
@.str.2 = [4 x i8] c"012\00"
@.str.3 = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Tathar/roclick/refs/heads/master/src/rmalloc/rtest.c:144\00"
define void @Test1() {
%1 = tail call i8* @Rstrdup(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @Rfree(i8* %1, i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str.3, i64 0, i64 0))
ret void
}