#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 Time {
  int dummy;
};

/* Variables and functions */
struct Time *proceedTime_0(struct Time *);
struct Time *roundingTime_0(struct Time *, int, int, int);
int node_curTime(int pulse1s, struct Time *curTime_at_last, int dh, int dm,
                 int ds, struct Time **output) {
  struct Time *_tmp017;
  if (pulse1s == 1) {
    _tmp017 = roundingTime_0(proceedTime_0(curTime_at_last), dh, dm, ds);
  } else if (pulse1s == 0) {
    _tmp017 = roundingTime_0(curTime_at_last, dh, dm, ds);
  }
  *output = _tmp017;
  return 1;
}


x86 assembly (clang, -O0):
<node_curTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    116a <node_curTime+0x4a>
mov    -0x10(%rbp),%rdi
call   1040 <proceedTime_0@plt>
mov    %rax,%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1030 <roundingTime_0@plt>
mov    %rax,-0x30(%rbp)
jmp    118f <node_curTime+0x6f>
cmpl   $0x0,-0x4(%rbp)
jne    118a <node_curTime+0x6a>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1030 <roundingTime_0@plt>
mov    %rax,-0x30(%rbp)
jmp    118f <node_curTime+0x6f>
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<node_curTime>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r9,%r15
mov    %r8d,%r14d
mov    %ecx,%ebp
mov    %edx,%ebx
test   %edi,%edi
je     1145 <node_curTime+0x25>
cmp    $0x1,%edi
jne    1154 <node_curTime+0x34>
mov    %rsi,%rdi
call   1040 <proceedTime_0@plt>
mov    %rax,%rsi
mov    %rsi,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1030 <roundingTime_0@plt>
mov    %rax,(%r15)
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.Time = type { i32 }
define i32 @node_curTime(i32 %0, %struct.Time* %1, i32 %2, i32 %3, i32 %4, %struct.Time** %5) {
%7 = alloca i32
%8 = alloca %struct.Time*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca %struct.Time**
%13 = alloca %struct.Time*
store i32 %0, i32* %7
store %struct.Time* %1, %struct.Time** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store %struct.Time** %5, %struct.Time*** %12
%14 = load i32, i32* %7
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %23
16: ; preds = %6
%17 = load %struct.Time*, %struct.Time** %8
%18 = call %struct.Time* @proceedTime_0(%struct.Time* %17)
%19 = load i32, i32* %9
%20 = load i32, i32* %10
%21 = load i32, i32* %11
%22 = call %struct.Time* @roundingTime_0(%struct.Time* %18, i32 %19, i32 %20, i32 %21)
store %struct.Time* %22, %struct.Time** %13
br label %33
23: ; preds = %6
%24 = load i32, i32* %7
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %32
26: ; preds = %23
%27 = load %struct.Time*, %struct.Time** %8
%28 = load i32, i32* %9
%29 = load i32, i32* %10
%30 = load i32, i32* %11
%31 = call %struct.Time* @roundingTime_0(%struct.Time* %27, i32 %28, i32 %29, i32 %30)
store %struct.Time* %31, %struct.Time** %13
br label %32
32: ; preds = %26, %23
br label %33
33: ; preds = %32, %16
%34 = load %struct.Time*, %struct.Time** %13
%35 = load %struct.Time**, %struct.Time*** %12
store %struct.Time* %34, %struct.Time** %35
ret i32 1
}

LLVM IR (-O2):
%struct.Time = type { i32 }
define i32 @node_curTime(i32 %0, %struct.Time* %1, i32 %2, i32 %3, i32 %4, %struct.Time** nocapture writeonly %5) {
switch i32 %0, label %12 [
i32 1, label %7
i32 0, label %9
]
7: ; preds = %6
%8 = tail call %struct.Time* @proceedTime_0(%struct.Time* %1)
br label %9
9: ; preds = %6, %7
%10 = phi %struct.Time* [ %8, %7 ], [ %1, %6 ]
%11 = tail call %struct.Time* @roundingTime_0(%struct.Time* %10, i32 %2, i32 %3, i32 %4)
br label %12
12: ; preds = %9, %6
%13 = phi %struct.Time* [ undef, %6 ], [ %11, %9 ]
store %struct.Time* %13, %struct.Time** %5
ret i32 1
}