#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 get_max_cols();
int get_max_lines();
int /*<<< orphan*/ printf(char *, ...);
void usage(const char *prog) {
  printf("usage: %s [-y height] [-x width] [-M] [-b boms%%=0.20]\n", prog);
  printf("\t-y: 1 <= y <= %d\n", get_max_lines());
  printf("\t-x: 1 <= x <= %d\n", get_max_cols());
  printf("\t-M: y=%d, x=%d\n", get_max_lines(), get_max_cols());
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <get_max_lines@plt>
mov    %eax,%esi
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <get_max_cols@plt>
mov    %eax,%esi
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <get_max_lines@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <get_max_cols@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <get_max_lines@plt>
lea    0xee8(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <get_max_cols@plt>
lea    0xee4(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <get_max_lines@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <get_max_cols@plt>
lea    0xed7(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"usage: %s [-y height] [-x width] [-M] [-b boms%%=0.20]\0A\00"
@.str.1 = [19 x i8] c"\09-y: 1 <= y <= %d\0A\00"
@.str.2 = [19 x i8] c"\09-x: 1 <= x <= %d\0A\00"
@.str.3 = [17 x i8] c"\09-M: y=%d, x=%d\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @get_max_lines()
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @get_max_cols()
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = call i32 (...) @get_max_lines()
%10 = call i32 (...) @get_max_cols()
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"usage: %s [-y height] [-x width] [-M] [-b boms%%=0.20]\0A\00"
@.str.1 = [19 x i8] c"\09-y: 1 <= y <= %d\0A\00"
@.str.2 = [19 x i8] c"\09-x: 1 <= x <= %d\0A\00"
@.str.3 = [17 x i8] c"\09-M: y=%d, x=%d\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @get_max_lines()
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 (...) @get_max_cols()
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 (...) @get_max_lines()
%8 = tail call i32 (...) @get_max_cols()
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %7, i32 %8)
ret void
}