void cftleaf(int n, int isplt, float *a) {
  void cftmdl1(int n, float *a);
  void cftmdl2(int n, float *a);
  void cftf161(float *a);
  void cftf162(float *a);
  void cftf081(float *a);
  void cftf082(float *a);
  if (n == 512) {
    cftmdl1(128, a);
    cftf161(a);
    cftf162(&a[32]);
    cftf161(&a[64]);
    cftf161(&a[96]);
    cftmdl2(128, &a[128]);
    cftf161(&a[128]);
    cftf162(&a[160]);
    cftf161(&a[192]);
    cftf162(&a[224]);
    cftmdl1(128, &a[256]);
    cftf161(&a[256]);
    cftf162(&a[288]);
    cftf161(&a[320]);
    cftf161(&a[352]);
    if (isplt != 0) {
      cftmdl1(128, &a[384]);
      cftf161(&a[480]);
    } else {
      cftmdl2(128, &a[384]);
      cftf162(&a[480]);
    }
    cftf161(&a[384]);
    cftf162(&a[416]);
    cftf161(&a[448]);
  } else {
    cftmdl1(64, a);
    cftf081(a);
    cftf082(&a[16]);
    cftf081(&a[32]);
    cftf081(&a[48]);
    cftmdl2(64, &a[64]);
    cftf081(&a[64]);
    cftf082(&a[80]);
    cftf081(&a[96]);
    cftf082(&a[112]);
    cftmdl1(64, &a[128]);
    cftf081(&a[128]);
    cftf082(&a[144]);
    cftf081(&a[160]);
    cftf081(&a[176]);
    if (isplt != 0) {
      cftmdl1(64, &a[192]);
      cftf081(&a[240]);
    } else {
      cftmdl2(64, &a[192]);
      cftf082(&a[240]);
    }
    cftf081(&a[192]);
    cftf082(&a[208]);
    cftf081(&a[224]);
  }
}


