#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 */
typedef int /*<<< orphan*/ speed_t;

/* Variables and functions */
int /*<<< orphan*/ B1000000;
int /*<<< orphan*/ B110;
int /*<<< orphan*/ B115200;
int /*<<< orphan*/ B1152000;
int /*<<< orphan*/ B1200;
int /*<<< orphan*/ B134;
int /*<<< orphan*/ B150;
int /*<<< orphan*/ B1500000;
int /*<<< orphan*/ B1800;
int /*<<< orphan*/ B19200;
int /*<<< orphan*/ B200;
int /*<<< orphan*/ B2000000;
int /*<<< orphan*/ B230400;
int /*<<< orphan*/ B2400;
int /*<<< orphan*/ B2500000;
int /*<<< orphan*/ B300;
int /*<<< orphan*/ B3000000;
int /*<<< orphan*/ B3500000;
int /*<<< orphan*/ B38400;
int /*<<< orphan*/ B4000000;
int /*<<< orphan*/ B460800;
int /*<<< orphan*/ B4800;
int /*<<< orphan*/ B50;
int /*<<< orphan*/ B500000;
int /*<<< orphan*/ B57600;
int /*<<< orphan*/ B576000;
int /*<<< orphan*/ B600;
int /*<<< orphan*/ B75;
int /*<<< orphan*/ B921600;
int /*<<< orphan*/ B9600;
speed_t serial_int2speed(int s) {
  struct a_speeds {
    int speed_i;
    speed_t speed_s;
  };
  struct a_speeds speeds[] = {{50, B50},
                              {75, B75},
                              {110, B110},
                              {134, B134},
                              {150, B150},
                              {200, B200},
                              {300, B300},
                              {600, B600},
                              {1200, B1200},
                              {1800, B1800},
                              {2400, B2400},
                              {4800, B4800},
                              {9600, B9600},
                              {19200, B19200},
                              {38400, B38400},
                              {57600, B57600},
                              {115200, B115200},
                              {230400, B230400},
                              {460800, B460800},
                              {500000, B500000},
                              {576000, B576000},
                              {921600, B921600},
                              {1000000, B1000000},
                              {1152000, B1152000},
                              {1500000, B1500000},
                              {2000000, B2000000},
                              {2500000, B2500000},
                              {3000000, B3000000},
                              {3500000, B3500000},
                              {4000000, B4000000},
                              {0, 0}};
  struct a_speeds *sp = speeds;
  while (sp->speed_i) {
    if (sp->speed_i == s)
      break;
    sp++;
  }
  return sp->speed_s;
}


