#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 */
scalar_t__ SDL_imageFilterMMXdetect();
int SDL_imageFilterConvolveKernel9x9Divide(unsigned char *Src,
                                           unsigned char *Dest, int rows,
                                           int columns, signed short *Kernel,
                                           unsigned char Divisor) {
  if ((columns < 9) || (rows < 9) || (Divisor == 0))
    return (-1);
  if ((SDL_imageFilterMMXdetect())) {
    return (0);
  } else {
    return (-1);
  }
}


x86 assembly (clang, -O0):
<SDL_imageFilterConvolveKernel9x9Divide>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %r9b,%al
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %al,-0x29(%rbp)
cmpl   $0x9,-0x20(%rbp)
jl     1151 <SDL_imageFilterConvolveKernel9x9Divide+0x41>
cmpl   $0x9,-0x1c(%rbp)
jl     1151 <SDL_imageFilterConvolveKernel9x9Divide+0x41>
movzbl -0x29(%rbp),%eax
cmp    $0x0,%eax
jne    115d <SDL_imageFilterConvolveKernel9x9Divide+0x4d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1181 <SDL_imageFilterConvolveKernel9x9Divide+0x71>
mov    $0x0,%al
call   1030 <SDL_imageFilterMMXdetect@plt>
cmp    $0x0,%rax
je     117a <SDL_imageFilterConvolveKernel9x9Divide+0x6a>
movl   $0x0,-0x4(%rbp)
jmp    1181 <SDL_imageFilterConvolveKernel9x9Divide+0x71>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SDL_imageFilterConvolveKernel9x9Divide>:
mov    $0xffffffff,%eax
cmp    $0x9,%edx
jl     1136 <SDL_imageFilterConvolveKernel9x9Divide+0x26>
cmp    $0x9,%ecx
jl     1136 <SDL_imageFilterConvolveKernel9x9Divide+0x26>
test   %r9b,%r9b
je     1136 <SDL_imageFilterConvolveKernel9x9Divide+0x26>
push   %rax
xor    %eax,%eax
call   1030 <SDL_imageFilterMMXdetect@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @SDL_imageFilterConvolveKernel9x9Divide(i8* %0, i8* %1, i32 %2, i32 %3, i16* %4, i8 zeroext %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i8
store i8* %0, i8** %8
store i8* %1, i8** %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i8 %5, i8* %13
%14 = load i32, i32* %11
%15 = icmp slt i32 %14, 9
br i1 %15, label %23, label %16
16: ; preds = %6
%17 = load i32, i32* %10
%18 = icmp slt i32 %17, 9
br i1 %18, label %23, label %19
19: ; preds = %16
%20 = load i8, i8* %13
%21 = zext i8 %20 to i32
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %19, %16, %6
store i32 -1, i32* %7
br label %29
24: ; preds = %19
%25 = call i64 (...) @SDL_imageFilterMMXdetect()
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %24
store i32 0, i32* %7
br label %29
28: ; preds = %24
store i32 -1, i32* %7
br label %29
29: ; preds = %28, %27, %23
%30 = load i32, i32* %7
ret i32 %30
}

LLVM IR (-O2):
define i32 @SDL_imageFilterConvolveKernel9x9Divide(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i32 %3, i16* nocapture readnone %4, i8 zeroext %5) {
%7 = icmp slt i32 %3, 9
%8 = icmp slt i32 %2, 9
%9 = or i1 %8, %7
%10 = icmp eq i8 %5, 0
%11 = or i1 %9, %10
br i1 %11, label %16, label %12
12: ; preds = %6
%13 = tail call i64 (...) @SDL_imageFilterMMXdetect()
%14 = icmp eq i64 %13, 0
%15 = sext i1 %14 to i32
br label %16
16: ; preds = %12, %6
%17 = phi i32 [ -1, %6 ], [ %15, %12 ]
ret i32 %17
}