#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 /*<<< orphan*/ backward(int, int, int);
int /*<<< orphan*/ forward(int, int, int);
int /*<<< orphan*/ scanf(char *, char *, int *, int *, int *);
void test_case() {
  char x[2];
  int d, h, m;
  scanf("%s %d %d %d", x, &d, &h, &m);
  if (x[0] == 'F')
    forward(d, h, m);
  else
    backward(d, h, m);
}


x86 assembly (clang, -O0):
<test_case>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x2(%rbp),%rsi
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x10(%rbp),%r8
call   1050 <scanf@plt>
movsbl -0x2(%rbp),%eax
cmp    $0x46,%eax
jne    1174 <test_case+0x44>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <forward@plt>
jmp    1182 <test_case+0x52>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <backward@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_case>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0xa(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
call   1050 <scanf@plt>
cmpb   $0x46,0xa(%rsp)
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
jne    1171 <test_case+0x41>
call   1040 <forward@plt>
add    $0x18,%rsp
ret
call   1030 <backward@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"%s %d %d %d\00"
define void @test_case() {
%1 = alloca [2 x i8]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %5, i32* %2, i32* %3, i32* %4)
%10 = load i8, i8* %5
%11 = icmp eq i8 %10, 70
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = load i32, i32* %4
br i1 %11, label %15, label %17
15: ; preds = %0
%16 = call i32 @forward(i32 %12, i32 %13, i32 %14)
br label %19
17: ; preds = %0
%18 = call i32 @backward(i32 %12, i32 %13, i32 %14)
br label %19
19: ; preds = %17, %15
ret void
}