x86 assembly (clang, -O0):
<serial_int2speed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x32,-0x100(%rbp)
mov    0x2e71(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xfc(%rbp)
movl   $0x4b,-0xf8(%rbp)
mov    0x2ea0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xf4(%rbp)
movl   $0x6e,-0xf0(%rbp)
mov    0x2e8f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xec(%rbp)
movl   $0x86,-0xe8(%rbp)
mov    0x2e4e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xe4(%rbp)
movl   $0x96,-0xe0(%rbp)
mov    0x2db5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xdc(%rbp)
movl   $0xc8,-0xd8(%rbp)
mov    0x2dec(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xd4(%rbp)
movl   $0x12c,-0xd0(%rbp)
mov    0x2de3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xcc(%rbp)
movl   $0x258,-0xc8(%rbp)
mov    0x2dfa(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc4(%rbp)
movl   $0x4b0,-0xc0(%rbp)
mov    0x2d39(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xbc(%rbp)
movl   $0x708,-0xb8(%rbp)
mov    0x2d48(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xb4(%rbp)
movl   $0x960,-0xb0(%rbp)
mov    0x2d27(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xac(%rbp)
movl   $0x12c0,-0xa8(%rbp)
mov    0x2d76(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xa4(%rbp)
movl   $0x2580,-0xa0(%rbp)
mov    0x2d55(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x9c(%rbp)
movl   $0x4b00,-0x98(%rbp)
mov    0x2d8c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x94(%rbp)
movl   $0x9600,-0x90(%rbp)
mov    0x2c73(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8c(%rbp)
movl   $0xe100,-0x88(%rbp)
mov    0x2cd2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x84(%rbp)
movl   $0x1c200,-0x80(%rbp)
mov    0x2c6c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x7c(%rbp)
movl   $0x38400,-0x78(%rbp)
mov    0x2c39(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x74(%rbp)
movl   $0x70800,-0x70(%rbp)
mov    0x2c56(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x6c(%rbp)
movl   $0x7a120,-0x68(%rbp)
mov    0x2c2b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x64(%rbp)
movl   $0x8ca00,-0x60(%rbp)
mov    0x2cb8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x5c(%rbp)
movl   $0xe1000,-0x58(%rbp)
mov    0x2cb5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x54(%rbp)
movl   $0xf4240,-0x50(%rbp)
mov    0x2c5a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
movl   $0x119400,-0x48(%rbp)
mov    0x2bff(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
movl   $0x16e360,-0x40(%rbp)
mov    0x2bc4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
movl   $0x1e8480,-0x38(%rbp)
mov    0x2c19(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
movl   $0x2625a0,-0x30(%rbp)
mov    0x2c16(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
movl   $0x2dc6c0,-0x28(%rbp)
mov    0x2bdb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
movl   $0x3567e0,-0x20(%rbp)
mov    0x2c40(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
movl   $0x3d0900,-0x18(%rbp)
mov    0x2bbd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
lea    -0x100(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    -0x108(%rbp),%rax
cmpl   $0x0,(%rax)
je     1402 <serial_int2speed+0x302>
mov    -0x108(%rbp),%rax
mov    (%rax),%eax
cmp    -0x4(%rbp),%eax
jne    13eb <serial_int2speed+0x2eb>
jmp    1402 <serial_int2speed+0x302>
mov    -0x108(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x108(%rbp)
jmp    13c4 <serial_int2speed+0x2c4>
mov    -0x108(%rbp),%rax
mov    0x4(%rax),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_int2speed>:
sub    $0x78,%rsp
lea    -0x80(%rsp),%rax
movl   $0x32,-0x80(%rsp)
mov    0x2e78(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x7c(%rsp)
movl   $0x4b,-0x78(%rsp)
mov    0x2eab(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x74(%rsp)
movl   $0x6e,-0x70(%rsp)
mov    0x2e9e(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x6c(%rsp)
movl   $0x86,-0x68(%rsp)
mov    0x2e61(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x64(%rsp)
movl   $0x96,-0x60(%rsp)
mov    0x2dcc(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x5c(%rsp)
movl   $0xc8,-0x58(%rsp)
mov    0x2e07(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x54(%rsp)
movl   $0x12c,-0x50(%rsp)
mov    0x2e02(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x4c(%rsp)
movl   $0x258,-0x48(%rsp)
mov    0x2e1d(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x44(%rsp)
movl   $0x4b0,-0x40(%rsp)
mov    0x2d60(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x3c(%rsp)
movl   $0x708,-0x38(%rsp)
mov    0x2d73(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x34(%rsp)
movl   $0x960,-0x30(%rsp)
mov    0x2d56(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x2c(%rsp)
movl   $0x12c0,-0x28(%rsp)
mov    0x2da9(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x24(%rsp)
movl   $0x2580,-0x20(%rsp)
mov    0x2d8c(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x1c(%rsp)
movl   $0x4b00,-0x18(%rsp)
mov    0x2dc7(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x14(%rsp)
movl   $0x9600,-0x10(%rsp)
mov    0x2cb2(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0xc(%rsp)
movl   $0xe100,-0x8(%rsp)
mov    0x2d15(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x4(%rsp)
movl   $0x1c200,(%rsp)
mov    0x2cb1(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,0x4(%rsp)
movl   $0x38400,0x8(%rsp)
mov    0x2c7c(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,0xc(%rsp)
movl   $0x70800,0x10(%rsp)
mov    0x2c97(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,0x14(%rsp)
movl   $0x7a120,0x18(%rsp)
mov    0x2c6a(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,0x1c(%rsp)
movl   $0x8ca00,0x20(%rsp)
mov    0x2cf5(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,0x24(%rsp)
movl   $0xe1000,0x28(%rsp)
mov    0x2cf0(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,0x2c(%rsp)
movl   $0xf4240,0x30(%rsp)
mov    0x2c93(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,0x34(%rsp)
movl   $0x119400,0x38(%rsp)
mov    0x2c36(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,0x3c(%rsp)
movl   $0x16e360,0x40(%rsp)
mov    0x2bf9(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,0x44(%rsp)
movl   $0x1e8480,0x48(%rsp)
mov    0x2c4c(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,0x4c(%rsp)
movl   $0x2625a0,0x50(%rsp)
mov    0x2c47(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,0x54(%rsp)
movl   $0x2dc6c0,0x58(%rsp)
mov    0x2c0a(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,0x5c(%rsp)
movl   $0x3567e0,0x60(%rsp)
mov    0x2c6d(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,0x64(%rsp)
movl   $0x3d0900,0x68(%rsp)
mov    0x2be8(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,0x6c(%rsp)
movq   $0x0,0x70(%rsp)
nopw   0x0(%rax,%rax,1)
mov    (%rax),%ecx
add    $0x8,%rax
test   %ecx,%ecx
je     139e <serial_int2speed+0x29e>
cmp    %edi,%ecx
jne    1390 <serial_int2speed+0x290>
mov    -0x4(%rax),%eax
add    $0x78,%rsp
ret

LLVM IR (-O0):
%struct.a_speeds = type { i32, i32 }
@B50 = global i32 0
@B75 = global i32 0
@B110 = global i32 0
@B134 = global i32 0
@B150 = global i32 0
@B200 = global i32 0
@B300 = global i32 0
@B600 = global i32 0
@B1200 = global i32 0
@B1800 = global i32 0
@B2400 = global i32 0
@B4800 = global i32 0
@B9600 = global i32 0
@B19200 = global i32 0
@B38400 = global i32 0
@B57600 = global i32 0
@B115200 = global i32 0
@B230400 = global i32 0
@B460800 = global i32 0
@B500000 = global i32 0
@B576000 = global i32 0
@B921600 = global i32 0
@B1000000 = global i32 0
@B1152000 = global i32 0
@B1500000 = global i32 0
@B2000000 = global i32 0
@B2500000 = global i32 0
@B3000000 = global i32 0
@B3500000 = global i32 0
@B4000000 = global i32 0
define i32 @serial_int2speed(i32 %0) {
%2 = alloca i32
%3 = alloca [31 x %struct.a_speeds]
%4 = alloca %struct.a_speeds*
store i32 %0, i32* %2
%5 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %3, i64 0, i64 0
%6 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %5, i32 0, i32 0
store i32 50, i32* %6
%7 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %5, i32 0, i32 1
%8 = load i32, i32* @B50
store i32 %8, i32* %7
%9 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %5, i64 1
%10 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %9, i32 0, i32 0
store i32 75, i32* %10
%11 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %9, i32 0, i32 1
%12 = load i32, i32* @B75
store i32 %12, i32* %11
%13 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %9, i64 1
%14 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %13, i32 0, i32 0
store i32 110, i32* %14
%15 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %13, i32 0, i32 1
%16 = load i32, i32* @B110
store i32 %16, i32* %15
%17 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %13, i64 1
%18 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %17, i32 0, i32 0
store i32 134, i32* %18
%19 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %17, i32 0, i32 1
%20 = load i32, i32* @B134
store i32 %20, i32* %19
%21 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %17, i64 1
%22 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %21, i32 0, i32 0
store i32 150, i32* %22
%23 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %21, i32 0, i32 1
%24 = load i32, i32* @B150
store i32 %24, i32* %23
%25 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %21, i64 1
%26 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %25, i32 0, i32 0
store i32 200, i32* %26
%27 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %25, i32 0, i32 1
%28 = load i32, i32* @B200
store i32 %28, i32* %27
%29 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %25, i64 1
%30 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %29, i32 0, i32 0
store i32 300, i32* %30
%31 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %29, i32 0, i32 1
%32 = load i32, i32* @B300
store i32 %32, i32* %31
%33 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %29, i64 1
%34 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %33, i32 0, i32 0
store i32 600, i32* %34
%35 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %33, i32 0, i32 1
%36 = load i32, i32* @B600
store i32 %36, i32* %35
%37 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %33, i64 1
%38 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %37, i32 0, i32 0
store i32 1200, i32* %38
%39 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %37, i32 0, i32 1
%40 = load i32, i32* @B1200
store i32 %40, i32* %39
%41 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %37, i64 1
%42 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %41, i32 0, i32 0
store i32 1800, i32* %42
%43 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %41, i32 0, i32 1
%44 = load i32, i32* @B1800
store i32 %44, i32* %43
%45 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %41, i64 1
%46 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %45, i32 0, i32 0
store i32 2400, i32* %46
%47 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %45, i32 0, i32 1
%48 = load i32, i32* @B2400
store i32 %48, i32* %47
%49 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %45, i64 1
%50 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %49, i32 0, i32 0
store i32 4800, i32* %50
%51 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %49, i32 0, i32 1
%52 = load i32, i32* @B4800
store i32 %52, i32* %51
%53 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %49, i64 1
%54 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %53, i32 0, i32 0
store i32 9600, i32* %54
%55 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %53, i32 0, i32 1
%56 = load i32, i32* @B9600
store i32 %56, i32* %55
%57 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %53, i64 1
%58 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %57, i32 0, i32 0
store i32 19200, i32* %58
%59 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %57, i32 0, i32 1
%60 = load i32, i32* @B19200
store i32 %60, i32* %59
%61 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %57, i64 1
%62 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %61, i32 0, i32 0
store i32 38400, i32* %62
%63 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %61, i32 0, i32 1
%64 = load i32, i32* @B38400
store i32 %64, i32* %63
%65 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %61, i64 1
%66 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %65, i32 0, i32 0
store i32 57600, i32* %66
%67 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %65, i32 0, i32 1
%68 = load i32, i32* @B57600
store i32 %68, i32* %67
%69 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %65, i64 1
%70 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %69, i32 0, i32 0
store i32 115200, i32* %70
%71 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %69, i32 0, i32 1
%72 = load i32, i32* @B115200
store i32 %72, i32* %71
%73 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %69, i64 1
%74 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %73, i32 0, i32 0
store i32 230400, i32* %74
%75 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %73, i32 0, i32 1
%76 = load i32, i32* @B230400
store i32 %76, i32* %75
%77 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %73, i64 1
%78 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %77, i32 0, i32 0
store i32 460800, i32* %78
%79 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %77, i32 0, i32 1
%80 = load i32, i32* @B460800
store i32 %80, i32* %79
%81 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %77, i64 1
%82 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %81, i32 0, i32 0
store i32 500000, i32* %82
%83 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %81, i32 0, i32 1
%84 = load i32, i32* @B500000
store i32 %84, i32* %83
%85 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %81, i64 1
%86 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %85, i32 0, i32 0
store i32 576000, i32* %86
%87 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %85, i32 0, i32 1
%88 = load i32, i32* @B576000
store i32 %88, i32* %87
%89 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %85, i64 1
%90 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %89, i32 0, i32 0
store i32 921600, i32* %90
%91 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %89, i32 0, i32 1
%92 = load i32, i32* @B921600
store i32 %92, i32* %91
%93 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %89, i64 1
%94 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %93, i32 0, i32 0
store i32 1000000, i32* %94
%95 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %93, i32 0, i32 1
%96 = load i32, i32* @B1000000
store i32 %96, i32* %95
%97 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %93, i64 1
%98 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %97, i32 0, i32 0
store i32 1152000, i32* %98
%99 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %97, i32 0, i32 1
%100 = load i32, i32* @B1152000
store i32 %100, i32* %99
%101 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %97, i64 1
%102 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %101, i32 0, i32 0
store i32 1500000, i32* %102
%103 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %101, i32 0, i32 1
%104 = load i32, i32* @B1500000
store i32 %104, i32* %103
%105 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %101, i64 1
%106 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %105, i32 0, i32 0
store i32 2000000, i32* %106
%107 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %105, i32 0, i32 1
%108 = load i32, i32* @B2000000
store i32 %108, i32* %107
%109 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %105, i64 1
%110 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %109, i32 0, i32 0
store i32 2500000, i32* %110
%111 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %109, i32 0, i32 1
%112 = load i32, i32* @B2500000
store i32 %112, i32* %111
%113 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %109, i64 1
%114 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %113, i32 0, i32 0
store i32 3000000, i32* %114
%115 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %113, i32 0, i32 1
%116 = load i32, i32* @B3000000
store i32 %116, i32* %115
%117 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %113, i64 1
%118 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %117, i32 0, i32 0
store i32 3500000, i32* %118
%119 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %117, i32 0, i32 1
%120 = load i32, i32* @B3500000
store i32 %120, i32* %119
%121 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %117, i64 1
%122 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %121, i32 0, i32 0
store i32 4000000, i32* %122
%123 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %121, i32 0, i32 1
%124 = load i32, i32* @B4000000
store i32 %124, i32* %123
%125 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %121, i64 1
%126 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %125, i32 0, i32 0
store i32 0, i32* %126
%127 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %125, i32 0, i32 1
store i32 0, i32* %127
%128 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %3, i64 0, i64 0
store %struct.a_speeds* %128, %struct.a_speeds** %4
br label %129
129: ; preds = %141, %1
%130 = load %struct.a_speeds*, %struct.a_speeds** %4
%131 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %130, i32 0, i32 0
%132 = load i32, i32* %131
%133 = icmp ne i32 %132, 0
br i1 %133, label %134, label %144
134: ; preds = %129
%135 = load %struct.a_speeds*, %struct.a_speeds** %4
%136 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %135, i32 0, i32 0
%137 = load i32, i32* %136
%138 = load i32, i32* %2
%139 = icmp eq i32 %137, %138
br i1 %139, label %140, label %141
140: ; preds = %134
br label %144
141: ; preds = %134
%142 = load %struct.a_speeds*, %struct.a_speeds** %4
%143 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %142, i32 1
store %struct.a_speeds* %143, %struct.a_speeds** %4
br label %129
144: ; preds = %140, %129
%145 = load %struct.a_speeds*, %struct.a_speeds** %4
%146 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %145, i32 0, i32 1
%147 = load i32, i32* %146
ret i32 %147
}

LLVM IR (-O2):
%struct.a_speeds = type { i32, i32 }
@B50 = global i32 0
@B75 = global i32 0
@B110 = global i32 0
@B134 = global i32 0
@B150 = global i32 0
@B200 = global i32 0
@B300 = global i32 0
@B600 = global i32 0
@B1200 = global i32 0
@B1800 = global i32 0
@B2400 = global i32 0
@B4800 = global i32 0
@B9600 = global i32 0
@B19200 = global i32 0
@B38400 = global i32 0
@B57600 = global i32 0
@B115200 = global i32 0
@B230400 = global i32 0
@B460800 = global i32 0
@B500000 = global i32 0
@B576000 = global i32 0
@B921600 = global i32 0
@B1000000 = global i32 0
@B1152000 = global i32 0
@B1500000 = global i32 0
@B2000000 = global i32 0
@B2500000 = global i32 0
@B3000000 = global i32 0
@B3500000 = global i32 0
@B4000000 = global i32 0
define i32 @serial_int2speed(i32 %0) {
%2 = alloca [31 x %struct.a_speeds]
%3 = bitcast [31 x %struct.a_speeds]* %2 to i8*
%4 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 0
%5 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 0, i32 0
store i32 50, i32* %5
%6 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 0, i32 1
%7 = load i32, i32* @B50
store i32 %7, i32* %6
%8 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 1, i32 0
store i32 75, i32* %8
%9 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 1, i32 1
%10 = load i32, i32* @B75
store i32 %10, i32* %9
%11 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 2, i32 0
store i32 110, i32* %11
%12 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 2, i32 1
%13 = load i32, i32* @B110
store i32 %13, i32* %12
%14 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 3, i32 0
store i32 134, i32* %14
%15 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 3, i32 1
%16 = load i32, i32* @B134
store i32 %16, i32* %15
%17 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 4, i32 0
store i32 150, i32* %17
%18 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 4, i32 1
%19 = load i32, i32* @B150
store i32 %19, i32* %18
%20 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 5, i32 0
store i32 200, i32* %20
%21 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 5, i32 1
%22 = load i32, i32* @B200
store i32 %22, i32* %21
%23 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 6, i32 0
store i32 300, i32* %23
%24 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 6, i32 1
%25 = load i32, i32* @B300
store i32 %25, i32* %24
%26 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 7, i32 0
store i32 600, i32* %26
%27 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 7, i32 1
%28 = load i32, i32* @B600
store i32 %28, i32* %27
%29 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 8, i32 0
store i32 1200, i32* %29
%30 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 8, i32 1
%31 = load i32, i32* @B1200
store i32 %31, i32* %30
%32 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 9, i32 0
store i32 1800, i32* %32
%33 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 9, i32 1
%34 = load i32, i32* @B1800
store i32 %34, i32* %33
%35 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 10, i32 0
store i32 2400, i32* %35
%36 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 10, i32 1
%37 = load i32, i32* @B2400
store i32 %37, i32* %36
%38 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 11, i32 0
store i32 4800, i32* %38
%39 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 11, i32 1
%40 = load i32, i32* @B4800
store i32 %40, i32* %39
%41 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 12, i32 0
store i32 9600, i32* %41
%42 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 12, i32 1
%43 = load i32, i32* @B9600
store i32 %43, i32* %42
%44 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 13, i32 0
store i32 19200, i32* %44
%45 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 13, i32 1
%46 = load i32, i32* @B19200
store i32 %46, i32* %45
%47 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 14, i32 0
store i32 38400, i32* %47
%48 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 14, i32 1
%49 = load i32, i32* @B38400
store i32 %49, i32* %48
%50 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 15, i32 0
store i32 57600, i32* %50
%51 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 15, i32 1
%52 = load i32, i32* @B57600
store i32 %52, i32* %51
%53 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 16, i32 0
store i32 115200, i32* %53
%54 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 16, i32 1
%55 = load i32, i32* @B115200
store i32 %55, i32* %54
%56 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 17, i32 0
store i32 230400, i32* %56
%57 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 17, i32 1
%58 = load i32, i32* @B230400
store i32 %58, i32* %57
%59 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 18, i32 0
store i32 460800, i32* %59
%60 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 18, i32 1
%61 = load i32, i32* @B460800
store i32 %61, i32* %60
%62 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 19, i32 0
store i32 500000, i32* %62
%63 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 19, i32 1
%64 = load i32, i32* @B500000
store i32 %64, i32* %63
%65 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 20, i32 0
store i32 576000, i32* %65
%66 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 20, i32 1
%67 = load i32, i32* @B576000
store i32 %67, i32* %66
%68 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 21, i32 0
store i32 921600, i32* %68
%69 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 21, i32 1
%70 = load i32, i32* @B921600
store i32 %70, i32* %69
%71 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 22, i32 0
store i32 1000000, i32* %71
%72 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 22, i32 1
%73 = load i32, i32* @B1000000
store i32 %73, i32* %72
%74 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 23, i32 0
store i32 1152000, i32* %74
%75 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 23, i32 1
%76 = load i32, i32* @B1152000
store i32 %76, i32* %75
%77 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 24, i32 0
store i32 1500000, i32* %77
%78 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 24, i32 1
%79 = load i32, i32* @B1500000
store i32 %79, i32* %78
%80 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 25, i32 0
store i32 2000000, i32* %80
%81 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 25, i32 1
%82 = load i32, i32* @B2000000
store i32 %82, i32* %81
%83 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 26, i32 0
store i32 2500000, i32* %83
%84 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 26, i32 1
%85 = load i32, i32* @B2500000
store i32 %85, i32* %84
%86 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 27, i32 0
store i32 3000000, i32* %86
%87 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 27, i32 1
%88 = load i32, i32* @B3000000
store i32 %88, i32* %87
%89 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 28, i32 0
store i32 3500000, i32* %89
%90 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 28, i32 1
%91 = load i32, i32* @B3500000
store i32 %91, i32* %90
%92 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 29, i32 0
store i32 4000000, i32* %92
%93 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 29, i32 1
%94 = load i32, i32* @B4000000
store i32 %94, i32* %93
%95 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 30, i32 0
store i32 0, i32* %95
%96 = getelementptr inbounds [31 x %struct.a_speeds], [31 x %struct.a_speeds]* %2, i64 0, i64 30, i32 1
store i32 0, i32* %96
br label %97
97: ; preds = %97, %1
%98 = phi %struct.a_speeds* [ %4, %1 ], [ %104, %97 ]
%99 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %98, i64 0, i32 0
%100 = load i32, i32* %99
%101 = icmp eq i32 %100, 0
%102 = icmp eq i32 %100, %0
%103 = or i1 %101, %102
%104 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %98, i64 1
br i1 %103, label %105, label %97
105: ; preds = %97
%106 = getelementptr inbounds %struct.a_speeds, %struct.a_speeds* %98, i64 0, i32 1
%107 = load i32, i32* %106
ret i32 %107
}