	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nes_query_device
_nes_query_device:                      ## @nes_query_device
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	callq	_to_nesvnic
	movq	%rax, %r14
	movq	8(%rax), %r12
	movq	16(%rax), %r13
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$88, %edx
	callq	_memset
	leaq	80(%rbx), %rdi
	movq	(%r14), %rax
	movl	(%rax), %esi
	movl	$6, %edx
	callq	_memcpy
	movq	(%r13), %rax
	movl	40(%rax), %ecx
	movl	%ecx, 76(%rbx)
	movups	24(%rax), %xmm0
	movups	%xmm0, 60(%rbx)
	movl	$-2147483648, (%rbx)            ## imm = 0x80000000
	movl	12(%r12), %ecx
	movl	%ecx, 56(%rbx)
	movq	16(%rax), %rcx
	addq	$-2, %rcx
	movq	%rcx, 48(%rbx)
	movl	8(%rax), %ecx
	movl	%ecx, 44(%rbx)
	movl	8(%r12), %ecx
	movl	%ecx, 40(%rbx)
	movq	(%r12), %xmm0                   ## xmm0 = mem[0],zero
	pshufd	$212, %xmm0, %xmm0              ## xmm0 = xmm0[0,1,1,3]
	pinsrd	$3, 4(%rax), %xmm0
	movdqu	%xmm0, 24(%rbx)
	movl	$1, 4(%rbx)
	movslq	(%rax), %rax
	cmpq	$3, %rax
	ja	LBB0_2
## %bb.1:
	leaq	L_switch.table.nes_query_device(%rip), %rcx
	movl	(%rcx,%rax,4), %r15d
LBB0_2:
	movl	%r15d, 8(%rbx)
	movl	%r15d, 12(%rbx)
	movq	_IB_ATOMIC_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movl	$1, 16(%rbx)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_ATOMIC_NONE,4,2             ## @IB_ATOMIC_NONE
	.no_dead_strip	_nes_query_device
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ## @switch.table.nes_query_device
L_switch.table.nes_query_device:
	.long	2                               ## 0x2
	.long	8                               ## 0x8
	.long	32                              ## 0x20
	.long	64                              ## 0x40

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function nes_query_device
lCPI0_0:
	.long	2147483648                      ; 0x80000000
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_nes_query_device:                      ; @nes_query_device
	.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, x1
	bl	_to_nesvnic
	mov	x20, x0
	ldp	x22, x21, [x0, #8]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #88
	bl	_memset
	add	x0, x19, #80
	ldr	x8, [x20]
	ldr	w1, [x8]
	mov	w2, #6
	bl	_memcpy
	mov	w8, #0
	ldr	x9, [x21]
	ldr	w10, [x9, #40]
	str	w10, [x19, #76]
	ldur	q0, [x9, #24]
	stur	q0, [x19, #60]
	ldp	w11, w10, [x22, #8]
	str	w10, [x19, #56]
	ldr	x10, [x9, #16]
	sub	x10, x10, #2
	str	x10, [x19, #48]
	ldr	w10, [x9, #8]
	stp	w11, w10, [x19, #40]
	ldr	d0, [x22]
	add	x10, x9, #4
	mov.s	v0[2], v0[1]
	ld1.s	{ v0 }[3], [x10]
	stur	q0, [x19, #24]
Lloh0:
	adrp	x10, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x10, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	ldrsw	x9, [x9]
	cmp	w9, #3
	b.hi	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, l_switch.table.nes_query_device@PAGE
Lloh3:
	add	x8, x8, l_switch.table.nes_query_device@PAGEOFF
	ldr	w8, [x8, x9, lsl #2]
LBB0_2:
Lloh4:
	adrp	x9, _IB_ATOMIC_NONE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _IB_ATOMIC_NONE@GOTPAGEOFF]
	stp	w8, w8, [x19, #8]
Lloh6:
	ldr	w8, [x9]
	mov	w9, #1
	stp	w9, w8, [x19, #16]
	mov	w0, #0
	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
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_ATOMIC_NONE,4,2             ; @IB_ATOMIC_NONE
	.no_dead_strip	_nes_query_device
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @switch.table.nes_query_device
l_switch.table.nes_query_device:
	.long	2                               ; 0x2
	.long	8                               ; 0x8
	.long	32                              ; 0x20
	.long	64                              ; 0x40

.subsections_via_symbols
