// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/image.c
// Function: random_augment_args
augment_args random_augment_args(image im, float angle, float aspect, int low, int high, int w, int h)
{
    augment_args a = {0};
    aspect = rand_scale(aspect);
    int r = rand_int(low, high);
    int min = (im.h < im.w*aspect) ? im.h : im.w*aspect;
    float scale = (float)r / min;

    float rad = rand_uniform(-angle, angle) * TWO_PI / 360.;

    float dx = (im.w*scale/aspect - w) / 2.;
    float dy = (im.h*scale - w) / 2.;
    //if(dx < 0) dx = 0;
    //if(dy < 0) dy = 0;
    dx = rand_uniform(-dx, dx);
    dy = rand_uniform(-dy, dy);

    a.rad = rad;
    a.scale = scale;
    a.w = w;
    a.h = h;
    a.dx = dx;
    a.dy = dy;
    a.aspect = aspect;
    return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movss %xmm0, -0x4(%rbp)
movss %xmm1, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
xorl %esi, %esi
movl $0x1c, %edx
callq 0x3190
movss -0x8(%rbp), %xmm0
callq 0x5f80
movss %xmm0, -0x8(%rbp)
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %esi
callq 0x5d00
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, -0x1c(%rbp)
cvtsi2ssl 0x4(%rax), %xmm1
cvtsi2ssl (%rax), %xmm0
mulss -0x8(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x13094
movq -0x38(%rbp), %rax
cvtsi2ssl 0x4(%rax), %xmm0
movss %xmm0, -0x4c(%rbp)
jmp 0x130a6
movq -0x38(%rbp), %rax
cvtsi2ssl (%rax), %xmm0
mulss -0x8(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x4c(%rbp), %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x20(%rbp)
cvtsi2ssl -0x1c(%rbp), %xmm0
cvtsi2ssl -0x20(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x4(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss -0x4(%rbp), %xmm1
callq 0x5b30
movq -0x38(%rbp), %rax
movss 0x5e13b(%rip), %xmm1    # 0x71228
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x5fd5b(%rip), %xmm1    # 0x72e58
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x28(%rbp)
cvtsi2ssl (%rax), %xmm0
mulss -0x24(%rbp), %xmm0
divss -0x8(%rbp), %xmm0
cvtsi2ssl -0x14(%rbp), %xmm1
subss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x5df2b(%rip), %xmm1    # 0x71058
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
cvtsi2ssl 0x4(%rax), %xmm0
movss -0x24(%rbp), %xmm2
cvtsi2ssl -0x14(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x5deee(%rip), %xmm1    # 0x71058
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x2c(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss -0x2c(%rbp), %xmm1
callq 0x5b30
movss %xmm0, -0x2c(%rbp)
movss -0x30(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss -0x30(%rbp), %xmm1
callq 0x5b30
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %rax
movss %xmm0, -0x30(%rbp)
movss -0x28(%rbp), %xmm0
movss %xmm0, 0xc(%rcx)
movss -0x24(%rbp), %xmm0
movss %xmm0, 0x8(%rcx)
movl -0x14(%rbp), %edx
movl %edx, (%rcx)
movl -0x18(%rbp), %edx
movl %edx, 0x4(%rcx)
movss -0x2c(%rbp), %xmm0
movss %xmm0, 0x10(%rcx)
movss -0x30(%rbp), %xmm0
movss %xmm0, 0x14(%rcx)
movss -0x8(%rbp), %xmm0
movss %xmm0, 0x18(%rcx)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)