#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 */
int /*<<< orphan*/ strcat(char *, char *);
char const *strcpy(char *, char *);
const char *iso7816_stringify_sw(unsigned short sw) {
  static char msg[200];
  msg[0] = 0;
  if (sw == 0x9000)
    return strcpy(msg, "Normal processing");
  switch (sw >> 8) {
  case 0x61:
    strcpy(msg, "More bytes available (see SW2)");
    break;
  case 0x62:
    strcpy(msg, "State of non-volatile memory unchanged - ");
    switch (sw & 0xFF) {
    case 0x00:
      strcat(msg, "No information given");
      break;
    case 0x81:
      strcat(msg, "Part of returned data may be corrupted");
      break;
    case 0x82:
      strcat(msg, "End of file/record reached before reading Le bytes");
      break;
    case 0x83:
      strcat(msg, "Selected file invalidated");
      break;
    case 0x84:
      strcat(msg, "FCI not formatted correctly");
      break;
    }
    break;
  case 0x63:
    strcpy(msg, "State of non-volatile memory changed - ");
    switch (sw & 0xFF) {
    case 0x00:
      strcat(msg, "No information given");
      break;
    case 0x81:
      strcat(msg, "File filled up by the last write");
      break;
    }
    if ((sw & 0xF0) == 0xC0)
      strcat(msg, "Counter value");
    break;
  case 0x64:
    strcpy(msg, "State of non-volatile memory unchanged - ");
    if ((sw & 0xFF) == 0)
      strcat(msg, "OK");
    break;
  case 0x65:
    strcpy(msg, "State of non-volatile memory changed - ");
    switch (sw & 0xFF) {
    case 0x00:
      strcat(msg, "No information given");
      break;
    case 0x81:
      strcat(msg, "Memory failure");
      break;
    }
    break;
  case 0x66:
    strcpy(msg, "security-related issue - ");
    switch (sw & 0xFF) {
    case 0x00:
      strcat(msg, "No information given");
      break;
    }
    break;
  case 0x67:
    if (sw == 0x6700)
      strcpy(msg, "Wrong length");
    else
      strcpy(msg, "Unknown 67XX error code");
    break;
  case 0x68:
    strcpy(msg, "Functions in CLA not supported - ");
    switch (sw & 0xFF) {
    case 0x00:
      strcat(msg, "No information given");
      break;
    case 0x81:
      strcat(msg, "Logical channel not supported");
      break;
    case 0x82:
      strcat(msg, "Secure messaging not supported");
      break;
    }
    break;
  case 0x69:
    strcpy(msg, "Command not allowed - ");
    switch (sw & 0xFF) {
    case 0x00:
      strcat(msg, "No information given");
      break;
    case 0x81:
      strcat(msg, "Command incompatible with file structure");
      break;
    case 0x82:
      strcat(msg, "Security status not satisfied");
      break;
    case 0x83:
      strcat(msg, "Authentication method blocked");
      break;
    case 0x84:
      strcat(msg, "Referenced data invalidated");
      break;
    case 0x85:
      strcat(msg, "Conditions of use not satisfied");
      break;
    case 0x86:
      strcat(msg, "Command not allowed (no current EF)");
      break;
    case 0x87:
      strcat(msg, "Expected SM data objects missing");
      break;
    case 0x88:
      strcat(msg, "SM data objects incorrect");
      break;
    }
    break;
  case 0x6A:
    strcpy(msg, "Wrong parameter(s) P1-P2 - ");
    switch (sw & 0xFF) {
    case 0x00:
      strcat(msg, "No information given");
      break;
    case 0x80:
      strcat(msg, "Incorrect parameters in the data field");
      break;
    case 0x81:
      strcat(msg, "Function not supported");
      break;
    case 0x82:
      strcat(msg, "File not found");
      break;
    case 0x83:
      strcat(msg, "Record not found");
      break;
    case 0x84:
      strcat(msg, "Not enough memory space in the file");
      break;
    case 0x85:
      strcat(msg, "Lc inconsistent with TLV structure");
      break;
    case 0x86:
      strcat(msg, "Incorrect parameters P1-P2");
      break;
    case 0x87:
      strcat(msg, "Lc inconsistent with P1-P2");
      break;
    case 0x88:
      strcat(msg, "Referenced data not found");
      break;
    }
    break;
  case 0x6B:
    if (sw == 0x6B00)
      strcpy(msg, "Wrong parameter(s) P1-P2");
    else
      strcpy(msg, "Unknown 6BXX error code");
    break;
  case 0x6C:
    strcpy(msg, "Wrong length Le, see SW2");
    break;
  case 0x6D:
    if (sw == 0x6D00)
      strcpy(msg, "Instruction code not supported or invalid");
    else
      strcpy(msg, "Unknown 6DXX error code");
    break;
  case 0x6E:
    if (sw == 0x6E00)
      strcpy(msg, "Class not supported");
    else
      strcpy(msg, "Unknown 6EXX error code");
    break;
  case 0x6F:
    if (sw == 0x6FFF)
      strcpy(msg, "Cardpeek application-level error");
    else
      strcpy(msg, "No precise diagnosis");
    break;
  case 0x92:
    strcpy(msg, "GSM - Update successful after n reties (see SW2)");
    break;
  case 0x94:
    switch (sw & 0xFF) {
    case 0x00:
      strcpy(msg, "GSM - No EF selected");
      break;
    case 0x02:
      strcpy(msg, "GSM - Out of range (invalid address)");
      break;
    case 0x04:
      strcpy(msg, "GSM - File ID or pattern not found");
      break;
    case 0x08:
      strcpy(msg, "GSM - File inconsistent with the command");
      break;
    }
    break;
  case 0x98:
    switch (sw & 0xFF) {
    case 0x02:
      strcpy(msg, "GSM - No CHV initilaized");
      break;
    case 0x04:
      strcpy(msg, "GSM - Authentication failed");
      break;
    case 0x08:
      strcpy(msg, "GSM - In contradiction with CHV status");
      break;
    case 0x10:
      strcpy(msg, "GSM - In contradiction invalidation status");
      break;
    case 0x40:
      strcpy(msg, "GSM - Authentication failed, no attempts left");
      break;
    case 0x50:
      strcpy(msg, "GSM - Increase failed, max. vaule reached");
      break;
    }
    break;
  case 0x9F:
    strcpy(msg, "GSM - Length of response in SW2");
    break;
  default:
    if ((sw >> 12) == 0x9)
      strcpy(msg, "Application specific Status Word");
    else
      strcpy(msg, "Unkown Status Word");
  }
  return msg;
}


