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

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ RSA;
typedef int /*<<< orphan*/ EVP_PKEY;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ BN_dec2bn(int /*<<< orphan*/ **, char *);
int /*<<< orphan*/ EVP_PKEY_assign_RSA(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/ *);
int /*<<< orphan*/ EVP_PKEY_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *EVP_PKEY_new();
int /*<<< orphan*/ *RSA_new();
int /*<<< orphan*/ RSA_set0_key(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                int /*<<< orphan*/ *, int /*<<< orphan*/ *);
EVP_PKEY *ssh1_line_to_key(char *line) {
  EVP_PKEY *key;
  RSA *rsa;
  char *b, *e, *m, *c;
  BIGNUM *rsa_e, *rsa_n;
  key = EVP_PKEY_new();
  if (!key)
    return NULL;
  rsa = RSA_new();
  if (!rsa)
    goto err;
  b = line;
  for (e = b; *e >= '0' && *e <= '0'; e++)
    ;
  if (*e != ' ' && *e != '\t')
    return NULL;
  *e = 0;
  e++;
  while (*e == ' ' || *e == '\t')
    e++;
  for (m = e; *m >= '0' && *m <= '0'; m++)
    ;
  if (*m != ' ' && *m != '\t')
    return NULL;
  *m = 0;
  m++;
  while (*m == ' ' || *m == '\t')
    m++;
  for (c = m; *c >= '0' && *c <= '0'; c++)
    ;
  if (*c != ' ' && *c != '\t' && *c != '\n' && *c != '\r' && *c != 0)
    return NULL;
  if (*c == ' ' || *c == '\t') {
    *c = 0;
    c++;
    while (*c == ' ' || *c == '\t')
      c++;
    if (*c && *c != '\r' && *c != '\n') {
    } else {
      c = NULL;
    }
  } else {
    *c = 0;
    c = NULL;
  }
  BN_dec2bn(&rsa_e, e);
  BN_dec2bn(&rsa_n, m);
  if (!RSA_set0_key(rsa, rsa_n, rsa_e, NULL))
    goto err;
  EVP_PKEY_assign_RSA(key, rsa);
  return key;
err:
  EVP_PKEY_free(key);
  return NULL;
}


