#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*/ colorize(char *);
int /*<<< orphan*/ get_string(char *, int, char *, int);
char *malloc(scalar_t__);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ system(char *);
void twitter(void) {
  char twname[32];
  char twpass[16];
  char twinput[126];
  char tweetpost[200];
  char *tweet = malloc(strlen(twinput) + 3);
  colorize("@YTwitter\n");
  colorize("@YYour Twitter username: @G");
  get_string("", 29, twname, -1);
  colorize("@YYour Twitter password: @G");
  get_string("", 16, twpass, -1);
  colorize("@YYour Tweet: @G");
  get_string("", 70, twinput, -1);
  sprintf(tweetpost, "/home/bbs/bin/bbstw.sh %s %s \'%s\'", twname, twpass,
          twinput);
  system(tweetpost);
}


x86 assembly (clang, -O0):
<twitter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
lea    -0xb0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rdi
add    $0x3,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x188(%rbp)
lea    0xe6f(%rip),%rdi
call   1070 <colorize@plt>
lea    0xe6e(%rip),%rdi
call   1070 <colorize@plt>
lea    -0x20(%rbp),%rdx
lea    0xe5d(%rip),%rdi
mov    $0x1d,%esi
mov    $0xffffffff,%ecx
call   1040 <get_string@plt>
lea    0xe64(%rip),%rdi
call   1070 <colorize@plt>
lea    -0x30(%rbp),%rdx
lea    0xe37(%rip),%rdi
mov    $0x10,%esi
mov    $0xffffffff,%ecx
call   1040 <get_string@plt>
lea    0xe5a(%rip),%rdi
call   1070 <colorize@plt>
lea    -0xb0(%rbp),%rdx
lea    0xe0e(%rip),%rdi
mov    $0x46,%esi
mov    $0xffffffff,%ecx
call   1040 <get_string@plt>
lea    -0x180(%rbp),%rdi
lea    -0x20(%rbp),%rdx
lea    -0x30(%rbp),%rcx
lea    -0xb0(%rbp),%r8
lea    0xe2c(%rip),%rsi
call   1080 <sprintf@plt>
lea    -0x180(%rbp),%rdi
call   1050 <system@plt>
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twitter>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x180,%rsp
lea    0xea9(%rip),%rdi
call   1050 <colorize@plt>
lea    0xea8(%rip),%rdi
call   1050 <colorize@plt>
lea    0xe9b(%rip),%r12
lea    0x10(%rsp),%r14
mov    %r12,%rdi
mov    $0x1d,%esi
mov    %r14,%rdx
mov    $0xffffffff,%ecx
call   1030 <get_string@plt>
lea    0xe97(%rip),%rdi
call   1050 <colorize@plt>
mov    %rsp,%r15
mov    %r12,%rdi
mov    $0x10,%esi
mov    %r15,%rdx
mov    $0xffffffff,%ecx
call   1030 <get_string@plt>
lea    0xe8f(%rip),%rdi
call   1050 <colorize@plt>
lea    0x30(%rsp),%r13
mov    %r12,%rdi
mov    $0x46,%esi
mov    %r13,%rdx
mov    $0xffffffff,%ecx
call   1030 <get_string@plt>
lea    0xe7a(%rip),%rsi
lea    0xb0(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rdx
mov    %r15,%rcx
mov    %r13,%r8
call   1060 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
add    $0x180,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [11 x i8] c"@YTwitter\0A\00"
@.str.1 = [28 x i8] c"@YYour Twitter username: @G\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [28 x i8] c"@YYour Twitter password: @G\00"
@.str.4 = [17 x i8] c"@YYour Tweet: @G\00"
@.str.5 = [34 x i8] c"/home/bbs/bin/bbstw.sh %s %s '%s'\00"
define void @twitter() {
%1 = alloca [32 x i8]
%2 = alloca [16 x i8]
%3 = alloca [126 x i8]
%4 = alloca [200 x i8]
%5 = alloca i8*
%6 = getelementptr inbounds [126 x i8], [126 x i8]* %3, i64 0, i64 0
%7 = call i64 @strlen(i8* %6)
%8 = add nsw i64 %7, 3
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %5
%10 = call i32 @colorize(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @colorize(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%13 = call i32 @get_string(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 29, i8* %12, i32 -1)
%14 = call i32 @colorize(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%15 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%16 = call i32 @get_string(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 16, i8* %15, i32 -1)
%17 = call i32 @colorize(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%18 = getelementptr inbounds [126 x i8], [126 x i8]* %3, i64 0, i64 0
%19 = call i32 @get_string(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 70, i8* %18, i32 -1)
%20 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%21 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%22 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%23 = getelementptr inbounds [126 x i8], [126 x i8]* %3, i64 0, i64 0
%24 = call i32 @sprintf(i8* %20, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %21, i8* %22, i8* %23)
%25 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%26 = call i32 @system(i8* %25)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"@YTwitter\0A\00"
@.str.1 = [28 x i8] c"@YYour Twitter username: @G\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [28 x i8] c"@YYour Twitter password: @G\00"
@.str.4 = [17 x i8] c"@YYour Tweet: @G\00"
@.str.5 = [34 x i8] c"/home/bbs/bin/bbstw.sh %s %s '%s'\00"
define void @twitter() {
%1 = alloca [32 x i8]
%2 = alloca [16 x i8]
%3 = alloca [126 x i8]
%4 = alloca [200 x i8]
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [126 x i8], [126 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%9 = tail call i32 @colorize(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @colorize(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @get_string(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 29, i8* %5, i32 -1)
%12 = call i32 @colorize(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 @get_string(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 16, i8* %6, i32 -1)
%14 = call i32 @colorize(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 @get_string(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 70, i8* %7, i32 -1)
%16 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %5, i8* %6, i8* %7)
%17 = call i32 @system(i8* %8)
ret void
}