#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*/ dump(unsigned char *, int);
int /*<<< orphan*/ md4(char *, size_t, unsigned char *);
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ printf(char *, size_t);
int main(int argc, char *argv[]) {
  size_t cn;
  char buf[256];
  unsigned char r[16];
  memset(buf, 'a', 256);
  for (cn = 0; cn < 150; cn++) {
    md4(buf, cn, r);
    printf("%7d ", cn);
    dump(r, 16);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x120(%rbp),%rdi
mov    $0x61,%esi
mov    $0x100,%edx
call   1040 <memset@plt>
movq   $0x0,-0x18(%rbp)
cmpq   $0x96,-0x18(%rbp)
jae    11ce <main+0x8e>
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x130(%rbp),%rdx
call   1050 <md4@plt>
mov    -0x18(%rbp),%rsi
lea    0xe59(%rip),%rdi
call   1030 <printf@plt>
lea    -0x130(%rbp),%rdi
mov    $0x10,%esi
call   1060 <dump@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1177 <main+0x37>
xor    %eax,%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x118,%rsp
lea    0x10(%rsp),%r14
mov    %r14,%rdi
mov    $0x61,%esi
mov    $0x100,%edx
call   1040 <memset@plt>
xor    %ebx,%ebx
mov    %rsp,%r15
lea    0xe8f(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1050 <md4@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    $0x10,%esi
call   1060 <dump@plt>
add    $0x1,%rbx
cmp    $0x96,%rbx
jne    1180 <main+0x40>
xor    %eax,%eax
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%7d \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca [256 x i8]
%8 = alloca [16 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%10 = call i32 @memset(i8* %9, i8 signext 97, i32 256)
store i64 0, i64* %6
br label %11
11: ; preds = %23, %2
%12 = load i64, i64* %6
%13 = icmp ult i64 %12, 150
br i1 %13, label %14, label %26
14: ; preds = %11
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%16 = load i64, i64* %6
%17 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%18 = call i32 @md4(i8* %15, i64 %16, i8* %17)
%19 = load i64, i64* %6
%20 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %19)
%21 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%22 = call i32 @dump(i8* %21, i32 16)
br label %23
23: ; preds = %14
%24 = load i64, i64* %6
%25 = add i64 %24, 1
store i64 %25, i64* %6
br label %11
26: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%7d \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [256 x i8]
%4 = alloca [16 x i8]
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%7 = call i32 @memset(i8* %5, i8 signext 97, i32 256)
br label %8
8: ; preds = %2, %8
%9 = phi i64 [ 0, %2 ], [ %13, %8 ]
%10 = call i32 @md4(i8* %5, i64 %9, i8* %6)
%11 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %9)
%12 = call i32 @dump(i8* %6, i32 16)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, 150
br i1 %14, label %15, label %8
15: ; preds = %8
ret i32 0
}