#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*/ printf(char *);
int main(void) {
  char a[100] = "abcde";
  char b[100] = "abcdf";
  int i;
  int sum_a = 0, sum_b = 0;
  for (i = 0; '\0' != a[i]; i++) {
    sum_a += a[i] + 0;
  }
  for (i = 0; '\0' != b[i]; i++) {
    sum_b += b[i] + 0;
  }
  if (sum_a > sum_b)
    printf("a>b");
  else if (sum_a < sum_b)
    printf("a<b");
  else
    printf("a=b");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1040 <memset@plt>
movb   $0x61,-0x70(%rbp)
movb   $0x62,-0x6f(%rbp)
movb   $0x63,-0x6e(%rbp)
movb   $0x64,-0x6d(%rbp)
movb   $0x65,-0x6c(%rbp)
lea    -0xe0(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1040 <memset@plt>
movb   $0x61,-0xe0(%rbp)
movb   $0x62,-0xdf(%rbp)
movb   $0x63,-0xde(%rbp)
movb   $0x64,-0xdd(%rbp)
movb   $0x66,-0xdc(%rbp)
movl   $0x0,-0xe8(%rbp)
movl   $0x0,-0xec(%rbp)
movl   $0x0,-0xe4(%rbp)
movslq -0xe4(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     11ef <main+0xcf>
movslq -0xe4(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
add    $0x0,%eax
add    -0xe8(%rbp),%eax
mov    %eax,-0xe8(%rbp)
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    11aa <main+0x8a>
movl   $0x0,-0xe4(%rbp)
movslq -0xe4(%rbp),%rax
movsbl -0xe0(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    %ecx,%eax
je     1244 <main+0x124>
movslq -0xe4(%rbp),%rax
movsbl -0xe0(%rbp,%rax,1),%eax
ff
add    $0x0,%eax
add    -0xec(%rbp),%eax
mov    %eax,-0xec(%rbp)
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    11f9 <main+0xd9>
mov    -0xe8(%rbp),%eax
cmp    -0xec(%rbp),%eax
jle    1267 <main+0x147>
lea    0xda3(%rip),%rdi
call   1030 <printf@plt>
jmp    129b <main+0x17b>
mov    -0xe8(%rbp),%eax
cmp    -0xec(%rbp),%eax
jge    128a <main+0x16a>
lea    0xd84(%rip),%rdi
call   1030 <printf@plt>
jmp    1296 <main+0x176>
lea    0xd77(%rip),%rdi
call   1030 <printf@plt>
jmp    129b <main+0x17b>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xd8,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movl   $0x0,0xd0(%rsp)
movl   $0x64636261,0x70(%rsp)
64
lea    0x71(%rsp),%rcx
movb   $0x65,0x74(%rsp)
movaps %xmm0,(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movl   $0x0,0x60(%rsp)
movl   $0x64636261,(%rsp)
movb   $0x66,0x4(%rsp)
xor    %esi,%esi
mov    $0x61,%dl
nopl   0x0(%rax)
movsbl %dl,%eax
add    %eax,%esi
movzbl (%rcx),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    11a0 <main+0x90>
lea    0x1(%rsp),%rdx
xor    %ecx,%ecx
mov    $0x61,%al
nopl   0x0(%rax)
movsbl %al,%eax
add    %eax,%ecx
movzbl (%rdx),%eax
add    $0x1,%rdx
test   %al,%al
jne    11c0 <main+0xb0>
cmp    %ecx,%esi
lea    0xe2b(%rip),%rax
lea    0xe28(%rip),%rcx
cmovl  %rax,%rcx
lea    0xe15(%rip),%rdi
cmovle %rcx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xd8,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"a>b\00"
@.str.1 = [4 x i8] c"a<b\00"
@.str.2 = [4 x i8] c"a=b\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = bitcast [100 x i8]* %2 to i8*
%8 = bitcast i8* %7 to [100 x i8]*
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i32 0, i32 0
store i8 97, i8* %9
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i32 0, i32 1
store i8 98, i8* %10
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i32 0, i32 2
store i8 99, i8* %11
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i32 0, i32 3
store i8 100, i8* %12
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i32 0, i32 4
store i8 101, i8* %13
%14 = bitcast [100 x i8]* %3 to i8*
%15 = bitcast i8* %14 to [100 x i8]*
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i32 0, i32 0
store i8 97, i8* %16
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i32 0, i32 1
store i8 98, i8* %17
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i32 0, i32 2
store i8 99, i8* %18
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i32 0, i32 3
store i8 100, i8* %19
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i32 0, i32 4
store i8 102, i8* %20
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %4
br label %21
21: ; preds = %37, %0
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp ne i32 0, %26
br i1 %27, label %28, label %40
28: ; preds = %21
%29 = load i32, i32* %4
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %30
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = add nsw i32 %33, 0
%35 = load i32, i32* %5
%36 = add nsw i32 %35, %34
store i32 %36, i32* %5
br label %37
37: ; preds = %28
%38 = load i32, i32* %4
%39 = add nsw i32 %38, 1
store i32 %39, i32* %4
br label %21
40: ; preds = %21
store i32 0, i32* %4
br label %41
41: ; preds = %57, %40
%42 = load i32, i32* %4
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %43
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = icmp ne i32 0, %46
br i1 %47, label %48, label %60
48: ; preds = %41
%49 = load i32, i32* %4
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %50
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = add nsw i32 %53, 0
%55 = load i32, i32* %6
%56 = add nsw i32 %55, %54
store i32 %56, i32* %6
br label %57
57: ; preds = %48
%58 = load i32, i32* %4
%59 = add nsw i32 %58, 1
store i32 %59, i32* %4
br label %41
60: ; preds = %41
%61 = load i32, i32* %5
%62 = load i32, i32* %6
%63 = icmp sgt i32 %61, %62
br i1 %63, label %64, label %66
64: ; preds = %60
%65 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %75
66: ; preds = %60
%67 = load i32, i32* %5
%68 = load i32, i32* %6
%69 = icmp slt i32 %67, %68
br i1 %69, label %70, label %72
70: ; preds = %66
%71 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %74
72: ; preds = %66
%73 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %74
74: ; preds = %72, %70
br label %75
75: ; preds = %74, %64
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"a>b\00"
@.str.1 = [4 x i8] c"a<b\00"
@.str.2 = [4 x i8] c"a=b\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
store i8 97, i8* %3
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 1
store i8 98, i8* %4
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 2
store i8 99, i8* %5
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 3
store i8 100, i8* %6
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 4
store i8 101, i8* %7
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
store i8 97, i8* %8
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 1
store i8 98, i8* %9
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 2
store i8 99, i8* %10
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 3
store i8 100, i8* %11
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 4
store i8 102, i8* %12
br label %13
13: ; preds = %13, %0
%14 = phi i64 [ 0, %0 ], [ %19, %13 ]
%15 = phi i8 [ 97, %0 ], [ %21, %13 ]
%16 = phi i32 [ 0, %0 ], [ %18, %13 ]
%17 = sext i8 %15 to i32
%18 = add nsw i32 %16, %17
%19 = add nuw nsw i64 %14, 1
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %19
%21 = load i8, i8* %20
%22 = icmp eq i8 %21, 0
br i1 %22, label %23, label %13
23: ; preds = %13, %23
%24 = phi i64 [ %29, %23 ], [ 0, %13 ]
%25 = phi i8 [ %31, %23 ], [ 97, %13 ]
%26 = phi i32 [ %28, %23 ], [ 0, %13 ]
%27 = sext i8 %25 to i32
%28 = add nsw i32 %26, %27
%29 = add nuw nsw i64 %24, 1
%30 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %29
%31 = load i8, i8* %30
%32 = icmp eq i8 %31, 0
br i1 %32, label %33, label %23
33: ; preds = %23
%34 = icmp sgt i32 %18, %28
%35 = icmp slt i32 %18, %28
%36 = select i1 %35, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%37 = select i1 %34, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %36
%38 = tail call i32 @printf(i8* dereferenceable(1) %37)
ret i32 0
}