#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*/ LM_entry(char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ reg_suffix(char *, char *, char *, char *, int);
void set_registry_entries(void) {
  printf("\n[Registry]\n");
  printf("; Start \"gretl\" registry keys.\n");
  printf("Root: HKCR; Subkey: \"Software\\gretl\"; Flags: uninsdeletekey\n");
  printf("Root: HKLM; Subkey: \"Software\\gretl\"; Flags: uninsdeletekey\n");
  LM_entry("gretldir", "{app}");
  reg_suffix(".gdt", "GretlDataFile", "application/x-gretldata",
             "Gretl data file", 1);
  reg_suffix(".inp", "GretlScriptFile", "application/x-gretlscript",
             "Gretl script file", 2);
  reg_suffix(".gretl", "GretlSessionFile", "application/x-gretlsession",
             "Gretl session file", 3);
  reg_suffix(".gdtb", "GretlBindataFile", "application/x-gretlbindata",
             "Gretl binary data file", 4);
}


x86 assembly (clang, -O0):
<set_registry_entries>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
call   1040 <printf@plt>
lea    0xf0b(%rip),%rdi
call   1040 <printf@plt>
lea    0xf3c(%rip),%rdi
lea    0xf3e(%rip),%rsi
call   1030 <LM_entry@plt>
lea    0xf38(%rip),%rdi
lea    0xf36(%rip),%rsi
lea    0xf3d(%rip),%rdx
lea    0xf4e(%rip),%rcx
mov    $0x1,%r8d
call   1050 <reg_suffix@plt>
lea    0xf4c(%rip),%rdi
lea    0xf4a(%rip),%rsi
lea    0xf53(%rip),%rdx
lea    0xf66(%rip),%rcx
mov    $0x2,%r8d
call   1050 <reg_suffix@plt>
lea    0xf66(%rip),%rdi
lea    0xf66(%rip),%rsi
lea    0xf70(%rip),%rdx
lea    0xf84(%rip),%rcx
mov    $0x3,%r8d
call   1050 <reg_suffix@plt>
lea    0xf85(%rip),%rdi
lea    0xf84(%rip),%rsi
lea    0xf8e(%rip),%rdx
lea    0xfa2(%rip),%rcx
mov    $0x4,%r8d
call   1050 <reg_suffix@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_registry_entries>:
push   %rax
lea    0xfe2(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe2(%rip),%rdi
call   1030 <puts@plt>
lea    0xff5(%rip),%rdi
call   1030 <puts@plt>
lea    0x1025(%rip),%rdi
call   1030 <puts@plt>
lea    0xe98(%rip),%rdi
lea    0xe9a(%rip),%rsi
call   1040 <LM_entry@plt>
lea    0xe94(%rip),%rdi
lea    0xe92(%rip),%rsi
lea    0xe99(%rip),%rdx
lea    0xeaa(%rip),%rcx
mov    $0x1,%r8d
call   1050 <reg_suffix@plt>
lea    0xea8(%rip),%rdi
lea    0xea6(%rip),%rsi
lea    0xeaf(%rip),%rdx
lea    0xec2(%rip),%rcx
mov    $0x2,%r8d
call   1050 <reg_suffix@plt>
lea    0xec2(%rip),%rdi
lea    0xec2(%rip),%rsi
lea    0xecc(%rip),%rdx
lea    0xee0(%rip),%rcx
mov    $0x3,%r8d
call   1050 <reg_suffix@plt>
lea    0xee1(%rip),%rdi
lea    0xee0(%rip),%rsi
lea    0xeea(%rip),%rdx
lea    0xefe(%rip),%rcx
mov    $0x4,%r8d
pop    %rax
jmp    1050 <reg_suffix@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"\0A[Registry]\0A\00"
@.str.1 = [32 x i8] c"; Start \22gretl\22 registry keys.\0A\00"
@.str.2 = [61 x i8] c"Root: HKCR; Subkey: \22Software\\gretl\22; Flags: uninsdeletekey\0A\00"
@.str.3 = [61 x i8] c"Root: HKLM; Subkey: \22Software\\gretl\22; Flags: uninsdeletekey\0A\00"
@.str.4 = [9 x i8] c"gretldir\00"
@.str.5 = [6 x i8] c"{app}\00"
@.str.6 = [5 x i8] c".gdt\00"
@.str.7 = [14 x i8] c"GretlDataFile\00"
@.str.8 = [24 x i8] c"application/x-gretldata\00"
@.str.9 = [16 x i8] c"Gretl data file\00"
@.str.10 = [5 x i8] c".inp\00"
@.str.11 = [16 x i8] c"GretlScriptFile\00"
@.str.12 = [26 x i8] c"application/x-gretlscript\00"
@.str.13 = [18 x i8] c"Gretl script file\00"
@.str.14 = [7 x i8] c".gretl\00"
@.str.15 = [17 x i8] c"GretlSessionFile\00"
@.str.16 = [27 x i8] c"application/x-gretlsession\00"
@.str.17 = [19 x i8] c"Gretl session file\00"
@.str.18 = [6 x i8] c".gdtb\00"
@.str.19 = [17 x i8] c"GretlBindataFile\00"
@.str.20 = [27 x i8] c"application/x-gretlbindata\00"
@.str.21 = [23 x i8] c"Gretl binary data file\00"
define void @set_registry_entries() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @LM_entry(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%6 = call i32 @reg_suffix(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), i32 1)
%7 = call i32 @reg_suffix(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 2)
%8 = call i32 @reg_suffix(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0), i32 3)
%9 = call i32 @reg_suffix(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.21, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@.str.4 = [9 x i8] c"gretldir\00"
@.str.5 = [6 x i8] c"{app}\00"
@.str.6 = [5 x i8] c".gdt\00"
@.str.7 = [14 x i8] c"GretlDataFile\00"
@.str.8 = [24 x i8] c"application/x-gretldata\00"
@.str.9 = [16 x i8] c"Gretl data file\00"
@.str.10 = [5 x i8] c".inp\00"
@.str.11 = [16 x i8] c"GretlScriptFile\00"
@.str.12 = [26 x i8] c"application/x-gretlscript\00"
@.str.13 = [18 x i8] c"Gretl script file\00"
@.str.14 = [7 x i8] c".gretl\00"
@.str.15 = [17 x i8] c"GretlSessionFile\00"
@.str.16 = [27 x i8] c"application/x-gretlsession\00"
@.str.17 = [19 x i8] c"Gretl session file\00"
@.str.18 = [6 x i8] c".gdtb\00"
@.str.19 = [17 x i8] c"GretlBindataFile\00"
@.str.20 = [27 x i8] c"application/x-gretlbindata\00"
@.str.21 = [23 x i8] c"Gretl binary data file\00"
@str = [12 x i8] c"\0A[Registry]\00"
@str.22 = [31 x i8] c"; Start \22gretl\22 registry keys.\00"
@str.23 = [60 x i8] c"Root: HKCR; Subkey: \22Software\\gretl\22; Flags: uninsdeletekey\00"
@str.24 = [60 x i8] c"Root: HKLM; Subkey: \22Software\\gretl\22; Flags: uninsdeletekey\00"
define void @set_registry_entries() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.22, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.23, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.24, i64 0, i64 0))
%5 = tail call i32 @LM_entry(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%6 = tail call i32 @reg_suffix(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), i32 1)
%7 = tail call i32 @reg_suffix(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 2)
%8 = tail call i32 @reg_suffix(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0), i32 3)
%9 = tail call i32 @reg_suffix(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.21, i64 0, i64 0), i32 4)
ret void
}