#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 /*<<< orphan*/ scanf(char *, int *, ...);
int main() {
  int m = 1, inter = 0, gremio = 0, draws = 0, tem1, tem2, cou = 0;
  while (m == 1) {
    scanf("%d%d", &tem1, &tem2);
    cou++;
    printf("Novo grenal (1-sim 2-nao)\n");
    if (tem1 > tem2) {
      inter++;
    } else if (tem1 < tem2) {
      gremio++;
    } else {
      draws++;
    }
    scanf("%d", &m);
  }
  printf("%d grenais\n", cou);
  printf("Inter:%d\n", inter);
  printf("Gremio:%d\n", gremio);
  printf("Empates:%d\n", draws);
  printf("Inter venceu mais\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    11e2 <main+0xc2>
lea    0xe9d(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    11a3 <main+0x83>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11cb <main+0xab>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11bd <main+0x9d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11c6 <main+0xa6>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11cb <main+0xab>
lea    0xe30(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
jmp    1152 <main+0x32>
mov    -0x20(%rbp),%esi
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movl   $0x1,0xc(%rsp)
lea    0x10(%rsp),%r14
lea    0xef2(%rip),%r15
lea    0xea9(%rip),%r12
lea    0xc(%rsp),%r13
xor    %ebp,%ebp
movl   $0x0,0x8(%rsp)
movl   $0x0,0x4(%rsp)
xor    %ebx,%ebx
jmp    119a <main+0x6a>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%ebx
mov    %r12,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
add    $0x1,%ebp
cmpl   $0x1,0xc(%rsp)
jne    11d7 <main+0xa7>
lea    0xe5f(%rip),%rdi
lea    0x14(%rsp),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    0x10(%rsp),%eax
cmp    %eax,0x14(%rsp)
jg     1180 <main+0x50>
jge    11d0 <main+0xa0>
addl   $0x1,0x4(%rsp)
jmp    1183 <main+0x53>
nopl   0x0(%rax,%rax,1)
addl   $0x1,0x8(%rsp)
jmp    1183 <main+0x53>
lea    0xe27(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe23(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe1d(%rip),%rdi
mov    0x4(%rsp),%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe16(%rip),%rdi
mov    0x8(%rsp),%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe10(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [27 x i8] c"Novo grenal (1-sim 2-nao)\0A\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [12 x i8] c"%d grenais\0A\00"
@.str.4 = [10 x i8] c"Inter:%d\0A\00"
@.str.5 = [11 x i8] c"Gremio:%d\0A\00"
@.str.6 = [12 x i8] c"Empates:%d\0A\00"
@.str.7 = [19 x i8] c"Inter venceu mais\0A\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
store i32 0, i32* %1
store i32 1, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %8
br label %9
9: ; preds = %34, %0
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %36
12: ; preds = %9
%13 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %7)
%14 = load i32, i32* %8
%15 = add nsw i32 %14, 1
store i32 %15, i32* %8
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = icmp sgt i32 %17, %18
br i1 %19, label %20, label %23
20: ; preds = %12
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %34
23: ; preds = %12
%24 = load i32, i32* %6
%25 = load i32, i32* %7
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %30
27: ; preds = %23
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 1
store i32 %29, i32* %4
br label %33
30: ; preds = %23
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 1
store i32 %32, i32* %5
br label %33
33: ; preds = %30, %27
br label %34
34: ; preds = %33, %20
%35 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
br label %9
36: ; preds = %9
%37 = load i32, i32* %8
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %37)
%39 = load i32, i32* %3
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %39)
%41 = load i32, i32* %4
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 %41)
%43 = load i32, i32* %5
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %43)
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%46 = load i32, i32* %1
ret i32 %46
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [12 x i8] c"%d grenais\0A\00"
@.str.4 = [10 x i8] c"Inter:%d\0A\00"
@.str.5 = [11 x i8] c"Gremio:%d\0A\00"
@.str.6 = [12 x i8] c"Empates:%d\0A\00"
@str = [18 x i8] c"Inter venceu mais\00"
@str.8 = [26 x i8] c"Novo grenal (1-sim 2-nao)\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
br label %7
7: ; preds = %0, %26
%8 = phi i32 [ 0, %0 ], [ %13, %26 ]
%9 = phi i32 [ 0, %0 ], [ %29, %26 ]
%10 = phi i32 [ 0, %0 ], [ %28, %26 ]
%11 = phi i32 [ 0, %0 ], [ %27, %26 ]
%12 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%13 = add nuw nsw i32 %8, 1
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.8, i64 0, i64 0))
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = icmp sgt i32 %15, %16
br i1 %17, label %18, label %20
18: ; preds = %7
%19 = add nsw i32 %11, 1
br label %26
20: ; preds = %7
%21 = icmp slt i32 %15, %16
br i1 %21, label %22, label %24
22: ; preds = %20
%23 = add nsw i32 %10, 1
br label %26
24: ; preds = %20
%25 = add nsw i32 %9, 1
br label %26
26: ; preds = %22, %24, %18
%27 = phi i32 [ %19, %18 ], [ %11, %22 ], [ %11, %24 ]
%28 = phi i32 [ %10, %18 ], [ %23, %22 ], [ %10, %24 ]
%29 = phi i32 [ %9, %18 ], [ %9, %22 ], [ %25, %24 ]
%30 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%31 = load i32, i32* %1
%32 = icmp eq i32 %31, 1
br i1 %32, label %7, label %33
33: ; preds = %26
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %13)
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %27)
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 %28)
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %29)
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 0
}