x86 assembly (clang, -O0):
<iso7816_stringify_sw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %di,%ax
mov    %ax,-0xa(%rbp)
movb   $0x0,0x2f0a(%rip)
movzwl -0xa(%rbp),%eax
cmp    $0x9000,%eax
jne    1161 <iso7816_stringify_sw+0x41>
lea    0x2ef4(%rip),%rdi
lea    0xfcd(%rip),%rsi
call   1030 <strcpy@plt>
mov    %rax,-0x8(%rbp)
jmp    1b3e <iso7816_stringify_sw+0xa1e>
movzbl -0x9(%rbp),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x3e,%eax
ja     1af3 <iso7816_stringify_sw+0x9d3>
mov    -0x18(%rbp),%rax
lea    0xe7e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x2eae(%rip),%rdi
lea    0xf99(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
lea    0x2e96(%rip),%rdi
lea    0xfa0(%rip),%rsi
call   1030 <strcpy@plt>
movzbl -0xa(%rbp),%eax
mov    %eax,-0x1c(%rbp)
test   %eax,%eax
je     1216 <iso7816_stringify_sw+0xf6>
jmp    11ca <iso7816_stringify_sw+0xaa>
mov    -0x1c(%rbp),%eax
sub    $0x81,%eax
je     122e <iso7816_stringify_sw+0x10e>
jmp    11dd <iso7816_stringify_sw+0xbd>
mov    -0x1c(%rbp),%eax
sub    $0x82,%eax
je     1246 <iso7816_stringify_sw+0x126>
jmp    11f0 <iso7816_stringify_sw+0xd0>
mov    -0x1c(%rbp),%eax
sub    $0x83,%eax
je     125e <iso7816_stringify_sw+0x13e>
jmp    1203 <iso7816_stringify_sw+0xe3>
mov    -0x1c(%rbp),%eax
sub    $0x84,%eax
je     1276 <iso7816_stringify_sw+0x156>
jmp    1289 <iso7816_stringify_sw+0x169>
lea    0x2e23(%rip),%rdi
lea    0xf57(%rip),%rsi
call   1040 <strcat@plt>
jmp    1289 <iso7816_stringify_sw+0x169>
lea    0x2e0b(%rip),%rdi
lea    0xf54(%rip),%rsi
call   1040 <strcat@plt>
jmp    1289 <iso7816_stringify_sw+0x169>
lea    0x2df3(%rip),%rdi
lea    0xf63(%rip),%rsi
call   1040 <strcat@plt>
jmp    1289 <iso7816_stringify_sw+0x169>
lea    0x2ddb(%rip),%rdi
lea    0xf7e(%rip),%rsi
call   1040 <strcat@plt>
jmp    1289 <iso7816_stringify_sw+0x169>
lea    0x2dc3(%rip),%rdi
lea    0xf80(%rip),%rsi
call   1040 <strcat@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
lea    0x2dab(%rip),%rdi
lea    0xf84(%rip),%rsi
call   1030 <strcpy@plt>
movzbl -0xa(%rbp),%eax
mov    %eax,-0x20(%rbp)
test   %eax,%eax
je     12c8 <iso7816_stringify_sw+0x1a8>
jmp    12b5 <iso7816_stringify_sw+0x195>
mov    -0x20(%rbp),%eax
sub    $0x81,%eax
je     12e0 <iso7816_stringify_sw+0x1c0>
jmp    12f3 <iso7816_stringify_sw+0x1d3>
lea    0x2d71(%rip),%rdi
lea    0xea5(%rip),%rsi
call   1040 <strcat@plt>
jmp    12f3 <iso7816_stringify_sw+0x1d3>
lea    0x2d59(%rip),%rdi
lea    0xf5a(%rip),%rsi
call   1040 <strcat@plt>
movzwl -0xa(%rbp),%eax
and    $0xf0,%eax
cmp    $0xc0,%eax
jne    131a <iso7816_stringify_sw+0x1fa>
lea    0x2d32(%rip),%rdi
lea    0xf54(%rip),%rsi
call   1040 <strcat@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
lea    0x2d1a(%rip),%rdi
lea    0xe24(%rip),%rsi
call   1030 <strcpy@plt>
movzwl -0xa(%rbp),%eax
and    $0xff,%eax
cmp    $0x0,%eax
jne    1357 <iso7816_stringify_sw+0x237>
lea    0x2cf5(%rip),%rdi
lea    0xf25(%rip),%rsi
call   1040 <strcat@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
lea    0x2cdd(%rip),%rdi
lea    0xeb6(%rip),%rsi
call   1030 <strcpy@plt>
movzbl -0xa(%rbp),%eax
mov    %eax,-0x24(%rbp)
test   %eax,%eax
je     1396 <iso7816_stringify_sw+0x276>
jmp    1383 <iso7816_stringify_sw+0x263>
mov    -0x24(%rbp),%eax
sub    $0x81,%eax
je     13ae <iso7816_stringify_sw+0x28e>
jmp    13c1 <iso7816_stringify_sw+0x2a1>
lea    0x2ca3(%rip),%rdi
lea    0xdd7(%rip),%rsi
call   1040 <strcat@plt>
jmp    13c1 <iso7816_stringify_sw+0x2a1>
lea    0x2c8b(%rip),%rdi
lea    0xebe(%rip),%rsi
call   1040 <strcat@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
lea    0x2c73(%rip),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0xa(%rbp),%al
test   %al,%al
jne    13fc <iso7816_stringify_sw+0x2dc>
jmp    13e9 <iso7816_stringify_sw+0x2c9>
lea    0x2c50(%rip),%rdi
lea    0xd84(%rip),%rsi
call   1040 <strcat@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
movzwl -0xa(%rbp),%eax
cmp    $0x6700,%eax
jne    1428 <iso7816_stringify_sw+0x308>
lea    0x2c29(%rip),%rdi
lea    0xe85(%rip),%rsi
call   1030 <strcpy@plt>
jmp    143b <iso7816_stringify_sw+0x31b>
lea    0x2c11(%rip),%rdi
lea    0xe7a(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
lea    0x2bf9(%rip),%rdi
lea    0xe7a(%rip),%rsi
call   1030 <strcpy@plt>
movzbl -0xa(%rbp),%eax
mov    %eax,-0x28(%rbp)
test   %eax,%eax
je     148d <iso7816_stringify_sw+0x36d>
jmp    1467 <iso7816_stringify_sw+0x347>
mov    -0x28(%rbp),%eax
sub    $0x81,%eax
je     14a5 <iso7816_stringify_sw+0x385>
jmp    147a <iso7816_stringify_sw+0x35a>
mov    -0x28(%rbp),%eax
sub    $0x82,%eax
je     14bd <iso7816_stringify_sw+0x39d>
jmp    14d0 <iso7816_stringify_sw+0x3b0>
lea    0x2bac(%rip),%rdi
lea    0xce0(%rip),%rsi
call   1040 <strcat@plt>
jmp    14d0 <iso7816_stringify_sw+0x3b0>
lea    0x2b94(%rip),%rdi
lea    0xe37(%rip),%rsi
call   1040 <strcat@plt>
jmp    14d0 <iso7816_stringify_sw+0x3b0>
lea    0x2b7c(%rip),%rdi
lea    0xe3d(%rip),%rsi
call   1040 <strcat@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
lea    0x2b64(%rip),%rdi
lea    0xe44(%rip),%rsi
call   1030 <strcpy@plt>
movzbl -0xa(%rbp),%eax
mov    %eax,-0x2c(%rbp)
test   %eax,%eax
je     1594 <iso7816_stringify_sw+0x474>
jmp    14fc <iso7816_stringify_sw+0x3dc>
mov    -0x2c(%rbp),%eax
sub    $0x81,%eax
je     15ac <iso7816_stringify_sw+0x48c>
jmp    150f <iso7816_stringify_sw+0x3ef>
mov    -0x2c(%rbp),%eax
sub    $0x82,%eax
je     15c4 <iso7816_stringify_sw+0x4a4>
jmp    1522 <iso7816_stringify_sw+0x402>
mov    -0x2c(%rbp),%eax
sub    $0x83,%eax
je     15dc <iso7816_stringify_sw+0x4bc>
jmp    1535 <iso7816_stringify_sw+0x415>
mov    -0x2c(%rbp),%eax
sub    $0x84,%eax
je     15f4 <iso7816_stringify_sw+0x4d4>
jmp    1548 <iso7816_stringify_sw+0x428>
mov    -0x2c(%rbp),%eax
sub    $0x85,%eax
je     160c <iso7816_stringify_sw+0x4ec>
jmp    155b <iso7816_stringify_sw+0x43b>
mov    -0x2c(%rbp),%eax
sub    $0x86,%eax
je     1624 <iso7816_stringify_sw+0x504>
jmp    156e <iso7816_stringify_sw+0x44e>
mov    -0x2c(%rbp),%eax
sub    $0x87,%eax
je     163c <iso7816_stringify_sw+0x51c>
jmp    1581 <iso7816_stringify_sw+0x461>
mov    -0x2c(%rbp),%eax
sub    $0x88,%eax
je     1654 <iso7816_stringify_sw+0x534>
jmp    1667 <iso7816_stringify_sw+0x547>
lea    0x2aa5(%rip),%rdi
lea    0xbd9(%rip),%rsi
call   1040 <strcat@plt>
jmp    1667 <iso7816_stringify_sw+0x547>
lea    0x2a8d(%rip),%rdi
lea    0xd84(%rip),%rsi
call   1040 <strcat@plt>
jmp    1667 <iso7816_stringify_sw+0x547>
lea    0x2a75(%rip),%rdi
lea    0xd95(%rip),%rsi
call   1040 <strcat@plt>
jmp    1667 <iso7816_stringify_sw+0x547>
lea    0x2a5d(%rip),%rdi
lea    0xd9b(%rip),%rsi
call   1040 <strcat@plt>
jmp    1667 <iso7816_stringify_sw+0x547>
lea    0x2a45(%rip),%rdi
lea    0xda1(%rip),%rsi
call   1040 <strcat@plt>
jmp    1667 <iso7816_stringify_sw+0x547>
lea    0x2a2d(%rip),%rdi
lea    0xda5(%rip),%rsi
call   1040 <strcat@plt>
jmp    1667 <iso7816_stringify_sw+0x547>
lea    0x2a15(%rip),%rdi
lea    0xdad(%rip),%rsi
call   1040 <strcat@plt>
jmp    1667 <iso7816_stringify_sw+0x547>
lea    0x29fd(%rip),%rdi
lea    0xdb9(%rip),%rsi
call   1040 <strcat@plt>
jmp    1667 <iso7816_stringify_sw+0x547>
lea    0x29e5(%rip),%rdi
lea    0xdc2(%rip),%rsi
call   1040 <strcat@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
lea    0x29cd(%rip),%rdi
lea    0xdc4(%rip),%rsi
call   1030 <strcpy@plt>
movzbl -0xa(%rbp),%eax
mov    %eax,-0x30(%rbp)
test   %eax,%eax
je     173e <iso7816_stringify_sw+0x61e>
jmp    1693 <iso7816_stringify_sw+0x573>
mov    -0x30(%rbp),%eax
sub    $0x80,%eax
je     1756 <iso7816_stringify_sw+0x636>
jmp    16a6 <iso7816_stringify_sw+0x586>
mov    -0x30(%rbp),%eax
sub    $0x81,%eax
je     176e <iso7816_stringify_sw+0x64e>
jmp    16b9 <iso7816_stringify_sw+0x599>
mov    -0x30(%rbp),%eax
sub    $0x82,%eax
je     1786 <iso7816_stringify_sw+0x666>
jmp    16cc <iso7816_stringify_sw+0x5ac>
mov    -0x30(%rbp),%eax
sub    $0x83,%eax
je     179e <iso7816_stringify_sw+0x67e>
jmp    16df <iso7816_stringify_sw+0x5bf>
mov    -0x30(%rbp),%eax
sub    $0x84,%eax
je     17b6 <iso7816_stringify_sw+0x696>
jmp    16f2 <iso7816_stringify_sw+0x5d2>
mov    -0x30(%rbp),%eax
sub    $0x85,%eax
je     17ce <iso7816_stringify_sw+0x6ae>
jmp    1705 <iso7816_stringify_sw+0x5e5>
mov    -0x30(%rbp),%eax
sub    $0x86,%eax
je     17e6 <iso7816_stringify_sw+0x6c6>
jmp    1718 <iso7816_stringify_sw+0x5f8>
mov    -0x30(%rbp),%eax
sub    $0x87,%eax
je     17fe <iso7816_stringify_sw+0x6de>
jmp    172b <iso7816_stringify_sw+0x60b>
mov    -0x30(%rbp),%eax
sub    $0x88,%eax
je     1816 <iso7816_stringify_sw+0x6f6>
jmp    1829 <iso7816_stringify_sw+0x709>
lea    0x28fb(%rip),%rdi
lea    0xa2f(%rip),%rsi
call   1040 <strcat@plt>
jmp    1829 <iso7816_stringify_sw+0x709>
lea    0x28e3(%rip),%rdi
lea    0xcf6(%rip),%rsi
call   1040 <strcat@plt>
jmp    1829 <iso7816_stringify_sw+0x709>
lea    0x28cb(%rip),%rdi
lea    0xd05(%rip),%rsi
call   1040 <strcat@plt>
jmp    1829 <iso7816_stringify_sw+0x709>
lea    0x28b3(%rip),%rdi
lea    0xd04(%rip),%rsi
call   1040 <strcat@plt>
jmp    1829 <iso7816_stringify_sw+0x709>
lea    0x289b(%rip),%rdi
lea    0xcfb(%rip),%rsi
call   1040 <strcat@plt>
jmp    1829 <iso7816_stringify_sw+0x709>
lea    0x2883(%rip),%rdi
lea    0xcf4(%rip),%rsi
call   1040 <strcat@plt>
jmp    1829 <iso7816_stringify_sw+0x709>
lea    0x286b(%rip),%rdi
lea    0xd00(%rip),%rsi
call   1040 <strcat@plt>
jmp    1829 <iso7816_stringify_sw+0x709>
lea    0x2853(%rip),%rdi
lea    0xd0b(%rip),%rsi
call   1040 <strcat@plt>
jmp    1829 <iso7816_stringify_sw+0x709>
lea    0x283b(%rip),%rdi
lea    0xd0e(%rip),%rsi
call   1040 <strcat@plt>
jmp    1829 <iso7816_stringify_sw+0x709>
lea    0x2823(%rip),%rdi
lea    0xd11(%rip),%rsi
call   1040 <strcat@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
movzwl -0xa(%rbp),%eax
cmp    $0x6b00,%eax
jne    1855 <iso7816_stringify_sw+0x735>
lea    0x27fc(%rip),%rdi
lea    0xd04(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1868 <iso7816_stringify_sw+0x748>
lea    0x27e4(%rip),%rdi
lea    0xd05(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
lea    0x27cc(%rip),%rdi
lea    0xd05(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
movzwl -0xa(%rbp),%eax
cmp    $0x6d00,%eax
jne    18ac <iso7816_stringify_sw+0x78c>
lea    0x27a5(%rip),%rdi
lea    0xcf7(%rip),%rsi
call   1030 <strcpy@plt>
jmp    18bf <iso7816_stringify_sw+0x79f>
lea    0x278d(%rip),%rdi
lea    0xd09(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
movzwl -0xa(%rbp),%eax
cmp    $0x6e00,%eax
jne    18eb <iso7816_stringify_sw+0x7cb>
lea    0x2766(%rip),%rdi
lea    0xcfa(%rip),%rsi
call   1030 <strcpy@plt>
jmp    18fe <iso7816_stringify_sw+0x7de>
lea    0x274e(%rip),%rdi
lea    0xcf6(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
movzwl -0xa(%rbp),%eax
cmp    $0x6fff,%eax
jne    192a <iso7816_stringify_sw+0x80a>
lea    0x2727(%rip),%rdi
lea    0xce7(%rip),%rsi
call   1030 <strcpy@plt>
jmp    193d <iso7816_stringify_sw+0x81d>
lea    0x270f(%rip),%rdi
lea    0xcf0(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
lea    0x26f7(%rip),%rdi
lea    0xced(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
movzbl -0xa(%rbp),%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
sub    $0x8,%eax
ja     19dc <iso7816_stringify_sw+0x8bc>
mov    -0x38(%rbp),%rax
lea    0x784(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x26b8(%rip),%rdi
lea    0xcdf(%rip),%rsi
call   1030 <strcpy@plt>
jmp    19dc <iso7816_stringify_sw+0x8bc>
lea    0x26a0(%rip),%rdi
lea    0xcdc(%rip),%rsi
call   1030 <strcpy@plt>
jmp    19dc <iso7816_stringify_sw+0x8bc>
lea    0x2688(%rip),%rdi
lea    0xce9(%rip),%rsi
call   1030 <strcpy@plt>
jmp    19dc <iso7816_stringify_sw+0x8bc>
lea    0x2670(%rip),%rdi
lea    0xcf4(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
movzbl -0xa(%rbp),%eax
mov    %eax,-0x3c(%rbp)
sub    $0x2,%eax
je     1a4b <iso7816_stringify_sw+0x92b>
jmp    19f6 <iso7816_stringify_sw+0x8d6>
mov    -0x3c(%rbp),%eax
sub    $0x4,%eax
je     1a63 <iso7816_stringify_sw+0x943>
jmp    1a07 <iso7816_stringify_sw+0x8e7>
mov    -0x3c(%rbp),%eax
sub    $0x8,%eax
je     1a7b <iso7816_stringify_sw+0x95b>
jmp    1a18 <iso7816_stringify_sw+0x8f8>
mov    -0x3c(%rbp),%eax
sub    $0x10,%eax
je     1a93 <iso7816_stringify_sw+0x973>
jmp    1a29 <iso7816_stringify_sw+0x909>
mov    -0x3c(%rbp),%eax
sub    $0x40,%eax
je     1aab <iso7816_stringify_sw+0x98b>
jmp    1a3a <iso7816_stringify_sw+0x91a>
mov    -0x3c(%rbp),%eax
sub    $0x50,%eax
je     1ac3 <iso7816_stringify_sw+0x9a3>
jmp    1ad6 <iso7816_stringify_sw+0x9b6>
lea    0x25ee(%rip),%rdi
lea    0xc9b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1ad6 <iso7816_stringify_sw+0x9b6>
lea    0x25d6(%rip),%rdi
lea    0xc9c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1ad6 <iso7816_stringify_sw+0x9b6>
lea    0x25be(%rip),%rdi
lea    0xca0(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1ad6 <iso7816_stringify_sw+0x9b6>
lea    0x25a6(%rip),%rdi
lea    0xcaf(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1ad6 <iso7816_stringify_sw+0x9b6>
lea    0x258e(%rip),%rdi
lea    0xcc2(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1ad6 <iso7816_stringify_sw+0x9b6>
lea    0x2576(%rip),%rdi
lea    0xcd8(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
lea    0x255e(%rip),%rdi
lea    0xcea(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
movzwl -0xa(%rbp),%eax
sar    $0xc,%eax
cmp    $0x9,%eax
jne    1b1b <iso7816_stringify_sw+0x9fb>
lea    0x2536(%rip),%rdi
lea    0xce2(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1b2e <iso7816_stringify_sw+0xa0e>
lea    0x251e(%rip),%rdi
lea    0xceb(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1b33 <iso7816_stringify_sw+0xa13>
lea    0x2506(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iso7816_stringify_sw>:
push   %rbx
movb   $0x0,0x2f28(%rip)
cmp    $0x9000,%edi
jne    1140 <iso7816_stringify_sw+0x30>
movups 0x1001(%rip),%xmm0
movaps %xmm0,0x2f12(%rip)
movw   $0x67,0x2f19(%rip)
lea    0x2f02(%rip),%rax
pop    %rbx
ret
mov    %edi,%ebx
mov    %edi,%eax
shr    $0x8,%eax
lea    -0x61(%rax),%ecx
cmp    $0xe,%cl
ja     1180 <iso7816_stringify_sw+0x70>
movzbl %cl,%eax
lea    0xedf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movups 0xfe0(%rip),%xmm0
movups %xmm0,0x2edf(%rip)
movups 0xfc3(%rip),%xmm0
movaps %xmm0,0x2ec2(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
add    $0x6e,%al
cmp    $0xd,%al
ja     15fc <iso7816_stringify_sw+0x4ec>
movzbl %al,%eax
lea    0xe6c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movups 0x14c1(%rip),%xmm0
movaps %xmm0,0x2eb5(%rip)
movups 0x14a3(%rip),%xmm0
movaps %xmm0,0x2e97(%rip)
movups 0x1485(%rip),%xmm0
movaps %xmm0,0x2e79(%rip)
movb   $0x0,0x2ea2(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0x1611(%rip),%xmm0
movaps %xmm0,0x2e6f(%rip)
movups 0x15f3(%rip),%xmm0
movaps %xmm0,0x2e51(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
cmp    $0x8,%bl
ja     1137 <iso7816_stringify_sw+0x27>
movzwl %bx,%eax
movzbl %al,%eax
lea    0xea6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movups 0x145c(%rip),%xmm0
movaps %xmm0,0x2e1f(%rip)
movabs $0x64657463656c65,%rax
mov    %rax,0x2e1b(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
lea    -0x2(%rbx),%eax
cmp    $0xe,%al
ja     1699 <iso7816_stringify_sw+0x589>
movzbl %al,%eax
lea    0xe28(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movups 0x14a9(%rip),%xmm0
movups %xmm0,0x2de6(%rip)
movups 0x1492(%rip),%xmm0
movaps %xmm0,0x2dcf(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0xfbb(%rip),%xmm0
movaps %xmm0,0x2dcc(%rip)
movups 0xf9d(%rip),%xmm0
movaps %xmm0,0x2dae(%rip)
movabs $0x202d206465676e,%rax
mov    %rax,0x2dbd(%rip)
test   %bl,%bl
je     16da <iso7816_stringify_sw+0x5ca>
cmp    $0x81,%bl
jne    16ed <iso7816_stringify_sw+0x5dd>
lea    0xf95(%rip),%rsi
jmp    16e1 <iso7816_stringify_sw+0x5d1>
movups 0xf71(%rip),%xmm0
movaps %xmm0,0x2d82(%rip)
movups 0xf53(%rip),%xmm0
movaps %xmm0,0x2d64(%rip)
movabs $0x202d206465676e,%rax
mov    %rax,0x2d73(%rip)
cmp    $0x81,%bl
jne    1582 <iso7816_stringify_sw+0x472>
lea    0x2d43(%rip),%rdi
lea    0xf7e(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0x113d(%rip),%xmm0
movups %xmm0,0x2d30(%rip)
movups 0x1123(%rip),%xmm0
movaps %xmm0,0x2d16(%rip)
lea    -0x80(%rbx),%eax
cmp    $0x8,%al
ja     1582 <iso7816_stringify_sw+0x472>
movzbl %al,%eax
lea    0xd95(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x2cf1(%rip),%rdi
lea    0x110c(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0x122a(%rip),%xmm0
movups %xmm0,0x2cdb(%rip)
movups 0x1213(%rip),%xmm0
movaps %xmm0,0x2cc4(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
movzwl %bx,%eax
cmp    $0x6d00,%eax
jne    1636 <iso7816_stringify_sw+0x526>
movups 0x1225(%rip),%xmm0
movups %xmm0,0x2cbd(%rip)
movups 0x120d(%rip),%xmm0
movaps %xmm0,0x2ca5(%rip)
movups 0x11ef(%rip),%xmm0
movaps %xmm0,0x2c87(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
movzwl %bx,%eax
cmp    $0x6fff,%eax
jne    163f <iso7816_stringify_sw+0x52f>
movups 0x124c(%rip),%xmm0
movaps %xmm0,0x2c76(%rip)
movups 0x122e(%rip),%xmm0
jmp    1623 <iso7816_stringify_sw+0x513>
movups 0xd86(%rip),%xmm0
movups %xmm0,0x2c66(%rip)
movups 0xd6e(%rip),%xmm0
movaps %xmm0,0x2c4e(%rip)
movups 0xd50(%rip),%xmm0
movaps %xmm0,0x2c30(%rip)
lea    0x7f(%rbx),%eax
cmp    $0x3,%al
ja     1582 <iso7816_stringify_sw+0x472>
movzbl %al,%eax
lea    0xcf3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x2c0b(%rip),%rdi
lea    0xd5c(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0xd26(%rip),%xmm0
movups %xmm0,0x2c06(%rip)
movups 0xd0e(%rip),%xmm0
movaps %xmm0,0x2bee(%rip)
movups 0xcf0(%rip),%xmm0
movaps %xmm0,0x2bd0(%rip)
test   %bl,%bl
jne    1137 <iso7816_stringify_sw+0x27>
lea    0x2bc1(%rip),%rdi
lea    0xdf9(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0xe04(%rip),%xmm0
movups %xmm0,0x2bac(%rip)
movups 0xdec(%rip),%xmm0
movaps %xmm0,0x2b94(%rip)
jmp    1582 <iso7816_stringify_sw+0x472>
movzwl %bx,%eax
cmp    $0x6700,%eax
jne    1663 <iso7816_stringify_sw+0x553>
movabs $0x6874676e656c20,%rax
mov    %rax,0x2b75(%rip)
movabs $0x656c20676e6f7257,%rax
20 6c 65
mov    %rax,0x2b5f(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0xdf3(%rip),%xmm0
movaps %xmm0,0x2b5c(%rip)
movups 0xdd5(%rip),%xmm0
movaps %xmm0,0x2b3e(%rip)
movw   $0x20,0x2b55(%rip)
cmp    $0x81,%bl
je     1734 <iso7816_stringify_sw+0x624>
cmp    $0x82,%bl
jne    1582 <iso7816_stringify_sw+0x472>
lea    0x2b20(%rip),%rdi
lea    0xde9(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0xdf7(%rip),%xmm0
movaps %xmm0,0x2b01(%rip)
movabs $0x202d206465776f,%rax
mov    %rax,0x2aff(%rip)
lea    0x7f(%rbx),%eax
cmp    $0x7,%al
ja     1582 <iso7816_stringify_sw+0x472>
movzbl %al,%eax
lea    0xb97(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x2acf(%rip),%rdi
lea    0xdce(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
test   %bl,%bl
jne    1137 <iso7816_stringify_sw+0x27>
lea    0x2aaf(%rip),%rdi
lea    0xbeb(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
movzwl %bx,%eax
cmp    $0x6b00,%eax
jne    166c <iso7816_stringify_sw+0x55c>
movups 0xfa9(%rip),%xmm0
movups %xmm0,0x2a8b(%rip)
movups 0xf92(%rip),%xmm0
movaps %xmm0,0x2a74(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
movzwl %bx,%eax
cmp    $0x6e00,%eax
jne    1675 <iso7816_stringify_sw+0x565>
movups 0xffd(%rip),%xmm0
movaps %xmm0,0x2a53(%rip)
movl   $0x646574,0x2a59(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
and    $0xf000,%ebx
cmp    $0x9000,%ebx
jne    1717 <iso7816_stringify_sw+0x607>
movups 0x11f6(%rip),%xmm0
movaps %xmm0,0x2a34(%rip)
movups 0x11d8(%rip),%xmm0
movaps %xmm0,0x2a16(%rip)
movb   $0x0,0x2a2f(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0xf8e(%rip),%xmm0
jmp    167c <iso7816_stringify_sw+0x56c>
movups 0xfea(%rip),%xmm0
movaps %xmm0,0x29f3(%rip)
movabs $0x7369736f6e6761,%rax
mov    %rax,0x29ef(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0xc4e(%rip),%xmm0
jmp    167c <iso7816_stringify_sw+0x56c>
movups 0xefd(%rip),%xmm0
jmp    167c <iso7816_stringify_sw+0x56c>
movups 0xf7b(%rip),%xmm0
movaps %xmm0,0x29bd(%rip)
movabs $0x65646f6320726f,%rax
mov    %rax,0x29bc(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
cmp    $0x40,%bl
je     18a2 <iso7816_stringify_sw+0x792>
cmp    $0x50,%bl
jne    1137 <iso7816_stringify_sw+0x27>
movups 0x1119(%rip),%xmm0
movups %xmm0,0x29a1(%rip)
movups 0x1101(%rip),%xmm0
movaps %xmm0,0x2989(%rip)
movups 0x10e3(%rip),%xmm0
movaps %xmm0,0x296b(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0xaa2(%rip),%rsi
lea    0x2958(%rip),%rdi
call   1030 <strcat@plt>
and    $0xf0,%ebx
cmp    $0xc0,%ebx
jne    1137 <iso7816_stringify_sw+0x27>
lea    0x293a(%rip),%rdi
lea    0xb64(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0x10fe(%rip),%xmm0
movaps %xmm0,0x291b(%rip)
movl   $0x64726f,0x2920(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x2905(%rip),%rdi
lea    0xbb0(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0xf48(%rip),%xmm0
movaps %xmm0,0x28f6(%rip)
movups 0xf2a(%rip),%xmm0
movaps %xmm0,0x28d8(%rip)
movabs $0x29737365726464,%rax
mov    %rax,0x28e4(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0xf3b(%rip),%xmm0
movaps %xmm0,0x28c4(%rip)
movups 0xf1d(%rip),%xmm0
movaps %xmm0,0x28a6(%rip)
movl   $0x646e75,0x28bb(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0xf3c(%rip),%xmm0
movups %xmm0,0x28a2(%rip)
movups 0xf25(%rip),%xmm0
movaps %xmm0,0x288b(%rip)
movups 0xf07(%rip),%xmm0
movaps %xmm0,0x286d(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0xf42(%rip),%xmm0
movups %xmm0,0x2866(%rip)
movups 0xf28(%rip),%xmm0
movaps %xmm0,0x284c(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0xf41(%rip),%xmm0
movaps %xmm0,0x2849(%rip)
movups 0xf23(%rip),%xmm0
movaps %xmm0,0x282b(%rip)
movabs $0x73757461747320,%rax
mov    %rax,0x2839(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0xf41(%rip),%xmm0
movups %xmm0,0x2822(%rip)
movups 0xf28(%rip),%xmm0
movaps %xmm0,0x2809(%rip)
movups 0xf0a(%rip),%xmm0
movaps %xmm0,0x27eb(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x27df(%rip),%rdi
lea    0x957(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x27c7(%rip),%rdi
lea    0x972(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x27af(%rip),%rdi
lea    0x974(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
movups 0xef8(%rip),%xmm0
movups %xmm0,0x27ae(%rip)
movups 0xedc(%rip),%xmm0
movaps %xmm0,0x2792(%rip)
movups 0xebe(%rip),%xmm0
movaps %xmm0,0x2774(%rip)
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x2768(%rip),%rdi
lea    0xbaa(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x2750(%rip),%rdi
lea    0xba9(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x2738(%rip),%rdi
lea    0xba0(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x2720(%rip),%rdi
lea    0xb99(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x2708(%rip),%rdi
lea    0xba5(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x26f0(%rip),%rdi
lea    0xbb0(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x26d8(%rip),%rdi
lea    0xbb3(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x26c0(%rip),%rdi
lea    0xbb6(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x26a8(%rip),%rdi
lea    0x9d0(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x2690(%rip),%rdi
lea    0x9d6(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x2678(%rip),%rdi
lea    0x9dc(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x2660(%rip),%rdi
lea    0x9e0(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x2648(%rip),%rdi
lea    0x9e8(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x2630(%rip),%rdi
lea    0x9f4(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>
lea    0x2618(%rip),%rdi
lea    0x9fd(%rip),%rsi
call   1030 <strcat@plt>
jmp    1137 <iso7816_stringify_sw+0x27>

LLVM IR (-O0):
@iso7816_stringify_sw.msg = internal global [200 x i8] zeroinitializer
@.str = [18 x i8] c"Normal processing\00"
@.str.1 = [31 x i8] c"More bytes available (see SW2)\00"
@.str.2 = [42 x i8] c"State of non-volatile memory unchanged - \00"
@.str.3 = [21 x i8] c"No information given\00"
@.str.4 = [39 x i8] c"Part of returned data may be corrupted\00"
@.str.5 = [51 x i8] c"End of file/record reached before reading Le bytes\00"
@.str.6 = [26 x i8] c"Selected file invalidated\00"
@.str.7 = [28 x i8] c"FCI not formatted correctly\00"
@.str.8 = [40 x i8] c"State of non-volatile memory changed - \00"
@.str.9 = [33 x i8] c"File filled up by the last write\00"
@.str.10 = [14 x i8] c"Counter value\00"
@.str.11 = [3 x i8] c"OK\00"
@.str.12 = [15 x i8] c"Memory failure\00"
@.str.13 = [26 x i8] c"security-related issue - \00"
@.str.14 = [13 x i8] c"Wrong length\00"
@.str.15 = [24 x i8] c"Unknown 67XX error code\00"
@.str.16 = [34 x i8] c"Functions in CLA not supported - \00"
@.str.17 = [30 x i8] c"Logical channel not supported\00"
@.str.18 = [31 x i8] c"Secure messaging not supported\00"
@.str.19 = [23 x i8] c"Command not allowed - \00"
@.str.20 = [41 x i8] c"Command incompatible with file structure\00"
@.str.21 = [30 x i8] c"Security status not satisfied\00"
@.str.22 = [30 x i8] c"Authentication method blocked\00"
@.str.23 = [28 x i8] c"Referenced data invalidated\00"
@.str.24 = [32 x i8] c"Conditions of use not satisfied\00"
@.str.25 = [36 x i8] c"Command not allowed (no current EF)\00"
@.str.26 = [33 x i8] c"Expected SM data objects missing\00"
@.str.27 = [26 x i8] c"SM data objects incorrect\00"
@.str.28 = [28 x i8] c"Wrong parameter(s) P1-P2 - \00"
@.str.29 = [39 x i8] c"Incorrect parameters in the data field\00"
@.str.30 = [23 x i8] c"Function not supported\00"
@.str.31 = [15 x i8] c"File not found\00"
@.str.32 = [17 x i8] c"Record not found\00"
@.str.33 = [36 x i8] c"Not enough memory space in the file\00"
@.str.34 = [35 x i8] c"Lc inconsistent with TLV structure\00"
@.str.35 = [27 x i8] c"Incorrect parameters P1-P2\00"
@.str.36 = [27 x i8] c"Lc inconsistent with P1-P2\00"
@.str.37 = [26 x i8] c"Referenced data not found\00"
@.str.38 = [25 x i8] c"Wrong parameter(s) P1-P2\00"
@.str.39 = [24 x i8] c"Unknown 6BXX error code\00"
@.str.40 = [25 x i8] c"Wrong length Le, see SW2\00"
@.str.41 = [42 x i8] c"Instruction code not supported or invalid\00"
@.str.42 = [24 x i8] c"Unknown 6DXX error code\00"
@.str.43 = [20 x i8] c"Class not supported\00"
@.str.44 = [24 x i8] c"Unknown 6EXX error code\00"
@.str.45 = [33 x i8] c"Cardpeek application-level error\00"
@.str.46 = [21 x i8] c"No precise diagnosis\00"
@.str.47 = [49 x i8] c"GSM - Update successful after n reties (see SW2)\00"
@.str.48 = [21 x i8] c"GSM - No EF selected\00"
@.str.49 = [37 x i8] c"GSM - Out of range (invalid address)\00"
@.str.50 = [35 x i8] c"GSM - File ID or pattern not found\00"
@.str.51 = [41 x i8] c"GSM - File inconsistent with the command\00"
@.str.52 = [25 x i8] c"GSM - No CHV initilaized\00"
@.str.53 = [28 x i8] c"GSM - Authentication failed\00"
@.str.54 = [39 x i8] c"GSM - In contradiction with CHV status\00"
@.str.55 = [43 x i8] c"GSM - In contradiction invalidation status\00"
@.str.56 = [46 x i8] c"GSM - Authentication failed, no attempts left\00"
@.str.57 = [42 x i8] c"GSM - Increase failed, max. vaule reached\00"
@.str.58 = [32 x i8] c"GSM - Length of response in SW2\00"
@.str.59 = [33 x i8] c"Application specific Status Word\00"
@.str.60 = [19 x i8] c"Unkown Status Word\00"
define i8* @iso7816_stringify_sw(i16 zeroext %0) {
%2 = alloca i8*
%3 = alloca i16
store i16 %0, i16* %3
store i8 0, i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0)
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = icmp eq i32 %5, 36864
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i8* %8, i8** %2
br label %229
9: ; preds = %1
%10 = load i16, i16* %3
%11 = zext i16 %10 to i32
%12 = ashr i32 %11, 8
switch i32 %12, label %218 [
i32 97, label %13
i32 98, label %15
i32 99, label %31
i32 100, label %48
i32 101, label %57
i32 102, label %67
i32 103, label %75
i32 104, label %84
i32 105, label %96
i32 106, label %120
i32 107, label %146
i32 108, label %155
i32 109, label %157
i32 110, label %166
i32 111, label %175
i32 146, label %184
i32 148, label %186
i32 152, label %199
i32 159, label %216
]
13: ; preds = %9
%14 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
br label %228
15: ; preds = %9
%16 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%17 = load i16, i16* %3
%18 = zext i16 %17 to i32
%19 = and i32 %18, 255
switch i32 %19, label %30 [
i32 0, label %20
i32 129, label %22
i32 130, label %24
i32 131, label %26
i32 132, label %28
]
20: ; preds = %15
%21 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %30
22: ; preds = %15
%23 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
br label %30
24: ; preds = %15
%25 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0))
br label %30
26: ; preds = %15
%27 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
br label %30
28: ; preds = %15
%29 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
br label %30
30: ; preds = %15, %28, %26, %24, %22, %20
br label %228
31: ; preds = %9
%32 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%33 = load i16, i16* %3
%34 = zext i16 %33 to i32
%35 = and i32 %34, 255
switch i32 %35, label %40 [
i32 0, label %36
i32 129, label %38
]
36: ; preds = %31
%37 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %40
38: ; preds = %31
%39 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
br label %40
40: ; preds = %31, %38, %36
%41 = load i16, i16* %3
%42 = zext i16 %41 to i32
%43 = and i32 %42, 240
%44 = icmp eq i32 %43, 192
br i1 %44, label %45, label %47
45: ; preds = %40
%46 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %47
47: ; preds = %45, %40
br label %228
48: ; preds = %9
%49 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%50 = load i16, i16* %3
%51 = zext i16 %50 to i32
%52 = and i32 %51, 255
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %48
%55 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
br label %56
56: ; preds = %54, %48
br label %228
57: ; preds = %9
%58 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%59 = load i16, i16* %3
%60 = zext i16 %59 to i32
%61 = and i32 %60, 255
switch i32 %61, label %66 [
i32 0, label %62
i32 129, label %64
]
62: ; preds = %57
%63 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %66
64: ; preds = %57
%65 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.12, i64 0, i64 0))
br label %66
66: ; preds = %57, %64, %62
br label %228
67: ; preds = %9
%68 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0))
%69 = load i16, i16* %3
%70 = zext i16 %69 to i32
%71 = and i32 %70, 255
switch i32 %71, label %74 [
i32 0, label %72
]
72: ; preds = %67
%73 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %74
74: ; preds = %67, %72
br label %228
75: ; preds = %9
%76 = load i16, i16* %3
%77 = zext i16 %76 to i32
%78 = icmp eq i32 %77, 26368
br i1 %78, label %79, label %81
79: ; preds = %75
%80 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
br label %83
81: ; preds = %75
%82 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.15, i64 0, i64 0))
br label %83
83: ; preds = %81, %79
br label %228
84: ; preds = %9
%85 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.16, i64 0, i64 0))
%86 = load i16, i16* %3
%87 = zext i16 %86 to i32
%88 = and i32 %87, 255
switch i32 %88, label %95 [
i32 0, label %89
i32 129, label %91
i32 130, label %93
]
89: ; preds = %84
%90 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %95
91: ; preds = %84
%92 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.17, i64 0, i64 0))
br label %95
93: ; preds = %84
%94 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0))
br label %95
95: ; preds = %84, %93, %91, %89
br label %228
96: ; preds = %9
%97 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.19, i64 0, i64 0))
%98 = load i16, i16* %3
%99 = zext i16 %98 to i32
%100 = and i32 %99, 255
switch i32 %100, label %119 [
i32 0, label %101
i32 129, label %103
i32 130, label %105
i32 131, label %107
i32 132, label %109
i32 133, label %111
i32 134, label %113
i32 135, label %115
i32 136, label %117
]
101: ; preds = %96
%102 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %119
103: ; preds = %96
%104 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.20, i64 0, i64 0))
br label %119
105: ; preds = %96
%106 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.21, i64 0, i64 0))
br label %119
107: ; preds = %96
%108 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.22, i64 0, i64 0))
br label %119
109: ; preds = %96
%110 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.23, i64 0, i64 0))
br label %119
111: ; preds = %96
%112 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.24, i64 0, i64 0))
br label %119
113: ; preds = %96
%114 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.25, i64 0, i64 0))
br label %119
115: ; preds = %96
%116 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.26, i64 0, i64 0))
br label %119
117: ; preds = %96
%118 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.27, i64 0, i64 0))
br label %119
119: ; preds = %96, %117, %115, %113, %111, %109, %107, %105, %103, %101
br label %228
120: ; preds = %9
%121 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.28, i64 0, i64 0))
%122 = load i16, i16* %3
%123 = zext i16 %122 to i32
%124 = and i32 %123, 255
switch i32 %124, label %145 [
i32 0, label %125
i32 128, label %127
i32 129, label %129
i32 130, label %131
i32 131, label %133
i32 132, label %135
i32 133, label %137
i32 134, label %139
i32 135, label %141
i32 136, label %143
]
125: ; preds = %120
%126 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %145
127: ; preds = %120
%128 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.29, i64 0, i64 0))
br label %145
129: ; preds = %120
%130 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.30, i64 0, i64 0))
br label %145
131: ; preds = %120
%132 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.31, i64 0, i64 0))
br label %145
133: ; preds = %120
%134 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.32, i64 0, i64 0))
br label %145
135: ; preds = %120
%136 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.33, i64 0, i64 0))
br label %145
137: ; preds = %120
%138 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.34, i64 0, i64 0))
br label %145
139: ; preds = %120
%140 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.35, i64 0, i64 0))
br label %145
141: ; preds = %120
%142 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.36, i64 0, i64 0))
br label %145
143: ; preds = %120
%144 = call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.37, i64 0, i64 0))
br label %145
145: ; preds = %120, %143, %141, %139, %137, %135, %133, %131, %129, %127, %125
br label %228
146: ; preds = %9
%147 = load i16, i16* %3
%148 = zext i16 %147 to i32
%149 = icmp eq i32 %148, 27392
br i1 %149, label %150, label %152
150: ; preds = %146
%151 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.38, i64 0, i64 0))
br label %154
152: ; preds = %146
%153 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.39, i64 0, i64 0))
br label %154
154: ; preds = %152, %150
br label %228
155: ; preds = %9
%156 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.40, i64 0, i64 0))
br label %228
157: ; preds = %9
%158 = load i16, i16* %3
%159 = zext i16 %158 to i32
%160 = icmp eq i32 %159, 27904
br i1 %160, label %161, label %163
161: ; preds = %157
%162 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.41, i64 0, i64 0))
br label %165
163: ; preds = %157
%164 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.42, i64 0, i64 0))
br label %165
165: ; preds = %163, %161
br label %228
166: ; preds = %9
%167 = load i16, i16* %3
%168 = zext i16 %167 to i32
%169 = icmp eq i32 %168, 28160
br i1 %169, label %170, label %172
170: ; preds = %166
%171 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.43, i64 0, i64 0))
br label %174
172: ; preds = %166
%173 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.44, i64 0, i64 0))
br label %174
174: ; preds = %172, %170
br label %228
175: ; preds = %9
%176 = load i16, i16* %3
%177 = zext i16 %176 to i32
%178 = icmp eq i32 %177, 28671
br i1 %178, label %179, label %181
179: ; preds = %175
%180 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.45, i64 0, i64 0))
br label %183
181: ; preds = %175
%182 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.46, i64 0, i64 0))
br label %183
183: ; preds = %181, %179
br label %228
184: ; preds = %9
%185 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.47, i64 0, i64 0))
br label %228
186: ; preds = %9
%187 = load i16, i16* %3
%188 = zext i16 %187 to i32
%189 = and i32 %188, 255
switch i32 %189, label %198 [
i32 0, label %190
i32 2, label %192
i32 4, label %194
i32 8, label %196
]
190: ; preds = %186
%191 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.48, i64 0, i64 0))
br label %198
192: ; preds = %186
%193 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.49, i64 0, i64 0))
br label %198
194: ; preds = %186
%195 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.50, i64 0, i64 0))
br label %198
196: ; preds = %186
%197 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.51, i64 0, i64 0))
br label %198
198: ; preds = %186, %196, %194, %192, %190
br label %228
199: ; preds = %9
%200 = load i16, i16* %3
%201 = zext i16 %200 to i32
%202 = and i32 %201, 255
switch i32 %202, label %215 [
i32 2, label %203
i32 4, label %205
i32 8, label %207
i32 16, label %209
i32 64, label %211
i32 80, label %213
]
203: ; preds = %199
%204 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.52, i64 0, i64 0))
br label %215
205: ; preds = %199
%206 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.53, i64 0, i64 0))
br label %215
207: ; preds = %199
%208 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.54, i64 0, i64 0))
br label %215
209: ; preds = %199
%210 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.55, i64 0, i64 0))
br label %215
211: ; preds = %199
%212 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.56, i64 0, i64 0))
br label %215
213: ; preds = %199
%214 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.57, i64 0, i64 0))
br label %215
215: ; preds = %199, %213, %211, %209, %207, %205, %203
br label %228
216: ; preds = %9
%217 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.58, i64 0, i64 0))
br label %228
218: ; preds = %9
%219 = load i16, i16* %3
%220 = zext i16 %219 to i32
%221 = ashr i32 %220, 12
%222 = icmp eq i32 %221, 9
br i1 %222, label %223, label %225
223: ; preds = %218
%224 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.59, i64 0, i64 0))
br label %227
225: ; preds = %218
%226 = call i8* @strcpy(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.60, i64 0, i64 0))
br label %227
227: ; preds = %225, %223
br label %228
228: ; preds = %227, %216, %215, %198, %184, %183, %174, %165, %155, %154, %145, %119, %95, %83, %74, %66, %56, %47, %30, %13
store i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8** %2
br label %229
229: ; preds = %228, %7
%230 = load i8*, i8** %2
ret i8* %230
}

