	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wiimod_bboard_in_ext
_wiimod_bboard_in_ext:                  ## @wiimod_bboard_in_ext
	.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, %r12
	movl	(%rsi), %eax
	movl	8(%rsi), %ebx
	shll	$8, %eax
	orl	4(%rsi), %eax
	shll	$8, %ebx
	orl	12(%rsi), %ebx
	movl	16(%rsi), %ecx
	shll	$8, %ecx
	orl	20(%rsi), %ecx
	movl	24(%rsi), %r10d
	shll	$8, %r10d
	orl	28(%rsi), %r10d
	movq	8(%rdi), %r9
	movq	(%r9), %rdx
	movl	(%rdx), %esi
	xorl	%r14d, %r14d
	movl	%eax, %edi
	movl	$0, %r8d
	subl	%esi, %edi
	jle	LBB0_4
## %bb.1:
	movl	4(%rdx), %r8d
	subl	%r8d, %eax
	jge	LBB0_3
## %bb.2:
	imull	$1700, %edi, %eax               ## imm = 0x6A4
	subl	%esi, %r8d
	movl	$1, %esi
	cmovnel	%r8d, %esi
	cltd
	idivl	%esi
	movl	%eax, %r8d
	jmp	LBB0_4
LBB0_3:
	imull	$1700, %eax, %eax               ## imm = 0x6A4
	movl	8(%rdx), %edx
	subl	%r8d, %edx
	movl	$1, %esi
	cmovnel	%edx, %esi
	cltd
	idivl	%esi
	movl	%eax, %r8d
	addl	$1700, %r8d                     ## imm = 0x6A4
LBB0_4:
	movq	8(%r9), %rsi
	movl	(%rsi), %edi
	movl	%ebx, %eax
	subl	%edi, %eax
	jle	LBB0_8
## %bb.5:
	movl	4(%rsi), %edx
	subl	%edx, %ebx
	jge	LBB0_6
## %bb.7:
	imull	$1700, %eax, %eax               ## imm = 0x6A4
	subl	%edi, %edx
	movl	$1, %esi
	cmovnel	%edx, %esi
	cltd
	idivl	%esi
	movl	%eax, %r14d
	jmp	LBB0_8
LBB0_6:
	imull	$1700, %ebx, %eax               ## imm = 0x6A4
	movl	8(%rsi), %esi
	subl	%edx, %esi
	movl	$1, %edi
	cmovnel	%esi, %edi
	cltd
	idivl	%edi
	movl	%eax, %r14d
	addl	$1700, %r14d                    ## imm = 0x6A4
LBB0_8:
	movq	16(%r9), %rdx
	movl	(%rdx), %esi
	xorl	%r15d, %r15d
	movl	%ecx, %eax
	movl	$0, %ebx
	subl	%esi, %eax
	jle	LBB0_12
## %bb.9:
	movl	4(%rdx), %edi
	subl	%edi, %ecx
	jge	LBB0_10
## %bb.11:
	imull	$1700, %eax, %eax               ## imm = 0x6A4
	subl	%esi, %edi
	movl	$1, %ecx
	cmovnel	%edi, %ecx
	cltd
	idivl	%ecx
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_10:
	imull	$1700, %ecx, %eax               ## imm = 0x6A4
	movl	8(%rdx), %ecx
	subl	%edi, %ecx
	movl	$1, %esi
	cmovnel	%ecx, %esi
	cltd
	idivl	%esi
	movl	%eax, %ebx
	addl	$1700, %ebx                     ## imm = 0x6A4
LBB0_12:
	movq	24(%r9), %rdx
	movl	(%rdx), %esi
	movl	%r10d, %eax
	subl	%esi, %eax
	jle	LBB0_16
## %bb.13:
	movl	4(%rdx), %ecx
	subl	%ecx, %r10d
	jge	LBB0_14
## %bb.15:
	imull	$1700, %eax, %eax               ## imm = 0x6A4
	subl	%esi, %ecx
	movl	$1, %esi
	cmovnel	%ecx, %esi
	cltd
	idivl	%esi
	movl	%eax, %r15d
	jmp	LBB0_16
LBB0_14:
	imull	$1700, %r10d, %eax              ## imm = 0x6A4
	movl	8(%rdx), %edx
	subl	%ecx, %edx
	movl	$1, %ecx
	cmovnel	%edx, %ecx
	cltd
	idivl	%ecx
	movl	%eax, %r15d
	addl	$1700, %r15d                    ## imm = 0x6A4
LBB0_16:
	movl	(%r12), %edi
	movq	_ABS_HAT0X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r8d, %edx
	callq	_input_report_abs
	movl	(%r12), %edi
	movq	_ABS_HAT0Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_input_report_abs
	movl	(%r12), %edi
	movq	_ABS_HAT1X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_input_report_abs
	movl	(%r12), %edi
	movq	_ABS_HAT1Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edx
	callq	_input_report_abs
	movl	(%r12), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ABS_HAT0X,4,2                  ## @ABS_HAT0X
	.comm	_ABS_HAT0Y,4,2                  ## @ABS_HAT0Y
	.comm	_ABS_HAT1X,4,2                  ## @ABS_HAT1X
	.comm	_ABS_HAT1Y,4,2                  ## @ABS_HAT1Y
	.no_dead_strip	_wiimod_bboard_in_ext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wiimod_bboard_in_ext
