#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*/ Retrieve_String(int, char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int, char *,
                           char *, char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ valIth_flags(int *, int);
void WriteBplf() {
  FILE *Bplf;
  int Prog_Language_Option, Interface_Option;
  char buf1[151];
  char buf2[151];
  char buf3[151];
  Bplf = fopen(".Bplf", "w");
  if (Bplf == NULL) {
    perror(".Bplf");
    return;
  }
  valIth_flags(&Prog_Language_Option, 17);
  valIth_flags(&Interface_Option, 11);
  Retrieve_String(4, buf1);
  Retrieve_String(5, buf2);
  Retrieve_String(6, buf3);
  fprintf(Bplf, "%c;%c;\"'%s'\";\"'%s'\";\"'%s'\"", Interface_Option + '0',
          Prog_Language_Option + '0', buf1, buf2, buf3);
  fclose(Bplf);
}


x86 assembly (clang, -O0):
<WriteBplf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
lea    0xe8e(%rip),%rdi
lea    0xe8d(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    119e <WriteBplf+0x3e>
lea    0xe6c(%rip),%rdi
call   1080 <perror@plt>
jmp    122b <WriteBplf+0xcb>
lea    -0xc(%rbp),%rdi
mov    $0x11,%esi
call   1050 <valIth_flags@plt>
lea    -0x10(%rbp),%rdi
mov    $0xb,%esi
call   1050 <valIth_flags@plt>
lea    -0xb0(%rbp),%rsi
mov    $0x4,%edi
call   1060 <Retrieve_String@plt>
lea    -0x150(%rbp),%rsi
mov    $0x5,%edi
call   1060 <Retrieve_String@plt>
lea    -0x1f0(%rbp),%rsi
mov    $0x6,%edi
call   1060 <Retrieve_String@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
add    $0x30,%edx
mov    -0xc(%rbp),%ecx
add    $0x30,%ecx
lea    -0xb0(%rbp),%r8
lea    -0x150(%rbp),%r9
lea    -0x1f0(%rbp),%rax
lea    0xdef(%rip),%rsi
mov    %rax,(%rsp)
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteBplf>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x1e8,%rsp
lea    0xe8b(%rip),%rdi
lea    0xe8a(%rip),%rsi
call   1070 <fopen@plt>
test   %rax,%rax
je     1225 <WriteBplf+0xc5>
mov    %rax,%rbx
lea    0xc(%rsp),%rdi
mov    $0x11,%esi
call   1050 <valIth_flags@plt>
lea    0x8(%rsp),%rdi
mov    $0xb,%esi
call   1050 <valIth_flags@plt>
lea    0x150(%rsp),%r14
mov    $0x4,%edi
mov    %r14,%rsi
call   1060 <Retrieve_String@plt>
lea    0xb0(%rsp),%r15
mov    $0x5,%edi
mov    %r15,%rsi
call   1060 <Retrieve_String@plt>
lea    0x10(%rsp),%r12
mov    $0x6,%edi
mov    %r12,%rsi
call   1060 <Retrieve_String@plt>
mov    0x8(%rsp),%edx
add    $0x30,%edx
mov    0xc(%rsp),%ecx
add    $0x30,%ecx
mov    %r12,(%rsp)
lea    0xe08(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%r8
mov    %r15,%r9
call   1040 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
add    $0x1e8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
lea    0xdd4(%rip),%rdi
add    $0x1e8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1080 <perror@plt>

LLVM IR (-O0):
@.str = [6 x i8] c".Bplf\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [27 x i8] c"%c;%c;\22'%s'\22;\22'%s'\22;\22'%s'\22\00"
define void @WriteBplf() {
%1 = alloca i32*
%2 = alloca i32
%3 = alloca i32
%4 = alloca [151 x i8]
%5 = alloca [151 x i8]
%6 = alloca [151 x i8]
%7 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %7, i32** %1
%8 = load i32*, i32** %1
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %32
12: ; preds = %0
%13 = call i32 @valIth_flags(i32* %2, i32 17)
%14 = call i32 @valIth_flags(i32* %3, i32 11)
%15 = getelementptr inbounds [151 x i8], [151 x i8]* %4, i64 0, i64 0
%16 = call i32 @Retrieve_String(i32 4, i8* %15)
%17 = getelementptr inbounds [151 x i8], [151 x i8]* %5, i64 0, i64 0
%18 = call i32 @Retrieve_String(i32 5, i8* %17)
%19 = getelementptr inbounds [151 x i8], [151 x i8]* %6, i64 0, i64 0
%20 = call i32 @Retrieve_String(i32 6, i8* %19)
%21 = load i32*, i32** %1
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 48
%24 = load i32, i32* %2
%25 = add nsw i32 %24, 48
%26 = getelementptr inbounds [151 x i8], [151 x i8]* %4, i64 0, i64 0
%27 = getelementptr inbounds [151 x i8], [151 x i8]* %5, i64 0, i64 0
%28 = getelementptr inbounds [151 x i8], [151 x i8]* %6, i64 0, i64 0
%29 = call i32 @fprintf(i32* %21, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %23, i32 %25, i8* %26, i8* %27, i8* %28)
%30 = load i32*, i32** %1
%31 = call i32 @fclose(i32* %30)
br label %32
32: ; preds = %12, %10
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c".Bplf\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [27 x i8] c"%c;%c;\22'%s'\22;\22'%s'\22;\22'%s'\22\00"
define void @WriteBplf() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [151 x i8]
%4 = alloca [151 x i8]
%5 = alloca [151 x i8]
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = getelementptr inbounds [151 x i8], [151 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [151 x i8], [151 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [151 x i8], [151 x i8]* %5, i64 0, i64 0
%11 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %27
15: ; preds = %0
%16 = call i32 @valIth_flags(i32* %1, i32 17)
%17 = call i32 @valIth_flags(i32* %2, i32 11)
%18 = call i32 @Retrieve_String(i32 4, i8* %8)
%19 = call i32 @Retrieve_String(i32 5, i8* %9)
%20 = call i32 @Retrieve_String(i32 6, i8* %10)
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 48
%23 = load i32, i32* %1
%24 = add nsw i32 %23, 48
%25 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %22, i32 %24, i8* %8, i8* %9, i8* %10)
%26 = call i32 @fclose(i32* %11)
br label %27
27: ; preds = %15, %13
ret void
}