	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function new_attach_event
_new_attach_event:                      ## @new_attach_event
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	20(%rdi), %esi
	movl	24(%rdi), %edi
	callq	_hid_device_driver_lookup
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r14
	movl	$4, %edi
	movl	$40, %esi
	callq	_alloc_zeroed
	xorl	%ecx, %ecx
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%r14, 32(%rax)
	movups	16(%rbx), %xmm0
	movups	%xmm0, 16(%rax)
	cmpl	$1, (%rbx)
	movl	$0, %edx
	jne	LBB0_4
## %bb.3:
	movl	4(%rbx), %esi
	xorl	%ecx, %ecx
	cmpl	$1, %esi
	sete	%cl
	xorl	%edx, %edx
	cmpl	$2, %esi
	sete	%dl
LBB0_4:
	movl	%ecx, (%rax)
	movl	%edx, 4(%rax)
	movl	12(%rbx), %ecx
	movl	%ecx, 12(%rax)
	movl	8(%rbx), %ecx
	movl	%ecx, 8(%rax)
	jmp	LBB0_7
LBB0_5:
	movl	20(%rbx), %edx
	movl	24(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_ERR
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[hid]: Failed to locate driver for device vid=%04x pid=%04x\n"

	.no_dead_strip	_new_attach_event
.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 new_attach_event
lCPI0_0:
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_new_attach_event:                      ; @new_attach_event
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #24]
	ldr	w1, [x19, #20]
	bl	_hid_device_driver_lookup
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	mov	w0, #4
	mov	w1, #40
	bl	_alloc_zeroed
	cbz	x0, LBB0_7
; %bb.2:
	str	x20, [x0, #32]
	ldr	q0, [x19, #16]
	str	q0, [x0, #16]
	ldr	w8, [x19]
	cmp	w8, #1
	b.ne	LBB0_5
; %bb.3:
	add	x8, x19, #4
	ld1r.2s	{ v0 }, [x8]
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d1, [x8, lCPI0_0@PAGEOFF]
	cmeq.2s	v0, v0, v1
	movi.2s	v1, #1
	and.8b	v0, v0, v1
	b	LBB0_6
LBB0_4:
	ldp	w2, w1, [x19, #20]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_ERR
	mov	x0, #0
	b	LBB0_7
LBB0_5:
	movi.2d	v0, #0000000000000000
LBB0_6:
	str	d0, [x0]
	ldr	d0, [x19, #8]
	str	d0, [x0, #8]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[hid]: Failed to locate driver for device vid=%04x pid=%04x\n"

	.no_dead_strip	_new_attach_event
.subsections_via_symbols