LLVM IR (-O2):
@iso7816_stringify_sw.msg = internal global [200 x i8] zeroinitializer
@.str = [18 x i8] c"Normal processing\00"
@.str.1 = [31 x i8] c"More bytes available (see SW2)\00"
@.str.2 = [42 x i8] c"State of non-volatile memory unchanged - \00"
@.str.3 = [21 x i8] c"No information given\00"
@.str.4 = [39 x i8] c"Part of returned data may be corrupted\00"
@.str.5 = [51 x i8] c"End of file/record reached before reading Le bytes\00"
@.str.6 = [26 x i8] c"Selected file invalidated\00"
@.str.7 = [28 x i8] c"FCI not formatted correctly\00"
@.str.8 = [40 x i8] c"State of non-volatile memory changed - \00"
@.str.9 = [33 x i8] c"File filled up by the last write\00"
@.str.10 = [14 x i8] c"Counter value\00"
@.str.11 = [3 x i8] c"OK\00"
@.str.12 = [15 x i8] c"Memory failure\00"
@.str.13 = [26 x i8] c"security-related issue - \00"
@.str.14 = [13 x i8] c"Wrong length\00"
@.str.15 = [24 x i8] c"Unknown 67XX error code\00"
@.str.16 = [34 x i8] c"Functions in CLA not supported - \00"
@.str.17 = [30 x i8] c"Logical channel not supported\00"
@.str.18 = [31 x i8] c"Secure messaging not supported\00"
@.str.19 = [23 x i8] c"Command not allowed - \00"
@.str.20 = [41 x i8] c"Command incompatible with file structure\00"
@.str.21 = [30 x i8] c"Security status not satisfied\00"
@.str.22 = [30 x i8] c"Authentication method blocked\00"
@.str.23 = [28 x i8] c"Referenced data invalidated\00"
@.str.24 = [32 x i8] c"Conditions of use not satisfied\00"
@.str.25 = [36 x i8] c"Command not allowed (no current EF)\00"
@.str.26 = [33 x i8] c"Expected SM data objects missing\00"
@.str.27 = [26 x i8] c"SM data objects incorrect\00"
@.str.28 = [28 x i8] c"Wrong parameter(s) P1-P2 - \00"
@.str.29 = [39 x i8] c"Incorrect parameters in the data field\00"
@.str.30 = [23 x i8] c"Function not supported\00"
@.str.31 = [15 x i8] c"File not found\00"
@.str.32 = [17 x i8] c"Record not found\00"
@.str.33 = [36 x i8] c"Not enough memory space in the file\00"
@.str.34 = [35 x i8] c"Lc inconsistent with TLV structure\00"
@.str.35 = [27 x i8] c"Incorrect parameters P1-P2\00"
@.str.36 = [27 x i8] c"Lc inconsistent with P1-P2\00"
@.str.37 = [26 x i8] c"Referenced data not found\00"
@.str.38 = [25 x i8] c"Wrong parameter(s) P1-P2\00"
@.str.39 = [24 x i8] c"Unknown 6BXX error code\00"
@.str.40 = [25 x i8] c"Wrong length Le, see SW2\00"
@.str.41 = [42 x i8] c"Instruction code not supported or invalid\00"
@.str.42 = [24 x i8] c"Unknown 6DXX error code\00"
@.str.43 = [20 x i8] c"Class not supported\00"
@.str.44 = [24 x i8] c"Unknown 6EXX error code\00"
@.str.45 = [33 x i8] c"Cardpeek application-level error\00"
@.str.46 = [21 x i8] c"No precise diagnosis\00"
@.str.47 = [49 x i8] c"GSM - Update successful after n reties (see SW2)\00"
@.str.48 = [21 x i8] c"GSM - No EF selected\00"
@.str.49 = [37 x i8] c"GSM - Out of range (invalid address)\00"
@.str.50 = [35 x i8] c"GSM - File ID or pattern not found\00"
@.str.51 = [41 x i8] c"GSM - File inconsistent with the command\00"
@.str.52 = [25 x i8] c"GSM - No CHV initilaized\00"
@.str.53 = [28 x i8] c"GSM - Authentication failed\00"
@.str.54 = [39 x i8] c"GSM - In contradiction with CHV status\00"
@.str.55 = [43 x i8] c"GSM - In contradiction invalidation status\00"
@.str.56 = [46 x i8] c"GSM - Authentication failed, no attempts left\00"
@.str.57 = [42 x i8] c"GSM - Increase failed, max. vaule reached\00"
@.str.58 = [32 x i8] c"GSM - Length of response in SW2\00"
@.str.59 = [33 x i8] c"Application specific Status Word\00"
@.str.60 = [19 x i8] c"Unkown Status Word\00"
define i8* @iso7816_stringify_sw(i16 zeroext %0) {
store i8 0, i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0)
%2 = zext i16 %0 to i32
%3 = icmp eq i16 %0, -28672
br i1 %3, label %4, label %5
4: ; preds = %1
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(18) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(18) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 18, i1 false)
br label %140
5: ; preds = %1
%6 = lshr i16 %0, 8
%7 = trunc i16 %6 to i8
switch i8 %7, label %135 [
i8 97, label %8
i8 98, label %9
i8 99, label %21
i8 100, label %32
i8 101, label %37
i8 102, label %43
i8 103, label %48
i8 104, label %52
i8 105, label %60
i8 106, label %80
i8 107, label %102
i8 108, label %106
i8 109, label %107
i8 110, label %111
i8 111, label %115
i8 -110, label %119
i8 -108, label %120
i8 -104, label %126
i8 -97, label %134
]
8: ; preds = %5
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(31) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(31) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i64 31, i1 false)
br label %140
9: ; preds = %5
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(42) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(42) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i64 42, i1 false)
%10 = trunc i16 %0 to i8
switch i8 %10, label %140 [
i8 0, label %11
i8 -127, label %13
i8 -126, label %15
i8 -125, label %17
i8 -124, label %19
]
11: ; preds = %9
%12 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %140
13: ; preds = %9
%14 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
br label %140
15: ; preds = %9
%16 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0))
br label %140
17: ; preds = %9
%18 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
br label %140
19: ; preds = %9
%20 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
br label %140
21: ; preds = %5
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(40) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(40) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i64 40, i1 false)
%22 = trunc i16 %0 to i8
switch i8 %22, label %27 [
i8 0, label %24
i8 -127, label %23
]
23: ; preds = %21
br label %24
24: ; preds = %21, %23
%25 = phi i8* [ getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0), %23 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), %21 ]
%26 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* %25)
br label %27
27: ; preds = %24, %21
%28 = and i32 %2, 240
%29 = icmp eq i32 %28, 192
br i1 %29, label %30, label %140
30: ; preds = %27
%31 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %140
32: ; preds = %5
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(42) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(42) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i64 42, i1 false)
%33 = and i32 %2, 255
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %140
35: ; preds = %32
%36 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
br label %140
37: ; preds = %5
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(40) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(40) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i64 40, i1 false)
%38 = trunc i16 %0 to i8
switch i8 %38, label %140 [
i8 0, label %39
i8 -127, label %41
]
39: ; preds = %37
%40 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %140
41: ; preds = %37
%42 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.12, i64 0, i64 0))
br label %140
43: ; preds = %5
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(26) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(26) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0), i64 26, i1 false)
%44 = and i32 %2, 255
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %140
46: ; preds = %43
%47 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %140
48: ; preds = %5
%49 = icmp eq i16 %0, 26368
br i1 %49, label %50, label %51
50: ; preds = %48
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(13) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0), i64 13, i1 false)
br label %140
51: ; preds = %48
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(24) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(24) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.15, i64 0, i64 0), i64 24, i1 false)
br label %140
52: ; preds = %5
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(34) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(34) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.16, i64 0, i64 0), i64 34, i1 false)
%53 = trunc i16 %0 to i8
switch i8 %53, label %140 [
i8 0, label %54
i8 -127, label %56
i8 -126, label %58
]
54: ; preds = %52
%55 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %140
56: ; preds = %52
%57 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.17, i64 0, i64 0))
br label %140
58: ; preds = %52
%59 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0))
br label %140
60: ; preds = %5
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(23) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(23) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.19, i64 0, i64 0), i64 23, i1 false)
%61 = trunc i16 %0 to i8
switch i8 %61, label %140 [
i8 0, label %62
i8 -127, label %64
i8 -126, label %66
i8 -125, label %68
i8 -124, label %70
i8 -123, label %72
i8 -122, label %74
i8 -121, label %76
i8 -120, label %78
]
62: ; preds = %60
%63 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %140
64: ; preds = %60
%65 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.20, i64 0, i64 0))
br label %140
66: ; preds = %60
%67 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.21, i64 0, i64 0))
br label %140
68: ; preds = %60
%69 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.22, i64 0, i64 0))
br label %140
70: ; preds = %60
%71 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.23, i64 0, i64 0))
br label %140
72: ; preds = %60
%73 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.24, i64 0, i64 0))
br label %140
74: ; preds = %60
%75 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.25, i64 0, i64 0))
br label %140
76: ; preds = %60
%77 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.26, i64 0, i64 0))
br label %140
78: ; preds = %60
%79 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.27, i64 0, i64 0))
br label %140
80: ; preds = %5
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(28) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(28) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.28, i64 0, i64 0), i64 28, i1 false)
%81 = trunc i16 %0 to i8
switch i8 %81, label %140 [
i8 0, label %82
i8 -128, label %84
i8 -127, label %86
i8 -126, label %88
i8 -125, label %90
i8 -124, label %92
i8 -123, label %94
i8 -122, label %96
i8 -121, label %98
i8 -120, label %100
]
82: ; preds = %80
%83 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %140
84: ; preds = %80
%85 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.29, i64 0, i64 0))
br label %140
86: ; preds = %80
%87 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.30, i64 0, i64 0))
br label %140
88: ; preds = %80
%89 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.31, i64 0, i64 0))
br label %140
90: ; preds = %80
%91 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.32, i64 0, i64 0))
br label %140
92: ; preds = %80
%93 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.33, i64 0, i64 0))
br label %140
94: ; preds = %80
%95 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.34, i64 0, i64 0))
br label %140
96: ; preds = %80
%97 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.35, i64 0, i64 0))
br label %140
98: ; preds = %80
%99 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.36, i64 0, i64 0))
br label %140
100: ; preds = %80
%101 = tail call i32 @strcat(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.37, i64 0, i64 0))
br label %140
102: ; preds = %5
%103 = icmp eq i16 %0, 27392
br i1 %103, label %104, label %105
104: ; preds = %102
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(25) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(25) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.38, i64 0, i64 0), i64 25, i1 false)
br label %140
105: ; preds = %102
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(24) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(24) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.39, i64 0, i64 0), i64 24, i1 false)
br label %140
106: ; preds = %5
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(25) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(25) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.40, i64 0, i64 0), i64 25, i1 false)
br label %140
107: ; preds = %5
%108 = icmp eq i16 %0, 27904
br i1 %108, label %109, label %110
109: ; preds = %107
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(42) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(42) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.41, i64 0, i64 0), i64 42, i1 false)
br label %140
110: ; preds = %107
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(24) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(24) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.42, i64 0, i64 0), i64 24, i1 false)
br label %140
111: ; preds = %5
%112 = icmp eq i16 %0, 28160
br i1 %112, label %113, label %114
113: ; preds = %111
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(20) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(20) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.43, i64 0, i64 0), i64 20, i1 false)
br label %140
114: ; preds = %111
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(24) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(24) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.44, i64 0, i64 0), i64 24, i1 false)
br label %140
115: ; preds = %5
%116 = icmp eq i16 %0, 28671
br i1 %116, label %117, label %118
117: ; preds = %115
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(33) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(33) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.45, i64 0, i64 0), i64 33, i1 false)
br label %140
118: ; preds = %115
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(21) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(21) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.46, i64 0, i64 0), i64 21, i1 false)
br label %140
119: ; preds = %5
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(49) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(49) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.47, i64 0, i64 0), i64 49, i1 false)
br label %140
120: ; preds = %5
%121 = trunc i16 %0 to i8
switch i8 %121, label %140 [
i8 0, label %122
i8 2, label %123
i8 4, label %124
i8 8, label %125
]
122: ; preds = %120
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(21) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(21) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.48, i64 0, i64 0), i64 21, i1 false)
br label %140
123: ; preds = %120
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(37) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(37) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.49, i64 0, i64 0), i64 37, i1 false)
br label %140
124: ; preds = %120
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(35) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(35) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.50, i64 0, i64 0), i64 35, i1 false)
br label %140
125: ; preds = %120
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(41) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(41) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.51, i64 0, i64 0), i64 41, i1 false)
br label %140
126: ; preds = %5
%127 = trunc i16 %0 to i8
switch i8 %127, label %140 [
i8 2, label %128
i8 4, label %129
i8 8, label %130
i8 16, label %131
i8 64, label %132
i8 80, label %133
]
128: ; preds = %126
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(25) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(25) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.52, i64 0, i64 0), i64 25, i1 false)
br label %140
129: ; preds = %126
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(28) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(28) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.53, i64 0, i64 0), i64 28, i1 false)
br label %140
130: ; preds = %126
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(39) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(39) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.54, i64 0, i64 0), i64 39, i1 false)
br label %140
131: ; preds = %126
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(43) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(43) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.55, i64 0, i64 0), i64 43, i1 false)
br label %140
132: ; preds = %126
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(46) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(46) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.56, i64 0, i64 0), i64 46, i1 false)
br label %140
133: ; preds = %126
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(42) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(42) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.57, i64 0, i64 0), i64 42, i1 false)
br label %140
134: ; preds = %5
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(32) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(32) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.58, i64 0, i64 0), i64 32, i1 false)
br label %140
135: ; preds = %5
%136 = and i32 %2, 61440
%137 = icmp eq i32 %136, 36864
br i1 %137, label %138, label %139
138: ; preds = %135
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(33) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(33) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.59, i64 0, i64 0), i64 33, i1 false)
br label %140
139: ; preds = %135
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(19) getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0), i8* align 1 dereferenceable(19) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.60, i64 0, i64 0), i64 19, i1 false)
br label %140
140: ; preds = %8, %106, %119, %134, %9, %19, %17, %15, %13, %11, %30, %27, %35, %32, %37, %41, %39, %43, %46, %51, %50, %52, %58, %56, %54, %60, %78, %76, %74, %72, %70, %68, %66, %64, %62, %80, %100, %98, %96, %94, %92, %90, %88, %86, %84, %82, %105, %104, %110, %109, %114, %113, %118, %117, %120, %125, %124, %123, %122, %126, %133, %132, %131, %130, %129, %128, %139, %138, %4
ret i8* getelementptr inbounds ([200 x i8], [200 x i8]* @iso7816_stringify_sw.msg, i64 0, i64 0)
}