#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  static int printed_usage = 0;
  if (!printed_usage) {
    fprintf(stderr, "Usage: int2hex <calib_file> \n");
    fprintf(stderr,
            "The calibration file contains the calibration coefficients.\n");
    fprintf(stderr, "Output is written on stdout\n");
  }
  printed_usage = 1;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f11(%rip)
jne    1160 <usage+0x50>
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    0xf00(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,0x2ec2(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
cmpb   $0x0,0x2f14(%rip)
jne    114b <usage+0x3b>
mov    0x2ebf(%rip),%rbx
mov    (%rbx),%edi
lea    0xed6(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xee6(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf15(%rip),%rsi
call   1030 <fprintf@plt>
movb   $0x1,0x2eda(%rip)
pop    %rbx
ret

LLVM IR (-O0):
@usage.printed_usage = internal global i32 0
@stderr = global i32 0
@.str = [30 x i8] c"Usage: int2hex <calib_file> \0A\00"
@.str.1 = [61 x i8] c"The calibration file contains the calibration coefficients.\0A\00"
@.str.2 = [29 x i8] c"Output is written on stdout\0A\00"
define void @usage() {
%1 = load i32, i32* @usage.printed_usage
%2 = icmp ne i32 %1, 0
br i1 %2, label %10, label %3
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %3, %0
store i32 1, i32* @usage.printed_usage
ret void
}

LLVM IR (-O2):
@usage.printed_usage = internal unnamed_addr global i1 false
@stderr = global i32 0
@.str = [30 x i8] c"Usage: int2hex <calib_file> \0A\00"
@.str.1 = [61 x i8] c"The calibration file contains the calibration coefficients.\0A\00"
@.str.2 = [29 x i8] c"Output is written on stdout\0A\00"
define void @usage() {
%1 = load i1, i1* @usage.printed_usage
br i1 %1, label %9, label %2
2: ; preds = %0
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %2, %0
store i1 true, i1* @usage.printed_usage
ret void
}