#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*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, short, short, short);
int /*<<< orphan*/ scanf(char *, short *, short *, short *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main() {
  short h, m, s;
  freopen("time.in", "r", stdin);
  freopen("time.out", "w", stdout);
  scanf("%hd:%hd:%hd", &h, &m, &s);
  s *= 2;
  m *= 2;
  h *= 2;
  if (s > 59) {
    m += 1;
    s -= 60;
  }
  if (m > 59) {
    h += 1;
    m -= 60;
  }
  printf("%02hd:%02hd:%02hd\n", h, m, s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edx
lea    0xeb1(%rip),%rdi
lea    0xeb2(%rip),%rsi
call   1040 <freopen@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edx
lea    0xe9f(%rip),%rdi
lea    0xea1(%rip),%rsi
call   1040 <freopen@plt>
lea    0xe97(%rip),%rdi
lea    -0x6(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xa(%rbp),%rcx
call   1050 <scanf@plt>
movswl -0xa(%rbp),%eax
shl    $0x1,%eax
mov    %ax,-0xa(%rbp)
movswl -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %ax,-0x8(%rbp)
movswl -0x6(%rbp),%eax
shl    $0x1,%eax
mov    %ax,-0x6(%rbp)
movswl -0xa(%rbp),%eax
cmp    $0x3b,%eax
jle    11d3 <main+0xa3>
movswl -0x8(%rbp),%eax
add    $0x1,%eax
mov    %ax,-0x8(%rbp)
movswl -0xa(%rbp),%eax
sub    $0x3c,%eax
mov    %ax,-0xa(%rbp)
movswl -0x8(%rbp),%eax
cmp    $0x3b,%eax
jle    11f6 <main+0xc6>
movswl -0x6(%rbp),%eax
add    $0x1,%eax
mov    %ax,-0x6(%rbp)
movswl -0x8(%rbp),%eax
sub    $0x3c,%eax
mov    %ax,-0x8(%rbp)
mov    -0x6(%rbp),%cx
mov    -0x8(%rbp),%ax
lea    0xe1c(%rip),%rdi
movswl %cx,%esi
movswl %ax,%edx
movswl -0xa(%rbp),%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edx
lea    0xebf(%rip),%rdi
lea    0xec0(%rip),%rsi
call   1040 <freopen@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edx
lea    0xead(%rip),%rdi
lea    0xeaf(%rip),%rsi
call   1040 <freopen@plt>
lea    0xea5(%rip),%rdi
lea    0x6(%rsp),%rsi
lea    0x2(%rsp),%rdx
lea    0x4(%rsp),%rcx
call   1050 <scanf@plt>
movzwl 0x4(%rsp),%eax
add    %eax,%eax
mov    %ax,0x4(%rsp)
movzwl 0x2(%rsp),%ecx
add    %ecx,%ecx
mov    %cx,0x2(%rsp)
movzwl 0x6(%rsp),%edx
add    %edx,%edx
mov    %dx,0x6(%rsp)
cmp    $0x3c,%ax
jl     11be <main+0x8e>
or     $0x1,%ecx
mov    %cx,0x2(%rsp)
add    $0xffffffc4,%eax
mov    %ax,0x4(%rsp)
cmp    $0x3c,%cx
jl     11d4 <main+0xa4>
or     $0x1,%edx
mov    %dx,0x6(%rsp)
add    $0xffffffc4,%ecx
mov    %cx,0x2(%rsp)
movswl %dx,%esi
movswl %cx,%edx
movswl %ax,%ecx
lea    0xe3d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"time.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [9 x i8] c"time.out\00"
@.str.3 = [2 x i8] c"w\00"
@stdout = global i32 0
@.str.4 = [12 x i8] c"%hd:%hd:%hd\00"
@.str.5 = [19 x i8] c"%02hd:%02hd:%02hd\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i16
%4 = alloca i16
store i32 0, i32* %1
%5 = load i32, i32* @stdin
%6 = call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @stdout
%8 = call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i16* %2, i16* %3, i16* %4)
%10 = load i16, i16* %4
%11 = sext i16 %10 to i32
%12 = mul nsw i32 %11, 2
%13 = trunc i32 %12 to i16
store i16 %13, i16* %4
%14 = load i16, i16* %3
%15 = sext i16 %14 to i32
%16 = mul nsw i32 %15, 2
%17 = trunc i32 %16 to i16
store i16 %17, i16* %3
%18 = load i16, i16* %2
%19 = sext i16 %18 to i32
%20 = mul nsw i32 %19, 2
%21 = trunc i32 %20 to i16
store i16 %21, i16* %2
%22 = load i16, i16* %4
%23 = sext i16 %22 to i32
%24 = icmp sgt i32 %23, 59
br i1 %24, label %25, label %34
25: ; preds = %0
%26 = load i16, i16* %3
%27 = sext i16 %26 to i32
%28 = add nsw i32 %27, 1
%29 = trunc i32 %28 to i16
store i16 %29, i16* %3
%30 = load i16, i16* %4
%31 = sext i16 %30 to i32
%32 = sub nsw i32 %31, 60
%33 = trunc i32 %32 to i16
store i16 %33, i16* %4
br label %34
34: ; preds = %25, %0
%35 = load i16, i16* %3
%36 = sext i16 %35 to i32
%37 = icmp sgt i32 %36, 59
br i1 %37, label %38, label %47
38: ; preds = %34
%39 = load i16, i16* %2
%40 = sext i16 %39 to i32
%41 = add nsw i32 %40, 1
%42 = trunc i32 %41 to i16
store i16 %42, i16* %2
%43 = load i16, i16* %3
%44 = sext i16 %43 to i32
%45 = sub nsw i32 %44, 60
%46 = trunc i32 %45 to i16
store i16 %46, i16* %3
br label %47
47: ; preds = %38, %34
%48 = load i16, i16* %2
%49 = load i16, i16* %3
%50 = load i16, i16* %4
%51 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i16 signext %48, i16 signext %49, i16 signext %50)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"time.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [9 x i8] c"time.out\00"
@.str.3 = [2 x i8] c"w\00"
@stdout = global i32 0
@.str.4 = [12 x i8] c"%hd:%hd:%hd\00"
@.str.5 = [19 x i8] c"%02hd:%02hd:%02hd\0A\00"
define i32 @main() {
%1 = alloca i16
%2 = alloca i16
%3 = alloca i16
%4 = bitcast i16* %1 to i8*
%5 = bitcast i16* %2 to i8*
%6 = bitcast i16* %3 to i8*
%7 = load i32, i32* @stdin
%8 = tail call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @stdout
%10 = tail call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %9)
%11 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i16* %1, i16* %2, i16* %3)
%12 = load i16, i16* %3
%13 = shl i16 %12, 1
store i16 %13, i16* %3
%14 = load i16, i16* %2
%15 = shl i16 %14, 1
store i16 %15, i16* %2
%16 = load i16, i16* %1
%17 = shl i16 %16, 1
store i16 %17, i16* %1
%18 = icmp sgt i16 %13, 59
br i1 %18, label %19, label %22
19: ; preds = %0
%20 = or i16 %15, 1
store i16 %20, i16* %2
%21 = add nsw i16 %13, -60
store i16 %21, i16* %3
br label %22
22: ; preds = %19, %0
%23 = phi i16 [ %21, %19 ], [ %13, %0 ]
%24 = phi i16 [ %20, %19 ], [ %15, %0 ]
%25 = icmp sgt i16 %24, 59
br i1 %25, label %26, label %29
26: ; preds = %22
%27 = or i16 %17, 1
store i16 %27, i16* %1
%28 = add nsw i16 %24, -60
store i16 %28, i16* %2
br label %29
29: ; preds = %26, %22
%30 = phi i16 [ %28, %26 ], [ %24, %22 ]
%31 = phi i16 [ %27, %26 ], [ %17, %22 ]
%32 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i16 signext %31, i16 signext %30, i16 signext %23)
ret i32 0
}