#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 *);
int main() {
  int hour1, minute1;
  int hour2, minute2;
  scanf("%d %d", &hour1, &minute1);
  scanf("%d %d", &hour2, &minute2);
  printf("时间差为%d小时%d分钟",
         ((hour2 * 60 + minute2) - (hour1 * 60 + minute1)) / 60,
         ((hour2 * 60 + minute2) - (hour1 * 60 + minute1)) % 60);
  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>
lea    0xeb6(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <scanf@plt>
imul   $0x3c,-0x10(%rbp),%eax
add    -0x14(%rbp),%eax
imul   $0x3c,-0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
sub    %ecx,%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
imul   $0x3c,-0x10(%rbp),%eax
add    -0x14(%rbp),%eax
imul   $0x3c,-0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
sub    %ecx,%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%ecx
sub    0xc(%rsp),%eax
imul   $0x3c,%eax,%eax
sub    0x8(%rsp),%ecx
add    %eax,%ecx
movslq %ecx,%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    0xe7e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [29 x i8] c"\E6\97\B6\E9\97\B4\E5\B7\AE\E4\B8\BA%d\E5\B0\8F\E6\97\B6%d\E5\88\86\E9\92\9F\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %4, i32* %5)
%8 = load i32, i32* %4
%9 = mul nsw i32 %8, 60
%10 = load i32, i32* %5
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %2
%13 = mul nsw i32 %12, 60
%14 = load i32, i32* %3
%15 = add nsw i32 %13, %14
%16 = sub nsw i32 %11, %15
%17 = sdiv i32 %16, 60
%18 = load i32, i32* %4
%19 = mul nsw i32 %18, 60
%20 = load i32, i32* %5
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %2
%23 = mul nsw i32 %22, 60
%24 = load i32, i32* %3
%25 = add nsw i32 %23, %24
%26 = sub nsw i32 %21, %25
%27 = srem i32 %26, 60
%28 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %17, i32 %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [29 x i8] c"\E6\97\B6\E9\97\B4\E5\B7\AE\E4\B8\BA%d\E5\B0\8F\E6\97\B6%d\E5\88\86\E9\92\9F\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%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 ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%10 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = load i32, i32* %1
%14 = load i32, i32* %2
%15 = sub i32 %11, %13
%16 = mul i32 %15, 60
%17 = sub i32 %12, %14
%18 = add i32 %17, %16
%19 = sdiv i32 %18, 60
%20 = srem i32 %18, 60
%21 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %19, i32 %20)
ret i32 0
}