#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 */
struct Node {
  int dummy;
};

/* Variables and functions */
int gettingLength(struct Node *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ pushing_data_to_LL(struct Node **, char);
int main() {
  struct Node *head = NULL;
  printf("Currently Length of Linkedlist is: %d", gettingLength(head));
  pushing_data_to_LL(&head, 'G');
  pushing_data_to_LL(&head, 'S');
  pushing_data_to_LL(&head, 'S');
  pushing_data_to_LL(&head, 'O');
  pushing_data_to_LL(&head, 'C');
  printf("\n Currently Length of Linkedlist is: %d", gettingLength(head));
  pushing_data_to_LL(&head, '-');
  printf("\n Currently Length of Linkedlist is: %d", gettingLength(head));
  pushing_data_to_LL(&head, '2');
  pushing_data_to_LL(&head, '0');
  pushing_data_to_LL(&head, '2');
  pushing_data_to_LL(&head, '0');
  printf("\n Currently Length of Linkedlist is: %d", gettingLength(head));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <gettingLength@plt>
mov    %eax,%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
lea    -0x10(%rbp),%rdi
mov    $0x47,%esi
call   1040 <pushing_data_to_LL@plt>
lea    -0x10(%rbp),%rdi
mov    $0x53,%esi
call   1040 <pushing_data_to_LL@plt>
lea    -0x10(%rbp),%rdi
mov    $0x53,%esi
call   1040 <pushing_data_to_LL@plt>
lea    -0x10(%rbp),%rdi
mov    $0x4f,%esi
call   1040 <pushing_data_to_LL@plt>
lea    -0x10(%rbp),%rdi
mov    $0x43,%esi
call   1040 <pushing_data_to_LL@plt>
mov    -0x10(%rbp),%rdi
call   1050 <gettingLength@plt>
mov    %eax,%esi
lea    0xe4a(%rip),%rdi
call   1030 <printf@plt>
lea    -0x10(%rbp),%rdi
mov    $0x2d,%esi
call   1040 <pushing_data_to_LL@plt>
mov    -0x10(%rbp),%rdi
call   1050 <gettingLength@plt>
mov    %eax,%esi
lea    0xe25(%rip),%rdi
call   1030 <printf@plt>
lea    -0x10(%rbp),%rdi
mov    $0x32,%esi
call   1040 <pushing_data_to_LL@plt>
lea    -0x10(%rbp),%rdi
mov    $0x30,%esi
call   1040 <pushing_data_to_LL@plt>
lea    -0x10(%rbp),%rdi
mov    $0x32,%esi
call   1040 <pushing_data_to_LL@plt>
lea    -0x10(%rbp),%rdi
mov    $0x30,%esi
call   1040 <pushing_data_to_LL@plt>
mov    -0x10(%rbp),%rdi
call   1050 <gettingLength@plt>
mov    %eax,%esi
lea    0xdd6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movq   $0x0,(%rsp)
xor    %edi,%edi
call   1050 <gettingLength@plt>
lea    0xeb8(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x47,%esi
call   1040 <pushing_data_to_LL@plt>
mov    %rbx,%rdi
mov    $0x53,%esi
call   1040 <pushing_data_to_LL@plt>
mov    %rbx,%rdi
mov    $0x53,%esi
call   1040 <pushing_data_to_LL@plt>
mov    %rbx,%rdi
mov    $0x4f,%esi
call   1040 <pushing_data_to_LL@plt>
mov    %rbx,%rdi
mov    $0x43,%esi
call   1040 <pushing_data_to_LL@plt>
mov    (%rsp),%rdi
call   1050 <gettingLength@plt>
lea    0xe5b(%rip),%r14
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2d,%esi
call   1040 <pushing_data_to_LL@plt>
mov    (%rsp),%rdi
call   1050 <gettingLength@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x32,%esi
call   1040 <pushing_data_to_LL@plt>
mov    %rbx,%rdi
mov    $0x30,%esi
call   1040 <pushing_data_to_LL@plt>
mov    %rbx,%rdi
mov    $0x32,%esi
call   1040 <pushing_data_to_LL@plt>
mov    %rbx,%rdi
mov    $0x30,%esi
call   1040 <pushing_data_to_LL@plt>
mov    (%rsp),%rdi
call   1050 <gettingLength@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.Node = type { i32 }
@.str = [38 x i8] c"Currently Length of Linkedlist is: %d\00"
@.str.1 = [40 x i8] c"\0A Currently Length of Linkedlist is: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.Node*
store i32 0, i32* %1
store %struct.Node* null, %struct.Node** %2
%3 = load %struct.Node*, %struct.Node** %2
%4 = call i32 @gettingLength(%struct.Node* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @pushing_data_to_LL(%struct.Node** %2, i8 signext 71)
%7 = call i32 @pushing_data_to_LL(%struct.Node** %2, i8 signext 83)
%8 = call i32 @pushing_data_to_LL(%struct.Node** %2, i8 signext 83)
%9 = call i32 @pushing_data_to_LL(%struct.Node** %2, i8 signext 79)
%10 = call i32 @pushing_data_to_LL(%struct.Node** %2, i8 signext 67)
%11 = load %struct.Node*, %struct.Node** %2
%12 = call i32 @gettingLength(%struct.Node* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = call i32 @pushing_data_to_LL(%struct.Node** %2, i8 signext 45)
%15 = load %struct.Node*, %struct.Node** %2
%16 = call i32 @gettingLength(%struct.Node* %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = call i32 @pushing_data_to_LL(%struct.Node** %2, i8 signext 50)
%19 = call i32 @pushing_data_to_LL(%struct.Node** %2, i8 signext 48)
%20 = call i32 @pushing_data_to_LL(%struct.Node** %2, i8 signext 50)
%21 = call i32 @pushing_data_to_LL(%struct.Node** %2, i8 signext 48)
%22 = load %struct.Node*, %struct.Node** %2
%23 = call i32 @gettingLength(%struct.Node* %22)
%24 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i32 %23)
ret i32 0
}

LLVM IR (-O2):
%struct.Node = type { i32 }
@.str = [38 x i8] c"Currently Length of Linkedlist is: %d\00"
@.str.1 = [40 x i8] c"\0A Currently Length of Linkedlist is: %d\00"
define i32 @main() {
%1 = alloca %struct.Node*
%2 = bitcast %struct.Node** %1 to i8*
store %struct.Node* null, %struct.Node** %1
%3 = tail call i32 @gettingLength(%struct.Node* null)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @pushing_data_to_LL(%struct.Node** %1, i8 signext 71)
%6 = call i32 @pushing_data_to_LL(%struct.Node** %1, i8 signext 83)
%7 = call i32 @pushing_data_to_LL(%struct.Node** %1, i8 signext 83)
%8 = call i32 @pushing_data_to_LL(%struct.Node** %1, i8 signext 79)
%9 = call i32 @pushing_data_to_LL(%struct.Node** %1, i8 signext 67)
%10 = load %struct.Node*, %struct.Node** %1
%11 = call i32 @gettingLength(%struct.Node* %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = call i32 @pushing_data_to_LL(%struct.Node** %1, i8 signext 45)
%14 = load %struct.Node*, %struct.Node** %1
%15 = call i32 @gettingLength(%struct.Node* %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = call i32 @pushing_data_to_LL(%struct.Node** %1, i8 signext 50)
%18 = call i32 @pushing_data_to_LL(%struct.Node** %1, i8 signext 48)
%19 = call i32 @pushing_data_to_LL(%struct.Node** %1, i8 signext 50)
%20 = call i32 @pushing_data_to_LL(%struct.Node** %1, i8 signext 48)
%21 = load %struct.Node*, %struct.Node** %1
%22 = call i32 @gettingLength(%struct.Node* %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i32 %22)
ret i32 0
}