x86 assembly (clang, -O0):
<cftleaf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
cmpl   $0x200,-0x4(%rbp)
jne    12fe <cftleaf+0x19e>
mov    -0x10(%rbp),%rsi
mov    $0x80,%edi
call   1060 <cftmdl1@plt>
mov    -0x10(%rbp),%rdi
call   1040 <cftf161@plt>
mov    -0x10(%rbp),%rdi
add    $0x80,%rdi
call   1070 <cftf162@plt>
mov    -0x10(%rbp),%rdi
add    $0x100,%rdi
call   1040 <cftf161@plt>
mov    -0x10(%rbp),%rdi
add    $0x180,%rdi
call   1040 <cftf161@plt>
mov    -0x10(%rbp),%rsi
add    $0x200,%rsi
mov    $0x80,%edi
call   1030 <cftmdl2@plt>
mov    -0x10(%rbp),%rdi
add    $0x200,%rdi
call   1040 <cftf161@plt>
mov    -0x10(%rbp),%rdi
add    $0x280,%rdi
call   1070 <cftf162@plt>
mov    -0x10(%rbp),%rdi
add    $0x300,%rdi
call   1040 <cftf161@plt>
mov    -0x10(%rbp),%rdi
add    $0x380,%rdi
call   1070 <cftf162@plt>
mov    -0x10(%rbp),%rsi
add    $0x400,%rsi
mov    $0x80,%edi
call   1060 <cftmdl1@plt>
mov    -0x10(%rbp),%rdi
add    $0x400,%rdi
call   1040 <cftf161@plt>
mov    -0x10(%rbp),%rdi
add    $0x480,%rdi
call   1070 <cftf162@plt>
mov    -0x10(%rbp),%rdi
add    $0x500,%rdi
call   1040 <cftf161@plt>
mov    -0x10(%rbp),%rdi
add    $0x580,%rdi
call   1040 <cftf161@plt>
cmpl   $0x0,-0x8(%rbp)
je     12a4 <cftleaf+0x144>
mov    -0x10(%rbp),%rsi
add    $0x600,%rsi
mov    $0x80,%edi
call   1060 <cftmdl1@plt>
mov    -0x10(%rbp),%rdi
add    $0x780,%rdi
call   1040 <cftf161@plt>
jmp    12c9 <cftleaf+0x169>
mov    -0x10(%rbp),%rsi
add    $0x600,%rsi
mov    $0x80,%edi
call   1030 <cftmdl2@plt>
mov    -0x10(%rbp),%rdi
add    $0x780,%rdi
call   1070 <cftf162@plt>
mov    -0x10(%rbp),%rdi
add    $0x600,%rdi
call   1040 <cftf161@plt>
mov    -0x10(%rbp),%rdi
add    $0x680,%rdi
call   1070 <cftf162@plt>
mov    -0x10(%rbp),%rdi
add    $0x700,%rdi
call   1040 <cftf161@plt>
jmp    1475 <cftleaf+0x315>
mov    -0x10(%rbp),%rsi
mov    $0x40,%edi
call   1060 <cftmdl1@plt>
mov    -0x10(%rbp),%rdi
call   1050 <cftf081@plt>
mov    -0x10(%rbp),%rdi
add    $0x40,%rdi
call   1080 <cftf082@plt>
mov    -0x10(%rbp),%rdi
add    $0x80,%rdi
call   1050 <cftf081@plt>
mov    -0x10(%rbp),%rdi
add    $0xc0,%rdi
call   1050 <cftf081@plt>
mov    -0x10(%rbp),%rsi
add    $0x100,%rsi
mov    $0x40,%edi
call   1030 <cftmdl2@plt>
mov    -0x10(%rbp),%rdi
add    $0x100,%rdi
call   1050 <cftf081@plt>
mov    -0x10(%rbp),%rdi
add    $0x140,%rdi
call   1080 <cftf082@plt>
mov    -0x10(%rbp),%rdi
add    $0x180,%rdi
call   1050 <cftf081@plt>
mov    -0x10(%rbp),%rdi
add    $0x1c0,%rdi
call   1080 <cftf082@plt>
mov    -0x10(%rbp),%rsi
add    $0x200,%rsi
mov    $0x40,%edi
call   1060 <cftmdl1@plt>
mov    -0x10(%rbp),%rdi
add    $0x200,%rdi
call   1050 <cftf081@plt>
mov    -0x10(%rbp),%rdi
add    $0x240,%rdi
call   1080 <cftf082@plt>
mov    -0x10(%rbp),%rdi
add    $0x280,%rdi
call   1050 <cftf081@plt>
mov    -0x10(%rbp),%rdi
add    $0x2c0,%rdi
call   1050 <cftf081@plt>
cmpl   $0x0,-0x8(%rbp)
je     1420 <cftleaf+0x2c0>
mov    -0x10(%rbp),%rsi
add    $0x300,%rsi
mov    $0x40,%edi
call   1060 <cftmdl1@plt>
mov    -0x10(%rbp),%rdi
add    $0x3c0,%rdi
call   1050 <cftf081@plt>
jmp    1445 <cftleaf+0x2e5>
mov    -0x10(%rbp),%rsi
add    $0x300,%rsi
mov    $0x40,%edi
call   1030 <cftmdl2@plt>
mov    -0x10(%rbp),%rdi
add    $0x3c0,%rdi
call   1080 <cftf082@plt>
mov    -0x10(%rbp),%rdi
add    $0x300,%rdi
call   1050 <cftf081@plt>
mov    -0x10(%rbp),%rdi
add    $0x340,%rdi
call   1080 <cftf082@plt>
mov    -0x10(%rbp),%rdi
add    $0x380,%rdi
call   1050 <cftf081@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cftleaf>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%r14d
cmp    $0x200,%edi
jne    125d <cftleaf+0xfd>
mov    $0x80,%edi
mov    %rbx,%rsi
call   1060 <cftmdl1@plt>
mov    %rbx,%rdi
call   1040 <cftf161@plt>
lea    0x80(%rbx),%rdi
call   1070 <cftf162@plt>
lea    0x100(%rbx),%rdi
call   1040 <cftf161@plt>
lea    0x180(%rbx),%rdi
call   1040 <cftf161@plt>
lea    0x200(%rbx),%rbp
mov    $0x80,%edi
mov    %rbp,%rsi
call   1030 <cftmdl2@plt>
mov    %rbp,%rdi
call   1040 <cftf161@plt>
lea    0x280(%rbx),%rdi
call   1070 <cftf162@plt>
lea    0x300(%rbx),%rdi
call   1040 <cftf161@plt>
lea    0x380(%rbx),%rdi
call   1070 <cftf162@plt>
lea    0x400(%rbx),%rbp
mov    $0x80,%edi
mov    %rbp,%rsi
call   1060 <cftmdl1@plt>
mov    %rbp,%rdi
call   1040 <cftf161@plt>
lea    0x480(%rbx),%rdi
call   1070 <cftf162@plt>
lea    0x500(%rbx),%rdi
call   1040 <cftf161@plt>
lea    0x580(%rbx),%rdi
call   1040 <cftf161@plt>
lea    0x600(%rbx),%rbp
mov    $0x80,%edi
mov    %rbp,%rsi
test   %r14d,%r14d
je     133a <cftleaf+0x1da>
call   1060 <cftmdl1@plt>
lea    0x780(%rbx),%rdi
call   1040 <cftf161@plt>
jmp    134b <cftleaf+0x1eb>
mov    $0x40,%edi
mov    %rbx,%rsi
call   1060 <cftmdl1@plt>
mov    %rbx,%rdi
call   1050 <cftf081@plt>
lea    0x40(%rbx),%rdi
call   1080 <cftf082@plt>
lea    0x80(%rbx),%rdi
call   1050 <cftf081@plt>
lea    0xc0(%rbx),%rdi
call   1050 <cftf081@plt>
lea    0x100(%rbx),%rbp
mov    $0x40,%edi
mov    %rbp,%rsi
call   1030 <cftmdl2@plt>
mov    %rbp,%rdi
call   1050 <cftf081@plt>
lea    0x140(%rbx),%rdi
call   1080 <cftf082@plt>
lea    0x180(%rbx),%rdi
call   1050 <cftf081@plt>
lea    0x1c0(%rbx),%rdi
call   1080 <cftf082@plt>
lea    0x200(%rbx),%rbp
mov    $0x40,%edi
mov    %rbp,%rsi
call   1060 <cftmdl1@plt>
mov    %rbp,%rdi
call   1050 <cftf081@plt>
lea    0x240(%rbx),%rdi
call   1080 <cftf082@plt>
lea    0x280(%rbx),%rdi
call   1050 <cftf081@plt>
lea    0x2c0(%rbx),%rdi
call   1050 <cftf081@plt>
lea    0x300(%rbx),%rbp
mov    $0x40,%edi
mov    %rbp,%rsi
test   %r14d,%r14d
je     1372 <cftleaf+0x212>
call   1060 <cftmdl1@plt>
lea    0x3c0(%rbx),%rdi
call   1050 <cftf081@plt>
jmp    1383 <cftleaf+0x223>
call   1030 <cftmdl2@plt>
lea    0x780(%rbx),%rdi
call   1070 <cftf162@plt>
mov    %rbp,%rdi
call   1040 <cftf161@plt>
lea    0x680(%rbx),%rdi
call   1070 <cftf162@plt>
add    $0x700,%rbx
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <cftf161@plt>
call   1030 <cftmdl2@plt>
lea    0x3c0(%rbx),%rdi
call   1080 <cftf082@plt>
mov    %rbp,%rdi
call   1050 <cftf081@plt>
lea    0x340(%rbx),%rdi
call   1080 <cftf082@plt>
add    $0x380,%rbx
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <cftf081@plt>

