#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 */
typedef long ushort;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ puts(char *);
void display_usvector_number(ushort *v, long nl, long nh, char *format,
                             char *name) {
  long i;
  if (name != NULL)
    puts(name);
  for (i = nl; i <= nh; i++) {
    printf(format, i);
  }
  putchar('\n');
  for (i = nl; i <= nh; i++) {
    printf(format, v[i]);
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<display_usvector_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1160 <display_usvector_number+0x30>
mov    -0x28(%rbp),%rdi
call   1040 <puts@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x18(%rbp),%rax
jg     1194 <display_usvector_number+0x64>
mov    -0x20(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1050 <printf@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1168 <display_usvector_number+0x38>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x18(%rbp),%rax
jg     11da <display_usvector_number+0xaa>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1050 <printf@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11a6 <display_usvector_number+0x76>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_usvector_number>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%r15
test   %r8,%r8
je     1154 <display_usvector_number+0x24>
mov    %r8,%rdi
call   1040 <puts@plt>
cmp    %r12,%r13
jle    1165 <display_usvector_number+0x35>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11b5 <display_usvector_number+0x85>
lea    0x1(%r12),%rbp
mov    %r13,%rbx
nopl   (%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1170 <display_usvector_number+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    %r12,%r13
jg     11b5 <display_usvector_number+0x85>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r15,%r13,8),%rsi
mov    %r14,%rdi
call   1050 <printf@plt>
add    $0x1,%r13
cmp    %r13,%rbp
jne    11a0 <display_usvector_number+0x70>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @display_usvector_number(i64* %0, i64 %1, i64 %2, i8* %3, i8* %4) {
%6 = alloca i64*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i64
store i64* %0, i64** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%12 = load i8*, i8** %10
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %17
14: ; preds = %5
%15 = load i8*, i8** %10
%16 = call i32 @puts(i8* %15)
br label %17
17: ; preds = %14, %5
%18 = load i64, i64* %7
store i64 %18, i64* %11
br label %19
19: ; preds = %27, %17
%20 = load i64, i64* %11
%21 = load i64, i64* %8
%22 = icmp sle i64 %20, %21
br i1 %22, label %23, label %30
23: ; preds = %19
%24 = load i8*, i8** %9
%25 = load i64, i64* %11
%26 = call i32 @printf(i8* %24, i64 %25)
br label %27
27: ; preds = %23
%28 = load i64, i64* %11
%29 = add nsw i64 %28, 1
store i64 %29, i64* %11
br label %19
30: ; preds = %19
%31 = call i32 @putchar(i8 signext 10)
%32 = load i64, i64* %7
store i64 %32, i64* %11
br label %33
33: ; preds = %44, %30
%34 = load i64, i64* %11
%35 = load i64, i64* %8
%36 = icmp sle i64 %34, %35
br i1 %36, label %37, label %47
37: ; preds = %33
%38 = load i8*, i8** %9
%39 = load i64*, i64** %6
%40 = load i64, i64* %11
%41 = getelementptr inbounds i64, i64* %39, i64 %40
%42 = load i64, i64* %41
%43 = call i32 @printf(i8* %38, i64 %42)
br label %44
44: ; preds = %37
%45 = load i64, i64* %11
%46 = add nsw i64 %45, 1
store i64 %46, i64* %11
br label %33
47: ; preds = %33
%48 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @display_usvector_number(i64* nocapture %0, i64 %1, i64 %2, i8* %3, i8* %4) {
%6 = icmp eq i8* %4, null
br i1 %6, label %9, label %7
7: ; preds = %5
%8 = tail call i32 @puts(i8* %4)
br label %9
9: ; preds = %7, %5
%10 = icmp sgt i64 %1, %2
br i1 %10, label %11, label %13
11: ; preds = %9
%12 = tail call i32 @putchar(i8 signext 10)
br label %27
13: ; preds = %9, %13
%14 = phi i64 [ %16, %13 ], [ %1, %9 ]
%15 = tail call i32 @printf(i8* %3, i64 %14)
%16 = add i64 %14, 1
%17 = icmp eq i64 %14, %2
br i1 %17, label %18, label %13
18: ; preds = %13
%19 = tail call i32 @putchar(i8 signext 10)
br i1 %10, label %27, label %20
20: ; preds = %18, %20
%21 = phi i64 [ %25, %20 ], [ %1, %18 ]
%22 = getelementptr inbounds i64, i64* %0, i64 %21
%23 = load i64, i64* %22
%24 = tail call i32 @printf(i8* %3, i64 %23)
%25 = add i64 %21, 1
%26 = icmp eq i64 %21, %2
br i1 %26, label %27, label %20
27: ; preds = %20, %11, %18
%28 = tail call i32 @putchar(i8 signext 10)
ret void
}