#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 ListNode {
  int dummy;
};

/* Variables and functions */
struct ListNode *deleteDuplicates(struct ListNode *);
int /*<<< orphan*/ mk_list(struct ListNode **, int *, int);
int /*<<< orphan*/ print(struct ListNode *);
int main(int argc, char **argv) {
  struct ListNode *head = NULL;
  int a[] = {1, 1, 1, 2, 2, 3, 4, 4, 5, 6, 6};
  mk_list(&head, a, 11);
  print(head);
  head = deleteDuplicates(head);
  print(head);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xe97(%rip),%rsi
mov    $0x2c,%edx
call   1050 <memcpy@plt>
lea    -0x50(%rbp),%rsi
lea    -0x18(%rbp),%rdi
mov    $0xb,%edx
call   1060 <mk_list@plt>
mov    -0x18(%rbp),%rdi
call   1040 <print@plt>
mov    -0x18(%rbp),%rdi
call   1030 <deleteDuplicates@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <print@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movq   $0x0,0x8(%rsp)
movups 0xed8(%rip),%xmm0
movups %xmm0,0x2c(%rsp)
movaps 0xec0(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xea4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    $0xb,%edx
call   1050 <mk_list@plt>
mov    0x8(%rsp),%rdi
call   1040 <print@plt>
mov    0x8(%rsp),%rdi
call   1030 <deleteDuplicates@plt>
mov    %rax,0x8(%rsp)
mov    %rax,%rdi
call   1040 <print@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
%struct.ListNode = type { i32 }
@__const.main.a = [11 x i32] [i32 1, i32 1, i32 1, i32 2, i32 2, i32 3, i32 4, i32 4, i32 5, i32 6, i32 6]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.ListNode*
%7 = alloca [11 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store %struct.ListNode* null, %struct.ListNode** %6
%8 = bitcast [11 x i32]* %7 to i8*
%9 = getelementptr inbounds [11 x i32], [11 x i32]* %7, i64 0, i64 0
%10 = call i32 @mk_list(%struct.ListNode** %6, i32* %9, i32 11)
%11 = load %struct.ListNode*, %struct.ListNode** %6
%12 = call i32 @print(%struct.ListNode* %11)
%13 = load %struct.ListNode*, %struct.ListNode** %6
%14 = call %struct.ListNode* @deleteDuplicates(%struct.ListNode* %13)
store %struct.ListNode* %14, %struct.ListNode** %6
%15 = load %struct.ListNode*, %struct.ListNode** %6
%16 = call i32 @print(%struct.ListNode* %15)
ret i32 0
}

LLVM IR (-O2):
%struct.ListNode = type { i32 }
@__const.main.a = [11 x i32] [i32 1, i32 1, i32 1, i32 2, i32 2, i32 3, i32 4, i32 4, i32 5, i32 6, i32 6]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.ListNode*
%4 = alloca [11 x i32]
%5 = bitcast %struct.ListNode** %3 to i8*
store %struct.ListNode* null, %struct.ListNode** %3
%6 = bitcast [11 x i32]* %4 to i8*
%7 = getelementptr inbounds [11 x i32], [11 x i32]* %4, i64 0, i64 0
%8 = call i32 @mk_list(%struct.ListNode** %3, i32* %7, i32 11)
%9 = load %struct.ListNode*, %struct.ListNode** %3
%10 = call i32 @print(%struct.ListNode* %9)
%11 = load %struct.ListNode*, %struct.ListNode** %3
%12 = call %struct.ListNode* @deleteDuplicates(%struct.ListNode* %11)
store %struct.ListNode* %12, %struct.ListNode** %3
%13 = call i32 @print(%struct.ListNode* %12)
ret i32 0
}