	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidp_setup_hid
_hidp_setup_hid:                        ## @hidp_setup_hid
	.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
	movq	%rdi, %r14
	movl	20(%rsi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	20(%rbx), %edx
	movl	24(%rbx), %esi
	movq	%rax, %rdi
	callq	_copy_from_user
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_9
LBB0_4:
	movl	20(%rbx), %eax
	movl	%eax, 24(%r14)
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_hid_allocate_device
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_PTR_ERR
	movl	%eax, %r12d
LBB0_8:
	movq	(%r14), %rdi
	callq	_kfree
	movq	$0, (%r14)
LBB0_9:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r15, 8(%r14)
	movq	%r14, 56(%r15)
	movq	16(%r14), %rax
	movl	(%rax), %edi
	callq	_bt_sk
	leaq	4(%rax), %rsi
	leaq	-48(%rbp), %r13
	movq	%r13, %rdi
	callq	_baswap
	movq	16(%r14), %rax
	movl	(%rax), %edi
	callq	_bt_sk
	leaq	-44(%rbp), %rdi
	movq	%rax, %rsi
	callq	_baswap
	movq	_BUS_BLUETOOTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r15)
	movups	4(%rbx), %xmm0
	movups	%xmm0, 32(%r15)
	movl	28(%r15), %edi
	movl	(%rbx), %esi
	movl	$3, %edx
	callq	_strncpy
	movl	24(%r15), %ebx
	movq	%r13, %rdi
	callq	_batostr
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$64, %edx
	callq	_strncpy
	movl	20(%r15), %ebx
	leaq	-44(%rbp), %rdi
	callq	_batostr
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$64, %edx
	callq	_strncpy
	movq	%r14, %rdi
	callq	_hidp_get_device
	movl	%eax, 16(%r15)
	movq	_hidp_hid_driver@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r15)
	movq	_hidp_output_raw_report@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r15, %rdi
	callq	_hid_add_device
	testl	%eax, %eax
	jns	LBB0_9
## %bb.7:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_hid_destroy_device
	movq	$0, 8(%r14)
	movl	%ebx, %r12d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_BUS_BLUETOOTH,4,2              ## @BUS_BLUETOOTH
	.comm	_hidp_hid_driver,4,2            ## @hidp_hid_driver
	.comm	_hidp_output_raw_report,4,2     ## @hidp_output_raw_report
	.no_dead_strip	_hidp_setup_hid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidp_setup_hid
_hidp_setup_hid:                        ; @hidp_setup_hid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x19, x0
	ldr	w0, [x1, #20]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kzalloc
	str	x0, [x19]
	cbz	x0, LBB0_3
; %bb.1:
	ldp	w2, w1, [x21, #20]
	bl	_copy_from_user
	cbz	x0, LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _EFAULT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_6
LBB0_3:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_4:
	ldr	w8, [x21, #20]
	str	w8, [x19, #24]
	bl	_hid_allocate_device
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.5:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x21, x0
LBB0_6:
	ldr	x0, [x19]
	bl	_kfree
	str	xzr, [x19]
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_8:
	str	x20, [x19, #8]
	str	x19, [x20, #56]
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	bl	_bt_sk
	add	x1, x0, #4
	add	x0, sp, #12
	bl	_baswap
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	bl	_bt_sk
	mov	x1, x0
	add	x0, sp, #8
	bl	_baswap
Lloh9:
	adrp	x8, _BUS_BLUETOOTH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BUS_BLUETOOTH@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x20, #48]
	ldur	q0, [x21, #4]
	str	q0, [x20, #32]
	ldr	w0, [x20, #28]
	ldr	w1, [x21]
	mov	w2, #3
	bl	_strncpy
	ldr	w21, [x20, #24]
	add	x0, sp, #12
	bl	_batostr
	mov	x1, x0
	mov	x0, x21
	mov	w2, #64
	bl	_strncpy
	ldr	w21, [x20, #20]
	add	x0, sp, #8
	bl	_batostr
	mov	x1, x0
	mov	x0, x21
	mov	w2, #64
	bl	_strncpy
	mov	x0, x19
	bl	_hidp_get_device
Lloh12:
	adrp	x8, _hidp_hid_driver@GOTPAGE
Lloh13:
	ldr	x8, [x8, _hidp_hid_driver@GOTPAGEOFF]
	str	w0, [x20, #16]
	str	x8, [x20, #8]
Lloh14:
	adrp	x8, _hidp_output_raw_report@GOTPAGE
Lloh15:
	ldr	x8, [x8, _hidp_output_raw_report@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x20]
	mov	x0, x20
	bl	_hid_add_device
	tbnz	w0, #31, LBB0_10
; %bb.9:
	mov	w21, #0
	b	LBB0_7
LBB0_10:
	mov	x21, x0
	mov	x0, x20
	bl	_hid_destroy_device
	str	xzr, [x19, #8]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_BUS_BLUETOOTH,4,2              ; @BUS_BLUETOOTH
	.comm	_hidp_hid_driver,4,2            ; @hidp_hid_driver
	.comm	_hidp_output_raw_report,4,2     ; @hidp_output_raw_report
	.no_dead_strip	_hidp_setup_hid
.subsections_via_symbols
