// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/image.c
// Function: rotate_image_cw
void rotate_image_cw(image im, int times)
{
    assert(im.w == im.h);
    times = (times + 400) % 4;
    int i, x, y, c;
    int n = im.w;
    for(i = 0; i < times; ++i){
        for(c = 0; c < im.c; ++c){
            for(x = 0; x < n/2; ++x){
                for(y = 0; y < (n-1)/2 + 1; ++y){
                    float temp = im.data[y + im.w*(x + im.h*c)];
                    im.data[y + im.w*(x + im.h*c)] = im.data[n-1-x + im.w*(y + im.h*c)];
                    im.data[n-1-x + im.w*(y + im.h*c)] = im.data[n-1-y + im.w*(n-1-x + im.h*c)];
                    im.data[n-1-y + im.w*(n-1-x + im.h*c)] = im.data[x + im.w*(n-1-y + im.h*c)];
                    im.data[x + im.w*(n-1-y + im.h*c)] = temp;
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movslq 0xa0(%rsp), %rax
movslq 0xa4(%rsp), %rcx
cmpl %ecx, %eax
jne 0x16f72
movq %rcx, %r9
leal 0x190(%rdi), %ecx
leal 0x193(%rdi), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
andl $-0x4, %edx
negl %edx
leal (%rdi,%rdx), %ecx
addl $0x190, %ecx            # imm = 0x190
movl %ecx, 0xc(%rsp)
testl %ecx, %ecx
jle 0x16f63
leaq 0xa0(%rsp), %rcx
movl 0x8(%rcx), %edx
movq %rdx, 0x10(%rsp)
movl %eax, %edi
shrl $0x1f, %edi
addl %eax, %edi
sarl %edi
leal -0x1(%rax), %edx
movslq %edx, %rsi
shrl $0x1f, %edx
leal (%rax,%rdx), %r8d
decl %r8d
sarl %r8d
movq 0x10(%rcx), %rdx
xorl %r10d, %r10d
testl %r8d, %r8d
cmovlel %r10d, %r8d
imulq %rax, %r9
shlq $0x2, %r9
movq %r9, 0x60(%rsp)
leaq (,%rax,4), %r11
leaq 0x4(,%rax,4), %rcx
imulq %rsi, %rcx
addq %rdx, %rcx
movq %rcx, 0x48(%rsp)
movq %r11, %r14
negq %r14
movq %rax, %rcx
imulq %rsi, %rcx
leaq (%rdx,%rcx,4), %rcx
movq %rcx, 0x40(%rsp)
movq %rdx, 0x50(%rsp)
leaq (%rdx,%rsi,4), %rcx
movq %rcx, 0x38(%rsp)
notq %r8
movq %r10, 0x58(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0x16f50
movq 0x38(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq 0x40(%rsp), %rcx
movq %rcx, 0x28(%rsp)
movq 0x48(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq 0x50(%rsp), %rcx
movq %rcx, 0x18(%rsp)
xorl %r12d, %r12d
cmpl $0x2, %eax
jl 0x16f29
movq 0x30(%rsp), %r15
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rbx
movq 0x18(%rsp), %rsi
xorl %ecx, %ecx
testl %eax, %eax
js 0x16f13
movq %r15, %r13
movq %rdx, %rbp
xorl %r10d, %r10d
movq %rsi, %r9
movss (%r9), %xmm0
movss (%r13), %xmm1
movss %xmm1, (%r9)
movss (%rbx,%r10,4), %xmm1
movss %xmm1, (%r13)
movss (%rbp), %xmm1
movss %xmm1, (%rbx,%r10,4)
movss %xmm0, (%rbp)
addq $0x4, %r9
decq %r10
addq %r14, %rbp
addq %r11, %r13
cmpq %r10, %r8
jne 0x16ed5
incq %rcx
addq %r11, %rsi
addq %r14, %rbx
addq $0x4, %rdx
addq $-0x4, %r15
cmpq %rdi, %rcx
jne 0x16ec5
incq %r12
movq 0x60(%rsp), %rcx
addq %rcx, 0x18(%rsp)
addq %rcx, 0x20(%rsp)
addq %rcx, 0x28(%rsp)
addq %rcx, 0x30(%rsp)
cmpq 0x10(%rsp), %r12
jne 0x16eaa
movq 0x58(%rsp), %r10
incl %r10d
cmpl 0xc(%rsp), %r10d
jne 0x16e6f
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3e73e(%rip), %rdi     # 0x556b7
leaq 0x3e744(%rip), %rsi     # 0x556c4
leaq 0x3e761(%rip), %rcx     # 0x556e8
movl $0x14a, %edx            # imm = 0x14A
callq 0x31c0