#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, float);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int nbl, type, id;
  char code[12];
  float poids;
  scanf("%d", &nbl);
  for (int i = 0; i < nbl; i++) {
    scanf("%d", &type);
    switch (type) {
    case 1:
      scanf("%s %d", code, &id);
      poids = 1.0f;
      break;
    case 2:
      scanf("%f %d %s", &poids, &id, code);
      break;
    case 3:
      scanf("%d %f", &id, &poids);
      break;
    }
    printf("%d %1.1f\n", id, poids);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed1(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    121b <main+0xfb>
lea    0xeac(%rip),%rdi
xor    %eax,%eax
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x28(%rbp)
sub    $0x1,%eax
je     119c <main+0x7c>
jmp    117a <main+0x5a>
mov    -0x28(%rbp),%eax
sub    $0x2,%eax
je     11c4 <main+0xa4>
jmp    118b <main+0x6b>
mov    -0x28(%rbp),%eax
sub    $0x3,%eax
je     11e3 <main+0xc3>
jmp    11f9 <main+0xd9>
lea    -0x1c(%rbp),%rsi
lea    0xe5d(%rip),%rdi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movss  0xe46(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    11f9 <main+0xd9>
lea    -0x1c(%rbp),%rcx
lea    0xe3b(%rip),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
jmp    11f9 <main+0xd9>
lea    0xe29(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x10(%rbp),%esi
movss  -0x20(%rbp),%xmm0
lea    0xe11(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1148 <main+0x28>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xece(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x10(%rsp)
jle    1208 <main+0xe8>
lea    0xeb0(%rip),%r14
lea    0x18(%rsp),%rbx
lea    0x14(%rsp),%r12
lea    0xeb1(%rip),%rbp
lea    0x1c(%rsp),%r15
xor    %r13d,%r13d
jmp    11a6 <main+0x86>
xchg   %ax,%ax
lea    0xe8f(%rip),%rdi
lea    0xc(%rsp),%rsi
mov    %r12,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x14(%rsp),%esi
movss  0xc(%rsp),%xmm0
mov    %rbp,%rdi
call   1030 <printf@plt>
add    $0x1,%r13d
cmp    0x10(%rsp),%r13d
jge    1208 <main+0xe8>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x18(%rsp),%eax
cmp    $0x3,%eax
je     11f0 <main+0xd0>
cmp    $0x2,%eax
je     1170 <main+0x50>
cmp    $0x1,%eax
jne    1189 <main+0x69>
lea    0xe33(%rip),%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
movl   $0x3f800000,0xc(%rsp)
3f
jmp    1189 <main+0x69>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xe18(%rip),%rdi
mov    %r12,%rsi
lea    0xc(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
jmp    1189 <main+0x69>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%s %d\00"
@.str.2 = [9 x i8] c"%f %d %s\00"
@.str.3 = [6 x i8] c"%d %f\00"
@.str.4 = [10 x i8] c"%d %1.1f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [12 x i8]
%5 = alloca float
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%10 = bitcast float* %5 to i8*
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%12 = load i32, i32* %1
%13 = icmp sgt i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %25, %0
ret i32 0
15: ; preds = %0, %25
%16 = phi i32 [ %29, %25 ], [ 0, %0 ]
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%18 = load i32, i32* %2
switch i32 %18, label %25 [
i32 1, label %19
i32 2, label %21
i32 3, label %23
]
19: ; preds = %15
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %9, i32* %3)
store float 1.000000e+00, float* %5
br label %25
21: ; preds = %15
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), float* %5, i32* %3, i8* %9)
br label %25
23: ; preds = %15
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32* %3, float* %5)
br label %25
25: ; preds = %15, %23, %21, %19
%26 = load i32, i32* %3
%27 = load float, float* %5
%28 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %26, float %27)
%29 = add nuw nsw i32 %16, 1
%30 = load i32, i32* %1
%31 = icmp slt i32 %29, %30
br i1 %31, label %15, label %14
}