int main(int i) {
  struct {
    int v;
    char k[512];
  } a[6] = {2 << 15};
  for (i = 1; i < 6 || 0 * printf("%s %d\n", a->k, a->v); i++)
    if (scanf("%s %d", a[i].k, &a[i].v), a->v > a[i].v)
      *a = a[i];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
lea    -0xc20(%rbp),%rdi
xor    %esi,%esi
mov    $0xc18,%edx
call   1040 <memset@plt>
movl   $0x10000,-0xc20(%rbp)
movl   $0x1,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x6,-0x8(%rbp)
mov    %al,-0xc21(%rbp)
jl     11b9 <main+0x79>
lea    -0xc20(%rbp),%rsi
add    $0x4,%rsi
mov    -0xc20(%rbp),%edx
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
imul   $0x0,%eax,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xc21(%rbp)
mov    -0xc21(%rbp),%al
test   $0x1,%al
jne    11cc <main+0x8c>
jmp    1264 <main+0x124>
movslq -0x8(%rbp),%rax
lea    -0xc20(%rbp),%rsi
imul   $0x204,%rax,%rax
add    %rax,%rsi
add    $0x4,%rsi
movslq -0x8(%rbp),%rax
lea    -0xc20(%rbp),%rdx
imul   $0x204,%rax,%rax
add    %rax,%rdx
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0xc20(%rbp),%eax
movslq -0x8(%rbp),%rdx
lea    -0xc20(%rbp),%rcx
imul   $0x204,%rdx,%rdx
add    %rdx,%rcx
cmp    (%rcx),%eax
jle    1251 <main+0x111>
lea    -0xc20(%rbp),%rdi
movslq -0x8(%rbp),%rax
lea    -0xc20(%rbp),%rsi
imul   $0x204,%rax,%rax
add    %rax,%rsi
mov    $0x204,%edx
call   1050 <memcpy@plt>
jmp    1256 <main+0x116>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1179 <main+0x39>
mov    -0x4(%rbp),%eax
add    $0xc30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xc20,%rsp
mov    %rsp,%rdi
mov    $0xc18,%edx
xor    %esi,%esi
call   1040 <memset@plt>
movl   $0x10000,(%rsp)
lea    0x204(%rsp),%rbx
lea    0x208(%rsp),%rsi
lea    0xe92(%rip),%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <scanf@plt>
mov    (%rsp),%eax
cmp    0x204(%rsp),%eax
jle    119b <main+0x5b>
mov    %rsp,%rdi
mov    $0x204,%edx
mov    %rbx,%rsi
call   1050 <memcpy@plt>
lea    0x408(%rsp),%rbx
lea    0x40c(%rsp),%rsi
lea    0xe55(%rip),%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <scanf@plt>
mov    (%rsp),%eax
cmp    0x408(%rsp),%eax
jle    11d8 <main+0x98>
mov    %rsp,%rdi
mov    $0x204,%edx
mov    %rbx,%rsi
call   1050 <memcpy@plt>
lea    0x60c(%rsp),%rbx
lea    0x610(%rsp),%rsi
lea    0xe18(%rip),%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <scanf@plt>
mov    (%rsp),%eax
cmp    0x60c(%rsp),%eax
jle    1215 <main+0xd5>
mov    %rsp,%rdi
mov    $0x204,%edx
mov    %rbx,%rsi
call   1050 <memcpy@plt>
lea    0x810(%rsp),%rbx
lea    0x814(%rsp),%rsi
lea    0xddb(%rip),%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <scanf@plt>
mov    (%rsp),%eax
cmp    0x810(%rsp),%eax
jle    1252 <main+0x112>
mov    %rsp,%rdi
mov    $0x204,%edx
mov    %rbx,%rsi
call   1050 <memcpy@plt>
lea    0xa14(%rsp),%rbx
lea    0xa18(%rsp),%rsi
lea    0xd9e(%rip),%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <scanf@plt>
mov    (%rsp),%edx
cmp    0xa14(%rsp),%edx
jle    1292 <main+0x152>
mov    %rsp,%rdi
mov    $0x204,%edx
mov    %rbx,%rsi
call   1050 <memcpy@plt>
mov    (%rsp),%edx
lea    0x4(%rsp),%rsi
lea    0xd62(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xc20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.anon = type { i32, [512 x i8] }
@.str = [7 x i8] c"%s %d\0A\00"
@.str.1 = [6 x i8] c"%s %d\00"
define i32 @main(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [6 x %struct.anon]
store i32 0, i32* %2
store i32 %0, i32* %3
%5 = bitcast [6 x %struct.anon]* %4 to i8*
%6 = bitcast i8* %5 to [6 x %struct.anon]*
%7 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %6, i32 0, i32 0
%8 = getelementptr inbounds %struct.anon, %struct.anon* %7, i32 0, i32 0
store i32 65536, i32* %8
store i32 1, i32* %3
br label %9
9: ; preds = %52, %1
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 6
br i1 %11, label %22, label %12
12: ; preds = %9
%13 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %4, i64 0, i64 0
%14 = getelementptr inbounds %struct.anon, %struct.anon* %13, i32 0, i32 1
%15 = getelementptr inbounds [512 x i8], [512 x i8]* %14, i64 0, i64 0
%16 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %4, i64 0, i64 0
%17 = getelementptr inbounds %struct.anon, %struct.anon* %16, i32 0, i32 0
%18 = load i32, i32* %17
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %15, i32 %18)
%20 = mul nsw i32 0, %19
%21 = icmp ne i32 %20, 0
br label %22
22: ; preds = %12, %9
%23 = phi i1 [ true, %9 ], [ %21, %12 ]
br i1 %23, label %24, label %55
24: ; preds = %22
%25 = load i32, i32* %3
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %4, i64 0, i64 %26
%28 = getelementptr inbounds %struct.anon, %struct.anon* %27, i32 0, i32 1
%29 = getelementptr inbounds [512 x i8], [512 x i8]* %28, i64 0, i64 0
%30 = load i32, i32* %3
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %4, i64 0, i64 %31
%33 = getelementptr inbounds %struct.anon, %struct.anon* %32, i32 0, i32 0
%34 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %29, i32* %33)
%35 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %4, i64 0, i64 0
%36 = getelementptr inbounds %struct.anon, %struct.anon* %35, i32 0, i32 0
%37 = load i32, i32* %36
%38 = load i32, i32* %3
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %4, i64 0, i64 %39
%41 = getelementptr inbounds %struct.anon, %struct.anon* %40, i32 0, i32 0
%42 = load i32, i32* %41
%43 = icmp sgt i32 %37, %42
br i1 %43, label %44, label %51
44: ; preds = %24
%45 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %4, i64 0, i64 0
%46 = load i32, i32* %3
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %4, i64 0, i64 %47
%49 = bitcast %struct.anon* %45 to i8*
%50 = bitcast %struct.anon* %48 to i8*
br label %51
51: ; preds = %44, %24
br label %52
52: ; preds = %51
%53 = load i32, i32* %3
%54 = add nsw i32 %53, 1
store i32 %54, i32* %3
br label %9
55: ; preds = %22
%56 = load i32, i32* %2
ret i32 %56
}

