	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wiimod_bboard_calib_show
_wiimod_bboard_calib_show:              ## @wiimod_bboard_calib_show
	.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
	subq	$208, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	callq	_dev_to_wii
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_wiimote_cmd_acquire
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	leaq	-240(%rbp), %rdx
	movq	%r12, %rdi
	movl	$10747940, %esi                 ## imm = 0xA40024
	movl	$12, %ecx
	callq	_wiimote_cmd_read
	cmpl	$12, %eax
	jne	LBB0_2
## %bb.3:
	leaq	-144(%rbp), %rdx
	movq	%r12, %rdi
	movl	$10747952, %esi                 ## imm = 0xA40030
	movl	$12, %ecx
	callq	_wiimote_cmd_read
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_wiimote_cmd_release
	cmpl	$12, %r15d
	jne	LBB0_4
## %bb.5:
	movq	%r12, %r15
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_spin_lock_irq
	movq	(%r12), %rsi
	movq	-240(%rbp), %rcx
	movq	(%rsi), %rax
	shlq	$8, %rcx
	movq	%rcx, (%rax)
	orq	-232(%rbp), %rcx
	movq	%rcx, (%rax)
	movq	-224(%rbp), %rdx
	movq	8(%rsi), %rcx
	shlq	$8, %rdx
	movq	%rdx, (%rcx)
	orq	-216(%rbp), %rdx
	movq	%rdx, (%rcx)
	movq	-208(%rbp), %rdi
	movq	16(%rsi), %rdx
	shlq	$8, %rdi
	movq	%rdi, (%rdx)
	orq	-200(%rbp), %rdi
	movq	%rdi, (%rdx)
	movq	-192(%rbp), %rdi
	movq	24(%rsi), %rsi
	shlq	$8, %rdi
	movq	%rdi, (%rsi)
	orq	-184(%rbp), %rdi
	movq	%rdi, (%rsi)
	movq	-176(%rbp), %rdi
	shlq	$8, %rdi
	movq	%rdi, 8(%rax)
	orq	-168(%rbp), %rdi
	movq	%rdi, 8(%rax)
	movq	-160(%rbp), %rdi
	shlq	$8, %rdi
	movq	%rdi, 8(%rcx)
	orq	-152(%rbp), %rdi
	movq	%rdi, 8(%rcx)
	movq	-144(%rbp), %rdi
	shlq	$8, %rdi
	movq	%rdi, 8(%rdx)
	orq	-136(%rbp), %rdi
	movq	%rdi, 8(%rdx)
	movq	-128(%rbp), %rdi
	shlq	$8, %rdi
	movq	%rdi, 8(%rsi)
	orq	-120(%rbp), %rdi
	movq	%rdi, 8(%rsi)
	movq	-112(%rbp), %rdi
	shlq	$8, %rdi
	movq	%rdi, 16(%rax)
	orq	-104(%rbp), %rdi
	movq	%rdi, 16(%rax)
	movq	-96(%rbp), %rax
	shlq	$8, %rax
	movq	%rax, 16(%rcx)
	orq	-88(%rbp), %rax
	movq	%rax, 16(%rcx)
	movq	-80(%rbp), %rax
	shlq	$8, %rax
	movq	%rax, 16(%rdx)
	orq	-72(%rbp), %rax
	movq	%rax, 16(%rdx)
	movq	-64(%rbp), %rax
	shlq	$8, %rax
	movq	%rax, 16(%rsi)
	orq	-56(%rbp), %rax
	movq	%rax, 16(%rsi)
	movq	%r15, %rdi
	callq	_spin_unlock_irq
	movq	(%r12), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_sprintf
	movq	(%r12), %rcx
	movq	8(%rcx), %rcx
	movl	(%rcx), %edx
	movslq	%eax, %rbx
	leaq	(%r14,%rbx), %rdi
	movq	%r15, %rsi
	callq	_sprintf
	movq	(%r12), %rcx
	movq	16(%rcx), %rcx
	movl	(%rcx), %edx
	addl	%eax, %ebx
	movslq	%ebx, %rbx
	leaq	(%r14,%rbx), %rdi
	movq	%r15, %rsi
	callq	_sprintf
	addl	%eax, %ebx
	movslq	%ebx, %rbx
	leaq	(%r14,%rbx), %rdi
	movq	(%r12), %rax
	movq	24(%rax), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	callq	_sprintf
	addl	%eax, %ebx
	movq	(%r12), %rax
	movq	(%rax), %rax
	movl	8(%rax), %edx
	movslq	%ebx, %rbx
	leaq	(%r14,%rbx), %rdi
	movq	%r15, %rsi
	callq	_sprintf
	movq	(%r12), %rcx
	movq	8(%rcx), %rcx
	movl	8(%rcx), %edx
	addl	%eax, %ebx
	movslq	%ebx, %rbx
	leaq	(%r14,%rbx), %rdi
	movq	%r15, %rsi
	callq	_sprintf
	movq	(%r12), %rcx
	movq	16(%rcx), %rcx
	movl	8(%rcx), %edx
	addl	%eax, %ebx
	movslq	%ebx, %rbx
	leaq	(%r14,%rbx), %rdi
	movq	%r15, %rsi
	callq	_sprintf
	addl	%eax, %ebx
	movslq	%ebx, %rbx
	leaq	(%r14,%rbx), %rdi
	movq	(%r12), %rax
	movq	24(%rax), %rax
	movl	8(%rax), %edx
	movq	%r15, %rsi
	callq	_sprintf
	addl	%eax, %ebx
	movq	(%r12), %rax
	movq	(%rax), %rax
	movl	16(%rax), %edx
	movslq	%ebx, %rbx
	leaq	(%r14,%rbx), %rdi
	movq	%r15, %rsi
	callq	_sprintf
	movq	(%r12), %rcx
	movq	8(%rcx), %rcx
	movl	16(%rcx), %edx
	addl	%eax, %ebx
	movslq	%ebx, %rbx
	leaq	(%r14,%rbx), %rdi
	movq	%r15, %rsi
	callq	_sprintf
	movq	(%r12), %rcx
	movq	16(%rcx), %rcx
	movl	16(%rcx), %edx
	addl	%eax, %ebx
	movslq	%ebx, %rbx
	leaq	(%r14,%rbx), %rdi
	movq	%r15, %rsi
	callq	_sprintf
	addl	%eax, %ebx
	movslq	%ebx, %rbx
	addq	%rbx, %r14
	movq	(%r12), %rax
	movq	24(%rax), %rax
	movl	16(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_sprintf
	addl	%eax, %ebx
	jmp	LBB0_6
LBB0_2:
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_wiimote_cmd_release
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testl	%r15d, %r15d
	cmovsl	%r15d, %ebx
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%ebx, %eax
	addq	$208, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%04x\n"

L_.str.1:                               ## @.str.1
	.asciz	"%04x:"

	.no_dead_strip	_wiimod_bboard_calib_show
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wiimod_bboard_calib_show
_wiimod_bboard_calib_show:              ; @wiimod_bboard_calib_show
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #272
	.cfi_def_cfa_offset 272
	stp	x24, x23, [sp, #208]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #224]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #240]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #256]            ; 16-byte Folded Spill
	add	x29, sp, #256
	.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, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_dev_to_wii
	mov	x20, x0
	bl	_wiimote_cmd_acquire
	cbnz	w0, LBB0_6
; %bb.1:
	mov	w22, #36
	movk	w22, #164, lsl #16
	add	x23, sp, #8
	add	x2, sp, #8
	mov	x0, x20
	mov	w1, #36
	movk	w1, #164, lsl #16
	mov	w3, #12
	bl	_wiimote_cmd_read
	cmp	w0, #12
	b.ne	LBB0_4
; %bb.2:
	add	x2, x23, #96
	add	w1, w22, #12
	mov	x0, x20
	mov	w3, #12
	bl	_wiimote_cmd_read
	mov	x21, x0
	mov	x0, x20
	bl	_wiimote_cmd_release
	cmp	w21, #12
	b.ne	LBB0_5
; %bb.3:
	add	x21, x20, #8
	mov	x0, x21
	bl	_spin_lock_irq
	ldr	x8, [x20]
	ldr	x9, [sp, #8]
	ldr	x10, [x8]
	lsl	x9, x9, #8
	str	x9, [x10]
	ldr	x11, [sp, #16]
	orr	x9, x11, x9
	str	x9, [x10]
	ldr	x9, [sp, #24]
	ldr	x11, [x8, #8]
	lsl	x9, x9, #8
	str	x9, [x11]
	ldr	x12, [sp, #32]
	orr	x9, x12, x9
	str	x9, [x11]
	ldr	x9, [sp, #40]
	ldr	x12, [x8, #16]
	lsl	x9, x9, #8
	str	x9, [x12]
	ldr	x13, [sp, #48]
	orr	x9, x13, x9
	str	x9, [x12]
	ldr	x9, [sp, #56]
	ldr	x8, [x8, #24]
	lsl	x9, x9, #8
	str	x9, [x8]
	ldr	x13, [sp, #64]
	orr	x9, x13, x9
	str	x9, [x8]
	ldr	x9, [sp, #72]
	lsl	x9, x9, #8
	str	x9, [x10, #8]
	ldr	x13, [sp, #80]
	orr	x9, x13, x9
	str	x9, [x10, #8]
	ldr	x9, [sp, #88]
	lsl	x9, x9, #8
	str	x9, [x11, #8]
	ldr	x13, [sp, #96]
	orr	x9, x13, x9
	str	x9, [x11, #8]
	ldr	x9, [sp, #104]
	lsl	x9, x9, #8
	str	x9, [x12, #8]
	ldr	x13, [sp, #112]
	orr	x9, x13, x9
	str	x9, [x12, #8]
	ldr	x9, [sp, #120]
	lsl	x9, x9, #8
	str	x9, [x8, #8]
	ldr	x13, [sp, #128]
	orr	x9, x13, x9
	str	x9, [x8, #8]
	ldr	x9, [sp, #136]
	lsl	x9, x9, #8
	str	x9, [x10, #16]
	ldr	x13, [sp, #144]
	orr	x9, x13, x9
	str	x9, [x10, #16]
	ldr	x9, [sp, #152]
	lsl	x9, x9, #8
	str	x9, [x11, #16]
	ldr	x10, [sp, #160]
	orr	x9, x10, x9
	str	x9, [x11, #16]
	ldr	x9, [sp, #168]
	lsl	x9, x9, #8
	str	x9, [x12, #16]
	ldr	x10, [sp, #176]
	orr	x9, x10, x9
	str	x9, [x12, #16]
	ldr	x9, [sp, #184]
	lsl	x9, x9, #8
	str	x9, [x8, #16]
	ldr	x10, [sp, #192]
	orr	x9, x10, x9
	str	x9, [x8, #16]
	mov	x0, x21
	bl	_spin_unlock_irq
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w2, [x8]
Lloh3:
	adrp	x21, l_.str.1@PAGE
Lloh4:
	add	x21, x21, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_sprintf
	mov	x22, x0
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	ldr	w2, [x8]
	add	x0, x19, w22, sxtw
	mov	x1, x21
	bl	_sprintf
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	ldr	w2, [x8]
	add	w22, w22, w0
	add	x0, x19, w22, sxtw
	mov	x1, x21
	bl	_sprintf
	add	w22, w22, w0
	add	x0, x19, w22, sxtw
	ldr	x8, [x20]
	ldr	x8, [x8, #24]
	ldr	w2, [x8]
	mov	x1, x21
	bl	_sprintf
	add	w22, w22, w0
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w2, [x8, #8]
	add	x0, x19, w22, sxtw
	mov	x1, x21
	bl	_sprintf
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	ldr	w2, [x8, #8]
	add	w22, w22, w0
	add	x0, x19, w22, sxtw
	mov	x1, x21
	bl	_sprintf
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	ldr	w2, [x8, #8]
	add	w22, w22, w0
	add	x0, x19, w22, sxtw
	mov	x1, x21
	bl	_sprintf
	add	w22, w22, w0
	add	x0, x19, w22, sxtw
	ldr	x8, [x20]
	ldr	x8, [x8, #24]
	ldr	w2, [x8, #8]
	mov	x1, x21
	bl	_sprintf
	add	w22, w22, w0
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w2, [x8, #16]
	add	x0, x19, w22, sxtw
	mov	x1, x21
	bl	_sprintf
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	ldr	w2, [x8, #16]
	add	w22, w22, w0
	add	x0, x19, w22, sxtw
	mov	x1, x21
	bl	_sprintf
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	ldr	w2, [x8, #16]
	add	w22, w22, w0
	add	x0, x19, w22, sxtw
	mov	x1, x21
	bl	_sprintf
	add	w21, w22, w0
	add	x0, x19, w21, sxtw
	ldr	x8, [x20]
	ldr	x8, [x8, #24]
	ldr	w2, [x8, #16]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_sprintf
	add	w0, w21, w0
	b	LBB0_6
LBB0_4:
	mov	x21, x0
	mov	x0, x20
	bl	_wiimote_cmd_release
LBB0_5:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w21, #0
	csneg	w0, w21, w8, lt
LBB0_6:
	ldur	x8, [x29, #-56]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #256]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #240]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #224]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #208]            ; 16-byte Folded Reload
	add	sp, sp, #272
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%04x\n"

l_.str.1:                               ; @.str.1
	.asciz	"%04x:"

	.no_dead_strip	_wiimod_bboard_calib_show
.subsections_via_symbols
