#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*/ printf(char *, char *);
int main() {
  typedef struct player {
    int account;
    char name[20];
    int HP;
    int power;
    int intelligence;
    struct player *next;
  } PLAYER;
  PLAYER pl1 = {1, "a", 1, 1, 1};
  PLAYER pl2 = {2, "b", 2, 2, 2};
  PLAYER pl3 = {3, "c", 3, 3, 3};
  PLAYER *head;
  head = &pl1;
  pl1.next = &pl2;
  pl2.next = &pl3;
  pl3.next = NULL;
  printf("This first playeris %s", head->next->name);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x38(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1040 <memset@plt>
movl   $0x1,-0x38(%rbp)
movb   $0x61,-0x34(%rbp)
movl   $0x1,-0x20(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x1,-0x18(%rbp)
lea    -0x68(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1040 <memset@plt>
movl   $0x2,-0x68(%rbp)
movb   $0x62,-0x64(%rbp)
movl   $0x2,-0x50(%rbp)
movl   $0x2,-0x4c(%rbp)
movl   $0x2,-0x48(%rbp)
lea    -0x98(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1040 <memset@plt>
movl   $0x3,-0x98(%rbp)
movb   $0x63,-0x94(%rbp)
movl   $0x3,-0x80(%rbp)
movl   $0x3,-0x7c(%rbp)
movl   $0x3,-0x78(%rbp)
lea    -0x38(%rbp),%rax
mov    %rax,-0xa0(%rbp)
lea    -0x68(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x98(%rbp),%rax
mov    %rax,-0x40(%rbp)
movq   $0x0,-0x70(%rbp)
mov    -0xa0(%rbp),%rax
mov    0x28(%rax),%rsi
add    $0x4,%rsi
lea    0xdf9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x20(%rsp)
movl   $0x2,(%rsp)
lea    0x4(%rsp),%rsi
movb   $0x62,0x4(%rsp)
movabs $0x200000002,%rax
mov    %rax,0x18(%rsp)
movl   $0x2,0x20(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x50(%rsp)
movl   $0x3,0x30(%rsp)
movb   $0x63,0x34(%rsp)
movabs $0x300000003,%rax
mov    %rax,0x48(%rsp)
movl   $0x3,0x50(%rsp)
lea    0x30(%rsp),%rax
mov    %rax,0x28(%rsp)
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
ret

LLVM IR (-O0):
%struct.player = type { i32, [20 x i8], i32, i32, i32, %struct.player* }
@.str = [23 x i8] c"This first playeris %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.player
%3 = alloca %struct.player
%4 = alloca %struct.player
%5 = alloca %struct.player*
store i32 0, i32* %1
%6 = bitcast %struct.player* %2 to i8*
%7 = bitcast i8* %6 to %struct.player*
%8 = getelementptr inbounds %struct.player, %struct.player* %7, i32 0, i32 0
store i32 1, i32* %8
%9 = getelementptr inbounds %struct.player, %struct.player* %7, i32 0, i32 1
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %9, i32 0, i32 0
store i8 97, i8* %10
%11 = getelementptr inbounds %struct.player, %struct.player* %7, i32 0, i32 2
store i32 1, i32* %11
%12 = getelementptr inbounds %struct.player, %struct.player* %7, i32 0, i32 3
store i32 1, i32* %12
%13 = getelementptr inbounds %struct.player, %struct.player* %7, i32 0, i32 4
store i32 1, i32* %13
%14 = bitcast %struct.player* %3 to i8*
%15 = bitcast i8* %14 to %struct.player*
%16 = getelementptr inbounds %struct.player, %struct.player* %15, i32 0, i32 0
store i32 2, i32* %16
%17 = getelementptr inbounds %struct.player, %struct.player* %15, i32 0, i32 1
%18 = getelementptr inbounds [20 x i8], [20 x i8]* %17, i32 0, i32 0
store i8 98, i8* %18
%19 = getelementptr inbounds %struct.player, %struct.player* %15, i32 0, i32 2
store i32 2, i32* %19
%20 = getelementptr inbounds %struct.player, %struct.player* %15, i32 0, i32 3
store i32 2, i32* %20
%21 = getelementptr inbounds %struct.player, %struct.player* %15, i32 0, i32 4
store i32 2, i32* %21
%22 = bitcast %struct.player* %4 to i8*
%23 = bitcast i8* %22 to %struct.player*
%24 = getelementptr inbounds %struct.player, %struct.player* %23, i32 0, i32 0
store i32 3, i32* %24
%25 = getelementptr inbounds %struct.player, %struct.player* %23, i32 0, i32 1
%26 = getelementptr inbounds [20 x i8], [20 x i8]* %25, i32 0, i32 0
store i8 99, i8* %26
%27 = getelementptr inbounds %struct.player, %struct.player* %23, i32 0, i32 2
store i32 3, i32* %27
%28 = getelementptr inbounds %struct.player, %struct.player* %23, i32 0, i32 3
store i32 3, i32* %28
%29 = getelementptr inbounds %struct.player, %struct.player* %23, i32 0, i32 4
store i32 3, i32* %29
store %struct.player* %2, %struct.player** %5
%30 = getelementptr inbounds %struct.player, %struct.player* %2, i32 0, i32 5
store %struct.player* %3, %struct.player** %30
%31 = getelementptr inbounds %struct.player, %struct.player* %3, i32 0, i32 5
store %struct.player* %4, %struct.player** %31
%32 = getelementptr inbounds %struct.player, %struct.player* %4, i32 0, i32 5
store %struct.player* null, %struct.player** %32
%33 = load %struct.player*, %struct.player** %5
%34 = getelementptr inbounds %struct.player, %struct.player* %33, i32 0, i32 5
%35 = load %struct.player*, %struct.player** %34
%36 = getelementptr inbounds %struct.player, %struct.player* %35, i32 0, i32 1
%37 = getelementptr inbounds [20 x i8], [20 x i8]* %36, i64 0, i64 0
%38 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %37)
ret i32 0
}

LLVM IR (-O2):
%struct.player = type { i32, [20 x i8], i32, i32, i32, %struct.player* }
@.str = [23 x i8] c"This first playeris %s\00"
define i32 @main() {
%1 = alloca %struct.player
%2 = alloca %struct.player
%3 = bitcast %struct.player* %1 to i8*
%4 = getelementptr inbounds %struct.player, %struct.player* %1, i64 0, i32 0
store i32 2, i32* %4
%5 = getelementptr inbounds %struct.player, %struct.player* %1, i64 0, i32 1, i64 0
store i8 98, i8* %5
%6 = getelementptr inbounds %struct.player, %struct.player* %1, i64 0, i32 2
store i32 2, i32* %6
%7 = getelementptr inbounds %struct.player, %struct.player* %1, i64 0, i32 3
store i32 2, i32* %7
%8 = getelementptr inbounds %struct.player, %struct.player* %1, i64 0, i32 4
store i32 2, i32* %8
%9 = bitcast %struct.player* %2 to i8*
%10 = getelementptr inbounds %struct.player, %struct.player* %2, i64 0, i32 0
store i32 3, i32* %10
%11 = getelementptr inbounds %struct.player, %struct.player* %2, i64 0, i32 1, i64 0
store i8 99, i8* %11
%12 = getelementptr inbounds %struct.player, %struct.player* %2, i64 0, i32 2
store i32 3, i32* %12
%13 = getelementptr inbounds %struct.player, %struct.player* %2, i64 0, i32 3
store i32 3, i32* %13
%14 = getelementptr inbounds %struct.player, %struct.player* %2, i64 0, i32 4
store i32 3, i32* %14
%15 = getelementptr inbounds %struct.player, %struct.player* %1, i64 0, i32 5
store %struct.player* %2, %struct.player** %15
%16 = getelementptr inbounds %struct.player, %struct.player* %2, i64 0, i32 5
store %struct.player* null, %struct.player** %16
%17 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}