#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 any(char *, char *);
int get_line(char *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char s1[100];
  char s2[100];
  int len1;
  int len2;
  int loc;
  while ((len1 = get_line(s1, 100)) > 0 && (len2 = get_line(s2, 100)) > 0) {
    loc = any(s1, s2);
    printf("%d\n", loc);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
mov    $0x64,%esi
call   1030 <get_line@plt>
mov    %eax,%ecx
mov    %ecx,-0xe4(%rbp)
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xed(%rbp)
jle    118c <main+0x5c>
lea    -0xe0(%rbp),%rdi
mov    $0x64,%esi
call   1030 <get_line@plt>
mov    %eax,-0xe8(%rbp)
cmp    $0x0,%eax
setg   %al
mov    %al,-0xed(%rbp)
mov    -0xed(%rbp),%al
test   $0x1,%al
jne    119f <main+0x6f>
jmp    11cc <main+0x9c>
lea    -0x70(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1050 <any@plt>
mov    %eax,-0xec(%rbp)
mov    -0xec(%rbp),%esi
lea    0xe3e(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0xe0,%rsp
mov    %rsp,%rdi
mov    $0x64,%esi
call   1030 <get_line@plt>
test   %eax,%eax
jle    1197 <main+0x67>
lea    0x70(%rsp),%r14
mov    %rsp,%rbx
lea    0xea4(%rip),%r15
nopl   0x0(%rax)
mov    %r14,%rdi
mov    $0x64,%esi
call   1030 <get_line@plt>
test   %eax,%eax
jle    1197 <main+0x67>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <any@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
call   1030 <get_line@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
br label %7
7: ; preds = %17, %0
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%9 = call i32 @get_line(i8* %8, i32 100)
store i32 %9, i32* %4
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%13 = call i32 @get_line(i8* %12, i32 100)
store i32 %13, i32* %5
%14 = icmp sgt i32 %13, 0
br label %15
15: ; preds = %11, %7
%16 = phi i1 [ false, %7 ], [ %14, %11 ]
br i1 %16, label %17, label %23
17: ; preds = %15
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%20 = call i32 @any(i8* %18, i8* %19)
store i32 %20, i32* %6
%21 = load i32, i32* %6
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %21)
br label %7
23: ; preds = %15
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @get_line(i8* %3, i32 100)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %0, %10
%8 = call i32 @get_line(i8* %4, i32 100)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = call i32 @any(i8* %3, i8* %4)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = call i32 @get_line(i8* %3, i32 100)
%14 = icmp sgt i32 %13, 0
br i1 %14, label %7, label %15
15: ; preds = %7, %10, %0
ret i32 0
}