int hide_image(cover_image, message_image, mlength, mwidth, clength, cwidth,
               lsb, n)
int lsb, n;
long clength, cwidth, mlength, mwidth;
short **cover_image, **message_image;
{
  char response[80];
  int h_counter = 0;
  for (h_counter = 0; h_counter < mwidth; h_counter++) {
    hide_pixels(cover_image, message_image, h_counter, h_counter * n, lsb, n,
                mlength);
  }
  return (1);
}


x86 assembly (clang, -O0):
<hide_image>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x84(%rbp)
movl   $0x0,-0x84(%rbp)
movslq -0x84(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    11a1 <hide_image+0x91>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x84(%rbp),%edx
mov    -0x84(%rbp),%ecx
imul   0x18(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    -0x18(%rbp),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1030 <hide_pixels@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    114d <hide_image+0x3d>
mov    $0x1,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hide_image>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %rcx,%rcx
jle    116f <hide_image+0x5f>
mov    %rcx,%rbx
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbp
xor    %r13d,%r13d
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,(%rsp)
mov    %rbp,%rdi
mov    %r12,%rsi
mov    %r14d,%edx
mov    %r13d,%ecx
mov    0x40(%rsp),%r8d
mov    0x48(%rsp),%r9d
xor    %eax,%eax
call   1030 <hide_pixels@plt>
add    $0x1,%r14
add    0x48(%rsp),%r13d
cmp    %r14,%rbx
jne    1140 <hide_image+0x30>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @hide_image(i16** %0, i16** %1, i64 %2, i64 %3, i64 %4, i64 %5, i32 %6, i32 %7) {
%9 = alloca i16**
%10 = alloca i16**
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i32
%16 = alloca i32
%17 = alloca [80 x i8]
%18 = alloca i32
store i16** %0, i16*** %9
store i16** %1, i16*** %10
store i64 %2, i64* %11
store i64 %3, i64* %12
store i64 %4, i64* %13
store i64 %5, i64* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
store i32 0, i32* %18
store i32 0, i32* %18
br label %19
19: ; preds = %35, %8
%20 = load i32, i32* %18
%21 = sext i32 %20 to i64
%22 = load i64, i64* %12
%23 = icmp slt i64 %21, %22
br i1 %23, label %24, label %38
24: ; preds = %19
%25 = load i16**, i16*** %9
%26 = load i16**, i16*** %10
%27 = load i32, i32* %18
%28 = load i32, i32* %18
%29 = load i32, i32* %16
%30 = mul nsw i32 %28, %29
%31 = load i32, i32* %15
%32 = load i32, i32* %16
%33 = load i64, i64* %11
%34 = call i32 (i16**, i16**, i32, i32, i32, i32, i64, ...) bitcast (i32 (...)* @hide_pixels to i32 (i16**, i16**, i32, i32, i32, i32, i64, ...)*)(i16** %25, i16** %26, i32 %27, i32 %30, i32 %31, i32 %32, i64 %33)
br label %35
35: ; preds = %24
%36 = load i32, i32* %18
%37 = add nsw i32 %36, 1
store i32 %37, i32* %18
br label %19
38: ; preds = %19
ret i32 1
}

LLVM IR (-O2):
define i32 @hide_image(i16** %0, i16** %1, i64 %2, i64 %3, i64 %4, i64 %5, i32 %6, i32 %7) {
%9 = icmp sgt i64 %3, 0
br i1 %9, label %10, label %17
10: ; preds = %8, %10
%11 = phi i64 [ %15, %10 ], [ 0, %8 ]
%12 = trunc i64 %11 to i32
%13 = mul nsw i32 %12, %7
%14 = tail call i32 (i16**, i16**, i32, i32, i32, i32, i64, ...) bitcast (i32 (...)* @hide_pixels to i32 (i16**, i16**, i32, i32, i32, i32, i64, ...)*)(i16** %0, i16** %1, i32 %12, i32 %13, i32 %6, i32 %7, i64 %2)
%15 = add nuw nsw i64 %11, 1
%16 = icmp eq i64 %15, %3
br i1 %16, label %17, label %10
17: ; preds = %10, %8
ret i32 1
}