#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 /*<<< orphan*/ cl_mem;

/* Variables and functions */
int /*<<< orphan*/ methode3rec2(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, size_t, size_t, int, int,
                                int, int);
void methode3rec(cl_mem dev_tabel, cl_mem horizontal_string,
                 cl_mem vertical_string, size_t horizontal_string_length,
                 size_t vertical_string_length, int min1, int min2, int max1,
                 int max2) {
  if (((max1 - min1) > 1000) || ((max2 - min2) > 1000)) {
    int v2 = (((max1 - min1)) / 2) + min1;
    int h2 = (((max2 - min2)) / 2) + min2;
    methode3rec(dev_tabel, horizontal_string, vertical_string,
                horizontal_string_length, vertical_string_length, min1, min2,
                v2, h2);
    methode3rec(dev_tabel, horizontal_string, vertical_string,
                horizontal_string_length, vertical_string_length, v2, min2,
                max1, h2);
    methode3rec(dev_tabel, horizontal_string, vertical_string,
                horizontal_string_length, vertical_string_length, min1, h2, v2,
                max2);
    methode3rec(dev_tabel, horizontal_string, vertical_string,
                horizontal_string_length, vertical_string_length, v2, h2, max1,
                max2);
  } else {
    methode3rec2(dev_tabel, horizontal_string, vertical_string,
                 horizontal_string_length, vertical_string_length, min1, min2,
                 max1, max2);
  }
}


