#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ malloc(int);
int *getNumbers(int number) {
  int *nums = (int *)malloc(2 * sizeof(int));
  switch (number) {
  case 0:
    nums[0] = 0xA1;
    nums[1] = 0x86;
    break;
  case 1:
    nums[0] = 0x80;
    nums[1] = 0x02;
    break;
  case 2:
    nums[0] = 0x31;
    nums[1] = 0x0E;
    break;
  case 3:
    nums[0] = 0xB0;
    nums[1] = 0x0E;
    break;
  case 4:
    nums[0] = 0x90;
    nums[1] = 0x8A;
    break;
  case 5:
    nums[0] = 0xB0;
    nums[1] = 0x8C;
    break;
  case 6:
    nums[0] = 0xB1;
    nums[1] = 0x8C;
    break;
  case 7:
    nums[0] = 0x80;
    nums[1] = 0x06;
    break;
  case 8:
    nums[0] = 0xB1;
    nums[1] = 0x8E;
    break;
  case 9:
    nums[0] = 0x90;
    nums[1] = 0x8E;
    break;
  default:
    nums[0] = 0xA1;
    nums[1] = 0x86;
  }
  return nums;
}


x86 assembly (clang, -O0):
<getNumbers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x9,%rax
ja     1252 <getNumbers+0x142>
mov    -0x18(%rbp),%rax
lea    0xebb(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
movl   $0xa1,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x86,0x4(%rax)
jmp    1267 <getNumbers+0x157>
mov    -0x10(%rbp),%rax
movl   $0x80,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x2,0x4(%rax)
jmp    1267 <getNumbers+0x157>
mov    -0x10(%rbp),%rax
movl   $0x31,(%rax)
mov    -0x10(%rbp),%rax
movl   $0xe,0x4(%rax)
jmp    1267 <getNumbers+0x157>
mov    -0x10(%rbp),%rax
movl   $0xb0,(%rax)
mov    -0x10(%rbp),%rax
movl   $0xe,0x4(%rax)
jmp    1267 <getNumbers+0x157>
mov    -0x10(%rbp),%rax
movl   $0x90,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x8a,0x4(%rax)
jmp    1267 <getNumbers+0x157>
mov    -0x10(%rbp),%rax
movl   $0xb0,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x8c,0x4(%rax)
jmp    1267 <getNumbers+0x157>
mov    -0x10(%rbp),%rax
movl   $0xb1,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x8c,0x4(%rax)
jmp    1267 <getNumbers+0x157>
mov    -0x10(%rbp),%rax
movl   $0x80,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x6,0x4(%rax)
jmp    1267 <getNumbers+0x157>
mov    -0x10(%rbp),%rax
movl   $0xb1,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x8e,0x4(%rax)
jmp    1267 <getNumbers+0x157>
mov    -0x10(%rbp),%rax
movl   $0x90,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x8e,0x4(%rax)
jmp    1267 <getNumbers+0x157>
mov    -0x10(%rbp),%rax
movl   $0xa1,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x86,0x4(%rax)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNumbers>:
push   %rbx
mov    %edi,%ebx
mov    $0x8,%edi
call   1030 <malloc@plt>
add    $0xffffffff,%ebx
cmp    $0x8,%ebx
ja     113e <getNumbers+0x2e>
movslq %ebx,%rdx
lea    0xed1(%rip),%rcx
mov    (%rcx,%rdx,4),%ecx
lea    0xeeb(%rip),%rsi
mov    (%rsi,%rdx,4),%edx
jmp    1148 <getNumbers+0x38>
mov    $0x86,%edx
mov    $0xa1,%ecx
mov    %ecx,(%rax)
mov    %edx,0x4(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define i32* @getNumbers(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = call i64 @malloc(i32 8)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %3
%6 = load i32, i32* %2
switch i32 %6, label %57 [
i32 0, label %7
i32 1, label %12
i32 2, label %17
i32 3, label %22
i32 4, label %27
i32 5, label %32
i32 6, label %37
i32 7, label %42
i32 8, label %47
i32 9, label %52
]
7: ; preds = %1
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 161, i32* %9
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 1
store i32 134, i32* %11
br label %62
12: ; preds = %1
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 0
store i32 128, i32* %14
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 2, i32* %16
br label %62
17: ; preds = %1
%18 = load i32*, i32** %3
%19 = getelementptr inbounds i32, i32* %18, i64 0
store i32 49, i32* %19
%20 = load i32*, i32** %3
%21 = getelementptr inbounds i32, i32* %20, i64 1
store i32 14, i32* %21
br label %62
22: ; preds = %1
%23 = load i32*, i32** %3
%24 = getelementptr inbounds i32, i32* %23, i64 0
store i32 176, i32* %24
%25 = load i32*, i32** %3
%26 = getelementptr inbounds i32, i32* %25, i64 1
store i32 14, i32* %26
br label %62
27: ; preds = %1
%28 = load i32*, i32** %3
%29 = getelementptr inbounds i32, i32* %28, i64 0
store i32 144, i32* %29
%30 = load i32*, i32** %3
%31 = getelementptr inbounds i32, i32* %30, i64 1
store i32 138, i32* %31
br label %62
32: ; preds = %1
%33 = load i32*, i32** %3
%34 = getelementptr inbounds i32, i32* %33, i64 0
store i32 176, i32* %34
%35 = load i32*, i32** %3
%36 = getelementptr inbounds i32, i32* %35, i64 1
store i32 140, i32* %36
br label %62
37: ; preds = %1
%38 = load i32*, i32** %3
%39 = getelementptr inbounds i32, i32* %38, i64 0
store i32 177, i32* %39
%40 = load i32*, i32** %3
%41 = getelementptr inbounds i32, i32* %40, i64 1
store i32 140, i32* %41
br label %62
42: ; preds = %1
%43 = load i32*, i32** %3
%44 = getelementptr inbounds i32, i32* %43, i64 0
store i32 128, i32* %44
%45 = load i32*, i32** %3
%46 = getelementptr inbounds i32, i32* %45, i64 1
store i32 6, i32* %46
br label %62
47: ; preds = %1
%48 = load i32*, i32** %3
%49 = getelementptr inbounds i32, i32* %48, i64 0
store i32 177, i32* %49
%50 = load i32*, i32** %3
%51 = getelementptr inbounds i32, i32* %50, i64 1
store i32 142, i32* %51
br label %62
52: ; preds = %1
%53 = load i32*, i32** %3
%54 = getelementptr inbounds i32, i32* %53, i64 0
store i32 144, i32* %54
%55 = load i32*, i32** %3
%56 = getelementptr inbounds i32, i32* %55, i64 1
store i32 142, i32* %56
br label %62
57: ; preds = %1
%58 = load i32*, i32** %3
%59 = getelementptr inbounds i32, i32* %58, i64 0
store i32 161, i32* %59
%60 = load i32*, i32** %3
%61 = getelementptr inbounds i32, i32* %60, i64 1
store i32 134, i32* %61
br label %62
62: ; preds = %57, %52, %47, %42, %37, %32, %27, %22, %17, %12, %7
%63 = load i32*, i32** %3
ret i32* %63
}

LLVM IR (-O2):
@switch.table.getNumbers = [9 x i32] [i32 128, i32 49, i32 176, i32 144, i32 176, i32 177, i32 128, i32 177, i32 144]
@switch.table.getNumbers.1 = [9 x i32] [i32 2, i32 14, i32 14, i32 138, i32 140, i32 140, i32 6, i32 142, i32 142]
define i32* @getNumbers(i32 %0) {
%2 = tail call i64 @malloc(i32 8)
%3 = inttoptr i64 %2 to i32*
%4 = add i32 %0, -1
%5 = icmp ult i32 %4, 9
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds [9 x i32], [9 x i32]* @switch.table.getNumbers, i64 0, i64 %7
%9 = load i32, i32* %8
%10 = sext i32 %4 to i64
%11 = getelementptr inbounds [9 x i32], [9 x i32]* @switch.table.getNumbers.1, i64 0, i64 %10
%12 = load i32, i32* %11
br label %13
13: ; preds = %6, %1
%14 = phi i32 [ 161, %1 ], [ %9, %6 ]
%15 = phi i32 [ 134, %1 ], [ %12, %6 ]
store i32 %14, i32* %3
%16 = getelementptr inbounds i32, i32* %3, i64 1
store i32 %15, i32* %16
ret i32* %3
}