int br(base, counter) {
  int src = 0b1111000111111111;
  int src_reg;
  char assembly[50] = "br";
  src_reg = base | src;
  if (src_reg == 0b1111000111111111) {
    strcat(assembly, "r0");
  } else if (src_reg == 0b1111100111111111) {
    strcat(assembly, "n ");
  } else if (src_reg == 0b1111010111111111) {
    strcat(assembly, "z ");
  } else if (src_reg == 0b1111001111111111) {
    strcat(assembly, "p ");
  } else if (src_reg == 0b1111110111111111) {
    strcat(assembly, "nz ");
  } else if (src_reg == 0b1111101111111111) {
    strcat(assembly, "np ");
  } else if (src_reg == 0b1111011111111111) {
    strcat(assembly, "zp ");
  } else if (src_reg == 0b1111111111111111) {
    strcat(assembly, "nzp ");
  }
  strcat(assembly, "0x");
  printf("%s", assembly);
  direct_addressing(base, counter);
  return 0;
}


x86 assembly (clang, -O0):
<br>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0xf1ff,-0xc(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x32,%edx
call   1040 <memset@plt>
movb   $0x62,-0x50(%rbp)
movb   $0x72,-0x4f(%rbp)
mov    -0x4(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0xf1ff,-0x10(%rbp)
jne    1198 <br+0x58>
lea    -0x50(%rbp),%rdi
lea    0xe72(%rip),%rsi
call   1060 <strcat@plt>
jmp    12a4 <br+0x164>
cmpl   $0xf9ff,-0x10(%rbp)
jne    11ba <br+0x7a>
lea    -0x50(%rbp),%rdi
lea    0xe53(%rip),%rsi
call   1060 <strcat@plt>
jmp    129f <br+0x15f>
cmpl   $0xf5ff,-0x10(%rbp)
jne    11dc <br+0x9c>
lea    -0x50(%rbp),%rdi
lea    0xe35(%rip),%rsi
call   1060 <strcat@plt>
jmp    129a <br+0x15a>
cmpl   $0xf3ff,-0x10(%rbp)
jne    11fe <br+0xbe>
lea    -0x50(%rbp),%rdi
lea    0xe17(%rip),%rsi
call   1060 <strcat@plt>
jmp    1295 <br+0x155>
cmpl   $0xfdff,-0x10(%rbp)
jne    1220 <br+0xe0>
lea    -0x50(%rbp),%rdi
lea    0xdf0(%rip),%rsi
call   1060 <strcat@plt>
jmp    1290 <br+0x150>
cmpl   $0xfbff,-0x10(%rbp)
jne    1242 <br+0x102>
lea    -0x50(%rbp),%rdi
lea    0xdd2(%rip),%rsi
call   1060 <strcat@plt>
jmp    128b <br+0x14b>
cmpl   $0xf7ff,-0x10(%rbp)
jne    1264 <br+0x124>
lea    -0x50(%rbp),%rdi
lea    0xdb5(%rip),%rsi
call   1060 <strcat@plt>
jmp    1286 <br+0x146>
cmpl   $0xffff,-0x10(%rbp)
jne    1281 <br+0x141>
lea    -0x50(%rbp),%rdi
lea    0xd92(%rip),%rsi
call   1060 <strcat@plt>
jmp    1286 <br+0x146>
jmp    128b <br+0x14b>
jmp    1290 <br+0x150>
jmp    1295 <br+0x155>
jmp    129a <br+0x15a>
jmp    129f <br+0x15f>
jmp    12a4 <br+0x164>
lea    -0x50(%rbp),%rdi
lea    0xd64(%rip),%rsi
call   1060 <strcat@plt>
lea    -0x50(%rbp),%rsi
lea    0xd57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1050 <direct_addressing@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<br>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %esi,%r14d
mov    %edi,%ebp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movw   $0x0,0x30(%rsp)
movw   $0x7262,(%rsp)
mov    %edi,%eax
shr    $0x9,%eax
and    $0xffffff87,%eax
cmp    $0x7,%eax
ja     121a <br+0xea>
lea    0xe8d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    %rsp,%rdi
call   1030 <strlen@plt>
movw   $0x3072,(%rsp,%rax,1)
movb   $0x0,0x2(%rsp,%rax,1)
jmp    121a <br+0xea>
mov    %rsp,%rdi
call   1030 <strlen@plt>
movw   $0x2070,(%rsp,%rax,1)
movb   $0x0,0x2(%rsp,%rax,1)
jmp    121a <br+0xea>
mov    %rsp,%rdi
call   1030 <strlen@plt>
movw   $0x207a,(%rsp,%rax,1)
movb   $0x0,0x2(%rsp,%rax,1)
jmp    121a <br+0xea>
mov    %rsp,%rdi
call   1030 <strlen@plt>
movl   $0x20707a,(%rsp,%rax,1)
jmp    121a <br+0xea>
mov    %rsp,%rdi
call   1030 <strlen@plt>
movw   $0x206e,(%rsp,%rax,1)
movb   $0x0,0x2(%rsp,%rax,1)
jmp    121a <br+0xea>
mov    %rsp,%rdi
call   1030 <strlen@plt>
movl   $0x20706e,(%rsp,%rax,1)
jmp    121a <br+0xea>
mov    %rsp,%rdi
call   1030 <strlen@plt>
movl   $0x207a6e,(%rsp,%rax,1)
jmp    121a <br+0xea>
mov    %rsp,%rdi
call   1030 <strlen@plt>
movl   $0x20707a6e,(%rsp,%rax,1)
movb   $0x0,0x4(%rsp,%rax,1)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
movw   $0x7830,(%rsp,%rax,1)
movb   $0x0,0x2(%rsp,%rax,1)
lea    0xdfa(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%edi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <direct_addressing@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"r0\00"
@.str.1 = [3 x i8] c"n \00"
@.str.2 = [3 x i8] c"z \00"
@.str.3 = [3 x i8] c"p \00"
@.str.4 = [4 x i8] c"nz \00"
@.str.5 = [4 x i8] c"np \00"
@.str.6 = [4 x i8] c"zp \00"
@.str.7 = [5 x i8] c"nzp \00"
@.str.8 = [3 x i8] c"0x\00"
@.str.9 = [3 x i8] c"%s\00"
define i32 @br(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [50 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 61951, i32* %5
%8 = bitcast [50 x i8]* %7 to i8*
%9 = bitcast i8* %8 to [50 x i8]*
%10 = getelementptr inbounds [50 x i8], [50 x i8]* %9, i32 0, i32 0
store i8 98, i8* %10
%11 = getelementptr inbounds [50 x i8], [50 x i8]* %9, i32 0, i32 1
store i8 114, i8* %11
%12 = load i32, i32* %3
%13 = load i32, i32* %5
%14 = or i32 %12, %13
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = icmp eq i32 %15, 61951
br i1 %16, label %17, label %20
17: ; preds = %2
%18 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%19 = call i8* @strcat(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %69
20: ; preds = %2
%21 = load i32, i32* %6
%22 = icmp eq i32 %21, 63999
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%25 = call i8* @strcat(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %68
26: ; preds = %20
%27 = load i32, i32* %6
%28 = icmp eq i32 %27, 62975
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%31 = call i8* @strcat(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %67
32: ; preds = %26
%33 = load i32, i32* %6
%34 = icmp eq i32 %33, 62463
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%37 = call i8* @strcat(i8* %36, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %66
38: ; preds = %32
%39 = load i32, i32* %6
%40 = icmp eq i32 %39, 65023
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%43 = call i8* @strcat(i8* %42, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
br label %65
44: ; preds = %38
%45 = load i32, i32* %6
%46 = icmp eq i32 %45, 64511
br i1 %46, label %47, label %50
47: ; preds = %44
%48 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%49 = call i8* @strcat(i8* %48, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
br label %64
50: ; preds = %44
%51 = load i32, i32* %6
%52 = icmp eq i32 %51, 63487
br i1 %52, label %53, label %56
53: ; preds = %50
%54 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%55 = call i8* @strcat(i8* %54, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %63
56: ; preds = %50
%57 = load i32, i32* %6
%58 = icmp eq i32 %57, 65535
br i1 %58, label %59, label %62
59: ; preds = %56
%60 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%61 = call i8* @strcat(i8* %60, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
br label %62
62: ; preds = %59, %56
br label %63
63: ; preds = %62, %53
br label %64
64: ; preds = %63, %47
br label %65
65: ; preds = %64, %41
br label %66
66: ; preds = %65, %35
br label %67
67: ; preds = %66, %29
br label %68
68: ; preds = %67, %23
br label %69
69: ; preds = %68, %17
%70 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%71 = call i8* @strcat(i8* %70, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%72 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %72)
%74 = load i32, i32* %3
%75 = load i32, i32* %4
%76 = call i32 (i32, i32, ...) bitcast (i32 (...)* @direct_addressing to i32 (i32, i32, ...)*)(i32 %74, i32 %75)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"r0\00"
@.str.1 = [3 x i8] c"n \00"
@.str.2 = [3 x i8] c"z \00"
@.str.3 = [3 x i8] c"p \00"
@.str.7 = [5 x i8] c"nzp \00"
@.str.8 = [3 x i8] c"0x\00"
@.str.9 = [3 x i8] c"%s\00"
define i32 @br(i32 %0, i32 %1) {
%3 = alloca [50 x i8]
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
store i8 98, i8* %4
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 1
store i8 114, i8* %5
%6 = lshr i32 %0, 9
%7 = and i32 %6, 8388487
switch i32 %7, label %35 [
i32 0, label %8
i32 4, label %11
i32 2, label %14
i32 1, label %17
i32 6, label %20
i32 5, label %24
i32 3, label %28
i32 7, label %32
]
8: ; preds = %2
%9 = call i64 @strlen(i8* %4)
%10 = getelementptr [50 x i8], [50 x i8]* %3, i64 0, i64 %9
br label %35
11: ; preds = %2
%12 = call i64 @strlen(i8* %4)
%13 = getelementptr [50 x i8], [50 x i8]* %3, i64 0, i64 %12
br label %35
14: ; preds = %2
%15 = call i64 @strlen(i8* %4)
%16 = getelementptr [50 x i8], [50 x i8]* %3, i64 0, i64 %15
br label %35
17: ; preds = %2
%18 = call i64 @strlen(i8* %4)
%19 = getelementptr [50 x i8], [50 x i8]* %3, i64 0, i64 %18
br label %35
20: ; preds = %2
%21 = call i64 @strlen(i8* %4)
%22 = getelementptr [50 x i8], [50 x i8]* %3, i64 0, i64 %21
%23 = bitcast i8* %22 to i32*
store i32 2128494, i32* %23
br label %35
24: ; preds = %2
%25 = call i64 @strlen(i8* %4)
%26 = getelementptr [50 x i8], [50 x i8]* %3, i64 0, i64 %25
%27 = bitcast i8* %26 to i32*
store i32 2125934, i32* %27
br label %35
28: ; preds = %2
%29 = call i64 @strlen(i8* %4)
%30 = getelementptr [50 x i8], [50 x i8]* %3, i64 0, i64 %29
%31 = bitcast i8* %30 to i32*
store i32 2125946, i32* %31
br label %35
32: ; preds = %2
%33 = call i64 @strlen(i8* %4)
%34 = getelementptr [50 x i8], [50 x i8]* %3, i64 0, i64 %33
br label %35
35: ; preds = %2, %11, %17, %24, %32, %28, %20, %14, %8
%36 = call i64 @strlen(i8* %4)
%37 = getelementptr [50 x i8], [50 x i8]* %3, i64 0, i64 %36
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %4)
%39 = call i32 (i32, i32, ...) bitcast (i32 (...)* @direct_addressing to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
ret i32 0
}