#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 /*<<< orphan*/ Delete(struct node **, int, int *);
int getCount(struct node **);
int /*<<< orphan*/ insert(struct node **, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ result(struct node **);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  struct node *head = NULL;
  insert(&head, 2);
  insert(&head, 4);
  insert(&head, 5);
  insert(&head, 7);
  insert(&head, 8);
  result(&head);
  int n, c;
  c = getCount(&head);
  printf("Enter the position:");
  scanf("%d", &n);
  Delete(&head, n, &c);
  result(&head);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x2,%esi
call   1080 <insert@plt>
lea    -0x10(%rbp),%rdi
mov    $0x4,%esi
call   1080 <insert@plt>
lea    -0x10(%rbp),%rdi
mov    $0x5,%esi
call   1080 <insert@plt>
lea    -0x10(%rbp),%rdi
mov    $0x7,%esi
call   1080 <insert@plt>
lea    -0x10(%rbp),%rdi
mov    $0x8,%esi
call   1080 <insert@plt>
lea    -0x10(%rbp),%rdi
call   1060 <result@plt>
lea    -0x10(%rbp),%rdi
call   1050 <getCount@plt>
mov    %eax,-0x18(%rbp)
lea    0xe27(%rip),%rdi
call   1040 <printf@plt>
lea    0xe2f(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1070 <scanf@plt>
mov    -0x14(%rbp),%esi
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rdx
call   1030 <Delete@plt>
lea    -0x10(%rbp),%rdi
call   1060 <result@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
call   1080 <insert@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1080 <insert@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1080 <insert@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1080 <insert@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1080 <insert@plt>
mov    %rbx,%rdi
call   1060 <result@plt>
mov    %rbx,%rdi
call   1050 <getCount@plt>
mov    %eax,(%rsp)
lea    0xe32(%rip),%rdi
call   1040 <printf@plt>
lea    0xe3a(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1070 <scanf@plt>
mov    0x4(%rsp),%esi
mov    %rsp,%rdx
mov    %rbx,%rdi
call   1030 <Delete@plt>
mov    %rbx,%rdi
call   1060 <result@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.node = type { i32 }
@.str = [20 x i8] c"Enter the position:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.node*
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store %struct.node* null, %struct.node** %2
%5 = call i32 @insert(%struct.node** %2, i32 2)
%6 = call i32 @insert(%struct.node** %2, i32 4)
%7 = call i32 @insert(%struct.node** %2, i32 5)
%8 = call i32 @insert(%struct.node** %2, i32 7)
%9 = call i32 @insert(%struct.node** %2, i32 8)
%10 = call i32 @result(%struct.node** %2)
%11 = call i32 @getCount(%struct.node** %2)
store i32 %11, i32* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%14 = load i32, i32* %3
%15 = call i32 @Delete(%struct.node** %2, i32 %14, i32* %4)
%16 = call i32 @result(%struct.node** %2)
ret i32 0
}

LLVM IR (-O2):
%struct.node = type { i32 }
@.str = [20 x i8] c"Enter the position:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca %struct.node*
%2 = alloca i32
%3 = alloca i32
%4 = bitcast %struct.node** %1 to i8*
store %struct.node* null, %struct.node** %1
%5 = call i32 @insert(%struct.node** %1, i32 2)
%6 = call i32 @insert(%struct.node** %1, i32 4)
%7 = call i32 @insert(%struct.node** %1, i32 5)
%8 = call i32 @insert(%struct.node** %1, i32 7)
%9 = call i32 @insert(%struct.node** %1, i32 8)
%10 = call i32 @result(%struct.node** %1)
%11 = bitcast i32* %2 to i8*
%12 = bitcast i32* %3 to i8*
%13 = call i32 @getCount(%struct.node** %1)
store i32 %13, i32* %3
%14 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%16 = load i32, i32* %2
%17 = call i32 @Delete(%struct.node** %1, i32 %16, i32* %3)
%18 = call i32 @result(%struct.node** %1)
ret i32 0
}