#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*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void recur(int depth) {
  char arr[128 * 1024];
  if (depth == 20)
    return;
  arr[0] = '<';
  arr[1] = 0;
  fprintf(stderr, "%s", arr);
  recur(depth + 1);
  arr[0] = '>';
  arr[1] = 0;
  fprintf(stderr, "%s", arr);
}


x86 assembly (clang, -O0):
<recur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20010,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x14,-0x4(%rbp)
jne    113d <recur+0x1d>
jmp    119c <recur+0x7c>
movb   $0x3c,-0x20010(%rbp)
movb   $0x0,-0x2000f(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    -0x20010(%rbp),%rdx
lea    0xe9e(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1030 <recur@plt>
movb   $0x3e,-0x20010(%rbp)
movb   $0x0,-0x2000f(%rbp)
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
lea    -0x20010(%rbp),%rdx
lea    0xe69(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x20010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recur>:
cmp    $0x14,%edi
je     1188 <recur+0x68>
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20008,%rsp
mov    %edi,%ebx
movw   $0x3c,(%rsp)
mov    0x2e9e(%rip),%r12
mov    (%r12),%edi
lea    0xeb3(%rip),%r14
mov    %rsp,%r15
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <fprintf@plt>
add    $0x1,%ebx
mov    %ebx,%edi
call   1030 <recur@plt>
movw   $0x3e,(%rsp)
mov    (%r12),%edi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <fprintf@plt>
add    $0x20008,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @recur(i32 %0) {
%2 = alloca i32
%3 = alloca [131072 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 20
br i1 %5, label %6, label %7
6: ; preds = %1
br label %20
7: ; preds = %1
%8 = getelementptr inbounds [131072 x i8], [131072 x i8]* %3, i64 0, i64 0
store i8 60, i8* %8
%9 = getelementptr inbounds [131072 x i8], [131072 x i8]* %3, i64 0, i64 1
store i8 0, i8* %9
%10 = load i32, i32* @stderr
%11 = getelementptr inbounds [131072 x i8], [131072 x i8]* %3, i64 0, i64 0
%12 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
%15 = getelementptr inbounds [131072 x i8], [131072 x i8]* %3, i64 0, i64 0
store i8 62, i8* %15
%16 = getelementptr inbounds [131072 x i8], [131072 x i8]* %3, i64 0, i64 1
store i8 0, i8* %16
%17 = load i32, i32* @stderr
%18 = getelementptr inbounds [131072 x i8], [131072 x i8]* %3, i64 0, i64 0
%19 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %18)
br label %20
20: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @recur(i32 %0) {
%2 = alloca [131072 x i8]
%3 = getelementptr inbounds [131072 x i8], [131072 x i8]* %2, i64 0, i64 0
%4 = icmp eq i32 %0, 20
br i1 %4, label %12, label %5
5: ; preds = %1
store i8 60, i8* %3
%6 = getelementptr inbounds [131072 x i8], [131072 x i8]* %2, i64 0, i64 1
store i8 0, i8* %6
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%9 = add nsw i32 %0, 1
store i8 62, i8* %3
store i8 0, i8* %6
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
br label %12
12: ; preds = %1, %5
ret void
}