int test_jnxstack() {
  jnx_log(0,
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/AlexsJones/jnxlibc/refs/heads/master/test/"
          "unit/test_jnxstack.c",
          __FUNCTION__, 73, "Running stack tests...");
  ;
  test_stack_grow();
  test_stack_pop();
  test_contains();
  jnx_log(0,
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/AlexsJones/jnxlibc/refs/heads/master/test/"
          "unit/test_jnxstack.c",
          __FUNCTION__, 77, "Stack tests completed.");
  ;
  return 0;
}


x86 assembly (clang, -O0):
<test_jnxstack>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xeb3(%rip),%rsi
lea    0xf45(%rip),%rdx
mov    $0x49,%ecx
lea    0xf47(%rip),%r8
mov    $0x0,%al
call   1040 <jnx_log@plt>
mov    $0x0,%al
call   1030 <test_stack_grow@plt>
mov    $0x0,%al
call   1060 <test_stack_pop@plt>
mov    $0x0,%al
call   1050 <test_contains@plt>
xor    %edi,%edi
lea    0xe7b(%rip),%rsi
lea    0xf0d(%rip),%rdx
mov    $0x4d,%ecx
lea    0xf26(%rip),%r8
mov    $0x0,%al
call   1040 <jnx_log@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_jnxstack>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%rbx
lea    0xf47(%rip),%r14
lea    0xf4e(%rip),%r8
xor    %edi,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0x49,%ecx
xor    %eax,%eax
call   1040 <jnx_log@plt>
xor    %eax,%eax
call   1030 <test_stack_grow@plt>
xor    %eax,%eax
call   1060 <test_stack_pop@plt>
xor    %eax,%eax
call   1050 <test_contains@plt>
lea    0xf35(%rip),%r8
xor    %edi,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0x4d,%ecx
xor    %eax,%eax
call   1040 <jnx_log@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AlexsJones/jnxlibc/refs/heads/master/test/unit/test_jnxstack.c\00"
@__FUNCTION__.test_jnxstack = [14 x i8] c"test_jnxstack\00"
@.str.1 = [23 x i8] c"Running stack tests...\00"
@.str.2 = [23 x i8] c"Stack tests completed.\00"
define i32 @test_jnxstack() {
%1 = call i32 (i32, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @jnx_log to i32 (i32, i8*, i8*, i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.test_jnxstack, i64 0, i64 0), i32 73, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (...) @test_stack_grow()
%3 = call i32 (...) @test_stack_pop()
%4 = call i32 (...) @test_contains()
%5 = call i32 (i32, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @jnx_log to i32 (i32, i8*, i8*, i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.test_jnxstack, i64 0, i64 0), i32 77, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AlexsJones/jnxlibc/refs/heads/master/test/unit/test_jnxstack.c\00"
@__FUNCTION__.test_jnxstack = [14 x i8] c"test_jnxstack\00"
@.str.1 = [23 x i8] c"Running stack tests...\00"
@.str.2 = [23 x i8] c"Stack tests completed.\00"
define i32 @test_jnxstack() {
%1 = tail call i32 (i32, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @jnx_log to i32 (i32, i8*, i8*, i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.test_jnxstack, i64 0, i64 0), i32 73, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @test_stack_grow()
%3 = tail call i32 (...) @test_stack_pop()
%4 = tail call i32 (...) @test_contains()
%5 = tail call i32 (i32, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @jnx_log to i32 (i32, i8*, i8*, i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.test_jnxstack, i64 0, i64 0), i32 77, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}