#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*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: kpatch_make [-d] -n <modulename> [-v <version>] -e "
         "<entryaddr> [-o <output>] <input1> [input2]\n");
  printf("   -b buildid = target buildid for patch\n");
  printf("   -d debug (verbose)\n");
  printf("\n");
  printf("   result is printed to output and is the following:\n");
  printf("      header          - struct kpatch_file\n");
  printf("      .kpatch.*       - sections with binary patch text/data and "
         "info\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf30(%rip),%rdi
call   1030 <printf@plt>
lea    0xf4e(%rip),%rdi
call   1030 <printf@plt>
lea    0xf57(%rip),%rdi
call   1030 <printf@plt>
lea    0xf4d(%rip),%rdi
call   1030 <printf@plt>
lea    0xf77(%rip),%rdi
call   1030 <printf@plt>
lea    0xf97(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
lea    0xf22(%rip),%rdi
call   1040 <puts@plt>
lea    0xf3f(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf3f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf68(%rip),%rdi
call   1040 <puts@plt>
lea    0xf87(%rip),%rdi
call   1040 <puts@plt>
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [103 x i8] c"Usage: kpatch_make [-d] -n <modulename> [-v <version>] -e <entryaddr> [-o <output>] <input1> [input2]\0A\00"
@.str.1 = [42 x i8] c" -b buildid = target buildid for patch\0A\00"
@.str.2 = [23 x i8] c" -d debug (verbose)\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [54 x i8] c" result is printed to output and is the following:\0A\00"
@.str.5 = [44 x i8] c" header - struct kpatch_file\0A\00"
@.str.6 = [71 x i8] c" .kpatch.* - sections with binary patch text/data and info\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.6, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [102 x i8] c"Usage: kpatch_make [-d] -n <modulename> [-v <version>] -e <entryaddr> [-o <output>] <input1> [input2]\00"
@str.7 = [41 x i8] c" -b buildid = target buildid for patch\00"
@str.8 = [22 x i8] c" -d debug (verbose)\00"
@str.9 = [53 x i8] c" result is printed to output and is the following:\00"
@str.10 = [43 x i8] c" header - struct kpatch_file\00"
@str.11 = [70 x i8] c" .kpatch.* - sections with binary patch text/data and info\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([102 x i8], [102 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.7, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.8, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.9, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.10, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.11, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
}