#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*/ assert(int);
int /*<<< orphan*/ transposing_1d_blur(unsigned char *, unsigned char *,
                                       unsigned int, unsigned int,
                                       unsigned int);
__attribute__((visibility("hidden"))) void
blur(unsigned char *src, unsigned char *tmp, unsigned char *dst,
     unsigned int width, unsigned int height, unsigned int size) {
  assert(size > 0);
  if (width < 2 * size + 1 || height < 2 * size + 1)
    return;
  transposing_1d_blur(src, tmp, width, height, size);
  transposing_1d_blur(tmp, dst, height, width, size);
}


x86 assembly (clang, -O0):
<blur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x1c(%rbp),%eax
mov    -0x24(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jb     1178 <blur+0x58>
mov    -0x20(%rbp),%eax
mov    -0x24(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jae    117d <blur+0x5d>
jmp    11ab <blur+0x8b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
call   1030 <transposing_1d_blur@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x24(%rbp),%r8d
call   1030 <transposing_1d_blur@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blur>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%ebx
mov    %r8d,%r14d
mov    %ecx,%ebp
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%r13
xor    %edi,%edi
test   %r9d,%r9d
setne  %dil
call   1040 <assert@plt>
lea    (%rbx,%rbx,1),%eax
add    $0x1,%eax
cmp    %ebp,%eax
ja     118d <blur+0x6d>
cmp    %r14d,%eax
ja     118d <blur+0x6d>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
mov    %r14d,%ecx
mov    %ebx,%r8d
call   1030 <transposing_1d_blur@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14d,%edx
mov    %ebp,%ecx
mov    %ebx,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <transposing_1d_blur@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define hidden void @blur(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %12
%14 = icmp ugt i32 %13, 0
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i32, i32* %10
%18 = load i32, i32* %12
%19 = mul i32 2, %18
%20 = add i32 %19, 1
%21 = icmp ult i32 %17, %20
br i1 %21, label %28, label %22
22: ; preds = %6
%23 = load i32, i32* %11
%24 = load i32, i32* %12
%25 = mul i32 2, %24
%26 = add i32 %25, 1
%27 = icmp ult i32 %23, %26
br i1 %27, label %28, label %29
28: ; preds = %22, %6
br label %42
29: ; preds = %22
%30 = load i8*, i8** %7
%31 = load i8*, i8** %8
%32 = load i32, i32* %10
%33 = load i32, i32* %11
%34 = load i32, i32* %12
%35 = call i32 @transposing_1d_blur(i8* %30, i8* %31, i32 %32, i32 %33, i32 %34)
%36 = load i8*, i8** %8
%37 = load i8*, i8** %9
%38 = load i32, i32* %11
%39 = load i32, i32* %10
%40 = load i32, i32* %12
%41 = call i32 @transposing_1d_blur(i8* %36, i8* %37, i32 %38, i32 %39, i32 %40)
br label %42
42: ; preds = %29, %28
ret void
}

LLVM IR (-O2):
define hidden void @blur(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 %5) {
%7 = icmp ne i32 %5, 0
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = shl i32 %5, 1
%11 = or i32 %10, 1
%12 = icmp ugt i32 %11, %3
%13 = icmp ugt i32 %11, %4
%14 = or i1 %12, %13
br i1 %14, label %18, label %15
15: ; preds = %6
%16 = tail call i32 @transposing_1d_blur(i8* %0, i8* %1, i32 %3, i32 %4, i32 %5)
%17 = tail call i32 @transposing_1d_blur(i8* %1, i8* %2, i32 %4, i32 %3, i32 %5)
br label %18
18: ; preds = %6, %15
ret void
}