#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
char *prog_inv_sh_nm_from_file(char *, int);
int /*<<< orphan*/ *stderr;
void usage(FILE *output) {
  fprintf(output, "usage: %s <newrootdir> <init> <args to init>\n",
          prog_inv_sh_nm_from_file(
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/TheTypoMaster/asuswrt/refs/heads/"
              "374.43_2-update/release/src/router/util-linux/sys-utils/"
              "switch_root.c",
              1));
  exit(output == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0xee3(%rip),%rdi
mov    $0x1,%esi
call   1040 <prog_inv_sh_nm_from_file@plt>
mov    -0x10(%rbp),%rdi
mov    %rax,%rdx
lea    0xe9d(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rax
mov    0x2e6d(%rip),%rcx
cmp    (%rcx),%rax
jne    118d <usage+0x5d>
mov    0x2e55(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1199 <usage+0x69>
mov    0x2e3c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xef3(%rip),%rdi
mov    $0x1,%esi
call   1040 <prog_inv_sh_nm_from_file@plt>
lea    0xeb4(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
call   1030 <fprintf@plt>
mov    0x2e82(%rip),%rax
cmp    %rbx,(%rax)
jne    1171 <usage+0x41>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"usage: %s <newrootdir> <init> <args to init>\0A\00"
@.str.1 = [193 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/TheTypoMaster/asuswrt/refs/heads/374.43_2-update/release/src/router/util-linux/sys-utils/switch_root.c\00"
@stderr = global i32* null
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define void @usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i8* @prog_inv_sh_nm_from_file(i8* getelementptr inbounds ([193 x i8], [193 x i8]* @.str.1, i64 0, i64 0), i32 1)
%5 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32*, i32** %2
%7 = load i32*, i32** @stderr
%8 = icmp eq i32* %6, %7
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* @EXIT_FAILURE
br label %13
11: ; preds = %1
%12 = load i32, i32* @EXIT_SUCCESS
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
%15 = call i32 @exit(i32 %14)
unreachable
}

LLVM IR (-O2):
@.str = [46 x i8] c"usage: %s <newrootdir> <init> <args to init>\0A\00"
@.str.1 = [193 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/TheTypoMaster/asuswrt/refs/heads/374.43_2-update/release/src/router/util-linux/sys-utils/switch_root.c\00"
@stderr = global i32* null
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define void @usage(i32* nocapture %0) {
%2 = tail call i8* @prog_inv_sh_nm_from_file(i8* getelementptr inbounds ([193 x i8], [193 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i32*, i32** @stderr
%5 = icmp eq i32* %4, %0
%6 = load i32, i32* @EXIT_FAILURE
%7 = load i32, i32* @EXIT_SUCCESS
%8 = select i1 %5, i32 %6, i32 %7
%9 = tail call i32 @exit(i32 %8)
unreachable
}