#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 */
struct telnetd_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ telnetd_output(struct telnetd_state *, char *, char *);
int /*<<< orphan*/ telnetd_prompt(struct telnetd_state *, char *);
void telnetd_connected(struct telnetd_state *s) {
  telnetd_output(s, "uIP command shell", "");
  telnetd_output(s, "Type '?' for help", "");
  telnetd_prompt(s, "uIP-0.9> ");
}


x86 assembly (clang, -O0):
<telnetd_connected>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
lea    0xeef(%rip),%rdx
call   1030 <telnetd_output@plt>
mov    -0x8(%rbp),%rdi
lea    0xec4(%rip),%rsi
lea    0xed8(%rip),%rdx
call   1030 <telnetd_output@plt>
mov    -0x8(%rbp),%rdi
lea    0xebf(%rip),%rsi
call   1040 <telnetd_prompt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<telnetd_connected>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed2(%rip),%rsi
lea    0xef8(%rip),%r14
mov    %r14,%rdx
call   1030 <telnetd_output@plt>
lea    0xece(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <telnetd_output@plt>
lea    0xece(%rip),%rsi
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <telnetd_prompt@plt>

LLVM IR (-O0):
%struct.telnetd_state = type { i32 }
@.str = [18 x i8] c"uIP command shell\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [18 x i8] c"Type '?' for help\00"
@.str.3 = [10 x i8] c"uIP-0.9> \00"
define void @telnetd_connected(%struct.telnetd_state* %0) {
%2 = alloca %struct.telnetd_state*
store %struct.telnetd_state* %0, %struct.telnetd_state** %2
%3 = load %struct.telnetd_state*, %struct.telnetd_state** %2
%4 = call i32 @telnetd_output(%struct.telnetd_state* %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%5 = load %struct.telnetd_state*, %struct.telnetd_state** %2
%6 = call i32 @telnetd_output(%struct.telnetd_state* %5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%7 = load %struct.telnetd_state*, %struct.telnetd_state** %2
%8 = call i32 @telnetd_prompt(%struct.telnetd_state* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.telnetd_state = type { i32 }
@.str = [18 x i8] c"uIP command shell\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [18 x i8] c"Type '?' for help\00"
@.str.3 = [10 x i8] c"uIP-0.9> \00"
define void @telnetd_connected(%struct.telnetd_state* %0) {
%2 = tail call i32 @telnetd_output(%struct.telnetd_state* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @telnetd_output(%struct.telnetd_state* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @telnetd_prompt(%struct.telnetd_state* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
ret void
}