#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 code_table_4_0(unsigned char **);
unsigned char *code_table_4_4_location(unsigned char **);
unsigned char *forecast_time_in_units_location(unsigned char **sec, int *size) {
  unsigned char *code_4_4;
  code_4_4 = code_table_4_4_location(sec);
  if (code_4_4 == NULL)
    return NULL;
  *size = code_table_4_0(sec) == 44 ? 2 : 4;
  return code_4_4 + 1;
}


x86 assembly (clang, -O0):
<forecast_time_in_units_location>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <code_table_4_4_location@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1155 <forecast_time_in_units_location+0x35>
movq   $0x0,-0x8(%rbp)
jmp    1182 <forecast_time_in_units_location+0x62>
mov    -0x10(%rbp),%rdi
call   1030 <code_table_4_0@plt>
mov    %eax,%edx
mov    $0x4,%ecx
mov    $0x2,%eax
cmp    $0x2c,%edx
cmove  %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forecast_time_in_units_location>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1040 <code_table_4_4_location@plt>
test   %rax,%rax
je     1157 <forecast_time_in_units_location+0x37>
mov    %rax,%rbx
mov    %r15,%rdi
call   1030 <code_table_4_0@plt>
xor    %ecx,%ecx
cmp    $0x2c,%eax
setne  %cl
lea    (%rcx,%rcx,1),%eax
add    $0x2,%eax
mov    %eax,(%r14)
add    $0x1,%rbx
jmp    1159 <forecast_time_in_units_location+0x39>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @forecast_time_in_units_location(i8** %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i8**
%5 = alloca i32*
%6 = alloca i8*
store i8** %0, i8*** %4
store i32* %1, i32** %5
%7 = load i8**, i8*** %4
%8 = call i8* @code_table_4_4_location(i8** %7)
store i8* %8, i8** %6
%9 = load i8*, i8** %6
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %12
11: ; preds = %2
store i8* null, i8** %3
br label %21
12: ; preds = %2
%13 = load i8**, i8*** %4
%14 = call i32 @code_table_4_0(i8** %13)
%15 = icmp eq i32 %14, 44
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 2, i32 4
%18 = load i32*, i32** %5
store i32 %17, i32* %18
%19 = load i8*, i8** %6
%20 = getelementptr inbounds i8, i8* %19, i64 1
store i8* %20, i8** %3
br label %21
21: ; preds = %12, %11
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
define i8* @forecast_time_in_units_location(i8** %0, i32* nocapture writeonly %1) {
%3 = tail call i8* @code_table_4_4_location(i8** %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i32 @code_table_4_0(i8** %0)
%7 = icmp eq i32 %6, 44
%8 = select i1 %7, i32 2, i32 4
store i32 %8, i32* %1
%9 = getelementptr inbounds i8, i8* %3, i64 1
br label %10
10: ; preds = %2, %5
%11 = phi i8* [ %9, %5 ], [ null, %2 ]
ret i8* %11
}