#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 */
struct pollfd {
  int fd;
  int events;
  int revents;
};

/* Variables and functions */
int POLLIN;
int POLLOUT;
int STDIN_FILENO;
int /*<<< orphan*/ VIDEO_SOURCE_MEMORY;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getchar();
scalar_t__ poll(struct pollfd *, int, int);
int /*<<< orphan*/ printf(char *);
int read(int, char *, int);
int /*<<< orphan*/ videoContinue(int);
int /*<<< orphan*/ videoFastForward(int, int /*<<< orphan*/);
int /*<<< orphan*/ videoFreeze(int);
int /*<<< orphan*/ videoPlay(int);
int /*<<< orphan*/ videoSelectSource(int, int /*<<< orphan*/);
int /*<<< orphan*/ videoSlowMotion(int, int);
int /*<<< orphan*/ videoStop(int);
scalar_t__ write(int, char *, int);
void play_file_video(int filefd, int fd) {
  char buf[32768];
  int count;
  int written;
  struct pollfd pfd[2];
  int stopped = 0;
  pfd[0].fd = STDIN_FILENO;
  pfd[0].events = POLLIN;
  pfd[1].fd = fd;
  pfd[1].events = POLLOUT;
  videoSelectSource(fd, VIDEO_SOURCE_MEMORY);
  videoPlay(fd);
  count = read(filefd, buf, 32768);
  write(fd, buf, count);
  while ((count = read(filefd, buf, 32768)) >= 0) {
    written = 0;
    while (written < count) {
      if (poll(pfd, 2, 1)) {
        if (pfd[1].revents & POLLOUT) {
          written += write(fd, buf + written, count - written);
        }
        if (pfd[0].revents & POLLIN) {
          int c = getchar();
          switch (c) {
          case 'z':
            videoFreeze(fd);
            printf("playback frozen\n");
            stopped = 1;
            break;
          case 's':
            videoStop(fd);
            printf("playback stopped\n");
            stopped = 1;
            break;
          case 'c':
            videoContinue(fd);
            printf("playback continued\n");
            stopped = 0;
            break;
          case 'p':
            videoPlay(fd);
            printf("playback started\n");
            stopped = 0;
            break;
          case 'f':
            videoFastForward(fd, 0);
            printf("fastforward\n");
            stopped = 0;
            break;
          case 'm':
            videoSlowMotion(fd, 2);
            printf("slowmotion\n");
            stopped = 0;
            break;
          case 'q':
            videoContinue(fd);
            exit(0);
            break;
          }
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<play_file_video>:
push   %rbp
mov    %rsp,%rbp
sub    $0x8040,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0x8034(%rbp)
mov    0x2dd6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8030(%rbp)
mov    0x2ddf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x802c(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x8024(%rbp)
mov    0x2ddf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8020(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2da5(%rip),%rax
mov    (%rax),%esi
call   10d0 <videoSelectSource@plt>
mov    -0x8(%rbp),%edi
call   10a0 <videoPlay@plt>
mov    -0x4(%rbp),%edi
lea    -0x8010(%rbp),%rsi
mov    $0x8000,%edx
call   1070 <read@plt>
mov    %eax,-0x8014(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x8010(%rbp),%rsi
mov    -0x8014(%rbp),%edx
call   1040 <write@plt>
mov    -0x4(%rbp),%edi
lea    -0x8010(%rbp),%rsi
mov    $0x8000,%edx
call   1070 <read@plt>
mov    %eax,-0x8014(%rbp)
cmp    $0x0,%eax
jl     146b <play_file_video+0x29b>
movl   $0x0,-0x8018(%rbp)
mov    -0x8018(%rbp),%eax
cmp    -0x8014(%rbp),%eax
jge    1466 <play_file_video+0x296>
lea    -0x8030(%rbp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   10c0 <poll@plt>
cmp    $0x0,%rax
je     1461 <play_file_video+0x291>
mov    -0x801c(%rbp),%eax
mov    0x2d23(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1318 <play_file_video+0x148>
mov    -0x8(%rbp),%edi
lea    -0x8010(%rbp),%rsi
movslq -0x8018(%rbp),%rax
add    %rax,%rsi
mov    -0x8014(%rbp),%edx
sub    -0x8018(%rbp),%edx
call   1040 <write@plt>
mov    %rax,%rcx
movslq -0x8018(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8018(%rbp)
mov    -0x8028(%rbp),%eax
mov    0x2cbb(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     145c <play_file_video+0x28c>
xor    %eax,%eax
call   1090 <getchar@plt>
mov    %eax,-0x8038(%rbp)
mov    -0x8038(%rbp),%eax
add    $0xffffff9d,%eax
mov    %eax,%ecx
mov    %rcx,-0x8040(%rbp)
sub    $0x17,%eax
ja     1457 <play_file_video+0x287>
mov    -0x8040(%rbp),%rax
lea    0xc9a(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%edi
call   10b0 <videoFreeze@plt>
lea    0xce2(%rip),%rdi
call   1050 <printf@plt>
movl   $0x1,-0x8034(%rbp)
jmp    1457 <play_file_video+0x287>
mov    -0x8(%rbp),%edi
call   1080 <videoStop@plt>
lea    0xcd0(%rip),%rdi
call   1050 <printf@plt>
movl   $0x1,-0x8034(%rbp)
jmp    1457 <play_file_video+0x287>
mov    -0x8(%rbp),%edi
call   1030 <videoContinue@plt>
lea    0xcbf(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x8034(%rbp)
jmp    1457 <play_file_video+0x287>
mov    -0x8(%rbp),%edi
call   10a0 <videoPlay@plt>
lea    0xcb0(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x8034(%rbp)
jmp    1457 <play_file_video+0x287>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1060 <videoFastForward@plt>
lea    0xc9d(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x8034(%rbp)
jmp    1457 <play_file_video+0x287>
mov    -0x8(%rbp),%edi
mov    $0x2,%esi
call   10f0 <videoSlowMotion@plt>
lea    0xc82(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x8034(%rbp)
jmp    1457 <play_file_video+0x287>
mov    -0x8(%rbp),%edi
call   1030 <videoContinue@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
jmp    145c <play_file_video+0x28c>
jmp    1461 <play_file_video+0x291>
jmp    1296 <play_file_video+0xc6>
jmp    1269 <play_file_video+0x99>
add    $0x8040,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<play_file_video>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x8038,%rsp
mov    %esi,%r13d
mov    %edi,%ebp
mov    0x2ddb(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
mov    0x2de6(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x14(%rsp)
mov    %esi,0x1c(%rsp)
mov    0x2ded(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x20(%rsp)
mov    0x2db8(%rip),%rax
mov    (%rax),%esi
mov    %r13d,%edi
call   10d0 <videoSelectSource@plt>
mov    %r13d,%edi
call   10a0 <videoPlay@plt>
lea    0x30(%rsp),%rbx
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x8000,%edx
call   1070 <read@plt>
mov    %r13d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1050 <write@plt>
mov    %ebp,0xc(%rsp)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x8000,%edx
call   1070 <read@plt>
test   %eax,%eax
js     139f <play_file_video+0x1cf>
mov    %eax,%ebp
lea    0x10(%rsp),%r12
lea    0xd8c(%rip),%r14
jmp    129d <play_file_video+0xcd>
cs nopw 0x0(%rax,%rax,1)
mov    0xc(%rsp),%edi
lea    0x30(%rsp),%rsi
mov    $0x8000,%edx
call   1070 <read@plt>
mov    %eax,%ebp
test   %eax,%eax
js     139f <play_file_video+0x1cf>
test   %ebp,%ebp
je     1280 <play_file_video+0xb0>
xor    %ebx,%ebx
jmp    12c9 <play_file_video+0xf9>
mov    %r13d,%edi
call   10b0 <videoFreeze@plt>
lea    0xdf8(%rip),%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1040 <puts@plt>
cmp    %ebx,%ebp
jle    1280 <play_file_video+0xb0>
mov    %r12,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   10c0 <poll@plt>
test   %rax,%rax
je     12c5 <play_file_video+0xf5>
mov    0x2d11(%rip),%rax
mov    (%rax),%eax
test   %eax,0x24(%rsp)
je     130d <play_file_video+0x13d>
movslq %ebx,%r15
lea    (%rsp,%r15,1),%rsi
add    $0x30,%rsi
mov    %ebp,%edx
sub    %r15d,%edx
mov    %r13d,%edi
call   1050 <write@plt>
mov    %rax,%rbx
add    %r15d,%ebx
mov    0x2ccc(%rip),%rax
mov    (%rax),%eax
test   %eax,0x18(%rsp)
je     12c5 <play_file_video+0xf5>
xor    %eax,%eax
call   1090 <getchar@plt>
add    $0xffffff9d,%eax
cmp    $0x17,%eax
ja     12c5 <play_file_video+0xf5>
movslq (%r14,%rax,4),%rax
add    %r14,%rax
jmp    *%rax
mov    %r13d,%edi
call   1030 <videoContinue@plt>
lea    0xd45(%rip),%rdi
jmp    12c0 <play_file_video+0xf0>
mov    %r13d,%edi
xor    %esi,%esi
call   1060 <videoFastForward@plt>
lea    0xd12(%rip),%rdi
jmp    12c0 <play_file_video+0xf0>
mov    %r13d,%edi
mov    $0x2,%esi
call   10f0 <videoSlowMotion@plt>
lea    0xcee(%rip),%rdi
jmp    12c0 <play_file_video+0xf0>
mov    %r13d,%edi
call   10a0 <videoPlay@plt>
lea    0xcf1(%rip),%rdi
jmp    12c0 <play_file_video+0xf0>
mov    %r13d,%edi
call   1080 <videoStop@plt>
lea    0xd01(%rip),%rdi
jmp    12c0 <play_file_video+0xf0>
add    $0x8038,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r13d,%edi
call   1030 <videoContinue@plt>
xor    %edi,%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
%struct.pollfd = type { i32, i32, i32 }
@STDIN_FILENO = global i32 0
@POLLIN = global i32 0
@POLLOUT = global i32 0
@VIDEO_SOURCE_MEMORY = global i32 0
@.str = [17 x i8] c"playback frozen\0A\00"
@.str.1 = [18 x i8] c"playback stopped\0A\00"
@.str.2 = [20 x i8] c"playback continued\0A\00"
@.str.3 = [18 x i8] c"playback started\0A\00"
@.str.4 = [13 x i8] c"fastforward\0A\00"
@.str.5 = [12 x i8] c"slowmotion\0A\00"
define void @play_file_video(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [32768 x i8]
%6 = alloca i32
%7 = alloca i32
%8 = alloca [2 x %struct.pollfd]
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %9
%11 = load i32, i32* @STDIN_FILENO
%12 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %8, i64 0, i64 0
%13 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %12, i32 0, i32 0
store i32 %11, i32* %13
%14 = load i32, i32* @POLLIN
%15 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %8, i64 0, i64 0
%16 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %15, i32 0, i32 1
store i32 %14, i32* %16
%17 = load i32, i32* %4
%18 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %8, i64 0, i64 1
%19 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %18, i32 0, i32 0
store i32 %17, i32* %19
%20 = load i32, i32* @POLLOUT
%21 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %8, i64 0, i64 1
%22 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %21, i32 0, i32 1
store i32 %20, i32* %22
%23 = load i32, i32* %4
%24 = load i32, i32* @VIDEO_SOURCE_MEMORY
%25 = call i32 @videoSelectSource(i32 %23, i32 %24)
%26 = load i32, i32* %4
%27 = call i32 @videoPlay(i32 %26)
%28 = load i32, i32* %3
%29 = getelementptr inbounds [32768 x i8], [32768 x i8]* %5, i64 0, i64 0
%30 = call i32 @read(i32 %28, i8* %29, i32 32768)
store i32 %30, i32* %6
%31 = load i32, i32* %4
%32 = getelementptr inbounds [32768 x i8], [32768 x i8]* %5, i64 0, i64 0
%33 = load i32, i32* %6
%34 = call i64 @write(i32 %31, i8* %32, i32 %33)
br label %35
35: ; preds = %111, %2
%36 = load i32, i32* %3
%37 = getelementptr inbounds [32768 x i8], [32768 x i8]* %5, i64 0, i64 0
%38 = call i32 @read(i32 %36, i8* %37, i32 32768)
store i32 %38, i32* %6
%39 = icmp sge i32 %38, 0
br i1 %39, label %40, label %112
40: ; preds = %35
store i32 0, i32* %7
br label %41
41: ; preds = %110, %40
%42 = load i32, i32* %7
%43 = load i32, i32* %6
%44 = icmp slt i32 %42, %43
br i1 %44, label %45, label %111
45: ; preds = %41
%46 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %8, i64 0, i64 0
%47 = call i64 @poll(%struct.pollfd* %46, i32 2, i32 1)
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %110
49: ; preds = %45
%50 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %8, i64 0, i64 1
%51 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %50, i32 0, i32 2
%52 = load i32, i32* %51
%53 = load i32, i32* @POLLOUT
%54 = and i32 %52, %53
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %70
56: ; preds = %49
%57 = load i32, i32* %4
%58 = getelementptr inbounds [32768 x i8], [32768 x i8]* %5, i64 0, i64 0
%59 = load i32, i32* %7
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i8, i8* %58, i64 %60
%62 = load i32, i32* %6
%63 = load i32, i32* %7
%64 = sub nsw i32 %62, %63
%65 = call i64 @write(i32 %57, i8* %61, i32 %64)
%66 = load i32, i32* %7
%67 = sext i32 %66 to i64
%68 = add nsw i64 %67, %65
%69 = trunc i64 %68 to i32
store i32 %69, i32* %7
br label %70
70: ; preds = %56, %49
%71 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %8, i64 0, i64 0
%72 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %71, i32 0, i32 2
%73 = load i32, i32* %72
%74 = load i32, i32* @POLLIN
%75 = and i32 %73, %74
%76 = icmp ne i32 %75, 0
br i1 %76, label %77, label %109
77: ; preds = %70
%78 = call i32 (...) @getchar()
store i32 %78, i32* %10
%79 = load i32, i32* %10
switch i32 %79, label %108 [
i32 122, label %80
i32 115, label %84
i32 99, label %88
i32 112, label %92
i32 102, label %96
i32 109, label %100
i32 113, label %104
]
80: ; preds = %77
%81 = load i32, i32* %4
%82 = call i32 @videoFreeze(i32 %81)
%83 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %9
br label %108
84: ; preds = %77
%85 = load i32, i32* %4
%86 = call i32 @videoStop(i32 %85)
%87 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %9
br label %108
88: ; preds = %77
%89 = load i32, i32* %4
%90 = call i32 @videoContinue(i32 %89)
%91 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %9
br label %108
92: ; preds = %77
%93 = load i32, i32* %4
%94 = call i32 @videoPlay(i32 %93)
%95 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %9
br label %108
96: ; preds = %77
%97 = load i32, i32* %4
%98 = call i32 @videoFastForward(i32 %97, i32 0)
%99 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %9
br label %108
100: ; preds = %77
%101 = load i32, i32* %4
%102 = call i32 @videoSlowMotion(i32 %101, i32 2)
%103 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %9
br label %108
104: ; preds = %77
%105 = load i32, i32* %4
%106 = call i32 @videoContinue(i32 %105)
%107 = call i32 @exit(i32 0)
unreachable
108: ; preds = %77, %100, %96, %92, %88, %84, %80
br label %109
109: ; preds = %108, %70
br label %110
110: ; preds = %109, %45
br label %41
111: ; preds = %41
br label %35
112: ; preds = %35
ret void
}

LLVM IR (-O2):
%struct.pollfd = type { i32, i32, i32 }
@STDIN_FILENO = global i32 0
@POLLIN = global i32 0
@POLLOUT = global i32 0
@VIDEO_SOURCE_MEMORY = global i32 0
@str = [11 x i8] c"slowmotion\00"
@str.6 = [12 x i8] c"fastforward\00"
@str.7 = [17 x i8] c"playback started\00"
@str.8 = [19 x i8] c"playback continued\00"
@str.9 = [17 x i8] c"playback stopped\00"
@str.10 = [16 x i8] c"playback frozen\00"
define void @play_file_video(i32 %0, i32 %1) {
%3 = alloca [32768 x i8]
%4 = alloca [2 x %struct.pollfd]
%5 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%6 = bitcast [2 x %struct.pollfd]* %4 to i8*
%7 = load i32, i32* @STDIN_FILENO
%8 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %4, i64 0, i64 0
%9 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %4, i64 0, i64 0, i32 0
store i32 %7, i32* %9
%10 = load i32, i32* @POLLIN
%11 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %4, i64 0, i64 0, i32 1
store i32 %10, i32* %11
%12 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %4, i64 0, i64 1, i32 0
store i32 %1, i32* %12
%13 = load i32, i32* @POLLOUT
%14 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %4, i64 0, i64 1, i32 1
store i32 %13, i32* %14
%15 = load i32, i32* @VIDEO_SOURCE_MEMORY
%16 = tail call i32 @videoSelectSource(i32 %1, i32 %15)
%17 = tail call i32 @videoPlay(i32 %1)
%18 = call i32 @read(i32 %0, i8* %5, i32 32768)
%19 = call i64 @write(i32 %1, i8* %5, i32 %18)
%20 = call i32 @read(i32 %0, i8* %5, i32 32768)
%21 = icmp sgt i32 %20, -1
br i1 %21, label %22, label %76
22: ; preds = %2
%23 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %4, i64 0, i64 1, i32 2
%24 = getelementptr inbounds [2 x %struct.pollfd], [2 x %struct.pollfd]* %4, i64 0, i64 0, i32 2
br label %28
25: ; preds = %73, %28
%26 = call i32 @read(i32 %0, i8* %5, i32 32768)
%27 = icmp sgt i32 %26, -1
br i1 %27, label %28, label %76
28: ; preds = %22, %25
%29 = phi i32 [ %20, %22 ], [ %26, %25 ]
%30 = icmp eq i32 %29, 0
br i1 %30, label %25, label %31
31: ; preds = %28, %73
%32 = phi i32 [ %74, %73 ], [ 0, %28 ]
%33 = call i64 @poll(%struct.pollfd* %8, i32 2, i32 1)
%34 = icmp eq i64 %33, 0
br i1 %34, label %73, label %35
35: ; preds = %31
%36 = load i32, i32* %23
%37 = load i32, i32* @POLLOUT
%38 = and i32 %37, %36
%39 = icmp eq i32 %38, 0
br i1 %39, label %47, label %40
40: ; preds = %35
%41 = sext i32 %32 to i64
%42 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %41
%43 = sub nsw i32 %29, %32
%44 = call i64 @write(i32 %1, i8* %42, i32 %43)
%45 = trunc i64 %44 to i32
%46 = add i32 %32, %45
br label %47
47: ; preds = %40, %35
%48 = phi i32 [ %46, %40 ], [ %32, %35 ]
%49 = load i32, i32* %24
%50 = load i32, i32* @POLLIN
%51 = and i32 %50, %49
%52 = icmp eq i32 %51, 0
br i1 %52, label %73, label %53
53: ; preds = %47
%54 = call i32 (...) @getchar()
switch i32 %54, label %73 [
i32 122, label %55
i32 115, label %57
i32 99, label %59
i32 112, label %61
i32 102, label %63
i32 109, label %65
i32 113, label %67
]
55: ; preds = %53
%56 = call i32 @videoFreeze(i32 %1)
br label %70
57: ; preds = %53
%58 = call i32 @videoStop(i32 %1)
br label %70
59: ; preds = %53
%60 = call i32 @videoContinue(i32 %1)
br label %70
61: ; preds = %53
%62 = call i32 @videoPlay(i32 %1)
br label %70
63: ; preds = %53
%64 = call i32 @videoFastForward(i32 %1, i32 0)
br label %70
65: ; preds = %53
%66 = call i32 @videoSlowMotion(i32 %1, i32 2)
br label %70
67: ; preds = %53
%68 = call i32 @videoContinue(i32 %1)
%69 = call i32 @exit(i32 0)
unreachable
70: ; preds = %65, %63, %61, %59, %57, %55
%71 = phi i8* [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.10, i64 0, i64 0), %55 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @str.9, i64 0, i64 0), %57 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @str.8, i64 0, i64 0), %59 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @str.7, i64 0, i64 0), %61 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @str.6, i64 0, i64 0), %63 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0), %65 ]
%72 = call i32 @puts(i8* dereferenceable(1) %71)
br label %73
73: ; preds = %70, %53, %47, %31
%74 = phi i32 [ %48, %47 ], [ %32, %31 ], [ %48, %53 ], [ %48, %70 ]
%75 = icmp sgt i32 %29, %74
br i1 %75, label %31, label %25
76: ; preds = %25, %2
ret void
}