#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 speedtest1_random();
int /*<<< orphan*/ sqlite3_snprintf(int, char *, char *, int, int, int);
void speedtest1_random_ascii_fp(char *zFP) {
  int x = speedtest1_random();
  int y = speedtest1_random();
  int z;
  z = y % 10;
  if (z < 0)
    z = -z;
  y /= 10;
  sqlite3_snprintf(100, zFP, "%d.%de%d", y, z, x % 200);
}


x86 assembly (clang, -O0):
<speedtest1_random_ascii_fp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <speedtest1_random@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <speedtest1_random@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1160 <speedtest1_random_ascii_fp+0x40>
xor    %eax,%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0xc(%rbp),%eax
mov    $0xc8,%edi
cltd
idiv   %edi
mov    %edx,%r9d
mov    $0x64,%edi
lea    0xe6d(%rip),%rdx
call   1030 <sqlite3_snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<speedtest1_random_ascii_fp>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <speedtest1_random@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <speedtest1_random@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%eax
mov    %eax,%r8d
neg    %r8d
cmovs  %eax,%r8d
movslq %ebp,%r9
imul   $0x51eb851f,%r9,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
imul   $0xc8,%eax,%eax
sub    %eax,%r9d
lea    0xe7b(%rip),%rdx
mov    $0x64,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <sqlite3_snprintf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%d.%de%d\00"
define void @speedtest1_random_ascii_fp(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
%6 = call i32 (...) @speedtest1_random()
store i32 %6, i32* %3
%7 = call i32 (...) @speedtest1_random()
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = srem i32 %8, 10
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i32, i32* %5
%14 = sub nsw i32 0, %13
store i32 %14, i32* %5
br label %15
15: ; preds = %12, %1
%16 = load i32, i32* %4
%17 = sdiv i32 %16, 10
store i32 %17, i32* %4
%18 = load i8*, i8** %2
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = load i32, i32* %3
%22 = srem i32 %21, 200
%23 = call i32 @sqlite3_snprintf(i32 100, i8* %18, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %19, i32 %20, i32 %22)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d.%de%d\00"
define void @speedtest1_random_ascii_fp(i8* %0) {
%2 = tail call i32 (...) @speedtest1_random()
%3 = tail call i32 (...) @speedtest1_random()
%4 = srem i32 %3, 10
%5 = tail call i32 @llvm.abs.i32(i32 %4, i1 true)
%6 = sdiv i32 %3, 10
%7 = srem i32 %2, 200
%8 = tail call i32 @sqlite3_snprintf(i32 100, i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %5, i32 %7)
ret void
}