#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*/ printf(char *, char const *, ...);
void reg_suffix(const char *sfx, const char *name, const char *mime,
                const char *descrip, int iconnum) {
  printf("Root: HKCR; Subkey: \"%s\"; ValueType: string; ValueName: "
         "\"\"; ValueData: \"%s\"; Flags: uninsdeletevalue\n",
         sfx, name);
  printf("Root: HKCR; Subkey: \"%s\"; ValueType: string; "
         "ValueName: \"Content Type\"; ValueData: \"%s\"\n",
         sfx, mime);
  printf("Root: HKCR; Subkey: \"%s\"; ValueType: string; ValueName: "
         "\"\"; ValueData: \"%s\"; Flags: uninsdeletekey\n",
         name, descrip);
  printf("Root: HKCR; Subkey: \"%s\\DefaultIcon\"; ValueType: string; "
         "ValueName: \"\"; ValueData: \"{app}\\gretl.exe,%d\"\n",
         name, iconnum);
  if (iconnum == 2) {
    printf("Root: HKCR; Subkey: \"%s\\shell\\open\\command\"; "
           "ValueType: string; ValueName: \"\"; ValueData: "
           "\"\"\"{app}\\gretl.exe\"\" -r \"\"%%1\"\"\"\n",
           name);
  } else {
    printf("Root: HKCR; Subkey: \"%s\\shell\\open\\command\"; "
           "ValueType: string; ValueName: \"\"; ValueData: "
           "\"\"\"{app}\\gretl.exe\"\" \"\"%%1\"\"\"\n",
           name);
  }
}


x86 assembly (clang, -O0):
<reg_suffix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xf15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xf58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
lea    0xfa7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x2,-0x24(%rbp)
jne    11a4 <reg_suffix+0x94>
mov    -0x10(%rbp),%rsi
lea    0xff4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b6 <reg_suffix+0xa6>
mov    -0x10(%rbp),%rsi
lea    0x1059(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_suffix>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r15d
mov    %rcx,%r14
mov    %rdx,%r12
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0xed2(%rip),%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf24(%rip),%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf69(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfb9(%rip),%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0x2,%r15d
lea    0x100a(%rip),%rax
lea    0x107f(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [102 x i8] c"Root: HKCR; Subkey: \22%s\22; ValueType: string; ValueName: \22\22; ValueData: \22%s\22; Flags: uninsdeletevalue\0A\00"
@.str.1 = [89 x i8] c"Root: HKCR; Subkey: \22%s\22; ValueType: string; ValueName: \22Content Type\22; ValueData: \22%s\22\0A\00"
@.str.2 = [100 x i8] c"Root: HKCR; Subkey: \22%s\22; ValueType: string; ValueName: \22\22; ValueData: \22%s\22; Flags: uninsdeletekey\0A\00"
@.str.3 = [105 x i8] c"Root: HKCR; Subkey: \22%s\\DefaultIcon\22; ValueType: string; ValueName: \22\22; ValueData: \22{app}\\gretl.exe,%d\22\0A\00"
@.str.4 = [124 x i8] c"Root: HKCR; Subkey: \22%s\\shell\\open\\command\22; ValueType: string; ValueName: \22\22; ValueData: \22\22\22{app}\\gretl.exe\22\22 -r \22\22%%1\22\22\22\0A\00"
@.str.5 = [121 x i8] c"Root: HKCR; Subkey: \22%s\\shell\\open\\command\22; ValueType: string; ValueName: \22\22; ValueData: \22\22\22{app}\\gretl.exe\22\22 \22\22%%1\22\22\22\0A\00"
define void @reg_suffix(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
%14 = load i8*, i8** %6
%15 = load i8*, i8** %8
%16 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.1, i64 0, i64 0), i8* %14, i8* %15)
%17 = load i8*, i8** %7
%18 = load i8*, i8** %9
%19 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @.str.2, i64 0, i64 0), i8* %17, i8* %18)
%20 = load i8*, i8** %7
%21 = load i32, i32* %10
%22 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str.3, i64 0, i64 0), i8* %20, i32 %21)
%23 = load i32, i32* %10
%24 = icmp eq i32 %23, 2
br i1 %24, label %25, label %28
25: ; preds = %5
%26 = load i8*, i8** %7
%27 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str.4, i64 0, i64 0), i8* %26)
br label %31
28: ; preds = %5
%29 = load i8*, i8** %7
%30 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([121 x i8], [121 x i8]* @.str.5, i64 0, i64 0), i8* %29)
br label %31
31: ; preds = %28, %25
ret void
}

LLVM IR (-O2):
@.str = [102 x i8] c"Root: HKCR; Subkey: \22%s\22; ValueType: string; ValueName: \22\22; ValueData: \22%s\22; Flags: uninsdeletevalue\0A\00"
@.str.1 = [89 x i8] c"Root: HKCR; Subkey: \22%s\22; ValueType: string; ValueName: \22Content Type\22; ValueData: \22%s\22\0A\00"
@.str.2 = [100 x i8] c"Root: HKCR; Subkey: \22%s\22; ValueType: string; ValueName: \22\22; ValueData: \22%s\22; Flags: uninsdeletekey\0A\00"
@.str.3 = [105 x i8] c"Root: HKCR; Subkey: \22%s\\DefaultIcon\22; ValueType: string; ValueName: \22\22; ValueData: \22{app}\\gretl.exe,%d\22\0A\00"
@.str.4 = [124 x i8] c"Root: HKCR; Subkey: \22%s\\shell\\open\\command\22; ValueType: string; ValueName: \22\22; ValueData: \22\22\22{app}\\gretl.exe\22\22 -r \22\22%%1\22\22\22\0A\00"
@.str.5 = [121 x i8] c"Root: HKCR; Subkey: \22%s\\shell\\open\\command\22; ValueType: string; ValueName: \22\22; ValueData: \22\22\22{app}\\gretl.exe\22\22 \22\22%%1\22\22\22\0A\00"
define void @reg_suffix(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%7 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %2)
%8 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @.str.2, i64 0, i64 0), i8* %1, i8* %3)
%9 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str.3, i64 0, i64 0), i8* %1, i32 %4)
%10 = icmp eq i32 %4, 2
%11 = select i1 %10, i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([121 x i8], [121 x i8]* @.str.5, i64 0, i64 0)
%12 = tail call i32 (i8*, i8*, ...) @printf(i8* %11, i8* %1)
ret void
}