	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rmi_probe
_rmi_probe:                             ## @rmi_probe
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	$104, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	leaq	96(%rax), %rdi
	movq	_rmi_reset_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	%r15, 88(%r14)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_hid_set_drvdata
	movq	_HID_QUIRK_NO_INIT_REPORTS@GOTPCREL(%rip), %rax
	movl	4(%r15), %ecx
	orl	(%rax), %ecx
	movq	_HID_QUIRK_NO_INPUT_SYNC@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 4(%r15)
	movq	%r15, %rdi
	callq	_hid_parse
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_23
LBB0_4:
	movl	(%r12), %eax
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, (%r14)
LBB0_6:
	movq	_HID_FEATURE_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RMI_SET_RMI_MODE_REPORT_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-64(%rbp), %rcx
	movq	%r15, %rdi
	callq	_rmi_check_valid_report_id
	testl	%eax, %eax
	je	LBB0_7
## %bb.9:
	movq	_HID_INPUT_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RMI_ATTN_REPORT_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %rcx
	movq	%r15, %rdi
	callq	_rmi_check_valid_report_id
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	-56(%rbp), %rdi
	callq	_hid_report_len
	movq	%rax, 8(%r14)
	movq	_HID_OUTPUT_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RMI_WRITE_REPORT_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rcx
	movq	%r15, %rdi
	callq	_rmi_check_valid_report_id
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movq	-48(%rbp), %rdi
	callq	_hid_report_len
	movq	%rax, 16(%r14)
	movq	_RMI_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%r14)
	addq	8(%r14), %rax
	movl	(%r13), %edx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_devm_kzalloc
	movq	%rax, 72(%r14)
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	addq	16(%r14), %rax
	movq	%rax, 80(%r14)
	leaq	64(%r14), %rdi
	callq	_init_waitqueue_head
	movq	%r14, %rdi
	addq	$60, %rdi
	callq	_mutex_init
	movq	%r15, %rdi
	callq	_rmi_setup_irq_domain
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_23
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_8
LBB0_12:
	leaq	L_.str.3(%rip), %rsi
LBB0_8:
	movq	%r15, %rdi
	callq	_hid_dbg
LBB0_20:
	movq	_HID_CONNECT_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_hid_hw_start
	testl	%eax, %eax
	je	LBB0_21
## %bb.22:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rsi
LBB0_23:
	movq	%r15, %rdi
	callq	_hid_err
	jmp	LBB0_24
LBB0_21:
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_14:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_hid_err
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	_RMI_DEVICE_HAS_PHYS_BUTTONS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_19
## %bb.18:
	movq	_rmi_hid_pdata@GOTPCREL(%rip), %rax
	movl	$1, 4(%rax)
LBB0_19:
	movl	(%r15), %eax
	movl	%eax, 48(%r14)
	movq	_rmi_hid_pdata@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%r14)
	movl	56(%r14), %eax
	movl	%eax, 40(%r14)
	leaq	L_.str.6(%rip), %rax
	movq	%rax, 24(%r14)
	movq	_hid_rmi_ops@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r14)
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_rmi_reset_work,4,2             ## @rmi_reset_work
	.comm	_HID_QUIRK_NO_INIT_REPORTS,4,2  ## @HID_QUIRK_NO_INIT_REPORTS
	.comm	_HID_QUIRK_NO_INPUT_SYNC,4,2    ## @HID_QUIRK_NO_INPUT_SYNC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"parse failed\n"

	.comm	_HID_FEATURE_REPORT,4,2         ## @HID_FEATURE_REPORT
	.comm	_RMI_SET_RMI_MODE_REPORT_ID,4,2 ## @RMI_SET_RMI_MODE_REPORT_ID
L_.str.1:                               ## @.str.1
	.asciz	"device does not have set mode feature report\n"

	.comm	_HID_INPUT_REPORT,4,2           ## @HID_INPUT_REPORT
	.comm	_RMI_ATTN_REPORT_ID,4,2         ## @RMI_ATTN_REPORT_ID
L_.str.2:                               ## @.str.2
	.asciz	"device does not have attention input report\n"

	.comm	_HID_OUTPUT_REPORT,4,2          ## @HID_OUTPUT_REPORT
	.comm	_RMI_WRITE_REPORT_ID,4,2        ## @RMI_WRITE_REPORT_ID
L_.str.3:                               ## @.str.3
	.asciz	"device does not have rmi write output report\n"

	.comm	_RMI_DEVICE,4,2                 ## @RMI_DEVICE
