#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 *, long);
int /*<<< orphan*/ scanf(char *, long *, ...);
int main() {
  typedef struct orders {
    long int a;
    long int b;
    long int sum;
    long int ind;
  } orders;
  orders temp;
  long int n, i, j, k;
  scanf("%ld", &n);
  orders t[n];
  for (i = 0; i < n; i++) {
    scanf("%ld %ld", &t[i].a, &t[i].b);
    t[i].sum = t[i].a + t[i].b;
    t[i].ind = i + 1;
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < n - i - 1; j++) {
      if (t[j].sum > t[j + 1].sum) {
        temp = t[j];
        t[j] = t[j + 1];
        t[j + 1] = temp;
      }
      if (t[j].sum == t[j + 1].sum) {
        if (t[j + 1].a > t[j].a) {
          temp = t[j];
          t[j] = t[j + 1];
          t[j + 1] = temp;
        }
      }
    }
  }
  for (i = 0; i < n; i++) {
    printf("%ld ", t[i].ind);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
xor    %eax,%eax
lea    -0x30(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x30(%rbp),%rax
mov    %rsp,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rax,%rdx
shl    $0x5,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x60(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x58(%rbp)
movq   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x30(%rbp),%rax
jge    120a <main+0xea>
mov    -0x60(%rbp),%rdx
mov    -0x38(%rbp),%rax
shl    $0x5,%rax
mov    %rdx,%rsi
add    %rax,%rsi
mov    -0x38(%rbp),%rax
shl    $0x5,%rax
add    %rax,%rdx
add    $0x8,%rdx
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x60(%rbp),%rax
mov    -0x38(%rbp),%rdx
shl    $0x5,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
mov    (%rcx),%rdx
mov    -0x38(%rbp),%rsi
shl    $0x5,%rsi
mov    %rax,%rcx
add    %rsi,%rcx
add    0x8(%rcx),%rdx
mov    -0x38(%rbp),%rsi
shl    $0x5,%rsi
mov    %rax,%rcx
add    %rsi,%rcx
mov    %rdx,0x10(%rcx)
mov    -0x38(%rbp),%rcx
add    $0x1,%rcx
mov    -0x38(%rbp),%rdx
shl    $0x5,%rdx
add    %rdx,%rax
mov    %rcx,0x18(%rax)
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    116c <main+0x4c>
movq   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x30(%rbp),%rax
jge    1437 <main+0x317>
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x30(%rbp),%rcx
sub    -0x38(%rbp),%rcx
sub    $0x1,%rcx
cmp    %rcx,%rax
jge    1421 <main+0x301>
mov    -0x60(%rbp),%rcx
mov    -0x40(%rbp),%rdx
shl    $0x5,%rdx
mov    %rcx,%rax
add    %rdx,%rax
mov    0x10(%rax),%rax
mov    -0x40(%rbp),%rdx
add    $0x1,%rdx
shl    $0x5,%rdx
add    %rdx,%rcx
cmp    0x10(%rcx),%rax
jle    130d <main+0x1ed>
mov    -0x60(%rbp),%rax
mov    -0x40(%rbp),%rdx
shl    $0x5,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
mov    (%rcx),%rdx
mov    %rdx,-0x28(%rbp)
mov    0x8(%rcx),%rdx
mov    %rdx,-0x20(%rbp)
mov    0x10(%rcx),%rdx
mov    %rdx,-0x18(%rbp)
mov    0x18(%rcx),%rcx
mov    %rcx,-0x10(%rbp)
mov    -0x40(%rbp),%rdx
shl    $0x5,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
mov    -0x40(%rbp),%rsi
add    $0x1,%rsi
shl    $0x5,%rsi
mov    %rax,%rdx
add    %rsi,%rdx
mov    (%rdx),%rsi
mov    %rsi,(%rcx)
mov    0x8(%rdx),%rsi
mov    %rsi,0x8(%rcx)
mov    0x10(%rdx),%rsi
mov    %rsi,0x10(%rcx)
mov    0x18(%rdx),%rdx
mov    %rdx,0x18(%rcx)
mov    -0x40(%rbp),%rcx
add    $0x1,%rcx
shl    $0x5,%rcx
add    %rcx,%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rcx
mov    %rcx,0x8(%rax)
mov    -0x18(%rbp),%rcx
mov    %rcx,0x10(%rax)
mov    -0x10(%rbp),%rcx
mov    %rcx,0x18(%rax)
mov    -0x60(%rbp),%rcx
mov    -0x40(%rbp),%rdx
shl    $0x5,%rdx
mov    %rcx,%rax
add    %rdx,%rax
mov    0x10(%rax),%rax
mov    -0x40(%rbp),%rdx
add    $0x1,%rdx
shl    $0x5,%rdx
add    %rdx,%rcx
cmp    0x10(%rcx),%rax
jne    140b <main+0x2eb>
mov    -0x60(%rbp),%rcx
mov    -0x40(%rbp),%rdx
add    $0x1,%rdx
shl    $0x5,%rdx
mov    %rcx,%rax
add    %rdx,%rax
mov    (%rax),%rax
mov    -0x40(%rbp),%rdx
shl    $0x5,%rdx
add    %rdx,%rcx
cmp    (%rcx),%rax
jle    1406 <main+0x2e6>
mov    -0x60(%rbp),%rax
mov    -0x40(%rbp),%rdx
shl    $0x5,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
mov    (%rcx),%rdx
mov    %rdx,-0x28(%rbp)
mov    0x8(%rcx),%rdx
mov    %rdx,-0x20(%rbp)
mov    0x10(%rcx),%rdx
mov    %rdx,-0x18(%rbp)
mov    0x18(%rcx),%rcx
mov    %rcx,-0x10(%rbp)
mov    -0x40(%rbp),%rdx
shl    $0x5,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
mov    -0x40(%rbp),%rsi
add    $0x1,%rsi
shl    $0x5,%rsi
mov    %rax,%rdx
add    %rsi,%rdx
mov    (%rdx),%rsi
mov    %rsi,(%rcx)
mov    0x8(%rdx),%rsi
mov    %rsi,0x8(%rcx)
mov    0x10(%rdx),%rsi
mov    %rsi,0x10(%rcx)
mov    0x18(%rdx),%rdx
mov    %rdx,0x18(%rcx)
mov    -0x40(%rbp),%rcx
add    $0x1,%rcx
shl    $0x5,%rcx
add    %rcx,%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rcx
mov    %rcx,0x8(%rax)
mov    -0x18(%rbp),%rcx
mov    %rcx,0x10(%rax)
mov    -0x10(%rbp),%rcx
mov    %rcx,0x18(%rax)
jmp    140b <main+0x2eb>
jmp    1410 <main+0x2f0>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    1228 <main+0x108>
jmp    1426 <main+0x306>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1212 <main+0xf2>
movq   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x30(%rbp),%rax
jge    147d <main+0x35d>
mov    -0x60(%rbp),%rax
mov    -0x38(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
mov    0x18(%rax),%rsi
lea    0xba1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    143f <main+0x31f>
movl   $0x0,-0x4(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xecc(%rip),%rdi
lea    -0x30(%rbp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %rsp,%r15
mov    -0x30(%rbp),%rax
mov    %rsp,%r12
shl    $0x5,%rax
sub    %rax,%r12
mov    %r12,%rsp
cmpq   $0x0,-0x30(%rbp)
jle    12aa <main+0x18a>
lea    0xe97(%rip),%r14
mov    %r12,%rbx
xor    %r13d,%r13d
nop
lea    0x8(%rbx),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x8(%rbx),%rax
add    (%rbx),%rax
mov    %rax,0x10(%rbx)
add    $0x1,%r13
mov    %r13,0x18(%rbx)
mov    -0x30(%rbp),%r8
add    $0x20,%rbx
cmp    %r8,%r13
jl     1170 <main+0x50>
test   %r8,%r8
jle    12aa <main+0x18a>
xor    %ecx,%ecx
jmp    11bd <main+0x9d>
xchg   %ax,%ax
add    $0x1,%rcx
cmp    %r8,%rcx
je     1271 <main+0x151>
mov    %rcx,%rdx
not    %rdx
add    %r8,%rdx
test   %rdx,%rdx
jle    11b0 <main+0x90>
mov    %r12,%rsi
xor    %edi,%edi
jmp    11e9 <main+0xc9>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x20,%rsi
cmp    %rdx,%rdi
jge    11b0 <main+0x90>
mov    0x10(%rsi),%rbx
mov    0x30(%rsi),%rax
cmp    %rax,%rbx
jle    122c <main+0x10c>
movups (%rsi),%xmm0
movups 0x10(%rsi),%xmm1
movaps %xmm1,-0x40(%rbp)
movaps %xmm0,-0x50(%rbp)
movaps 0x20(%rsi),%xmm0
movaps 0x30(%rsi),%xmm1
movaps %xmm0,(%rsi)
movaps %xmm1,0x10(%rsi)
movaps -0x50(%rbp),%xmm0
movaps -0x40(%rbp),%xmm1
movups %xmm1,0x30(%rsi)
movups %xmm0,0x20(%rsi)
mov    0x10(%rsi),%rbx
mov    0x30(%rsi),%rax
add    $0x1,%rdi
cmp    %rax,%rbx
jne    11e0 <main+0xc0>
mov    0x20(%rsi),%rax
cmp    (%rsi),%rax
jle    11e0 <main+0xc0>
movups (%rsi),%xmm0
movups 0x10(%rsi),%xmm1
movaps %xmm1,-0x40(%rbp)
movaps %xmm0,-0x50(%rbp)
movaps 0x20(%rsi),%xmm0
movaps 0x30(%rsi),%xmm1
movaps %xmm0,(%rsi)
movaps %xmm1,0x10(%rsi)
movaps -0x50(%rbp),%xmm0
movaps -0x40(%rbp),%xmm1
movups %xmm0,0x20(%rsi)
movups %xmm1,0x30(%rsi)
jmp    11e0 <main+0xc0>
test   %r8,%r8
jle    12aa <main+0x18a>
add    $0x18,%r12
xor    %ebx,%ebx
lea    0xd85(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r12),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
add    $0x20,%r12
cmp    -0x30(%rbp),%rbx
jl     1290 <main+0x170>
mov    %r15,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.orders = type { i64, i64, i64, i64 }
@.str = [4 x i8] c"%ld\00"
@.str.1 = [8 x i8] c"%ld %ld\00"
@.str.2 = [5 x i8] c"%ld \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.orders
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i32 0, i32* %1
%9 = call i32 (i8*, i64*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %3)
%10 = load i64, i64* %3
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %7
%12 = alloca %struct.orders, i64 %10
store i64 %10, i64* %8
store i64 0, i64* %4
br label %13
13: ; preds = %42, %0
%14 = load i64, i64* %4
%15 = load i64, i64* %3
%16 = icmp slt i64 %14, %15
br i1 %16, label %17, label %45
17: ; preds = %13
%18 = load i64, i64* %4
%19 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %18
%20 = getelementptr inbounds %struct.orders, %struct.orders* %19, i32 0, i32 0
%21 = load i64, i64* %4
%22 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %21
%23 = getelementptr inbounds %struct.orders, %struct.orders* %22, i32 0, i32 1
%24 = call i32 (i8*, i64*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i64* %20, i64* %23)
%25 = load i64, i64* %4
%26 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %25
%27 = getelementptr inbounds %struct.orders, %struct.orders* %26, i32 0, i32 0
%28 = load i64, i64* %27
%29 = load i64, i64* %4
%30 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %29
%31 = getelementptr inbounds %struct.orders, %struct.orders* %30, i32 0, i32 1
%32 = load i64, i64* %31
%33 = add nsw i64 %28, %32
%34 = load i64, i64* %4
%35 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %34
%36 = getelementptr inbounds %struct.orders, %struct.orders* %35, i32 0, i32 2
store i64 %33, i64* %36
%37 = load i64, i64* %4
%38 = add nsw i64 %37, 1
%39 = load i64, i64* %4
%40 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %39
%41 = getelementptr inbounds %struct.orders, %struct.orders* %40, i32 0, i32 3
store i64 %38, i64* %41
br label %42
42: ; preds = %17
%43 = load i64, i64* %4
%44 = add nsw i64 %43, 1
store i64 %44, i64* %4
br label %13
45: ; preds = %13
store i64 0, i64* %4
br label %46
46: ; preds = %131, %45
%47 = load i64, i64* %4
%48 = load i64, i64* %3
%49 = icmp slt i64 %47, %48
br i1 %49, label %50, label %134
50: ; preds = %46
store i64 0, i64* %5
br label %51
51: ; preds = %127, %50
%52 = load i64, i64* %5
%53 = load i64, i64* %3
%54 = load i64, i64* %4
%55 = sub nsw i64 %53, %54
%56 = sub nsw i64 %55, 1
%57 = icmp slt i64 %52, %56
br i1 %57, label %58, label %130
58: ; preds = %51
%59 = load i64, i64* %5
%60 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %59
%61 = getelementptr inbounds %struct.orders, %struct.orders* %60, i32 0, i32 2
%62 = load i64, i64* %61
%63 = load i64, i64* %5
%64 = add nsw i64 %63, 1
%65 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %64
%66 = getelementptr inbounds %struct.orders, %struct.orders* %65, i32 0, i32 2
%67 = load i64, i64* %66
%68 = icmp sgt i64 %62, %67
br i1 %68, label %69, label %86
69: ; preds = %58
%70 = load i64, i64* %5
%71 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %70
%72 = bitcast %struct.orders* %2 to i8*
%73 = bitcast %struct.orders* %71 to i8*
%74 = load i64, i64* %5
%75 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %74
%76 = load i64, i64* %5
%77 = add nsw i64 %76, 1
%78 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %77
%79 = bitcast %struct.orders* %75 to i8*
%80 = bitcast %struct.orders* %78 to i8*
%81 = load i64, i64* %5
%82 = add nsw i64 %81, 1
%83 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %82
%84 = bitcast %struct.orders* %83 to i8*
%85 = bitcast %struct.orders* %2 to i8*
br label %86
86: ; preds = %69, %58
%87 = load i64, i64* %5
%88 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %87
%89 = getelementptr inbounds %struct.orders, %struct.orders* %88, i32 0, i32 2
%90 = load i64, i64* %89
%91 = load i64, i64* %5
%92 = add nsw i64 %91, 1
%93 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %92
%94 = getelementptr inbounds %struct.orders, %struct.orders* %93, i32 0, i32 2
%95 = load i64, i64* %94
%96 = icmp eq i64 %90, %95
br i1 %96, label %97, label %126
97: ; preds = %86
%98 = load i64, i64* %5
%99 = add nsw i64 %98, 1
%100 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %99
%101 = getelementptr inbounds %struct.orders, %struct.orders* %100, i32 0, i32 0
%102 = load i64, i64* %101
%103 = load i64, i64* %5
%104 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %103
%105 = getelementptr inbounds %struct.orders, %struct.orders* %104, i32 0, i32 0
%106 = load i64, i64* %105
%107 = icmp sgt i64 %102, %106
br i1 %107, label %108, label %125
108: ; preds = %97
%109 = load i64, i64* %5
%110 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %109
%111 = bitcast %struct.orders* %2 to i8*
%112 = bitcast %struct.orders* %110 to i8*
%113 = load i64, i64* %5
%114 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %113
%115 = load i64, i64* %5
%116 = add nsw i64 %115, 1
%117 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %116
%118 = bitcast %struct.orders* %114 to i8*
%119 = bitcast %struct.orders* %117 to i8*
%120 = load i64, i64* %5
%121 = add nsw i64 %120, 1
%122 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %121
%123 = bitcast %struct.orders* %122 to i8*
%124 = bitcast %struct.orders* %2 to i8*
br label %125
125: ; preds = %108, %97
br label %126
126: ; preds = %125, %86
br label %127
127: ; preds = %126
%128 = load i64, i64* %5
%129 = add nsw i64 %128, 1
store i64 %129, i64* %5
br label %51
130: ; preds = %51
br label %131
131: ; preds = %130
%132 = load i64, i64* %4
%133 = add nsw i64 %132, 1
store i64 %133, i64* %4
br label %46
134: ; preds = %46
store i64 0, i64* %4
br label %135
135: ; preds = %145, %134
%136 = load i64, i64* %4
%137 = load i64, i64* %3
%138 = icmp slt i64 %136, %137
br i1 %138, label %139, label %148
139: ; preds = %135
%140 = load i64, i64* %4
%141 = getelementptr inbounds %struct.orders, %struct.orders* %12, i64 %140
%142 = getelementptr inbounds %struct.orders, %struct.orders* %141, i32 0, i32 3
%143 = load i64, i64* %142
%144 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %143)
br label %145
145: ; preds = %139
%146 = load i64, i64* %4
%147 = add nsw i64 %146, 1
store i64 %147, i64* %4
br label %135
148: ; preds = %135
store i32 0, i32* %1
%149 = load i8*, i8** %7
%150 = load i32, i32* %1
ret i32 %150
}

LLVM IR (-O2):
%struct.orders = type { i64, i64, i64, i64 }
@.str = [4 x i8] c"%ld\00"
@.str.1 = [8 x i8] c"%ld %ld\00"
@.str.2 = [5 x i8] c"%ld \00"
define i32 @main() {
%1 = alloca %struct.orders
%2 = alloca i64
%3 = bitcast %struct.orders* %1 to i8*
%4 = bitcast i64* %2 to i8*
%5 = call i32 (i8*, i64*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %2)
%6 = load i64, i64* %2
%7 = call i8* @llvm.stacksave()
%8 = alloca %struct.orders, i64 %6
%9 = load i64, i64* %2
%10 = icmp sgt i64 %9, 0
br i1 %10, label %13, label %73
11: ; preds = %13
%12 = icmp sgt i64 %24, 0
br i1 %12, label %26, label %73
13: ; preds = %0, %13
%14 = phi i64 [ %22, %13 ], [ 0, %0 ]
%15 = getelementptr inbounds %struct.orders, %struct.orders* %8, i64 %14, i32 0
%16 = getelementptr inbounds %struct.orders, %struct.orders* %8, i64 %14, i32 1
%17 = call i32 (i8*, i64*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i64* %15, i64* %16)
%18 = load i64, i64* %15
%19 = load i64, i64* %16
%20 = add nsw i64 %19, %18
%21 = getelementptr inbounds %struct.orders, %struct.orders* %8, i64 %14, i32 2
store i64 %20, i64* %21
%22 = add nuw nsw i64 %14, 1
%23 = getelementptr inbounds %struct.orders, %struct.orders* %8, i64 %14, i32 3
store i64 %22, i64* %23
%24 = load i64, i64* %2
%25 = icmp slt i64 %22, %24
br i1 %25, label %13, label %11
26: ; preds = %11, %62
%27 = phi i64 [ %63, %62 ], [ 0, %11 ]
%28 = xor i64 %27, -1
%29 = add i64 %24, %28
%30 = icmp sgt i64 %29, 0
br i1 %30, label %32, label %62
31: ; preds = %62
br i1 %12, label %65, label %73
32: ; preds = %26, %60
%33 = phi i64 [ %37, %60 ], [ 0, %26 ]
%34 = getelementptr inbounds %struct.orders, %struct.orders* %8, i64 %33
%35 = getelementptr inbounds %struct.orders, %struct.orders* %8, i64 %33, i32 2
%36 = load i64, i64* %35
%37 = add nuw nsw i64 %33, 1
%38 = getelementptr inbounds %struct.orders, %struct.orders* %8, i64 %37
%39 = getelementptr inbounds %struct.orders, %struct.orders* %8, i64 %37, i32 2
%40 = load i64, i64* %39
%41 = icmp sgt i64 %36, %40
br i1 %41, label %42, label %47
42: ; preds = %32
%43 = bitcast %struct.orders* %34 to i8*
%44 = bitcast %struct.orders* %38 to i8*
%45 = load i64, i64* %35
%46 = load i64, i64* %39
br label %47
47: ; preds = %42, %32
%48 = phi i64 [ %46, %42 ], [ %40, %32 ]
%49 = phi i64 [ %45, %42 ], [ %36, %32 ]
%50 = icmp eq i64 %49, %48
br i1 %50, label %51, label %60
51: ; preds = %47
%52 = getelementptr inbounds %struct.orders, %struct.orders* %38, i64 0, i32 0
%53 = load i64, i64* %52
%54 = getelementptr inbounds %struct.orders, %struct.orders* %34, i64 0, i32 0
%55 = load i64, i64* %54
%56 = icmp sgt i64 %53, %55
br i1 %56, label %57, label %60
57: ; preds = %51
%58 = bitcast %struct.orders* %34 to i8*
%59 = bitcast %struct.orders* %38 to i8*
br label %60
60: ; preds = %47, %57, %51
%61 = icmp slt i64 %37, %29
br i1 %61, label %32, label %62
62: ; preds = %60, %26
%63 = add nuw nsw i64 %27, 1
%64 = icmp eq i64 %63, %24
br i1 %64, label %31, label %26
65: ; preds = %31, %65
%66 = phi i64 [ %70, %65 ], [ 0, %31 ]
%67 = getelementptr inbounds %struct.orders, %struct.orders* %8, i64 %66, i32 3
%68 = load i64, i64* %67
%69 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %68)
%70 = add nuw nsw i64 %66, 1
%71 = load i64, i64* %2
%72 = icmp slt i64 %70, %71
br i1 %72, label %65, label %73
73: ; preds = %65, %11, %0, %31
ret i32 0
}