#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*/ ctest_assert_fmt(int, char *, int, char *, char *, char *,
                                    char *, char *, long, char *, long);
int nested_assert() {
  do {
    long xv = (12);
    long yv = (12);
    ctest_assert_fmt(
        xv == yv,
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/bronson/ctest/refs/heads/master/ctassert.c",
        345,
        "%s %s %s with %s="
        "%l"
        "d"
        " and %s="
        "%l"
        "d",
        "12", "==", "12", "12", xv, "12", yv);
  } while (0);
  return 42;
}


x86 assembly (clang, -O0):
<nested_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movq   $0xc,-0x8(%rbp)
movq   $0xc,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    -0x8(%rbp),%r11
mov    -0x10(%rbp),%rax
lea    0xeb9(%rip),%rsi
mov    $0x159,%edx
lea    0xf32(%rip),%rcx
lea    0xf4b(%rip),%r10
lea    0xf47(%rip),%r9
mov    %r10,%r8
mov    %r10,(%rsp)
mov    %r10,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
call   1030 <ctest_assert_fmt@plt>
mov    $0x2a,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nested_assert>:
push   %rax
sub    $0x8,%rsp
lea    0xf89(%rip),%r8
lea    0xedd(%rip),%rsi
lea    0xf5b(%rip),%rcx
lea    0xf77(%rip),%r9
mov    $0x1,%edi
mov    $0x159,%edx
push   $0xc
push   %r8
push   $0xc
push   %r8
push   %r8
call   1030 <ctest_assert_fmt@plt>
add    $0x30,%rsp
mov    $0x2a,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bronson/ctest/refs/heads/master/ctassert.c\00"
@.str.1 = [32 x i8] c"%s %s %s with %s=%ld and %s=%ld\00"
@.str.2 = [3 x i8] c"12\00"
@.str.3 = [3 x i8] c"==\00"
define i32 @nested_assert() {
%1 = alloca i64
%2 = alloca i64
br label %3
3: ; preds = %0
store i64 12, i64* %1
store i64 12, i64* %2
%4 = load i64, i64* %1
%5 = load i64, i64* %2
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
%8 = load i64, i64* %1
%9 = load i64, i64* %2
%10 = call i32 @ctest_assert_fmt(i32 %7, i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 345, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i64 %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i64 %9)
br label %11
11: ; preds = %3
ret i32 42
}

LLVM IR (-O2):
@.str = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bronson/ctest/refs/heads/master/ctassert.c\00"
@.str.1 = [32 x i8] c"%s %s %s with %s=%ld and %s=%ld\00"
@.str.2 = [3 x i8] c"12\00"
@.str.3 = [3 x i8] c"==\00"
define i32 @nested_assert() {
%1 = tail call i32 @ctest_assert_fmt(i32 1, i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 345, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i64 12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i64 12)
ret i32 42
}