void address() {
  struct tag {
    int a;
    struct {
      int b;
    } y;
  } x = {6, 7};
  int *p1 = &x.a;
  int *p2 = &x.y.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/struct.c",
          177, 6, *p1);
  ;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/struct.c",
          178, 7, *p2);
  ;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/struct.c",
          179, 6, *&x.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/struct.c",
          180, 7, *&x.y.b);
  ;
  struct tag *xp = &x;
  int *p3 = &xp->a;
  int *p4 = &xp->y.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/struct.c",
          185, 6, *p3);
  ;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/struct.c",
          186, 7, *p4);
  ;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/struct.c",
          187, 6, *&xp->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/struct.c",
          188, 7, *&xp->y.b);
  ;
}


x86 assembly (clang, -O0):
<address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
lea    0xec4(%rip),%rdi
mov    $0xb1,%esi
mov    $0x6,%edx
mov    $0x0,%al
call   1030 <fexpect@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
lea    0xea6(%rip),%rdi
mov    $0xb2,%esi
mov    $0x7,%edx
mov    $0x0,%al
call   1030 <fexpect@plt>
mov    -0x8(%rbp),%ecx
lea    0xe8b(%rip),%rdi
mov    $0xb3,%esi
mov    $0x6,%edx
mov    $0x0,%al
call   1030 <fexpect@plt>
mov    -0x4(%rbp),%ecx
lea    0xe70(%rip),%rdi
mov    $0xb4,%esi
mov    $0x7,%edx
mov    $0x0,%al
call   1030 <fexpect@plt>
lea    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
lea    0xe36(%rip),%rdi
mov    $0xb9,%esi
mov    $0x6,%edx
mov    $0x0,%al
call   1030 <fexpect@plt>
mov    -0x30(%rbp),%rax
mov    (%rax),%ecx
lea    0xe18(%rip),%rdi
mov    $0xba,%esi
mov    $0x7,%edx
mov    $0x0,%al
call   1030 <fexpect@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
lea    0xdfa(%rip),%rdi
mov    $0xbb,%esi
mov    $0x6,%edx
mov    $0x0,%al
call   1030 <fexpect@plt>
mov    -0x20(%rbp),%rax
mov    0x4(%rax),%ecx
lea    0xddb(%rip),%rdi
mov    $0xbc,%esi
mov    $0x7,%edx
mov    $0x0,%al
call   1030 <fexpect@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<address>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xb1,%esi
mov    $0x6,%edx
mov    $0x6,%ecx
xor    %eax,%eax
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xb2,%esi
mov    $0x7,%edx
mov    $0x7,%ecx
xor    %eax,%eax
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xb3,%esi
mov    $0x6,%edx
mov    $0x6,%ecx
xor    %eax,%eax
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xb4,%esi
mov    $0x7,%edx
mov    $0x7,%ecx
xor    %eax,%eax
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xb9,%esi
mov    $0x6,%edx
mov    $0x6,%ecx
xor    %eax,%eax
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xba,%esi
mov    $0x7,%edx
mov    $0x7,%ecx
xor    %eax,%eax
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xbb,%esi
mov    $0x6,%edx
mov    $0x6,%ecx
xor    %eax,%eax
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xbc,%esi
mov    $0x7,%edx
mov    $0x7,%ecx
xor    %eax,%eax
pop    %rbx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
%struct.tag = type { i32, %struct.anon }
%struct.anon = type { i32 }
@__const.address.x = %struct.tag { i32 6, %struct.anon { i32 7 } }
@.str = [129 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/struct.c\00"
define void @address() {
%1 = alloca %struct.tag
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca %struct.tag*
%5 = alloca i32*
%6 = alloca i32*
%7 = bitcast %struct.tag* %1 to i8*
%8 = getelementptr inbounds %struct.tag, %struct.tag* %1, i32 0, i32 0
store i32* %8, i32** %2
%9 = getelementptr inbounds %struct.tag, %struct.tag* %1, i32 0, i32 1
%10 = getelementptr inbounds %struct.anon, %struct.anon* %9, i32 0, i32 0
store i32* %10, i32** %3
%11 = load i32*, i32** %2
%12 = load i32, i32* %11
%13 = call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 177, i32 6, i32 %12)
%14 = load i32*, i32** %3
%15 = load i32, i32* %14
%16 = call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 178, i32 7, i32 %15)
%17 = getelementptr inbounds %struct.tag, %struct.tag* %1, i32 0, i32 0
%18 = load i32, i32* %17
%19 = call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 179, i32 6, i32 %18)
%20 = getelementptr inbounds %struct.tag, %struct.tag* %1, i32 0, i32 1
%21 = getelementptr inbounds %struct.anon, %struct.anon* %20, i32 0, i32 0
%22 = load i32, i32* %21
%23 = call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 180, i32 7, i32 %22)
store %struct.tag* %1, %struct.tag** %4
%24 = load %struct.tag*, %struct.tag** %4
%25 = getelementptr inbounds %struct.tag, %struct.tag* %24, i32 0, i32 0
store i32* %25, i32** %5
%26 = load %struct.tag*, %struct.tag** %4
%27 = getelementptr inbounds %struct.tag, %struct.tag* %26, i32 0, i32 1
%28 = getelementptr inbounds %struct.anon, %struct.anon* %27, i32 0, i32 0
store i32* %28, i32** %6
%29 = load i32*, i32** %5
%30 = load i32, i32* %29
%31 = call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 185, i32 6, i32 %30)
%32 = load i32*, i32** %6
%33 = load i32, i32* %32
%34 = call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 186, i32 7, i32 %33)
%35 = load %struct.tag*, %struct.tag** %4
%36 = getelementptr inbounds %struct.tag, %struct.tag* %35, i32 0, i32 0
%37 = load i32, i32* %36
%38 = call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 187, i32 6, i32 %37)
%39 = load %struct.tag*, %struct.tag** %4
%40 = getelementptr inbounds %struct.tag, %struct.tag* %39, i32 0, i32 1
%41 = getelementptr inbounds %struct.anon, %struct.anon* %40, i32 0, i32 0
%42 = load i32, i32* %41
%43 = call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 188, i32 7, i32 %42)
ret void
}

LLVM IR (-O2):
%struct.tag = type { i32, %struct.anon }
%struct.anon = type { i32 }
@.str = [129 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/struct.c\00"
define void @address() {
%1 = tail call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 177, i32 6, i32 6)
%2 = tail call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 178, i32 7, i32 7)
%3 = tail call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 179, i32 6, i32 6)
%4 = tail call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 180, i32 7, i32 7)
%5 = tail call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 185, i32 6, i32 6)
%6 = tail call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 186, i32 7, i32 7)
%7 = tail call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 187, i32 6, i32 6)
%8 = tail call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 188, i32 7, i32 7)
ret void
}