#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*/ _assert_int_equal(unsigned long long, unsigned long long,
                                     char *, int);
scalar_t__ add(int, int);
void test_add(void **state) {
  _assert_int_equal(
      ((unsigned long long)((unsigned)(add(3, 3)))),
      ((unsigned long long)((unsigned)(6))),
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/BellerophonMobile/xmp3/refs/heads/master/deps/"
      "cmockery/src/example/calculator_test.c",
      96);
  _assert_int_equal(
      ((unsigned long long)((unsigned)(add(3, -3)))),
      ((unsigned long long)((unsigned)(0))),
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/BellerophonMobile/xmp3/refs/heads/master/deps/"
      "cmockery/src/example/calculator_test.c",
      97);
}


x86 assembly (clang, -O0):
<test_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x3,%esi
mov    %esi,%edi
call   1030 <add@plt>
mov    %eax,%eax
mov    %eax,%edi
mov    $0x6,%esi
lea    0xeb8(%rip),%rdx
mov    $0x60,%ecx
call   1040 <_assert_int_equal@plt>
mov    $0x3,%edi
mov    $0xfffffffd,%esi
call   1030 <add@plt>
mov    %eax,%eax
mov    %eax,%edi
xor    %eax,%eax
mov    %eax,%esi
lea    0xe90(%rip),%rdx
mov    $0x61,%ecx
call   1040 <_assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_add>:
push   %rbx
mov    $0x3,%edi
mov    $0x3,%esi
call   1030 <add@plt>
mov    %eax,%edi
lea    0xec7(%rip),%rbx
mov    $0x6,%esi
mov    %rbx,%rdx
mov    $0x60,%ecx
call   1040 <_assert_int_equal@plt>
mov    $0x3,%edi
mov    $0xfffffffd,%esi
call   1030 <add@plt>
mov    %eax,%edi
xor    %esi,%esi
mov    %rbx,%rdx
mov    $0x61,%ecx
pop    %rbx
jmp    1040 <_assert_int_equal@plt>

LLVM IR (-O0):
@.str = [175 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/BellerophonMobile/xmp3/refs/heads/master/deps/cmockery/src/example/calculator_test.c\00"
define void @test_add(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i64 @add(i32 3, i32 3)
%4 = trunc i64 %3 to i32
%5 = zext i32 %4 to i64
%6 = call i32 @_assert_int_equal(i64 %5, i64 6, i8* getelementptr inbounds ([175 x i8], [175 x i8]* @.str, i64 0, i64 0), i32 96)
%7 = call i64 @add(i32 3, i32 -3)
%8 = trunc i64 %7 to i32
%9 = zext i32 %8 to i64
%10 = call i32 @_assert_int_equal(i64 %9, i64 0, i8* getelementptr inbounds ([175 x i8], [175 x i8]* @.str, i64 0, i64 0), i32 97)
ret void
}

LLVM IR (-O2):
@.str = [175 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/BellerophonMobile/xmp3/refs/heads/master/deps/cmockery/src/example/calculator_test.c\00"
define void @test_add(i8** nocapture readnone %0) {
%2 = tail call i64 @add(i32 3, i32 3)
%3 = and i64 %2, 4294967295
%4 = tail call i32 @_assert_int_equal(i64 %3, i64 6, i8* getelementptr inbounds ([175 x i8], [175 x i8]* @.str, i64 0, i64 0), i32 96)
%5 = tail call i64 @add(i32 3, i32 -3)
%6 = and i64 %5, 4294967295
%7 = tail call i32 @_assert_int_equal(i64 %6, i64 0, i8* getelementptr inbounds ([175 x i8], [175 x i8]* @.str, i64 0, i64 0), i32 97)
ret void
}