#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 EXIT_SUCCESS;
int /*<<< orphan*/ free(char *);
char *line_reading(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ substract_names(char *, char *);
int main() {
  printf("Enter first list name:\n");
  char *firstNameList = line_reading(100);
  printf("Enter list name to substract:\n");
  char *secondNameList = line_reading(100);
  substract_names(firstNameList, secondNameList);
  printf("%s", firstNameList);
  free(firstNameList);
  free(secondNameList);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x64,%edi
call   1060 <line_reading@plt>
mov    %rax,-0x10(%rbp)
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x64,%edi
call   1060 <line_reading@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <substract_names@plt>
mov    -0x10(%rbp),%rsi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    0x2e21(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xea8(%rip),%rdi
call   1040 <puts@plt>
mov    $0x64,%edi
call   1070 <line_reading@plt>
mov    %rax,%rbx
lea    0xea6(%rip),%rdi
call   1040 <puts@plt>
mov    $0x64,%edi
call   1070 <line_reading@plt>
mov    %rax,%r14
mov    %rbx,%rdi
mov    %rax,%rsi
call   1060 <substract_names@plt>
lea    0xe68(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    0x2e27(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Enter first list name:\0A\00"
@.str.1 = [31 x i8] c"Enter list name to substract:\0A\00"
@.str.2 = [3 x i8] c"%s\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = call i8* @line_reading(i32 100)
store i8* %5, i8** %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%7 = call i8* @line_reading(i32 100)
store i8* %7, i8** %3
%8 = load i8*, i8** %2
%9 = load i8*, i8** %3
%10 = call i32 @substract_names(i8* %8, i8* %9)
%11 = load i8*, i8** %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %2
%14 = call i32 @free(i8* %13)
%15 = load i8*, i8** %3
%16 = call i32 @free(i8* %15)
%17 = load i32, i32* @EXIT_SUCCESS
ret i32 %17
}

LLVM IR (-O2):
@.str.2 = [3 x i8] c"%s\00"
@EXIT_SUCCESS = global i32 0
@str = [23 x i8] c"Enter first list name:\00"
@str.3 = [30 x i8] c"Enter list name to substract:\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i8* @line_reading(i32 100)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i8* @line_reading(i32 100)
%5 = tail call i32 @substract_names(i8* %2, i8* %4)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%7 = tail call i32 @free(i8* %2)
%8 = tail call i32 @free(i8* %4)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}