#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*/ free(char *);
int freqA();
int freqB();
char *getLabel();
scalar_t__ isModeFm();
int /*<<< orphan*/ modeA();
int /*<<< orphan*/ modeB();
float plTone();
int /*<<< orphan*/ printf(char *, ...);
void printBrief(void) {
  char *lbl;
  int fa, fb;
  fa = freqA();
  fb = freqB();
  if (fa == -1)
    printf("(empty)\n");
  else {
    float pl;
    lbl = getLabel();
    printf("%6s:", lbl);
    free(lbl);
    printf("%10d%10s", fa, modeA());
    if (fb == -1)
      printf("%23s", "");
    else
      printf(" / %10d%10s", fb, modeB());
    pl = plTone();
    if (isModeFm() && pl > 0)
      printf("    PL %.1f Hz", pl);
    printf(".\n");
  }
}


x86 assembly (clang, -O0):
<printBrief>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1060 <freqA@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   10b0 <freqB@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    11c9 <printBrief+0x39>
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    12a6 <printBrief+0x116>
mov    $0x0,%al
call   1080 <getLabel@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   10a0 <modeA@plt>
mov    -0x18(%rbp),%esi
mov    %eax,%edx
lea    0xe0e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0xffffffff,-0x10(%rbp)
jne    1233 <printBrief+0xa3>
lea    0xdee(%rip),%rdi
lea    0xde1(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1253 <printBrief+0xc3>
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1040 <modeB@plt>
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
lea    0xdc7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1090 <plTone@plt>
movss  %xmm0,-0x14(%rbp)
mov    $0x0,%al
call   1070 <isModeFm@plt>
cmp    $0x0,%rax
je     1298 <printBrief+0x108>
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1298 <printBrief+0x108>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd8e(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xd8f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printBrief>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1070 <freqA@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   10c0 <freqB@plt>
cmp    $0xffffffff,%ebp
je     121e <printBrief+0x7e>
mov    %eax,%r14d
xor    %eax,%eax
call   1090 <getLabel@plt>
mov    %rax,%rbx
lea    0xe2f(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
call   10b0 <modeA@plt>
lea    0xe1c(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
cmp    $0xffffffff,%r14d
je     1227 <printBrief+0x87>
xor    %eax,%eax
call   1050 <modeB@plt>
lea    0xdfa(%rip),%rdi
mov    %r14d,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
jmp    123c <printBrief+0x9c>
lea    0xe02(%rip),%rbx
jmp    127f <printBrief+0xdf>
lea    0xdd7(%rip),%rdi
lea    0xdf9(%rip),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   10a0 <plTone@plt>
movss  %xmm0,0xc(%rsp)
xor    %eax,%eax
call   1080 <isModeFm@plt>
lea    0xdce(%rip),%rbx
test   %rax,%rax
je     127f <printBrief+0xdf>
xorps  %xmm0,%xmm0
movss  0xc(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jbe    127f <printBrief+0xdf>
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xd9e(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"(empty)\0A\00"
@.str.1 = [5 x i8] c"%6s:\00"
@.str.2 = [9 x i8] c"%10d%10s\00"
@.str.3 = [5 x i8] c"%23s\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [12 x i8] c" / %10d%10s\00"
@.str.6 = [15 x i8] c" PL %.1f Hz\00"
@.str.7 = [3 x i8] c".\0A\00"
define void @printBrief() {
%1 = alloca i8*
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = call i32 (...) @freqA()
store i32 %5, i32* %2
%6 = call i32 (...) @freqB()
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %41
11: ; preds = %0
%12 = call i8* (...) @getLabel()
store i8* %12, i8** %1
%13 = load i8*, i8** %1
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = load i8*, i8** %1
%16 = call i32 @free(i8* %15)
%17 = load i32, i32* %2
%18 = call i32 (...) @modeA()
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %17, i32 %18)
%20 = load i32, i32* %3
%21 = icmp eq i32 %20, -1
br i1 %21, label %22, label %24
22: ; preds = %11
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
br label %28
24: ; preds = %11
%25 = load i32, i32* %3
%26 = call i32 (...) @modeB()
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %25, i32 %26)
br label %28
28: ; preds = %24, %22
%29 = call float (...) @plTone()
store float %29, float* %4
%30 = call i64 (...) @isModeFm()
%31 = icmp ne i64 %30, 0
br i1 %31, label %32, label %39
32: ; preds = %28
%33 = load float, float* %4
%34 = fcmp ogt float %33, 0.000000e+00
br i1 %34, label %35, label %39
35: ; preds = %32
%36 = load float, float* %4
%37 = fpext float %36 to double
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), double %37)
br label %39
39: ; preds = %35, %32, %28
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
br label %41
41: ; preds = %39, %9
ret void
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%6s:\00"
@.str.2 = [9 x i8] c"%10d%10s\00"
@.str.3 = [5 x i8] c"%23s\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [12 x i8] c" / %10d%10s\00"
@.str.6 = [15 x i8] c" PL %.1f Hz\00"
@str = [2 x i8] c".\00"
@str.8 = [8 x i8] c"(empty)\00"
define void @printBrief() {
%1 = tail call i32 (...) @freqA()
%2 = tail call i32 (...) @freqB()
%3 = icmp eq i32 %1, -1
br i1 %3, label %25, label %4
4: ; preds = %0
%5 = tail call i8* (...) @getLabel()
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = tail call i32 @free(i8* %5)
%8 = tail call i32 (...) @modeA()
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %1, i32 %8)
%10 = icmp eq i32 %2, -1
br i1 %10, label %11, label %13
11: ; preds = %4
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
br label %16
13: ; preds = %4
%14 = tail call i32 (...) @modeB()
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %2, i32 %14)
br label %16
16: ; preds = %13, %11
%17 = tail call float (...) @plTone()
%18 = tail call i64 (...) @isModeFm()
%19 = icmp ne i64 %18, 0
%20 = fcmp ogt float %17, 0.000000e+00
%21 = select i1 %19, i1 %20, i1 false
br i1 %21, label %22, label %25
22: ; preds = %16
%23 = fpext float %17 to double
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), double %23)
br label %25
25: ; preds = %16, %22, %0
%26 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.8, i64 0, i64 0), %0 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0), %22 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0), %16 ]
%27 = tail call i32 @puts(i8* dereferenceable(1) %26)
ret void
}