	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ati_remote2_probe
_ati_remote2_probe:                     ## @ati_remote2_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_interface_to_usbdev
	movq	8(%r12), %rbx
	cmpq	$0, 8(%rbx)
	je	LBB0_3
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_3:
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	movq	%r15, 32(%rax)
	movq	(%rax), %rax
	movq	%r12, (%rax)
	movq	(%rbx), %rax
	movq	24(%r14), %rcx
	movq	%rax, (%rcx)
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_usb_ifnum_to_if
	movq	(%r14), %rcx
	movq	%rax, 8(%rcx)
	movq	(%r14), %rax
	movq	8(%rax), %rsi
	movq	_ati_remote2_driver@GOTPCREL(%rip), %rdi
	movq	%r14, %rdx
	callq	_usb_driver_claim_interface
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.6:
	movq	(%r14), %rax
	movq	24(%r14), %rcx
	movq	8(%rax), %rax
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rcx)
	movq	%r14, %rdi
	callq	_ati_remote2_urb_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	movq	_channel_mask@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, 16(%r14)
	movq	_mode_mask@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
	movq	%r14, %rdi
	callq	_ati_remote2_setup
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:
	movl	12(%r14), %esi
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_usb_make_path
	movl	12(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	$4, %edx
	callq	_strlcat
	movl	8(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edx
	callq	_strlcat
	movq	_ati_remote2_attr_group@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_sysfs_create_group
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movq	%r14, %rdi
	callq	_ati_remote2_input_init
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	%eax, %ebx
	movq	_ati_remote2_attr_group@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_sysfs_remove_group
LBB0_12:
	movq	%r14, %rdi
	callq	_ati_remote2_urb_cleanup
	movq	(%r14), %rax
	movq	8(%rax), %rsi
	movq	_ati_remote2_driver@GOTPCREL(%rip), %rdi
	callq	_usb_driver_release_interface
LBB0_13:
	movq	%r14, %rdi
	callq	_kfree
LBB0_14:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_10:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_usb_set_intfdata
	movl	$1, (%r12)
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ati_remote2_driver,4,2         ## @ati_remote2_driver
	.comm	_channel_mask,4,2               ## @channel_mask
	.comm	_mode_mask,4,2                  ## @mode_mask
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/input0"

L_.str.1:                               ## @.str.1
	.asciz	"ATI Remote Wonder II"

	.comm	_ati_remote2_attr_group,4,2     ## @ati_remote2_attr_group
	.no_dead_strip	_ati_remote2_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ati_remote2_probe
_ati_remote2_probe:                     ; @ati_remote2_probe
	.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
	mov	x20, x0
	bl	_interface_to_usbdev
	ldr	x22, [x20, #8]
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_12
LBB0_3:
	mov	x21, x0
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_13
; %bb.4:
	mov	x19, x0
	str	x21, [x0, #32]
	ldr	x8, [x0]
	str	x20, [x8]
	ldr	x8, [x22]
	ldr	x9, [x0, #24]
	str	x8, [x9]
	mov	x0, x21
	mov	w1, #1
	bl	_usb_ifnum_to_if
	ldr	x8, [x19]
	str	x0, [x8, #8]
	ldr	x8, [x19]
	ldr	x1, [x8, #8]
Lloh5:
	adrp	x0, _ati_remote2_driver@GOTPAGE
Lloh6:
	ldr	x0, [x0, _ati_remote2_driver@GOTPAGEOFF]
	mov	x2, x19
	bl	_usb_driver_claim_interface
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.5:
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	ldr	x9, [x19, #24]
	str	x8, [x9, #8]
	mov	x0, x19
	bl	_ati_remote2_urb_init
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.6:
Lloh7:
	adrp	x8, _channel_mask@GOTPAGE
Lloh8:
	ldr	x8, [x8, _channel_mask@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _mode_mask@GOTPAGE
Lloh11:
	ldr	x8, [x8, _mode_mask@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	stp	w1, w8, [x19, #16]
	mov	x0, x19
	bl	_ati_remote2_setup
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.7:
	ldr	w1, [x19, #12]
	mov	x0, x21
	mov	w2, #4
	bl	_usb_make_path
	ldr	w0, [x19, #12]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #4
	bl	_strlcat
	ldr	w0, [x19, #8]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #4
	bl	_strlcat
Lloh17:
	adrp	x1, _ati_remote2_attr_group@GOTPAGE
Lloh18:
	ldr	x1, [x1, _ati_remote2_attr_group@GOTPAGEOFF]
	mov	x0, x21
	bl	_sysfs_create_group
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.8:
	mov	x0, x19
	bl	_ati_remote2_input_init
	mov	x22, x0
	cbz	w0, LBB0_14
; %bb.9:
Lloh19:
	adrp	x1, _ati_remote2_attr_group@GOTPAGE
Lloh20:
	ldr	x1, [x1, _ati_remote2_attr_group@GOTPAGEOFF]
	mov	x0, x21
	bl	_sysfs_remove_group
LBB0_10:
	mov	x0, x19
	bl	_ati_remote2_urb_cleanup
	ldr	x8, [x19]
	ldr	x1, [x8, #8]
Lloh21:
	adrp	x0, _ati_remote2_driver@GOTPAGE
Lloh22:
	ldr	x0, [x0, _ati_remote2_driver@GOTPAGEOFF]
	bl	_usb_driver_release_interface
LBB0_11:
	mov	x0, x19
	bl	_kfree
LBB0_12:
	mov	x0, x22
	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_13:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_14:
	mov	x0, x20
	mov	x1, x19
	bl	_usb_set_intfdata
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ati_remote2_driver,4,2         ; @ati_remote2_driver
	.comm	_channel_mask,4,2               ; @channel_mask
	.comm	_mode_mask,4,2                  ; @mode_mask
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/input0"

l_.str.1:                               ; @.str.1
	.asciz	"ATI Remote Wonder II"

	.comm	_ati_remote2_attr_group,4,2     ; @ati_remote2_attr_group
	.no_dead_strip	_ati_remote2_probe
.subsections_via_symbols
