#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*/ _verbprintf(int /*<<< orphan*/, char *, ...);
void aprs_print_ax25call(unsigned char *call, int is_repeater) {
  int i;
  for (i = 0; i < 6; i++)
    if ((call[i] & 0xfe) != 0x40)
      do {
        if (0 <= 0)
          _verbprintf(0, "%c", call[i] >> 1);
      } while (0);
  int ssid = (call[6] >> 1) & 0xf;
  if (ssid)
    do {
      if (0 <= 0)
        _verbprintf(0, "-%u", ssid);
    } while (0);
  if (is_repeater && (call[6] & 0x80))
    do {
      if (0 <= 0)
        _verbprintf(0, "*");
    } while (0);
}


x86 assembly (clang, -O0):
<aprs_print_ax25call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
jge    1186 <aprs_print_ax25call+0x76>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
and    $0xfe,%eax
cmp    $0x40,%eax
je     1173 <aprs_print_ax25call+0x63>
jmp    114f <aprs_print_ax25call+0x3f>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
sar    $0x1,%edx
xor    %edi,%edi
lea    0xe99(%rip),%rsi
mov    $0x0,%al
call   1030 <_verbprintf@plt>
jmp    1173 <aprs_print_ax25call+0x63>
jmp    1178 <aprs_print_ax25call+0x68>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <aprs_print_ax25call+0x16>
mov    -0x8(%rbp),%rax
movzbl 0x6(%rax),%eax
sar    $0x1,%eax
and    $0xf,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     11be <aprs_print_ax25call+0xae>
jmp    11a6 <aprs_print_ax25call+0x96>
mov    -0x14(%rbp),%edx
xor    %edi,%edi
lea    0xe51(%rip),%rsi
mov    $0x0,%al
call   1030 <_verbprintf@plt>
jmp    11be <aprs_print_ax25call+0xae>
cmpl   $0x0,-0xc(%rbp)
je     11f8 <aprs_print_ax25call+0xe8>
mov    -0x8(%rbp),%rax
movzbl 0x6(%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     11f8 <aprs_print_ax25call+0xe8>
jmp    11e3 <aprs_print_ax25call+0xd3>
xor    %edi,%edi
lea    0xe1b(%rip),%rsi
mov    $0x0,%al
call   1030 <_verbprintf@plt>
jmp    11f8 <aprs_print_ax25call+0xe8>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aprs_print_ax25call>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
movzbl (%rdi),%edx
mov    %edx,%eax
and    $0xfffffffe,%eax
cmp    $0x40,%eax
je     1137 <aprs_print_ax25call+0x27>
shr    %edx
lea    0xed2(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
call   1030 <_verbprintf@plt>
movzbl 0x1(%rbx),%edx
mov    %edx,%eax
and    $0xfffffffe,%eax
cmp    $0x40,%eax
je     1157 <aprs_print_ax25call+0x47>
shr    %edx
lea    0xeb2(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
call   1030 <_verbprintf@plt>
movzbl 0x2(%rbx),%edx
mov    %edx,%eax
and    $0xfffffffe,%eax
cmp    $0x40,%eax
je     1177 <aprs_print_ax25call+0x67>
shr    %edx
lea    0xe92(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
call   1030 <_verbprintf@plt>
movzbl 0x3(%rbx),%edx
mov    %edx,%eax
and    $0xfffffffe,%eax
cmp    $0x40,%eax
je     1197 <aprs_print_ax25call+0x87>
shr    %edx
lea    0xe72(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
call   1030 <_verbprintf@plt>
movzbl 0x4(%rbx),%edx
mov    %edx,%eax
and    $0xfffffffe,%eax
cmp    $0x40,%eax
je     11b7 <aprs_print_ax25call+0xa7>
shr    %edx
lea    0xe52(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
call   1030 <_verbprintf@plt>
movzbl 0x5(%rbx),%edx
mov    %edx,%eax
and    $0xfffffffe,%eax
cmp    $0x40,%eax
je     11d7 <aprs_print_ax25call+0xc7>
shr    %edx
lea    0xe32(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
call   1030 <_verbprintf@plt>
movzbl 0x6(%rbx),%edx
shr    %edx
and    $0xf,%edx
je     11f2 <aprs_print_ax25call+0xe2>
lea    0xe1a(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
call   1030 <_verbprintf@plt>
test   %ebp,%ebp
je     11fc <aprs_print_ax25call+0xec>
cmpb   $0x0,0x6(%rbx)
js     1203 <aprs_print_ax25call+0xf3>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xdfd(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_verbprintf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"-%u\00"
@.str.2 = [2 x i8] c"*\00"
define void @aprs_print_ax25call(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %7
7: ; preds = %31, %2
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 6
br i1 %9, label %10, label %34
10: ; preds = %7
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = and i32 %16, 254
%18 = icmp ne i32 %17, 64
br i1 %18, label %19, label %30
19: ; preds = %10
br label %20
20: ; preds = %19
%21 = load i8*, i8** %3
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = ashr i32 %26, 1
%28 = call i32 (i32, i8*, ...) @_verbprintf(i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %27)
br label %29
29: ; preds = %20
br label %30
30: ; preds = %29, %10
br label %31
31: ; preds = %30
%32 = load i32, i32* %5
%33 = add nsw i32 %32, 1
store i32 %33, i32* %5
br label %7
34: ; preds = %7
%35 = load i8*, i8** %3
%36 = getelementptr inbounds i8, i8* %35, i64 6
%37 = load i8, i8* %36
%38 = zext i8 %37 to i32
%39 = ashr i32 %38, 1
%40 = and i32 %39, 15
store i32 %40, i32* %6
%41 = load i32, i32* %6
%42 = icmp ne i32 %41, 0
br i1 %42, label %43, label %48
43: ; preds = %34
br label %44
44: ; preds = %43
%45 = load i32, i32* %6
%46 = call i32 (i32, i8*, ...) @_verbprintf(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %45)
br label %47
47: ; preds = %44
br label %48
48: ; preds = %47, %34
%49 = load i32, i32* %4
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %62
51: ; preds = %48
%52 = load i8*, i8** %3
%53 = getelementptr inbounds i8, i8* %52, i64 6
%54 = load i8, i8* %53
%55 = zext i8 %54 to i32
%56 = and i32 %55, 128
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %62
58: ; preds = %51
br label %59
59: ; preds = %58
%60 = call i32 (i32, i8*, ...) @_verbprintf(i32 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %61
61: ; preds = %59
br label %62
62: ; preds = %61, %51, %48
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"-%u\00"
@.str.2 = [2 x i8] c"*\00"
define void @aprs_print_ax25call(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = and i32 %4, 254
%6 = icmp eq i32 %5, 64
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = lshr i32 %4, 1
%9 = tail call i32 (i32, i8*, ...) @_verbprintf(i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %2, %7
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = and i32 %13, 254
%15 = icmp eq i32 %14, 64
br i1 %15, label %19, label %16
16: ; preds = %10
%17 = lshr i32 %13, 1
%18 = tail call i32 (i32, i8*, ...) @_verbprintf(i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %16, %10
%20 = getelementptr inbounds i8, i8* %0, i64 2
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = and i32 %22, 254
%24 = icmp eq i32 %23, 64
br i1 %24, label %28, label %25
25: ; preds = %19
%26 = lshr i32 %22, 1
%27 = tail call i32 (i32, i8*, ...) @_verbprintf(i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %26)
br label %28
28: ; preds = %25, %19
%29 = getelementptr inbounds i8, i8* %0, i64 3
%30 = load i8, i8* %29
%31 = zext i8 %30 to i32
%32 = and i32 %31, 254
%33 = icmp eq i32 %32, 64
br i1 %33, label %37, label %34
34: ; preds = %28
%35 = lshr i32 %31, 1
%36 = tail call i32 (i32, i8*, ...) @_verbprintf(i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %35)
br label %37
37: ; preds = %34, %28
%38 = getelementptr inbounds i8, i8* %0, i64 4
%39 = load i8, i8* %38
%40 = zext i8 %39 to i32
%41 = and i32 %40, 254
%42 = icmp eq i32 %41, 64
br i1 %42, label %46, label %43
43: ; preds = %37
%44 = lshr i32 %40, 1
%45 = tail call i32 (i32, i8*, ...) @_verbprintf(i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %44)
br label %46
46: ; preds = %43, %37
%47 = getelementptr inbounds i8, i8* %0, i64 5
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = and i32 %49, 254
%51 = icmp eq i32 %50, 64
br i1 %51, label %55, label %52
52: ; preds = %46
%53 = lshr i32 %49, 1
%54 = tail call i32 (i32, i8*, ...) @_verbprintf(i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %53)
br label %55
55: ; preds = %52, %46
%56 = getelementptr inbounds i8, i8* %0, i64 6
%57 = load i8, i8* %56
%58 = lshr i8 %57, 1
%59 = and i8 %58, 15
%60 = icmp eq i8 %59, 0
br i1 %60, label %64, label %61
61: ; preds = %55
%62 = zext i8 %59 to i32
%63 = tail call i32 (i32, i8*, ...) @_verbprintf(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %62)
br label %64
64: ; preds = %61, %55
%65 = icmp eq i32 %1, 0
br i1 %65, label %71, label %66
66: ; preds = %64
%67 = load i8, i8* %56
%68 = icmp sgt i8 %67, -1
br i1 %68, label %71, label %69
69: ; preds = %66
%70 = tail call i32 (i32, i8*, ...) @_verbprintf(i32 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %71
71: ; preds = %69, %66, %64
ret void
}