#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 */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_hour;
  int tm_min;
  int tm_sec;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int timeCmp(int, int, int, int, int, int);
int inIntervalo(int h1, int m1, int s1, int h2, int m2, int s2) {
  struct tm *taim;
  time_t tiempo;
  time(&tiempo);
  taim = localtime(&tiempo);
  int ha = taim->tm_hour, ma = taim->tm_min, sa = taim->tm_sec;
  if (timeCmp(h1, m1, s1, h2, m2, s2) == -1) {
    if ((timeCmp(h1, m1, s1, ha, ma, sa) == -1) &&
        (timeCmp(ha, ma, sa, h2, m2, s2) == -1))
      return 1;
    else
      return 0;
  } else if ((timeCmp(ha, ma, sa, h1, m1, s1) == 1) ||
             (timeCmp(ha, ma, sa, h2, m2, s2) == -1))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<inIntervalo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
lea    -0x2c(%rbp),%rdi
call   1040 <time@plt>
lea    -0x2c(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x38(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
call   1050 <timeCmp@plt>
cmp    $0xffffffff,%eax
jne    11fd <inIntervalo+0xcd>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x30(%rbp),%ecx
mov    -0x34(%rbp),%r8d
mov    -0x38(%rbp),%r9d
call   1050 <timeCmp@plt>
cmp    $0xffffffff,%eax
jne    11f1 <inIntervalo+0xc1>
mov    -0x30(%rbp),%edi
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
call   1050 <timeCmp@plt>
cmp    $0xffffffff,%eax
jne    11f1 <inIntervalo+0xc1>
movl   $0x1,-0x4(%rbp)
jmp    1254 <inIntervalo+0x124>
movl   $0x0,-0x4(%rbp)
jmp    1254 <inIntervalo+0x124>
mov    -0x30(%rbp),%edi
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0x10(%rbp),%r9d
call   1050 <timeCmp@plt>
cmp    $0x1,%eax
je     1241 <inIntervalo+0x111>
mov    -0x30(%rbp),%edi
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
call   1050 <timeCmp@plt>
cmp    $0xffffffff,%eax
jne    124d <inIntervalo+0x11d>
movl   $0x1,-0x4(%rbp)
jmp    1254 <inIntervalo+0x124>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inIntervalo>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9d,%r13d
mov    %r8d,%ebp
mov    %ecx,%r14d
mov    %edx,%ebx
mov    %esi,%r15d
mov    %edi,%r12d
lea    0x24(%rsp),%rdi
call   1040 <time@plt>
lea    0x24(%rsp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%ecx
mov    %ecx,0x18(%rsp)
mov    0x4(%rax),%ecx
mov    %ecx,0x1c(%rsp)
mov    0x8(%rax),%eax
mov    %eax,0x20(%rsp)
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebx,0x14(%rsp)
mov    %ebx,%edx
mov    %r14d,0x8(%rsp)
mov    %r14d,%ecx
mov    %ebp,0xc(%rsp)
mov    %ebp,%r8d
mov    %r13d,0x10(%rsp)
mov    %r13d,%r9d
call   1050 <timeCmp@plt>
cmp    $0xffffffff,%eax
je     11fd <inIntervalo+0xcd>
mov    0x18(%rsp),%r13d
mov    %r13d,%edi
mov    0x1c(%rsp),%r14d
mov    %r14d,%esi
mov    0x20(%rsp),%ebp
mov    %ebp,%edx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    0x14(%rsp),%r9d
call   1050 <timeCmp@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x1,%ecx
je     124a <inIntervalo+0x11a>
mov    %r13d,%edi
mov    %r14d,%esi
mov    %ebp,%edx
mov    0x8(%rsp),%ecx
mov    0xc(%rsp),%r8d
mov    0x10(%rsp),%r9d
call   1050 <timeCmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
sete   %al
jmp    124a <inIntervalo+0x11a>
mov    %r12d,%edi
mov    %r15d,%esi
mov    0x14(%rsp),%edx
mov    0x18(%rsp),%r15d
mov    %r15d,%ecx
mov    0x1c(%rsp),%r14d
mov    %r14d,%r8d
mov    0x20(%rsp),%ebp
mov    %ebp,%r9d
call   1050 <timeCmp@plt>
cmp    $0xffffffff,%eax
jne    1248 <inIntervalo+0x118>
mov    %r15d,%edi
mov    %r14d,%esi
mov    %ebp,%edx
mov    0x8(%rsp),%ecx
mov    0xc(%rsp),%r8d
mov    0x10(%rsp),%r9d
call   1050 <timeCmp@plt>
cmp    $0xffffffff,%eax
je     1259 <inIntervalo+0x129>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%eax
jmp    124a <inIntervalo+0x11a>

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
define i32 @inIntervalo(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca %struct.tm*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
%19 = call i32 @time(i32* %15)
%20 = call %struct.tm* @localtime(i32* %15)
store %struct.tm* %20, %struct.tm** %14
%21 = load %struct.tm*, %struct.tm** %14
%22 = getelementptr inbounds %struct.tm, %struct.tm* %21, i32 0, i32 0
%23 = load i32, i32* %22
store i32 %23, i32* %16
%24 = load %struct.tm*, %struct.tm** %14
%25 = getelementptr inbounds %struct.tm, %struct.tm* %24, i32 0, i32 1
%26 = load i32, i32* %25
store i32 %26, i32* %17
%27 = load %struct.tm*, %struct.tm** %14
%28 = getelementptr inbounds %struct.tm, %struct.tm* %27, i32 0, i32 2
%29 = load i32, i32* %28
store i32 %29, i32* %18
%30 = load i32, i32* %8
%31 = load i32, i32* %9
%32 = load i32, i32* %10
%33 = load i32, i32* %11
%34 = load i32, i32* %12
%35 = load i32, i32* %13
%36 = call i32 @timeCmp(i32 %30, i32 %31, i32 %32, i32 %33, i32 %34, i32 %35)
%37 = icmp eq i32 %36, -1
br i1 %37, label %38, label %58
38: ; preds = %6
%39 = load i32, i32* %8
%40 = load i32, i32* %9
%41 = load i32, i32* %10
%42 = load i32, i32* %16
%43 = load i32, i32* %17
%44 = load i32, i32* %18
%45 = call i32 @timeCmp(i32 %39, i32 %40, i32 %41, i32 %42, i32 %43, i32 %44)
%46 = icmp eq i32 %45, -1
br i1 %46, label %47, label %57
47: ; preds = %38
%48 = load i32, i32* %16
%49 = load i32, i32* %17
%50 = load i32, i32* %18
%51 = load i32, i32* %11
%52 = load i32, i32* %12
%53 = load i32, i32* %13
%54 = call i32 @timeCmp(i32 %48, i32 %49, i32 %50, i32 %51, i32 %52, i32 %53)
%55 = icmp eq i32 %54, -1
br i1 %55, label %56, label %57
56: ; preds = %47
store i32 1, i32* %7
br label %78
57: ; preds = %47, %38
store i32 0, i32* %7
br label %78
58: ; preds = %6
%59 = load i32, i32* %16
%60 = load i32, i32* %17
%61 = load i32, i32* %18
%62 = load i32, i32* %8
%63 = load i32, i32* %9
%64 = load i32, i32* %10
%65 = call i32 @timeCmp(i32 %59, i32 %60, i32 %61, i32 %62, i32 %63, i32 %64)
%66 = icmp eq i32 %65, 1
br i1 %66, label %76, label %67
67: ; preds = %58
%68 = load i32, i32* %16
%69 = load i32, i32* %17
%70 = load i32, i32* %18
%71 = load i32, i32* %11
%72 = load i32, i32* %12
%73 = load i32, i32* %13
%74 = call i32 @timeCmp(i32 %68, i32 %69, i32 %70, i32 %71, i32 %72, i32 %73)
%75 = icmp eq i32 %74, -1
br i1 %75, label %76, label %77
76: ; preds = %67, %58
store i32 1, i32* %7
br label %78
77: ; preds = %67
store i32 0, i32* %7
br label %78
78: ; preds = %77, %76, %57, %56
%79 = load i32, i32* %7
ret i32 %79
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32 }
define i32 @inIntervalo(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = bitcast i32* %7 to i8*
%9 = call i32 @time(i32* %7)
%10 = call %struct.tm* @localtime(i32* %7)
%11 = getelementptr inbounds %struct.tm, %struct.tm* %10, i64 0, i32 0
%12 = load i32, i32* %11
%13 = getelementptr inbounds %struct.tm, %struct.tm* %10, i64 0, i32 1
%14 = load i32, i32* %13
%15 = getelementptr inbounds %struct.tm, %struct.tm* %10, i64 0, i32 2
%16 = load i32, i32* %15
%17 = call i32 @timeCmp(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5)
%18 = icmp eq i32 %17, -1
br i1 %18, label %19, label %26
19: ; preds = %6
%20 = call i32 @timeCmp(i32 %0, i32 %1, i32 %2, i32 %12, i32 %14, i32 %16)
%21 = icmp eq i32 %20, -1
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = call i32 @timeCmp(i32 %12, i32 %14, i32 %16, i32 %3, i32 %4, i32 %5)
%24 = icmp eq i32 %23, -1
br i1 %24, label %33, label %25
25: ; preds = %22, %19
br label %33
26: ; preds = %6
%27 = call i32 @timeCmp(i32 %12, i32 %14, i32 %16, i32 %0, i32 %1, i32 %2)
%28 = icmp eq i32 %27, 1
br i1 %28, label %33, label %29
29: ; preds = %26
%30 = call i32 @timeCmp(i32 %12, i32 %14, i32 %16, i32 %3, i32 %4, i32 %5)
%31 = icmp eq i32 %30, -1
%32 = zext i1 %31 to i32
br label %33
33: ; preds = %29, %26, %22, %25
%34 = phi i32 [ 0, %25 ], [ 1, %22 ], [ 1, %26 ], [ %32, %29 ]
ret i32 %34
}