SP_CASE(imacro, imetamacro_if_eq) {
  int total = __ii_idx_i(0, 10, 100) + __ii_idx_i(1, 10, 200) +
              __ii_idx_i(2, 10, 300) + __ii_idx_i(3, 10, 400) +
              __ii_idx_i(4, 10, 500);
  SP_TRUE(total == 1560);
}


x86 assembly (clang, -O0):
<SP_CASE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %edi,%edi
mov    $0xa,%esi
mov    $0x64,%edx
mov    $0x0,%al
call   1040 <__ii_idx_i@plt>
mov    %eax,-0x20(%rbp)
mov    $0x1,%edi
mov    $0xa,%esi
mov    $0xc8,%edx
mov    $0x0,%al
call   1040 <__ii_idx_i@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x2,%edi
mov    $0xa,%esi
mov    $0x12c,%edx
mov    $0x0,%al
call   1040 <__ii_idx_i@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    $0x3,%edi
mov    $0xa,%esi
mov    $0x190,%edx
mov    $0x0,%al
call   1040 <__ii_idx_i@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    $0x4,%edi
mov    $0xa,%esi
mov    $0x1f4,%edx
mov    $0x0,%al
call   1040 <__ii_idx_i@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x618,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <SP_TRUE@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SP_CASE>:
push   %rbp
push   %rbx
push   %rax
xor    %edi,%edi
mov    $0xa,%esi
mov    $0x64,%edx
xor    %eax,%eax
call   1040 <__ii_idx_i@plt>
mov    %eax,%ebx
mov    $0x1,%edi
mov    $0xa,%esi
mov    $0xc8,%edx
xor    %eax,%eax
call   1040 <__ii_idx_i@plt>
mov    %eax,%ebp
add    %ebx,%ebp
mov    $0x2,%edi
mov    $0xa,%esi
mov    $0x12c,%edx
xor    %eax,%eax
call   1040 <__ii_idx_i@plt>
mov    %eax,%ebx
add    %ebp,%ebx
mov    $0x3,%edi
mov    $0xa,%esi
mov    $0x190,%edx
xor    %eax,%eax
call   1040 <__ii_idx_i@plt>
mov    %eax,%ebp
add    %ebx,%ebp
mov    $0x4,%edi
mov    $0xa,%esi
mov    $0x1f4,%edx
xor    %eax,%eax
call   1040 <__ii_idx_i@plt>
add    %ebp,%eax
xor    %edi,%edi
cmp    $0x618,%eax
sete   %dil
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <SP_TRUE@plt>

LLVM IR (-O0):
define i32 @SP_CASE(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @__ii_idx_i to i32 (i32, i32, i32, ...)*)(i32 0, i32 10, i32 100)
%8 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @__ii_idx_i to i32 (i32, i32, i32, ...)*)(i32 1, i32 10, i32 200)
%9 = add nsw i32 %7, %8
%10 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @__ii_idx_i to i32 (i32, i32, i32, ...)*)(i32 2, i32 10, i32 300)
%11 = add nsw i32 %9, %10
%12 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @__ii_idx_i to i32 (i32, i32, i32, ...)*)(i32 3, i32 10, i32 400)
%13 = add nsw i32 %11, %12
%14 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @__ii_idx_i to i32 (i32, i32, i32, ...)*)(i32 4, i32 10, i32 500)
%15 = add nsw i32 %13, %14
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = icmp eq i32 %16, 1560
%18 = zext i1 %17 to i32
%19 = call i32 (i32, ...) bitcast (i32 (...)* @SP_TRUE to i32 (i32, ...)*)(i32 %18)
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @SP_CASE(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @__ii_idx_i to i32 (i32, i32, i32, ...)*)(i32 0, i32 10, i32 100)
%4 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @__ii_idx_i to i32 (i32, i32, i32, ...)*)(i32 1, i32 10, i32 200)
%5 = add nsw i32 %4, %3
%6 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @__ii_idx_i to i32 (i32, i32, i32, ...)*)(i32 2, i32 10, i32 300)
%7 = add nsw i32 %5, %6
%8 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @__ii_idx_i to i32 (i32, i32, i32, ...)*)(i32 3, i32 10, i32 400)
%9 = add nsw i32 %7, %8
%10 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @__ii_idx_i to i32 (i32, i32, i32, ...)*)(i32 4, i32 10, i32 500)
%11 = add nsw i32 %9, %10
%12 = icmp eq i32 %11, 1560
%13 = zext i1 %12 to i32
%14 = tail call i32 (i32, ...) bitcast (i32 (...)* @SP_TRUE to i32 (i32, ...)*)(i32 %13)
ret i32 undef
}