#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 /*<<< orphan*/ time_to_common_words(int, int, char *);
void fuzzy_time_to_words(int hours, int minutes, char *words) {
  int fuzzy_hours = hours;
  int fuzzy_minutes = ((minutes + 2) / 5) * 5;
  if (fuzzy_minutes > 55) {
    fuzzy_minutes = 0;
    fuzzy_hours += 1;
    if (fuzzy_hours > 23) {
      fuzzy_hours = 0;
    }
  }
  time_to_common_words(fuzzy_hours, fuzzy_minutes, words);
}


x86 assembly (clang, -O0):
<fuzzy_time_to_words>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
imul   $0x5,%eax,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x37,-0x18(%rbp)
jle    116c <fuzzy_time_to_words+0x5c>
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x17,-0x14(%rbp)
jle    1167 <fuzzy_time_to_words+0x57>
movl   $0x0,-0x14(%rbp)
jmp    116c <fuzzy_time_to_words+0x5c>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <time_to_common_words@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fuzzy_time_to_words>:
add    $0x2,%esi
movslq %esi,%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
lea    (%rax,%rax,4),%esi
lea    0x1(%rdi),%eax
xor    %ecx,%ecx
cmp    $0x17,%edi
cmovge %ecx,%eax
cmp    $0x38,%esi
cmovge %eax,%edi
cmovge %ecx,%esi
jmp    1030 <time_to_common_words@plt>

LLVM IR (-O0):
define void @fuzzy_time_to_words(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%9 = load i32, i32* %4
store i32 %9, i32* %7
%10 = load i32, i32* %5
%11 = add nsw i32 %10, 2
%12 = sdiv i32 %11, 5
%13 = mul nsw i32 %12, 5
store i32 %13, i32* %8
%14 = load i32, i32* %8
%15 = icmp sgt i32 %14, 55
br i1 %15, label %16, label %23
16: ; preds = %3
store i32 0, i32* %8
%17 = load i32, i32* %7
%18 = add nsw i32 %17, 1
store i32 %18, i32* %7
%19 = load i32, i32* %7
%20 = icmp sgt i32 %19, 23
br i1 %20, label %21, label %22
21: ; preds = %16
store i32 0, i32* %7
br label %22
22: ; preds = %21, %16
br label %23
23: ; preds = %22, %3
%24 = load i32, i32* %7
%25 = load i32, i32* %8
%26 = load i8*, i8** %6
%27 = call i32 @time_to_common_words(i32 %24, i32 %25, i8* %26)
ret void
}

LLVM IR (-O2):
define void @fuzzy_time_to_words(i32 %0, i32 %1, i8* %2) {
%4 = add nsw i32 %1, 2
%5 = srem i32 %4, 5
%6 = sub i32 %4, %5
%7 = icmp sgt i32 %6, 55
%8 = add nsw i32 %0, 1
%9 = icmp sgt i32 %0, 22
%10 = select i1 %9, i32 0, i32 %8
%11 = select i1 %7, i32 %10, i32 %0
%12 = select i1 %7, i32 0, i32 %6
%13 = tail call i32 @time_to_common_words(i32 %11, i32 %12, i8* %2)
ret void
}