#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*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
int Sfile_scale(double value, char *result, int siz, double thresh, int flag) {
  char scale_c, scales[7], form[80], *negpt = NULL, *cpt;
  int i, dec_siz = 0, avail_siz = 1;
  if (value < 0) {
    value = -value;
    siz--;
    result[0] = '-';
    negpt = result;
    result++;
  }
  strcpy(scales, "bkmgtp");
  scale_c = scales[0];
  for (i = 1; scales[i] != 0; i++) {
    if (value < thresh - 0.5)
      break;
    value /= 1024.0;
    scale_c = scales[i];
  }
  if (scale_c != 'b' && !(flag & 4)) {
    avail_siz = siz - 1;
    sprintf(form, "%%.f");
    sprintf(result, "%.f", value);
    if (((int)strlen(result)) <= avail_siz - 2)
      dec_siz = 1;
  }
  if (scale_c == 'b' && (flag & 1)) {
    if (flag & 2)
      sprintf(form, "%%.f");
    else
      sprintf(form, "%%%d.f", siz);
    sprintf(result, form, value);
  } else {
    if (flag & 2)
      sprintf(form, "%%.f%%c");
    else if (dec_siz > 0)
      sprintf(form, "%%%d.%df%%c", avail_siz, dec_siz);
    else
      sprintf(form, "%%%d.f%%c", siz - 1);
    sprintf(result, form, value, scale_c);
  }
  if (negpt != NULL) {
    for (cpt = result; *cpt == ' '; cpt++)
      ;
    if (cpt > result) {
      *negpt = ' ';
      *(cpt - 1) = '-';
    }
  }
  return (1);
}


