#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*/ test_size(size_t, char const *, unsigned int, unsigned int);
void test_sizes_around(size_t length, const char *algo, unsigned int k,
                       unsigned int m) {
  test_size(length - 1, algo, k, m);
  test_size(length, algo, k, m);
  test_size(length + 1, algo, k, m);
  test_size(length + 2, algo, k, m);
  test_size(length + 3, algo, k, m);
}


x86 assembly (clang, -O0):
<test_sizes_around>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
sub    $0x1,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <test_size@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <test_size@plt>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <test_size@plt>
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <test_size@plt>
mov    -0x8(%rbp),%rdi
add    $0x3,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <test_size@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sizes_around>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %rsi,%rbx
mov    %rdi,%rbp
add    $0xffffffffffffffff,%rdi
call   1030 <test_size@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
mov    %r14d,%ecx
call   1030 <test_size@plt>
lea    0x1(%rbp),%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
mov    %r14d,%ecx
call   1030 <test_size@plt>
lea    0x2(%rbp),%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
mov    %r14d,%ecx
call   1030 <test_size@plt>
add    $0x3,%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <test_size@plt>

LLVM IR (-O0):
define void @test_sizes_around(i64 %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i64 %0, i64* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i64, i64* %5
%10 = sub i64 %9, 1
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 @test_size(i64 %10, i8* %11, i32 %12, i32 %13)
%15 = load i64, i64* %5
%16 = load i8*, i8** %6
%17 = load i32, i32* %7
%18 = load i32, i32* %8
%19 = call i32 @test_size(i64 %15, i8* %16, i32 %17, i32 %18)
%20 = load i64, i64* %5
%21 = add i64 %20, 1
%22 = load i8*, i8** %6
%23 = load i32, i32* %7
%24 = load i32, i32* %8
%25 = call i32 @test_size(i64 %21, i8* %22, i32 %23, i32 %24)
%26 = load i64, i64* %5
%27 = add i64 %26, 2
%28 = load i8*, i8** %6
%29 = load i32, i32* %7
%30 = load i32, i32* %8
%31 = call i32 @test_size(i64 %27, i8* %28, i32 %29, i32 %30)
%32 = load i64, i64* %5
%33 = add i64 %32, 3
%34 = load i8*, i8** %6
%35 = load i32, i32* %7
%36 = load i32, i32* %8
%37 = call i32 @test_size(i64 %33, i8* %34, i32 %35, i32 %36)
ret void
}

LLVM IR (-O2):
define void @test_sizes_around(i64 %0, i8* %1, i32 %2, i32 %3) {
%5 = add i64 %0, -1
%6 = tail call i32 @test_size(i64 %5, i8* %1, i32 %2, i32 %3)
%7 = tail call i32 @test_size(i64 %0, i8* %1, i32 %2, i32 %3)
%8 = add i64 %0, 1
%9 = tail call i32 @test_size(i64 %8, i8* %1, i32 %2, i32 %3)
%10 = add i64 %0, 2
%11 = tail call i32 @test_size(i64 %10, i8* %1, i32 %2, i32 %3)
%12 = add i64 %0, 3
%13 = tail call i32 @test_size(i64 %12, i8* %1, i32 %2, i32 %3)
ret void
}