L_.str.4:                               ## @.str.4
	.asciz	"failed to allocate buffer for HID reports\n"

L_.str.5:                               ## @.str.5
	.asciz	"failed to allocate IRQ domain\n"

	.comm	_RMI_DEVICE_HAS_PHYS_BUTTONS,4,2 ## @RMI_DEVICE_HAS_PHYS_BUTTONS
	.comm	_rmi_hid_pdata,8,2              ## @rmi_hid_pdata
L_.str.6:                               ## @.str.6
	.asciz	"hid"

	.comm	_hid_rmi_ops,4,2                ## @hid_rmi_ops
	.comm	_HID_CONNECT_DEFAULT,4,2        ## @HID_CONNECT_DEFAULT
L_.str.7:                               ## @.str.7
	.asciz	"hw start failed\n"

	.no_dead_strip	_rmi_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rmi_probe
_rmi_probe:                             ; @rmi_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	w1, #104
	bl	_devm_kzalloc
	cbz	x0, LBB0_19
; %bb.1:
	mov	x20, x0
	add	x0, x0, #96
Lloh2:
	adrp	x8, _rmi_reset_work@GOTPAGE
Lloh3:
	ldr	x8, [x8, _rmi_reset_work@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_INIT_WORK
	str	x19, [x20, #88]
	mov	x0, x19
	mov	x1, x20
	bl	_hid_set_drvdata
Lloh5:
	adrp	x8, _HID_QUIRK_NO_INIT_REPORTS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HID_QUIRK_NO_INIT_REPORTS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _HID_QUIRK_NO_INPUT_SYNC@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HID_QUIRK_NO_INPUT_SYNC@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_hid_parse
	cbz	w0, LBB0_3
; %bb.2:
	mov	x21, x0
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_17
LBB0_3:
	ldr	w8, [x22]
	cbz	w8, LBB0_5
; %bb.4:
	str	w8, [x20]
LBB0_5:
Lloh13:
	adrp	x8, _HID_FEATURE_REPORT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HID_FEATURE_REPORT@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _RMI_SET_RMI_MODE_REPORT_ID@GOTPAGE
Lloh17:
	ldr	x8, [x8, _RMI_SET_RMI_MODE_REPORT_ID@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x19
	bl	_rmi_check_valid_report_id
	cbz	w0, LBB0_11
; %bb.6:
Lloh19:
	adrp	x8, _HID_INPUT_REPORT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _HID_INPUT_REPORT@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _RMI_ATTN_REPORT_ID@GOTPAGE
Lloh23:
	ldr	x8, [x8, _RMI_ATTN_REPORT_ID@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	add	x3, sp, #24
	mov	x0, x19
	bl	_rmi_check_valid_report_id
	cbz	w0, LBB0_12
; %bb.7:
	ldr	x0, [sp, #24]
	bl	_hid_report_len
	str	x0, [x20, #8]
Lloh25:
	adrp	x8, _HID_OUTPUT_REPORT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _HID_OUTPUT_REPORT@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x8, _RMI_WRITE_REPORT_ID@GOTPAGE
Lloh29:
	ldr	x8, [x8, _RMI_WRITE_REPORT_ID@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	add	x3, sp, #16
	mov	x0, x19
	bl	_rmi_check_valid_report_id
	cbz	w0, LBB0_13
; %bb.8:
	ldr	x0, [sp, #16]
	bl	_hid_report_len
	str	x0, [x20, #16]
Lloh31:
	adrp	x8, _RMI_DEVICE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _RMI_DEVICE@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	ldr	x8, [x20, #8]
	add	x1, x8, x0
	ldr	w2, [x23]
	mov	x0, x19
	bl	_devm_kzalloc
	str	x0, [x20, #72]
	cbz	x0, LBB0_18
; %bb.9:
	ldr	x8, [x20, #16]
	add	x8, x0, x8
	str	x8, [x20, #80]
	add	x0, x20, #64
	bl	_init_waitqueue_head
	add	x0, x20, #60
	bl	_mutex_init
	mov	x0, x19
	bl	_rmi_setup_irq_domain
	cbz	w0, LBB0_21
; %bb.10:
	mov	x21, x0
Lloh34:
	adrp	x1, l_.str.5@PAGE
Lloh35:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_17
LBB0_11:
Lloh36:
	adrp	x1, l_.str.1@PAGE
Lloh37:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_12:
Lloh38:
	adrp	x1, l_.str.2@PAGE
Lloh39:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh40:
	adrp	x1, l_.str.3@PAGE
Lloh41:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_14:
	mov	x0, x19
	bl	_hid_dbg
LBB0_15:
Lloh42:
	adrp	x8, _HID_CONNECT_DEFAULT@GOTPAGE
Lloh43:
	ldr	x8, [x8, _HID_CONNECT_DEFAULT@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hid_hw_start
	mov	x21, x0
	cbz	w0, LBB0_20
; %bb.16:
Lloh45:
	adrp	x1, l_.str.7@PAGE
Lloh46:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_17:
	mov	x0, x19
	bl	_hid_err
	b	LBB0_20
LBB0_18:
Lloh47:
	adrp	x1, l_.str.4@PAGE
Lloh48:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_hid_err
LBB0_19:
Lloh49:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh50:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_20:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_21:
	ldr	w9, [x20]
Lloh52:
	adrp	x8, _RMI_DEVICE_HAS_PHYS_BUTTONS@GOTPAGE
Lloh53:
	ldr	x8, [x8, _RMI_DEVICE_HAS_PHYS_BUTTONS@GOTPAGEOFF]
Lloh54:
	ldr	w10, [x8]
Lloh55:
	adrp	x8, _rmi_hid_pdata@GOTPAGE
Lloh56:
	ldr	x8, [x8, _rmi_hid_pdata@GOTPAGEOFF]
	tst	w10, w9
	b.eq	LBB0_23
; %bb.22:
	mov	w9, #1
	str	w9, [x8, #4]
LBB0_23:
	ldr	w9, [x19]
	str	w9, [x20, #48]
	ldr	x8, [x8]
	str	x8, [x20, #40]
	ldr	w8, [x20, #56]
	str	w8, [x20, #40]
Lloh57:
	adrp	x8, l_.str.6@PAGE
Lloh58:
	add	x8, x8, l_.str.6@PAGEOFF
Lloh59:
	adrp	x9, _hid_rmi_ops@GOTPAGE
Lloh60:
	ldr	x9, [x9, _hid_rmi_ops@GOTPAGEOFF]
	stp	x8, x9, [x20, #24]
	b	LBB0_15
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh59, Lloh60
	.loh AdrpAdd	Lloh57, Lloh58
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_rmi_reset_work,4,2             ; @rmi_reset_work
	.comm	_HID_QUIRK_NO_INIT_REPORTS,4,2  ; @HID_QUIRK_NO_INIT_REPORTS
	.comm	_HID_QUIRK_NO_INPUT_SYNC,4,2    ; @HID_QUIRK_NO_INPUT_SYNC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"parse failed\n"

	.comm	_HID_FEATURE_REPORT,4,2         ; @HID_FEATURE_REPORT
	.comm	_RMI_SET_RMI_MODE_REPORT_ID,4,2 ; @RMI_SET_RMI_MODE_REPORT_ID
l_.str.1:                               ; @.str.1
	.asciz	"device does not have set mode feature report\n"

	.comm	_HID_INPUT_REPORT,4,2           ; @HID_INPUT_REPORT
	.comm	_RMI_ATTN_REPORT_ID,4,2         ; @RMI_ATTN_REPORT_ID
l_.str.2:                               ; @.str.2
	.asciz	"device does not have attention input report\n"

	.comm	_HID_OUTPUT_REPORT,4,2          ; @HID_OUTPUT_REPORT
	.comm	_RMI_WRITE_REPORT_ID,4,2        ; @RMI_WRITE_REPORT_ID
l_.str.3:                               ; @.str.3
	.asciz	"device does not have rmi write output report\n"

	.comm	_RMI_DEVICE,4,2                 ; @RMI_DEVICE
l_.str.4:                               ; @.str.4
	.asciz	"failed to allocate buffer for HID reports\n"

l_.str.5:                               ; @.str.5
	.asciz	"failed to allocate IRQ domain\n"

	.comm	_RMI_DEVICE_HAS_PHYS_BUTTONS,4,2 ; @RMI_DEVICE_HAS_PHYS_BUTTONS
	.comm	_rmi_hid_pdata,8,2              ; @rmi_hid_pdata
l_.str.6:                               ; @.str.6
	.asciz	"hid"

	.comm	_hid_rmi_ops,4,2                ; @hid_rmi_ops
	.comm	_HID_CONNECT_DEFAULT,4,2        ; @HID_CONNECT_DEFAULT
l_.str.7:                               ; @.str.7
	.asciz	"hw start failed\n"

	.no_dead_strip	_rmi_probe
.subsections_via_symbols
