#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 *, char *, int, int);
int /*<<< orphan*/ scanf(char *, char *, int *, int *);
int main(void) {
  int mo, af, i;
  char class[16];
  for (i = 0; i < 9; i++) {
    scanf("%s %d %d\n", class, &mo, &af);
    printf("%s %d %d\n", class, mo + af, mo * 200 + af * 300);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x9,-0x10(%rbp)
jge    118c <main+0x6c>
lea    -0x20(%rbp),%rsi
lea    0xeb5(%rip),%rdi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1040 <scanf@plt>
lea    -0x20(%rbp),%rsi
mov    -0x8(%rbp),%edx
add    -0xc(%rbp),%edx
imul   $0xc8,-0x8(%rbp),%ecx
imul   $0x12c,-0xc(%rbp),%eax
add    %eax,%ecx
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20,%rsp
mov    $0x9,%ebp
lea    0xec8(%rip),%r14
lea    0x10(%rsp),%rbx
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%r12
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ecx
lea    (%rcx,%rax,1),%edx
imul   $0xc8,%eax,%eax
imul   $0x12c,%ecx,%ecx
add    %eax,%ecx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0xffffffff,%ebp
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%s %d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [16 x i8]
store i32 0, i32* %1
store i32 0, i32* %4
br label %6
6: ; preds = %22, %0
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 9
br i1 %8, label %9, label %25
9: ; preds = %6
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%11 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %10, i32* %2, i32* %3)
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = add nsw i32 %13, %14
%16 = load i32, i32* %2
%17 = mul nsw i32 %16, 200
%18 = load i32, i32* %3
%19 = mul nsw i32 %18, 300
%20 = add nsw i32 %17, %19
%21 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %12, i32 %15, i32 %20)
br label %22
22: ; preds = %9
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
store i32 %24, i32* %4
br label %6
25: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%s %d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [16 x i8]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
br label %7
7: ; preds = %0, %7
%8 = phi i32 [ 0, %0 ], [ %17, %7 ]
%9 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %6, i32* %1, i32* %2)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = add nsw i32 %11, %10
%13 = mul nsw i32 %10, 200
%14 = mul nsw i32 %11, 300
%15 = add nsw i32 %14, %13
%16 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %12, i32 %15)
%17 = add nuw nsw i32 %8, 1
%18 = icmp eq i32 %17, 9
br i1 %18, label %19, label %7
19: ; preds = %7
ret i32 0
}