// File: /workspace/github_c_makefile_star2_O0/zpole[P]IICV/src/test_mathop_abs.c
// Function: main
int
main(int argc VL_UNUSED, char**argv VL_UNUSED)
{
  VlRand * rand = vl_get_rand() ;
  vl_size numData = 100000000 ;
  vl_size i ;
  float * X = vl_malloc(sizeof(float) * numData) ;
  float * Y = vl_malloc(sizeof(float) * numData) ;
  float * X_end = X + numData ;

  for (i = 0 ; i < numData ; ++ i) {
    X[i] = vl_rand_real1(rand) - .5 ;
    Y[i] = 0 ;
  }

  {
    float * Xi = X ;
    float * Yi = Y ;
    vl_tic() ;
    while (Xi < X_end) {
      *Yi++ = fabsf (*Xi++) ;
    }
    VL_PRINTF("fabsf: %.3f\n", vl_toc()) ;
  }

  for (i = 0 ; i < numData ; ++ i) {
    X[i] = vl_rand_real1(rand) - .5 ;
    X[i] = 0 ;
  }

  {
    float * Xi = X ;
    float * Yi = Y ;
    vl_tic() ;
    while (Xi < X_end) {
      *Yi++ = vl_abs_f (*Xi++) ;
    }
    VL_PRINTF("vl_abs_f: %.3f\n", vl_toc()) ;
  }

  vl_free (Y) ;
  vl_free (X) ;

  return 0 ;
}

// Assembly:
subq $0x78, %rsp
movl $0x0, 0x74(%rsp)
movl %edi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
callq 0x1090
movq %rax, 0x60(%rsp)
movq $0x5f5e100, 0x58(%rsp)  # imm = 0x5F5E100
movq 0x58(%rsp), %rdi
shlq $0x2, %rdi
callq 0x1080
movq %rax, 0x48(%rsp)
movq 0x58(%rsp), %rdi
shlq $0x2, %rdi
callq 0x1080
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq 0x58(%rsp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x38(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x50(%rsp), %rax
cmpq 0x58(%rsp), %rax
jae 0x1264
movq 0x60(%rsp), %rdi
callq 0x13d0
movsd 0xddd(%rip), %xmm1      # 0x2008
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
xorps %xmm0, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq 0x50(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x50(%rsp)
jmp 0x120d
movq 0x48(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x1030
movq 0x30(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0x12c0
movq 0x30(%rsp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, 0x30(%rsp)
movss (%rax), %xmm0
movaps 0xd7b(%rip), %xmm1      # 0x2020
pand %xmm1, %xmm0
movq 0x28(%rsp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, 0x28(%rsp)
movss %xmm0, (%rax)
jmp 0x127d
callq 0x1040
movq %rax, 0x10(%rsp)
callq 0x1050
movq 0x10(%rsp), %rcx
leaq 0xd55(%rip), %rdi       # 0x2030
movb $0x1, %al
callq *%rcx
movq $0x0, 0x50(%rsp)
movq 0x50(%rsp), %rax
cmpq 0x58(%rsp), %rax
jae 0x133f
movq 0x60(%rsp), %rdi
callq 0x13d0
movsd 0xd02(%rip), %xmm1      # 0x2008
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
xorps %xmm0, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq 0x50(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x50(%rsp)
jmp 0x12e8
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
callq 0x1030
movq 0x20(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0x1395
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, 0x20(%rsp)
movss (%rax), %xmm0
callq 0x1400
movq 0x18(%rsp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, 0x18(%rsp)
movss %xmm0, (%rax)
jmp 0x1358
callq 0x1040
movq %rax, 0x8(%rsp)
callq 0x1050
movq 0x8(%rsp), %rcx
leaq 0xc8d(%rip), %rdi       # 0x203d
movb $0x1, %al
callq *%rcx
movq 0x40(%rsp), %rdi
callq 0x1070
movq 0x48(%rsp), %rdi
callq 0x1070
xorl %eax, %eax
addq $0x78, %rsp
retq
nop