#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
void test_case() {
  char buffer1[501], buffer2[501];
  scanf("%s", buffer1);
  scanf("%s", buffer2);
  printf("%s\n%s\n", buffer1, buffer2);
  int index = -1;
  while (buffer1[++index] != 0)
    printf("%c", buffer1[index] == buffer2[index] ? '.' : '*');
  printf("\n");
}


x86 assembly (clang, -O0):
<test_case>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
lea    -0x200(%rbp),%rsi
lea    0xec7(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x400(%rbp),%rsi
lea    0xeb4(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x200(%rbp),%rsi
lea    -0x400(%rbp),%rdx
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x404(%rbp)
ff ff ff
mov    -0x404(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x404(%rbp)
cltq
movsbl -0x200(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     11d9 <test_case+0xb9>
movslq -0x404(%rbp),%rax
movsbl -0x200(%rbp,%rax,1),%ecx
ff
movslq -0x404(%rbp),%rax
movsbl -0x400(%rbp,%rax,1),%edx
ff
mov    $0x2a,%esi
mov    $0x2e,%eax
cmp    %edx,%ecx
cmove  %eax,%esi
lea    0xe3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1177 <test_case+0x57>
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_case>:
push   %r15
push   %r14
push   %rbx
sub    $0x400,%rsp
lea    0xebd(%rip),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
lea    0x200(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
lea    0xe98(%rip),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rsp),%al
test   %al,%al
je     11b5 <test_case+0x85>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
cmp    0x200(%rsp,%rbx,1),%al
sete   %cl
lea    0x2a(,%rcx,4),%edi
call   1030 <putchar@plt>
movzbl 0x1(%rsp,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
jne    1190 <test_case+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x400,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [7 x i8] c"%s\0A%s\0A\00"
@.str.2 = [3 x i8] c"%c\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @test_case() {
%1 = alloca [501 x i8]
%2 = alloca [501 x i8]
%3 = alloca i32
%4 = getelementptr inbounds [501 x i8], [501 x i8]* %1, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [501 x i8], [501 x i8]* %2, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [501 x i8], [501 x i8]* %1, i64 0, i64 0
%9 = getelementptr inbounds [501 x i8], [501 x i8]* %2, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %8, i8* %9)
store i32 -1, i32* %3
br label %11
11: ; preds = %19, %0
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [501 x i8], [501 x i8]* %1, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %34
19: ; preds = %11
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [501 x i8], [501 x i8]* %1, i64 0, i64 %21
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = load i32, i32* %3
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [501 x i8], [501 x i8]* %2, i64 0, i64 %26
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %24, %29
%31 = zext i1 %30 to i64
%32 = select i1 %30, i32 46, i32 42
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %32)
br label %11
34: ; preds = %11
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [7 x i8] c"%s\0A%s\0A\00"
define void @test_case() {
%1 = alloca [501 x i8]
%2 = alloca [501 x i8]
%3 = getelementptr inbounds [501 x i8], [501 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [501 x i8], [501 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %3, i8* %4)
%8 = load i8, i8* %3
%9 = icmp eq i8 %8, 0
br i1 %9, label %22, label %10
10: ; preds = %0, %10
%11 = phi i64 [ %18, %10 ], [ 0, %0 ]
%12 = phi i8 [ %20, %10 ], [ %8, %0 ]
%13 = getelementptr inbounds [501 x i8], [501 x i8]* %2, i64 0, i64 %11
%14 = load i8, i8* %13
%15 = icmp eq i8 %12, %14
%16 = select i1 %15, i32 46, i32 42
%17 = call i32 @putchar(i32 %16)
%18 = add nuw i64 %11, 1
%19 = getelementptr inbounds [501 x i8], [501 x i8]* %1, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = icmp eq i8 %20, 0
br i1 %21, label %22, label %10
22: ; preds = %10, %0
%23 = call i32 @putchar(i32 10)
ret void
}