txt_timesig(nn, dd, cc, bb) {
  int denom = 1;
  while (dd-- > 0)
    denom *= 2;
  prtime();
  printf("Time signature=%d/%d  MIDI-clocks/click=%d  "
         "32nd-notes/24-MIDI-clocks=%d\n",
         nn, denom, cc, bb);
}


x86 assembly (clang, -O0):
<txt_timesig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jle    115d <txt_timesig+0x3d>
mov    -0x18(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113b <txt_timesig+0x1b>
mov    $0x0,%al
call   1040 <prtime@plt>
mov    -0x8(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<txt_timesig>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %edi,%ebx
test   %esi,%esi
jle    1147 <txt_timesig+0x27>
lea    -0x1(%rsi),%ecx
mov    %esi,%eax
and    $0x7,%eax
cmp    $0x7,%ecx
jae    114e <txt_timesig+0x2e>
mov    $0x1,%ebp
jmp    1168 <txt_timesig+0x48>
mov    $0x1,%ebp
jmp    1177 <txt_timesig+0x57>
and    $0xfffffff8,%esi
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
shl    $0x8,%ebp
add    $0xfffffff8,%esi
jne    1160 <txt_timesig+0x40>
test   %eax,%eax
je     1177 <txt_timesig+0x57>
nopl   0x0(%rax)
add    %ebp,%ebp
add    $0xffffffff,%eax
jne    1170 <txt_timesig+0x50>
xor    %eax,%eax
call   1040 <prtime@plt>
lea    0xe7b(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [74 x i8] c"Time signature=%d/%d MIDI-clocks/click=%d 32nd-notes/24-MIDI-clocks=%d\0A\00"
define i32 @txt_timesig(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 1, i32* %10
br label %11
11: ; preds = %15, %4
%12 = load i32, i32* %7
%13 = add nsw i32 %12, -1
store i32 %13, i32* %7
%14 = icmp sgt i32 %12, 0
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i32, i32* %10
%17 = mul nsw i32 %16, 2
store i32 %17, i32* %10
br label %11
18: ; preds = %11
%19 = call i32 (...) @prtime()
%20 = load i32, i32* %6
%21 = load i32, i32* %10
%22 = load i32, i32* %8
%23 = load i32, i32* %9
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i32 %20, i32 %21, i32 %22, i32 %23)
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
@.str = [74 x i8] c"Time signature=%d/%d MIDI-clocks/click=%d 32nd-notes/24-MIDI-clocks=%d\0A\00"
define i32 @txt_timesig(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %28
6: ; preds = %4
%7 = add i32 %1, -1
%8 = and i32 %1, 7
%9 = icmp ult i32 %7, 7
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = and i32 %1, -8
br label %12
12: ; preds = %12, %10
%13 = phi i32 [ 1, %10 ], [ %15, %12 ]
%14 = phi i32 [ 0, %10 ], [ %16, %12 ]
%15 = shl i32 %13, 8
%16 = add i32 %14, 8
%17 = icmp eq i32 %16, %11
br i1 %17, label %18, label %12
18: ; preds = %12, %6
%19 = phi i32 [ undef, %6 ], [ %15, %12 ]
%20 = phi i32 [ 1, %6 ], [ %15, %12 ]
%21 = icmp eq i32 %8, 0
br i1 %21, label %28, label %22
22: ; preds = %18, %22
%23 = phi i32 [ %25, %22 ], [ %20, %18 ]
%24 = phi i32 [ %26, %22 ], [ 0, %18 ]
%25 = shl nsw i32 %23, 1
%26 = add i32 %24, 1
%27 = icmp eq i32 %26, %8
br i1 %27, label %28, label %22
28: ; preds = %18, %22, %4
%29 = phi i32 [ 1, %4 ], [ %19, %18 ], [ %25, %22 ]
%30 = tail call i32 (...) @prtime()
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %29, i32 %2, i32 %3)
ret i32 undef
}