#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void CreateSignDriversBat(FILE *File) {
  fputs("ren %4\\"
        "W98Ports"
        ".INF"
        " "
        "W98Ports"
        ".TmpINF\n"
        "ren %5\\"
        "W98Ports"
        ".INF"
        " "
        "W98Ports"
        ".TmpINF\n"
        "\n"
        "%1\\bin\\selfsign\\inf2cat /driver:%4 "
        "/os:2000,XP_X86,Server2003_X86,Vista_X86,Server2008_X86,XP_X64,"
        "Server2003_X64,Vista_X64,Server2008_X64,7_X86,7_X64,Server2008R2_X64\n"
        "%1\\bin\\selfsign\\inf2cat /driver:%5 "
        "/os:2000,XP_X86,Server2003_X86,Vista_X86,Server2008_X86,XP_X64,"
        "Server2003_X64,Vista_X64,Server2008_X64,7_X86,7_X64,Server2008R2_X64\n"
        "\n"
        "ren %4\\"
        "W98Ports"
        ".TmpINF "
        "W98Ports"
        ".INF"
        "\n"
        "ren %5\\"
        "W98Ports"
        ".TmpINF "
        "W98Ports"
        ".INF"
        "\n"
        "\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\"
        "PPJoyBus"
        ".sys"
        "\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\"
        "PPJoyBus"
        ".sys"
        "\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\"
        "PPJoyBus"
        "64.sys"
        "\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\"
        "PPJoyBus"
        "64.sys"
        "\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\"
        "PPJoyBus"
        ".cat\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\"
        "PPJoyBus"
        ".cat\n"
        "\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\"
        "PPortJoy"
        ".sys"
        "\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\"
        "PPortJoy"
        ".sys"
        "\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\"
        "PPortJoy"
        "64.sys"
        "\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\"
        "PPortJoy"
        "64.sys"
        "\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\"
        "PPortJoy"
        ".cat\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\"
        "PPortJoy"
        ".cat\n"
        "\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\"
        "W98Ports"
        ".sys"
        "\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\"
        "W98Ports"
        ".sys"
        "\n"
        "\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\"
        "PPortJoy.cpl"
        "\n"
        "%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\"
        "PPortJoy.cpl"
        "\n"
        "\n",
        File);
}


x86 assembly (clang, -O0):
<CreateSignDriversBat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CreateSignDriversBat>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x50d,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [1294 x i8] c"ren %4\\W98Ports.INF W98Ports.TmpINF\0Aren %5\\W98Ports.INF W98Ports.TmpINF\0A\0A%1\\bin\\selfsign\\inf2cat /driver:%4 /os:2000,XP_X86,Server2003_X86,Vista_X86,Server2008_X86,XP_X64,Server2003_X64,Vista_X64,Server2008_X64,7_X86,7_X64,Server2008R2_X64\0A%1\\bin\\selfsign\\inf2cat /driver:%5 /os:2000,XP_X86,Server2003_X86,Vista_X86,Server2008_X86,XP_X64,Server2003_X64,Vista_X64,Server2008_X64,7_X86,7_X64,Server2008R2_X64\0A\0Aren %4\\W98Ports.TmpINF W98Ports.INF\0Aren %5\\W98Ports.TmpINF W98Ports.INF\0A\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\PPJoyBus.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\PPJoyBus.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\PPJoyBus64.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\PPJoyBus64.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\PPJoyBus.cat\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\PPJoyBus.cat\0A\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\PPortJoy.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\PPortJoy.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\PPortJoy64.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\PPortJoy64.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\PPortJoy.cat\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\PPortJoy.cat\0A\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\W98Ports.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\W98Ports.sys\0A\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\PPortJoy.cpl\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\PPortJoy.cpl\0A\0A\00"
define void @CreateSignDriversBat(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fputs(i8* getelementptr inbounds ([1294 x i8], [1294 x i8]* @.str, i64 0, i64 0), i32* %3)
ret void
}

LLVM IR (-O2):
@.str = [1294 x i8] c"ren %4\\W98Ports.INF W98Ports.TmpINF\0Aren %5\\W98Ports.INF W98Ports.TmpINF\0A\0A%1\\bin\\selfsign\\inf2cat /driver:%4 /os:2000,XP_X86,Server2003_X86,Vista_X86,Server2008_X86,XP_X64,Server2003_X64,Vista_X64,Server2008_X64,7_X86,7_X64,Server2008R2_X64\0A%1\\bin\\selfsign\\inf2cat /driver:%5 /os:2000,XP_X86,Server2003_X86,Vista_X86,Server2008_X86,XP_X64,Server2003_X64,Vista_X64,Server2008_X64,7_X86,7_X64,Server2008R2_X64\0A\0Aren %4\\W98Ports.TmpINF W98Ports.INF\0Aren %5\\W98Ports.TmpINF W98Ports.INF\0A\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\PPJoyBus.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\PPJoyBus.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\PPJoyBus64.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\PPJoyBus64.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\PPJoyBus.cat\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\PPJoyBus.cat\0A\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\PPortJoy.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\PPortJoy.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\PPortJoy64.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\PPortJoy64.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\PPortJoy.cat\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\PPortJoy.cat\0A\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\W98Ports.sys\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\W98Ports.sys\0A\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %4\\PPortJoy.cpl\0A%1\\bin\\x86\\SignTool sign /a %2 %3 %5\\PPortJoy.cpl\0A\0A\00"
define void @CreateSignDriversBat(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([1294 x i8], [1294 x i8]* @.str, i64 0, i64 0), i64 1293, i64 1, i32* %0)
ret void
}