#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);
void test_nested() {
  struct {
    struct {
      struct {
        int a;
        int b;
      } x;
      struct {
        char c[8];
      } y;
    } w;
  } v = {
      1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
  };
  fexpect(
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/initializer.c",
      64, 1, v.w.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/initializer.c",
      65, 2, v.w.x.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/initializer.c",
      66, 3, v.w.y.c[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/initializer.c",
      67, 10, v.w.y.c[7]);
  ;
}


x86 assembly (clang, -O0):
<test_nested>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%ecx
lea    0xed8(%rip),%rdi
mov    $0x40,%esi
mov    $0x1,%edx
call   1030 <fexpect@plt>
mov    -0xc(%rbp),%ecx
lea    0xebf(%rip),%rdi
mov    $0x41,%esi
mov    $0x2,%edx
call   1030 <fexpect@plt>
movsbl -0x8(%rbp),%ecx
lea    0xea5(%rip),%rdi
mov    $0x42,%esi
mov    $0x3,%edx
call   1030 <fexpect@plt>
movsbl -0x1(%rbp),%ecx
lea    0xe8b(%rip),%rdi
mov    $0x43,%esi
mov    $0xa,%edx
call   1030 <fexpect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_nested>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x40,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x41,%esi
mov    $0x2,%edx
mov    $0x2,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x42,%esi
mov    $0x3,%edx
mov    $0x3,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x43,%esi
mov    $0xa,%edx
mov    $0xa,%ecx
pop    %rbx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
%struct.anon = type { %struct.anon.0 }
%struct.anon.0 = type { %struct.anon.1, %struct.anon.2 }
%struct.anon.1 = type { i32, i32 }
%struct.anon.2 = type { [8 x i8] }
@__const.test_nested.v = %struct.anon { %struct.anon.0 { %struct.anon.1 { i32 1, i32 2 }, %struct.anon.2 { [8 x i8] c"\03\04\05\06\07\08\09\0A" } } }
@.str = [134 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/initializer.c\00"
define void @test_nested() {
%1 = alloca %struct.anon
%2 = bitcast %struct.anon* %1 to i8*
%3 = getelementptr inbounds %struct.anon, %struct.anon* %1, i32 0, i32 0
%4 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %3, i32 0, i32 0
%5 = getelementptr inbounds %struct.anon.1, %struct.anon.1* %4, i32 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 @fexpect(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 64, i32 1, i32 %6)
%8 = getelementptr inbounds %struct.anon, %struct.anon* %1, i32 0, i32 0
%9 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %8, i32 0, i32 0
%10 = getelementptr inbounds %struct.anon.1, %struct.anon.1* %9, i32 0, i32 1
%11 = load i32, i32* %10
%12 = call i32 @fexpect(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 65, i32 2, i32 %11)
%13 = getelementptr inbounds %struct.anon, %struct.anon* %1, i32 0, i32 0
%14 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %13, i32 0, i32 1
%15 = getelementptr inbounds %struct.anon.2, %struct.anon.2* %14, i32 0, i32 0
%16 = getelementptr inbounds [8 x i8], [8 x i8]* %15, i64 0, i64 0
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = call i32 @fexpect(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 66, i32 3, i32 %18)
%20 = getelementptr inbounds %struct.anon, %struct.anon* %1, i32 0, i32 0
%21 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %20, i32 0, i32 1
%22 = getelementptr inbounds %struct.anon.2, %struct.anon.2* %21, i32 0, i32 0
%23 = getelementptr inbounds [8 x i8], [8 x i8]* %22, i64 0, i64 7
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = call i32 @fexpect(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 67, i32 10, i32 %25)
ret void
}

LLVM IR (-O2):
@.str = [134 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/initializer.c\00"
define void @test_nested() {
%1 = tail call i32 @fexpect(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 64, i32 1, i32 1)
%2 = tail call i32 @fexpect(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 65, i32 2, i32 2)
%3 = tail call i32 @fexpect(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 66, i32 3, i32 3)
%4 = tail call i32 @fexpect(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 67, i32 10, i32 10)
ret void
}