int number(x, y, h, f, a, n)
double x, y, h, f, a;
int n;
{
  char num[255];
  int ixcur, iycur;
  ixcur = (int)(29.0 * x) + 5;
  iycur = (int)(340.0 - (29.0 * y));
  sprintf((char *)num, "%4.lf", f);
  drawString(ixcur, iycur, num);
  return (1);
}


x86 assembly (clang, -O0):
<number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
mov    %edi,-0x2c(%rbp)
movsd  0xec1(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
add    $0x5,%eax
mov    %eax,-0x134(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe92(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8e(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x138(%rbp)
lea    -0x130(%rbp),%rdi
movsd  -0x20(%rbp),%xmm0
lea    0xe7d(%rip),%rsi
mov    $0x1,%al
call   1040 <sprintf@plt>
mov    -0x134(%rbp),%edi
mov    -0x138(%rbp),%esi
lea    -0x130(%rbp),%rdx
mov    $0x0,%al
call   1030 <drawString@plt>
mov    $0x1,%eax
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number>:
push   %rbp
push   %r14
push   %rbx
sub    $0x100,%rsp
mulsd  0xecd(%rip),%xmm0
cvttsd2si %xmm0,%ebx
movaps %xmm3,%xmm0
add    $0x5,%ebx
mulsd  0xec3(%rip),%xmm1
addsd  0xec3(%rip),%xmm1
cvttsd2si %xmm1,%ebp
lea    0xec0(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <sprintf@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <drawString@plt>
mov    $0x1,%eax
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%4.lf\00"
define i32 @number(double %0, double %1, double %2, double %3, double %4, i32 %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca i32
%13 = alloca [255 x i8]
%14 = alloca i32
%15 = alloca i32
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store i32 %5, i32* %12
%16 = load double, double* %7
%17 = fmul double 2.900000e+01, %16
%18 = fptosi double %17 to i32
%19 = add nsw i32 %18, 5
store i32 %19, i32* %14
%20 = load double, double* %8
%21 = call double @llvm.fmuladd.f64(double -2.900000e+01, double %20, double 3.400000e+02)
%22 = fptosi double %21 to i32
store i32 %22, i32* %15
%23 = getelementptr inbounds [255 x i8], [255 x i8]* %13, i64 0, i64 0
%24 = load double, double* %10
%25 = call i32 (i8*, i8*, ...) @sprintf(i8* %23, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %24)
%26 = load i32, i32* %14
%27 = load i32, i32* %15
%28 = getelementptr inbounds [255 x i8], [255 x i8]* %13, i64 0, i64 0
%29 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @drawString to i32 (i32, i32, i8*, ...)*)(i32 %26, i32 %27, i8* %28)
ret i32 1
}

LLVM IR (-O2):
@.str = [6 x i8] c"%4.lf\00"
define i32 @number(double %0, double %1, double %2, double %3, double %4, i32 %5) {
%7 = alloca [255 x i8]
%8 = getelementptr inbounds [255 x i8], [255 x i8]* %7, i64 0, i64 0
%9 = fmul double %0, 2.900000e+01
%10 = fptosi double %9 to i32
%11 = add nsw i32 %10, 5
%12 = tail call double @llvm.fmuladd.f64(double %1, double -2.900000e+01, double 3.400000e+02)
%13 = fptosi double %12 to i32
%14 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %3)
%15 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @drawString to i32 (i32, i32, i8*, ...)*)(i32 %11, i32 %13, i8* %8)
ret i32 1
}