#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 arrow() {
  struct cell {
    int val;
    struct cell *next;
  };
  struct cell v1 = {5, NULL};
  struct cell v2 = {6, &v1};
  struct cell v3 = {7, &v2};
  struct cell *p = &v3;
  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",
          160, 7, v3.val);
  ;
  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",
          161, 7, p->val);
  ;
  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",
          162, 6, p->next->val);
  ;
  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",
          163, 5, p->next->next->val);
  ;
  p->val = 10;
  p->next->val = 11;
  p->next->next->val = 12;
  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",
          168, 10, p->val);
  ;
  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",
          169, 11, p->next->val);
  ;
  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",
          170, 12, p->next->next->val);
  ;
}


x86 assembly (clang, -O0):
<arrow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x6,-0x20(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x7,-0x30(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%ecx
lea    0xeb2(%rip),%rdi
mov    $0xa0,%esi
mov    $0x7,%edx
call   1030 <fexpect@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%ecx
lea    0xe96(%rip),%rdi
mov    $0xa1,%esi
mov    $0x7,%edx
call   1030 <fexpect@plt>
mov    -0x38(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%ecx
lea    0xe76(%rip),%rdi
mov    $0xa2,%esi
mov    $0x6,%edx
call   1030 <fexpect@plt>
mov    -0x38(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x8(%rax),%rax
mov    (%rax),%ecx
lea    0xe52(%rip),%rdi
mov    $0xa3,%esi
mov    $0x5,%edx
call   1030 <fexpect@plt>
mov    -0x38(%rbp),%rax
movl   $0xa,(%rax)
mov    -0x38(%rbp),%rax
mov    0x8(%rax),%rax
movl   $0xb,(%rax)
mov    -0x38(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x8(%rax),%rax
movl   $0xc,(%rax)
mov    -0x38(%rbp),%rax
mov    (%rax),%ecx
lea    0xe0c(%rip),%rdi
mov    $0xa8,%esi
mov    $0xa,%edx
call   1030 <fexpect@plt>
mov    -0x38(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%ecx
lea    0xdec(%rip),%rdi
mov    $0xa9,%esi
mov    $0xb,%edx
call   1030 <fexpect@plt>
mov    -0x38(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x8(%rax),%rax
mov    (%rax),%ecx
lea    0xdc8(%rip),%rdi
mov    $0xaa,%esi
mov    $0xc,%edx
call   1030 <fexpect@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arrow>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xa0,%esi
mov    $0x7,%edx
mov    $0x7,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xa1,%esi
mov    $0x7,%edx
mov    $0x7,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xa2,%esi
mov    $0x6,%edx
mov    $0x6,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xa3,%esi
mov    $0x5,%edx
mov    $0x5,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xa8,%esi
mov    $0xa,%edx
mov    $0xa,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xa9,%esi
mov    $0xb,%edx
mov    $0xb,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xaa,%esi
mov    $0xc,%edx
mov    $0xc,%ecx
pop    %rbx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
%struct.cell = type { i32, %struct.cell* }
@__const.arrow.v1 = %struct.cell { i32 5, %struct.cell* null }
@.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 @arrow() {
%1 = alloca %struct.cell
%2 = alloca %struct.cell
%3 = alloca %struct.cell
%4 = alloca %struct.cell*
%5 = bitcast %struct.cell* %1 to i8*
%6 = getelementptr inbounds %struct.cell, %struct.cell* %2, i32 0, i32 0
store i32 6, i32* %6
%7 = getelementptr inbounds %struct.cell, %struct.cell* %2, i32 0, i32 1
store %struct.cell* %1, %struct.cell** %7
%8 = getelementptr inbounds %struct.cell, %struct.cell* %3, i32 0, i32 0
store i32 7, i32* %8
%9 = getelementptr inbounds %struct.cell, %struct.cell* %3, i32 0, i32 1
store %struct.cell* %2, %struct.cell** %9
store %struct.cell* %3, %struct.cell** %4
%10 = getelementptr inbounds %struct.cell, %struct.cell* %3, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 160, i32 7, i32 %11)
%13 = load %struct.cell*, %struct.cell** %4
%14 = getelementptr inbounds %struct.cell, %struct.cell* %13, i32 0, i32 0
%15 = load i32, i32* %14
%16 = call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 161, i32 7, i32 %15)
%17 = load %struct.cell*, %struct.cell** %4
%18 = getelementptr inbounds %struct.cell, %struct.cell* %17, i32 0, i32 1
%19 = load %struct.cell*, %struct.cell** %18
%20 = getelementptr inbounds %struct.cell, %struct.cell* %19, i32 0, i32 0
%21 = load i32, i32* %20
%22 = call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 162, i32 6, i32 %21)
%23 = load %struct.cell*, %struct.cell** %4
%24 = getelementptr inbounds %struct.cell, %struct.cell* %23, i32 0, i32 1
%25 = load %struct.cell*, %struct.cell** %24
%26 = getelementptr inbounds %struct.cell, %struct.cell* %25, i32 0, i32 1
%27 = load %struct.cell*, %struct.cell** %26
%28 = getelementptr inbounds %struct.cell, %struct.cell* %27, i32 0, i32 0
%29 = load i32, i32* %28
%30 = call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 163, i32 5, i32 %29)
%31 = load %struct.cell*, %struct.cell** %4
%32 = getelementptr inbounds %struct.cell, %struct.cell* %31, i32 0, i32 0
store i32 10, i32* %32
%33 = load %struct.cell*, %struct.cell** %4
%34 = getelementptr inbounds %struct.cell, %struct.cell* %33, i32 0, i32 1
%35 = load %struct.cell*, %struct.cell** %34
%36 = getelementptr inbounds %struct.cell, %struct.cell* %35, i32 0, i32 0
store i32 11, i32* %36
%37 = load %struct.cell*, %struct.cell** %4
%38 = getelementptr inbounds %struct.cell, %struct.cell* %37, i32 0, i32 1
%39 = load %struct.cell*, %struct.cell** %38
%40 = getelementptr inbounds %struct.cell, %struct.cell* %39, i32 0, i32 1
%41 = load %struct.cell*, %struct.cell** %40
%42 = getelementptr inbounds %struct.cell, %struct.cell* %41, i32 0, i32 0
store i32 12, i32* %42
%43 = load %struct.cell*, %struct.cell** %4
%44 = getelementptr inbounds %struct.cell, %struct.cell* %43, i32 0, i32 0
%45 = load i32, i32* %44
%46 = call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 168, i32 10, i32 %45)
%47 = load %struct.cell*, %struct.cell** %4
%48 = getelementptr inbounds %struct.cell, %struct.cell* %47, i32 0, i32 1
%49 = load %struct.cell*, %struct.cell** %48
%50 = getelementptr inbounds %struct.cell, %struct.cell* %49, i32 0, i32 0
%51 = load i32, i32* %50
%52 = call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 169, i32 11, i32 %51)
%53 = load %struct.cell*, %struct.cell** %4
%54 = getelementptr inbounds %struct.cell, %struct.cell* %53, i32 0, i32 1
%55 = load %struct.cell*, %struct.cell** %54
%56 = getelementptr inbounds %struct.cell, %struct.cell* %55, i32 0, i32 1
%57 = load %struct.cell*, %struct.cell** %56
%58 = getelementptr inbounds %struct.cell, %struct.cell* %57, i32 0, i32 0
%59 = load i32, i32* %58
%60 = call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 170, i32 12, i32 %59)
ret void
}

LLVM IR (-O2):
%struct.cell = type { i32, %struct.cell* }
@.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 @arrow() {
%1 = tail call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 160, i32 7, i32 7)
%2 = tail call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 161, i32 7, i32 7)
%3 = tail call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 162, i32 6, i32 6)
%4 = tail call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 163, i32 5, i32 5)
%5 = tail call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 168, i32 10, i32 10)
%6 = tail call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 169, i32 11, i32 11)
%7 = tail call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 170, i32 12, i32 12)
ret void
}