#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*/ putchar(char);
void indenter(int indentation, int trait) {
  for (int i = 1; i < indentation; i++)
    if (i % trait == 0)
      putchar('|');
    else
      putchar(' ');
  putchar('+');
  for (int i = 2; i < trait; i++)
    if (indentation % trait == 0)
      putchar('-');
  putchar('>');
}


x86 assembly (clang, -O0):
<indenter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    116d <indenter+0x5d>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    1150 <indenter+0x40>
mov    $0x7c,%edi
call   1030 <putchar@plt>
jmp    115a <indenter+0x4a>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    115f <indenter+0x4f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <indenter+0x15>
mov    $0x2b,%edi
call   1030 <putchar@plt>
movl   $0x2,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b7 <indenter+0xa7>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    11a4 <indenter+0x94>
mov    $0x2d,%edi
call   1030 <putchar@plt>
jmp    11a9 <indenter+0x99>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    117e <indenter+0x6e>
mov    $0x3e,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indenter>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%r14d
cmp    $0x2,%edi
jl     1152 <indenter+0x42>
mov    $0x1,%ebp
jmp    113d <indenter+0x2d>
cs nopw 0x0(%rax,%rax,1)
nop
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    %ebp,%r14d
je     1152 <indenter+0x42>
mov    %ebp,%eax
cltd
idiv   %ebx
mov    $0x7c,%edi
test   %edx,%edx
je     1130 <indenter+0x20>
mov    $0x20,%edi
jmp    1130 <indenter+0x20>
mov    $0x2b,%edi
call   1030 <putchar@plt>
cmp    $0x3,%ebx
jl     1185 <indenter+0x75>
mov    %r14d,%eax
cltd
idiv   %ebx
mov    %edx,%ebp
add    $0xfffffffe,%ebx
jmp    1175 <indenter+0x65>
xchg   %ax,%ax
add    $0xffffffff,%ebx
je     1185 <indenter+0x75>
test   %ebp,%ebp
jne    1170 <indenter+0x60>
mov    $0x2d,%edi
call   1030 <putchar@plt>
jmp    1170 <indenter+0x60>
mov    $0x3e,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @indenter(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 1, i32* %5
br label %7
7: ; preds = %21, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %7
%12 = load i32, i32* %5
%13 = load i32, i32* %4
%14 = srem i32 %12, %13
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = call i32 @putchar(i8 signext 124)
br label %20
18: ; preds = %11
%19 = call i32 @putchar(i8 signext 32)
br label %20
20: ; preds = %18, %16
br label %21
21: ; preds = %20
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %7
24: ; preds = %7
%25 = call i32 @putchar(i8 signext 43)
store i32 2, i32* %6
br label %26
26: ; preds = %38, %24
%27 = load i32, i32* %6
%28 = load i32, i32* %4
%29 = icmp slt i32 %27, %28
br i1 %29, label %30, label %41
30: ; preds = %26
%31 = load i32, i32* %3
%32 = load i32, i32* %4
%33 = srem i32 %31, %32
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %30
%36 = call i32 @putchar(i8 signext 45)
br label %37
37: ; preds = %35, %30
br label %38
38: ; preds = %37
%39 = load i32, i32* %6
%40 = add nsw i32 %39, 1
store i32 %40, i32* %6
br label %26
41: ; preds = %26
%42 = call i32 @putchar(i8 signext 62)
ret void
}

LLVM IR (-O2):
define void @indenter(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %10, label %4
4: ; preds = %10, %2
%5 = tail call i32 @putchar(i8 signext 43)
%6 = icmp sgt i32 %1, 2
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = srem i32 %0, %1
%9 = icmp eq i32 %8, 0
br label %20
10: ; preds = %2, %10
%11 = phi i32 [ %16, %10 ], [ 1, %2 ]
%12 = srem i32 %11, %1
%13 = icmp eq i32 %12, 0
%14 = select i1 %13, i8 124, i8 32
%15 = tail call i32 @putchar(i8 signext %14)
%16 = add nuw nsw i32 %11, 1
%17 = icmp eq i32 %16, %0
br i1 %17, label %4, label %10
18: ; preds = %24, %4
%19 = tail call i32 @putchar(i8 signext 62)
ret void
20: ; preds = %7, %24
%21 = phi i32 [ 2, %7 ], [ %25, %24 ]
br i1 %9, label %22, label %24
22: ; preds = %20
%23 = tail call i32 @putchar(i8 signext 45)
br label %24
24: ; preds = %20, %22
%25 = add nuw nsw i32 %21, 1
%26 = icmp eq i32 %25, %1
br i1 %26, label %18, label %20
}