#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*/ plug_sendf(char *, int /*<<< orphan*/, ...);
int /*<<< orphan*/ set_get_string(char *);
void irc_login() {
  plug_sendf("USER %s eiwic eiwic :%s\r\n", set_get_string("username"),
             set_get_string("realname"));
  plug_sendf("NICK %s\r\n", set_get_string("nick"));
}


x86 assembly (clang, -O0):
<irc_login>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeeb(%rip),%rdi
call   1040 <set_get_string@plt>
mov    %eax,-0x4(%rbp)
lea    0xee5(%rip),%rdi
call   1040 <set_get_string@plt>
mov    -0x4(%rbp),%esi
mov    %eax,%edx
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <plug_sendf@plt>
lea    0xed9(%rip),%rdi
call   1040 <set_get_string@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <plug_sendf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_login>:
push   %rbx
lea    0xef2(%rip),%rdi
call   1040 <set_get_string@plt>
mov    %eax,%ebx
lea    0xeed(%rip),%rdi
call   1040 <set_get_string@plt>
lea    0xebe(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <plug_sendf@plt>
lea    0xee2(%rip),%rdi
call   1040 <set_get_string@plt>
lea    0xecc(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <plug_sendf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"USER %s eiwic eiwic :%s\0D\0A\00"
@.str.1 = [9 x i8] c"username\00"
@.str.2 = [9 x i8] c"realname\00"
@.str.3 = [10 x i8] c"NICK %s\0D\0A\00"
@.str.4 = [5 x i8] c"nick\00"
define void @irc_login() {
%1 = call i32 @set_get_string(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @set_get_string(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (i8*, i32, ...) @plug_sendf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%4 = call i32 @set_get_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%5 = call i32 (i8*, i32, ...) @plug_sendf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"USER %s eiwic eiwic :%s\0D\0A\00"
@.str.1 = [9 x i8] c"username\00"
@.str.2 = [9 x i8] c"realname\00"
@.str.3 = [10 x i8] c"NICK %s\0D\0A\00"
@.str.4 = [5 x i8] c"nick\00"
define void @irc_login() {
%1 = tail call i32 @set_get_string(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @set_get_string(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (i8*, i32, ...) @plug_sendf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%4 = tail call i32 @set_get_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%5 = tail call i32 (i8*, i32, ...) @plug_sendf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %4)
ret void
}