x86 assembly (clang, -O0):
<methode3rec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    0x18(%rbp),%eax
sub    -0x24(%rbp),%eax
cmp    $0x3e8,%eax
jg     1168 <methode3rec+0x48>
mov    0x20(%rbp),%eax
sub    0x10(%rbp),%eax
cmp    $0x3e8,%eax
jle    125d <methode3rec+0x13d>
mov    0x18(%rbp),%eax
sub    -0x24(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    0x20(%rbp),%eax
sub    0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    0x10(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x24(%rbp),%r9d
mov    0x10(%rbp),%r11d
mov    -0x28(%rbp),%r10d
mov    -0x2c(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1040 <methode3rec@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9d
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10d
mov    -0x2c(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1040 <methode3rec@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x24(%rbp),%r9d
mov    -0x2c(%rbp),%r11d
mov    -0x28(%rbp),%r10d
mov    0x20(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1040 <methode3rec@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9d
mov    -0x2c(%rbp),%r11d
mov    0x18(%rbp),%r10d
mov    0x20(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1040 <methode3rec@plt>
jmp    128f <methode3rec+0x16f>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x24(%rbp),%r9d
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10d
mov    0x20(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <methode3rec2@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<methode3rec>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9d,%ebx
mov    %r8,0x28(%rsp)
mov    %rcx,0x18(%rsp)
mov    %edx,0x14(%rsp)
mov    %esi,0x10(%rsp)
mov    %edi,0xc(%rsp)
mov    0x80(%rsp),%edx
mov    0x78(%rsp),%eax
mov    0x70(%rsp),%r15d
mov    %eax,%ecx
sub    %r9d,%ecx
mov    %edx,%eax
sub    %r15d,%eax
cmp    $0x3e8,%ecx
jg     1174 <methode3rec+0x54>
cmp    $0x3e9,%eax
jl     1261 <methode3rec+0x141>
mov    0x10(%rsp),%r12d
mov    0x14(%rsp),%r14d
mov    0x28(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edx
mov    %r15d,%esi
mov    %ecx,%ebx
shr    $0x1f,%ebx
add    %ecx,%ebx
sar    %ebx
add    %edx,%ebx
mov    %edx,%r9d
mov    %edx,0x24(%rsp)
mov    %eax,%r15d
shr    $0x1f,%r15d
add    %eax,%r15d
sar    %r15d
mov    %rsi,%rax
mov    %rsi,0x30(%rsp)
add    %eax,%r15d
sub    $0x8,%rsp
mov    0x14(%rsp),%ebp
mov    %ebp,%edi
mov    %r12d,%esi
mov    %r14d,%edx
mov    0x20(%rsp),%rcx
mov    %r13,%r8
push   %r15
push   %rbx
push   %rax
call   1040 <methode3rec@plt>
add    $0x18,%rsp
mov    %ebp,%edi
mov    %r12d,%esi
mov    %r14d,%edx
mov    0x20(%rsp),%rbp
mov    %rbp,%rcx
mov    %r13,%r8
mov    %ebx,%r9d
push   %r15
mov    0x88(%rsp),%eax
push   %rax
push   0x48(%rsp)
call   1040 <methode3rec@plt>
add    $0x18,%rsp
mov    0x14(%rsp),%edi
mov    %r12d,%esi
mov    %r14d,%edx
mov    %rbp,%rcx
mov    %r13,%r8
mov    0x2c(%rsp),%r9d
mov    0x88(%rsp),%eax
mov    %rax,%rbp
push   %rax
push   %rbx
push   %r15
call   1040 <methode3rec@plt>
add    $0x20,%rsp
mov    0x78(%rsp),%eax
mov    %eax,%ecx
sub    %ebx,%ecx
mov    %ebp,%eax
sub    %r15d,%eax
cmp    $0x3e8,%ecx
jg     1190 <methode3rec+0x70>
cmp    $0x3e8,%eax
jg     1190 <methode3rec+0x70>
sub    $0x8,%rsp
mov    0x14(%rsp),%edi
mov    0x18(%rsp),%esi
mov    0x1c(%rsp),%edx
mov    0x20(%rsp),%rcx
mov    0x30(%rsp),%r8
mov    %ebx,%r9d
mov    0x88(%rsp),%eax
push   %rax
mov    0x88(%rsp),%eax
push   %rax
push   %r15
call   1030 <methode3rec2@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @methode3rec(i32 %0, i32 %1, i32 %2, i64 %3, i64 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i64
%14 = alloca i64
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i64 %3, i64* %13
store i64 %4, i64* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%21 = load i32, i32* %17
%22 = load i32, i32* %15
%23 = sub nsw i32 %21, %22
%24 = icmp sgt i32 %23, 1000
br i1 %24, label %30, label %25
25: ; preds = %9
%26 = load i32, i32* %18
%27 = load i32, i32* %16
%28 = sub nsw i32 %26, %27
%29 = icmp sgt i32 %28, 1000
br i1 %29, label %30, label %79
30: ; preds = %25, %9
%31 = load i32, i32* %17
%32 = load i32, i32* %15
%33 = sub nsw i32 %31, %32
%34 = sdiv i32 %33, 2
%35 = load i32, i32* %15
%36 = add nsw i32 %34, %35
store i32 %36, i32* %19
%37 = load i32, i32* %18
%38 = load i32, i32* %16
%39 = sub nsw i32 %37, %38
%40 = sdiv i32 %39, 2
%41 = load i32, i32* %16
%42 = add nsw i32 %40, %41
store i32 %42, i32* %20
%43 = load i32, i32* %10
%44 = load i32, i32* %11
%45 = load i32, i32* %12
%46 = load i64, i64* %13
%47 = load i64, i64* %14
%48 = load i32, i32* %15
%49 = load i32, i32* %16
%50 = load i32, i32* %19
%51 = load i32, i32* %20
%52 = load i32, i32* %10
%53 = load i32, i32* %11
%54 = load i32, i32* %12
%55 = load i64, i64* %13
%56 = load i64, i64* %14
%57 = load i32, i32* %19
%58 = load i32, i32* %16
%59 = load i32, i32* %17
%60 = load i32, i32* %20
%61 = load i32, i32* %10
%62 = load i32, i32* %11
%63 = load i32, i32* %12
%64 = load i64, i64* %13
%65 = load i64, i64* %14
%66 = load i32, i32* %15
%67 = load i32, i32* %20
%68 = load i32, i32* %19
%69 = load i32, i32* %18
%70 = load i32, i32* %10
%71 = load i32, i32* %11
%72 = load i32, i32* %12
%73 = load i64, i64* %13
%74 = load i64, i64* %14
%75 = load i32, i32* %19
%76 = load i32, i32* %20
%77 = load i32, i32* %17
%78 = load i32, i32* %18
br label %90
79: ; preds = %25
%80 = load i32, i32* %10
%81 = load i32, i32* %11
%82 = load i32, i32* %12
%83 = load i64, i64* %13
%84 = load i64, i64* %14
%85 = load i32, i32* %15
%86 = load i32, i32* %16
%87 = load i32, i32* %17
%88 = load i32, i32* %18
%89 = call i32 @methode3rec2(i32 %80, i32 %81, i32 %82, i64 %83, i64 %84, i32 %85, i32 %86, i32 %87, i32 %88)
br label %90
90: ; preds = %79, %30
ret void
}

LLVM IR (-O2):
define void @methode3rec(i32 %0, i32 %1, i32 %2, i64 %3, i64 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = sub nsw i32 %7, %5
%11 = icmp sgt i32 %10, 1000
%12 = sub nsw i32 %8, %6
%13 = icmp sgt i32 %12, 1000
%14 = select i1 %11, i1 true, i1 %13
br i1 %14, label %15, label %29
15: ; preds = %9, %15
%16 = phi i32 [ %26, %15 ], [ %12, %9 ]
%17 = phi i32 [ %24, %15 ], [ %10, %9 ]
%18 = phi i32 [ %23, %15 ], [ %6, %9 ]
%19 = phi i32 [ %21, %15 ], [ %5, %9 ]
%20 = sdiv i32 %17, 2
%21 = add nsw i32 %20, %19
%22 = sdiv i32 %16, 2
%23 = add nsw i32 %22, %18
tail call void @methode3rec(i32 %0, i32 %1, i32 %2, i64 %3, i64 %4, i32 %19, i32 %18, i32 %21, i32 %23)
tail call void @methode3rec(i32 %0, i32 %1, i32 %2, i64 %3, i64 %4, i32 %21, i32 %18, i32 %7, i32 %23)
tail call void @methode3rec(i32 %0, i32 %1, i32 %2, i64 %3, i64 %4, i32 %19, i32 %23, i32 %21, i32 %8)
%24 = sub nsw i32 %7, %21
%25 = icmp sgt i32 %24, 1000
%26 = sub nsw i32 %8, %23
%27 = icmp sgt i32 %26, 1000
%28 = select i1 %25, i1 true, i1 %27
br i1 %28, label %15, label %29
29: ; preds = %15, %9
%30 = phi i32 [ %5, %9 ], [ %21, %15 ]
%31 = phi i32 [ %6, %9 ], [ %23, %15 ]
%32 = tail call i32 @methode3rec2(i32 %0, i32 %1, i32 %2, i64 %3, i64 %4, i32 %30, i32 %31, i32 %7, i32 %8)
ret void
}