Given that JK_3's code is quite hard to read, here's a way easier x86-style Assembly version of the code:
; eax = clan_size
; ebx = daily_wins
; ecx = daily_players
cmp eax, 50 ; if (clan_size > 50)
jg .above_50
.below_or_equal_50:
; Compute max(daily_players, 25)
mov esi, 25 ; esi = 25
cmp ecx, 25
jge .use_ecx
mov ecx, esi ; ecx = max(daily_players, 25)
.use_ecx:
mov edi, ebx ; edi = daily_wins
imul edi, 25 ; edi = daily_wins * 25
cdq ; sign-extend edi to edx:eax for idiv
mov eax, edi ; move numerator to eax
idiv ecx ; eax = points
mov edx, eax ; store result in edx (points)
jmp .done
.above_50:
; Compute daily_wins * 25 / (clan_size - 25)
mov edi, ebx ; edi = daily_wins
imul edi, 25 ; edi = daily_wins * 25
mov esi, eax ; esi = clan_size
sub esi, 25 ; esi = clan_size - 25
cdq ; sign-extend edi to edx:eax for idiv
mov eax, edi ; move numerator to eax
idiv esi ; eax = points
mov edx, eax ; store result in edx (points)
.done:
At least, that's what ChatGPT says, I have no idea what this means.
I hope this clears up any ambiguities in JK's honestly quite unreadable code!