_wiimod_bboard_in_ext:                  ; @wiimod_bboard_in_ext
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldp	w8, w9, [x1]
	orr	w12, w9, w8, lsl #8
	ldp	w8, w9, [x1, #8]
	orr	w9, w9, w8, lsl #8
	ldp	w10, w11, [x1, #16]
	ldr	x8, [x0, #8]
	ldr	x13, [x8]
	ldr	w14, [x13]
	subs	w16, w12, w14
	b.le	LBB0_3
; %bb.1:
	ldr	w15, [x13, #4]
	subs	w12, w12, w15
	b.ge	LBB0_4
; %bb.2:
	mov	w12, #1700
	mul	w12, w16, w12
	subs	w13, w15, w14
	csinc	w13, w13, wzr, ne
	sdiv	w2, w12, w13
	b	LBB0_5
LBB0_3:
	mov	w2, #0
	b	LBB0_5
LBB0_4:
	mov	w14, #1700
	mul	w12, w12, w14
	ldr	w13, [x13, #8]
	subs	w13, w13, w15
	csinc	w13, w13, wzr, ne
	sdiv	w12, w12, w13
	add	w2, w12, #1700
LBB0_5:
	ldp	w12, w13, [x1, #24]
	orr	w10, w11, w10, lsl #8
	ldr	x11, [x8, #8]
	ldr	w14, [x11]
	subs	w16, w9, w14
	b.le	LBB0_8
; %bb.6:
	ldr	w15, [x11, #4]
	subs	w9, w9, w15
	b.ge	LBB0_9
; %bb.7:
	mov	w9, #1700
	mul	w9, w16, w9
	subs	w11, w15, w14
	csinc	w11, w11, wzr, ne
	sdiv	w20, w9, w11
	b	LBB0_10
LBB0_8:
	mov	w20, #0
	b	LBB0_10
LBB0_9:
	mov	w14, #1700
	mul	w9, w9, w14
	ldr	w11, [x11, #8]
	subs	w11, w11, w15
	csinc	w11, w11, wzr, ne
	sdiv	w9, w9, w11
	add	w20, w9, #1700
LBB0_10:
	orr	w9, w13, w12, lsl #8
	ldr	x11, [x8, #16]
	ldr	w12, [x11]
	subs	w14, w10, w12
	b.le	LBB0_13
; %bb.11:
	ldr	w13, [x11, #4]
	subs	w10, w10, w13
	b.ge	LBB0_14
; %bb.12:
	mov	w10, #1700
	mul	w10, w14, w10
	subs	w11, w13, w12
	csinc	w11, w11, wzr, ne
	sdiv	w21, w10, w11
	b	LBB0_15
LBB0_13:
	mov	w21, #0
	b	LBB0_15
LBB0_14:
	mov	w12, #1700
	mul	w10, w10, w12
	ldr	w11, [x11, #8]
	subs	w11, w11, w13
	csinc	w11, w11, wzr, ne
	sdiv	w10, w10, w11
	add	w21, w10, #1700
LBB0_15:
	ldr	x8, [x8, #24]
	ldr	w10, [x8]
	subs	w12, w9, w10
	b.le	LBB0_18
; %bb.16:
	ldr	w11, [x8, #4]
	subs	w9, w9, w11
	b.ge	LBB0_19
; %bb.17:
	mov	w8, #1700
	mul	w8, w12, w8
	subs	w9, w11, w10
	csinc	w9, w9, wzr, ne
	sdiv	w22, w8, w9
	b	LBB0_20
LBB0_18:
	mov	w22, #0
	b	LBB0_20
LBB0_19:
	mov	w10, #1700
	mul	w9, w9, w10
	ldr	w8, [x8, #8]
	subs	w8, w8, w11
	csinc	w8, w8, wzr, ne
	sdiv	w8, w9, w8
	add	w22, w8, #1700
LBB0_20:
	ldr	w0, [x19]
Lloh0:
	adrp	x8, _ABS_HAT0X@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ABS_HAT0X@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_input_report_abs
	ldr	w0, [x19]
Lloh3:
	adrp	x8, _ABS_HAT0Y@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ABS_HAT0Y@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_input_report_abs
	ldr	w0, [x19]
Lloh6:
	adrp	x8, _ABS_HAT1X@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ABS_HAT1X@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_input_report_abs
	ldr	w0, [x19]
Lloh9:
	adrp	x8, _ABS_HAT1Y@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ABS_HAT1Y@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x2, x22
	bl	_input_report_abs
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_input_sync
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ABS_HAT0X,4,2                  ; @ABS_HAT0X
	.comm	_ABS_HAT0Y,4,2                  ; @ABS_HAT0Y
	.comm	_ABS_HAT1X,4,2                  ; @ABS_HAT1X
	.comm	_ABS_HAT1Y,4,2                  ; @ABS_HAT1Y
	.no_dead_strip	_wiimod_bboard_in_ext
.subsections_via_symbols
