#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 char uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ pem64_encode_bytes(char const *, int, char *);
int output_key(FILE *fh, const uint8_t *snum, const uint8_t *ltkey) {
  uint8_t data[128];
  pem64_encode_bytes(snum, 12, (char *)data);
  data[16] = ' ';
  pem64_encode_bytes(ltkey, 32, (char *)data + 17);
  data[61] = 0;
  return fprintf(fh, "%s\n", data);
}


x86 assembly (clang, -O0):
<output_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0xa0(%rbp),%rdx
mov    $0xc,%esi
call   1040 <pem64_encode_bytes@plt>
movb   $0x20,-0x90(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0xa0(%rbp),%rdx
add    $0x11,%rdx
mov    $0x20,%esi
call   1040 <pem64_encode_bytes@plt>
movb   $0x0,-0x63(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xa0(%rbp),%rdx
lea    0xe7e(%rip),%rsi
call   1030 <fprintf@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_key>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
mov    %rdx,%rbx
mov    %rdi,%r14
mov    %rsp,%r15
mov    %rsi,%rdi
mov    $0xc,%esi
mov    %r15,%rdx
call   1040 <pem64_encode_bytes@plt>
movb   $0x20,0x10(%rsp)
lea    0x11(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1040 <pem64_encode_bytes@plt>
movb   $0x0,0x3d(%rsp)
lea    0xe98(%rip),%rsi
mov    %r14,%rdi
mov    %r15,%rdx
call   1030 <fprintf@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @output_key(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [128 x i8]
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %5
%9 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%10 = call i32 @pem64_encode_bytes(i8* %8, i32 12, i8* %9)
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 16
store i8 32, i8* %11
%12 = load i8*, i8** %6
%13 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%14 = getelementptr inbounds i8, i8* %13, i64 17
%15 = call i32 @pem64_encode_bytes(i8* %12, i32 32, i8* %14)
%16 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 61
store i8 0, i8* %16
%17 = load i32*, i32** %4
%18 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%19 = call i32 @fprintf(i32* %17, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %18)
ret i32 %19
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @output_key(i32* nocapture %0, i8* %1, i8* %2) {
%4 = alloca [128 x i8]
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%6 = call i32 @pem64_encode_bytes(i8* %1, i32 12, i8* %5)
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 16
store i8 32, i8* %7
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 17
%9 = call i32 @pem64_encode_bytes(i8* %2, i32 32, i8* %8)
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 61
store i8 0, i8* %10
%11 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 %11
}