x86 assembly (clang, -O0):
<ssh1_line_to_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1070 <EVP_PKEY_new@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    118f <ssh1_line_to_key+0x2f>
movq   $0x0,-0x8(%rbp)
jmp    1546 <ssh1_line_to_key+0x3e6>
mov    $0x0,%al
call   1060 <RSA_new@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    11aa <ssh1_line_to_key+0x4a>
jmp    1535 <ssh1_line_to_key+0x3d5>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x51(%rbp)
jl     11df <ssh1_line_to_key+0x7f>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
setle  %al
mov    %al,-0x51(%rbp)
mov    -0x51(%rbp),%al
test   $0x1,%al
jne    11ef <ssh1_line_to_key+0x8f>
jmp    1205 <ssh1_line_to_key+0xa5>
jmp    11f4 <ssh1_line_to_key+0x94>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11ba <ssh1_line_to_key+0x5a>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1232 <ssh1_line_to_key+0xd2>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
je     1232 <ssh1_line_to_key+0xd2>
movq   $0x0,-0x8(%rbp)
jmp    1546 <ssh1_line_to_key+0x3e6>
mov    -0x30(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x52(%rbp)
je     126a <ssh1_line_to_key+0x10a>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x52(%rbp)
mov    -0x52(%rbp),%al
test   $0x1,%al
jne    127a <ssh1_line_to_key+0x11a>
jmp    128b <ssh1_line_to_key+0x12b>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1245 <ssh1_line_to_key+0xe5>
mov    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x53(%rbp)
jl     12b8 <ssh1_line_to_key+0x158>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
setle  %al
mov    %al,-0x53(%rbp)
mov    -0x53(%rbp),%al
test   $0x1,%al
jne    12c8 <ssh1_line_to_key+0x168>
jmp    12de <ssh1_line_to_key+0x17e>
jmp    12cd <ssh1_line_to_key+0x16d>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1293 <ssh1_line_to_key+0x133>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     130b <ssh1_line_to_key+0x1ab>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
je     130b <ssh1_line_to_key+0x1ab>
movq   $0x0,-0x8(%rbp)
jmp    1546 <ssh1_line_to_key+0x3e6>
mov    -0x38(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x54(%rbp)
je     1343 <ssh1_line_to_key+0x1e3>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x54(%rbp)
mov    -0x54(%rbp),%al
test   $0x1,%al
jne    1353 <ssh1_line_to_key+0x1f3>
jmp    1364 <ssh1_line_to_key+0x204>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    131e <ssh1_line_to_key+0x1be>
mov    -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x55(%rbp)
jl     1391 <ssh1_line_to_key+0x231>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
setle  %al
mov    %al,-0x55(%rbp)
mov    -0x55(%rbp),%al
test   $0x1,%al
jne    13a1 <ssh1_line_to_key+0x241>
jmp    13b7 <ssh1_line_to_key+0x257>
jmp    13a6 <ssh1_line_to_key+0x246>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    136c <ssh1_line_to_key+0x20c>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1414 <ssh1_line_to_key+0x2b4>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
je     1414 <ssh1_line_to_key+0x2b4>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     1414 <ssh1_line_to_key+0x2b4>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
je     1414 <ssh1_line_to_key+0x2b4>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1414 <ssh1_line_to_key+0x2b4>
movq   $0x0,-0x8(%rbp)
jmp    1546 <ssh1_line_to_key+0x3e6>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1434 <ssh1_line_to_key+0x2d4>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    14cf <ssh1_line_to_key+0x36f>
mov    -0x40(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x56(%rbp)
je     146c <ssh1_line_to_key+0x30c>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x56(%rbp)
mov    -0x56(%rbp),%al
test   $0x1,%al
jne    147c <ssh1_line_to_key+0x31c>
jmp    148d <ssh1_line_to_key+0x32d>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    1447 <ssh1_line_to_key+0x2e7>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     14c2 <ssh1_line_to_key+0x362>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
je     14c2 <ssh1_line_to_key+0x362>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     14c2 <ssh1_line_to_key+0x362>
jmp    14ca <ssh1_line_to_key+0x36a>
movq   $0x0,-0x40(%rbp)
jmp    14de <ssh1_line_to_key+0x37e>
mov    -0x40(%rbp),%rax
movb   $0x0,(%rax)
movq   $0x0,-0x40(%rbp)
mov    -0x30(%rbp),%rsi
lea    -0x48(%rbp),%rdi
call   1030 <BN_dec2bn@plt>
mov    -0x38(%rbp),%rsi
lea    -0x50(%rbp),%rdi
call   1030 <BN_dec2bn@plt>
mov    -0x20(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x48(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1080 <RSA_set0_key@plt>
cmp    $0x0,%eax
jne    151b <ssh1_line_to_key+0x3bb>
jmp    1535 <ssh1_line_to_key+0x3d5>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <EVP_PKEY_assign_RSA@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1546 <ssh1_line_to_key+0x3e6>
mov    -0x18(%rbp),%rdi
call   1050 <EVP_PKEY_free@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssh1_line_to_key>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%r12
xor    %eax,%eax
call   1070 <EVP_PKEY_new@plt>
test   %rax,%rax
je     129d <ssh1_line_to_key+0x13d>
mov    %rax,%r15
xor    %eax,%eax
call   1060 <RSA_new@plt>
test   %rax,%rax
je     1295 <ssh1_line_to_key+0x135>
mov    %rax,%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r12
movzbl -0x1(%r12),%eax
cmp    $0x30,%al
je     11a0 <ssh1_line_to_key+0x40>
cmp    $0x9,%al
je     11ba <ssh1_line_to_key+0x5a>
cmp    $0x20,%al
jne    129d <ssh1_line_to_key+0x13d>
movb   $0x0,-0x1(%r12)
jmp    11d4 <ssh1_line_to_key+0x74>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r12
movzbl (%r12),%eax
cmp    $0x9,%al
je     11d0 <ssh1_line_to_key+0x70>
cmp    $0x20,%al
je     11d0 <ssh1_line_to_key+0x70>
lea    0x1(%r12),%rbx
cmp    $0x30,%al
jne    11fb <ssh1_line_to_key+0x9b>
nopw   0x0(%rax,%rax,1)
movzbl (%rbx),%eax
add    $0x1,%rbx
cmp    $0x30,%al
je     11f0 <ssh1_line_to_key+0x90>
cmp    $0x9,%al
je     1207 <ssh1_line_to_key+0xa7>
cmp    $0x20,%al
jne    129d <ssh1_line_to_key+0x13d>
movb   $0x0,-0x1(%rbx)
jmp    1214 <ssh1_line_to_key+0xb4>
nopl   (%rax)
add    $0x1,%rbx
movzbl (%rbx),%eax
cmp    $0x9,%al
je     1210 <ssh1_line_to_key+0xb0>
cmp    $0x20,%al
je     1210 <ssh1_line_to_key+0xb0>
lea    0x1(%rbx),%rcx
cmp    $0x30,%al
jne    123b <ssh1_line_to_key+0xdb>
nopw   0x0(%rax,%rax,1)
movzbl (%rcx),%eax
add    $0x1,%rcx
cmp    $0x30,%al
je     1230 <ssh1_line_to_key+0xd0>
cmp    $0x20,%al
ja     129d <ssh1_line_to_key+0x13d>
movzbl %al,%eax
movabs $0x100002601,%rdx
bt     %rax,%rdx
jae    129d <ssh1_line_to_key+0x13d>
movb   $0x0,-0x1(%rcx)
lea    0x10(%rsp),%rdi
mov    %r12,%rsi
call   1030 <BN_dec2bn@plt>
lea    0x8(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <BN_dec2bn@plt>
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %r14,%rdi
xor    %ecx,%ecx
call   1080 <RSA_set0_key@plt>
test   %eax,%eax
je     1295 <ssh1_line_to_key+0x135>
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <EVP_PKEY_assign_RSA@plt>
jmp    12a0 <ssh1_line_to_key+0x140>
mov    %r15,%rdi
call   1050 <EVP_PKEY_free@plt>
xor    %r15d,%r15d
mov    %r15,%rax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32* @ssh1_line_to_key(i8* %0) {
%2 = alloca i32*
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca i32*
store i8* %0, i8** %3
%12 = call i32* (...) @EVP_PKEY_new()
store i32* %12, i32** %4
%13 = load i32*, i32** %4
%14 = icmp ne i32* %13, null
br i1 %14, label %16, label %15
15: ; preds = %1
store i32* null, i32** %2
br label %230
16: ; preds = %1
%17 = call i32* (...) @RSA_new()
store i32* %17, i32** %5
%18 = load i32*, i32** %5
%19 = icmp ne i32* %18, null
br i1 %19, label %21, label %20
20: ; preds = %16
br label %227
21: ; preds = %16
%22 = load i8*, i8** %3
store i8* %22, i8** %6
%23 = load i8*, i8** %6
store i8* %23, i8** %7
br label %24
24: ; preds = %37, %21
%25 = load i8*, i8** %7
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp sge i32 %27, 48
br i1 %28, label %29, label %34
29: ; preds = %24
%30 = load i8*, i8** %7
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp sle i32 %32, 48
br label %34
34: ; preds = %29, %24
%35 = phi i1 [ false, %24 ], [ %33, %29 ]
br i1 %35, label %36, label %40
36: ; preds = %34
br label %37
37: ; preds = %36
%38 = load i8*, i8** %7
%39 = getelementptr inbounds i8, i8* %38, i32 1
store i8* %39, i8** %7
br label %24
40: ; preds = %34
%41 = load i8*, i8** %7
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp ne i32 %43, 32
br i1 %44, label %45, label %51
45: ; preds = %40
%46 = load i8*, i8** %7
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp ne i32 %48, 9
br i1 %49, label %50, label %51
50: ; preds = %45
store i32* null, i32** %2
br label %230
51: ; preds = %45, %40
%52 = load i8*, i8** %7
store i8 0, i8* %52
%53 = load i8*, i8** %7
%54 = getelementptr inbounds i8, i8* %53, i32 1
store i8* %54, i8** %7
br label %55
55: ; preds = %67, %51
%56 = load i8*, i8** %7
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 32
br i1 %59, label %65, label %60
60: ; preds = %55
%61 = load i8*, i8** %7
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = icmp eq i32 %63, 9
br label %65
65: ; preds = %60, %55
%66 = phi i1 [ true, %55 ], [ %64, %60 ]
br i1 %66, label %67, label %70
67: ; preds = %65
%68 = load i8*, i8** %7
%69 = getelementptr inbounds i8, i8* %68, i32 1
store i8* %69, i8** %7
br label %55
70: ; preds = %65
%71 = load i8*, i8** %7
store i8* %71, i8** %8
br label %72
72: ; preds = %85, %70
%73 = load i8*, i8** %8
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = icmp sge i32 %75, 48
br i1 %76, label %77, label %82
77: ; preds = %72
%78 = load i8*, i8** %8
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = icmp sle i32 %80, 48
br label %82
82: ; preds = %77, %72
%83 = phi i1 [ false, %72 ], [ %81, %77 ]
br i1 %83, label %84, label %88
84: ; preds = %82
br label %85
85: ; preds = %84
%86 = load i8*, i8** %8
%87 = getelementptr inbounds i8, i8* %86, i32 1
store i8* %87, i8** %8
br label %72
88: ; preds = %82
%89 = load i8*, i8** %8
%90 = load i8, i8* %89
%91 = sext i8 %90 to i32
%92 = icmp ne i32 %91, 32
br i1 %92, label %93, label %99
93: ; preds = %88
%94 = load i8*, i8** %8
%95 = load i8, i8* %94
%96 = sext i8 %95 to i32
%97 = icmp ne i32 %96, 9
br i1 %97, label %98, label %99
98: ; preds = %93
store i32* null, i32** %2
br label %230
99: ; preds = %93, %88
%100 = load i8*, i8** %8
store i8 0, i8* %100
%101 = load i8*, i8** %8
%102 = getelementptr inbounds i8, i8* %101, i32 1
store i8* %102, i8** %8
br label %103
103: ; preds = %115, %99
%104 = load i8*, i8** %8
%105 = load i8, i8* %104
%106 = sext i8 %105 to i32
%107 = icmp eq i32 %106, 32
br i1 %107, label %113, label %108
108: ; preds = %103
%109 = load i8*, i8** %8
%110 = load i8, i8* %109
%111 = sext i8 %110 to i32
%112 = icmp eq i32 %111, 9
br label %113
113: ; preds = %108, %103
%114 = phi i1 [ true, %103 ], [ %112, %108 ]
br i1 %114, label %115, label %118
115: ; preds = %113
%116 = load i8*, i8** %8
%117 = getelementptr inbounds i8, i8* %116, i32 1
store i8* %117, i8** %8
br label %103
118: ; preds = %113
%119 = load i8*, i8** %8
store i8* %119, i8** %9
br label %120
120: ; preds = %133, %118
%121 = load i8*, i8** %9
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = icmp sge i32 %123, 48
br i1 %124, label %125, label %130
125: ; preds = %120
%126 = load i8*, i8** %9
%127 = load i8, i8* %126
%128 = sext i8 %127 to i32
%129 = icmp sle i32 %128, 48
br label %130
130: ; preds = %125, %120
%131 = phi i1 [ false, %120 ], [ %129, %125 ]
br i1 %131, label %132, label %136
132: ; preds = %130
br label %133
133: ; preds = %132
%134 = load i8*, i8** %9
%135 = getelementptr inbounds i8, i8* %134, i32 1
store i8* %135, i8** %9
br label %120
136: ; preds = %130
%137 = load i8*, i8** %9
%138 = load i8, i8* %137
%139 = sext i8 %138 to i32
%140 = icmp ne i32 %139, 32
br i1 %140, label %141, label %162
141: ; preds = %136
%142 = load i8*, i8** %9
%143 = load i8, i8* %142
%144 = sext i8 %143 to i32
%145 = icmp ne i32 %144, 9
br i1 %145, label %146, label %162
146: ; preds = %141
%147 = load i8*, i8** %9
%148 = load i8, i8* %147
%149 = sext i8 %148 to i32
%150 = icmp ne i32 %149, 10
br i1 %150, label %151, label %162
151: ; preds = %146
%152 = load i8*, i8** %9
%153 = load i8, i8* %152
%154 = sext i8 %153 to i32
%155 = icmp ne i32 %154, 13
br i1 %155, label %156, label %162
156: ; preds = %151
%157 = load i8*, i8** %9
%158 = load i8, i8* %157
%159 = sext i8 %158 to i32
%160 = icmp ne i32 %159, 0
br i1 %160, label %161, label %162
161: ; preds = %156
store i32* null, i32** %2
br label %230
162: ; preds = %156, %151, %146, %141, %136
%163 = load i8*, i8** %9
%164 = load i8, i8* %163
%165 = sext i8 %164 to i32
%166 = icmp eq i32 %165, 32
br i1 %166, label %172, label %167
167: ; preds = %162
%168 = load i8*, i8** %9
%169 = load i8, i8* %168
%170 = sext i8 %169 to i32
%171 = icmp eq i32 %170, 9
br i1 %171, label %172, label %209
172: ; preds = %167, %162
%173 = load i8*, i8** %9
store i8 0, i8* %173
%174 = load i8*, i8** %9
%175 = getelementptr inbounds i8, i8* %174, i32 1
store i8* %175, i8** %9
br label %176
176: ; preds = %188, %172
%177 = load i8*, i8** %9
%178 = load i8, i8* %177
%179 = sext i8 %178 to i32
%180 = icmp eq i32 %179, 32
br i1 %180, label %186, label %181
181: ; preds = %176
%182 = load i8*, i8** %9
%183 = load i8, i8* %182
%184 = sext i8 %183 to i32
%185 = icmp eq i32 %184, 9
br label %186
186: ; preds = %181, %176
%187 = phi i1 [ true, %176 ], [ %185, %181 ]
br i1 %187, label %188, label %191
188: ; preds = %186
%189 = load i8*, i8** %9
%190 = getelementptr inbounds i8, i8* %189, i32 1
store i8* %190, i8** %9
br label %176
191: ; preds = %186
%192 = load i8*, i8** %9
%193 = load i8, i8* %192
%194 = sext i8 %193 to i32
%195 = icmp ne i32 %194, 0
br i1 %195, label %196, label %207
196: ; preds = %191
%197 = load i8*, i8** %9
%198 = load i8, i8* %197
%199 = sext i8 %198 to i32
%200 = icmp ne i32 %199, 13
br i1 %200, label %201, label %207
201: ; preds = %196
%202 = load i8*, i8** %9
%203 = load i8, i8* %202
%204 = sext i8 %203 to i32
%205 = icmp ne i32 %204, 10
br i1 %205, label %206, label %207
206: ; preds = %201
br label %208
207: ; preds = %201, %196, %191
store i8* null, i8** %9
br label %208
208: ; preds = %207, %206
br label %211
209: ; preds = %167
%210 = load i8*, i8** %9
store i8 0, i8* %210
store i8* null, i8** %9
br label %211
211: ; preds = %209, %208
%212 = load i8*, i8** %7
%213 = call i32 @BN_dec2bn(i32** %10, i8* %212)
%214 = load i8*, i8** %8
%215 = call i32 @BN_dec2bn(i32** %11, i8* %214)
%216 = load i32*, i32** %5
%217 = load i32*, i32** %11
%218 = load i32*, i32** %10
%219 = call i32 @RSA_set0_key(i32* %216, i32* %217, i32* %218, i32* null)
%220 = icmp ne i32 %219, 0
br i1 %220, label %222, label %221
221: ; preds = %211
br label %227
222: ; preds = %211
%223 = load i32*, i32** %4
%224 = load i32*, i32** %5
%225 = call i32 @EVP_PKEY_assign_RSA(i32* %223, i32* %224)
%226 = load i32*, i32** %4
store i32* %226, i32** %2
br label %230
227: ; preds = %221, %20
%228 = load i32*, i32** %4
%229 = call i32 @EVP_PKEY_free(i32* %228)
store i32* null, i32** %2
br label %230
230: ; preds = %227, %222, %161, %98, %50, %15
%231 = load i32*, i32** %2
ret i32* %231
}

LLVM IR (-O2):
define i32* @ssh1_line_to_key(i8* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = bitcast i32** %2 to i8*
%5 = bitcast i32** %3 to i8*
%6 = tail call i32* (...) @EVP_PKEY_new()
%7 = icmp eq i32* %6, null
br i1 %7, label %51, label %8
8: ; preds = %1
%9 = tail call i32* (...) @RSA_new()
%10 = icmp eq i32* %9, null
br i1 %10, label %49, label %11
11: ; preds = %8, %14
%12 = phi i8* [ %15, %14 ], [ %0, %8 ]
%13 = load i8, i8* %12
switch i8 %13, label %51 [
i8 48, label %14
i8 32, label %16
i8 9, label %16
]
14: ; preds = %11
%15 = getelementptr inbounds i8, i8* %12, i64 1
br label %11
16: ; preds = %11, %11
store i8 0, i8* %12
br label %17
17: ; preds = %21, %16
%18 = phi i8* [ %12, %16 ], [ %19, %21 ]
%19 = getelementptr inbounds i8, i8* %18, i64 1
%20 = load i8, i8* %19
switch i8 %20, label %22 [
i8 32, label %21
i8 9, label %21
]
21: ; preds = %17, %17
br label %17
22: ; preds = %17, %25
%23 = phi i8 [ %27, %25 ], [ %20, %17 ]
%24 = phi i8* [ %26, %25 ], [ %19, %17 ]
switch i8 %23, label %51 [
i8 48, label %25
i8 32, label %28
i8 9, label %28
]
25: ; preds = %22
%26 = getelementptr inbounds i8, i8* %24, i64 1
%27 = load i8, i8* %26
br label %22
28: ; preds = %22, %22
store i8 0, i8* %24
br label %29
29: ; preds = %33, %28
%30 = phi i8* [ %24, %28 ], [ %31, %33 ]
%31 = getelementptr inbounds i8, i8* %30, i64 1
%32 = load i8, i8* %31
switch i8 %32, label %34 [
i8 32, label %33
i8 9, label %33
]
33: ; preds = %29, %29
br label %29
34: ; preds = %29, %37
%35 = phi i8 [ %39, %37 ], [ %32, %29 ]
%36 = phi i8* [ %38, %37 ], [ %31, %29 ]
switch i8 %35, label %51 [
i8 48, label %37
i8 32, label %40
i8 9, label %40
i8 0, label %40
i8 10, label %40
i8 13, label %40
]
37: ; preds = %34
%38 = getelementptr inbounds i8, i8* %36, i64 1
%39 = load i8, i8* %38
br label %34
40: ; preds = %34, %34, %34, %34, %34
store i8 0, i8* %36
%41 = call i32 @BN_dec2bn(i32** %2, i8* %19)
%42 = call i32 @BN_dec2bn(i32** %3, i8* %31)
%43 = load i32*, i32** %3
%44 = load i32*, i32** %2
%45 = call i32 @RSA_set0_key(i32* %9, i32* %43, i32* %44, i32* null)
%46 = icmp eq i32 %45, 0
br i1 %46, label %49, label %47
47: ; preds = %40
%48 = call i32 @EVP_PKEY_assign_RSA(i32* %6, i32* %9)
br label %51
49: ; preds = %40, %8
%50 = call i32 @EVP_PKEY_free(i32* %6)
br label %51
51: ; preds = %11, %22, %34, %1, %49, %47
%52 = phi i32* [ %6, %47 ], [ null, %49 ], [ null, %1 ], [ null, %34 ], [ null, %22 ], [ null, %11 ]
ret i32* %52
}