int judge(char *s) {
  int l, lc;
  char m[] = {"2147483647"};
  l = strlen(s);
  lc = strlen(m);
  if (l < lc)
    return 0;
  if (l > lc)
    return 1;
  if (strcmp(s, m) > 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<judge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    0xecd(%rip),%rax
mov    %rax,-0x23(%rbp)
mov    0xeca(%rip),%ax
mov    %ax,-0x1b(%rbp)
mov    0xec2(%rip),%al
mov    %al,-0x19(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
lea    -0x23(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    117b <judge+0x5b>
movl   $0x0,-0x4(%rbp)
jmp    11bc <judge+0x9c>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    1193 <judge+0x73>
movl   $0x1,-0x4(%rbp)
jmp    11bc <judge+0x9c>
mov    -0x10(%rbp),%rdi
lea    -0x23(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jle    11b5 <judge+0x95>
movl   $0x1,-0x4(%rbp)
jmp    11bc <judge+0x9c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<judge>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0xa,%ecx
jl     1152 <judge+0x32>
mov    $0x1,%eax
jne    1152 <judge+0x32>
lea    0xebf(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setg   %al
pop    %rbx
ret

LLVM IR (-O0):
@__const.judge.m = [11 x i8] c"2147483647\00"
define i32 @judge(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca [11 x i8]
store i8* %0, i8** %3
%7 = bitcast [11 x i8]* %6 to i8*
%8 = load i8*, i8** %3
%9 = call i64 @strlen(i8* %8)
%10 = trunc i64 %9 to i32
store i32 %10, i32* %4
%11 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%12 = call i64 @strlen(i8* %11)
%13 = trunc i64 %12 to i32
store i32 %13, i32* %5
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %1
store i32 0, i32* %2
br label %30
18: ; preds = %1
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = icmp sgt i32 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 1, i32* %2
br label %30
23: ; preds = %18
%24 = load i8*, i8** %3
%25 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%26 = call i32 @strcmp(i8* %24, i8* %25)
%27 = icmp sgt i32 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %23
store i32 1, i32* %2
br label %30
29: ; preds = %23
store i32 0, i32* %2
br label %30
30: ; preds = %29, %28, %22, %17
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
@__const.judge.m = [11 x i8] c"2147483647\00"
define i32 @judge(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = icmp slt i32 %3, 10
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = icmp eq i32 %3, 10
br i1 %6, label %7, label %11
7: ; preds = %5
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @__const.judge.m, i64 0, i64 0))
%9 = icmp sgt i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %5, %1
%12 = phi i32 [ 0, %1 ], [ 1, %5 ], [ %10, %7 ]
ret i32 %12
}