	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function draw_joystick
LCPI0_0:
	.long	0x3f000000                      ## float 0.5
LCPI0_1:
	.long	0x3e99999a                      ## float 0.300000012
LCPI0_2:
	.long	0x3f800000                      ## float 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_draw_joystick:                         ## @draw_joystick
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $r8d killed $r8d def $r8
	leal	(%r8,%r8,2), %eax
	leal	(%r8,%r8,2), %ebx
	addl	$3, %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	sarl	$2, %ebx
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	leal	3(%r8), %eax
	testl	%r8d, %r8d
	cmovnsl	%r8d, %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	(%rdi), %ecx
	testl	%ecx, %ecx
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	je	LBB0_4
## %bb.1:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cltd
	idivl	%ecx
	testl	%ecx, %ecx
	jle	LBB0_4
## %bb.2:
	movl	%eax, %r13d
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addl	%eax, %ecx
	movl	%ecx, -76(%rbp)                 ## 4-byte Spill
	addl	$-5, %eax
	cvtsi2ss	%eax, %xmm0
	movss	%xmm0, -72(%rbp)                ## 4-byte Spill
	xorl	%r12d, %r12d
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
                                        ## kill: def $ebx killed $ebx killed $rbx def $rbx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rdi), %rax
	movss	(%rax,%r12,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	addss	%xmm0, %xmm1
	mulss	-72(%rbp), %xmm1                ## 4-byte Folded Reload
	movss	%xmm1, -64(%rbp)                ## 4-byte Spill
	movss	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movaps	%xmm0, %xmm1
	movaps	%xmm0, %xmm2
	callq	_glColor3f
	incq	%r12
	leal	(%rbx,%r13), %r14d
	movl	%ebx, %edi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	callq	_glRecti
	movss	LCPI0_2(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movaps	%xmm0, %xmm1
	movaps	%xmm0, %xmm2
	callq	_glColor3f
	cvttss2si	-64(%rbp), %eax         ## 4-byte Folded Reload
	leal	(%rax,%r15), %ecx
	addl	$5, %ecx
	movl	%eax, %esi
	addl	%r15d, %esi
	movl	%ebx, %edi
	movl	%r14d, %edx
	callq	_glRecti
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movslq	(%rdi), %rax
	movl	%r14d, %ebx
	cmpq	%rax, %r12
	jl	LBB0_3
LBB0_4:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	16(%rdi), %ecx
	testl	%ecx, %ecx
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_11
## %bb.5:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cltd
	idivl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testl	%ecx, %ecx
	jle	LBB0_11
## %bb.6:
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	sarl	$2, %r14d
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	addl	%esi, %eax
	movq	%rax, %r13
	addl	%eax, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movss	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movaps	%xmm0, %xmm1
	movaps	%xmm0, %xmm2
	callq	_glColor3f
	incq	%rbx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%r15), %r12d
	movl	%r15d, %edi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	callq	_glRecti
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movslq	16(%rdi), %rax
	movl	%r12d, %r15d
	cmpq	%rax, %rbx
	jge	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rdi), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movss	LCPI0_2(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	jmp	LBB0_10
LBB0_11:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_draw_joystick
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function draw_joystick
_draw_joystick:                         ; @draw_joystick
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	d11, d10, [sp, #16]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	.cfi_offset b10, -120
	.cfi_offset b11, -128
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	add	w8, w4, w4, lsl #1
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w26, w8, #2
	add	w8, w4, #3
	cmp	w4, #0
	csel	w8, w8, w4, lt
	stp	w8, w3, [sp, #8]                ; 8-byte Folded Spill
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x28, #0
	add	w23, w26, w22
	sub	w9, w26, #5
	scvtf	s8, w9
	fmov	s9, #0.50000000
	mov	w27, #39322
	movk	w27, #16025, lsl #16
	mov	x24, x20
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	sdiv	w21, w9, w8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	s0, [x8, x28, lsl #2]
	fmul	s0, s0, s9
	fadd	s10, s0, s9
	fmov	s0, w27
	fmov	s1, s0
	fmov	s2, s0
	bl	_glColor3f
	add	x28, x28, #1
	add	w25, w21, w24
	mov	x0, x24
	mov	x1, x22
	mov	x2, x25
	mov	x3, x23
	bl	_glRecti
	fmov	s0, #1.00000000
	fmov	s1, #1.00000000
	fmov	s2, #1.00000000
	bl	_glColor3f
	fmul	s0, s10, s8
	fcvtzs	w8, s0
	add	w1, w8, w22
	add	w3, w1, #5
	mov	x0, x24
	mov	x2, x25
	bl	_glRecti
	ldrsw	x8, [x19]
	mov	x24, x25
	cmp	x28, x8
	b.lt	LBB0_3
LBB0_4:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_11
; %bb.5:
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.6:
	mov	x24, #0
	ldr	w9, [sp, #8]                    ; 4-byte Folded Reload
	asr	w9, w9, #2
	add	w22, w26, w22
	add	w23, w22, w9
	mov	w25, #39322
	movk	w25, #16025, lsl #16
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	sdiv	w26, w9, w8
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	fmov	s0, w25
	fmov	s1, s0
	fmov	s2, s0
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	bl	_glColor3f
	add	x24, x24, #1
	add	w21, w26, w20
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	mov	x3, x23
	bl	_glRecti
	ldrsw	x8, [x19, #16]
	mov	x20, x21
	cmp	x24, x8
	b.ge	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x24, lsl #3]
	cbz	x8, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	fmov	s0, #1.00000000
	fmov	s1, #1.00000000
	fmov	s2, #1.00000000
	b	LBB0_8
LBB0_11:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_draw_joystick
.subsections_via_symbols
