#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 */
scalar_t__ get_line(char *, int /*<<< orphan*/);
int /*<<< orphan*/ local_single_quotes_around(char *);
int /*<<< orphan*/ stdin;
int main(int argc, char **argv) {
  char buffer[65536];
  if (argc == 2)
    local_single_quotes_around(argv[1]);
  else {
    while (get_line(buffer, stdin))
      local_single_quotes_around(buffer);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10010,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1155 <main+0x35>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <local_single_quotes_around@plt>
jmp    118f <main+0x6f>
jmp    115a <main+0x3a>
lea    -0x10010(%rbp),%rdi
mov    0x2e80(%rip),%rax
mov    (%rax),%esi
call   1030 <get_line@plt>
cmp    $0x0,%rax
je     118a <main+0x6a>
lea    -0x10010(%rbp),%rdi
call   1040 <local_single_quotes_around@plt>
jmp    115a <main+0x3a>
jmp    118f <main+0x6f>
xor    %eax,%eax
add    $0x10010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x10008,%rsp
cmp    $0x2,%edi
jne    113a <main+0x1a>
mov    0x8(%rsi),%rdi
call   1040 <local_single_quotes_around@plt>
jmp    1178 <main+0x58>
mov    0x2ea7(%rip),%r14
mov    (%r14),%esi
mov    %rsp,%rdi
call   1030 <get_line@plt>
test   %rax,%rax
je     1178 <main+0x58>
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1040 <local_single_quotes_around@plt>
mov    (%r14),%esi
mov    %rbx,%rdi
call   1030 <get_line@plt>
test   %rax,%rax
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x10008,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [65536 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 2
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @local_single_quotes_around(i8* %12)
br label %24
14: ; preds = %2
br label %15
15: ; preds = %20, %14
%16 = getelementptr inbounds [65536 x i8], [65536 x i8]* %6, i64 0, i64 0
%17 = load i32, i32* @stdin
%18 = call i64 @get_line(i8* %16, i32 %17)
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %15
%21 = getelementptr inbounds [65536 x i8], [65536 x i8]* %6, i64 0, i64 0
%22 = call i32 @local_single_quotes_around(i8* %21)
br label %15
23: ; preds = %15
br label %24
24: ; preds = %23, %9
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [65536 x i8]
%4 = getelementptr inbounds [65536 x i8], [65536 x i8]* %3, i64 0, i64 0
%5 = icmp eq i32 %0, 2
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = load i32, i32* @stdin
%8 = call i64 @get_line(i8* %4, i32 %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %19, label %14
10: ; preds = %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = tail call i32 @local_single_quotes_around(i8* %12)
br label %19
14: ; preds = %6, %14
%15 = call i32 @local_single_quotes_around(i8* %4)
%16 = load i32, i32* @stdin
%17 = call i64 @get_line(i8* %4, i32 %16)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %14
19: ; preds = %14, %6, %10
ret i32 0
}