void lms_pin_down(int *d, int *x, int *delta, int *p_H, int *p_X) {
  int f;
  *d = 7;
  *x = 8;
  *delta = 1;
  for (f = 0; f < 512000; f++) {
    *p_H++ = 8;
    *p_X++ = 1;
  }
}


x86 assembly (clang, -O0):
<lms_pin_down>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x7,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x8,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x7d000,-0x2c(%rbp)
jge    1182 <lms_pin_down+0x82>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x20(%rbp)
movl   $0x8,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x28(%rbp)
movl   $0x1,(%rax)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    113d <lms_pin_down+0x3d>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lms_pin_down>:
movl   $0x7,(%rdi)
movl   $0x8,(%rsi)
movl   $0x1,(%rdx)
lea    0x1f4000(%r8),%rax
cmp    %rcx,%rax
jbe    11da <lms_pin_down+0xda>
lea    0x1f4000(%rcx),%rax
cmp    %r8,%rax
jbe    11da <lms_pin_down+0xda>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movl   $0x8,(%rcx,%rax,4)
movl   $0x1,(%r8,%rax,4)
movl   $0x8,0x4(%rcx,%rax,4)
movl   $0x1,0x4(%r8,%rax,4)
movl   $0x8,0x8(%rcx,%rax,4)
movl   $0x1,0x8(%r8,%rax,4)
movl   $0x8,0xc(%rcx,%rax,4)
movl   $0x1,0xc(%r8,%rax,4)
movl   $0x8,0x10(%rcx,%rax,4)
movl   $0x1,0x10(%r8,%rax,4)
movl   $0x8,0x14(%rcx,%rax,4)
movl   $0x1,0x14(%r8,%rax,4)
movl   $0x8,0x18(%rcx,%rax,4)
movl   $0x1,0x18(%r8,%rax,4)
movl   $0x8,0x1c(%rcx,%rax,4)
movl   $0x1,0x1c(%r8,%rax,4)
add    $0x8,%rax
cmp    $0x7d000,%eax
jne    1140 <lms_pin_down+0x40>
jmp    126e <lms_pin_down+0x16e>
mov    $0x24,%eax
movaps 0xe1a(%rip),%xmm0
movaps 0xe23(%rip),%xmm1
nopl   (%rax)
movups %xmm0,-0x90(%rcx,%rax,4)
ff
movups %xmm0,-0x80(%rcx,%rax,4)
movups %xmm1,-0x90(%r8,%rax,4)
ff ff
movups %xmm1,-0x80(%r8,%rax,4)
movups %xmm0,-0x70(%rcx,%rax,4)
movups %xmm0,-0x60(%rcx,%rax,4)
movups %xmm1,-0x70(%r8,%rax,4)
movups %xmm1,-0x60(%r8,%rax,4)
movups %xmm0,-0x50(%rcx,%rax,4)
movups %xmm0,-0x40(%rcx,%rax,4)
movups %xmm1,-0x50(%r8,%rax,4)
movups %xmm1,-0x40(%r8,%rax,4)
movups %xmm0,-0x30(%rcx,%rax,4)
movups %xmm0,-0x20(%rcx,%rax,4)
movups %xmm1,-0x30(%r8,%rax,4)
movups %xmm1,-0x20(%r8,%rax,4)
movups %xmm0,-0x10(%rcx,%rax,4)
movups %xmm0,(%rcx,%rax,4)
movups %xmm1,-0x10(%r8,%rax,4)
movups %xmm1,(%r8,%rax,4)
add    $0x28,%rax
cmp    $0x7d024,%rax
jne    11f0 <lms_pin_down+0xf0>
ret

LLVM IR (-O0):
define void @lms_pin_down(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%12 = load i32*, i32** %6
store i32 7, i32* %12
%13 = load i32*, i32** %7
store i32 8, i32* %13
%14 = load i32*, i32** %8
store i32 1, i32* %14
store i32 0, i32* %11
br label %15
15: ; preds = %23, %5
%16 = load i32, i32* %11
%17 = icmp slt i32 %16, 512000
br i1 %17, label %18, label %26
18: ; preds = %15
%19 = load i32*, i32** %9
%20 = getelementptr inbounds i32, i32* %19, i32 1
store i32* %20, i32** %9
store i32 8, i32* %19
%21 = load i32*, i32** %10
%22 = getelementptr inbounds i32, i32* %21, i32 1
store i32* %22, i32** %10
store i32 1, i32* %21
br label %23
23: ; preds = %18
%24 = load i32, i32* %11
%25 = add nsw i32 %24, 1
store i32 %25, i32* %11
br label %15
26: ; preds = %15
ret void
}

