#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 */
unsigned char *fileReadLine();
scalar_t__ isspace(int);
const unsigned char *readVimLine(void) {
  const unsigned char *line;
  while ((line = fileReadLine()) != NULL) {
    while (isspace((int)*line))
      ++line;
    if ((int)*line == '"')
      continue;
    break;
  }
  return line;
}


x86 assembly (clang, -O0):
<readVimLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <fileReadLine@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     1183 <readVimLine+0x63>
jmp    1142 <readVimLine+0x22>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1169 <readVimLine+0x49>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1142 <readVimLine+0x22>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x22,%eax
jne    117e <readVimLine+0x5e>
jmp    1128 <readVimLine+0x8>
jmp    1183 <readVimLine+0x63>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readVimLine>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <fileReadLine@plt>
test   %rax,%rax
je     1169 <readVimLine+0x49>
mov    %rax,%rbx
add    $0xffffffffffffffff,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1150 <readVimLine+0x30>
cmpb   $0x22,(%rbx)
je     1130 <readVimLine+0x10>
jmp    116b <readVimLine+0x4b>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @readVimLine() {
%1 = alloca i8*
br label %2
2: ; preds = %20, %0
%3 = call i8* (...) @fileReadLine()
store i8* %3, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %22
5: ; preds = %2
br label %6
6: ; preds = %12, %5
%7 = load i8*, i8** %1
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = call i64 @isspace(i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %6
%13 = load i8*, i8** %1
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %1
br label %6
15: ; preds = %6
%16 = load i8*, i8** %1
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = icmp eq i32 %18, 34
br i1 %19, label %20, label %21
20: ; preds = %15
br label %2
21: ; preds = %15
br label %22
22: ; preds = %21, %2
%23 = load i8*, i8** %1
ret i8* %23
}

LLVM IR (-O2):
define i8* @readVimLine() {
br label %1
1: ; preds = %11, %0
%2 = tail call i8* (...) @fileReadLine()
%3 = icmp eq i8* %2, null
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %10, %4 ], [ %2, %1 ]
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = tail call i64 @isspace(i32 %7)
%9 = icmp eq i64 %8, 0
%10 = getelementptr inbounds i8, i8* %5, i64 1
br i1 %9, label %11, label %4
11: ; preds = %4
%12 = load i8, i8* %5
%13 = icmp eq i8 %12, 34
br i1 %13, label %1, label %14
14: ; preds = %11, %1
%15 = phi i8* [ %5, %11 ], [ null, %1 ]
ret i8* %15
}