# 1st parameter in rdi # 2nd parameter in esi/rsi initMat: .LFB0: testl %esi, %esi # if n <= 0 jle .L1 # goto .L1 leal -1(%rsi), %ecx # ecx = n-1 leaq 0(,%rcx,4), %rax # rax = 4(n-1) leaq 4(%rdi,%rax), %rdx # rdx = a+4n # address of nth element of 0th row addq %rcx, %rax # rax = 5(n-1) leaq (%rcx,%rax,2), %rax # rax = 11(n-1) leaq 44(%rdi,%rax,4), %rsi # rsi = a+44n # address of the nth element of nth row notq %rcx # rcx = not(n-1) # = -n salq $2, %rcx # rcx = -4n jmp .L3 # goto .L3 .L6: addq $40, %rdx # rdx = rdx+40 # address of the nth element of the # next row # cmpq %rsi, %rdx # if rdx == a+44n je .L1 # goto .L1 .L3: leaq (%rcx,%rdx), %rax # rax = a+40i .L4: movl $1, (%rax) # a[i][j] = 1 addq $4, %rax # rax = a+40i+4(j+1) cmpq %rdx, %rax # if rax < rdx jne .L4 # goto .L4, next in the row jmp .L6 # else goto .L6, next row .L1: ret