#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 *, ...);
void print_ordered_list_values(long ne_ordered_list, long *ordered_list) {
  int i;
  printf("\nordered_list: \n");
  for (i = 0; i < ne_ordered_list; i++) {
    printf(" %4ld ", ordered_list[i]);
  }
}


x86 assembly (clang, -O0):
<print_ordered_list_values>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    116b <print_ordered_list_values+0x5b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1135 <print_ordered_list_values+0x25>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_ordered_list_values>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
test   %r12,%r12
jle    1167 <print_ordered_list_values+0x47>
lea    0xeba(%rip),%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1150 <print_ordered_list_values+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str.1 = [7 x i8] c" %4ld \00"
@str = [16 x i8] c"\0Aordered_list: \00"
define void @print_ordered_list_values(i64 %0, i64* nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%4 = icmp sgt i64 %0, 0
br i1 %4, label %5, label %12
5: ; preds = %2, %5
%6 = phi i64 [ %10, %5 ], [ 0, %2 ]
%7 = getelementptr inbounds i64, i64* %1, i64 %6
%8 = load i64, i64* %7
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i64 %8)
%10 = add nuw nsw i64 %6, 1
%11 = icmp eq i64 %10, %0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}