#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, ...);
main() {
  int lines, line, a;
  scanf("%d", &lines);
  for (line = 1; line <= lines; line++) {
    int N, min, temp;
    char name[11];
    scanf("%d", &N);
    min = 987654321;
    for (a = 0; a < N - 1; a++) {
      scanf("%s %d", &name, &temp);
      if (min > temp)
        min = temp;
    }
    scanf("%s %d", &name, &temp);
    printf("Assembly #%d: %d\n", line, min);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1206 <main+0xd6>
lea    0xe98(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x3ade68b1,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    11d0 <main+0xa0>
lea    0xe64(%rip),%rdi
lea    -0x27(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    11bd <main+0x8d>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    11c2 <main+0x92>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1184 <main+0x54>
lea    0xe29(%rip),%rdi
lea    -0x27(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe13(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1158 <main+0x28>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xebe(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jg     115f <main+0x2f>
xor    %edi,%edi
call   1050 <exit@plt>
mov    $0x1,%r12d
lea    0xe94(%rip),%r13
lea    0xd(%rsp),%rbx
lea    0x8(%rsp),%rbp
jmp    11b1 <main+0x81>
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xe6f(%rip),%rdi
mov    %r12d,%esi
mov    %r15d,%edx
call   1030 <printf@plt>
lea    0x1(%r12),%eax
cmp    0x4(%rsp),%r12d
mov    %eax,%r12d
jge    1158 <main+0x28>
lea    0xe4b(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    $0x3ade68b1,%r15d
cmpl   $0x2,(%rsp)
jl     1180 <main+0x50>
xor    %r14d,%r14d
mov    $0x3ade68b1,%r15d
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
cmp    %eax,%r15d
cmovg  %eax,%r15d
add    $0x1,%r14d
mov    (%rsp),%eax
add    $0xffffffff,%eax
cmp    %eax,%r14d
jl     11e0 <main+0xb0>
jmp    1180 <main+0x50>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%s %d\00"
@.str.2 = [18 x i8] c"Assembly #%d: %d\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 [11 x i8]
store i32 0, i32* %1
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 1, i32* %3
br label %10
10: ; preds = %37, %0
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = icmp sle i32 %11, %12
br i1 %13, label %14, label %40
14: ; preds = %10
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
store i32 987654321, i32* %6
store i32 0, i32* %4
br label %16
16: ; preds = %29, %14
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = sub nsw i32 %18, 1
%20 = icmp slt i32 %17, %19
br i1 %20, label %21, label %32
21: ; preds = %16
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), [11 x i8]* %8, i32* %7)
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = icmp sgt i32 %23, %24
br i1 %25, label %26, label %28
26: ; preds = %21
%27 = load i32, i32* %7
store i32 %27, i32* %6
br label %28
28: ; preds = %26, %21
br label %29
29: ; preds = %28
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 1
store i32 %31, i32* %4
br label %16
32: ; preds = %16
%33 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), [11 x i8]* %8, i32* %7)
%34 = load i32, i32* %3
%35 = load i32, i32* %6
%36 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %34, i32 %35)
br label %37
37: ; preds = %32
%38 = load i32, i32* %3
%39 = add nsw i32 %38, 1
store i32 %39, i32* %3
br label %10
40: ; preds = %10
%41 = call i32 @exit(i32 0)
unreachable
}

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