#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 */
float getsample_abort(float *, int, int, int, int, int, int);
int positive_reflex(int, int);
float getsample_2(float *x, int w, int h, int pd, int i, int j, int l) {
  i = positive_reflex(i, w);
  j = positive_reflex(j, h);
  return getsample_abort(x, w, h, pd, i, j, l);
}


x86 assembly (clang, -O0):
<getsample_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x18(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <positive_reflex@plt>
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1040 <positive_reflex@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <getsample_abort@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getsample_2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r15d
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%ebx
mov    %rdi,%r12
mov    %r8d,%edi
call   1040 <positive_reflex@plt>
mov    %eax,%r13d
mov    %r15d,%edi
mov    %ebp,%esi
call   1040 <positive_reflex@plt>
mov    %r12,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
mov    %r13d,%r8d
mov    %eax,%r9d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <getsample_abort@plt>

LLVM IR (-O0):
define float @getsample_2(float* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca float*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store float* %0, float** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* %12
%16 = load i32, i32* %9
%17 = call i32 @positive_reflex(i32 %15, i32 %16)
store i32 %17, i32* %12
%18 = load i32, i32* %13
%19 = load i32, i32* %10
%20 = call i32 @positive_reflex(i32 %18, i32 %19)
store i32 %20, i32* %13
%21 = load float*, float** %8
%22 = load i32, i32* %9
%23 = load i32, i32* %10
%24 = load i32, i32* %11
%25 = load i32, i32* %12
%26 = load i32, i32* %13
%27 = load i32, i32* %14
%28 = call float @getsample_abort(float* %21, i32 %22, i32 %23, i32 %24, i32 %25, i32 %26, i32 %27)
ret float %28
}

LLVM IR (-O2):
define float @getsample_2(float* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = tail call i32 @positive_reflex(i32 %4, i32 %1)
%9 = tail call i32 @positive_reflex(i32 %5, i32 %2)
%10 = tail call float @getsample_abort(float* %0, i32 %1, i32 %2, i32 %3, i32 %8, i32 %9, i32 %6)
ret float %10
}