// File: /workspace/github_c_makefile_star2_O0/MartinNovotny25[P]VUT-FIT-IFJ2020/semantics.c
// Function: printFunction
void printFunction(char *id, functionData data) {
    printf("Spustam printFunction\n");
    printf("Function id: %s\n", id);
    printf("Number of params: %d\n", data.numOfParams);
    printf("Number of return vals: %d\n", data.numOfReturns);
    printf("Params: \n");
    for (int i = 0; i < data.numOfParams; i++) {
        switch (data.paramsType[i]) {
            case t_INT_ID:
                printf("int ");
                break;
            case t_STRING_ID:
                printf("string ");
                break;
            case t_FLOAT64:
                printf("float64 ");
                break;
                
            default:
                break;
        }
        printf("%s\n", data.params[i]);
    }
    printf("Return types:\n");
    for (int i = 0; i < data.numOfReturns; i++) {
        switch (data.returns[i]) {
            case t_INT_ID:
                printf("int ");
                break;
            case t_STRING_ID:
                printf("string ");
                break;
            case t_FLOAT64:
                printf("float64 ");
                break;
                
            default:
                break;
        }
    }
    printf("\nprintFunction Ended\n\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq %rdi, -0x8(%rbp)
leaq 0x65b9(%rip), %rdi      # 0xd524
movb $0x0, %al
callq 0x1060
movq -0x8(%rbp), %rsi
leaq 0x65be(%rip), %rdi      # 0xd53b
movb $0x0, %al
callq 0x1060
movq -0x18(%rbp), %rax
movl (%rax), %esi
leaq 0x65bb(%rip), %rdi      # 0xd54c
movb $0x0, %al
callq 0x1060
movq -0x18(%rbp), %rax
movl 0x4(%rax), %esi
leaq 0x65bc(%rip), %rdi      # 0xd562
movb $0x0, %al
callq 0x1060
leaq 0x65c9(%rip), %rdi      # 0xd57d
movb $0x0, %al
callq 0x1060
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl (%rcx), %eax
jge 0x7059
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl 0x808(%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
subl $0x14, %eax
je 0x700e
jmp 0x6fea
movl -0x1c(%rbp), %eax
subl $0x17, %eax
je 0x701e
jmp 0x6ff4
movl -0x1c(%rbp), %eax
subl $0x18, %eax
jne 0x702e
jmp 0x6ffe
leaq 0x6582(%rip), %rdi      # 0xd587
movb $0x0, %al
callq 0x1060
jmp 0x7030
leaq 0x6577(%rip), %rdi      # 0xd58c
movb $0x0, %al
callq 0x1060
jmp 0x7030
leaq 0x656f(%rip), %rdi      # 0xd594
movb $0x0, %al
callq 0x1060
jmp 0x7030
jmp 0x7030
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rsi
leaq 0x6504(%rip), %rdi      # 0xd548
movb $0x0, %al
callq 0x1060
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6fc2
leaq 0x653d(%rip), %rdi      # 0xd59d
movb $0x0, %al
callq 0x1060
movl $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x70e6
movq -0x18(%rbp), %rax
movslq -0x10(%rbp), %rcx
movl 0xc08(%rax,%rcx,4), %eax
movl %eax, -0x20(%rbp)
subl $0x14, %eax
je 0x70b7
jmp 0x7093
movl -0x20(%rbp), %eax
subl $0x17, %eax
je 0x70c7
jmp 0x709d
movl -0x20(%rbp), %eax
subl $0x18, %eax
jne 0x70d7
jmp 0x70a7
leaq 0x64d9(%rip), %rdi      # 0xd587
movb $0x0, %al
callq 0x1060
jmp 0x70d9
leaq 0x64ce(%rip), %rdi      # 0xd58c
movb $0x0, %al
callq 0x1060
jmp 0x70d9
leaq 0x64c6(%rip), %rdi      # 0xd594
movb $0x0, %al
callq 0x1060
jmp 0x70d9
jmp 0x70d9
jmp 0x70db
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x706e
leaq 0x64bf(%rip), %rdi      # 0xd5ac
movb $0x0, %al
callq 0x1060
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)