#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 infromdev();
int sliprxone(void) {
  register unsigned char c;
  register unsigned char d;
  c = infromdev();
  if (c == 0xC0)
    return -1;
  if (c == 0xDB) {
    d = infromdev();
    if (d == 0xDC)
      return (0xC0);
    if (d == 0xDD)
      return (0xDB);
    return (-1);
  }
  return (c);
}


x86 assembly (clang, -O0):
<sliprxone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <infromdev@plt>
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0xc0,%eax
jne    113d <sliprxone+0x2d>
movl   $0xffffffff,-0x4(%rbp)
jmp    119f <sliprxone+0x8f>
movzbl -0x5(%rbp),%eax
cmp    $0xdb,%eax
jne    1198 <sliprxone+0x88>
mov    $0x0,%al
call   1030 <infromdev@plt>
mov    %al,-0x6(%rbp)
movzbl -0x6(%rbp),%eax
cmp    $0xdc,%eax
jne    1171 <sliprxone+0x61>
movl   $0xc0,-0x4(%rbp)
jmp    119f <sliprxone+0x8f>
movzbl -0x6(%rbp),%eax
cmp    $0xdd,%eax
jne    118c <sliprxone+0x7c>
movl   $0xdb,-0x4(%rbp)
jmp    119f <sliprxone+0x8f>
movl   $0xffffffff,-0x4(%rbp)
jmp    119f <sliprxone+0x8f>
movzbl -0x5(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sliprxone>:
push   %rax
xor    %eax,%eax
call   1030 <infromdev@plt>
cmp    $0xc0,%al
je     1142 <sliprxone+0x32>
cmp    $0xdb,%al
jne    1149 <sliprxone+0x39>
xor    %eax,%eax
call   1030 <infromdev@plt>
cmp    $0xdd,%al
mov    $0xdb,%ecx
mov    $0xffffffff,%edx
cmove  %ecx,%edx
cmp    $0xdc,%al
mov    $0xc0,%eax
cmovne %edx,%eax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret
movzbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sliprxone() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = call zeroext i8 (...) @infromdev()
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = icmp eq i32 %6, 192
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 -1, i32* %1
br label %28
9: ; preds = %0
%10 = load i8, i8* %2
%11 = zext i8 %10 to i32
%12 = icmp eq i32 %11, 219
br i1 %12, label %13, label %25
13: ; preds = %9
%14 = call zeroext i8 (...) @infromdev()
store i8 %14, i8* %3
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = icmp eq i32 %16, 220
br i1 %17, label %18, label %19
18: ; preds = %13
store i32 192, i32* %1
br label %28
19: ; preds = %13
%20 = load i8, i8* %3
%21 = zext i8 %20 to i32
%22 = icmp eq i32 %21, 221
br i1 %22, label %23, label %24
23: ; preds = %19
store i32 219, i32* %1
br label %28
24: ; preds = %19
store i32 -1, i32* %1
br label %28
25: ; preds = %9
%26 = load i8, i8* %2
%27 = zext i8 %26 to i32
store i32 %27, i32* %1
br label %28
28: ; preds = %25, %24, %23, %18, %8
%29 = load i32, i32* %1
ret i32 %29
}

LLVM IR (-O2):
define i32 @sliprxone() {
%1 = tail call zeroext i8 (...) @infromdev()
switch i8 %1, label %8 [
i8 -64, label %10
i8 -37, label %2
]
2: ; preds = %0
%3 = tail call zeroext i8 (...) @infromdev()
%4 = icmp eq i8 %3, -35
%5 = select i1 %4, i32 219, i32 -1
%6 = icmp eq i8 %3, -36
%7 = select i1 %6, i32 192, i32 %5
br label %10
8: ; preds = %0
%9 = zext i8 %1 to i32
br label %10
10: ; preds = %2, %0, %8
%11 = phi i32 [ %9, %8 ], [ -1, %0 ], [ %7, %2 ]
ret i32 %11
}