	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_apply_ir_smoothing             ## -- Begin function apply_ir_smoothing
	.p2align	4, 0x90
_apply_ir_smoothing:                    ## @apply_ir_smoothing
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rsi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	movq	24(%rdi), %r8
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_WIIUSE_DEBUG
	movq	(%rbx), %r15
	movq	8(%rbx), %r14
	subq	16(%rbx), %r15
	subq	24(%rbx), %r14
	movq	%r15, %rax
	imulq	%r15, %rax
	movq	%r14, %rdi
	imulq	%r14, %rdi
	addq	%rax, %rdi
	callq	_sqrtf
	movq	_SMOOTH_IR_DEADZONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_3
## %bb.1:
	movq	_SMOOTH_IR_RADIUS@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jge	LBB0_4
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_WIIUSE_DEBUG
	movq	_SMOOTH_IR_SPEED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	imulq	%rax, %r15
	addq	%r15, 16(%rbx)
	imulq	%rax, %r14
	addq	%r14, 24(%rbx)
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WIIUSE_DEBUG                   ## TAILCALL
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_WIIUSE_DEBUG
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_atan2f
	movq	%rax, %r14
	movq	(%rbx), %r15
	movq	%rax, %rdi
	callq	_cosf
	imulq	(%r12), %rax
	subq	%rax, %r15
	movq	%r15, 16(%rbx)
	movq	8(%rbx), %r15
	movq	%r14, %rdi
	callq	_sinf
	imulq	(%r12), %rax
	subq	%rax, %r15
	movq	%r15, 24(%rbx)
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Smooth: OK (%.02f, %.02f) LAST (%.02f, %.02f) "

	.comm	_SMOOTH_IR_DEADZONE,8,3         ## @SMOOTH_IR_DEADZONE
	.comm	_SMOOTH_IR_RADIUS,8,3           ## @SMOOTH_IR_RADIUS
L_.str.1:                               ## @.str.1
	.asciz	"INSIDE\n"

	.comm	_SMOOTH_IR_SPEED,8,3            ## @SMOOTH_IR_SPEED
L_.str.2:                               ## @.str.2
	.asciz	"OUTSIDE\n"

L_.str.3:                               ## @.str.3
	.asciz	"DEADZONE\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_apply_ir_smoothing             ; -- Begin function apply_ir_smoothing
	.p2align	2
_apply_ir_smoothing:                    ; @apply_ir_smoothing
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	q0, [x0]
	ldp	x8, x9, [x0, #16]
	stp	x8, x9, [sp, #16]
	str	q0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_WIIUSE_DEBUG
	ldp	x8, x9, [x19]
	ldp	x10, x11, [x19, #16]
	sub	x20, x8, x10
	sub	x21, x9, x11
	mul	x8, x20, x20
	madd	x0, x21, x21, x8
	bl	_sqrtf
Lloh2:
	adrp	x8, _SMOOTH_IR_DEADZONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SMOOTH_IR_DEADZONE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_3
; %bb.1:
Lloh5:
	adrp	x22, _SMOOTH_IR_RADIUS@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SMOOTH_IR_RADIUS@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ge	LBB0_4
; %bb.2:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_WIIUSE_DEBUG
Lloh9:
	adrp	x8, _SMOOTH_IR_SPEED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SMOOTH_IR_SPEED@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldp	x9, x10, [x19, #16]
	madd	x9, x8, x20, x9
	madd	x8, x8, x21, x10
	str	x9, [x19, #16]
	b	LBB0_5
LBB0_3:
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_WIIUSE_DEBUG
LBB0_4:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_WIIUSE_DEBUG
	mov	x0, x21
	mov	x1, x20
	bl	_atan2f
	mov	x20, x0
	ldr	x21, [x19]
	bl	_cosf
	ldr	x8, [x22]
	msub	x8, x8, x0, x21
	str	x8, [x19, #16]
	ldr	x21, [x19, #8]
	mov	x0, x20
	bl	_sinf
	ldr	x8, [x22]
	msub	x8, x8, x0, x21
LBB0_5:
	str	x8, [x19, #24]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Smooth: OK (%.02f, %.02f) LAST (%.02f, %.02f) "

	.comm	_SMOOTH_IR_DEADZONE,8,3         ; @SMOOTH_IR_DEADZONE
	.comm	_SMOOTH_IR_RADIUS,8,3           ; @SMOOTH_IR_RADIUS
l_.str.1:                               ; @.str.1
	.asciz	"INSIDE\n"

	.comm	_SMOOTH_IR_SPEED,8,3            ; @SMOOTH_IR_SPEED
l_.str.2:                               ; @.str.2
	.asciz	"OUTSIDE\n"

l_.str.3:                               ; @.str.3
	.asciz	"DEADZONE\n"

.subsections_via_symbols
