#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 read(int, void *, int);
int /*<<< orphan*/ stopErr(char *, char *);
void restore_marque(int fd, char C) {
  char b[3 + 1];
  if ((read(fd, (void *)b, 3)) == 3)
    if (b[1] == C)
      return;
  stopErr("restore", "marque");
}


x86 assembly (clang, -O0):
<restore_marque>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x9(%rbp),%rsi
mov    $0x3,%edx
call   1040 <read@plt>
cmp    $0x3,%eax
jne    1165 <restore_marque+0x45>
movsbl -0x8(%rbp),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    1160 <restore_marque+0x40>
jmp    1178 <restore_marque+0x58>
jmp    1165 <restore_marque+0x45>
lea    0xe94(%rip),%rdi
lea    0xe95(%rip),%rsi
call   1030 <stopErr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<restore_marque>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
lea    0xc(%rsp),%rsi
mov    $0x3,%edx
call   1040 <read@plt>
cmp    $0x3,%eax
jne    1147 <restore_marque+0x27>
cmp    %bl,0xd(%rsp)
jne    1147 <restore_marque+0x27>
add    $0x10,%rsp
pop    %rbx
ret
lea    0xeb2(%rip),%rdi
lea    0xeb3(%rip),%rsi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <stopErr@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"restore\00"
@.str.1 = [7 x i8] c"marque\00"
define void @restore_marque(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca [4 x i8]
store i32 %0, i32* %3
store i8 %1, i8* %4
%6 = load i32, i32* %3
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%8 = call i32 @read(i32 %6, i8* %7, i32 3)
%9 = icmp eq i32 %8, 3
br i1 %9, label %10, label %19
10: ; preds = %2
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = load i8, i8* %4
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %13, %15
br i1 %16, label %17, label %18
17: ; preds = %10
br label %21
18: ; preds = %10
br label %19
19: ; preds = %18, %2
%20 = call i32 @stopErr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %21
21: ; preds = %19, %17
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"restore\00"
@.str.1 = [7 x i8] c"marque\00"
define void @restore_marque(i32 %0, i8 signext %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = call i32 @read(i32 %0, i8* %4, i32 3)
%6 = icmp eq i32 %5, 3
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, %1
%10 = select i1 %6, i1 %9, i1 false
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = tail call i32 @stopErr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %2, %11
ret void
}