#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 uint32_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ stderr;
void print_sdo_error(uint32_t error_code) {
  char *text;
  switch (error_code) {
  case 0x05030000:
    text = "Toggle bit not alternated.";
    break;
  case 0x05040000:
    text = "SDO protocol timed out.";
    break;
  case 0x05040001:
    text = "Client/server command specifier not valid or unknown.";
    break;
  case 0x05040002:
    text = "Invalid block size (block mode only).";
    break;
  case 0x05040003:
    text = "Invalid sequence number (block mode only).";
    break;
  case 0x05040004:
    text = "CRC error (block mode only).";
    break;
  case 0x05040005:
    text = "Out of memory.";
    break;
  case 0x06010000:
    text = "Unsupported access to an object.";
    break;
  case 0x06010001:
    text = "Attempt to read a write only object.";
    break;
  case 0x06010002:
    text = "Attempt to write a read only object.";
    break;
  case 0x06020000:
    text = "Object does not exist in the object dictionary.";
    break;
  case 0x06040041:
    text = "Object cannot be mapped to the PDO.";
    break;
  case 0x06040042:
    text = "The number and length of the objects to be mapped would exceed PDO "
           "length.";
    break;
  case 0x06040043:
    text = "General parameter incompatibility reason.";
    break;
  case 0x06040047:
    text = "General internal incompatibility in the device.";
    break;
  case 0x06060000:
    text = "Access failed due to an hardware error.";
    break;
  case 0x06070010:
    text =
        "Data type does not match, length of service parameter does not match";
    break;
  case 0x06070012:
    text = "Data type does not match, length of service parameter too high";
    break;
  case 0x06070013:
    text = "Data type does not match, length of service parameter too low";
    break;
  case 0x06090011:
    text = "Sub-index does not exist.";
    break;
  case 0x06090030:
    text = "Invalid value for parameter (download only).";
    break;
  case 0x06090031:
    text = "Value of parameter written too high (download only).";
    break;
  case 0x06090032:
    text = "Value of parameter written too low (download only).";
    break;
  case 0x06090036:
    text = "Maximum value is less than minimum value.";
    break;
  case 0x060A0023:
    text = "Resource not available: SDO connection";
    break;
  case 0x08000000:
    text = "General error";
    break;
  case 0x08000020:
    text = "Data cannot be transferred or stored to the application.";
    break;
  case 0x08000021:
    text = "Data cannot be transferred or stored to the application because of "
           "local control.";
    break;
  case 0x08000022:
    text = "Data cannot be transferred or stored to the application because of "
           "the present device state.";
    break;
  case 0x08000023:
    text = "Object dictionary dynamic generation fails or no object dictionary "
           "is present (e.g. object dictionary is generated from file and "
           "generation fails because of an file error).";
    break;
  case 0x08000024:
    text = "No data available";
    break;
  default:
    text = "Unknown";
    break;
  }
  fprintf(stderr, "SDO error 0x%08lX (%s)\n", error_code, text);
}


