#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*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int show_mainsk_usage() {
  char response[80];
  printf("\n\nNot enough parameters:"
         "\n"
         "\n usage: mainsk in-file out-file type value"
         " [threshold-or-mask-type] [number]"
         "\n"
         "\n recall type: EROsion DILation Mask-ERosion"
         "\n              Mask_DIlation INTerior-outline"
         "\n              EXTerior-outline THInning"
         "\n              Dilate-Not-Join OPEning"
         "\n              CLOsing SPecial-Opening"
         "\n              SPecial-Closing"
         "\n              Euclidean-Distance-Measure"
         "\n              Medial-Axis-Transform");
  printf("\nPress Enter to see more");
  gets(response);
  printf("\n"
         "\n   MASK DILATION"
         "\nmainsk in-file out-file mdi value mask-type"
         "\n   MASK EROSION"
         "\nmainsk in-file out-file mer value mask-type"
         "\n   EROSION "
         "\nmainsk in-file out-file ero value threshold"
         "\n   DILATION "
         "\nmainsk in-file out-file dil value threshold"
         "\n   INTERIOR OUTLINE "
         "\nmainsk in-file out-file int value mask-type"
         "\n   EXTERIOR OUTLINE "
         "\nmainsk in-file out-file ext value mask-type"
         "\n   OPENING"
         "\nmainsk in-file out-file ope value mask-type number"
         "\n   CLOSING"
         "\nmainsk in-file out-file clo value mask-type number");
  printf("\n   THINNING"
         "\nmainsk in-file out-file thi value threshold"
         "\n   DILATE NOT JOIN"
         "\nmainsk in-file out-file dnj value threshold"
         "\n   SPECIAL CLOSING"
         "\nmainsk in-file out-file spc value threshold number"
         "\n   SPECIAL OPENING"
         "\nmainsk in-file out-file spo value threshold number"
         "\n   EUCLIDEAN DISTANCE MEASURE"
         "\nmainsk in-file out-file edm value"
         "\n   MEDIAL AXIS TRANSFORM"
         "\nmainsk in-file out-file mat value"
         "\n "
         "\n value is usually 1"
         "\n mask-type is 1-4 inclusive"
         "\n threshold is 0-8 inclusive"
         "\n number is number of erosions or dilations"
         "\n");
  return (1);
}


x86 assembly (clang, -O0):
<show_mainsk_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0x1065(%rip),%rdi
call   1030 <printf@plt>
lea    -0x50(%rbp),%rdi
call   1040 <gets@plt>
lea    0x1069(%rip),%rdi
call   1030 <printf@plt>
lea    0x1247(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_mainsk_usage>:
sub    $0x58,%rsp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0x1059(%rip),%rdi
call   1040 <printf@plt>
mov    %rsp,%rdi
call   1050 <gets@plt>
lea    0x105e(%rip),%rdi
call   1040 <printf@plt>
lea    0x123c(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@.str = [416 x i8] c"\0A\0ANot enough parameters:\0A\0A usage: mainsk in-file out-file type value [threshold-or-mask-type] [number]\0A\0A recall type: EROsion DILation Mask-ERosion\0A Mask_DIlation INTerior-outline\0A EXTerior-outline THInning\0A Dilate-Not-Join OPEning\0A CLOsing SPecial-Opening\0A SPecial-Closing\0A Euclidean-Distance-Measure\0A Medial-Axis-Transform\00"
@.str.1 = [25 x i8] c"\0APress Enter to see more\00"
@.str.2 = [490 x i8] c"\0A\0A MASK DILATION\0Amainsk in-file out-file mdi value mask-type\0A MASK EROSION\0Amainsk in-file out-file mer value mask-type\0A EROSION \0Amainsk in-file out-file ero value threshold\0A DILATION \0Amainsk in-file out-file dil value threshold\0A INTERIOR OUTLINE \0Amainsk in-file out-file int value mask-type\0A EXTERIOR OUTLINE \0Amainsk in-file out-file ext value mask-type\0A OPENING\0Amainsk in-file out-file ope value mask-type number\0A CLOSING\0Amainsk in-file out-file clo value mask-type number\00"
@.str.3 = [505 x i8] c"\0A THINNING\0Amainsk in-file out-file thi value threshold\0A DILATE NOT JOIN\0Amainsk in-file out-file dnj value threshold\0A SPECIAL CLOSING\0Amainsk in-file out-file spc value threshold number\0A SPECIAL OPENING\0Amainsk in-file out-file spo value threshold number\0A EUCLIDEAN DISTANCE MEASURE\0Amainsk in-file out-file edm value\0A MEDIAL AXIS TRANSFORM\0Amainsk in-file out-file mat value\0A \0A value is usually 1\0A mask-type is 1-4 inclusive\0A threshold is 0-8 inclusive\0A number is number of erosions or dilations\0A\00"
define i32 @show_mainsk_usage() {
%1 = alloca [80 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([416 x i8], [416 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([490 x i8], [490 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([505 x i8], [505 x i8]* @.str.3, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [416 x i8] c"\0A\0ANot enough parameters:\0A\0A usage: mainsk in-file out-file type value [threshold-or-mask-type] [number]\0A\0A recall type: EROsion DILation Mask-ERosion\0A Mask_DIlation INTerior-outline\0A EXTerior-outline THInning\0A Dilate-Not-Join OPEning\0A CLOsing SPecial-Opening\0A SPecial-Closing\0A Euclidean-Distance-Measure\0A Medial-Axis-Transform\00"
@.str.1 = [25 x i8] c"\0APress Enter to see more\00"
@.str.2 = [490 x i8] c"\0A\0A MASK DILATION\0Amainsk in-file out-file mdi value mask-type\0A MASK EROSION\0Amainsk in-file out-file mer value mask-type\0A EROSION \0Amainsk in-file out-file ero value threshold\0A DILATION \0Amainsk in-file out-file dil value threshold\0A INTERIOR OUTLINE \0Amainsk in-file out-file int value mask-type\0A EXTERIOR OUTLINE \0Amainsk in-file out-file ext value mask-type\0A OPENING\0Amainsk in-file out-file ope value mask-type number\0A CLOSING\0Amainsk in-file out-file clo value mask-type number\00"
@str = [504 x i8] c"\0A THINNING\0Amainsk in-file out-file thi value threshold\0A DILATE NOT JOIN\0Amainsk in-file out-file dnj value threshold\0A SPECIAL CLOSING\0Amainsk in-file out-file spc value threshold number\0A SPECIAL OPENING\0Amainsk in-file out-file spo value threshold number\0A EUCLIDEAN DISTANCE MEASURE\0Amainsk in-file out-file edm value\0A MEDIAL AXIS TRANSFORM\0Amainsk in-file out-file mat value\0A \0A value is usually 1\0A mask-type is 1-4 inclusive\0A threshold is 0-8 inclusive\0A number is number of erosions or dilations\00"
define i32 @show_mainsk_usage() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([416 x i8], [416 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @gets(i8* %2)
%6 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([490 x i8], [490 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([504 x i8], [504 x i8]* @str, i64 0, i64 0))
ret i32 1
}