// File: /workspace/github_c_makefile_star2_O0/ieyasu[P]funit/generate_code.c
// Function: generate_assert_array_equal
static int generate_assert_array_equal(struct Code *macro)
{
    struct Code *a = macro->u.m.args, *b;

    if (check_assert_args("assert_array_equal", macro, a, 2) != 2)
        return -1;
    b = a->next;

    fputs("! assert_array_equal()\n", fout);

    print_array_size_check(a, b);

    // do loop
    fputs("    do funit_i_ = 1,size(", fout);
    PRINT_CODE(a);
    fputs(")\n", fout);
    fputs("      if (", fout);
    PRINT_CODE(a);
    fputs("(funit_i_) /= ", fout);
    PRINT_CODE(b);
    fputs("(funit_i_)) then\n", fout);
    fputs("        write(funit_message_,*) \"", fout);
    print_macro_arg(a);
    fputs("(\", funit_i_, &\n          \") is not equal to ", fout);
    print_macro_arg(b);
    fputs("(\", funit_i_, &\n          \"): \", ", fout);
    PRINT_CODE(a);
    fputs("(funit_i_), \"vs\", ", fout);
    PRINT_CODE(b);
    fputs("(funit_i_)\n", fout);
    fputs("        funit_passed_ = .false.\n", fout);
    fputs("        return\n", fout);
    fputs("      end if\n", fout);
    fputs("    end do", fout);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0x6230(%rip), %rdi      # 0xb867
movl $0x2, %ecx
callq 0x5c80
cmpl $0x2, %eax
je 0x5652
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5845
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq 0xbc2c(%rip), %rsi      # 0x11290
leaq 0x620f(%rip), %rdi      # 0xb87a
callq 0x2130
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x6170
movq 0xbc0c(%rip), %rsi      # 0x11290
leaq 0x6207(%rip), %rdi      # 0xb892
callq 0x2130
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
movq 0xbbe9(%rip), %rcx      # 0x11290
movl $0x1, %edx
callq 0x2270
movq 0xbbd8(%rip), %rsi      # 0x11290
leaq 0x66a8(%rip), %rdi      # 0xbd67
callq 0x2130
movq 0xbbc5(%rip), %rsi      # 0x11290
leaq 0x61da(%rip), %rdi      # 0xb8ac
callq 0x2130
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
movq 0xbba2(%rip), %rcx      # 0x11290
movl $0x1, %edx
callq 0x2270
movq 0xbb91(%rip), %rsi      # 0x11290
leaq 0x61b1(%rip), %rdi      # 0xb8b7
callq 0x2130
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rsi
movq 0xbb6e(%rip), %rcx      # 0x11290
movl $0x1, %edx
callq 0x2270
movq 0xbb5d(%rip), %rsi      # 0x11290
leaq 0x618c(%rip), %rdi      # 0xb8c6
callq 0x2130
movq 0xbb4a(%rip), %rsi      # 0x11290
leaq 0x618b(%rip), %rdi      # 0xb8d8
callq 0x2130
movq -0x18(%rbp), %rdi
callq 0x5cc0
movq 0xbb2e(%rip), %rsi      # 0x11290
leaq 0x6191(%rip), %rdi      # 0xb8fa
callq 0x2130
movq -0x20(%rbp), %rdi
callq 0x5cc0
movq 0xbb12(%rip), %rsi      # 0x11290
leaq 0x61a3(%rip), %rdi      # 0xb928
callq 0x2130
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
movq 0xbaef(%rip), %rcx      # 0x11290
movl $0x1, %edx
callq 0x2270
movq 0xbade(%rip), %rsi      # 0x11290
leaq 0x6191(%rip), %rdi      # 0xb94a
callq 0x2130
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rsi
movq 0xbabb(%rip), %rcx      # 0x11290
movl $0x1, %edx
callq 0x2270
movq 0xbaaa(%rip), %rsi      # 0x11290
leaq 0x6170(%rip), %rdi      # 0xb95d
callq 0x2130
movq 0xba97(%rip), %rsi      # 0x11290
leaq 0x6169(%rip), %rdi      # 0xb969
callq 0x2130
movq 0xba84(%rip), %rsi      # 0x11290
leaq 0x6177(%rip), %rdi      # 0xb98a
callq 0x2130
movq 0xba71(%rip), %rsi      # 0x11290
leaq 0x6174(%rip), %rdi      # 0xb99a
callq 0x2130
movq 0xba5e(%rip), %rsi      # 0x11290
leaq 0x616f(%rip), %rdi      # 0xb9a8
callq 0x2130
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop