newpage(fname, pageno) char *fname;
int pageno;
{
  char str[100];
  hcentertext(0);
  htextsize(0.05, 0.07);
  move2(-0.91, 0.9);
  hcharstr("Hershey Character File: ");
  hcharstr(fname);
  move2(0.45, 0.9);
  sprintf(str, "Page No: %d", pageno);
  hcharstr(str);
  htextsize(0.03, 0.03);
  hcentertext(1);
}


x86 assembly (clang, -O0):
<newpage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
xor    %edi,%edi
mov    $0x0,%al
call   1050 <hcentertext@plt>
movsd  0xead(%rip),%xmm0
movsd  0xead(%rip),%xmm1
mov    $0x2,%al
call   1030 <htextsize@plt>
movsd  0xe8e(%rip),%xmm0
movsd  0xe7e(%rip),%xmm1
mov    $0x2,%al
call   1060 <move2@plt>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1040 <hcharstr@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <hcharstr@plt>
movsd  0xe4e(%rip),%xmm0
movsd  0xe4e(%rip),%xmm1
mov    $0x2,%al
call   1060 <move2@plt>
lea    -0x80(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xe72(%rip),%rsi
mov    $0x0,%al
call   1070 <sprintf@plt>
lea    -0x80(%rbp),%rdi
mov    $0x0,%al
call   1040 <hcharstr@plt>
movsd  0xe0f(%rip),%xmm1
movaps %xmm1,%xmm0
mov    $0x2,%al
call   1030 <htextsize@plt>
mov    $0x1,%edi
mov    $0x0,%al
call   1050 <hcentertext@plt>
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newpage>:
push   %rbp
push   %rbx
sub    $0x68,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edi,%edi
xor    %eax,%eax
call   1050 <hcentertext@plt>
movsd  0xe94(%rip),%xmm0
movsd  0xe94(%rip),%xmm1
mov    $0x2,%al
call   1030 <htextsize@plt>
movsd  0xe8d(%rip),%xmm0
movsd  0xe8d(%rip),%xmm1
mov    $0x2,%al
call   1060 <move2@plt>
lea    0xe97(%rip),%rdi
xor    %eax,%eax
call   1040 <hcharstr@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <hcharstr@plt>
movsd  0xe6e(%rip),%xmm0
movsd  0xe5e(%rip),%xmm1
mov    $0x2,%al
call   1060 <move2@plt>
lea    0xe81(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1070 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <hcharstr@plt>
movsd  0xe3f(%rip),%xmm0
movaps %xmm0,%xmm1
mov    $0x2,%al
call   1030 <htextsize@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1050 <hcentertext@plt>
add    $0x68,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Hershey Character File: \00"
@.str.1 = [12 x i8] c"Page No: %d\00"
define i32 @newpage(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca [100 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
%7 = call i32 (i32, ...) bitcast (i32 (...)* @hcentertext to i32 (i32, ...)*)(i32 0)
%8 = call i32 (double, double, ...) bitcast (i32 (...)* @htextsize to i32 (double, double, ...)*)(double 5.000000e-02, double 7.000000e-02)
%9 = call i32 (double, double, ...) bitcast (i32 (...)* @move2 to i32 (double, double, ...)*)(double -9.100000e-01, double 9.000000e-01)
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @hcharstr to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%11 = load i8*, i8** %4
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @hcharstr to i32 (i8*, ...)*)(i8* %11)
%13 = call i32 (double, double, ...) bitcast (i32 (...)* @move2 to i32 (double, double, ...)*)(double 4.500000e-01, double 9.000000e-01)
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%15 = load i32, i32* %5
%16 = call i32 (i8*, i8*, ...) @sprintf(i8* %14, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @hcharstr to i32 (i8*, ...)*)(i8* %17)
%19 = call i32 (double, double, ...) bitcast (i32 (...)* @htextsize to i32 (double, double, ...)*)(double 3.000000e-02, double 3.000000e-02)
%20 = call i32 (i32, ...) bitcast (i32 (...)* @hcentertext to i32 (i32, ...)*)(i32 1)
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@.str = [25 x i8] c"Hershey Character File: \00"
@.str.1 = [12 x i8] c"Page No: %d\00"
define i32 @newpage(i8* %0, i32 %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @hcentertext to i32 (i32, ...)*)(i32 0)
%6 = tail call i32 (double, double, ...) bitcast (i32 (...)* @htextsize to i32 (double, double, ...)*)(double 5.000000e-02, double 7.000000e-02)
%7 = tail call i32 (double, double, ...) bitcast (i32 (...)* @move2 to i32 (double, double, ...)*)(double -9.100000e-01, double 9.000000e-01)
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @hcharstr to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @hcharstr to i32 (i8*, ...)*)(i8* %0)
%10 = tail call i32 (double, double, ...) bitcast (i32 (...)* @move2 to i32 (double, double, ...)*)(double 4.500000e-01, double 9.000000e-01)
%11 = call i32 (i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @hcharstr to i32 (i8*, ...)*)(i8* %4)
%13 = call i32 (double, double, ...) bitcast (i32 (...)* @htextsize to i32 (double, double, ...)*)(double 3.000000e-02, double 3.000000e-02)
%14 = call i32 (i32, ...) bitcast (i32 (...)* @hcentertext to i32 (i32, ...)*)(i32 1)
ret i32 undef
}