#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*/ mgetline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ squeeze(char *, char *);
int main(void) {
  char s1[1000], s2[1000];
  putchar('s');
  putchar('1');
  mgetline(s1, 1000);
  putchar('s');
  putchar('2');
  mgetline(s2, 1000);
  squeeze(s1, s2);
  printf("%s", s1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7e0,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x73,%edi
call   1040 <putchar@plt>
mov    $0x31,%edi
call   1040 <putchar@plt>
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1060 <mgetline@plt>
mov    $0x73,%edi
call   1040 <putchar@plt>
mov    $0x32,%edi
call   1040 <putchar@plt>
lea    -0x7e0(%rbp),%rdi
mov    $0x3e8,%esi
call   1060 <mgetline@plt>
lea    -0x3f0(%rbp),%rdi
lea    -0x7e0(%rbp),%rsi
call   1030 <squeeze@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe43(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x7e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x7d8,%rsp
mov    $0x73,%edi
call   1040 <putchar@plt>
mov    $0x31,%edi
call   1040 <putchar@plt>
lea    0x3f0(%rsp),%r14
mov    %r14,%rdi
mov    $0x3e8,%esi
call   1060 <mgetline@plt>
mov    $0x73,%edi
call   1040 <putchar@plt>
mov    $0x32,%edi
call   1040 <putchar@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1060 <mgetline@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <squeeze@plt>
lea    0xe57(%rip),%rdi
mov    %r14,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x7d8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
%3 = alloca [1000 x i8]
store i32 0, i32* %1
%4 = call i32 @putchar(i8 signext 115)
%5 = call i32 @putchar(i8 signext 49)
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%7 = call i32 @mgetline(i8* %6, i32 1000)
%8 = call i32 @putchar(i8 signext 115)
%9 = call i32 @putchar(i8 signext 50)
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%11 = call i32 @mgetline(i8* %10, i32 1000)
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%13 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%14 = call i32 @squeeze(i8* %12, i8* %13)
%15 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%16 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @putchar(i8 signext 115)
%6 = tail call i32 @putchar(i8 signext 49)
%7 = call i32 @mgetline(i8* %3, i32 1000)
%8 = call i32 @putchar(i8 signext 115)
%9 = call i32 @putchar(i8 signext 50)
%10 = call i32 @mgetline(i8* %4, i32 1000)
%11 = call i32 @squeeze(i8* %3, i8* %4)
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}