#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 *, short);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ puts(char *);
void display_svector_number(short *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_svector_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_svector_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     1197 <display_svector_number+0x67>
mov    -0x20(%rbp),%rdi
mov    -0x30(%rbp),%rax
movswl %ax,%esi
call   1050 <printf@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1168 <display_svector_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     11dd <display_svector_number+0xad>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%rcx
movswl (%rax,%rcx,2),%esi
call   1050 <printf@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11a9 <display_svector_number+0x79>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_svector_number>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r12
mov    %rsi,%rbx
mov    %rdi,%r15
test   %r8,%r8
je     1154 <display_svector_number+0x24>
mov    %r8,%rdi
call   1040 <puts@plt>
cmp    %r12,%rbx
jle    1165 <display_svector_number+0x35>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11b6 <display_svector_number+0x86>
lea    0x1(%r12),%r13
mov    %rbx,%rbp
nopl   (%rax)
movswl %bp,%esi
mov    %r14,%rdi
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r13
jne    1170 <display_svector_number+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    %r12,%rbx
jg     11b6 <display_svector_number+0x86>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movswl (%r15,%rbx,2),%esi
mov    %r14,%rdi
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    11a0 <display_svector_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_svector_number(i16* %0, i64 %1, i64 %2, i8* %3, i8* %4) {
%6 = alloca i16*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i64
store i16* %0, i16** %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 = %28, %17
%20 = load i64, i64* %11
%21 = load i64, i64* %8
%22 = icmp sle i64 %20, %21
br i1 %22, label %23, label %31
23: ; preds = %19
%24 = load i8*, i8** %9
%25 = load i64, i64* %11
%26 = trunc i64 %25 to i16
%27 = call i32 @printf(i8* %24, i16 signext %26)
br label %28
28: ; preds = %23
%29 = load i64, i64* %11
%30 = add nsw i64 %29, 1
store i64 %30, i64* %11
br label %19
31: ; preds = %19
%32 = call i32 @putchar(i8 signext 10)
%33 = load i64, i64* %7
store i64 %33, i64* %11
br label %34
34: ; preds = %45, %31
%35 = load i64, i64* %11
%36 = load i64, i64* %8
%37 = icmp sle i64 %35, %36
br i1 %37, label %38, label %48
38: ; preds = %34
%39 = load i8*, i8** %9
%40 = load i16*, i16** %6
%41 = load i64, i64* %11
%42 = getelementptr inbounds i16, i16* %40, i64 %41
%43 = load i16, i16* %42
%44 = call i32 @printf(i8* %39, i16 signext %43)
br label %45
45: ; preds = %38
%46 = load i64, i64* %11
%47 = add nsw i64 %46, 1
store i64 %47, i64* %11
br label %34
48: ; preds = %34
%49 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @display_svector_number(i16* 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 %28
13: ; preds = %9, %13
%14 = phi i64 [ %17, %13 ], [ %1, %9 ]
%15 = trunc i64 %14 to i16
%16 = tail call i32 @printf(i8* %3, i16 signext %15)
%17 = add i64 %14, 1
%18 = icmp eq i64 %14, %2
br i1 %18, label %19, label %13
19: ; preds = %13
%20 = tail call i32 @putchar(i8 signext 10)
br i1 %10, label %28, label %21
21: ; preds = %19, %21
%22 = phi i64 [ %26, %21 ], [ %1, %19 ]
%23 = getelementptr inbounds i16, i16* %0, i64 %22
%24 = load i16, i16* %23
%25 = tail call i32 @printf(i8* %3, i16 signext %24)
%26 = add i64 %22, 1
%27 = icmp eq i64 %22, %2
br i1 %27, label %28, label %21
28: ; preds = %21, %11, %19
%29 = tail call i32 @putchar(i8 signext 10)
ret void
}