LLVM IR (-O2):
%struct.anon = type { i32, [512 x i8] }
@.str = [7 x i8] c"%s %d\0A\00"
@.str.1 = [6 x i8] c"%s %d\00"
define i32 @main(i32 %0) {
%2 = alloca [6 x %struct.anon]
%3 = bitcast [6 x %struct.anon]* %2 to i8*
%4 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %2, i64 0, i64 0, i32 0
store i32 65536, i32* %4
%5 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %2, i64 0, i64 1
%6 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %2, i64 0, i64 1, i32 1, i64 0
%7 = getelementptr inbounds %struct.anon, %struct.anon* %5, i64 0, i32 0
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %6, i32* %7)
%9 = load i32, i32* %4
%10 = load i32, i32* %7
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %1
%13 = bitcast %struct.anon* %5 to i8*
br label %14
14: ; preds = %1, %12
%15 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %2, i64 0, i64 2
%16 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %2, i64 0, i64 2, i32 1, i64 0
%17 = getelementptr inbounds %struct.anon, %struct.anon* %15, i64 0, i32 0
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %16, i32* %17)
%19 = load i32, i32* %4
%20 = load i32, i32* %17
%21 = icmp sgt i32 %19, %20
br i1 %21, label %22, label %24
22: ; preds = %14
%23 = bitcast %struct.anon* %15 to i8*
br label %24
24: ; preds = %22, %14
%25 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %2, i64 0, i64 3
%26 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %2, i64 0, i64 3, i32 1, i64 0
%27 = getelementptr inbounds %struct.anon, %struct.anon* %25, i64 0, i32 0
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %26, i32* %27)
%29 = load i32, i32* %4
%30 = load i32, i32* %27
%31 = icmp sgt i32 %29, %30
br i1 %31, label %32, label %34
32: ; preds = %24
%33 = bitcast %struct.anon* %25 to i8*
br label %34
34: ; preds = %32, %24
%35 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %2, i64 0, i64 4
%36 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %2, i64 0, i64 4, i32 1, i64 0
%37 = getelementptr inbounds %struct.anon, %struct.anon* %35, i64 0, i32 0
%38 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %36, i32* %37)
%39 = load i32, i32* %4
%40 = load i32, i32* %37
%41 = icmp sgt i32 %39, %40
br i1 %41, label %42, label %44
42: ; preds = %34
%43 = bitcast %struct.anon* %35 to i8*
br label %44
44: ; preds = %42, %34
%45 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %2, i64 0, i64 5
%46 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %2, i64 0, i64 5, i32 1, i64 0
%47 = getelementptr inbounds %struct.anon, %struct.anon* %45, i64 0, i32 0
%48 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %46, i32* %47)
%49 = load i32, i32* %4
%50 = load i32, i32* %47
%51 = icmp sgt i32 %49, %50
br i1 %51, label %52, label %55
52: ; preds = %44
%53 = bitcast %struct.anon* %45 to i8*
%54 = load i32, i32* %4
br label %55
55: ; preds = %52, %44
%56 = phi i32 [ %54, %52 ], [ %49, %44 ]
%57 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* %2, i64 0, i64 0, i32 1, i64 0
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %57, i32 %56)
ret i32 0
}