#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*/ data_annotate(char *, ...);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ scan_planes(int, int);
int /*<<< orphan*/ source_off();
int /*<<< orphan*/ source_on();
int /*<<< orphan*/ stderr;
void ant_scan(int start_az, int start_el) {
  fprintf(stderr, "===>>> Starting antenna measurement...\n");
  data_annotate("@origin %d,%d", start_az, start_el);
  source_on();
  scan_planes(start_az, start_el);
  source_off();
  data_annotate("Data collection finished successfully.");
  fprintf(stderr, "===>>> Data collection finished successfully.\n");
}


x86 assembly (clang, -O0):
<ant_scan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
lea    0xe92(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <data_annotate@plt>
mov    $0x0,%al
call   1040 <source_on@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1070 <scan_planes@plt>
mov    $0x0,%al
call   1060 <source_off@plt>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <data_annotate@plt>
mov    0x2e2b(%rip),%rax
mov    (%rax),%edi
lea    0xe9f(%rip),%rsi
call   1050 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ant_scan>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x2e81(%rip),%r14
mov    (%r14),%edi
lea    0xe97(%rip),%rsi
call   1050 <fprintf@plt>
lea    0xeb3(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <data_annotate@plt>
xor    %eax,%eax
call   1040 <source_on@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1070 <scan_planes@plt>
xor    %eax,%eax
call   1060 <source_off@plt>
lea    0xe98(%rip),%rdi
xor    %eax,%eax
call   1030 <data_annotate@plt>
mov    (%r14),%edi
lea    0xeae(%rip),%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"===>>> Starting antenna measurement...\0A\00"
@.str.1 = [14 x i8] c"@origin %d,%d\00"
@.str.2 = [39 x i8] c"Data collection finished successfully.\00"
@.str.3 = [47 x i8] c"===>>> Data collection finished successfully.\0A\00"
define void @ant_scan(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 (i8*, ...) @data_annotate(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
%10 = call i32 (...) @source_on()
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @scan_planes(i32 %11, i32 %12)
%14 = call i32 (...) @source_off()
%15 = call i32 (i8*, ...) @data_annotate(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"===>>> Starting antenna measurement...\0A\00"
@.str.1 = [14 x i8] c"@origin %d,%d\00"
@.str.2 = [39 x i8] c"Data collection finished successfully.\00"
@.str.3 = [47 x i8] c"===>>> Data collection finished successfully.\0A\00"
define void @ant_scan(i32 %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @data_annotate(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 %1)
%6 = tail call i32 (...) @source_on()
%7 = tail call i32 @scan_planes(i32 %0, i32 %1)
%8 = tail call i32 (...) @source_off()
%9 = tail call i32 (i8*, ...) @data_annotate(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
ret void
}