void test_struct() {
  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/"
          "sizeof.c",
          66, 1, sizeof(struct { char a; }));
  ;
  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/"
          "sizeof.c",
          67, 3, sizeof(struct { char a[3]; }));
  ;
  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/"
          "sizeof.c",
          68, 5, sizeof(struct { char a[5]; }));
  ;
  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/"
          "sizeof.c",
          69, 8, sizeof(struct {
            int a;
            char b;
          }));
  ;
  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/"
          "sizeof.c",
          70, 12, sizeof(struct {
            char a;
            int b;
            char c;
          }));
  ;
  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/"
          "sizeof.c",
          71, 24, sizeof(struct {
            char a;
            double b;
            char c;
          }));
  ;
  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/"
          "sizeof.c",
          72, 24, sizeof(struct {
            struct {
              char a;
              double b;
            } x;
            char c;
          }));
  ;
}


x86 assembly (clang, -O0):
<test_struct>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x42,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    $0x0,%al
call   1030 <fexpect@plt>
lea    0xec8(%rip),%rdi
mov    $0x43,%esi
mov    $0x3,%edx
mov    $0x3,%ecx
mov    $0x0,%al
call   1030 <fexpect@plt>
lea    0xeab(%rip),%rdi
mov    $0x44,%esi
mov    $0x5,%edx
mov    $0x5,%ecx
mov    $0x0,%al
call   1030 <fexpect@plt>
lea    0xe8e(%rip),%rdi
mov    $0x45,%esi
mov    $0x8,%edx
mov    $0x8,%ecx
mov    $0x0,%al
call   1030 <fexpect@plt>
lea    0xe71(%rip),%rdi
mov    $0x46,%esi
mov    $0xc,%edx
mov    $0xc,%ecx
mov    $0x0,%al
call   1030 <fexpect@plt>
lea    0xe54(%rip),%rdi
mov    $0x47,%esi
mov    $0x18,%edx
mov    $0x18,%ecx
mov    $0x0,%al
call   1030 <fexpect@plt>
lea    0xe37(%rip),%rdi
mov    $0x48,%esi
mov    $0x18,%edx
mov    $0x18,%ecx
mov    $0x0,%al
call   1030 <fexpect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_struct>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    $0x1,%ecx
mov    %rbx,%rdi
mov    $0x42,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <fexpect@plt>
mov    $0x3,%ecx
mov    %rbx,%rdi
mov    $0x43,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1030 <fexpect@plt>
mov    $0x5,%ecx
mov    %rbx,%rdi
mov    $0x44,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1030 <fexpect@plt>
mov    $0x8,%ecx
mov    %rbx,%rdi
mov    $0x45,%esi
mov    $0x8,%edx
xor    %eax,%eax
call   1030 <fexpect@plt>
mov    $0xc,%ecx
mov    %rbx,%rdi
mov    $0x46,%esi
mov    $0xc,%edx
xor    %eax,%eax
call   1030 <fexpect@plt>
mov    $0x18,%ecx
mov    %rbx,%rdi
mov    $0x47,%esi
mov    $0x18,%edx
xor    %eax,%eax
call   1030 <fexpect@plt>
mov    $0x18,%ecx
mov    %rbx,%rdi
mov    $0x48,%esi
mov    $0x18,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
@.str = [139 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/sizeof.c\00"
define void @test_struct() {
%1 = call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 66, i32 1, i64 1)
%2 = call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 67, i32 3, i64 3)
%3 = call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 68, i32 5, i64 5)
%4 = call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 69, i32 8, i64 8)
%5 = call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 70, i32 12, i64 12)
%6 = call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 71, i32 24, i64 24)
%7 = call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 72, i32 24, i64 24)
ret void
}

LLVM IR (-O2):
@.str = [139 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/sizeof.c\00"
define void @test_struct() {
%1 = tail call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 66, i32 1, i64 1)
%2 = tail call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 67, i32 3, i64 3)
%3 = tail call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 68, i32 5, i64 5)
%4 = tail call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 69, i32 8, i64 8)
%5 = tail call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 70, i32 12, i64 12)
%6 = tail call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 71, i32 24, i64 24)
%7 = tail call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 72, i32 24, i64 24)
ret void
}