#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 makeEqual(char *, int, char *, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int c, n1, n2;
  char *s1;
  char *s2;
  scanf("%d", &n1);
  s1 = (char *)malloc(n1 + 1);
  scanf("%s", s1);
  scanf("%d", &n2);
  s2 = (char *)malloc(n2 + 1);
  scanf("%s", s2);
  c = makeEqual(s1, n1, s2, n2);
  printf("%d", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xe77(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x10(%rbp),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe55(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%ecx
call   1040 <makeEqual@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe2b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xeb1(%rip),%r14
lea    0x4(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,%r12
lea    0xe8f(%rip),%r15
mov    %r15,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %rsp,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    (%rsp),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%ecx
mov    %r12,%rdi
mov    %rbx,%rdx
call   1040 <makeEqual@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
%17 = call i64 @malloc(i32 %16)
%18 = inttoptr i64 %17 to i8*
store i8* %18, i8** %6
%19 = load i8*, i8** %6
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %19)
%21 = load i8*, i8** %5
%22 = load i32, i32* %3
%23 = load i8*, i8** %6
%24 = load i32, i32* %4
%25 = call i32 @makeEqual(i8* %21, i32 %22, i8* %23, i32 %24)
store i32 %25, i32* %2
%26 = load i32, i32* %2
%27 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %26)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
%14 = call i64 @malloc(i32 %13)
%15 = inttoptr i64 %14 to i8*
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = load i32, i32* %1
%18 = load i32, i32* %2
%19 = call i32 @makeEqual(i8* %9, i32 %17, i8* %15, i32 %18)
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %19)
ret i32 0
}