void mf_write_tempo(tempo) long tempo;
{
  eputc(0);
  eputc(0xFF);
  eputc(0x51);
  eputc(3);
  eputc((char)(0xff & (tempo >> 16)));
  eputc((char)(0xff & (tempo >> 8)));
  eputc((char)(0xff & tempo));
}


x86 assembly (clang, -O0):
<mf_write_tempo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
mov    $0x0,%al
call   1030 <eputc@plt>
mov    $0xff,%edi
mov    $0x0,%al
call   1030 <eputc@plt>
mov    $0x51,%edi
mov    $0x0,%al
call   1030 <eputc@plt>
mov    $0x3,%edi
mov    $0x0,%al
call   1030 <eputc@plt>
mov    -0x8(%rbp),%rax
sar    $0x10,%rax
and    $0xff,%rax
movsbl %al,%edi
mov    $0x0,%al
call   1030 <eputc@plt>
mov    -0x8(%rbp),%rax
sar    $0x8,%rax
and    $0xff,%rax
movsbl %al,%edi
mov    $0x0,%al
call   1030 <eputc@plt>
mov    -0x8(%rbp),%rax
and    $0xff,%rax
movsbl %al,%edi
mov    $0x0,%al
call   1030 <eputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mf_write_tempo>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <eputc@plt>
mov    $0xff,%edi
xor    %eax,%eax
call   1030 <eputc@plt>
mov    $0x51,%edi
xor    %eax,%eax
call   1030 <eputc@plt>
mov    $0x3,%edi
xor    %eax,%eax
call   1030 <eputc@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movsbl %al,%edi
xor    %eax,%eax
call   1030 <eputc@plt>
mov    %ebx,%eax
shr    $0x8,%eax
movsbl %al,%edi
xor    %eax,%eax
call   1030 <eputc@plt>
movsbl %bl,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <eputc@plt>

LLVM IR (-O0):
define void @mf_write_tempo(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 (i32, ...) bitcast (i32 (...)* @eputc to i32 (i32, ...)*)(i32 0)
%4 = call i32 (i32, ...) bitcast (i32 (...)* @eputc to i32 (i32, ...)*)(i32 255)
%5 = call i32 (i32, ...) bitcast (i32 (...)* @eputc to i32 (i32, ...)*)(i32 81)
%6 = call i32 (i32, ...) bitcast (i32 (...)* @eputc to i32 (i32, ...)*)(i32 3)
%7 = load i64, i64* %2
%8 = ashr i64 %7, 16
%9 = and i64 255, %8
%10 = trunc i64 %9 to i8
%11 = sext i8 %10 to i32
%12 = call i32 (i32, ...) bitcast (i32 (...)* @eputc to i32 (i32, ...)*)(i32 %11)
%13 = load i64, i64* %2
%14 = ashr i64 %13, 8
%15 = and i64 255, %14
%16 = trunc i64 %15 to i8
%17 = sext i8 %16 to i32
%18 = call i32 (i32, ...) bitcast (i32 (...)* @eputc to i32 (i32, ...)*)(i32 %17)
%19 = load i64, i64* %2
%20 = and i64 255, %19
%21 = trunc i64 %20 to i8
%22 = sext i8 %21 to i32
%23 = call i32 (i32, ...) bitcast (i32 (...)* @eputc to i32 (i32, ...)*)(i32 %22)
ret void
}

LLVM IR (-O2):
define void @mf_write_tempo(i64 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @eputc to i32 (i32, ...)*)(i32 0)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @eputc to i32 (i32, ...)*)(i32 255)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @eputc to i32 (i32, ...)*)(i32 81)
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @eputc to i32 (i32, ...)*)(i32 3)
%6 = trunc i64 %0 to i32
%7 = shl i32 %6, 8
%8 = ashr i32 %7, 24
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @eputc to i32 (i32, ...)*)(i32 %8)
%10 = shl i32 %6, 16
%11 = ashr i32 %10, 24
%12 = tail call i32 (i32, ...) bitcast (i32 (...)* @eputc to i32 (i32, ...)*)(i32 %11)
%13 = shl i32 %6, 24
%14 = ashr exact i32 %13, 24
%15 = tail call i32 (i32, ...) bitcast (i32 (...)* @eputc to i32 (i32, ...)*)(i32 %14)
ret void
}