#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 */
struct tm {
  scalar_t__ tm_hour;
  scalar_t__ tm_min;
  scalar_t__ tm_sec;
};

/* Variables and functions */
int /*<<< orphan*/ mktime(struct tm *);
void subtract_time(struct tm *fval, struct tm *sval) {
  fval->tm_sec += sval->tm_sec;
  fval->tm_min += sval->tm_min;
  fval->tm_hour += sval->tm_hour;
  mktime(fval);
}


x86 assembly (clang, -O0):
<subtract_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rcx
mov    -0x8(%rbp),%rax
add    0x10(%rax),%rcx
mov    %rcx,0x10(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x8(%rbp),%rax
add    0x8(%rax),%rcx
mov    %rcx,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
add    (%rax),%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <mktime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subtract_time>:
mov    0x10(%rsi),%rax
add    %rax,0x10(%rdi)
movdqu (%rsi),%xmm0
movdqu (%rdi),%xmm1
paddq  %xmm0,%xmm1
movdqu %xmm1,(%rdi)
jmp    1030 <mktime@plt>

LLVM IR (-O0):
%struct.tm = type { i64, i64, i64 }
define void @subtract_time(%struct.tm* %0, %struct.tm* %1) {
%3 = alloca %struct.tm*
%4 = alloca %struct.tm*
store %struct.tm* %0, %struct.tm** %3
store %struct.tm* %1, %struct.tm** %4
%5 = load %struct.tm*, %struct.tm** %4
%6 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 2
%7 = load i64, i64* %6
%8 = load %struct.tm*, %struct.tm** %3
%9 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 2
%10 = load i64, i64* %9
%11 = add nsw i64 %10, %7
store i64 %11, i64* %9
%12 = load %struct.tm*, %struct.tm** %4
%13 = getelementptr inbounds %struct.tm, %struct.tm* %12, i32 0, i32 1
%14 = load i64, i64* %13
%15 = load %struct.tm*, %struct.tm** %3
%16 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 1
%17 = load i64, i64* %16
%18 = add nsw i64 %17, %14
store i64 %18, i64* %16
%19 = load %struct.tm*, %struct.tm** %4
%20 = getelementptr inbounds %struct.tm, %struct.tm* %19, i32 0, i32 0
%21 = load i64, i64* %20
%22 = load %struct.tm*, %struct.tm** %3
%23 = getelementptr inbounds %struct.tm, %struct.tm* %22, i32 0, i32 0
%24 = load i64, i64* %23
%25 = add nsw i64 %24, %21
store i64 %25, i64* %23
%26 = load %struct.tm*, %struct.tm** %3
%27 = call i32 @mktime(%struct.tm* %26)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i64, i64, i64 }
define void @subtract_time(%struct.tm* nocapture %0, %struct.tm* nocapture %1) {
%3 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 2
%4 = load i64, i64* %3
%5 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 2
%6 = load i64, i64* %5
%7 = add nsw i64 %6, %4
store i64 %7, i64* %5
%8 = bitcast %struct.tm* %1 to <2 x i64>*
%9 = load <2 x i64>, <2 x i64>* %8
%10 = bitcast %struct.tm* %0 to <2 x i64>*
%11 = load <2 x i64>, <2 x i64>* %10
%12 = add nsw <2 x i64> %11, %9
%13 = bitcast %struct.tm* %0 to <2 x i64>*
store <2 x i64> %12, <2 x i64>* %13
%14 = tail call i32 @mktime(%struct.tm* %0)
ret void
}