x86 assembly (clang, -O0):
<Sfile_scale>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %edx,-0x24(%rbp)
movq   $0x0,-0x88(%rbp)
movl   $0x0,-0x98(%rbp)
movl   $0x1,-0x9c(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    11c4 <Sfile_scale+0x94>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x2d,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
lea    -0x2c(%rbp),%rdi
lea    0xe41(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x2c(%rbp),%al
mov    %al,-0x25(%rbp)
movl   $0x1,-0x94(%rbp)
movslq -0x94(%rbp),%rax
movsbl -0x2c(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     1256 <Sfile_scale+0x126>
movsd  -0x8(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xdf5(%rip),%xmm2
subsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    121e <Sfile_scale+0xee>
jmp    1256 <Sfile_scale+0x126>
movsd  -0x8(%rbp),%xmm0
movsd  0xddd(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movslq -0x94(%rbp),%rax
mov    -0x2c(%rbp,%rax,1),%al
mov    %al,-0x25(%rbp)
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    11e4 <Sfile_scale+0xb4>
movsbl -0x25(%rbp),%eax
cmp    $0x62,%eax
je     12d0 <Sfile_scale+0x1a0>
mov    -0x24(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
jne    12d0 <Sfile_scale+0x1a0>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x9c(%rbp)
lea    -0x80(%rbp),%rdi
lea    0xd8e(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rdi
movsd  -0x8(%rbp),%xmm0
lea    0xd78(%rip),%rsi
mov    $0x1,%al
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x9c(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     12cb <Sfile_scale+0x19b>
movl   $0x1,-0x98(%rbp)
jmp    12d0 <Sfile_scale+0x1a0>
movsbl -0x25(%rbp),%eax
cmp    $0x62,%eax
jne    1340 <Sfile_scale+0x210>
mov    -0x24(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1340 <Sfile_scale+0x210>
mov    -0x24(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1312 <Sfile_scale+0x1e2>
lea    -0x80(%rbp),%rdi
lea    0xd11(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    1327 <Sfile_scale+0x1f7>
lea    -0x80(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xcfc(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rdi
lea    -0x80(%rbp),%rsi
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1050 <sprintf@plt>
jmp    13cb <Sfile_scale+0x29b>
mov    -0x24(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1366 <Sfile_scale+0x236>
lea    -0x80(%rbp),%rdi
lea    0xcc9(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    13b3 <Sfile_scale+0x283>
cmpl   $0x0,-0x98(%rbp)
jle    1396 <Sfile_scale+0x266>
lea    -0x80(%rbp),%rdi
mov    -0x9c(%rbp),%edx
mov    -0x98(%rbp),%ecx
lea    0xca1(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    13ae <Sfile_scale+0x27e>
lea    -0x80(%rbp),%rdi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
lea    0xc90(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    13b3 <Sfile_scale+0x283>
mov    -0x10(%rbp),%rdi
lea    -0x80(%rbp),%rsi
movsd  -0x8(%rbp),%xmm0
movsbl -0x25(%rbp),%edx
mov    $0x1,%al
call   1050 <sprintf@plt>
cmpq   $0x0,-0x88(%rbp)
je     143e <Sfile_scale+0x30e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1413 <Sfile_scale+0x2e3>
jmp    13fc <Sfile_scale+0x2cc>
mov    -0x90(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x90(%rbp)
jmp    13e4 <Sfile_scale+0x2b4>
mov    -0x90(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1439 <Sfile_scale+0x309>
mov    -0x88(%rbp),%rax
movb   $0x20,(%rax)
mov    -0x90(%rbp),%rax
movb   $0x2d,-0x1(%rax)
jmp    143e <Sfile_scale+0x30e>
mov    $0x1,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sfile_scale>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %edx,%ebp
mov    %esi,%r13d
mov    %rdi,%r14
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
movsd  %xmm1,0x28(%rsp)
jbe    1175 <Sfile_scale+0x45>
xorpd  0xe9f(%rip),%xmm0
movapd %xmm0,0x10(%rsp)
add    $0xffffffff,%r13d
movb   $0x2d,(%r14)
lea    0x1(%r14),%r15
jmp    1181 <Sfile_scale+0x51>
movapd %xmm0,0x10(%rsp)
mov    %r14,%r15
xor    %r14d,%r14d
lea    0xe98(%rip),%rsi
lea    0x9(%rsp),%rdi
call   1030 <strcpy@plt>
mov    0x9(%rsp),%bl
mov    0xa(%rsp),%al
test   %al,%al
je     11e9 <Sfile_scale+0xb9>
movsd  0x28(%rsp),%xmm2
addsd  0xe64(%rip),%xmm2
movapd 0x10(%rsp),%xmm1
ucomisd %xmm1,%xmm2
ja     11ef <Sfile_scale+0xbf>
lea    0xb(%rsp),%rcx
movsd  0xe53(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,%ebx
mulsd  %xmm0,%xmm1
movzbl (%rcx),%eax
test   %al,%al
je     11ef <Sfile_scale+0xbf>
add    $0x1,%rcx
ucomisd %xmm1,%xmm2
jbe    11d0 <Sfile_scale+0xa0>
jmp    11ef <Sfile_scale+0xbf>
movapd 0x10(%rsp),%xmm1
xor    %eax,%eax
mov    $0x1,%r12d
test   $0x4,%bpl
movapd %xmm1,0x10(%rsp)
jne    1247 <Sfile_scale+0x117>
cmp    $0x62,%bl
je     1247 <Sfile_scale+0x117>
lea    -0x1(%r13),%r12d
lea    0xe14(%rip),%rsi
lea    0x30(%rsp),%rdi
xor    %eax,%eax
call   1050 <sprintf@plt>
lea    0xe02(%rip),%rsi
mov    %r15,%rdi
movapd 0x10(%rsp),%xmm0
mov    $0x1,%al
call   1050 <sprintf@plt>
mov    %r15,%rdi
call   1040 <strlen@plt>
lea    -0x3(%r13),%ecx
cmp    %eax,%ecx
setge  %al
test   $0x1,%bpl
je     1270 <Sfile_scale+0x140>
cmp    $0x62,%bl
jne    1270 <Sfile_scale+0x140>
test   $0x2,%bpl
jne    129a <Sfile_scale+0x16a>
lea    0xdcd(%rip),%rsi
lea    0x30(%rsp),%rdi
mov    %r13d,%edx
xor    %eax,%eax
call   1050 <sprintf@plt>
jmp    12ad <Sfile_scale+0x17d>
movsbl %bl,%ebx
test   $0x2,%bpl
jne    12c8 <Sfile_scale+0x198>
test   %al,%al
je     12dd <Sfile_scale+0x1ad>
lea    0xdb7(%rip),%rsi
lea    0x30(%rsp),%rdi
mov    %r12d,%edx
mov    $0x1,%ecx
xor    %eax,%eax
call   1050 <sprintf@plt>
jmp    12f7 <Sfile_scale+0x1c7>
lea    0xd86(%rip),%rsi
lea    0x30(%rsp),%rdi
xor    %eax,%eax
call   1050 <sprintf@plt>
movaps 0x10(%rsp),%xmm0
lea    0x30(%rsp),%rsi
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <sprintf@plt>
test   %r14,%r14
jne    1312 <Sfile_scale+0x1e2>
jmp    1337 <Sfile_scale+0x207>
lea    0xd64(%rip),%rsi
lea    0x30(%rsp),%rdi
xor    %eax,%eax
call   1050 <sprintf@plt>
jmp    12f7 <Sfile_scale+0x1c7>
add    $0xffffffff,%r13d
lea    0xd5f(%rip),%rsi
lea    0x30(%rsp),%rdi
mov    %r13d,%edx
xor    %eax,%eax
call   1050 <sprintf@plt>
lea    0x30(%rsp),%rsi
mov    %r15,%rdi
movaps 0x10(%rsp),%xmm0
mov    %ebx,%edx
mov    $0x1,%al
call   1050 <sprintf@plt>
test   %r14,%r14
je     1337 <Sfile_scale+0x207>
lea    -0x1(%r15),%rax
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x20,0x1(%rax)
lea    0x1(%rax),%rax
je     1320 <Sfile_scale+0x1f0>
cmp    %r15,%rax
jbe    1337 <Sfile_scale+0x207>
movb   $0x20,(%r14)
movb   $0x2d,-0x1(%rax)
mov    $0x1,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"bkmgtp\00"
@.str.1 = [5 x i8] c"%%.f\00"
@.str.2 = [4 x i8] c"%.f\00"
@.str.3 = [7 x i8] c"%%%d.f\00"
@.str.4 = [8 x i8] c"%%.f%%c\00"
@.str.5 = [12 x i8] c"%%%d.%df%%c\00"
@.str.6 = [10 x i8] c"%%%d.f%%c\00"
define i32 @Sfile_scale(double %0, i8* %1, i32 %2, double %3, i32 %4) {
%6 = alloca double
%7 = alloca i8*
%8 = alloca i32
%9 = alloca double
%10 = alloca i32
%11 = alloca i8
%12 = alloca [7 x i8]
%13 = alloca [80 x i8]
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store double %0, double* %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store double %3, double* %9
store i32 %4, i32* %10
store i8* null, i8** %14
store i32 0, i32* %17
store i32 1, i32* %18
%19 = load double, double* %6
%20 = fcmp olt double %19, 0.000000e+00
br i1 %20, label %21, label %31
21: ; preds = %5
%22 = load double, double* %6
%23 = fneg double %22
store double %23, double* %6
%24 = load i32, i32* %8
%25 = add nsw i32 %24, -1
store i32 %25, i32* %8
%26 = load i8*, i8** %7
%27 = getelementptr inbounds i8, i8* %26, i64 0
store i8 45, i8* %27
%28 = load i8*, i8** %7
store i8* %28, i8** %14
%29 = load i8*, i8** %7
%30 = getelementptr inbounds i8, i8* %29, i32 1
store i8* %30, i8** %7
br label %31
31: ; preds = %21, %5
%32 = getelementptr inbounds [7 x i8], [7 x i8]* %12, i64 0, i64 0
%33 = call i32 @strcpy(i8* %32, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%34 = getelementptr inbounds [7 x i8], [7 x i8]* %12, i64 0, i64 0
%35 = load i8, i8* %34
store i8 %35, i8* %11
store i32 1, i32* %16
br label %36
36: ; preds = %56, %31
%37 = load i32, i32* %16
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [7 x i8], [7 x i8]* %12, i64 0, i64 %38
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = icmp ne i32 %41, 0
br i1 %42, label %43, label %59
43: ; preds = %36
%44 = load double, double* %6
%45 = load double, double* %9
%46 = fsub double %45, 5.000000e-01
%47 = fcmp olt double %44, %46
br i1 %47, label %48, label %49
48: ; preds = %43
br label %59
49: ; preds = %43
%50 = load double, double* %6
%51 = fdiv double %50, 1.024000e+03
store double %51, double* %6
%52 = load i32, i32* %16
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [7 x i8], [7 x i8]* %12, i64 0, i64 %53
%55 = load i8, i8* %54
store i8 %55, i8* %11
br label %56
56: ; preds = %49
%57 = load i32, i32* %16
%58 = add nsw i32 %57, 1
store i32 %58, i32* %16
br label %36
59: ; preds = %48, %36
%60 = load i8, i8* %11
%61 = sext i8 %60 to i32
%62 = icmp ne i32 %61, 98
br i1 %62, label %63, label %83
63: ; preds = %59
%64 = load i32, i32* %10
%65 = and i32 %64, 4
%66 = icmp ne i32 %65, 0
br i1 %66, label %83, label %67
67: ; preds = %63
%68 = load i32, i32* %8
%69 = sub nsw i32 %68, 1
store i32 %69, i32* %18
%70 = getelementptr inbounds [80 x i8], [80 x i8]* %13, i64 0, i64 0
%71 = call i32 (i8*, i8*, ...) @sprintf(i8* %70, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%72 = load i8*, i8** %7
%73 = load double, double* %6
%74 = call i32 (i8*, i8*, ...) @sprintf(i8* %72, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double %73)
%75 = load i8*, i8** %7
%76 = call i64 @strlen(i8* %75)
%77 = trunc i64 %76 to i32
%78 = load i32, i32* %18
%79 = sub nsw i32 %78, 2
%80 = icmp sle i32 %77, %79
br i1 %80, label %81, label %82
81: ; preds = %67
store i32 1, i32* %17
br label %82
82: ; preds = %81, %67
br label %83
83: ; preds = %82, %63, %59
%84 = load i8, i8* %11
%85 = sext i8 %84 to i32
%86 = icmp eq i32 %85, 98
br i1 %86, label %87, label %107
87: ; preds = %83
%88 = load i32, i32* %10
%89 = and i32 %88, 1
%90 = icmp ne i32 %89, 0
br i1 %90, label %91, label %107
91: ; preds = %87
%92 = load i32, i32* %10
%93 = and i32 %92, 2
%94 = icmp ne i32 %93, 0
br i1 %94, label %95, label %98
95: ; preds = %91
%96 = getelementptr inbounds [80 x i8], [80 x i8]* %13, i64 0, i64 0
%97 = call i32 (i8*, i8*, ...) @sprintf(i8* %96, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %102
98: ; preds = %91
%99 = getelementptr inbounds [80 x i8], [80 x i8]* %13, i64 0, i64 0
%100 = load i32, i32* %8
%101 = call i32 (i8*, i8*, ...) @sprintf(i8* %99, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %100)
br label %102
102: ; preds = %98, %95
%103 = load i8*, i8** %7
%104 = getelementptr inbounds [80 x i8], [80 x i8]* %13, i64 0, i64 0
%105 = load double, double* %6
%106 = call i32 (i8*, i8*, ...) @sprintf(i8* %103, i8* %104, double %105)
br label %135
107: ; preds = %87, %83
%108 = load i32, i32* %10
%109 = and i32 %108, 2
%110 = icmp ne i32 %109, 0
br i1 %110, label %111, label %114
111: ; preds = %107
%112 = getelementptr inbounds [80 x i8], [80 x i8]* %13, i64 0, i64 0
%113 = call i32 (i8*, i8*, ...) @sprintf(i8* %112, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %128
114: ; preds = %107
%115 = load i32, i32* %17
%116 = icmp sgt i32 %115, 0
br i1 %116, label %117, label %122
117: ; preds = %114
%118 = getelementptr inbounds [80 x i8], [80 x i8]* %13, i64 0, i64 0
%119 = load i32, i32* %18
%120 = load i32, i32* %17
%121 = call i32 (i8*, i8*, ...) @sprintf(i8* %118, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %119, i32 %120)
br label %127
122: ; preds = %114
%123 = getelementptr inbounds [80 x i8], [80 x i8]* %13, i64 0, i64 0
%124 = load i32, i32* %8
%125 = sub nsw i32 %124, 1
%126 = call i32 (i8*, i8*, ...) @sprintf(i8* %123, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 %125)
br label %127
127: ; preds = %122, %117
br label %128
128: ; preds = %127, %111
%129 = load i8*, i8** %7
%130 = getelementptr inbounds [80 x i8], [80 x i8]* %13, i64 0, i64 0
%131 = load double, double* %6
%132 = load i8, i8* %11
%133 = sext i8 %132 to i32
%134 = call i32 (i8*, i8*, ...) @sprintf(i8* %129, i8* %130, double %131, i32 %133)
br label %135
135: ; preds = %128, %102
%136 = load i8*, i8** %14
%137 = icmp ne i8* %136, null
br i1 %137, label %138, label %158
138: ; preds = %135
%139 = load i8*, i8** %7
store i8* %139, i8** %15
br label %140
140: ; preds = %146, %138
%141 = load i8*, i8** %15
%142 = load i8, i8* %141
%143 = sext i8 %142 to i32
%144 = icmp eq i32 %143, 32
br i1 %144, label %145, label %149
145: ; preds = %140
br label %146
146: ; preds = %145
%147 = load i8*, i8** %15
%148 = getelementptr inbounds i8, i8* %147, i32 1
store i8* %148, i8** %15
br label %140
149: ; preds = %140
%150 = load i8*, i8** %15
%151 = load i8*, i8** %7
%152 = icmp ugt i8* %150, %151
br i1 %152, label %153, label %157
153: ; preds = %149
%154 = load i8*, i8** %14
store i8 32, i8* %154
%155 = load i8*, i8** %15
%156 = getelementptr inbounds i8, i8* %155, i64 -1
store i8 45, i8* %156
br label %157
157: ; preds = %153, %149
br label %158
158: ; preds = %157, %135
ret i32 1
}

LLVM IR (-O2):
@.str = [7 x i8] c"bkmgtp\00"
@.str.1 = [5 x i8] c"%%.f\00"
@.str.2 = [4 x i8] c"%.f\00"
@.str.3 = [7 x i8] c"%%%d.f\00"
@.str.4 = [8 x i8] c"%%.f%%c\00"
@.str.5 = [12 x i8] c"%%%d.%df%%c\00"
@.str.6 = [10 x i8] c"%%%d.f%%c\00"
define i32 @Sfile_scale(double %0, i8* %1, i32 %2, double %3, i32 %4) {
%6 = alloca [7 x i8]
%7 = alloca [80 x i8]
%8 = getelementptr inbounds [7 x i8], [7 x i8]* %6, i64 0, i64 0
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%10 = fcmp olt double %0, 0.000000e+00
br i1 %10, label %11, label %15
11: ; preds = %5
%12 = fneg double %0
%13 = add nsw i32 %2, -1
store i8 45, i8* %1
%14 = getelementptr inbounds i8, i8* %1, i64 1
br label %15
15: ; preds = %11, %5
%16 = phi i32 [ %13, %11 ], [ %2, %5 ]
%17 = phi i8* [ %14, %11 ], [ %1, %5 ]
%18 = phi double [ %12, %11 ], [ %0, %5 ]
%19 = phi i8* [ %1, %11 ], [ null, %5 ]
%20 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%21 = load i8, i8* %8
%22 = fadd double %3, -5.000000e-01
%23 = getelementptr inbounds [7 x i8], [7 x i8]* %6, i64 0, i64 1
%24 = load i8, i8* %23
%25 = icmp eq i8 %24, 0
%26 = fcmp olt double %18, %22
%27 = or i1 %25, %26
br i1 %27, label %39, label %28
28: ; preds = %15, %28
%29 = phi i64 [ %33, %28 ], [ 1, %15 ]
%30 = phi i8 [ %35, %28 ], [ %24, %15 ]
%31 = phi double [ %32, %28 ], [ %18, %15 ]
%32 = fmul double %31, 0x3F50000000000000
%33 = add nuw nsw i64 %29, 1
%34 = getelementptr inbounds [7 x i8], [7 x i8]* %6, i64 0, i64 %33
%35 = load i8, i8* %34
%36 = icmp eq i8 %35, 0
%37 = fcmp olt double %32, %22
%38 = select i1 %36, i1 true, i1 %37
br i1 %38, label %39, label %28
39: ; preds = %28, %15
%40 = phi double [ %18, %15 ], [ %32, %28 ]
%41 = phi i8 [ %21, %15 ], [ %30, %28 ]
%42 = sext i8 %41 to i32
%43 = icmp ne i8 %41, 98
%44 = and i32 %4, 4
%45 = icmp eq i32 %44, 0
%46 = and i1 %45, %43
br i1 %46, label %47, label %55
47: ; preds = %39
%48 = add nsw i32 %16, -1
%49 = call i32 (i8*, i8*, ...) @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%50 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %17, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double %40)
%51 = call i64 @strlen(i8* dereferenceable(1) %17)
%52 = trunc i64 %51 to i32
%53 = add nsw i32 %16, -3
%54 = icmp sge i32 %53, %52
br label %55
55: ; preds = %47, %39
%56 = phi i1 [ false, %39 ], [ %54, %47 ]
%57 = phi i32 [ 1, %39 ], [ %48, %47 ]
%58 = and i32 %4, 1
%59 = icmp eq i32 %58, 0
%60 = or i1 %59, %43
%61 = and i32 %4, 2
%62 = icmp eq i32 %61, 0
br i1 %60, label %70, label %63
63: ; preds = %55
br i1 %62, label %66, label %64
64: ; preds = %63
%65 = call i32 (i8*, i8*, ...) @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %68
66: ; preds = %63
%67 = call i32 (i8*, i8*, ...) @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %16)
br label %68
68: ; preds = %66, %64
%69 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %17, i8* %9, double %40)
br label %81
70: ; preds = %55
br i1 %62, label %73, label %71
71: ; preds = %70
%72 = call i32 (i8*, i8*, ...) @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %79
73: ; preds = %70
br i1 %56, label %74, label %76
74: ; preds = %73
%75 = call i32 (i8*, i8*, ...) @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %57, i32 1)
br label %79
76: ; preds = %73
%77 = add nsw i32 %16, -1
%78 = call i32 (i8*, i8*, ...) @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 %77)
br label %79
79: ; preds = %74, %76, %71
%80 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %17, i8* %9, double %40, i32 %42)
br label %81
81: ; preds = %79, %68
%82 = icmp eq i8* %19, null
br i1 %82, label %92, label %83
83: ; preds = %81, %83
%84 = phi i8* [ %87, %83 ], [ %17, %81 ]
%85 = load i8, i8* %84
%86 = icmp eq i8 %85, 32
%87 = getelementptr inbounds i8, i8* %84, i64 1
br i1 %86, label %83, label %88
88: ; preds = %83
%89 = icmp ugt i8* %84, %17
br i1 %89, label %90, label %92
90: ; preds = %88
store i8 32, i8* %19
%91 = getelementptr inbounds i8, i8* %84, i64 -1
store i8 45, i8* %91
br label %92
92: ; preds = %88, %90, %81
ret i32 1
}