int main() {
  char a[101], b[101];
  gets(a), gets(b);
  if (strlen(a) < strlen(b))
    puts(a), puts(b);
  else
    puts(b), puts(a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1050 <gets@plt>
lea    -0xe0(%rbp),%rdi
mov    $0x0,%al
call   1050 <gets@plt>
lea    -0x70(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0xe8(%rbp)
lea    -0xe0(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0xe8(%rbp),%rax
cmp    %rcx,%rax
jae    11a8 <main+0x78>
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    -0xe0(%rbp),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
jmp    11c1 <main+0x91>
lea    -0xe0(%rbp),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    -0x4(%rbp),%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0xe0,%rsp
lea    0x70(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <gets@plt>
mov    %rsp,%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1040 <strlen@plt>
cmp    %rax,%r15
mov    %r14,%rdi
cmovb  %rbx,%rdi
cmovb  %r14,%rbx
xor    %eax,%eax
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [101 x i8]
%3 = alloca [101 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @gets to i32 (i8*, ...)*)(i8* %4)
%6 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 0
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @gets to i32 (i8*, ...)*)(i8* %6)
%8 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%9 = call i64 @strlen(i8* %8)
%10 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 0
%11 = call i64 @strlen(i8* %10)
%12 = icmp ult i64 %9, %11
br i1 %12, label %13, label %18
13: ; preds = %0
%14 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%15 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %14)
%16 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 0
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %16)
br label %23
18: ; preds = %0
%19 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 0
%20 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %19)
%21 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%22 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %21)
br label %23
23: ; preds = %18, %13
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [101 x i8]
%2 = alloca [101 x i8]
%3 = getelementptr inbounds [101 x i8], [101 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @gets to i32 (i8*, ...)*)(i8* %3)
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @gets to i32 (i8*, ...)*)(i8* %4)
%7 = call i64 @strlen(i8* %3)
%8 = call i64 @strlen(i8* %4)
%9 = icmp ult i64 %7, %8
%10 = select i1 %9, i8* %3, i8* %4
%11 = select i1 %9, i8* %4, i8* %3
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %10)
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %11)
ret i32 0
}