#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*/ free(char *);
char *parseUnionOrDifference(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
char *string_new();
scalar_t__ strlen(char *);
int main() {
  char *line = string_new();
  scanf("%255[^\n]%*c", line);
  while (strlen(line) > 0) {
    printf("%s\n", parseUnionOrDifference(line));
    scanf("%255[^\n]%*c", line);
  }
  free(line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <string_new@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe7b(%rip),%rdi
call   1080 <scanf@plt>
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x0,%rax
jle    11ca <main+0x6a>
mov    -0x10(%rbp),%rdi
call   1070 <parseUnionOrDifference@plt>
mov    %rax,%rsi
lea    0xe5c(%rip),%rdi
call   1060 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xe40(%rip),%rdi
call   1080 <scanf@plt>
jmp    118a <main+0x2a>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1040 <string_new@plt>
mov    %rax,%rbx
lea    0xe8a(%rip),%rdi
mov    %rax,%rsi
call   1080 <scanf@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
test   %rax,%rax
jle    11cb <main+0x6b>
lea    0xe7a(%rip),%r14
lea    0xe67(%rip),%r15
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1070 <parseUnionOrDifference@plt>
mov    %r14,%rdi
mov    %rax,%rsi
call   1060 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <scanf@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
test   %rax,%rax
jg     11a0 <main+0x40>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%255[^\0A]%*c\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* (...) @string_new()
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4)
br label %6
6: ; preds = %10, %0
%7 = load i8*, i8** %2
%8 = call i64 @strlen(i8* %7)
%9 = icmp sgt i64 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i8*, i8** %2
%12 = call i8* @parseUnionOrDifference(i8* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %2
%15 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %14)
br label %6
16: ; preds = %6
%17 = load i8*, i8** %2
%18 = call i32 @free(i8* %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%255[^\0A]%*c\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* (...) @string_new()
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %0, %5
%6 = tail call i8* @parseUnionOrDifference(i8* %1)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = tail call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %1)
%9 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%10 = icmp sgt i64 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %5, %0
%12 = tail call i32 @free(i8* %1)
ret i32 0
}