	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xpad_prepare_next_init_packet
_xpad_prepare_next_init_packet:         ## @xpad_prepare_next_init_packet
	.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	(%rdi), %rax
	movq	_XTYPE_XBOXONE@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.1:
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movq	_xboxone_init_packets@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpq	%rax, %r14
	jl	LBB0_2
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	cmpq	%rax, %r14
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rbx
	movq	8(%r15), %rax
	leaq	1(%rax), %r14
	movq	%r14, 8(%r15)
	leaq	(%rax,%rax,2), %r13
	movq	(%rbx,%r13,8), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	40(%r15), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx,%r13,8), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	40(%r15), %rcx
	cmpq	8(%rcx), %rax
	jne	LBB0_4
LBB0_8:
	movq	24(%r15), %rdi
	movl	16(%rbx,%r13,8), %edx
	movl	20(%rbx,%r13,8), %esi
	callq	_memcpy
	movl	16(%rbx,%r13,8), %eax
	movq	32(%r15), %rcx
	movl	%eax, (%rcx)
	movslq	16(%r15), %rax
	leal	1(%rax), %ecx
	movl	%ecx, 16(%r15)
	movq	24(%r15), %rcx
	movq	%rax, 16(%rcx)
	movl	$1, %ebx
	jmp	LBB0_9
LBB0_5:
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XTYPE_XBOXONE,8,3              ## @XTYPE_XBOXONE
	.comm	_xboxone_init_packets,8,3       ## @xboxone_init_packets
	.no_dead_strip	_xpad_prepare_next_init_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xpad_prepare_next_init_packet
_xpad_prepare_next_init_packet:         ; @xpad_prepare_next_init_packet
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _XTYPE_XBOXONE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XTYPE_XBOXONE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x21, [x0, #8]
Lloh3:
	adrp	x20, _xboxone_init_packets@GOTPAGE
Lloh4:
	ldr	x20, [x20, _xboxone_init_packets@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	x21, x0
	b.ge	LBB0_9
; %bb.2:
	mov	w21, #24
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_ARRAY_SIZE
	cmp	x22, x0
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	ldr	x9, [x19, #8]
	add	x22, x9, #1
	str	x22, [x19, #8]
	mul	x8, x9, x21
	ldr	x8, [x0, x8]
	cbz	x8, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x19, #40]
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_3
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	madd	x8, x9, x21, x0
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x19, #40]
	ldr	x10, [x10, #8]
	cmp	x8, x10
	b.ne	LBB0_3
LBB0_8:
	ldr	x8, [x19, #24]
	mov	w10, #24
	madd	x20, x9, x10, x0
	ldp	w2, w1, [x20, #16]
	mov	x0, x8
	bl	_memcpy
	ldr	w8, [x20, #16]
	ldp	x10, x9, [x19, #24]
	str	w8, [x9]
	ldrsw	x8, [x19, #16]
	add	w9, w8, #1
	str	w9, [x19, #16]
	str	x8, [x10, #16]
	mov	w0, #1
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_XTYPE_XBOXONE,8,3              ; @XTYPE_XBOXONE
	.comm	_xboxone_init_packets,8,3       ; @xboxone_init_packets
	.no_dead_strip	_xpad_prepare_next_init_packet
.subsections_via_symbols
