#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*/ fexpect(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ fexpectf(char *, int, double, int /*<<< orphan*/);
int /*<<< orphan*/ print(char *);
void testmain() {
  print("statement expression");
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/input/8cc/"
          "stmtexpr.c",
          8, 3, ({
            1;
            2;
            3;
          }));
  ;
  fexpectf("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/input/8cc/"
           "stmtexpr.c",
           9, 3.0, ({
             1;
             2;
             3.0;
           }));
  ;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/input/8cc/"
          "stmtexpr.c",
          10, 5, ({
            int a = 5;
            a;
          }));
  ;
}


x86 assembly (clang, -O0):
<testmain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec9(%rip),%rdi
call   1030 <print@plt>
movl   $0x3,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xec8(%rip),%rdi
mov    $0x8,%esi
mov    $0x3,%edx
call   1040 <fexpect@plt>
movsd  0xe94(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
cvttsd2si -0x10(%rbp),%edx
lea    0xea0(%rip),%rdi
mov    $0x9,%esi
movsd  0xe76(%rip),%xmm0
call   1050 <fexpectf@plt>
movl   $0x5,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%ecx
lea    0xe77(%rip),%rdi
mov    $0xa,%esi
mov    $0x5,%edx
call   1040 <fexpect@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testmain>:
push   %rbx
lea    0xed0(%rip),%rdi
call   1030 <print@plt>
lea    0xed9(%rip),%rbx
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x3,%edx
mov    $0x3,%ecx
call   1040 <fexpect@plt>
movsd  0xe9d(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0x3,%edx
call   1050 <fexpectf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x5,%edx
mov    $0x5,%ecx
pop    %rbx
jmp    1040 <fexpect@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"statement expression\00"
@.str.1 = [141 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/input/8cc/stmtexpr.c\00"
define void @testmain() {
%1 = alloca i32
%2 = alloca double
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @print(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
store i32 3, i32* %1
%6 = load i32, i32* %1
%7 = call i32 @fexpect(i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str.1, i64 0, i64 0), i32 8, i32 3, i32 %6)
store double 3.000000e+00, double* %2
%8 = load double, double* %2
%9 = fptosi double %8 to i32
%10 = call i32 @fexpectf(i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str.1, i64 0, i64 0), i32 9, double 3.000000e+00, i32 %9)
store i32 5, i32* %3
%11 = load i32, i32* %3
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = call i32 @fexpect(i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 5, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"statement expression\00"
@.str.1 = [141 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/input/8cc/stmtexpr.c\00"
define void @testmain() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @fexpect(i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str.1, i64 0, i64 0), i32 8, i32 3, i32 3)
%3 = tail call i32 @fexpectf(i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str.1, i64 0, i64 0), i32 9, double 3.000000e+00, i32 3)
%4 = tail call i32 @fexpect(i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 5, i32 5)
ret void
}