#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*/ print_decode_line(unsigned char *, int, int, int, char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void print_ckpt_info(unsigned char *aData) {
  const int i = 96;
  int j;
  print_decode_line(aData, 0 + i, 4, 2, "nBackfill");
  for (j = 0; j < 5; j++) {
    char zLabel[100];
    sprintf(zLabel, "aReadMark[%d]", j);
    print_decode_line(aData, 4 * j + 4 + i, 4, 2, zLabel);
  }
  print_decode_line(aData, 24 + i, 8, 0, "aLock");
  print_decode_line(aData, 32 + i, 4, 2, "nBackfillAttempted");
  print_decode_line(aData, 36 + i, 4, 2, "notUsed0");
}


x86 assembly (clang, -O0):
<print_ckpt_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x60,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x60,%esi
mov    $0x4,%edx
mov    $0x2,%ecx
lea    0xeb0(%rip),%r8
call   1030 <print_decode_line@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jge    11aa <print_ckpt_info+0x8a>
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%edx
lea    0xe96(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
shl    $0x2,%esi
add    $0x4,%esi
add    $0x60,%esi
lea    -0x80(%rbp),%r8
mov    $0x4,%edx
mov    $0x2,%ecx
call   1030 <print_decode_line@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    115c <print_ckpt_info+0x3c>
mov    -0x8(%rbp),%rdi
mov    $0x78,%esi
mov    $0x8,%edx
xor    %ecx,%ecx
lea    0xe57(%rip),%r8
call   1030 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x80,%esi
mov    $0x4,%edx
mov    $0x2,%ecx
lea    0xe3e(%rip),%r8
call   1030 <print_decode_line@plt>
mov    -0x8(%rbp),%rdi
mov    $0x84,%esi
mov    $0x4,%edx
mov    $0x2,%ecx
lea    0xe32(%rip),%r8
call   1030 <print_decode_line@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_ckpt_info>:
push   %r15
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    %rdi,%rbx
lea    0xecd(%rip),%r8
mov    $0x60,%esi
mov    $0x4,%edx
mov    $0x2,%ecx
call   1030 <print_decode_line@plt>
lea    0xebc(%rip),%r15
mov    %rsp,%r14
mov    %r14,%rdi
mov    %r15,%rsi
xor    %edx,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
mov    $0x4,%edx
mov    $0x2,%ecx
mov    %r14,%r8
call   1030 <print_decode_line@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    $0x68,%esi
mov    $0x4,%edx
mov    $0x2,%ecx
mov    %r14,%r8
call   1030 <print_decode_line@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x2,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    $0x6c,%esi
mov    $0x4,%edx
mov    $0x2,%ecx
mov    %r14,%r8
call   1030 <print_decode_line@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x3,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
mov    $0x4,%edx
mov    $0x2,%ecx
mov    %r14,%r8
call   1030 <print_decode_line@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x4,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    $0x74,%esi
mov    $0x4,%edx
mov    $0x2,%ecx
mov    %r14,%r8
call   1030 <print_decode_line@plt>
lea    0xdf1(%rip),%r8
mov    %rbx,%rdi
mov    $0x78,%esi
mov    $0x8,%edx
xor    %ecx,%ecx
call   1030 <print_decode_line@plt>
lea    0xddc(%rip),%r8
mov    %rbx,%rdi
mov    $0x80,%esi
mov    $0x4,%edx
mov    $0x2,%ecx
call   1030 <print_decode_line@plt>
lea    0xdd1(%rip),%r8
mov    %rbx,%rdi
mov    $0x84,%esi
mov    $0x4,%edx
mov    $0x2,%ecx
call   1030 <print_decode_line@plt>
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [10 x i8] c"nBackfill\00"
@.str.1 = [14 x i8] c"aReadMark[%d]\00"
@.str.2 = [6 x i8] c"aLock\00"
@.str.3 = [19 x i8] c"nBackfillAttempted\00"
@.str.4 = [9 x i8] c"notUsed0\00"
define void @print_ckpt_info(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca [100 x i8]
store i8* %0, i8** %2
store i32 96, i32* %3
%6 = load i8*, i8** %2
%7 = call i32 @print_decode_line(i8* %6, i32 96, i32 4, i32 2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %4
br label %8
8: ; preds = %22, %1
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 5
br i1 %10, label %11, label %25
11: ; preds = %8
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%13 = load i32, i32* %4
%14 = call i32 @sprintf(i8* %12, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = load i8*, i8** %2
%16 = load i32, i32* %4
%17 = mul nsw i32 4, %16
%18 = add nsw i32 %17, 4
%19 = add nsw i32 %18, 96
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%21 = call i32 @print_decode_line(i8* %15, i32 %19, i32 4, i32 2, i8* %20)
br label %22
22: ; preds = %11
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
store i32 %24, i32* %4
br label %8
25: ; preds = %8
%26 = load i8*, i8** %2
%27 = call i32 @print_decode_line(i8* %26, i32 120, i32 8, i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%28 = load i8*, i8** %2
%29 = call i32 @print_decode_line(i8* %28, i32 128, i32 4, i32 2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%30 = load i8*, i8** %2
%31 = call i32 @print_decode_line(i8* %30, i32 132, i32 4, i32 2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"nBackfill\00"
@.str.1 = [14 x i8] c"aReadMark[%d]\00"
@.str.2 = [6 x i8] c"aLock\00"
@.str.3 = [19 x i8] c"nBackfillAttempted\00"
@.str.4 = [9 x i8] c"notUsed0\00"
define void @print_ckpt_info(i8* %0) {
%2 = alloca [100 x i8]
%3 = tail call i32 @print_decode_line(i8* %0, i32 96, i32 4, i32 2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 0)
%6 = call i32 @print_decode_line(i8* %0, i32 100, i32 4, i32 2, i8* %4)
%7 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 1)
%8 = call i32 @print_decode_line(i8* %0, i32 104, i32 4, i32 2, i8* %4)
%9 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 2)
%10 = call i32 @print_decode_line(i8* %0, i32 108, i32 4, i32 2, i8* %4)
%11 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 3)
%12 = call i32 @print_decode_line(i8* %0, i32 112, i32 4, i32 2, i8* %4)
%13 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 4)
%14 = call i32 @print_decode_line(i8* %0, i32 116, i32 4, i32 2, i8* %4)
%15 = call i32 @print_decode_line(i8* %0, i32 120, i32 8, i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 @print_decode_line(i8* %0, i32 128, i32 4, i32 2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%17 = call i32 @print_decode_line(i8* %0, i32 132, i32 4, i32 2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
ret void
}