#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 */
char *basename(char *);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *arg, char *message) {
  char *command = basename(arg);
  printf("Usage: %s [-m MATCH] URL\n\n", command);
  printf("  -m, --match=MATCH insert before matching [DEFAULT: \"%s\"]\n",
         "</head>");
  printf("  -q, --quiet          quiet message\n");
  if (message) {
    printf("\nINFO: %s\n", message);
  }
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <basename@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
lea    0xefa(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x10(%rbp)
je     118f <usage+0x6f>
mov    -0x10(%rbp),%rsi
lea    0xefd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rsi,%rbx
call   1050 <basename@plt>
lea    0xec0(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
lea    0xeff(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
test   %rbx,%rbx
je     1182 <usage+0x52>
lea    0xee8(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Usage: %s [-m MATCH] URL\0A\0A\00"
@.str.1 = [60 x i8] c" -m, --match=MATCH insert before matching [DEFAULT: \22%s\22]\0A\00"
@.str.2 = [8 x i8] c"</head>\00"
@.str.3 = [38 x i8] c" -q, --quiet quiet message\0A\00"
@.str.4 = [11 x i8] c"\0AINFO: %s\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i8* @basename(i8* %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
%12 = load i8*, i8** %4
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* %15)
br label %17
17: ; preds = %14, %2
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Usage: %s [-m MATCH] URL\0A\0A\00"
@.str.1 = [60 x i8] c" -m, --match=MATCH insert before matching [DEFAULT: \22%s\22]\0A\00"
@.str.2 = [8 x i8] c"</head>\00"
@.str.4 = [11 x i8] c"\0AINFO: %s\0A\00"
@str = [37 x i8] c" -q, --quiet quiet message\00"
define void @usage(i8* %0, i8* %1) {
%3 = tail call i8* @basename(i8* %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%7 = icmp eq i8* %1, null
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* %1)
br label %10
10: ; preds = %8, %2
ret void
}