#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*/ check(char *, char *, int (*)());
int strcmp();
int main(void) {
  char s1[80] = "Teste", s2[80] = "Teste";
  int (*p)();
  p = strcmp;
  check(s1, s2, p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1030 <memset@plt>
movb   $0x54,-0x60(%rbp)
movb   $0x65,-0x5f(%rbp)
movb   $0x73,-0x5e(%rbp)
movb   $0x74,-0x5d(%rbp)
movb   $0x65,-0x5c(%rbp)
lea    -0xb0(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1030 <memset@plt>
movb   $0x54,-0xb0(%rbp)
movb   $0x65,-0xaf(%rbp)
movb   $0x73,-0xae(%rbp)
movb   $0x74,-0xad(%rbp)
movb   $0x65,-0xac(%rbp)
mov    0x2e4d(%rip),%rax
mov    %rax,-0xb8(%rbp)
lea    -0x60(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
mov    -0xb8(%rbp),%rdx
call   1040 <check@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xa8,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movl   $0x74736554,0x50(%rsp)
74
movb   $0x65,0x54(%rsp)
movaps %xmm0,(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movl   $0x74736554,(%rsp)
movb   $0x65,0x4(%rsp)
mov    0x2e6f(%rip),%rdx
lea    0x50(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <check@plt>
xor    %eax,%eax
add    $0xa8,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
%3 = alloca [80 x i8]
%4 = alloca i32 (...)*
store i32 0, i32* %1
%5 = bitcast [80 x i8]* %2 to i8*
%6 = bitcast i8* %5 to [80 x i8]*
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i32 0, i32 0
store i8 84, i8* %7
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i32 0, i32 1
store i8 101, i8* %8
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i32 0, i32 2
store i8 115, i8* %9
%10 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i32 0, i32 3
store i8 116, i8* %10
%11 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i32 0, i32 4
store i8 101, i8* %11
%12 = bitcast [80 x i8]* %3 to i8*
%13 = bitcast i8* %12 to [80 x i8]*
%14 = getelementptr inbounds [80 x i8], [80 x i8]* %13, i32 0, i32 0
store i8 84, i8* %14
%15 = getelementptr inbounds [80 x i8], [80 x i8]* %13, i32 0, i32 1
store i8 101, i8* %15
%16 = getelementptr inbounds [80 x i8], [80 x i8]* %13, i32 0, i32 2
store i8 115, i8* %16
%17 = getelementptr inbounds [80 x i8], [80 x i8]* %13, i32 0, i32 3
store i8 116, i8* %17
%18 = getelementptr inbounds [80 x i8], [80 x i8]* %13, i32 0, i32 4
store i8 101, i8* %18
store i32 (...)* bitcast (i32 (i8*, i8*)* @strcmp to i32 (...)*), i32 (...)** %4
%19 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%20 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%21 = load i32 (...)*, i32 (...)** %4
%22 = call i32 @check(i8* %19, i8* %20, i32 (...)* %21)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [80 x i8]
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
store i8 84, i8* %3
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 1
store i8 101, i8* %4
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 2
store i8 115, i8* %5
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 3
store i8 116, i8* %6
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 4
store i8 101, i8* %7
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
store i8 84, i8* %8
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 1
store i8 101, i8* %9
%10 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 2
store i8 115, i8* %10
%11 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 3
store i8 116, i8* %11
%12 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 4
store i8 101, i8* %12
%13 = call i32 @check(i8* %3, i8* %8, i32 (...)* bitcast (i32 (i8*, i8*)* @strcmp to i32 (...)*))
ret i32 0
}