#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);
int function_e(int n) {
  for (int i = 0; i < n; i += 2) {
    printf("%d\n", i);
  }
  return n <= 0 ? 1 : function_e(n - 2) + 1;
}


x86 assembly (clang, -O0):
<function_e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115b <function_e+0x3b>
mov    -0x8(%rbp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <function_e+0x12>
cmpl   $0x0,-0x4(%rbp)
jg     1172 <function_e+0x52>
mov    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1183 <function_e+0x63>
mov    -0x4(%rbp),%edi
sub    $0x2,%edi
call   1040 <function_e@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_e>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    1165 <function_e+0x55>
mov    %edi,%ebx
mov    $0x1,%r14d
lea    0xed6(%rip),%r15
nopw   0x0(%rax,%rax,1)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
add    $0x2,%ebp
cmp    %ebx,%ebp
jl     1140 <function_e+0x30>
test   %ebx,%ebx
jle    116b <function_e+0x5b>
lea    -0x2(%rbx),%eax
add    $0x1,%r14d
cmp    $0x2,%ebx
mov    %eax,%ebx
jg     1130 <function_e+0x20>
jmp    116b <function_e+0x5b>
mov    $0x1,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @function_e(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %17
3: ; preds = %1, %13
%4 = phi i32 [ %14, %13 ], [ %0, %1 ]
%5 = phi i32 [ %15, %13 ], [ 1, %1 ]
br label %8
6: ; preds = %8
%7 = icmp slt i32 %4, 1
br i1 %7, label %17, label %13
8: ; preds = %3, %8
%9 = phi i32 [ %11, %8 ], [ 0, %3 ]
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i32 %9, 2
%12 = icmp slt i32 %11, %4
br i1 %12, label %8, label %6
13: ; preds = %6
%14 = add nsw i32 %4, -2
%15 = add nuw nsw i32 %5, 1
%16 = icmp sgt i32 %4, 2
br i1 %16, label %3, label %17
17: ; preds = %6, %13, %1
%18 = phi i32 [ 1, %1 ], [ %5, %6 ], [ %15, %13 ]
ret i32 %18
}