#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 calculate_sed(int *, int, int *, int);
int /*<<< orphan*/ get_input(int *, int *, int *, int *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int str1[10000];
  int str1_length;
  int str2[10000];
  int str2_length;
  get_input(str1, &str1_length, str2, &str2_length);
  int sed_value = calculate_sed(str1, str1_length, str2, str2_length);
  printf("%d", sed_value);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x138a0,%rsp
lea    -0x9c40(%rbp),%rdi
lea    -0x13890(%rbp),%rdx
lea    -0x9c44(%rbp),%rsi
lea    -0x13894(%rbp),%rcx
call   1050 <get_input@plt>
lea    -0x9c40(%rbp),%rdi
mov    -0x9c44(%rbp),%esi
lea    -0x13890(%rbp),%rdx
mov    -0x13894(%rbp),%ecx
call   1040 <calculate_sed@plt>
mov    %eax,-0x13898(%rbp)
mov    -0x13898(%rbp),%esi
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x138a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x13898,%rsp
lea    0x9c50(%rsp),%rbx
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%r14
lea    0x8(%rsp),%rcx
mov    %rbx,%rdi
mov    %r14,%rdx
call   1050 <get_input@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%ecx
mov    %rbx,%rdi
mov    %r14,%rdx
call   1040 <calculate_sed@plt>
lea    0xe8a(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x13898,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [10000 x i32]
%2 = alloca i32
%3 = alloca [10000 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = getelementptr inbounds [10000 x i32], [10000 x i32]* %1, i64 0, i64 0
%7 = getelementptr inbounds [10000 x i32], [10000 x i32]* %3, i64 0, i64 0
%8 = call i32 @get_input(i32* %6, i32* %2, i32* %7, i32* %4)
%9 = getelementptr inbounds [10000 x i32], [10000 x i32]* %1, i64 0, i64 0
%10 = load i32, i32* %2
%11 = getelementptr inbounds [10000 x i32], [10000 x i32]* %3, i64 0, i64 0
%12 = load i32, i32* %4
%13 = call i32 @calculate_sed(i32* %9, i32 %10, i32* %11, i32 %12)
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [10000 x i32]
%2 = alloca i32
%3 = alloca [10000 x i32]
%4 = alloca i32
%5 = bitcast [10000 x i32]* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast [10000 x i32]* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = getelementptr inbounds [10000 x i32], [10000 x i32]* %1, i64 0, i64 0
%10 = getelementptr inbounds [10000 x i32], [10000 x i32]* %3, i64 0, i64 0
%11 = call i32 @get_input(i32* %9, i32* %2, i32* %10, i32* %4)
%12 = load i32, i32* %2
%13 = load i32, i32* %4
%14 = call i32 @calculate_sed(i32* %9, i32 %12, i32* %10, i32 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}