#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*/ printf(char *, unsigned int);
void dumpLine(unsigned int *line, short arrlen, int address) {
  printf("%03x: ", address * 4);
  int i;
  for (i = 0; i < arrlen; i++) {
    printf("%08x ", line[i]);
  }
}


x86 assembly (clang, -O0):
<dumpLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%esi
shl    $0x2,%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
movswl -0xa(%rbp),%ecx
cmp    %ecx,%eax
jge    1173 <dumpLine+0x63>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113f <dumpLine+0x2f>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumpLine>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%r15
lea    0x0(,%rdx,4),%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
test   %bp,%bp
jle    1155 <dumpLine+0x45>
movzwl %bp,%ebp
xor    %ebx,%ebx
lea    0xec7(%rip),%r14
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1140 <dumpLine+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%03x: \00"
@.str.1 = [6 x i8] c"%08x \00"
define void @dumpLine(i32* %0, i16 signext %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i16
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i16 %1, i16* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = mul nsw i32 %8, 4
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %9)
store i32 0, i32* %7
br label %11
11: ; preds = %23, %3
%12 = load i32, i32* %7
%13 = load i16, i16* %5
%14 = sext i16 %13 to i32
%15 = icmp slt i32 %12, %14
br i1 %15, label %16, label %26
16: ; preds = %11
%17 = load i32*, i32** %4
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = load i32, i32* %20
%22 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %21)
br label %23
23: ; preds = %16
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 1
store i32 %25, i32* %7
br label %11
26: ; preds = %11
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%03x: \00"
@.str.1 = [6 x i8] c"%08x \00"
define void @dumpLine(i32* nocapture %0, i16 signext %1, i32 %2) {
%4 = shl nsw i32 %2, 2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = icmp sgt i16 %1, 0
br i1 %6, label %7, label %16
7: ; preds = %3
%8 = zext i16 %1 to i64
br label %9
9: ; preds = %7, %9
%10 = phi i64 [ 0, %7 ], [ %14, %9 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = add nuw nsw i64 %10, 1
%15 = icmp eq i64 %14, %8
br i1 %15, label %16, label %9
16: ; preds = %9, %3
ret void
}