#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 strlen(char *);
char *hydrology_extract_minute(char *measurement_time_string) {
  static char minute[3];
  *minute = '\0';
  if (strlen(measurement_time_string) != 4)
    return minute;
  *minute = *(measurement_time_string + 2);
  *(minute + 1) = *(measurement_time_string + 3);
  *(minute + 2) = '\0';
  return minute;
}


x86 assembly (clang, -O0):
<hydrology_extract_minute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
movb   $0x0,0x2f06(%rip)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x4,%eax
je     1145 <hydrology_extract_minute+0x35>
lea    0x2eed(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1171 <hydrology_extract_minute+0x61>
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%al
mov    %al,0x2ed7(%rip)
mov    -0x10(%rbp),%rax
mov    0x3(%rax),%al
mov    %al,0x2ecb(%rip)
movb   $0x0,0x2ec5(%rip)
lea    0x2ebc(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hydrology_extract_minute>:
push   %rbx
mov    %rdi,%rbx
movb   $0x0,0x2f0e(%rip)
call   1030 <strlen@plt>
cmp    $0x4,%eax
jne    113e <hydrology_extract_minute+0x2e>
mov    0x2(%rbx),%al
mov    %al,0x2efb(%rip)
mov    0x3(%rbx),%al
mov    %al,0x2ef3(%rip)
movb   $0x0,0x2eed(%rip)
lea    0x2ee4(%rip),%rax
pop    %rbx
ret

LLVM IR (-O0):
@hydrology_extract_minute.minute = internal global [3 x i8] zeroinitializer
define i8* @hydrology_extract_minute(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
store i8 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @hydrology_extract_minute.minute, i64 0, i64 0)
%4 = load i8*, i8** %3
%5 = call i32 @strlen(i8* %4)
%6 = icmp ne i32 %5, 4
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @hydrology_extract_minute.minute, i64 0, i64 0), i8** %2
br label %15
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 2
%11 = load i8, i8* %10
store i8 %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @hydrology_extract_minute.minute, i64 0, i64 0)
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 3
%14 = load i8, i8* %13
store i8 %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @hydrology_extract_minute.minute, i64 0, i64 1)
store i8 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @hydrology_extract_minute.minute, i64 0, i64 2)
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @hydrology_extract_minute.minute, i64 0, i64 0), i8** %2
br label %15
15: ; preds = %8, %7
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
@hydrology_extract_minute.minute = internal global [3 x i8] zeroinitializer
define i8* @hydrology_extract_minute(i8* %0) {
store i8 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @hydrology_extract_minute.minute, i64 0, i64 0)
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp eq i32 %2, 4
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
store i8 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @hydrology_extract_minute.minute, i64 0, i64 0)
%7 = getelementptr inbounds i8, i8* %0, i64 3
%8 = load i8, i8* %7
store i8 %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @hydrology_extract_minute.minute, i64 0, i64 1)
store i8 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @hydrology_extract_minute.minute, i64 0, i64 2)
br label %9
9: ; preds = %1, %4
ret i8* getelementptr inbounds ([3 x i8], [3 x i8]* @hydrology_extract_minute.minute, i64 0, i64 0)
}