#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*/ close(int);
int /*<<< orphan*/ errno;
scalar_t__ fchmod(int, int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fdopen(int, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int mkstemp(char *);
scalar_t__ rename(char *, char const *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcpy(char *, char *);
char *strerror(int /*<<< orphan*/);
int /*<<< orphan*/ unlink(char *);
void recordRecent(const char *file, double temp0, double temp1, double temp2,
                  double hum0, double hum1, double hum2, double avgWind,
                  double gustWind, double rain, int batteryLowBits,
                  int windDirectionBits) {
  char name[256];
  strcpy(name, "/tmp/oregonsci.XXXXXX");
  int fd = mkstemp(name);
  if (fd < 0) {
    fprintf(stderr, "Failed to create temp file for recent: %s\n",
            strerror(errno));
    return;
  }
  if (fchmod(fd, 0664) != 0) {
    fprintf(stderr, "Failed to chmod temp file: %s\n", strerror(errno));
    unlink(name);
    close(fd);
    return;
  }
  FILE *f = fdopen(fd, "w");
  fprintf(f, "{\n");
  fprintf(f, "\t\"temperature0\":%.1f,\n", temp0);
  fprintf(f, "\t\"temperature1\":%.1f,\n", temp1);
  fprintf(f, "\t\"temperature2\":%.1f,\n", temp2);
  fprintf(f, "\t\"humidity0\":%.1f,\n", hum0);
  fprintf(f, "\t\"humidity1\":%.1f,\n", hum1);
  fprintf(f, "\t\"humidity2\":%.1f,\n", hum2);
  fprintf(f, "\t\"avgWindSpeed\":%.1f,\n", avgWind);
  fprintf(f, "\t\"gustSpeed\":%.1f,\n", gustWind);
  fprintf(f, "\t\"rainfall\":%.4f,\n", rain);
  fprintf(f, "\t\"batteryLow\":%d,\n", batteryLowBits);
  fprintf(f, "\t\"windDirection\":%d\n", windDirectionBits);
  fprintf(f, "}\n");
  fclose(f);
  if (rename(name, file)) {
    fprintf(stderr, "Failed to rename temp file: %s\n", strerror(errno));
  }
}


x86 assembly (clang, -O0):
<recordRecent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
movsd  0x10(%rbp),%xmm8
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  %xmm5,-0x38(%rbp)
movsd  %xmm6,-0x40(%rbp)
movsd  %xmm7,-0x48(%rbp)
mov    %esi,-0x4c(%rbp)
mov    %edx,-0x50(%rbp)
lea    -0x150(%rbp),%rdi
lea    0xe0f(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x150(%rbp),%rdi
call   1080 <mkstemp@plt>
mov    %eax,-0x154(%rbp)
cmpl   $0x0,-0x154(%rbp)
jge    124e <recordRecent+0xae>
mov    0x2dc4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x164(%rbp)
mov    0x2dad(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    -0x164(%rbp),%edi
mov    %rax,%rdx
lea    0xdd4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1489 <recordRecent+0x2e9>
mov    -0x154(%rbp),%edi
mov    $0x1b4,%esi
call   10a0 <fchmod@plt>
cmp    $0x0,%rax
je     12b8 <recordRecent+0x118>
mov    0x2d71(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x168(%rbp)
mov    0x2d5a(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    -0x168(%rbp),%edi
mov    %rax,%rdx
lea    0xdac(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
lea    -0x150(%rbp),%rdi
call   1030 <unlink@plt>
mov    -0x154(%rbp),%edi
call   1060 <close@plt>
jmp    1489 <recordRecent+0x2e9>
mov    -0x154(%rbp),%edi
lea    0xd9b(%rip),%rsi
call   1090 <fdopen@plt>
mov    %rax,-0x160(%rbp)
mov    -0x160(%rbp),%rax
mov    %eax,%edi
lea    0xd81(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x160(%rbp),%rax
mov    %eax,%edi
movsd  -0x10(%rbp),%xmm0
lea    0xd68(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x160(%rbp),%rax
mov    %eax,%edi
movsd  -0x18(%rbp),%xmm0
lea    0xd63(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x160(%rbp),%rax
mov    %eax,%edi
movsd  -0x20(%rbp),%xmm0
lea    0xd5e(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x160(%rbp),%rax
mov    %eax,%edi
movsd  -0x28(%rbp),%xmm0
lea    0xd59(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x160(%rbp),%rax
mov    %eax,%edi
movsd  -0x30(%rbp),%xmm0
lea    0xd51(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x160(%rbp),%rax
mov    %eax,%edi
movsd  -0x38(%rbp),%xmm0
lea    0xd49(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x160(%rbp),%rax
mov    %eax,%edi
movsd  -0x40(%rbp),%xmm0
lea    0xd41(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x160(%rbp),%rax
mov    %eax,%edi
movsd  -0x48(%rbp),%xmm0
lea    0xd3c(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x160(%rbp),%rax
mov    %eax,%edi
movsd  0x10(%rbp),%xmm0
lea    0xd34(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x160(%rbp),%rax
mov    %eax,%edi
mov    -0x4c(%rbp),%edx
lea    0xd2d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x160(%rbp),%rax
mov    %eax,%edi
mov    -0x50(%rbp),%edx
lea    0xd26(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x160(%rbp),%rax
mov    %eax,%edi
lea    0xd24(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x160(%rbp),%rdi
call   1050 <fclose@plt>
lea    -0x150(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   10b0 <rename@plt>
cmp    $0x0,%rax
je     1489 <recordRecent+0x2e9>
mov    0x2b84(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x16c(%rbp)
mov    0x2b6d(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    -0x16c(%rbp),%edi
mov    %rax,%rdx
lea    0xccd(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recordRecent>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x148,%rsp
mov    %edx,%r15d
mov    %esi,%ebx
movsd  %xmm7,0x38(%rsp)
movsd  %xmm6,0x30(%rsp)
movsd  %xmm5,0x28(%rsp)
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x18(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
mov    %rdi,%r14
lea    0xe15(%rip),%rsi
lea    0x40(%rsp),%rbp
mov    %rbp,%rdi
call   1040 <strcpy@plt>
mov    %rbp,%rdi
call   1080 <mkstemp@plt>
test   %eax,%eax
js     1257 <recordRecent+0xb7>
mov    %eax,%ebp
mov    %eax,%edi
mov    $0x1b4,%esi
call   10a0 <fchmod@plt>
test   %rax,%rax
je     127a <recordRecent+0xda>
mov    0x2dc2(%rip),%rax
mov    (%rax),%ebx
mov    0x2db1(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xe0c(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x40(%rsp),%rdi
call   1030 <unlink@plt>
mov    %ebp,%edi
call   1060 <close@plt>
jmp    13dc <recordRecent+0x23c>
mov    0x2d82(%rip),%rax
mov    (%rax),%ebx
mov    0x2d71(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xda1(%rip),%rsi
jmp    13d0 <recordRecent+0x230>
lea    0xddf(%rip),%rsi
mov    %ebp,%edi
call   1090 <fdopen@plt>
mov    %rax,%rbp
lea    0xdd0(%rip),%rsi
mov    %ebp,%edi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xdc3(%rip),%rsi
mov    %ebp,%edi
movsd  (%rsp),%xmm0
mov    $0x1,%al
call   1070 <fprintf@plt>
lea    0xdc5(%rip),%rsi
mov    %ebp,%edi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1070 <fprintf@plt>
lea    0xdc6(%rip),%rsi
mov    %ebp,%edi
movsd  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1070 <fprintf@plt>
lea    0xdc7(%rip),%rsi
mov    %ebp,%edi
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1070 <fprintf@plt>
lea    0xdc5(%rip),%rsi
mov    %ebp,%edi
movsd  0x20(%rsp),%xmm0
mov    $0x1,%al
call   1070 <fprintf@plt>
lea    0xdc3(%rip),%rsi
mov    %ebp,%edi
movsd  0x28(%rsp),%xmm0
mov    $0x1,%al
call   1070 <fprintf@plt>
lea    0xdc1(%rip),%rsi
mov    %ebp,%edi
movsd  0x30(%rsp),%xmm0
mov    $0x1,%al
call   1070 <fprintf@plt>
lea    0xdc2(%rip),%rsi
mov    %ebp,%edi
movsd  0x38(%rsp),%xmm0
mov    $0x1,%al
call   1070 <fprintf@plt>
lea    0xdc0(%rip),%rsi
mov    %ebp,%edi
movsd  0x170(%rsp),%xmm0
mov    $0x1,%al
call   1070 <fprintf@plt>
lea    0xdba(%rip),%rsi
mov    %ebp,%edi
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xdbb(%rip),%rsi
mov    %ebp,%edi
mov    %r15d,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xdbd(%rip),%rsi
mov    %ebp,%edi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %rbp,%rdi
call   1050 <fclose@plt>
lea    0x40(%rsp),%rdi
mov    %r14,%rsi
call   10b0 <rename@plt>
test   %rax,%rax
je     13dc <recordRecent+0x23c>
mov    0x2c27(%rip),%rax
mov    (%rax),%ebx
mov    0x2c16(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xd7f(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0x148,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"/tmp/oregonsci.XXXXXX\00"
@stderr = global i32 0
@.str.1 = [43 x i8] c"Failed to create temp file for recent: %s\0A\00"
@errno = global i32 0
@.str.2 = [31 x i8] c"Failed to chmod temp file: %s\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [3 x i8] c"{\0A\00"
@.str.5 = [23 x i8] c"\09\22temperature0\22:%.1f,\0A\00"
@.str.6 = [23 x i8] c"\09\22temperature1\22:%.1f,\0A\00"
@.str.7 = [23 x i8] c"\09\22temperature2\22:%.1f,\0A\00"
@.str.8 = [20 x i8] c"\09\22humidity0\22:%.1f,\0A\00"
@.str.9 = [20 x i8] c"\09\22humidity1\22:%.1f,\0A\00"
@.str.10 = [20 x i8] c"\09\22humidity2\22:%.1f,\0A\00"
@.str.11 = [23 x i8] c"\09\22avgWindSpeed\22:%.1f,\0A\00"
@.str.12 = [20 x i8] c"\09\22gustSpeed\22:%.1f,\0A\00"
@.str.13 = [19 x i8] c"\09\22rainfall\22:%.4f,\0A\00"
@.str.14 = [19 x i8] c"\09\22batteryLow\22:%d,\0A\00"
@.str.15 = [21 x i8] c"\09\22windDirection\22:%d\0A\00"
@.str.16 = [3 x i8] c"}\0A\00"
@.str.17 = [32 x i8] c"Failed to rename temp file: %s\0A\00"
define void @recordRecent(i8* %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, i32 %10, i32 %11) {
%13 = alloca i8*
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca i32
%24 = alloca i32
%25 = alloca [256 x i8]
%26 = alloca i32
%27 = alloca i32*
store i8* %0, i8** %13
store double %1, double* %14
store double %2, double* %15
store double %3, double* %16
store double %4, double* %17
store double %5, double* %18
store double %6, double* %19
store double %7, double* %20
store double %8, double* %21
store double %9, double* %22
store i32 %10, i32* %23
store i32 %11, i32* %24
%28 = getelementptr inbounds [256 x i8], [256 x i8]* %25, i64 0, i64 0
%29 = call i32 @strcpy(i8* %28, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%30 = getelementptr inbounds [256 x i8], [256 x i8]* %25, i64 0, i64 0
%31 = call i32 @mkstemp(i8* %30)
store i32 %31, i32* %26
%32 = load i32, i32* %26
%33 = icmp slt i32 %32, 0
br i1 %33, label %34, label %39
34: ; preds = %12
%35 = load i32, i32* @stderr
%36 = load i32, i32* @errno
%37 = call i8* @strerror(i32 %36)
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* %37)
br label %116
39: ; preds = %12
%40 = load i32, i32* %26
%41 = call i64 @fchmod(i32 %40, i32 436)
%42 = icmp ne i64 %41, 0
br i1 %42, label %43, label %52
43: ; preds = %39
%44 = load i32, i32* @stderr
%45 = load i32, i32* @errno
%46 = call i8* @strerror(i32 %45)
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i8* %46)
%48 = getelementptr inbounds [256 x i8], [256 x i8]* %25, i64 0, i64 0
%49 = call i32 @unlink(i8* %48)
%50 = load i32, i32* %26
%51 = call i32 @close(i32 %50)
br label %116
52: ; preds = %39
%53 = load i32, i32* %26
%54 = call i32* @fdopen(i32 %53, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %54, i32** %27
%55 = load i32*, i32** %27
%56 = ptrtoint i32* %55 to i32
%57 = call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%58 = load i32*, i32** %27
%59 = ptrtoint i32* %58 to i32
%60 = load double, double* %14
%61 = call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), double %60)
%62 = load i32*, i32** %27
%63 = ptrtoint i32* %62 to i32
%64 = load double, double* %15
%65 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), double %64)
%66 = load i32*, i32** %27
%67 = ptrtoint i32* %66 to i32
%68 = load double, double* %16
%69 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), double %68)
%70 = load i32*, i32** %27
%71 = ptrtoint i32* %70 to i32
%72 = load double, double* %17
%73 = call i32 (i32, i8*, ...) @fprintf(i32 %71, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), double %72)
%74 = load i32*, i32** %27
%75 = ptrtoint i32* %74 to i32
%76 = load double, double* %18
%77 = call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), double %76)
%78 = load i32*, i32** %27
%79 = ptrtoint i32* %78 to i32
%80 = load double, double* %19
%81 = call i32 (i32, i8*, ...) @fprintf(i32 %79, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), double %80)
%82 = load i32*, i32** %27
%83 = ptrtoint i32* %82 to i32
%84 = load double, double* %20
%85 = call i32 (i32, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), double %84)
%86 = load i32*, i32** %27
%87 = ptrtoint i32* %86 to i32
%88 = load double, double* %21
%89 = call i32 (i32, i8*, ...) @fprintf(i32 %87, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), double %88)
%90 = load i32*, i32** %27
%91 = ptrtoint i32* %90 to i32
%92 = load double, double* %22
%93 = call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), double %92)
%94 = load i32*, i32** %27
%95 = ptrtoint i32* %94 to i32
%96 = load i32, i32* %23
%97 = call i32 (i32, i8*, ...) @fprintf(i32 %95, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i32 %96)
%98 = load i32*, i32** %27
%99 = ptrtoint i32* %98 to i32
%100 = load i32, i32* %24
%101 = call i32 (i32, i8*, ...) @fprintf(i32 %99, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0), i32 %100)
%102 = load i32*, i32** %27
%103 = ptrtoint i32* %102 to i32
%104 = call i32 (i32, i8*, ...) @fprintf(i32 %103, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0))
%105 = load i32*, i32** %27
%106 = call i32 @fclose(i32* %105)
%107 = getelementptr inbounds [256 x i8], [256 x i8]* %25, i64 0, i64 0
%108 = load i8*, i8** %13
%109 = call i64 @rename(i8* %107, i8* %108)
%110 = icmp ne i64 %109, 0
br i1 %110, label %111, label %116
111: ; preds = %52
%112 = load i32, i32* @stderr
%113 = load i32, i32* @errno
%114 = call i8* @strerror(i32 %113)
%115 = call i32 (i32, i8*, ...) @fprintf(i32 %112, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.17, i64 0, i64 0), i8* %114)
br label %116
116: ; preds = %34, %43, %111, %52
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"/tmp/oregonsci.XXXXXX\00"
@stderr = global i32 0
@.str.1 = [43 x i8] c"Failed to create temp file for recent: %s\0A\00"
@errno = global i32 0
@.str.2 = [31 x i8] c"Failed to chmod temp file: %s\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [3 x i8] c"{\0A\00"
@.str.5 = [23 x i8] c"\09\22temperature0\22:%.1f,\0A\00"
@.str.6 = [23 x i8] c"\09\22temperature1\22:%.1f,\0A\00"
@.str.7 = [23 x i8] c"\09\22temperature2\22:%.1f,\0A\00"
@.str.8 = [20 x i8] c"\09\22humidity0\22:%.1f,\0A\00"
@.str.9 = [20 x i8] c"\09\22humidity1\22:%.1f,\0A\00"
@.str.10 = [20 x i8] c"\09\22humidity2\22:%.1f,\0A\00"
@.str.11 = [23 x i8] c"\09\22avgWindSpeed\22:%.1f,\0A\00"
@.str.12 = [20 x i8] c"\09\22gustSpeed\22:%.1f,\0A\00"
@.str.13 = [19 x i8] c"\09\22rainfall\22:%.4f,\0A\00"
@.str.14 = [19 x i8] c"\09\22batteryLow\22:%d,\0A\00"
@.str.15 = [21 x i8] c"\09\22windDirection\22:%d\0A\00"
@.str.16 = [3 x i8] c"}\0A\00"
@.str.17 = [32 x i8] c"Failed to rename temp file: %s\0A\00"
define void @recordRecent(i8* nocapture %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, i32 %10, i32 %11) {
%13 = alloca [256 x i8]
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%15 = call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @mkstemp(i8* %14)
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %23
18: ; preds = %12
%19 = load i32, i32* @stderr
%20 = load i32, i32* @errno
%21 = call i8* @strerror(i32 %20)
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* %21)
br label %58
23: ; preds = %12
%24 = call i64 @fchmod(i32 %16, i32 436)
%25 = icmp eq i64 %24, 0
br i1 %25, label %33, label %26
26: ; preds = %23
%27 = load i32, i32* @stderr
%28 = load i32, i32* @errno
%29 = call i8* @strerror(i32 %28)
%30 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i8* %29)
%31 = call i32 @unlink(i8* %14)
%32 = call i32 @close(i32 %16)
br label %58
33: ; preds = %23
%34 = call i32* @fdopen(i32 %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%35 = ptrtoint i32* %34 to i64
%36 = trunc i64 %35 to i32
%37 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), double %1)
%39 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), double %2)
%40 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), double %3)
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), double %4)
%42 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), double %5)
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), double %6)
%44 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), double %7)
%45 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), double %8)
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), double %9)
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i32 %10)
%48 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0), i32 %11)
%49 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0))
%50 = call i32 @fclose(i32* %34)
%51 = call i64 @rename(i8* %14, i8* %0)
%52 = icmp eq i64 %51, 0
br i1 %52, label %58, label %53
53: ; preds = %33
%54 = load i32, i32* @stderr
%55 = load i32, i32* @errno
%56 = call i8* @strerror(i32 %55)
%57 = call i32 (i32, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.17, i64 0, i64 0), i8* %56)
br label %58
58: ; preds = %33, %53, %26, %18
ret void
}