	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uhid_dev_create2
_uhid_dev_create2:                      ## @uhid_dev_create2
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	je	LBB0_3
## %bb.1:
	movq	_EALREADY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	%rsi, %r14
	movq	(%rsi), %rbx
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.4:
	movq	_HID_MAX_DESCRIPTOR_SIZE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	ja	LBB0_5
## %bb.6:
	movq	%rdi, %r15
	movl	40(%r14), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	callq	_kmemdup
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rbx, 8(%r15)
	movq	%rax, 16(%r15)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_hid_allocate_device
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	8(%r15), %r14
	movq	%r12, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	16(%r15), %rdi
	callq	_kfree
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
	jmp	LBB0_11
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	$4, %edi
	movl	$4, %esi
	callq	_min
	decl	%eax
	movslq	%eax, %rdx
	movl	56(%r12), %edi
	movl	36(%r14), %esi
	callq	_strncpy
	movl	$4, %edi
	movl	$4, %esi
	callq	_min
	decl	%eax
	movslq	%eax, %rdx
	movl	52(%r12), %edi
	movl	32(%r14), %esi
	callq	_strncpy
	movl	$4, %edi
	movl	$4, %esi
	callq	_min
	decl	%eax
	movslq	%eax, %rdx
	movl	48(%r12), %edi
	movl	28(%r14), %esi
	callq	_strncpy
	movq	_uhid_hid_driver@GOTPCREL(%rip), %rax
	movq	%rax, 40(%r12)
	movl	24(%r14), %eax
	movl	%eax, 32(%r12)
	movups	8(%r14), %xmm0
	movups	%xmm0, 16(%r12)
	movq	%r15, 8(%r12)
	movq	_uhid_misc@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	movq	%r12, 32(%r15)
	movl	$1, (%r15)
	addq	$24, %r15
	movq	%r15, %rdi
	callq	_schedule_work
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EALREADY,4,2                   ## @EALREADY
	.comm	_HID_MAX_DESCRIPTOR_SIZE,8,3    ## @HID_MAX_DESCRIPTOR_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_uhid_hid_driver,4,2            ## @uhid_hid_driver
	.comm	_uhid_misc,4,2                  ## @uhid_misc
	.no_dead_strip	_uhid_dev_create2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uhid_dev_create2
_uhid_dev_create2:                      ; @uhid_dev_create2
	.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	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EALREADY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EALREADY@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	mov	x20, x1
	ldr	x21, [x1]
Lloh2:
	adrp	x8, _HID_MAX_DESCRIPTOR_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HID_MAX_DESCRIPTOR_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x21, #0
	ccmp	x21, x8, #2, ne
	b.ls	LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	mov	x19, x0
	ldr	w0, [x20, #40]
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x1, x21
	bl	_kmemdup
	cbz	x0, LBB0_7
; %bb.5:
	mov	x22, x19
	stp	x21, x0, [x22, #8]!
	bl	_hid_allocate_device
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.6:
	mov	x0, x21
	bl	_PTR_ERR
	mov	x20, x0
	ldr	x0, [x19, #16]
	bl	_kfree
	stp	xzr, xzr, [x22]
	mov	x0, x20
	b	LBB0_9
LBB0_7:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
LBB0_10:
	mov	w0, #4
	mov	w1, #4
	bl	_min
	sub	w8, w0, #1
	sxtw	x2, w8
	ldr	w0, [x21, #56]
	ldr	w1, [x20, #36]
	bl	_strncpy
	mov	w0, #4
	mov	w1, #4
	bl	_min
	sub	w8, w0, #1
	sxtw	x2, w8
	ldr	w0, [x21, #52]
	ldr	w1, [x20, #32]
	bl	_strncpy
	mov	w0, #4
	mov	w1, #4
	bl	_min
	sub	w8, w0, #1
	sxtw	x2, w8
	ldr	w0, [x21, #48]
	ldr	w1, [x20, #28]
	bl	_strncpy
Lloh12:
	adrp	x8, _uhid_hid_driver@GOTPAGE
Lloh13:
	ldr	x8, [x8, _uhid_hid_driver@GOTPAGEOFF]
	str	x8, [x21, #40]
	ldr	w8, [x20, #24]
	str	w8, [x21, #32]
	ldur	q0, [x20, #8]
	str	q0, [x21, #16]
	str	x19, [x21, #8]
Lloh14:
	adrp	x8, _uhid_misc@GOTPAGE
Lloh15:
	ldr	x8, [x8, _uhid_misc@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x21]
	str	x21, [x19, #32]
	mov	w8, #1
	str	w8, [x19]
	add	x0, x19, #24
	bl	_schedule_work
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EALREADY,4,2                   ; @EALREADY
	.comm	_HID_MAX_DESCRIPTOR_SIZE,8,3    ; @HID_MAX_DESCRIPTOR_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_uhid_hid_driver,4,2            ; @uhid_hid_driver
	.comm	_uhid_misc,4,2                  ; @uhid_misc
	.no_dead_strip	_uhid_dev_create2
.subsections_via_symbols