LLVM IR (-O0):
define void @cftleaf(i32 %0, i32 %1, float* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float*
store i32 %0, i32* %4
store i32 %1, i32* %5
store float* %2, float** %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 512
br i1 %8, label %9, label %57
9: ; preds = %3
%10 = load float*, float** %6
%11 = load float*, float** %6
%12 = load float*, float** %6
%13 = getelementptr inbounds float, float* %12, i64 32
%14 = load float*, float** %6
%15 = getelementptr inbounds float, float* %14, i64 64
%16 = load float*, float** %6
%17 = getelementptr inbounds float, float* %16, i64 96
%18 = load float*, float** %6
%19 = getelementptr inbounds float, float* %18, i64 128
%20 = load float*, float** %6
%21 = getelementptr inbounds float, float* %20, i64 128
%22 = load float*, float** %6
%23 = getelementptr inbounds float, float* %22, i64 160
%24 = load float*, float** %6
%25 = getelementptr inbounds float, float* %24, i64 192
%26 = load float*, float** %6
%27 = getelementptr inbounds float, float* %26, i64 224
%28 = load float*, float** %6
%29 = getelementptr inbounds float, float* %28, i64 256
%30 = load float*, float** %6
%31 = getelementptr inbounds float, float* %30, i64 256
%32 = load float*, float** %6
%33 = getelementptr inbounds float, float* %32, i64 288
%34 = load float*, float** %6
%35 = getelementptr inbounds float, float* %34, i64 320
%36 = load float*, float** %6
%37 = getelementptr inbounds float, float* %36, i64 352
%38 = load i32, i32* %5
%39 = icmp ne i32 %38, 0
br i1 %39, label %40, label %45
40: ; preds = %9
%41 = load float*, float** %6
%42 = getelementptr inbounds float, float* %41, i64 384
%43 = load float*, float** %6
%44 = getelementptr inbounds float, float* %43, i64 480
br label %50
45: ; preds = %9
%46 = load float*, float** %6
%47 = getelementptr inbounds float, float* %46, i64 384
%48 = load float*, float** %6
%49 = getelementptr inbounds float, float* %48, i64 480
br label %50
50: ; preds = %45, %40
%51 = load float*, float** %6
%52 = getelementptr inbounds float, float* %51, i64 384
%53 = load float*, float** %6
%54 = getelementptr inbounds float, float* %53, i64 416
%55 = load float*, float** %6
%56 = getelementptr inbounds float, float* %55, i64 448
br label %105
57: ; preds = %3
%58 = load float*, float** %6
%59 = load float*, float** %6
%60 = load float*, float** %6
%61 = getelementptr inbounds float, float* %60, i64 16
%62 = load float*, float** %6
%63 = getelementptr inbounds float, float* %62, i64 32
%64 = load float*, float** %6
%65 = getelementptr inbounds float, float* %64, i64 48
%66 = load float*, float** %6
%67 = getelementptr inbounds float, float* %66, i64 64
%68 = load float*, float** %6
%69 = getelementptr inbounds float, float* %68, i64 64
%70 = load float*, float** %6
%71 = getelementptr inbounds float, float* %70, i64 80
%72 = load float*, float** %6
%73 = getelementptr inbounds float, float* %72, i64 96
%74 = load float*, float** %6
%75 = getelementptr inbounds float, float* %74, i64 112
%76 = load float*, float** %6
%77 = getelementptr inbounds float, float* %76, i64 128
%78 = load float*, float** %6
%79 = getelementptr inbounds float, float* %78, i64 128
%80 = load float*, float** %6
%81 = getelementptr inbounds float, float* %80, i64 144
%82 = load float*, float** %6
%83 = getelementptr inbounds float, float* %82, i64 160
%84 = load float*, float** %6
%85 = getelementptr inbounds float, float* %84, i64 176
%86 = load i32, i32* %5
%87 = icmp ne i32 %86, 0
br i1 %87, label %88, label %93
88: ; preds = %57
%89 = load float*, float** %6
%90 = getelementptr inbounds float, float* %89, i64 192
%91 = load float*, float** %6
%92 = getelementptr inbounds float, float* %91, i64 240
br label %98
93: ; preds = %57
%94 = load float*, float** %6
%95 = getelementptr inbounds float, float* %94, i64 192
%96 = load float*, float** %6
%97 = getelementptr inbounds float, float* %96, i64 240
br label %98
98: ; preds = %93, %88
%99 = load float*, float** %6
%100 = getelementptr inbounds float, float* %99, i64 192
%101 = load float*, float** %6
%102 = getelementptr inbounds float, float* %101, i64 208
%103 = load float*, float** %6
%104 = getelementptr inbounds float, float* %103, i64 224
br label %105
105: ; preds = %98, %50
ret void
}

