#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*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int /*<<< orphan*/ system(char *);
int main() {
  int A, B;
  scanf("%d %d", &A, &B);
  system("clear");
  if (A == B)
    printf("O JOGO DUROU %d HORA(s)\n", 24);
  else if (A > B)
    printf("O JOGO DUROU %d HORA(s)\n", A - B);
  else
    printf("O JOGO DUROU %d HORA(s)\n", B - A);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
lea    0xeac(%rip),%rdi
call   1030 <system@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1181 <main+0x51>
lea    0xe9a(%rip),%rdi
mov    $0x18,%esi
call   1040 <printf@plt>
jmp    11bb <main+0x8b>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    11a4 <main+0x74>
mov    -0x8(%rbp),%esi
sub    -0xc(%rbp),%esi
lea    0xe72(%rip),%rdi
call   1040 <printf@plt>
jmp    11b6 <main+0x86>
mov    -0xc(%rbp),%esi
sub    -0x8(%rbp),%esi
lea    0xe5b(%rip),%rdi
call   1040 <printf@plt>
jmp    11bb <main+0x8b>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
lea    0xeba(%rip),%rdi
call   1030 <system@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%ecx
mov    $0x18,%esi
mov    %eax,%edx
sub    %ecx,%edx
je     116d <main+0x3d>
jle    1169 <main+0x39>
mov    %edx,%esi
jmp    116d <main+0x3d>
sub    %eax,%ecx
mov    %ecx,%esi
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [6 x i8] c"clear\00"
@.str.2 = [25 x i8] c"O JOGO DUROU %d HORA(s)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = icmp eq i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 24)
br label %26
11: ; preds = %0
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = icmp sgt i32 %12, %13
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = sub nsw i32 %16, %17
%19 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %18)
br label %25
20: ; preds = %11
%21 = load i32, i32* %3
%22 = load i32, i32* %2
%23 = sub nsw i32 %21, %22
%24 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %23)
br label %25
25: ; preds = %20, %15
br label %26
26: ; preds = %25, %9
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [6 x i8] c"clear\00"
@.str.2 = [25 x i8] c"O JOGO DUROU %d HORA(s)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = icmp eq i32 %7, %8
br i1 %9, label %16, label %10
10: ; preds = %0
%11 = icmp sgt i32 %7, %8
br i1 %11, label %12, label %14
12: ; preds = %10
%13 = sub nsw i32 %7, %8
br label %16
14: ; preds = %10
%15 = sub nsw i32 %8, %7
br label %16
16: ; preds = %0, %12, %14
%17 = phi i32 [ %13, %12 ], [ %15, %14 ], [ 24, %0 ]
%18 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %17)
ret i32 0
}