#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*/ memcpy(char *, char const *, int);
char *mpfr_get_version();
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  const char *version = mpfr_get_version();
  char subversion[5];
  memcpy(subversion, version, 5);
  subversion[5] = '\0';
  if (strcmp(subversion, "4.0.0") == 0)
    return 0;
  if (strcmp(subversion, "4.0.1") == 0)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <mpfr_get_version@plt>
mov    %rax,-0x18(%rbp)
lea    -0x1d(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x5,%edx
call   1040 <memcpy@plt>
movb   $0x0,-0x18(%rbp)
lea    -0x1d(%rbp),%rdi
lea    0xe8e(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    118d <main+0x5d>
movl   $0x0,-0x4(%rbp)
jmp    11ba <main+0x8a>
lea    -0x1d(%rbp),%rdi
lea    0xe6e(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11b3 <main+0x83>
movl   $0x0,-0x4(%rbp)
jmp    11ba <main+0x8a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <mpfr_get_version@plt>
lea    0x3(%rsp),%r14
mov    %r14,%rdi
mov    %rax,%rsi
mov    $0x5,%edx
call   1040 <memcpy@plt>
movb   $0x0,0x8(%rsp)
lea    0xea2(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1184 <main+0x54>
lea    0xe94(%rip),%rsi
lea    0x3(%rsp),%rdi
call   1030 <strcmp@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"4.0.0\00"
@.str.1 = [6 x i8] c"4.0.1\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i8]
%4 = tail call i8* (...) @mpfr_get_version()
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%6 = call i32 @memcpy(i8* %5, i8* %4, i32 5)
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 5
store i8 0, i8* %7
%8 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %2
%11 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp ne i64 %11, 0
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %10, %2
%15 = phi i32 [ 0, %2 ], [ %13, %10 ]
ret i32 %15
}