#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 print_depth(int depth) {
  if (depth == 1) {
    printf("\n.   .   ");
  } else if (depth == 2) {
    printf("\n.   ");
  } else if (depth == 3) {
    printf("\n.");
  } else {
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<print_depth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1136 <print_depth+0x26>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
jmp    1182 <print_depth+0x72>
cmpl   $0x2,-0x4(%rbp)
jne    1151 <print_depth+0x41>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
jmp    117d <print_depth+0x6d>
cmpl   $0x3,-0x4(%rbp)
jne    116c <print_depth+0x5c>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    1178 <print_depth+0x68>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
jmp    117d <print_depth+0x6d>
jmp    1182 <print_depth+0x72>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_depth>:
cmp    $0x3,%edi
je     113b <print_depth+0x1b>
cmp    $0x2,%edi
je     1147 <print_depth+0x27>
cmp    $0x1,%edi
jne    1153 <print_depth+0x33>
lea    0xeca(%rip),%rdi
jmp    1040 <printf@plt>
lea    0xece(%rip),%rdi
jmp    1040 <printf@plt>
lea    0xebc(%rip),%rdi
jmp    1040 <printf@plt>
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"\0A. . \00"
@.str.1 = [6 x i8] c"\0A. \00"
@.str.2 = [3 x i8] c"\0A.\00"
define void @print_depth(i32 %0) {
switch i32 %0, label %8 [
i32 1, label %2
i32 2, label %4
i32 3, label %6
]
2: ; preds = %1
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %10
4: ; preds = %1
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %10
6: ; preds = %1
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = tail call i32 @putchar(i32 10)
br label %10
10: ; preds = %4, %8, %6, %2
ret void
}