#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*/ s_free_(char *, char *, int);
char *s_str_dup_(char *, char *, int);
int /*<<< orphan*/ s_test_str_eq_(char *, char *, char *, char *, int);
void s_str_test_char() {
  char *s = s_str_dup_("hoge",
                       "/scratch/repos/new/home/jordi_armengol_estape/"
                       "c-scraper/outputs/2022-01-22/02-19-57/repos/kujirahand/"
                       "sakuramml-c/refs/heads/master/src/s_str_test.c",
                       22);
  s_test_str_eq_("hoge", s, "s_str_new",
                 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                 "outputs/2022-01-22/02-19-57/repos/kujirahand/sakuramml-c/"
                 "refs/heads/master/src/s_str_test.c",
                 23);
  s_free_(s,
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/kujirahand/sakuramml-c/refs/heads/master/"
          "src/s_str_test.c",
          24);
}


x86 assembly (clang, -O0):
<s_str_test_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xebf(%rip),%rsi
mov    $0x16,%edx
call   1040 <s_str_dup_@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xea1(%rip),%rdi
lea    0xf33(%rip),%rdx
lea    0xe98(%rip),%rcx
mov    $0x17,%r8d
call   1050 <s_test_str_eq_@plt>
mov    -0x8(%rbp),%rdi
lea    0xe82(%rip),%rsi
mov    $0x18,%edx
call   1030 <s_free_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_str_test_char>:
push   %r15
push   %r14
push   %rbx
lea    0xec4(%rip),%r14
lea    0xec2(%rip),%r15
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x16,%edx
call   1040 <s_str_dup_@plt>
mov    %rax,%rbx
lea    0xf3c(%rip),%rdx
mov    %r14,%rdi
mov    %rax,%rsi
mov    %r15,%rcx
mov    $0x17,%r8d
call   1050 <s_test_str_eq_@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x18,%edx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <s_free_@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"hoge\00"
@.str.1 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kujirahand/sakuramml-c/refs/heads/master/src/s_str_test.c\00"
@.str.2 = [10 x i8] c"s_str_new\00"
define void @s_str_test_char() {
%1 = alloca i8*
%2 = call i8* @s_str_dup_(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 22)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @s_test_str_eq_(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 23)
%5 = load i8*, i8** %1
%6 = call i32 @s_free_(i8* %5, i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 24)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"hoge\00"
@.str.1 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kujirahand/sakuramml-c/refs/heads/master/src/s_str_test.c\00"
@.str.2 = [10 x i8] c"s_str_new\00"
define void @s_str_test_char() {
%1 = tail call i8* @s_str_dup_(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 22)
%2 = tail call i32 @s_test_str_eq_(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 23)
%3 = tail call i32 @s_free_(i8* %1, i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 24)
ret void
}