#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*/ con_printf(char *, ...);
void internal_print_numbers(int size) {
  int i;
  con_printf("  |");
  for (i = 0; i < size; i++) {
    con_printf(" %3d", i);
  }
  con_printf("|\n");
}


x86 assembly (clang, -O0):
<internal_print_numbers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <con_printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115b <internal_print_numbers+0x4b>
mov    -0x8(%rbp),%esi
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <con_printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <internal_print_numbers+0x20>
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <con_printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<internal_print_numbers>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
lea    0xee3(%rip),%rdi
xor    %eax,%eax
call   1030 <con_printf@plt>
test   %ebx,%ebx
jle    1153 <internal_print_numbers+0x43>
lea    0xed5(%rip),%r14
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <con_printf@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1140 <internal_print_numbers+0x30>
lea    0xeaf(%rip),%rdi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <con_printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c" |\00"
@.str.1 = [5 x i8] c" %3d\00"
@.str.2 = [3 x i8] c"|\0A\00"
define void @internal_print_numbers(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (i8*, ...) @con_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %5
5: ; preds = %12, %1
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @con_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %9
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %5
15: ; preds = %5
%16 = call i32 (i8*, ...) @con_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c" |\00"
@.str.1 = [5 x i8] c" %3d\00"
@.str.2 = [3 x i8] c"|\0A\00"
define void @internal_print_numbers(i32 %0) {
%2 = tail call i32 (i8*, ...) @con_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 (i8*, ...) @con_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
%10 = tail call i32 (i8*, ...) @con_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}