#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*/ assert(int);
int compare_version_num_as_string(char *, char *);
int main() {
  char ver10[] = "0.1";
  char ver20[] = "1.1";
  assert(-1 == compare_version_num_as_string(ver10, ver20));
  char ver11[] = "1.1";
  char ver21[] = "0.1";
  assert(1 == compare_version_num_as_string(ver11, ver21));
  char ver12[] = "1.1";
  char ver22[] = "1.1";
  assert(0 == compare_version_num_as_string(ver12, ver22));
  char ver13[] = "1.0";
  char ver23[] = "1.1";
  assert(-1 == compare_version_num_as_string(ver13, ver23));
  char ver14[] = "1.1";
  char ver24[] = "1.0";
  assert(1 == compare_version_num_as_string(ver14, ver24));
  char ver15[] = "123.0";
  char ver25[] = "1.0";
  assert(1 == compare_version_num_as_string(ver15, ver25));
  char ver16[] = "1.0";
  char ver26[] = "123.0";
  assert(-1 == compare_version_num_as_string(ver16, ver26));
  char ver17[] = "1.0";
  char ver27[] = "123.0";
  assert(-1 == compare_version_num_as_string(ver17, ver27));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xec6(%rip),%eax
mov    %eax,-0xc(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <compare_version_num_as_string@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0xe9a(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xe8d(%rip),%eax
mov    %eax,-0x14(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <compare_version_num_as_string@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0xe65(%rip),%eax
mov    %eax,-0x18(%rbp)
mov    0xe5c(%rip),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x18(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <compare_version_num_as_string@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0xe37(%rip),%eax
mov    %eax,-0x20(%rbp)
mov    0xe2a(%rip),%eax
mov    %eax,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x24(%rbp),%rsi
call   1040 <compare_version_num_as_string@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0xdfe(%rip),%eax
mov    %eax,-0x28(%rbp)
mov    0xdf9(%rip),%eax
mov    %eax,-0x2c(%rbp)
lea    -0x28(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
call   1040 <compare_version_num_as_string@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0xdd1(%rip),%eax
mov    %eax,-0x32(%rbp)
mov    0xdcb(%rip),%ax
mov    %ax,-0x2e(%rbp)
mov    0xdb9(%rip),%eax
mov    %eax,-0x36(%rbp)
lea    -0x32(%rbp),%rdi
lea    -0x36(%rbp),%rsi
call   1040 <compare_version_num_as_string@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0xd8d(%rip),%eax
mov    %eax,-0x3a(%rbp)
mov    0xd88(%rip),%eax
mov    %eax,-0x40(%rbp)
mov    0xd82(%rip),%ax
mov    %ax,-0x3c(%rbp)
lea    -0x3a(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1040 <compare_version_num_as_string@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0xd4d(%rip),%eax
mov    %eax,-0x44(%rbp)
mov    0xd48(%rip),%eax
mov    %eax,-0x4a(%rbp)
mov    0xd42(%rip),%ax
mov    %ax,-0x46(%rbp)
lea    -0x44(%rbp),%rdi
lea    -0x4a(%rbp),%rsi
call   1040 <compare_version_num_as_string@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
movl   $0x312e30,0x54(%rsp)
movl   $0x312e31,0x50(%rsp)
lea    0x54(%rsp),%rdi
lea    0x50(%rsp),%rsi
call   1040 <compare_version_num_as_string@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
call   1030 <assert@plt>
movl   $0x312e31,0x4c(%rsp)
movl   $0x312e30,0x48(%rsp)
lea    0x4c(%rsp),%rdi
lea    0x48(%rsp),%rsi
call   1040 <compare_version_num_as_string@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1030 <assert@plt>
movl   $0x312e31,0x44(%rsp)
movl   $0x312e31,0x40(%rsp)
lea    0x44(%rsp),%rdi
lea    0x40(%rsp),%rsi
call   1040 <compare_version_num_as_string@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
movl   $0x302e31,0x3c(%rsp)
movl   $0x312e31,0x38(%rsp)
lea    0x3c(%rsp),%rdi
lea    0x38(%rsp),%rsi
call   1040 <compare_version_num_as_string@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
call   1030 <assert@plt>
movl   $0x312e31,0x34(%rsp)
movl   $0x302e31,0x30(%rsp)
lea    0x34(%rsp),%rdi
lea    0x30(%rsp),%rsi
call   1040 <compare_version_num_as_string@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1030 <assert@plt>
movw   $0x30,0x2c(%rsp)
movl   $0x2e333231,0x28(%rsp)
2e
movl   $0x302e31,0x24(%rsp)
lea    0x28(%rsp),%rdi
lea    0x24(%rsp),%rsi
call   1040 <compare_version_num_as_string@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1030 <assert@plt>
movl   $0x302e31,0x20(%rsp)
movw   $0x30,0x1c(%rsp)
movl   $0x2e333231,0x18(%rsp)
2e
lea    0x20(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1040 <compare_version_num_as_string@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
call   1030 <assert@plt>
movl   $0x302e31,0x14(%rsp)
movw   $0x30,0x10(%rsp)
movl   $0x2e333231,0xc(%rsp)
2e
lea    0x14(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1040 <compare_version_num_as_string@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.main.ver10 = [4 x i8] c"0.1\00"
@__const.main.ver20 = [4 x i8] c"1.1\00"
@__const.main.ver11 = [4 x i8] c"1.1\00"
@__const.main.ver21 = [4 x i8] c"0.1\00"
@__const.main.ver12 = [4 x i8] c"1.1\00"
@__const.main.ver22 = [4 x i8] c"1.1\00"
@__const.main.ver13 = [4 x i8] c"1.0\00"
@__const.main.ver23 = [4 x i8] c"1.1\00"
@__const.main.ver14 = [4 x i8] c"1.1\00"
@__const.main.ver24 = [4 x i8] c"1.0\00"
@__const.main.ver15 = [6 x i8] c"123.0\00"
@__const.main.ver25 = [4 x i8] c"1.0\00"
@__const.main.ver16 = [4 x i8] c"1.0\00"
@__const.main.ver26 = [6 x i8] c"123.0\00"
@__const.main.ver17 = [4 x i8] c"1.0\00"
@__const.main.ver27 = [6 x i8] c"123.0\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = alloca [4 x i8]
%4 = alloca [4 x i8]
%5 = alloca [4 x i8]
%6 = alloca [4 x i8]
%7 = alloca [4 x i8]
%8 = alloca [4 x i8]
%9 = alloca [4 x i8]
%10 = alloca [4 x i8]
%11 = alloca [4 x i8]
%12 = alloca [6 x i8]
%13 = alloca [4 x i8]
%14 = alloca [4 x i8]
%15 = alloca [6 x i8]
%16 = alloca [4 x i8]
%17 = alloca [6 x i8]
store i32 0, i32* %1
%18 = bitcast [4 x i8]* %2 to i8*
%19 = bitcast [4 x i8]* %3 to i8*
%20 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%21 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%22 = call i32 @compare_version_num_as_string(i8* %20, i8* %21)
%23 = icmp eq i32 -1, %22
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
%26 = bitcast [4 x i8]* %4 to i8*
%27 = bitcast [4 x i8]* %5 to i8*
%28 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%29 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%30 = call i32 @compare_version_num_as_string(i8* %28, i8* %29)
%31 = icmp eq i32 1, %30
%32 = zext i1 %31 to i32
%33 = call i32 @assert(i32 %32)
%34 = bitcast [4 x i8]* %6 to i8*
%35 = bitcast [4 x i8]* %7 to i8*
%36 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%37 = getelementptr inbounds [4 x i8], [4 x i8]* %7, i64 0, i64 0
%38 = call i32 @compare_version_num_as_string(i8* %36, i8* %37)
%39 = icmp eq i32 0, %38
%40 = zext i1 %39 to i32
%41 = call i32 @assert(i32 %40)
%42 = bitcast [4 x i8]* %8 to i8*
%43 = bitcast [4 x i8]* %9 to i8*
%44 = getelementptr inbounds [4 x i8], [4 x i8]* %8, i64 0, i64 0
%45 = getelementptr inbounds [4 x i8], [4 x i8]* %9, i64 0, i64 0
%46 = call i32 @compare_version_num_as_string(i8* %44, i8* %45)
%47 = icmp eq i32 -1, %46
%48 = zext i1 %47 to i32
%49 = call i32 @assert(i32 %48)
%50 = bitcast [4 x i8]* %10 to i8*
%51 = bitcast [4 x i8]* %11 to i8*
%52 = getelementptr inbounds [4 x i8], [4 x i8]* %10, i64 0, i64 0
%53 = getelementptr inbounds [4 x i8], [4 x i8]* %11, i64 0, i64 0
%54 = call i32 @compare_version_num_as_string(i8* %52, i8* %53)
%55 = icmp eq i32 1, %54
%56 = zext i1 %55 to i32
%57 = call i32 @assert(i32 %56)
%58 = bitcast [6 x i8]* %12 to i8*
%59 = bitcast [4 x i8]* %13 to i8*
%60 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 0
%61 = getelementptr inbounds [4 x i8], [4 x i8]* %13, i64 0, i64 0
%62 = call i32 @compare_version_num_as_string(i8* %60, i8* %61)
%63 = icmp eq i32 1, %62
%64 = zext i1 %63 to i32
%65 = call i32 @assert(i32 %64)
%66 = bitcast [4 x i8]* %14 to i8*
%67 = bitcast [6 x i8]* %15 to i8*
%68 = getelementptr inbounds [4 x i8], [4 x i8]* %14, i64 0, i64 0
%69 = getelementptr inbounds [6 x i8], [6 x i8]* %15, i64 0, i64 0
%70 = call i32 @compare_version_num_as_string(i8* %68, i8* %69)
%71 = icmp eq i32 -1, %70
%72 = zext i1 %71 to i32
%73 = call i32 @assert(i32 %72)
%74 = bitcast [4 x i8]* %16 to i8*
%75 = bitcast [6 x i8]* %17 to i8*
%76 = getelementptr inbounds [4 x i8], [4 x i8]* %16, i64 0, i64 0
%77 = getelementptr inbounds [6 x i8], [6 x i8]* %17, i64 0, i64 0
%78 = call i32 @compare_version_num_as_string(i8* %76, i8* %77)
%79 = icmp eq i32 -1, %78
%80 = zext i1 %79 to i32
%81 = call i32 @assert(i32 %80)
ret i32 0
}

LLVM IR (-O2):
@__const.main.ver27 = [6 x i8] c"123.0\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [6 x i8]
%12 = alloca i32
%13 = alloca i32
%14 = alloca [6 x i8]
%15 = alloca i32
%16 = alloca [6 x i8]
%17 = bitcast i32* %1 to i8*
store i32 3223088, i32* %1
%18 = bitcast i32* %2 to i8*
store i32 3223089, i32* %2
%19 = call i32 @compare_version_num_as_string(i8* %17, i8* %18)
%20 = icmp eq i32 %19, -1
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = bitcast i32* %3 to i8*
store i32 3223089, i32* %3
%24 = bitcast i32* %4 to i8*
store i32 3223088, i32* %4
%25 = call i32 @compare_version_num_as_string(i8* %23, i8* %24)
%26 = icmp eq i32 %25, 1
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
%29 = bitcast i32* %5 to i8*
store i32 3223089, i32* %5
%30 = bitcast i32* %6 to i8*
store i32 3223089, i32* %6
%31 = call i32 @compare_version_num_as_string(i8* %29, i8* %30)
%32 = icmp eq i32 %31, 0
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = bitcast i32* %7 to i8*
store i32 3157553, i32* %7
%36 = bitcast i32* %8 to i8*
store i32 3223089, i32* %8
%37 = call i32 @compare_version_num_as_string(i8* %35, i8* %36)
%38 = icmp eq i32 %37, -1
%39 = zext i1 %38 to i32
%40 = call i32 @assert(i32 %39)
%41 = bitcast i32* %9 to i8*
store i32 3223089, i32* %9
%42 = bitcast i32* %10 to i8*
store i32 3157553, i32* %10
%43 = call i32 @compare_version_num_as_string(i8* %41, i8* %42)
%44 = icmp eq i32 %43, 1
%45 = zext i1 %44 to i32
%46 = call i32 @assert(i32 %45)
%47 = getelementptr inbounds [6 x i8], [6 x i8]* %11, i64 0, i64 0
%48 = bitcast i32* %12 to i8*
store i32 3157553, i32* %12
%49 = call i32 @compare_version_num_as_string(i8* %47, i8* %48)
%50 = icmp eq i32 %49, 1
%51 = zext i1 %50 to i32
%52 = call i32 @assert(i32 %51)
%53 = bitcast i32* %13 to i8*
store i32 3157553, i32* %13
%54 = getelementptr inbounds [6 x i8], [6 x i8]* %14, i64 0, i64 0
%55 = call i32 @compare_version_num_as_string(i8* %53, i8* %54)
%56 = icmp eq i32 %55, -1
%57 = zext i1 %56 to i32
%58 = call i32 @assert(i32 %57)
%59 = bitcast i32* %15 to i8*
store i32 3157553, i32* %15
%60 = getelementptr inbounds [6 x i8], [6 x i8]* %16, i64 0, i64 0
%61 = call i32 @compare_version_num_as_string(i8* %59, i8* %60)
%62 = icmp eq i32 %61, -1
%63 = zext i1 %62 to i32
%64 = call i32 @assert(i32 %63)
ret i32 0
}