#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_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void usage(void) {
  printf("%-30s\t%s", "         _ _      _ _     ", "\n");
  printf("%-30s\t%s", "__ _____| | |_ __| (_)_ __", "\n");
  printf("%-30s\t%s", "\\ V / _ \\ |  _/ _` | \\ V /",
         "command line voltage divider calculator\n");
  printf("%-30s\t%s", " \\_/\\___/_|\\__\\__,_|_|\\_/ ",
         "(c)2015 Jonas Sjöberg\n");
  printf("%-30s\t%s", "                          ", "\n");
  printf(
      "Usage: voltdiv -i <volts> -o <volts> -r <ohms> -t <ohms>\n"
      "               -z <ohms> -x <ohms> -e <series> [OPTIONS]\n"
      "\n"
      "Options:\n"
      "  -h, --help                 Print this help message\n"
      "  -i, --input=voltage        Input voltage (volts) (default 1)\n"
      "  -o, --output=voltage       Output voltage (volts) (default none)\n"
      "  -r, --rtop                 Top resistor\t'R1'\n"
      "  -t  --rbot                 Bottom resistor\t'R2'\n"
      "  -z  --zin=ohms             Input impedance (ohms)\n"
      "  -x  --zout=ohms            Output impedance (ohms)\n"
      "  -e  --series=series        Standard E-series values (6, 12, 24, 96)\n"
      "  -n  --numerical            Do not use SI-prefixes\n"
      "  -s  --stdinput             Use standard input\n"
      "  -q  --quiet                Don't print out as much info\n"
      "  -d  --debug                Enable debug mode\n"
      "\n"
      "Note: Order is important. Set '-q' before anything else. \n"
      "      Used to make series of actions: '-i 2000 -o 19 -z 100 -s' \n"
      "      means 'set input=2000, output=19, find 100 ohms Z-in, use "
      "standard input.'\n"
      "\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed7(%rip),%rsi
lea    0x1375(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
lea    0xed6(%rip),%rsi
lea    0x1359(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9d(%rip),%rdi
lea    0xed5(%rip),%rsi
lea    0xee9(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe81(%rip),%rdi
lea    0xefd(%rip),%rsi
lea    0xf11(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe65(%rip),%rdi
lea    0xf14(%rip),%rsi
lea    0x1305(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e1b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rbx
lea    0xec7(%rip),%rsi
lea    0x1364(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec7(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xece(%rip),%rsi
lea    0xee2(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xefa(%rip),%rsi
lea    0xf0e(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf15(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf1c(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e1f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%-30s\09%s\00"
@.str.1 = [27 x i8] c" _ _ _ _ \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [27 x i8] c"__ _____| | |_ __| (_)_ __\00"
@.str.4 = [27 x i8] c"\\ V / _ \\ | _/ _` | \\ V /\00"
@.str.5 = [41 x i8] c"command line voltage divider calculator\0A\00"
@.str.6 = [27 x i8] c" \\_/\\___/_|\\__\\__,_|_|\\_/ \00"
@.str.7 = [24 x i8] c"(c)2015 Jonas Sj\C3\B6berg\0A\00"
@.str.8 = [27 x i8] c" \00"
@.str.9 = [991 x i8] c"Usage: voltdiv -i <volts> -o <volts> -r <ohms> -t <ohms>\0A -z <ohms> -x <ohms> -e <series> [OPTIONS]\0A\0AOptions:\0A -h, --help Print this help message\0A -i, --input=voltage Input voltage (volts) (default 1)\0A -o, --output=voltage Output voltage (volts) (default none)\0A -r, --rtop Top resistor\09'R1'\0A -t --rbot Bottom resistor\09'R2'\0A -z --zin=ohms Input impedance (ohms)\0A -x --zout=ohms Output impedance (ohms)\0A -e --series=series Standard E-series values (6, 12, 24, 96)\0A -n --numerical Do not use SI-prefixes\0A -s --stdinput Use standard input\0A -q --quiet Don't print out as much info\0A -d --debug Enable debug mode\0A\0ANote: Order is important. Set '-q' before anything else. \0A Used to make series of actions: '-i 2000 -o 19 -z 100 -s' \0A means 'set input=2000, output=19, find 100 ohms Z-in, use standard input.'\0A\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([991 x i8], [991 x i8]* @.str.9, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@.str = [9 x i8] c"%-30s\09%s\00"
@.str.1 = [27 x i8] c" _ _ _ _ \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [27 x i8] c"__ _____| | |_ __| (_)_ __\00"
@.str.4 = [27 x i8] c"\\ V / _ \\ | _/ _` | \\ V /\00"
@.str.5 = [41 x i8] c"command line voltage divider calculator\0A\00"
@.str.6 = [27 x i8] c" \\_/\\___/_|\\__\\__,_|_|\\_/ \00"
@.str.7 = [24 x i8] c"(c)2015 Jonas Sj\C3\B6berg\0A\00"
@.str.8 = [27 x i8] c" \00"
@EXIT_SUCCESS = global i32 0
@str = [990 x i8] c"Usage: voltdiv -i <volts> -o <volts> -r <ohms> -t <ohms>\0A -z <ohms> -x <ohms> -e <series> [OPTIONS]\0A\0AOptions:\0A -h, --help Print this help message\0A -i, --input=voltage Input voltage (volts) (default 1)\0A -o, --output=voltage Output voltage (volts) (default none)\0A -r, --rtop Top resistor\09'R1'\0A -t --rbot Bottom resistor\09'R2'\0A -z --zin=ohms Input impedance (ohms)\0A -x --zout=ohms Output impedance (ohms)\0A -e --series=series Standard E-series values (6, 12, 24, 96)\0A -n --numerical Do not use SI-prefixes\0A -s --stdinput Use standard input\0A -q --quiet Don't print out as much info\0A -d --debug Enable debug mode\0A\0ANote: Order is important. Set '-q' before anything else. \0A Used to make series of actions: '-i 2000 -o 19 -z 100 -s' \0A means 'set input=2000, output=19, find 100 ohms Z-in, use standard input.'\0A\00"
define void @usage() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([990 x i8], [990 x i8]* @str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
%8 = tail call i32 @exit(i32 %7)
unreachable
}