#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*/ puts(char *);
void dohelp(int man) {
  puts("Usage: fungasm program.asm [output.elf]");
  if (man) {
    puts("");
    puts(
        "  fungasm is the Fungus assembler. It assembles \"program.asm\" into");
    puts("\"program.elf\", or into a filename provided on the command line.");
    puts("For details of the Fungus assembly language, see the HTML manual.");
  }
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<dohelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,-0x4(%rbp)
je     1171 <dohelp+0x51>
lea    0xf62(%rip),%rdi
call   1030 <puts@plt>
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3f(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<dohelp>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1040 <puts@plt>
test   %ebx,%ebx
je     1171 <dohelp+0x41>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xed4(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf3f(%rip),%rdi
call   1040 <puts@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Usage: fungasm program.asm [output.elf]\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [67 x i8] c" fungasm is the Fungus assembler. It assembles \22program.asm\22 into\00"
@.str.3 = [64 x i8] c"\22program.elf\22, or into a filename provided on the command line.\00"
@.str.4 = [66 x i8] c"For details of the Fungus assembly language, see the HTML manual.\00"
@EXIT_FAILURE = global i32 0
define void @dohelp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @puts(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @puts(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @puts(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0))
br label %11
11: ; preds = %6, %1
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @exit(i32 %12)
unreachable
}

LLVM IR (-O2):
@.str = [40 x i8] c"Usage: fungasm program.asm [output.elf]\00"
@.str.2 = [67 x i8] c" fungasm is the Fungus assembler. It assembles \22program.asm\22 into\00"
@.str.3 = [64 x i8] c"\22program.elf\22, or into a filename provided on the command line.\00"
@.str.4 = [66 x i8] c"For details of the Fungus assembly language, see the HTML manual.\00"
@EXIT_FAILURE = global i32 0
define void @dohelp(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0))
br label %9
9: ; preds = %4, %1
%10 = load i32, i32* @EXIT_FAILURE
%11 = tail call i32 @exit(i32 %10)
unreachable
}