#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 */
unsigned char *
minutes_of_observational_data_cutoff_after_reference_time_location(
    unsigned char **sec) {
  int p;
  p = (((int)((sec[4][7] << 8) + (sec[4][8]))));
  if (p <= 15 || (p >= 32 && p <= 34) || p == 60 || p == 61 || p == 1000 ||
      p == 1001 || p == 1002 || p == 1100 || p == 1101)
    return sec[4] + 16;
  if (p >= 44 && p <= 47)
    return sec[4] + 29;
  if (p == 48)
    return sec[4] + 40;
  if (p == 70)
    return sec[4] + 21;
  return NULL;
}


x86 assembly (clang, -O0):
<minutes_of_observational_data_cutoff_after_reference_time_location>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
movzbl 0x7(%rax),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
mov    0x20(%rcx),%rcx
movzbl 0x8(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0xf,-0x14(%rbp)
jle    119b <minutes_of_observational_data_cutoff_after_reference_time_location+0x9b>
cmpl   $0x20,-0x14(%rbp)
jl     1146 <minutes_of_observational_data_cutoff_after_reference_time_location+0x46>
cmpl   $0x22,-0x14(%rbp)
jle    119b <minutes_of_observational_data_cutoff_after_reference_time_location+0x9b>
cmpl   $0x3c,-0x14(%rbp)
je     119b <minutes_of_observational_data_cutoff_after_reference_time_location+0x9b>
cmpl   $0x3d,-0x14(%rbp)
je     119b <minutes_of_observational_data_cutoff_after_reference_time_location+0x9b>
cmpl   $0x3e8,-0x14(%rbp)
je     119b <minutes_of_observational_data_cutoff_after_reference_time_location+0x9b>
cmpl   $0x3e9,-0x14(%rbp)
je     119b <minutes_of_observational_data_cutoff_after_reference_time_location+0x9b>
cmpl   $0x3ea,-0x14(%rbp)
je     119b <minutes_of_observational_data_cutoff_after_reference_time_location+0x9b>
cmpl   $0x44c,-0x14(%rbp)
je     119b <minutes_of_observational_data_cutoff_after_reference_time_location+0x9b>
cmpl   $0x44d,-0x14(%rbp)
jne    11b0 <minutes_of_observational_data_cutoff_after_reference_time_location+0xb0>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
add    $0x10,%rax
mov    %rax,-0x8(%rbp)
jmp    121f <minutes_of_observational_data_cutoff_after_reference_time_location+0x11f>
cmpl   $0x2c,-0x14(%rbp)
jl     11d9 <minutes_of_observational_data_cutoff_after_reference_time_location+0xd9>
cmpl   $0x2f,-0x14(%rbp)
jg     11d9 <minutes_of_observational_data_cutoff_after_reference_time_location+0xd9>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
add    $0x1d,%rax
mov    %rax,-0x8(%rbp)
jmp    121f <minutes_of_observational_data_cutoff_after_reference_time_location+0x11f>
cmpl   $0x30,-0x14(%rbp)
jne    11f8 <minutes_of_observational_data_cutoff_after_reference_time_location+0xf8>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
add    $0x28,%rax
mov    %rax,-0x8(%rbp)
jmp    121f <minutes_of_observational_data_cutoff_after_reference_time_location+0x11f>
cmpl   $0x46,-0x14(%rbp)
jne    1217 <minutes_of_observational_data_cutoff_after_reference_time_location+0x117>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
add    $0x15,%rax
mov    %rax,-0x8(%rbp)
jmp    121f <minutes_of_observational_data_cutoff_after_reference_time_location+0x11f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<minutes_of_observational_data_cutoff_after_reference_time_location>:
mov    0x20(%rdi),%rax
movzwl 0x7(%rax),%ecx
shl    $0x10,%ecx
bswap  %ecx
cmp    $0x10,%ecx
jb     115b <minutes_of_observational_data_cutoff_after_reference_time_location+0x5b>
mov    %ecx,%edx
and    $0xfffffffe,%edx
cmp    $0x3c,%edx
je     115b <minutes_of_observational_data_cutoff_after_reference_time_location+0x5b>
lea    -0x20(%rcx),%edx
cmp    $0x3,%edx
jb     115b <minutes_of_observational_data_cutoff_after_reference_time_location+0x5b>
cmp    $0x3e8,%ecx
je     115b <minutes_of_observational_data_cutoff_after_reference_time_location+0x5b>
cmp    $0x3e9,%ecx
je     115b <minutes_of_observational_data_cutoff_after_reference_time_location+0x5b>
cmp    $0x3ea,%ecx
je     115b <minutes_of_observational_data_cutoff_after_reference_time_location+0x5b>
cmp    $0x44c,%ecx
je     115b <minutes_of_observational_data_cutoff_after_reference_time_location+0x5b>
cmp    $0x44d,%ecx
je     115b <minutes_of_observational_data_cutoff_after_reference_time_location+0x5b>
mov    %ecx,%edx
and    $0xfffffffc,%edx
cmp    $0x2c,%edx
jne    1160 <minutes_of_observational_data_cutoff_after_reference_time_location+0x60>
add    $0x1d,%rax
ret
add    $0x10,%rax
ret
cmp    $0x46,%cx
je     1171 <minutes_of_observational_data_cutoff_after_reference_time_location+0x71>
cmp    $0x30,%cx
jne    1176 <minutes_of_observational_data_cutoff_after_reference_time_location+0x76>
add    $0x28,%rax
ret
add    $0x15,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @minutes_of_observational_data_cutoff_after_reference_time_location(i8** %0) {
%2 = alloca i8*
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
%5 = load i8**, i8*** %3
%6 = getelementptr inbounds i8*, i8** %5, i64 4
%7 = load i8*, i8** %6
%8 = getelementptr inbounds i8, i8* %7, i64 7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = load i8**, i8*** %3
%13 = getelementptr inbounds i8*, i8** %12, i64 4
%14 = load i8*, i8** %13
%15 = getelementptr inbounds i8, i8* %14, i64 8
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = add nsw i32 %11, %17
store i32 %18, i32* %4
%19 = load i32, i32* %4
%20 = icmp sle i32 %19, 15
br i1 %20, label %48, label %21
21: ; preds = %1
%22 = load i32, i32* %4
%23 = icmp sge i32 %22, 32
br i1 %23, label %24, label %27
24: ; preds = %21
%25 = load i32, i32* %4
%26 = icmp sle i32 %25, 34
br i1 %26, label %48, label %27
27: ; preds = %24, %21
%28 = load i32, i32* %4
%29 = icmp eq i32 %28, 60
br i1 %29, label %48, label %30
30: ; preds = %27
%31 = load i32, i32* %4
%32 = icmp eq i32 %31, 61
br i1 %32, label %48, label %33
33: ; preds = %30
%34 = load i32, i32* %4
%35 = icmp eq i32 %34, 1000
br i1 %35, label %48, label %36
36: ; preds = %33
%37 = load i32, i32* %4
%38 = icmp eq i32 %37, 1001
br i1 %38, label %48, label %39
39: ; preds = %36
%40 = load i32, i32* %4
%41 = icmp eq i32 %40, 1002
br i1 %41, label %48, label %42
42: ; preds = %39
%43 = load i32, i32* %4
%44 = icmp eq i32 %43, 1100
br i1 %44, label %48, label %45
45: ; preds = %42
%46 = load i32, i32* %4
%47 = icmp eq i32 %46, 1101
br i1 %47, label %48, label %53
48: ; preds = %45, %42, %39, %36, %33, %30, %27, %24, %1
%49 = load i8**, i8*** %3
%50 = getelementptr inbounds i8*, i8** %49, i64 4
%51 = load i8*, i8** %50
%52 = getelementptr inbounds i8, i8* %51, i64 16
store i8* %52, i8** %2
br label %81
53: ; preds = %45
%54 = load i32, i32* %4
%55 = icmp sge i32 %54, 44
br i1 %55, label %56, label %64
56: ; preds = %53
%57 = load i32, i32* %4
%58 = icmp sle i32 %57, 47
br i1 %58, label %59, label %64
59: ; preds = %56
%60 = load i8**, i8*** %3
%61 = getelementptr inbounds i8*, i8** %60, i64 4
%62 = load i8*, i8** %61
%63 = getelementptr inbounds i8, i8* %62, i64 29
store i8* %63, i8** %2
br label %81
64: ; preds = %56, %53
%65 = load i32, i32* %4
%66 = icmp eq i32 %65, 48
br i1 %66, label %67, label %72
67: ; preds = %64
%68 = load i8**, i8*** %3
%69 = getelementptr inbounds i8*, i8** %68, i64 4
%70 = load i8*, i8** %69
%71 = getelementptr inbounds i8, i8* %70, i64 40
store i8* %71, i8** %2
br label %81
72: ; preds = %64
%73 = load i32, i32* %4
%74 = icmp eq i32 %73, 70
br i1 %74, label %75, label %80
75: ; preds = %72
%76 = load i8**, i8*** %3
%77 = getelementptr inbounds i8*, i8** %76, i64 4
%78 = load i8*, i8** %77
%79 = getelementptr inbounds i8, i8* %78, i64 21
store i8* %79, i8** %2
br label %81
80: ; preds = %72
store i8* null, i8** %2
br label %81
81: ; preds = %80, %75, %67, %59, %48
%82 = load i8*, i8** %2
ret i8* %82
}

LLVM IR (-O2):
define i8* @minutes_of_observational_data_cutoff_after_reference_time_location(i8** nocapture %0) {
%2 = getelementptr inbounds i8*, i8** %0, i64 4
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 7
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = getelementptr inbounds i8, i8* %3, i64 8
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = or i32 %7, %10
%12 = icmp ult i32 %11, 16
br i1 %12, label %29, label %13
13: ; preds = %1
%14 = add nsw i32 %11, -32
%15 = icmp ult i32 %14, 3
%16 = and i32 %11, 65534
%17 = icmp eq i32 %16, 60
%18 = or i1 %17, %15
%19 = icmp eq i32 %11, 1000
%20 = select i1 %18, i1 true, i1 %19
%21 = icmp eq i32 %11, 1001
%22 = select i1 %20, i1 true, i1 %21
%23 = icmp eq i32 %11, 1002
%24 = select i1 %22, i1 true, i1 %23
%25 = icmp eq i32 %11, 1100
%26 = select i1 %24, i1 true, i1 %25
%27 = icmp eq i32 %11, 1101
%28 = select i1 %26, i1 true, i1 %27
br i1 %28, label %29, label %31
29: ; preds = %13, %1
%30 = getelementptr inbounds i8, i8* %3, i64 16
br label %42
31: ; preds = %13
%32 = and i32 %11, 65532
%33 = icmp eq i32 %32, 44
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = getelementptr inbounds i8, i8* %3, i64 29
br label %42
36: ; preds = %31
%37 = trunc i32 %11 to i16
switch i16 %37, label %42 [
i16 48, label %38
i16 70, label %40
]
38: ; preds = %36
%39 = getelementptr inbounds i8, i8* %3, i64 40
br label %42
40: ; preds = %36
%41 = getelementptr inbounds i8, i8* %3, i64 21
br label %42
42: ; preds = %36, %40, %38, %34, %29
%43 = phi i8* [ %30, %29 ], [ %35, %34 ], [ %39, %38 ], [ %41, %40 ], [ null, %36 ]
ret i8* %43
}