x86 assembly (clang, -O0):
<print_sdo_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x5030000,%eax
je     136b <print_sdo_error+0x25b>
jmp    1131 <print_sdo_error+0x21>
mov    -0x14(%rbp),%eax
sub    $0x5040000,%eax
je     137b <print_sdo_error+0x26b>
jmp    1144 <print_sdo_error+0x34>
mov    -0x14(%rbp),%eax
sub    $0x5040001,%eax
je     138b <print_sdo_error+0x27b>
jmp    1157 <print_sdo_error+0x47>
mov    -0x14(%rbp),%eax
sub    $0x5040002,%eax
je     139b <print_sdo_error+0x28b>
jmp    116a <print_sdo_error+0x5a>
mov    -0x14(%rbp),%eax
sub    $0x5040003,%eax
je     13ab <print_sdo_error+0x29b>
jmp    117d <print_sdo_error+0x6d>
mov    -0x14(%rbp),%eax
sub    $0x5040004,%eax
je     13bb <print_sdo_error+0x2ab>
jmp    1190 <print_sdo_error+0x80>
mov    -0x14(%rbp),%eax
sub    $0x5040005,%eax
je     13cb <print_sdo_error+0x2bb>
jmp    11a3 <print_sdo_error+0x93>
mov    -0x14(%rbp),%eax
sub    $0x6010000,%eax
je     13db <print_sdo_error+0x2cb>
jmp    11b6 <print_sdo_error+0xa6>
mov    -0x14(%rbp),%eax
sub    $0x6010001,%eax
je     13eb <print_sdo_error+0x2db>
jmp    11c9 <print_sdo_error+0xb9>
mov    -0x14(%rbp),%eax
sub    $0x6010002,%eax
je     13fb <print_sdo_error+0x2eb>
jmp    11dc <print_sdo_error+0xcc>
mov    -0x14(%rbp),%eax
sub    $0x6020000,%eax
je     140b <print_sdo_error+0x2fb>
jmp    11ef <print_sdo_error+0xdf>
mov    -0x14(%rbp),%eax
sub    $0x6040041,%eax
je     141b <print_sdo_error+0x30b>
jmp    1202 <print_sdo_error+0xf2>
mov    -0x14(%rbp),%eax
sub    $0x6040042,%eax
je     142b <print_sdo_error+0x31b>
jmp    1215 <print_sdo_error+0x105>
mov    -0x14(%rbp),%eax
sub    $0x6040043,%eax
je     143b <print_sdo_error+0x32b>
jmp    1228 <print_sdo_error+0x118>
mov    -0x14(%rbp),%eax
sub    $0x6040047,%eax
je     144b <print_sdo_error+0x33b>
jmp    123b <print_sdo_error+0x12b>
mov    -0x14(%rbp),%eax
sub    $0x6060000,%eax
je     145b <print_sdo_error+0x34b>
jmp    124e <print_sdo_error+0x13e>
mov    -0x14(%rbp),%eax
sub    $0x6070010,%eax
je     146b <print_sdo_error+0x35b>
jmp    1261 <print_sdo_error+0x151>
mov    -0x14(%rbp),%eax
sub    $0x6070012,%eax
je     147b <print_sdo_error+0x36b>
jmp    1274 <print_sdo_error+0x164>
mov    -0x14(%rbp),%eax
sub    $0x6070013,%eax
je     148b <print_sdo_error+0x37b>
jmp    1287 <print_sdo_error+0x177>
mov    -0x14(%rbp),%eax
sub    $0x6090011,%eax
je     149b <print_sdo_error+0x38b>
jmp    129a <print_sdo_error+0x18a>
mov    -0x14(%rbp),%eax
sub    $0x6090030,%eax
je     14ab <print_sdo_error+0x39b>
jmp    12ad <print_sdo_error+0x19d>
mov    -0x14(%rbp),%eax
sub    $0x6090031,%eax
je     14bb <print_sdo_error+0x3ab>
jmp    12c0 <print_sdo_error+0x1b0>
mov    -0x14(%rbp),%eax
sub    $0x6090032,%eax
je     14cb <print_sdo_error+0x3bb>
jmp    12d3 <print_sdo_error+0x1c3>
mov    -0x14(%rbp),%eax
sub    $0x6090036,%eax
je     14db <print_sdo_error+0x3cb>
jmp    12e6 <print_sdo_error+0x1d6>
mov    -0x14(%rbp),%eax
sub    $0x60a0023,%eax
je     14eb <print_sdo_error+0x3db>
jmp    12f9 <print_sdo_error+0x1e9>
mov    -0x14(%rbp),%eax
sub    $0x8000000,%eax
je     14fb <print_sdo_error+0x3eb>
jmp    130c <print_sdo_error+0x1fc>
mov    -0x14(%rbp),%eax
sub    $0x8000020,%eax
je     150b <print_sdo_error+0x3fb>
jmp    131f <print_sdo_error+0x20f>
mov    -0x14(%rbp),%eax
sub    $0x8000021,%eax
je     151b <print_sdo_error+0x40b>
jmp    1332 <print_sdo_error+0x222>
mov    -0x14(%rbp),%eax
sub    $0x8000022,%eax
je     152b <print_sdo_error+0x41b>
jmp    1345 <print_sdo_error+0x235>
mov    -0x14(%rbp),%eax
sub    $0x8000023,%eax
je     153b <print_sdo_error+0x42b>
jmp    1358 <print_sdo_error+0x248>
mov    -0x14(%rbp),%eax
sub    $0x8000024,%eax
je     154b <print_sdo_error+0x43b>
jmp    155b <print_sdo_error+0x44b>
lea    0xc8e(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xc99(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xca1(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xcc7(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xcdd(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xcf8(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xd05(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xd04(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xd15(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xd2a(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xd3f(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xd5f(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xd73(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xdae(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xdc8(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xde8(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xe00(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xe35(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xe64(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xe92(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xe9c(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xeb9(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xf02(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xf1c(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xf33(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xf31(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xf5a(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xf9c(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0xfe9(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0x1086(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1566 <print_sdo_error+0x456>
lea    0x1088(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0x2a73(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0x1075(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_sdo_error>:
mov    %edi,%edx
cmp    $0x607000f,%edi
jg     114d <print_sdo_error+0x3d>
cmp    $0x6010000,%edx
jg     118c <print_sdo_error+0x7c>
lea    -0x5040000(%rdx),%eax
cmp    $0x5,%eax
ja     124e <print_sdo_error+0x13e>
lea    0xec8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1033(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
cmp    $0x60a0022,%edx
jg     11c3 <print_sdo_error+0xb3>
cmp    $0x6090010,%edx
jle    11ee <print_sdo_error+0xde>
lea    -0x6090011(%rdx),%eax
cmp    $0x25,%eax
ja     1380 <print_sdo_error+0x270>
lea    0xebd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x130d(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
cmp    $0x6040040,%edx
jle    121e <print_sdo_error+0x10e>
lea    -0x6040041(%rdx),%eax
cmp    $0x6,%eax
ja     128a <print_sdo_error+0x17a>
lea    0xe6a(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1123(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    -0x8000000(%rdx),%eax
cmp    $0x24,%eax
ja     1272 <print_sdo_error+0x162>
lea    0xef3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x13ac(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
cmp    $0x6070010,%edx
je     1353 <print_sdo_error+0x243>
cmp    $0x6070012,%edx
je     135c <print_sdo_error+0x24c>
cmp    $0x6070013,%edx
jne    1380 <print_sdo_error+0x270>
lea    0x123d(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
cmp    $0x6010001,%edx
je     1365 <print_sdo_error+0x255>
cmp    $0x6010002,%edx
je     136e <print_sdo_error+0x25e>
cmp    $0x6020000,%edx
jne    1380 <print_sdo_error+0x270>
lea    0x1068(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
cmp    $0x5030000,%edx
je     1377 <print_sdo_error+0x267>
cmp    $0x6010000,%edx
jne    1380 <print_sdo_error+0x270>
lea    0xfd9(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
cmp    $0x60a0023,%edx
jne    1380 <print_sdo_error+0x270>
lea    0x12e9(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
cmp    $0x6060000,%edx
jne    1380 <print_sdo_error+0x270>
lea    0x110d(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0x105c(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0x109b(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0x10b9(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0x12d6(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0x1303(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0x1349(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0x139a(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0x143b(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0xe8a(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0xeb7(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0xed4(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0xef6(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0xf0a(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0x1178(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0x119c(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0x11c8(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0x11f3(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0x1078(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0x10b4(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0xefb(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0xf17(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0xde2(%rip),%rcx
jmp    1387 <print_sdo_error+0x277>
lea    0x13c3(%rip),%rcx
mov    0x2c52(%rip),%rax
mov    (%rax),%edi
lea    0x13bb(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Toggle bit not alternated.\00"
@.str.1 = [24 x i8] c"SDO protocol timed out.\00"
@.str.2 = [54 x i8] c"Client/server command specifier not valid or unknown.\00"
@.str.3 = [38 x i8] c"Invalid block size (block mode only).\00"
@.str.4 = [43 x i8] c"Invalid sequence number (block mode only).\00"
@.str.5 = [29 x i8] c"CRC error (block mode only).\00"
@.str.6 = [15 x i8] c"Out of memory.\00"
@.str.7 = [33 x i8] c"Unsupported access to an object.\00"
@.str.8 = [37 x i8] c"Attempt to read a write only object.\00"
@.str.9 = [37 x i8] c"Attempt to write a read only object.\00"
@.str.10 = [48 x i8] c"Object does not exist in the object dictionary.\00"
@.str.11 = [36 x i8] c"Object cannot be mapped to the PDO.\00"
@.str.12 = [75 x i8] c"The number and length of the objects to be mapped would exceed PDO length.\00"
@.str.13 = [42 x i8] c"General parameter incompatibility reason.\00"
@.str.14 = [48 x i8] c"General internal incompatibility in the device.\00"
@.str.15 = [40 x i8] c"Access failed due to an hardware error.\00"
@.str.16 = [69 x i8] c"Data type does not match, length of service parameter does not match\00"
@.str.17 = [63 x i8] c"Data type does not match, length of service parameter too high\00"
@.str.18 = [62 x i8] c"Data type does not match, length of service parameter too low\00"
@.str.19 = [26 x i8] c"Sub-index does not exist.\00"
@.str.20 = [45 x i8] c"Invalid value for parameter (download only).\00"
@.str.21 = [53 x i8] c"Value of parameter written too high (download only).\00"
@.str.22 = [52 x i8] c"Value of parameter written too low (download only).\00"
@.str.23 = [42 x i8] c"Maximum value is less than minimum value.\00"
@.str.24 = [39 x i8] c"Resource not available: SDO connection\00"
@.str.25 = [14 x i8] c"General error\00"
@.str.26 = [57 x i8] c"Data cannot be transferred or stored to the application.\00"
@.str.27 = [82 x i8] c"Data cannot be transferred or stored to the application because of local control.\00"
@.str.28 = [93 x i8] c"Data cannot be transferred or stored to the application because of the present device state.\00"
@.str.29 = [173 x i8] c"Object dictionary dynamic generation fails or no object dictionary is present (e.g. object dictionary is generated from file and generation fails because of an file error).\00"
@.str.30 = [18 x i8] c"No data available\00"
@.str.31 = [8 x i8] c"Unknown\00"
@stderr = global i32 0
@.str.32 = [24 x i8] c"SDO error 0x%08lX (%s)\0A\00"
define void @print_sdo_error(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %36 [
i32 84082688, label %5
i32 84148224, label %6
i32 84148225, label %7
i32 84148226, label %8
i32 84148227, label %9
i32 84148228, label %10
i32 84148229, label %11
i32 100728832, label %12
i32 100728833, label %13
i32 100728834, label %14
i32 100794368, label %15
i32 100925505, label %16
i32 100925506, label %17
i32 100925507, label %18
i32 100925511, label %19
i32 101056512, label %20
i32 101122064, label %21
i32 101122066, label %22
i32 101122067, label %23
i32 101253137, label %24
i32 101253168, label %25
i32 101253169, label %26
i32 101253170, label %27
i32 101253174, label %28
i32 101318691, label %29
i32 134217728, label %30
i32 134217760, label %31
i32 134217761, label %32
i32 134217762, label %33
i32 134217763, label %34
i32 134217764, label %35
]
5: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8** %3
br label %37
6: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %37
7: ; preds = %1
store i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %37
8: ; preds = %1
store i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %37
9: ; preds = %1
store i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %37
10: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %37
11: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8** %3
br label %37
12: ; preds = %1
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), i8** %3
br label %37
13: ; preds = %1
store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0), i8** %3
br label %37
14: ; preds = %1
store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0), i8** %3
br label %37
15: ; preds = %1
store i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.10, i64 0, i64 0), i8** %3
br label %37
16: ; preds = %1
store i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i8** %3
br label %37
17: ; preds = %1
store i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.12, i64 0, i64 0), i8** %3
br label %37
18: ; preds = %1
store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.13, i64 0, i64 0), i8** %3
br label %37
19: ; preds = %1
store i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.14, i64 0, i64 0), i8** %3
br label %37
20: ; preds = %1
store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0), i8** %3
br label %37
21: ; preds = %1
store i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.16, i64 0, i64 0), i8** %3
br label %37
22: ; preds = %1
store i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.17, i64 0, i64 0), i8** %3
br label %37
23: ; preds = %1
store i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.18, i64 0, i64 0), i8** %3
br label %37
24: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.19, i64 0, i64 0), i8** %3
br label %37
25: ; preds = %1
store i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.20, i64 0, i64 0), i8** %3
br label %37
26: ; preds = %1
store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.21, i64 0, i64 0), i8** %3
br label %37
27: ; preds = %1
store i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.22, i64 0, i64 0), i8** %3
br label %37
28: ; preds = %1
store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.23, i64 0, i64 0), i8** %3
br label %37
29: ; preds = %1
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.24, i64 0, i64 0), i8** %3
br label %37
30: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.25, i64 0, i64 0), i8** %3
br label %37
31: ; preds = %1
store i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.26, i64 0, i64 0), i8** %3
br label %37
32: ; preds = %1
store i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.27, i64 0, i64 0), i8** %3
br label %37
33: ; preds = %1
store i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.28, i64 0, i64 0), i8** %3
br label %37
34: ; preds = %1
store i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.29, i64 0, i64 0), i8** %3
br label %37
35: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.30, i64 0, i64 0), i8** %3
br label %37
36: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.31, i64 0, i64 0), i8** %3
br label %37
37: ; preds = %36, %35, %34, %33, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%38 = load i32, i32* @stderr
%39 = load i32, i32* %2
%40 = load i8*, i8** %3
%41 = call i32 @fprintf(i32 %38, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.32, i64 0, i64 0), i32 %39, i8* %40)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Toggle bit not alternated.\00"
@.str.1 = [24 x i8] c"SDO protocol timed out.\00"
@.str.2 = [54 x i8] c"Client/server command specifier not valid or unknown.\00"
@.str.3 = [38 x i8] c"Invalid block size (block mode only).\00"
@.str.4 = [43 x i8] c"Invalid sequence number (block mode only).\00"
@.str.5 = [29 x i8] c"CRC error (block mode only).\00"
@.str.6 = [15 x i8] c"Out of memory.\00"
@.str.7 = [33 x i8] c"Unsupported access to an object.\00"
@.str.8 = [37 x i8] c"Attempt to read a write only object.\00"
@.str.9 = [37 x i8] c"Attempt to write a read only object.\00"
@.str.10 = [48 x i8] c"Object does not exist in the object dictionary.\00"
@.str.11 = [36 x i8] c"Object cannot be mapped to the PDO.\00"
@.str.12 = [75 x i8] c"The number and length of the objects to be mapped would exceed PDO length.\00"
@.str.13 = [42 x i8] c"General parameter incompatibility reason.\00"
@.str.14 = [48 x i8] c"General internal incompatibility in the device.\00"
@.str.15 = [40 x i8] c"Access failed due to an hardware error.\00"
@.str.16 = [69 x i8] c"Data type does not match, length of service parameter does not match\00"
@.str.17 = [63 x i8] c"Data type does not match, length of service parameter too high\00"
@.str.18 = [62 x i8] c"Data type does not match, length of service parameter too low\00"
@.str.19 = [26 x i8] c"Sub-index does not exist.\00"
@.str.20 = [45 x i8] c"Invalid value for parameter (download only).\00"
@.str.21 = [53 x i8] c"Value of parameter written too high (download only).\00"
@.str.22 = [52 x i8] c"Value of parameter written too low (download only).\00"
@.str.23 = [42 x i8] c"Maximum value is less than minimum value.\00"
@.str.24 = [39 x i8] c"Resource not available: SDO connection\00"
@.str.25 = [14 x i8] c"General error\00"
@.str.26 = [57 x i8] c"Data cannot be transferred or stored to the application.\00"
@.str.27 = [82 x i8] c"Data cannot be transferred or stored to the application because of local control.\00"
@.str.28 = [93 x i8] c"Data cannot be transferred or stored to the application because of the present device state.\00"
@.str.29 = [173 x i8] c"Object dictionary dynamic generation fails or no object dictionary is present (e.g. object dictionary is generated from file and generation fails because of an file error).\00"
@.str.30 = [18 x i8] c"No data available\00"
@.str.31 = [8 x i8] c"Unknown\00"
@stderr = global i32 0
@.str.32 = [24 x i8] c"SDO error 0x%08lX (%s)\0A\00"
define void @print_sdo_error(i32 %0) {
switch i32 %0, label %32 [
i32 84082688, label %33
i32 84148224, label %2
i32 84148225, label %3
i32 84148226, label %4
i32 84148227, label %5
i32 84148228, label %6
i32 84148229, label %7
i32 100728832, label %8
i32 100728833, label %9
i32 100728834, label %10
i32 100794368, label %11
i32 100925505, label %12
i32 100925506, label %13
i32 100925507, label %14
i32 100925511, label %15
i32 101056512, label %16
i32 101122064, label %17
i32 101122066, label %18
i32 101122067, label %19
i32 101253137, label %20
i32 101253168, label %21
i32 101253169, label %22
i32 101253170, label %23
i32 101253174, label %24
i32 101318691, label %25
i32 134217728, label %26
i32 134217760, label %27
i32 134217761, label %28
i32 134217762, label %29
i32 134217763, label %30
i32 134217764, label %31
]
2: ; preds = %1
br label %33
3: ; preds = %1
br label %33
4: ; preds = %1
br label %33
5: ; preds = %1
br label %33
6: ; preds = %1
br label %33
7: ; preds = %1
br label %33
8: ; preds = %1
br label %33
9: ; preds = %1
br label %33
10: ; preds = %1
br label %33
11: ; preds = %1
br label %33
12: ; preds = %1
br label %33
13: ; preds = %1
br label %33
14: ; preds = %1
br label %33
15: ; preds = %1
br label %33
16: ; preds = %1
br label %33
17: ; preds = %1
br label %33
18: ; preds = %1
br label %33
19: ; preds = %1
br label %33
20: ; preds = %1
br label %33
21: ; preds = %1
br label %33
22: ; preds = %1
br label %33
23: ; preds = %1
br label %33
24: ; preds = %1
br label %33
25: ; preds = %1
br label %33
26: ; preds = %1
br label %33
27: ; preds = %1
br label %33
28: ; preds = %1
br label %33
29: ; preds = %1
br label %33
30: ; preds = %1
br label %33
31: ; preds = %1
br label %33
32: ; preds = %1
br label %33
33: ; preds = %1, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%34 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.31, i64 0, i64 0), %32 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.30, i64 0, i64 0), %31 ], [ getelementptr inbounds ([173 x i8], [173 x i8]* @.str.29, i64 0, i64 0), %30 ], [ getelementptr inbounds ([93 x i8], [93 x i8]* @.str.28, i64 0, i64 0), %29 ], [ getelementptr inbounds ([82 x i8], [82 x i8]* @.str.27, i64 0, i64 0), %28 ], [ getelementptr inbounds ([57 x i8], [57 x i8]* @.str.26, i64 0, i64 0), %27 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.25, i64 0, i64 0), %26 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @.str.24, i64 0, i64 0), %25 ], [ getelementptr inbounds ([42 x i8], [42 x i8]* @.str.23, i64 0, i64 0), %24 ], [ getelementptr inbounds ([52 x i8], [52 x i8]* @.str.22, i64 0, i64 0), %23 ], [ getelementptr inbounds ([53 x i8], [53 x i8]* @.str.21, i64 0, i64 0), %22 ], [ getelementptr inbounds ([45 x i8], [45 x i8]* @.str.20, i64 0, i64 0), %21 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.19, i64 0, i64 0), %20 ], [ getelementptr inbounds ([62 x i8], [62 x i8]* @.str.18, i64 0, i64 0), %19 ], [ getelementptr inbounds ([63 x i8], [63 x i8]* @.str.17, i64 0, i64 0), %18 ], [ getelementptr inbounds ([69 x i8], [69 x i8]* @.str.16, i64 0, i64 0), %17 ], [ getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([48 x i8], [48 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([42 x i8], [42 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([75 x i8], [75 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([48 x i8], [48 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), %1 ]
%35 = load i32, i32* @stderr
%36 = tail call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.32, i64 0, i64 0), i32 %0, i8* %34)
ret void
}