#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 *, ...);
int /*<<< orphan*/ putchar(char);
void display_vector_number(float *v, long nl, long nh, char *format,
                           char *name) {
  long i;
  if (name != NULL)
    printf("%s\n", 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_vector_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     1159 <display_vector_number+0x39>
mov    -0x28(%rbp),%rsi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x18(%rbp),%rax
jg     118f <display_vector_number+0x6f>
mov    -0x20(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1161 <display_vector_number+0x41>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x18(%rbp),%rax
jg     11dc <display_vector_number+0xbc>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11a1 <display_vector_number+0x81>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_vector_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_vector_number+0x24>
mov    %r8,%rdi
call   1040 <puts@plt>
cmp    %r12,%r13
jle    1165 <display_vector_number+0x35>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11bd <display_vector_number+0x8d>
lea    0x1(%r12),%rbp
mov    %r13,%rbx
nopl   (%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1170 <display_vector_number+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    %r12,%r13
jg     11bd <display_vector_number+0x8d>
cs nopw 0x0(%rax,%rax,1)
nop
movss  (%r15,%r13,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
add    $0x1,%r13
cmp    %r13,%rbp
jne    11a0 <display_vector_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):
@.str = [4 x i8] c"%s\0A\00"
define void @display_vector_number(float* %0, i64 %1, i64 %2, i8* %3, i8* %4) {
%6 = alloca float*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i64
store float* %0, float** %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 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), 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 (i8*, ...) @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 = %45, %30
%34 = load i64, i64* %11
%35 = load i64, i64* %8
%36 = icmp sle i64 %34, %35
br i1 %36, label %37, label %48
37: ; preds = %33
%38 = load i8*, i8** %9
%39 = load float*, float** %6
%40 = load i64, i64* %11
%41 = getelementptr inbounds float, float* %39, i64 %40
%42 = load float, float* %41
%43 = fpext float %42 to double
%44 = call i32 (i8*, ...) @printf(i8* %38, double %43)
br label %45
45: ; preds = %37
%46 = load i64, i64* %11
%47 = add nsw i64 %46, 1
store i64 %47, i64* %11
br label %33
48: ; preds = %33
%49 = call i32 @putchar(i8 signext 10)
ret void
}

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