	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___wpad_assign_slot             ## -- Begin function __wpad_assign_slot
	.p2align	4, 0x90
___wpad_assign_slot:                    ## @__wpad_assign_slot
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	__CPU_ISR_Disable
	movq	_CONF_PAD_MAX_ACTIVE@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	movq	___wpad_devs@GOTPCREL(%rip), %r13
	leaq	-48(%rbp), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	(%r12), %rbx
	jae	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	movl	20(%rax), %esi
	movl	16(%rax), %edx
	movl	12(%rax), %ecx
	movl	8(%rax), %r8d
	movl	(%rax), %edi
	movl	4(%rax), %r9d
	movl	%edi, (%rsp)
	movq	%r15, %rdi
	callq	_BD_ADDR
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_bd_addr_cmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	___wpads_used@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$1, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	btl	%ebx, %eax
	jb	LBB0_5
## %bb.4:
	orl	%edx, %eax
	movq	___wpads_used@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_10
LBB0_6:
	movq	_WPAD_MAX_WIIMOTES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.7:
	movq	___wpads_used@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	movl	%ebx, %ecx
	shll	%cl, %edi
	btl	%ebx, %esi
	jae	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	cmpq	%rbx, %rax
	jne	LBB0_8
LBB0_12:
	callq	__CPU_ISR_Restore
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_9:
	orl	%edi, %esi
	movl	%esi, (%rdx)
LBB0_10:
	callq	__CPU_ISR_Restore
	movq	___wpads@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONF_PAD_MAX_ACTIVE,8,3        ## @CONF_PAD_MAX_ACTIVE
	.comm	___wpad_devs,8,3                ## @__wpad_devs
	.comm	___wpads_used,4,2               ## @__wpads_used
	.comm	___wpads,8,3                    ## @__wpads
	.comm	_WPAD_MAX_WIIMOTES,8,3          ## @WPAD_MAX_WIIMOTES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___wpad_assign_slot             ; -- Begin function __wpad_assign_slot
	.p2align	2
___wpad_assign_slot:                    ; @__wpad_assign_slot
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	__CPU_ISR_Disable
Lloh0:
	adrp	x22, _CONF_PAD_MAX_ACTIVE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CONF_PAD_MAX_ACTIVE@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh2:
	adrp	x20, ___wpads_used@GOTPAGE
Lloh3:
	ldr	x20, [x20, ___wpads_used@GOTPAGEOFF]
	cbz	x8, LBB0_6
; %bb.1:
	mov	x21, #0
Lloh4:
	adrp	x23, ___wpad_devs@GOTPAGE
Lloh5:
	ldr	x23, [x23, ___wpad_devs@GOTPAGEOFF]
	mov	w24, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	ldr	x8, [x22]
	cmp	x21, x8
	b.hs	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	x8, [x8, x21, lsl #3]
	ldp	w2, w1, [x8, #16]
	ldp	w4, w3, [x8, #8]
	ldp	w6, w5, [x8]
	add	x0, sp, #8
	bl	_BD_ADDR
	add	x1, sp, #8
	mov	x0, x19
	bl	_bd_addr_cmp
	cbz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20]
	lsl	w9, w24, w21
	tst	w8, w9
	b.ne	LBB0_2
; %bb.5:
	orr	w8, w8, w9
	str	w8, [x20]
	bl	__CPU_ISR_Restore
Lloh6:
	adrp	x8, ___wpads@GOTPAGE
Lloh7:
	ldr	x8, [x8, ___wpads@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x0, [x8, x21, lsl #3]
	b	LBB0_12
LBB0_6:
Lloh9:
	adrp	x8, _WPAD_MAX_WIIMOTES@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WPAD_MAX_WIIMOTES@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.7:
	mov	x19, #0
	ldr	w9, [x20]
	mov	w10, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	lsl	w11, w10, w19
	tst	w9, w11
	b.eq	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x19, x19, #1
	cmp	x8, x19
	b.ne	LBB0_8
LBB0_10:
	bl	__CPU_ISR_Restore
	mov	x0, #0
	b	LBB0_12
LBB0_11:
	orr	w8, w9, w11
	str	w8, [x20]
	bl	__CPU_ISR_Restore
Lloh12:
	adrp	x8, ___wpads@GOTPAGE
Lloh13:
	ldr	x8, [x8, ___wpads@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	x0, [x8, x19, lsl #3]
LBB0_12:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CONF_PAD_MAX_ACTIVE,8,3        ; @CONF_PAD_MAX_ACTIVE
	.comm	___wpad_devs,8,3                ; @__wpad_devs
	.comm	___wpads_used,4,2               ; @__wpads_used
	.comm	___wpads,8,3                    ; @__wpads
	.comm	_WPAD_MAX_WIIMOTES,8,3          ; @WPAD_MAX_WIIMOTES
.subsections_via_symbols
