#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 /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int sec = 0, temp, i;
  for (i = 0; i < 4; i++) {
    scanf("%d", &temp);
    sec += temp;
  }
  printf("%d\n%d\n", sec / 60, sec % 60);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    116e <main+0x4e>
lea    0xeb2(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113d <main+0x1d>
mov    -0x8(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0x8(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed1(%rip),%rbx
lea    0xc(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%ebp
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
add    0xc(%rsp),%ebp
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
add    0xc(%rsp),%ebp
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
add    0xc(%rsp),%ebp
movslq %ebp,%rdx
imul   $0xffffffff88888889,%rdx,%rsi
shr    $0x20,%rsi
add    %edx,%esi
mov    %esi,%eax
shr    $0x1f,%eax
sar    $0x5,%esi
add    %eax,%esi
imul   $0x3c,%esi,%eax
sub    %eax,%edx
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%d\0A%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %4
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 4
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = add nsw i32 %11, %10
store i32 %12, i32* %2
br label %13
13: ; preds = %8
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
br label %5
16: ; preds = %5
%17 = load i32, i32* %2
%18 = sdiv i32 %17, 60
%19 = load i32, i32* %2
%20 = srem i32 %19, 60
%21 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %18, i32 %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%d\0A%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, %4
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%9 = load i32, i32* %1
%10 = add nsw i32 %9, %7
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%12 = load i32, i32* %1
%13 = add nsw i32 %12, %10
%14 = sdiv i32 %13, 60
%15 = srem i32 %13, 60
%16 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %14, i32 %15)
ret i32 0
}