int mem_test() {
  char test_buf[100];
  int i;
  ((void)((memcmp("abc", "abc", 3) == 0)
              ? 0
              : __test_assert(
                    "memcmp(\"abc\", \"abc\", 3) == 0",
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/gerryg400/anvilos/refs/"
                    "heads/master/src/libc/test/libc_test.c",
                    26, __func__)));
  ((void)((memcmp("abcd", "abc", 3) == 0)
              ? 0
              : __test_assert(
                    "memcmp(\"abcd\", \"abc\", 3) == 0",
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/gerryg400/anvilos/refs/"
                    "heads/master/src/libc/test/libc_test.c",
                    27, __func__)));
  ((void)((memcmp("abc", "abcd", 3) == 0)
              ? 0
              : __test_assert(
                    "memcmp(\"abc\", \"abcd\", 3) == 0",
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/gerryg400/anvilos/refs/"
                    "heads/master/src/libc/test/libc_test.c",
                    28, __func__)));
  ((void)((memcmp("abcd", "abc", 4) == 'd')
              ? 0
              : __test_assert(
                    "memcmp(\"abcd\", \"abc\", 4) == 'd'",
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/gerryg400/anvilos/refs/"
                    "heads/master/src/libc/test/libc_test.c",
                    30, __func__)));
  ((void)((memcmp("abc", "abcd", 4) == -('d'))
              ? 0
              : __test_assert(
                    "memcmp(\"abc\", \"abcd\", 4) == -('d')",
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/gerryg400/anvilos/refs/"
                    "heads/master/src/libc/test/libc_test.c",
                    31, __func__)));
  ((void)((memcmp("abcd", "abce", 4) == -1)
              ? 0
              : __test_assert(
                    "memcmp(\"abcd\", \"abce\", 4) == -1",
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/gerryg400/anvilos/refs/"
                    "heads/master/src/libc/test/libc_test.c",
                    33, __func__)));
  ((void)((memcmp("abce", "abcd", 4) == 1)
              ? 0
              : __test_assert(
                    "memcmp(\"abce\", \"abcd\", 4) == 1",
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/gerryg400/anvilos/refs/"
                    "heads/master/src/libc/test/libc_test.c",
                    34, __func__)));
  return 0;
}


x86 assembly (clang, -O0):
<mem_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    0xede(%rip),%rdi
lea    0xef7(%rip),%rsi
mov    $0x1e,%edx
lea    0xf83(%rip),%rcx
mov    $0x0,%al
call   1030 <__test_assert@plt>
lea    0xf7e(%rip),%rdi
lea    0xed6(%rip),%rsi
mov    $0x1f,%edx
lea    0xf62(%rip),%rcx
mov    $0x0,%al
call   1030 <__test_assert@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_test>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%rdi
lea    0xefe(%rip),%rbx
lea    0xf8f(%rip),%r14
mov    %rbx,%rsi
mov    $0x1e,%edx
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <__test_assert@plt>
lea    0xf7f(%rip),%rdi
mov    %rbx,%rsi
mov    $0x1f,%edx
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <__test_assert@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [32 x i8] c"memcmp(\22abcd\22, \22abc\22, 4) == 'd'\00"
@.str.1 = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/gerryg400/anvilos/refs/heads/master/src/libc/test/libc_test.c\00"
@__func__.mem_test = [9 x i8] c"mem_test\00"
@.str.2 = [35 x i8] c"memcmp(\22abc\22, \22abcd\22, 4) == -('d')\00"
define i32 @mem_test() {
%1 = alloca [100 x i8]
%2 = alloca i32
%3 = call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @__test_assert to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.mem_test, i64 0, i64 0))
%4 = call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @__test_assert to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 31, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.mem_test, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"memcmp(\22abcd\22, \22abc\22, 4) == 'd'\00"
@.str.1 = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/gerryg400/anvilos/refs/heads/master/src/libc/test/libc_test.c\00"
@__func__.mem_test = [9 x i8] c"mem_test\00"
@.str.2 = [35 x i8] c"memcmp(\22abc\22, \22abcd\22, 4) == -('d')\00"
define i32 @mem_test() {
%1 = tail call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @__test_assert to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.mem_test, i64 0, i64 0))
%2 = tail call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @__test_assert to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 31, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.mem_test, i64 0, i64 0))
ret i32 0
}