#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 LZ4_compress64k_stack_limitedOutput(char const *, char *, int, int);
int LZ4_compress_stack_limitedOutput(char const *, char *, int, int);
int LZ4_compress_limitedOutput(const char *source, char *dest, int inputSize,
                               int maxOutputSize) {
  if (inputSize < (int)((1 << 16) + ((8 + 4) - 1)))
    return LZ4_compress64k_stack_limitedOutput(source, dest, inputSize,
                                               maxOutputSize);
  return LZ4_compress_stack_limitedOutput(source, dest, inputSize,
                                          maxOutputSize);
}


x86 assembly (clang, -O0):
<LZ4_compress_limitedOutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
cmpl   $0x1000b,-0x1c(%rbp)
jge    115e <LZ4_compress_limitedOutput+0x3e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
call   1040 <LZ4_compress64k_stack_limitedOutput@plt>
mov    %eax,-0x4(%rbp)
jmp    1174 <LZ4_compress_limitedOutput+0x54>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
call   1030 <LZ4_compress_stack_limitedOutput@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4_compress_limitedOutput>:
cmp    $0x1000a,%edx
jg     112d <LZ4_compress_limitedOutput+0xd>
jmp    1040 <LZ4_compress64k_stack_limitedOutput@plt>
jmp    1030 <LZ4_compress_stack_limitedOutput@plt>

LLVM IR (-O0):
define i32 @LZ4_compress_limitedOutput(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %8
%11 = icmp slt i32 %10, 65547
br i1 %11, label %12, label %18
12: ; preds = %4
%13 = load i8*, i8** %6
%14 = load i8*, i8** %7
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = call i32 @LZ4_compress64k_stack_limitedOutput(i8* %13, i8* %14, i32 %15, i32 %16)
store i32 %17, i32* %5
br label %24
18: ; preds = %4
%19 = load i8*, i8** %6
%20 = load i8*, i8** %7
%21 = load i32, i32* %8
%22 = load i32, i32* %9
%23 = call i32 @LZ4_compress_stack_limitedOutput(i8* %19, i8* %20, i32 %21, i32 %22)
store i32 %23, i32* %5
br label %24
24: ; preds = %18, %12
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
define i32 @LZ4_compress_limitedOutput(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %2, 65547
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @LZ4_compress64k_stack_limitedOutput(i8* %0, i8* %1, i32 %2, i32 %3)
br label %10
8: ; preds = %4
%9 = tail call i32 @LZ4_compress_stack_limitedOutput(i8* %0, i8* %1, i32 %2, i32 %3)
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ %7, %6 ], [ %9, %8 ]
ret i32 %11
}