#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char EOF;
int /*<<< orphan*/ SEEK_CUR;
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
void ignoreConstantString(FILE *f) {
  char c = 0, count = 0;
  while (EOF != (c = fgetc(f))) {
    if (c == '\\')
      fseek(f, 1, SEEK_CUR);
    else if (c == '"' && count)
      return;
    else if (c == '"')
      count = 1;
  }
}


x86 assembly (clang, -O0):
<ignoreConstantString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
movb   $0x0,-0xa(%rbp)
mov    0x2ea5(%rip),%rax
movsbl (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,%cl
mov    -0x10(%rbp),%eax
mov    %cl,-0x9(%rbp)
movsbl %cl,%ecx
cmp    %ecx,%eax
je     11c5 <ignoreConstantString+0xa5>
movsbl -0x9(%rbp),%eax
cmp    $0x5c,%eax
jne    1186 <ignoreConstantString+0x66>
mov    -0x8(%rbp),%rdi
mov    0x2e73(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%esi
call   1040 <fseek@plt>
jmp    11c0 <ignoreConstantString+0xa0>
movsbl -0x9(%rbp),%eax
cmp    $0x22,%eax
jne    11a5 <ignoreConstantString+0x85>
movsbl -0xa(%rbp),%eax
cmp    $0x0,%eax
je     11a5 <ignoreConstantString+0x85>
jmp    11c5 <ignoreConstantString+0xa5>
movsbl -0x9(%rbp),%eax
cmp    $0x22,%eax
jne    11b6 <ignoreConstantString+0x96>
movb   $0x1,-0xa(%rbp)
jmp    11bb <ignoreConstantString+0x9b>
jmp    11c0 <ignoreConstantString+0xa0>
jmp    1134 <ignoreConstantString+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ignoreConstantString>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r13
mov    0x2eab(%rip),%r14
mov    (%r14),%bpl
call   1030 <fgetc@plt>
cmp    %al,%bpl
jne    1151 <ignoreConstantString+0x31>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ebp,%ebp
mov    0x2e8e(%rip),%r15
mov    $0x1,%r12d
jmp    1190 <ignoreConstantString+0x70>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15),%edx
mov    %r13,%rdi
mov    $0x1,%esi
call   1040 <fseek@plt>
movzbl (%r14),%ebx
mov    %r13,%rdi
call   1030 <fgetc@plt>
cmp    %al,%bl
je     1142 <ignoreConstantString+0x22>
cmp    $0x5c,%al
je     1170 <ignoreConstantString+0x50>
cmp    $0x22,%al
jne    119d <ignoreConstantString+0x7d>
test   %bpl,%bpl
jne    1142 <ignoreConstantString+0x22>
cmp    $0x22,%al
movzbl %bpl,%ebp
cmove  %r12d,%ebp
jmp    1180 <ignoreConstantString+0x60>

LLVM IR (-O0):
@EOF = global i8 0
@SEEK_CUR = global i32 0
define void @ignoreConstantString(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
%4 = alloca i8
store i32* %0, i32** %2
store i8 0, i8* %3
store i8 0, i8* %4
br label %5
5: ; preds = %36, %1
%6 = load i8, i8* @EOF
%7 = sext i8 %6 to i32
%8 = load i32*, i32** %2
%9 = call signext i8 @fgetc(i32* %8)
store i8 %9, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %7, %10
br i1 %11, label %12, label %37
12: ; preds = %5
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 92
br i1 %15, label %16, label %20
16: ; preds = %12
%17 = load i32*, i32** %2
%18 = load i32, i32* @SEEK_CUR
%19 = call i32 @fseek(i32* %17, i32 1, i32 %18)
br label %36
20: ; preds = %12
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 34
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = load i8, i8* %4
%26 = sext i8 %25 to i32
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %24
br label %37
29: ; preds = %24, %20
%30 = load i8, i8* %3
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 34
br i1 %32, label %33, label %34
33: ; preds = %29
store i8 1, i8* %4
br label %34
34: ; preds = %33, %29
br label %35
35: ; preds = %34
br label %36
36: ; preds = %35, %16
br label %5
37: ; preds = %28, %5
ret void
}

LLVM IR (-O2):
@EOF = global i8 0
@SEEK_CUR = global i32 0
define void @ignoreConstantString(i32* nocapture %0) {
%2 = load i8, i8* @EOF
%3 = tail call signext i8 @fgetc(i32* %0)
%4 = icmp eq i8 %2, %3
br i1 %4, label %23, label %5
5: ; preds = %1, %18
%6 = phi i8 [ %21, %18 ], [ %3, %1 ]
%7 = phi i8 [ %19, %18 ], [ 0, %1 ]
%8 = icmp eq i8 %6, 92
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32, i32* @SEEK_CUR
%11 = tail call i32 @fseek(i32* %0, i32 1, i32 %10)
br label %18
12: ; preds = %5
%13 = icmp eq i8 %6, 34
%14 = icmp ne i8 %7, 0
%15 = select i1 %13, i1 %14, i1 false
br i1 %15, label %23, label %16
16: ; preds = %12
%17 = select i1 %13, i8 1, i8 %7
br label %18
18: ; preds = %16, %9
%19 = phi i8 [ %7, %9 ], [ %17, %16 ]
%20 = load i8, i8* @EOF
%21 = tail call signext i8 @fgetc(i32* %0)
%22 = icmp eq i8 %20, %21
br i1 %22, label %23, label %5
23: ; preds = %12, %18, %1
ret void
}