#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 /*<<< orphan*/ putchar(char);
void print_left_right(int left, int right) {
  int element;
  printf("       ");
  for (element = 0; element < 20; ++element) {
    if (element == left || element == right)
      putchar('^');
    else
      putchar(' ');
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<print_left_right>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jge    118f <print_left_right+0x6f>
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
je     1163 <print_left_right+0x43>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1172 <print_left_right+0x52>
mov    $0x5e,%edi
call   1030 <putchar@plt>
jmp    117c <print_left_right+0x5c>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    1181 <print_left_right+0x61>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1141 <print_left_right+0x21>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_left_right>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
test   %ebp,%ebp
mov    $0x5e,%r15d
mov    $0x20,%edi
cmove  %r15d,%edi
mov    $0x20,%r14d
test   %ebx,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0x1,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0x1,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0x2,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0x2,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0x3,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0x3,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0x4,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0x4,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0x5,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0x5,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0x6,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0x6,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0x7,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0x7,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0x8,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0x8,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0x9,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0x9,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0xa,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0xa,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0xb,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0xb,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0xc,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0xc,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0xd,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0xd,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0xe,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0xe,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0xf,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0xf,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0x10,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0x10,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0x11,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0x11,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0x12,%ebp
mov    $0x20,%edi
cmove  %r15d,%edi
cmp    $0x12,%ebx
cmove  %r15d,%edi
call   1030 <putchar@plt>
cmp    $0x13,%ebp
cmove  %r15d,%r14d
cmp    $0x13,%ebx
cmove  %r15d,%r14d
mov    %r14d,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c" \00"
define void @print_left_right(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %0, 0
%5 = icmp eq i32 %1, 0
%6 = or i1 %4, %5
%7 = select i1 %6, i8 94, i8 32
%8 = tail call i32 @putchar(i8 signext %7)
%9 = icmp eq i32 %0, 1
%10 = icmp eq i32 %1, 1
%11 = or i1 %9, %10
%12 = select i1 %11, i8 94, i8 32
%13 = tail call i32 @putchar(i8 signext %12)
%14 = icmp eq i32 %0, 2
%15 = icmp eq i32 %1, 2
%16 = or i1 %14, %15
%17 = select i1 %16, i8 94, i8 32
%18 = tail call i32 @putchar(i8 signext %17)
%19 = icmp eq i32 %0, 3
%20 = icmp eq i32 %1, 3
%21 = or i1 %19, %20
%22 = select i1 %21, i8 94, i8 32
%23 = tail call i32 @putchar(i8 signext %22)
%24 = icmp eq i32 %0, 4
%25 = icmp eq i32 %1, 4
%26 = or i1 %24, %25
%27 = select i1 %26, i8 94, i8 32
%28 = tail call i32 @putchar(i8 signext %27)
%29 = icmp eq i32 %0, 5
%30 = icmp eq i32 %1, 5
%31 = or i1 %29, %30
%32 = select i1 %31, i8 94, i8 32
%33 = tail call i32 @putchar(i8 signext %32)
%34 = icmp eq i32 %0, 6
%35 = icmp eq i32 %1, 6
%36 = or i1 %34, %35
%37 = select i1 %36, i8 94, i8 32
%38 = tail call i32 @putchar(i8 signext %37)
%39 = icmp eq i32 %0, 7
%40 = icmp eq i32 %1, 7
%41 = or i1 %39, %40
%42 = select i1 %41, i8 94, i8 32
%43 = tail call i32 @putchar(i8 signext %42)
%44 = icmp eq i32 %0, 8
%45 = icmp eq i32 %1, 8
%46 = or i1 %44, %45
%47 = select i1 %46, i8 94, i8 32
%48 = tail call i32 @putchar(i8 signext %47)
%49 = icmp eq i32 %0, 9
%50 = icmp eq i32 %1, 9
%51 = or i1 %49, %50
%52 = select i1 %51, i8 94, i8 32
%53 = tail call i32 @putchar(i8 signext %52)
%54 = icmp eq i32 %0, 10
%55 = icmp eq i32 %1, 10
%56 = or i1 %54, %55
%57 = select i1 %56, i8 94, i8 32
%58 = tail call i32 @putchar(i8 signext %57)
%59 = icmp eq i32 %0, 11
%60 = icmp eq i32 %1, 11
%61 = or i1 %59, %60
%62 = select i1 %61, i8 94, i8 32
%63 = tail call i32 @putchar(i8 signext %62)
%64 = icmp eq i32 %0, 12
%65 = icmp eq i32 %1, 12
%66 = or i1 %64, %65
%67 = select i1 %66, i8 94, i8 32
%68 = tail call i32 @putchar(i8 signext %67)
%69 = icmp eq i32 %0, 13
%70 = icmp eq i32 %1, 13
%71 = or i1 %69, %70
%72 = select i1 %71, i8 94, i8 32
%73 = tail call i32 @putchar(i8 signext %72)
%74 = icmp eq i32 %0, 14
%75 = icmp eq i32 %1, 14
%76 = or i1 %74, %75
%77 = select i1 %76, i8 94, i8 32
%78 = tail call i32 @putchar(i8 signext %77)
%79 = icmp eq i32 %0, 15
%80 = icmp eq i32 %1, 15
%81 = or i1 %79, %80
%82 = select i1 %81, i8 94, i8 32
%83 = tail call i32 @putchar(i8 signext %82)
%84 = icmp eq i32 %0, 16
%85 = icmp eq i32 %1, 16
%86 = or i1 %84, %85
%87 = select i1 %86, i8 94, i8 32
%88 = tail call i32 @putchar(i8 signext %87)
%89 = icmp eq i32 %0, 17
%90 = icmp eq i32 %1, 17
%91 = or i1 %89, %90
%92 = select i1 %91, i8 94, i8 32
%93 = tail call i32 @putchar(i8 signext %92)
%94 = icmp eq i32 %0, 18
%95 = icmp eq i32 %1, 18
%96 = or i1 %94, %95
%97 = select i1 %96, i8 94, i8 32
%98 = tail call i32 @putchar(i8 signext %97)
%99 = icmp eq i32 %0, 19
%100 = icmp eq i32 %1, 19
%101 = or i1 %99, %100
%102 = select i1 %101, i8 94, i8 32
%103 = tail call i32 @putchar(i8 signext %102)
%104 = tail call i32 @putchar(i8 signext 10)
ret void
}