struct block *gen_msg_abbrev(type)
int type;
{
  struct block *b1;
  switch (type) {
  case 41:
    b1 = gen_atmfield_code(54, 0x05, 0x10, 0);
    break;
  case 42:
    b1 = gen_atmfield_code(54, 0x02, 0x10, 0);
    break;
  case 43:
    b1 = gen_atmfield_code(54, 0x07, 0x10, 0);
    break;
  case 44:
    b1 = gen_atmfield_code(54, 0x0f, 0x10, 0);
    break;
  case 45:
    b1 = gen_atmfield_code(54, 0x4d, 0x10, 0);
    break;
  case 46:
    b1 = gen_atmfield_code(54, 0x5a, 0x10, 0);
    break;
  default:
    abort();
  }
  return b1;
}


x86 assembly (clang, -O0):
<gen_msg_abbrev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffd7,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x5,%eax
ja     1226 <gen_msg_abbrev+0x106>
mov    -0x18(%rbp),%rax
lea    0xeb5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x36,%edi
mov    $0x5,%esi
mov    $0x10,%edx
xor    %ecx,%ecx
mov    $0x0,%al
call   1040 <gen_atmfield_code@plt>
cltq
mov    %rax,-0x10(%rbp)
jmp    122b <gen_msg_abbrev+0x10b>
mov    $0x36,%edi
mov    $0x2,%esi
mov    $0x10,%edx
xor    %ecx,%ecx
mov    $0x0,%al
call   1040 <gen_atmfield_code@plt>
cltq
mov    %rax,-0x10(%rbp)
jmp    122b <gen_msg_abbrev+0x10b>
mov    $0x36,%edi
mov    $0x7,%esi
mov    $0x10,%edx
xor    %ecx,%ecx
mov    $0x0,%al
call   1040 <gen_atmfield_code@plt>
cltq
mov    %rax,-0x10(%rbp)
jmp    122b <gen_msg_abbrev+0x10b>
mov    $0x36,%edi
mov    $0xf,%esi
mov    $0x10,%edx
xor    %ecx,%ecx
mov    $0x0,%al
call   1040 <gen_atmfield_code@plt>
cltq
mov    %rax,-0x10(%rbp)
jmp    122b <gen_msg_abbrev+0x10b>
mov    $0x36,%edi
mov    $0x4d,%esi
mov    $0x10,%edx
xor    %ecx,%ecx
mov    $0x0,%al
call   1040 <gen_atmfield_code@plt>
cltq
mov    %rax,-0x10(%rbp)
jmp    122b <gen_msg_abbrev+0x10b>
mov    $0x36,%edi
mov    $0x5a,%esi
mov    $0x10,%edx
xor    %ecx,%ecx
mov    $0x0,%al
call   1040 <gen_atmfield_code@plt>
cltq
mov    %rax,-0x10(%rbp)
jmp    122b <gen_msg_abbrev+0x10b>
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_msg_abbrev>:
push   %rax
add    $0xffffffd7,%edi
cmp    $0x6,%edi
jae    114d <gen_msg_abbrev+0x2d>
movslq %edi,%rax
lea    0xecd(%rip),%rcx
mov    (%rcx,%rax,4),%esi
mov    $0x36,%edi
mov    $0x10,%edx
xor    %ecx,%ecx
xor    %eax,%eax
call   1040 <gen_atmfield_code@plt>
cltq
pop    %rcx
ret
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.block = type opaque
define %struct.block* @gen_msg_abbrev(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.block*
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %29 [
i32 41, label %5
i32 42, label %9
i32 43, label %13
i32 44, label %17
i32 45, label %21
i32 46, label %25
]
5: ; preds = %1
%6 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @gen_atmfield_code to i32 (i32, i32, i32, i32, ...)*)(i32 54, i32 5, i32 16, i32 0)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to %struct.block*
store %struct.block* %8, %struct.block** %3
br label %30
9: ; preds = %1
%10 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @gen_atmfield_code to i32 (i32, i32, i32, i32, ...)*)(i32 54, i32 2, i32 16, i32 0)
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to %struct.block*
store %struct.block* %12, %struct.block** %3
br label %30
13: ; preds = %1
%14 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @gen_atmfield_code to i32 (i32, i32, i32, i32, ...)*)(i32 54, i32 7, i32 16, i32 0)
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to %struct.block*
store %struct.block* %16, %struct.block** %3
br label %30
17: ; preds = %1
%18 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @gen_atmfield_code to i32 (i32, i32, i32, i32, ...)*)(i32 54, i32 15, i32 16, i32 0)
%19 = sext i32 %18 to i64
%20 = inttoptr i64 %19 to %struct.block*
store %struct.block* %20, %struct.block** %3
br label %30
21: ; preds = %1
%22 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @gen_atmfield_code to i32 (i32, i32, i32, i32, ...)*)(i32 54, i32 77, i32 16, i32 0)
%23 = sext i32 %22 to i64
%24 = inttoptr i64 %23 to %struct.block*
store %struct.block* %24, %struct.block** %3
br label %30
25: ; preds = %1
%26 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @gen_atmfield_code to i32 (i32, i32, i32, i32, ...)*)(i32 54, i32 90, i32 16, i32 0)
%27 = sext i32 %26 to i64
%28 = inttoptr i64 %27 to %struct.block*
store %struct.block* %28, %struct.block** %3
br label %30
29: ; preds = %1
unreachable
30: ; preds = %25, %21, %17, %13, %9, %5
%31 = load %struct.block*, %struct.block** %3
ret %struct.block* %31
}

LLVM IR (-O2):
%struct.block = type opaque
@switch.table.gen_msg_abbrev = [6 x i32] [i32 5, i32 2, i32 7, i32 15, i32 77, i32 90]
define %struct.block* @gen_msg_abbrev(i32 %0) {
%2 = add i32 %0, -41
%3 = icmp ult i32 %2, 6
br i1 %3, label %5, label %4
4: ; preds = %1
tail call void @abort()
unreachable
5: ; preds = %1
%6 = sext i32 %2 to i64
%7 = getelementptr inbounds [6 x i32], [6 x i32]* @switch.table.gen_msg_abbrev, i64 0, i64 %6
%8 = load i32, i32* %7
%9 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @gen_atmfield_code to i32 (i32, i32, i32, i32, ...)*)(i32 54, i32 %8, i32 16, i32 0)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to %struct.block*
ret %struct.block* %11
}