#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__ opabort();
int rzfile();
int /*<<< orphan*/ tryz();
int rzmfile() {
  static int c;
  for (;;) {
    if (opabort())
      return (-1);
    switch (c = rzfile()) {
    case 11:
    case 5:
      switch (tryz()) {
      case 15:
        return 0;
      default:
        return (-1);
      case 4:
        break;
      }
      continue;
    default:
      return c;
    case (-1):
      return (-1);
    }
  }
}


x86 assembly (clang, -O0):
<rzmfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <opabort@plt>
cmp    $0x0,%rax
je     1155 <rzmfile+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    11f9 <rzmfile+0xc9>
xor    %eax,%eax
call   1040 <rzfile@plt>
mov    %eax,0x2eda(%rip)
mov    %eax,%ecx
mov    %ecx,-0x8(%rbp)
sub    $0xffffffff,%eax
je     11f2 <rzmfile+0xc2>
jmp    1175 <rzmfile+0x45>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
je     1197 <rzmfile+0x67>
jmp    1186 <rzmfile+0x56>
mov    -0x8(%rbp),%eax
sub    $0xb,%eax
jne    11e4 <rzmfile+0xb4>
jmp    1197 <rzmfile+0x67>
xor    %eax,%eax
call   1050 <tryz@plt>
mov    %eax,%ecx
mov    %ecx,-0xc(%rbp)
sub    $0x4,%eax
je     11da <rzmfile+0xaa>
jmp    11b1 <rzmfile+0x81>
mov    -0xc(%rbp),%eax
sub    $0xf,%eax
jne    11ce <rzmfile+0x9e>
jmp    11c2 <rzmfile+0x92>
movl   $0x0,-0x4(%rbp)
jmp    11f9 <rzmfile+0xc9>
movl   $0xffffffff,-0x4(%rbp)
jmp    11f9 <rzmfile+0xc9>
jmp    11df <rzmfile+0xaf>
jmp    1138 <rzmfile+0x8>
mov    0x2e52(%rip),%eax
mov    %eax,-0x4(%rbp)
jmp    11f9 <rzmfile+0xc9>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rzmfile>:
push   %rbx
jmp    114e <rzmfile+0x1e>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <tryz@plt>
cmp    $0x4,%eax
jne    1179 <rzmfile+0x49>
xor    %eax,%eax
call   1030 <opabort@plt>
mov    $0xffffffff,%ebx
test   %rax,%rax
jne    1183 <rzmfile+0x53>
xor    %eax,%eax
call   1040 <rzfile@plt>
cmp    $0x5,%eax
je     1140 <rzmfile+0x10>
mov    %eax,%ebx
cmp    $0xb,%eax
je     1140 <rzmfile+0x10>
cmp    $0xffffffff,%ebx
je     117e <rzmfile+0x4e>
jmp    1183 <rzmfile+0x53>
cmp    $0xf,%eax
je     1183 <rzmfile+0x53>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@rzmfile.c = internal global i32 0
define i32 @rzmfile() {
%1 = alloca i32
br label %2
2: ; preds = %13, %0
%3 = call i64 (...) @opabort()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
store i32 -1, i32* %1
br label %17
6: ; preds = %2
%7 = call i32 (...) @rzfile()
store i32 %7, i32* @rzmfile.c
switch i32 %7, label %14 [
i32 11, label %8
i32 5, label %8
i32 -1, label %16
]
8: ; preds = %6, %6
%9 = call i32 (...) @tryz()
switch i32 %9, label %11 [
i32 15, label %10
i32 4, label %12
]
10: ; preds = %8
store i32 0, i32* %1
br label %17
11: ; preds = %8
store i32 -1, i32* %1
br label %17
12: ; preds = %8
br label %13
13: ; preds = %12
br label %2
14: ; preds = %6
%15 = load i32, i32* @rzmfile.c
store i32 %15, i32* %1
br label %17
16: ; preds = %6
store i32 -1, i32* %1
br label %17
17: ; preds = %16, %14, %11, %10, %5
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @rzmfile() {
br label %1
1: ; preds = %6, %0
%2 = tail call i64 (...) @opabort()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 (...) @rzfile()
switch i32 %5, label %8 [
i32 11, label %6
i32 5, label %6
i32 -1, label %10
]
6: ; preds = %4, %4
%7 = tail call i32 (...) @tryz()
switch i32 %7, label %10 [
i32 15, label %8
i32 4, label %1
]
8: ; preds = %1, %6, %4
%9 = phi i32 [ %5, %4 ], [ 0, %6 ], [ -1, %1 ]
br label %10
10: ; preds = %4, %6, %8
%11 = phi i32 [ %9, %8 ], [ -1, %6 ], [ -1, %4 ]
ret i32 %11
}