#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 uint32_t;
typedef int int32_t;

/* Variables and functions */
int32_t frequency_repeat_acceleration(const uint32_t repeat_count) {
  int32_t amount = 25000;
  if (repeat_count >= 160) {
    amount = 100000000;
  } else if (repeat_count >= 80) {
    amount = 10000000;
  } else if (repeat_count >= 40) {
    amount = 1000000;
  } else if (repeat_count >= 20) {
    amount = 100000;
  }
  return amount;
}


x86 assembly (clang, -O0):
<frequency_repeat_acceleration>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x61a8,-0x8(%rbp)
cmpl   $0xa0,-0x4(%rbp)
jl     1127 <frequency_repeat_acceleration+0x27>
movl   $0x5f5e100,-0x8(%rbp)
jmp    1173 <frequency_repeat_acceleration+0x73>
cmpl   $0x50,-0x4(%rbp)
jl     113d <frequency_repeat_acceleration+0x3d>
movl   $0x989680,-0x8(%rbp)
jmp    116e <frequency_repeat_acceleration+0x6e>
cmpl   $0x28,-0x4(%rbp)
jl     1153 <frequency_repeat_acceleration+0x53>
movl   $0xf4240,-0x8(%rbp)
jmp    1169 <frequency_repeat_acceleration+0x69>
cmpl   $0x14,-0x4(%rbp)
jl     1164 <frequency_repeat_acceleration+0x64>
movl   $0x186a0,-0x8(%rbp)
jmp    1169 <frequency_repeat_acceleration+0x69>
jmp    116e <frequency_repeat_acceleration+0x6e>
jmp    1173 <frequency_repeat_acceleration+0x73>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<frequency_repeat_acceleration>:
mov    $0x5f5e100,%eax
cmp    $0x9f,%edi
jg     1131 <frequency_repeat_acceleration+0x31>
mov    $0x989680,%eax
cmp    $0x4f,%edi
jg     1131 <frequency_repeat_acceleration+0x31>
mov    $0xf4240,%eax
cmp    $0x27,%edi
jg     1131 <frequency_repeat_acceleration+0x31>
cmp    $0x14,%edi
mov    $0x186a0,%ecx
mov    $0x61a8,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @frequency_repeat_acceleration(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 25000, i32* %3
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 160
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 100000000, i32* %3
br label %22
7: ; preds = %1
%8 = load i32, i32* %2
%9 = icmp sge i32 %8, 80
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 10000000, i32* %3
br label %21
11: ; preds = %7
%12 = load i32, i32* %2
%13 = icmp sge i32 %12, 40
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 1000000, i32* %3
br label %20
15: ; preds = %11
%16 = load i32, i32* %2
%17 = icmp sge i32 %16, 20
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 100000, i32* %3
br label %19
19: ; preds = %18, %15
br label %20
20: ; preds = %19, %14
br label %21
21: ; preds = %20, %10
br label %22
22: ; preds = %21, %6
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @frequency_repeat_acceleration(i32 %0) {
%2 = icmp sgt i32 %0, 159
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = icmp sgt i32 %0, 79
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = icmp sgt i32 %0, 39
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = icmp sgt i32 %0, 19
%9 = select i1 %8, i32 100000, i32 25000
br label %10
10: ; preds = %7, %5, %3, %1
%11 = phi i32 [ 100000000, %1 ], [ 10000000, %3 ], [ 1000000, %5 ], [ %9, %7 ]
ret i32 %11
}