#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 c2bf_ultra_simplified_code_to_bf_print_displacements(int rank,
                                                          int prevRank) {
  int i;
  if (rank > prevRank) {
    for (i = 0; i < rank - prevRank; i++)
      printf(">");
  } else {
    for (i = 0; i < prevRank - rank; i++)
      printf("<");
  }
}


x86 assembly (clang, -O0):
<c2bf_ultra_simplified_code_to_bf_print_displacements>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1161 <c2bf_ultra_simplified_code_to_bf_print_displacements+0x51>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jge    115c <c2bf_ultra_simplified_code_to_bf_print_displacements+0x4c>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1131 <c2bf_ultra_simplified_code_to_bf_print_displacements+0x21>
jmp    1198 <c2bf_ultra_simplified_code_to_bf_print_displacements+0x88>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
cmp    %ecx,%eax
jge    1193 <c2bf_ultra_simplified_code_to_bf_print_displacements+0x83>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1168 <c2bf_ultra_simplified_code_to_bf_print_displacements+0x58>
jmp    1198 <c2bf_ultra_simplified_code_to_bf_print_displacements+0x88>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c2bf_ultra_simplified_code_to_bf_print_displacements>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
sub    %esi,%ebp
jle    1131 <c2bf_ultra_simplified_code_to_bf_print_displacements+0x21>
test   %ebp,%ebp
jle    114f <c2bf_ultra_simplified_code_to_bf_print_displacements+0x3f>
nopl   (%rax)
mov    $0x3e,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1120 <c2bf_ultra_simplified_code_to_bf_print_displacements+0x10>
jmp    114f <c2bf_ultra_simplified_code_to_bf_print_displacements+0x3f>
mov    %esi,%ebx
sub    %edi,%ebx
test   %ebx,%ebx
jle    114f <c2bf_ultra_simplified_code_to_bf_print_displacements+0x3f>
nopl   0x0(%rax)
mov    $0x3c,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1140 <c2bf_ultra_simplified_code_to_bf_print_displacements+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c">\00"
@.str.1 = [2 x i8] c"<\00"
define void @c2bf_ultra_simplified_code_to_bf_print_displacements(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %22
9: ; preds = %2
store i32 0, i32* %5
br label %10
10: ; preds = %18, %9
%11 = load i32, i32* %5
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = sub nsw i32 %12, %13
%15 = icmp slt i32 %11, %14
br i1 %15, label %16, label %21
16: ; preds = %10
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %10
21: ; preds = %10
br label %35
22: ; preds = %2
store i32 0, i32* %5
br label %23
23: ; preds = %31, %22
%24 = load i32, i32* %5
%25 = load i32, i32* %4
%26 = load i32, i32* %3
%27 = sub nsw i32 %25, %26
%28 = icmp slt i32 %24, %27
br i1 %28, label %29, label %34
29: ; preds = %23
%30 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %31
31: ; preds = %29
%32 = load i32, i32* %5
%33 = add nsw i32 %32, 1
store i32 %33, i32* %5
br label %23
34: ; preds = %23
br label %35
35: ; preds = %34, %21
ret void
}

LLVM IR (-O2):
define void @c2bf_ultra_simplified_code_to_bf_print_displacements(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = sub i32 %1, %0
%6 = icmp sgt i32 %5, 0
br i1 %6, label %15, label %20
7: ; preds = %2
%8 = sub i32 %0, %1
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %20
10: ; preds = %7, %10
%11 = phi i32 [ %13, %10 ], [ 0, %7 ]
%12 = tail call i32 @putchar(i32 62)
%13 = add nuw nsw i32 %11, 1
%14 = icmp eq i32 %13, %8
br i1 %14, label %20, label %10
15: ; preds = %4, %15
%16 = phi i32 [ %18, %15 ], [ 0, %4 ]
%17 = tail call i32 @putchar(i32 60)
%18 = add nuw nsw i32 %16, 1
%19 = icmp eq i32 %18, %5
br i1 %19, label %20, label %15
20: ; preds = %15, %10, %4, %7
ret void
}