#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, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int c1, c2;
  scanf("%d %d", &c1, &c2);
  int t = c2 - c1;
  int left = t % 100;
  if (left < 50)
    t = t / 100;
  else
    t = t / 100 + 1;
  int h = t / 3600;
  int m = (t % 3600) / 60;
  int s = t % 60;
  printf("%.2d:%.2d:%.2d", h, m, s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
cmpl   $0x32,-0x14(%rbp)
jge    1177 <main+0x57>
mov    -0x10(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
jmp    1188 <main+0x68>
mov    -0x10(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,-0x20(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
lea    0xe3a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%eax
sub    0x4(%rsp),%eax
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x64,%ecx,%edx
sub    %edx,%eax
xor    %edx,%edx
cmp    $0x32,%eax
setge  %dl
add    %ecx,%edx
movslq %edx,%rcx
imul   $0xffffffff91a2b3c5,%rcx,%rsi
shr    $0x20,%rsi
add    %ecx,%esi
mov    %esi,%eax
shr    $0x1f,%eax
sar    $0xb,%esi
add    %eax,%esi
imul   $0xe10,%esi,%eax
mov    %ecx,%edx
sub    %eax,%edx
movswl %dx,%eax
imul   $0xffff8889,%eax,%eax
shr    $0x10,%eax
add    %edx,%eax
movzwl %ax,%eax
movswl %ax,%edx
shr    $0xf,%eax
sar    $0x5,%edx
add    %eax,%edx
movswl %dx,%edx
imul   $0xffffffff88888889,%rcx,%rax
shr    $0x20,%rax
add    %ecx,%eax
mov    %eax,%edi
shr    $0x1f,%edi
sar    $0x5,%eax
add    %edi,%eax
imul   $0x3c,%eax,%eax
sub    %eax,%ecx
lea    0xe3c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [15 x i8] c"%.2d:%.2d:%.2d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = sub nsw i32 %10, %11
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = srem i32 %13, 100
store i32 %14, i32* %5
%15 = load i32, i32* %5
%16 = icmp slt i32 %15, 50
br i1 %16, label %17, label %20
17: ; preds = %0
%18 = load i32, i32* %4
%19 = sdiv i32 %18, 100
store i32 %19, i32* %4
br label %24
20: ; preds = %0
%21 = load i32, i32* %4
%22 = sdiv i32 %21, 100
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %24
24: ; preds = %20, %17
%25 = load i32, i32* %4
%26 = sdiv i32 %25, 3600
store i32 %26, i32* %6
%27 = load i32, i32* %4
%28 = srem i32 %27, 3600
%29 = sdiv i32 %28, 60
store i32 %29, i32* %7
%30 = load i32, i32* %4
%31 = srem i32 %30, 60
store i32 %31, i32* %8
%32 = load i32, i32* %6
%33 = load i32, i32* %7
%34 = load i32, i32* %8
%35 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %32, i32 %33, i32 %34)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [15 x i8] c"%.2d:%.2d:%.2d\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 = load i32, i32* %2
%7 = load i32, i32* %1
%8 = sub nsw i32 %6, %7
%9 = srem i32 %8, 100
%10 = icmp sgt i32 %9, 49
%11 = sdiv i32 %8, 100
%12 = zext i1 %10 to i32
%13 = add nsw i32 %11, %12
%14 = sdiv i32 %13, 3600
%15 = srem i32 %13, 3600
%16 = trunc i32 %15 to i16
%17 = sdiv i16 %16, 60
%18 = sext i16 %17 to i32
%19 = srem i32 %13, 60
%20 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %14, i32 %18, i32 %19)
ret i32 0
}