#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*/ abms_system(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
void sshd_init(void) {
  char lcmd[255];
  sprintf(lcmd, "%s%s /app/os/sys/sshd/keys -p", "/app/os/sys/bin/", "mkdir");
  abms_system(lcmd);
  sprintf(lcmd, "%s -t rsa -f %s", "/app/os/sys/sshd/bin/dropbearkey",
          "/app/os/sys/sshd/keys/rsa.key");
  abms_system(lcmd);
  return;
}


x86 assembly (clang, -O0):
<sshd_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
lea    0xede(%rip),%rdx
lea    0xee8(%rip),%rcx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <abms_system@plt>
lea    -0x100(%rbp),%rdi
lea    0xecf(%rip),%rsi
lea    0xed8(%rip),%rdx
lea    0xef2(%rip),%rcx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <abms_system@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sshd_init>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
lea    0xee8(%rip),%rdx
lea    0xef2(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <abms_system@plt>
lea    0xede(%rip),%rsi
lea    0xee7(%rip),%rdx
lea    0xf01(%rip),%rcx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <abms_system@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"%s%s /app/os/sys/sshd/keys -p\00"
@.str.1 = [17 x i8] c"/app/os/sys/bin/\00"
@.str.2 = [6 x i8] c"mkdir\00"
@.str.3 = [16 x i8] c"%s -t rsa -f %s\00"
@.str.4 = [33 x i8] c"/app/os/sys/sshd/bin/dropbearkey\00"
@.str.5 = [30 x i8] c"/app/os/sys/sshd/keys/rsa.key\00"
define void @sshd_init() {
%1 = alloca [255 x i8]
%2 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%5 = call i32 @abms_system(i8* %4)
%6 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0))
%8 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%9 = call i32 @abms_system(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"%s%s /app/os/sys/sshd/keys -p\00"
@.str.1 = [17 x i8] c"/app/os/sys/bin/\00"
@.str.2 = [6 x i8] c"mkdir\00"
@.str.3 = [16 x i8] c"%s -t rsa -f %s\00"
@.str.4 = [33 x i8] c"/app/os/sys/sshd/bin/dropbearkey\00"
@.str.5 = [30 x i8] c"/app/os/sys/sshd/keys/rsa.key\00"
define void @sshd_init() {
%1 = alloca [255 x i8]
%2 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @abms_system(i8* %2)
%5 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0))
%6 = call i32 @abms_system(i8* %2)
ret void
}