LLVM IR (-O2):
define void @cftleaf(i32 %0, i32 %1, float* %2) {
%4 = icmp eq i32 %0, 512
br i1 %4, label %5, label %27
5: ; preds = %3
tail call void @cftmdl1(i32 128, float* %2)
tail call void @cftf161(float* %2)
%6 = getelementptr inbounds float, float* %2, i64 32
tail call void @cftf162(float* %6)
%7 = getelementptr inbounds float, float* %2, i64 64
tail call void @cftf161(float* %7)
%8 = getelementptr inbounds float, float* %2, i64 96
tail call void @cftf161(float* %8)
%9 = getelementptr inbounds float, float* %2, i64 128
tail call void @cftmdl2(i32 128, float* %9)
tail call void @cftf161(float* %9)
%10 = getelementptr inbounds float, float* %2, i64 160
tail call void @cftf162(float* %10)
%11 = getelementptr inbounds float, float* %2, i64 192
tail call void @cftf161(float* %11)
%12 = getelementptr inbounds float, float* %2, i64 224
tail call void @cftf162(float* %12)
%13 = getelementptr inbounds float, float* %2, i64 256
tail call void @cftmdl1(i32 128, float* %13)
tail call void @cftf161(float* %13)
%14 = getelementptr inbounds float, float* %2, i64 288
tail call void @cftf162(float* %14)
%15 = getelementptr inbounds float, float* %2, i64 320
tail call void @cftf161(float* %15)
%16 = getelementptr inbounds float, float* %2, i64 352
tail call void @cftf161(float* %16)
%17 = icmp eq i32 %1, 0
%18 = getelementptr inbounds float, float* %2, i64 384
br i1 %17, label %21, label %19
19: ; preds = %5
tail call void @cftmdl1(i32 128, float* %18)
%20 = getelementptr inbounds float, float* %2, i64 480
tail call void @cftf161(float* %20)
br label %23
21: ; preds = %5
tail call void @cftmdl2(i32 128, float* %18)
%22 = getelementptr inbounds float, float* %2, i64 480
tail call void @cftf162(float* %22)
br label %23
23: ; preds = %21, %19
%24 = getelementptr inbounds float, float* %2, i64 384
tail call void @cftf161(float* %24)
%25 = getelementptr inbounds float, float* %2, i64 416
tail call void @cftf162(float* %25)
%26 = getelementptr inbounds float, float* %2, i64 448
tail call void @cftf161(float* %26)
br label %49
27: ; preds = %3
tail call void @cftmdl1(i32 64, float* %2)
tail call void @cftf081(float* %2)
%28 = getelementptr inbounds float, float* %2, i64 16
tail call void @cftf082(float* %28)
%29 = getelementptr inbounds float, float* %2, i64 32
tail call void @cftf081(float* %29)
%30 = getelementptr inbounds float, float* %2, i64 48
tail call void @cftf081(float* %30)
%31 = getelementptr inbounds float, float* %2, i64 64
tail call void @cftmdl2(i32 64, float* %31)
tail call void @cftf081(float* %31)
%32 = getelementptr inbounds float, float* %2, i64 80
tail call void @cftf082(float* %32)
%33 = getelementptr inbounds float, float* %2, i64 96
tail call void @cftf081(float* %33)
%34 = getelementptr inbounds float, float* %2, i64 112
tail call void @cftf082(float* %34)
%35 = getelementptr inbounds float, float* %2, i64 128
tail call void @cftmdl1(i32 64, float* %35)
tail call void @cftf081(float* %35)
%36 = getelementptr inbounds float, float* %2, i64 144
tail call void @cftf082(float* %36)
%37 = getelementptr inbounds float, float* %2, i64 160
tail call void @cftf081(float* %37)
%38 = getelementptr inbounds float, float* %2, i64 176
tail call void @cftf081(float* %38)
%39 = icmp eq i32 %1, 0
%40 = getelementptr inbounds float, float* %2, i64 192
br i1 %39, label %43, label %41
41: ; preds = %27
tail call void @cftmdl1(i32 64, float* %40)
%42 = getelementptr inbounds float, float* %2, i64 240
tail call void @cftf081(float* %42)
br label %45
43: ; preds = %27
tail call void @cftmdl2(i32 64, float* %40)
%44 = getelementptr inbounds float, float* %2, i64 240
tail call void @cftf082(float* %44)
br label %45
45: ; preds = %43, %41
%46 = getelementptr inbounds float, float* %2, i64 192
tail call void @cftf081(float* %46)
%47 = getelementptr inbounds float, float* %2, i64 208
tail call void @cftf082(float* %47)
%48 = getelementptr inbounds float, float* %2, i64 224
tail call void @cftf081(float* %48)
br label %49
49: ; preds = %45, %23
ret void
}