LLVM IR (-O2):
define void @lms_pin_down(i32* nocapture writeonly %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i32* nocapture writeonly %4) {
store i32 7, i32* %0
store i32 8, i32* %1
store i32 1, i32* %2
%6 = getelementptr i32, i32* %3, i64 512000
%7 = getelementptr i32, i32* %4, i64 512000
%8 = icmp ugt i32* %7, %3
%9 = icmp ugt i32* %6, %4
%10 = and i1 %8, %9
br i1 %10, label %59, label %11
11: ; preds = %5, %11
%12 = phi i64 [ %57, %11 ], [ 0, %5 ]
%13 = getelementptr i32, i32* %4, i64 %12
%14 = getelementptr i32, i32* %3, i64 %12
%15 = bitcast i32* %14 to <4 x i32>*
store <4 x i32> <i32 8, i32 8, i32 8, i32 8>, <4 x i32>* %15
%16 = getelementptr i32, i32* %14, i64 4
%17 = bitcast i32* %16 to <4 x i32>*
store <4 x i32> <i32 8, i32 8, i32 8, i32 8>, <4 x i32>* %17
%18 = bitcast i32* %13 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %18
%19 = getelementptr i32, i32* %13, i64 4
%20 = bitcast i32* %19 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %20
%21 = add nuw nsw i64 %12, 8
%22 = getelementptr i32, i32* %4, i64 %21
%23 = getelementptr i32, i32* %3, i64 %21
%24 = bitcast i32* %23 to <4 x i32>*
store <4 x i32> <i32 8, i32 8, i32 8, i32 8>, <4 x i32>* %24
%25 = getelementptr i32, i32* %23, i64 4
%26 = bitcast i32* %25 to <4 x i32>*
store <4 x i32> <i32 8, i32 8, i32 8, i32 8>, <4 x i32>* %26
%27 = bitcast i32* %22 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %27
%28 = getelementptr i32, i32* %22, i64 4
%29 = bitcast i32* %28 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %29
%30 = add nuw nsw i64 %12, 16
%31 = getelementptr i32, i32* %4, i64 %30
%32 = getelementptr i32, i32* %3, i64 %30
%33 = bitcast i32* %32 to <4 x i32>*
store <4 x i32> <i32 8, i32 8, i32 8, i32 8>, <4 x i32>* %33
%34 = getelementptr i32, i32* %32, i64 4
%35 = bitcast i32* %34 to <4 x i32>*
store <4 x i32> <i32 8, i32 8, i32 8, i32 8>, <4 x i32>* %35
%36 = bitcast i32* %31 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %36
%37 = getelementptr i32, i32* %31, i64 4
%38 = bitcast i32* %37 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %38
%39 = add nuw nsw i64 %12, 24
%40 = getelementptr i32, i32* %4, i64 %39
%41 = getelementptr i32, i32* %3, i64 %39
%42 = bitcast i32* %41 to <4 x i32>*
store <4 x i32> <i32 8, i32 8, i32 8, i32 8>, <4 x i32>* %42
%43 = getelementptr i32, i32* %41, i64 4
%44 = bitcast i32* %43 to <4 x i32>*
store <4 x i32> <i32 8, i32 8, i32 8, i32 8>, <4 x i32>* %44
%45 = bitcast i32* %40 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %45
%46 = getelementptr i32, i32* %40, i64 4
%47 = bitcast i32* %46 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %47
%48 = add nuw nsw i64 %12, 32
%49 = getelementptr i32, i32* %4, i64 %48
%50 = getelementptr i32, i32* %3, i64 %48
%51 = bitcast i32* %50 to <4 x i32>*
store <4 x i32> <i32 8, i32 8, i32 8, i32 8>, <4 x i32>* %51
%52 = getelementptr i32, i32* %50, i64 4
%53 = bitcast i32* %52 to <4 x i32>*
store <4 x i32> <i32 8, i32 8, i32 8, i32 8>, <4 x i32>* %53
%54 = bitcast i32* %49 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %54
%55 = getelementptr i32, i32* %49, i64 4
%56 = bitcast i32* %55 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %56
%57 = add nuw nsw i64 %12, 40
%58 = icmp eq i64 %57, 512000
br i1 %58, label %81, label %11
59: ; preds = %5, %59
%60 = phi i32 [ %79, %59 ], [ 0, %5 ]
%61 = phi i32* [ %78, %59 ], [ %4, %5 ]
%62 = phi i32* [ %77, %59 ], [ %3, %5 ]
%63 = getelementptr inbounds i32, i32* %62, i64 1
store i32 8, i32* %62
%64 = getelementptr inbounds i32, i32* %61, i64 1
store i32 1, i32* %61
%65 = getelementptr inbounds i32, i32* %62, i64 2
store i32 8, i32* %63
%66 = getelementptr inbounds i32, i32* %61, i64 2
store i32 1, i32* %64
%67 = getelementptr inbounds i32, i32* %62, i64 3
store i32 8, i32* %65
%68 = getelementptr inbounds i32, i32* %61, i64 3
store i32 1, i32* %66
%69 = getelementptr inbounds i32, i32* %62, i64 4
store i32 8, i32* %67
%70 = getelementptr inbounds i32, i32* %61, i64 4
store i32 1, i32* %68
%71 = getelementptr inbounds i32, i32* %62, i64 5
store i32 8, i32* %69
%72 = getelementptr inbounds i32, i32* %61, i64 5
store i32 1, i32* %70
%73 = getelementptr inbounds i32, i32* %62, i64 6
store i32 8, i32* %71
%74 = getelementptr inbounds i32, i32* %61, i64 6
store i32 1, i32* %72
%75 = getelementptr inbounds i32, i32* %62, i64 7
store i32 8, i32* %73
%76 = getelementptr inbounds i32, i32* %61, i64 7
store i32 1, i32* %74
%77 = getelementptr inbounds i32, i32* %62, i64 8
store i32 8, i32* %75
%78 = getelementptr inbounds i32, i32* %61, i64 8
store i32 1, i32* %76
%79 = add nuw nsw i32 %60, 8
%80 = icmp eq i32 %79, 512000
br i1 %80, label %81, label %59
81: ; preds = %11, %59
ret void
}