#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*/ do_report(char *, int, int);
int /*<<< orphan*/ erl_init(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ erl_mk_estring(char *, int /*<<< orphan*/);
int /*<<< orphan*/ send_term(int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void t_erl_mk_estring(void) {
  char *string;
  erl_init(NULL, 0);
  string = "madonna";
  send_term(erl_mk_estring(string, strlen(string)));
  string = "Madonna";
  send_term(erl_mk_estring(string, strlen(string)));
  string = "mad donna";
  send_term(erl_mk_estring(string, strlen(string)));
  string = "_madonna_";
  send_term(erl_mk_estring(string, strlen(string)));
  string = "/home/madonna/tour_plan";
  send_term(erl_mk_estring(string, strlen(string)));
  string = "http://www.madonna.com/tour_plan";
  send_term(erl_mk_estring(string, strlen(string)));
  string = "\'madonna\'";
  send_term(erl_mk_estring(string, strlen(string)));
  string = "\"madonna\"";
  send_term(erl_mk_estring(string, strlen(string)));
  string = "\\madonna\\";
  send_term(erl_mk_estring(string, strlen(string)));
  string = "{madonna,21,'mad donna',12}";
  send_term(erl_mk_estring(string, strlen(string)));
  do_report("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/RaimoNiskanen/otp/refs/heads/basho/lib/"
            "erl_interface/test/erl_eterm_SUITE_data/eterm_test.c",
            633, 1);
}


x86 assembly (clang, -O0):
<t_erl_mk_estring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1070 <erl_init@plt>
lea    0xe96(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x58(%rbp),%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xe70(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x50(%rbp),%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xe4a(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x48(%rbp),%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xe26(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x40(%rbp),%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xe02(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xdec(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xddf(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xdbb(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xd97(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xd73(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xd61(%rip),%rdi
mov    $0x279,%esi
mov    $0x1,%edx
call   1040 <do_report@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_erl_mk_estring>:
push   %rbx
xor    %edi,%edi
xor    %esi,%esi
call   1070 <erl_init@plt>
lea    0xe9f(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xe87(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xe6f(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xe59(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xe43(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xe3b(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xe3c(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xe26(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xe10(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xdfa(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <erl_mk_estring@plt>
mov    %eax,%edi
call   1050 <send_term@plt>
lea    0xdf6(%rip),%rdi
mov    $0x279,%esi
mov    $0x1,%edx
pop    %rbx
jmp    1040 <do_report@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"madonna\00"
@.str.1 = [8 x i8] c"Madonna\00"
@.str.2 = [10 x i8] c"mad donna\00"
@.str.3 = [10 x i8] c"_madonna_\00"
@.str.4 = [24 x i8] c"/home/madonna/tour_plan\00"
@.str.5 = [33 x i8] c"http://www.madonna.com/tour_plan\00"
@.str.6 = [10 x i8] c"'madonna'\00"
@.str.7 = [10 x i8] c"\22madonna\22\00"
@.str.8 = [10 x i8] c"\\madonna\\\00"
@.str.9 = [28 x i8] c"{madonna,21,'mad donna',12}\00"
@.str.10 = [182 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/RaimoNiskanen/otp/refs/heads/basho/lib/erl_interface/test/erl_eterm_SUITE_data/eterm_test.c\00"
define void @t_erl_mk_estring() {
%1 = alloca i8*
%2 = call i32 @erl_init(i32* null, i32 0)
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = load i8*, i8** %1
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @erl_mk_estring(i8* %3, i32 %5)
%7 = call i32 @send_term(i32 %6)
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %1
%8 = load i8*, i8** %1
%9 = load i8*, i8** %1
%10 = call i32 @strlen(i8* %9)
%11 = call i32 @erl_mk_estring(i8* %8, i32 %10)
%12 = call i32 @send_term(i32 %11)
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %1
%13 = load i8*, i8** %1
%14 = load i8*, i8** %1
%15 = call i32 @strlen(i8* %14)
%16 = call i32 @erl_mk_estring(i8* %13, i32 %15)
%17 = call i32 @send_term(i32 %16)
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8** %1
%18 = load i8*, i8** %1
%19 = load i8*, i8** %1
%20 = call i32 @strlen(i8* %19)
%21 = call i32 @erl_mk_estring(i8* %18, i32 %20)
%22 = call i32 @send_term(i32 %21)
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i8** %1
%23 = load i8*, i8** %1
%24 = load i8*, i8** %1
%25 = call i32 @strlen(i8* %24)
%26 = call i32 @erl_mk_estring(i8* %23, i32 %25)
%27 = call i32 @send_term(i32 %26)
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i8** %1
%28 = load i8*, i8** %1
%29 = load i8*, i8** %1
%30 = call i32 @strlen(i8* %29)
%31 = call i32 @erl_mk_estring(i8* %28, i32 %30)
%32 = call i32 @send_term(i32 %31)
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8** %1
%33 = load i8*, i8** %1
%34 = load i8*, i8** %1
%35 = call i32 @strlen(i8* %34)
%36 = call i32 @erl_mk_estring(i8* %33, i32 %35)
%37 = call i32 @send_term(i32 %36)
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8** %1
%38 = load i8*, i8** %1
%39 = load i8*, i8** %1
%40 = call i32 @strlen(i8* %39)
%41 = call i32 @erl_mk_estring(i8* %38, i32 %40)
%42 = call i32 @send_term(i32 %41)
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8** %1
%43 = load i8*, i8** %1
%44 = load i8*, i8** %1
%45 = call i32 @strlen(i8* %44)
%46 = call i32 @erl_mk_estring(i8* %43, i32 %45)
%47 = call i32 @send_term(i32 %46)
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i8** %1
%48 = load i8*, i8** %1
%49 = load i8*, i8** %1
%50 = call i32 @strlen(i8* %49)
%51 = call i32 @erl_mk_estring(i8* %48, i32 %50)
%52 = call i32 @send_term(i32 %51)
%53 = call i32 @do_report(i8* getelementptr inbounds ([182 x i8], [182 x i8]* @.str.10, i64 0, i64 0), i32 633, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"madonna\00"
@.str.1 = [8 x i8] c"Madonna\00"
@.str.2 = [10 x i8] c"mad donna\00"
@.str.3 = [10 x i8] c"_madonna_\00"
@.str.4 = [24 x i8] c"/home/madonna/tour_plan\00"
@.str.5 = [33 x i8] c"http://www.madonna.com/tour_plan\00"
@.str.6 = [10 x i8] c"'madonna'\00"
@.str.7 = [10 x i8] c"\22madonna\22\00"
@.str.8 = [10 x i8] c"\\madonna\\\00"
@.str.9 = [28 x i8] c"{madonna,21,'mad donna',12}\00"
@.str.10 = [182 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/RaimoNiskanen/otp/refs/heads/basho/lib/erl_interface/test/erl_eterm_SUITE_data/eterm_test.c\00"
define void @t_erl_mk_estring() {
%1 = tail call i32 @erl_init(i32* null, i32 0)
%2 = tail call i32 @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @erl_mk_estring(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @send_term(i32 %3)
%5 = tail call i32 @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @erl_mk_estring(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = tail call i32 @send_term(i32 %6)
%8 = tail call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%9 = tail call i32 @erl_mk_estring(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = tail call i32 @send_term(i32 %9)
%11 = tail call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%12 = tail call i32 @erl_mk_estring(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %11)
%13 = tail call i32 @send_term(i32 %12)
%14 = tail call i32 @strlen(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%15 = tail call i32 @erl_mk_estring(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %14)
%16 = tail call i32 @send_term(i32 %15)
%17 = tail call i32 @strlen(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%18 = tail call i32 @erl_mk_estring(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 %17)
%19 = tail call i32 @send_term(i32 %18)
%20 = tail call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%21 = tail call i32 @erl_mk_estring(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 %20)
%22 = tail call i32 @send_term(i32 %21)
%23 = tail call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%24 = tail call i32 @erl_mk_estring(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 %23)
%25 = tail call i32 @send_term(i32 %24)
%26 = tail call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%27 = tail call i32 @erl_mk_estring(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 %26)
%28 = tail call i32 @send_term(i32 %27)
%29 = tail call i32 @strlen(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0))
%30 = tail call i32 @erl_mk_estring(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i32 %29)
%31 = tail call i32 @send_term(i32 %30)
%32 = tail call i32 @do_report(i8* getelementptr inbounds ([182 x i8], [182 x i8]* @.str.10, i64 0, i64 0), i32 633, i32 1)
ret void
}