// File: /workspace/github_c_makefile_star2_O0/6851-2021[P]euler_tour_tree/benchmark.c
// Function: benchmark_ops
void benchmark_ops() {
    int ops, n;

    scanf("%d, %d\n", &ops, &n);

    int* op_array = malloc(sizeof(int) * ops);
    int* i_array = malloc(sizeof(int) * ops);
    int* j_array = malloc(sizeof(int) * ops);
    for (int line = 0; line < ops; line++) {
        scanf("%d, %d, %d\n", op_array + line, i_array + line, j_array + line);
    }

    clock_t start_time = clock();

    for (int round = 0; round < 10; round ++) {

        EulerTourTree* tree = make_euler_tour_tree(n);

        for (int line = 0; line < ops; line++) {
            int op = op_array[line];
            int i = i_array[line];
            int j = j_array[line];

            if (op == 0) {
                connectivity(tree, i, j);
            } else if (op == 1) {
                link(tree, i, j);
            } else if (op == 2) {
                cut(tree, i);
            } else if (op == 3) {
                subtree_aggregate_min(tree, i);
            } else if (op == 4) {
                point_update(tree, i, j);
            } else if (op == 5) {
                subtree_update(tree, i, j);
            }
        }
        destroy_euler_tour_tree(tree);
    }

    clock_t end_time = clock();
    printf("%f %d %d\n", ((double) (end_time-start_time))*1e6/CLOCKS_PER_SEC/ops, ops, n);
}

// Assembly:
subq $0x58, %rsp
leaq 0x1e69(%rip), %rdi      # 0x3014
leaq 0x54(%rsp), %rsi
leaq 0x50(%rsp), %rdx
movb $0x0, %al
callq 0x1090
movslq 0x54(%rsp), %rdi
shlq $0x2, %rdi
callq 0x1070
movq %rax, 0x48(%rsp)
movslq 0x54(%rsp), %rdi
shlq $0x2, %rdi
callq 0x1070
movq %rax, 0x40(%rsp)
movslq 0x54(%rsp), %rdi
shlq $0x2, %rdi
callq 0x1070
movq %rax, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
cmpl 0x54(%rsp), %eax
jge 0x1255
movq 0x48(%rsp), %rsi
movslq 0x34(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rsi
movq 0x40(%rsp), %rdx
movslq 0x34(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rdx
movq 0x38(%rsp), %rcx
movslq 0x34(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rcx
leaq 0x1dcf(%rip), %rdi      # 0x3010
movb $0x0, %al
callq 0x1090
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x11fd
callq 0x1040
movq %rax, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
cmpl $0xa, 0x24(%rsp)
jge 0x13a5
movslq 0x50(%rsp), %rdi
callq 0x1f20
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x54(%rsp), %eax
jge 0x138b
movq 0x48(%rsp), %rax
movslq 0x14(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x10(%rsp)
movq 0x40(%rsp), %rax
movslq 0x14(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0xc(%rsp)
movq 0x38(%rsp), %rax
movslq 0x14(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x10(%rsp)
jne 0x12ea
movq 0x18(%rsp), %rdi
movslq 0xc(%rsp), %rsi
movslq 0x8(%rsp), %rdx
callq 0x25a0
jmp 0x1379
cmpl $0x1, 0x10(%rsp)
jne 0x1307
movq 0x18(%rsp), %rdi
movslq 0xc(%rsp), %rsi
movslq 0x8(%rsp), %rdx
callq 0x2390
jmp 0x1377
cmpl $0x2, 0x10(%rsp)
jne 0x131f
movq 0x18(%rsp), %rdi
movslq 0xc(%rsp), %rsi
callq 0x2240
jmp 0x1375
cmpl $0x3, 0x10(%rsp)
jne 0x1337
movq 0x18(%rsp), %rdi
movslq 0xc(%rsp), %rsi
callq 0x26f0
jmp 0x1373
cmpl $0x4, 0x10(%rsp)
jne 0x1354
movq 0x18(%rsp), %rdi
movslq 0xc(%rsp), %rsi
movslq 0x8(%rsp), %rdx
callq 0x2640
jmp 0x1371
cmpl $0x5, 0x10(%rsp)
jne 0x136f
movq 0x18(%rsp), %rdi
movslq 0xc(%rsp), %rsi
movslq 0x8(%rsp), %rdx
callq 0x2680
jmp 0x1371
jmp 0x1373
jmp 0x1375
jmp 0x1377
jmp 0x1379
jmp 0x137b
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x1289
movq 0x18(%rsp), %rdi
callq 0x2110
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x1267
callq 0x1040
movq %rax, (%rsp)
movq (%rsp), %rax
subq 0x28(%rsp), %rax
vcvtsi2sd %rax, %xmm0, %xmm0
vmovsd 0x1c44(%rip), %xmm1     # 0x3008
vmulsd %xmm1, %xmm0, %xmm0
vmovsd 0x1c38(%rip), %xmm1     # 0x3008
vdivsd %xmm1, %xmm0, %xmm0
vcvtsi2sdl 0x54(%rsp), %xmm1, %xmm1
vdivsd %xmm1, %xmm0, %xmm0
movl 0x54(%rsp), %esi
movl 0x50(%rsp), %edx
leaq 0x1c2f(%rip), %rdi      # 0x301c
movb $0x1, %al
callq 0x1050
addq $0x58, %rsp
retq
nopl (%rax)