	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rc_register_device             ## -- Begin function rc_register_device
	.p2align	4, 0x90
_rc_register_device:                    ## @rc_register_device
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	_RC_DEV_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_rc_ida@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	callq	_ida_simple_get
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_35
## %bb.3:
	movl	%r14d, (%rbx)
	leaq	48(%rbx), %r15
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_dev_set_name
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_dev_set_drvdata
	movq	8(%rbx), %rax
	movq	72(%rbx), %rdx
	movq	%rdx, 56(%rbx)
	movq	_RC_DRIVER_SCANCODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	cmpl	$0, 96(%rbx)
	je	LBB0_5
LBB0_6:
	movq	_RC_DRIVER_IR_RAW_TX@GOTPCREL(%rip), %rsi
	xorl	%ecx, %ecx
	cmpq	(%rsi), %rax
	je	LBB0_9
## %bb.7:
	movq	_rc_dev_rw_protocol_attr_grp@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_35
LBB0_5:
	movq	_rc_dev_ro_protocol_attr_grp@GOTPCREL(%rip), %rcx
LBB0_8:
	movq	%rcx, (%rdx)
	movl	$1, %ecx
LBB0_9:
	cmpq	$0, 88(%rbx)
	je	LBB0_11
## %bb.10:
	movq	72(%rbx), %rdx
	movl	%ecx, %esi
	incl	%ecx
	movq	_rc_dev_filter_attr_grp@GOTPCREL(%rip), %rdi
	movq	%rdi, (%rdx,%rsi,8)
LBB0_11:
	cmpq	$0, 80(%rbx)
	je	LBB0_13
## %bb.12:
	movq	72(%rbx), %rdx
	movl	%ecx, %esi
	incl	%ecx
	movq	_rc_dev_wakeup_filter_attr_grp@GOTPCREL(%rip), %rdi
	movq	%rdi, (%rdx,%rsi,8)
LBB0_13:
	movq	72(%rbx), %rdx
	movl	%ecx, %ecx
	movq	$0, (%rdx,%rcx,8)
	movq	_RC_DRIVER_IR_RAW@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.14:
	movq	%rbx, %rdi
	callq	_ir_raw_event_prepare
	testl	%eax, %eax
	js	LBB0_15
## %bb.16:
	movq	8(%rbx), %rax
LBB0_17:
	movq	_RC_DRIVER_IR_RAW_TX@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	je	LBB0_19
## %bb.18:
	movq	%rbx, %rdi
	callq	_rc_prepare_rx_device
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_33
LBB0_19:
	movq	%r15, %rdi
	callq	_device_add
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_32
## %bb.20:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_kobject_get_path
	movq	%rax, %r12
	movq	64(%rbx), %rax
	testq	%rax, %rax
	leaq	L_.str.2(%rip), %rdx
	cmovneq	%rax, %rdx
	testq	%r12, %r12
	leaq	L_.str.3(%rip), %rcx
	cmovneq	%r12, %rcx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_info
	movq	%r12, %rdi
	callq	_kfree
	movl	$1, 16(%rbx)
	movq	8(%rbx), %rax
	cmpq	(%r13), %rax
	je	LBB0_22
## %bb.21:
	movq	%rbx, %rdi
	callq	_rc_setup_rx_device
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_31
LBB0_22:
	movq	24(%rbx), %rax
	movq	_RC_PROTO_BIT_CEC@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	je	LBB0_25
## %bb.23:
	movq	%rbx, %rdi
	callq	_ir_lirc_register
	testl	%eax, %eax
	js	LBB0_24
LBB0_25:
	movq	8(%rbx), %rax
	movq	_RC_DRIVER_IR_RAW@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_27
## %bb.26:
	movq	%rbx, %rdi
	callq	_ir_raw_event_register
	testl	%eax, %eax
	js	LBB0_28
LBB0_27:
	movl	(%rbx), %edx
	movq	32(%rbx), %rax
	testq	%rax, %rax
	leaq	L_.str.5(%rip), %rcx
	cmovneq	%rax, %rcx
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	xorl	%r14d, %r14d
	jmp	LBB0_35
LBB0_15:
	movl	%eax, %r12d
	jmp	LBB0_34
LBB0_24:
	movl	%eax, %r12d
	jmp	LBB0_30
LBB0_28:
	movl	%eax, %r12d
	movq	24(%rbx), %rax
	cmpq	(%r13), %rax
	je	LBB0_30
## %bb.29:
	movq	%rbx, %rdi
	callq	_ir_lirc_unregister
LBB0_30:
	movq	%rbx, %rdi
	callq	_rc_free_rx_device
LBB0_31:
	movq	%r15, %rdi
	callq	_device_del
LBB0_32:
	leaq	40(%rbx), %rdi
	callq	_ir_free_table
LBB0_33:
	movq	%rbx, %rdi
	callq	_ir_raw_event_free
LBB0_34:
	movq	_rc_ida@GOTPCREL(%rip), %rdi
	movl	%r14d, %esi
	callq	_ida_simple_remove
	movl	%r12d, %r14d
LBB0_35:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_rc_ida,4,2                     ## @rc_ida
	.comm	_RC_DEV_MAX,4,2                 ## @RC_DEV_MAX
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rc%u"

	.comm	_RC_DRIVER_SCANCODE,8,3         ## @RC_DRIVER_SCANCODE
	.comm	_rc_dev_ro_protocol_attr_grp,4,2 ## @rc_dev_ro_protocol_attr_grp
	.comm	_RC_DRIVER_IR_RAW_TX,8,3        ## @RC_DRIVER_IR_RAW_TX
	.comm	_rc_dev_rw_protocol_attr_grp,4,2 ## @rc_dev_rw_protocol_attr_grp
	.comm	_rc_dev_filter_attr_grp,4,2     ## @rc_dev_filter_attr_grp
	.comm	_rc_dev_wakeup_filter_attr_grp,4,2 ## @rc_dev_wakeup_filter_attr_grp
	.comm	_RC_DRIVER_IR_RAW,8,3           ## @RC_DRIVER_IR_RAW
L_.str.1:                               ## @.str.1
	.asciz	"%s as %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unspecified device"

L_.str.3:                               ## @.str.3
	.asciz	"N/A"

	.comm	_RC_PROTO_BIT_CEC,8,3           ## @RC_PROTO_BIT_CEC
L_.str.4:                               ## @.str.4
	.asciz	"Registered rc%u (driver: %s)\n"

L_.str.5:                               ## @.str.5
	.asciz	"unknown"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rc_register_device             ; -- Begin function rc_register_device
	.p2align	2
_rc_register_device:                    ; @rc_register_device
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _RC_DEV_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RC_DEV_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x23]
Lloh5:
	adrp	x0, _rc_ida@GOTPAGE
Lloh6:
	ldr	x0, [x0, _rc_ida@GOTPAGEOFF]
	mov	w1, #0
	bl	_ida_simple_get
	mov	x19, x0
	tbnz	w0, #31, LBB0_35
; %bb.2:
	str	w19, [x20]
	add	x21, x20, #48
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	bl	_dev_set_name
	mov	x0, x21
	mov	x1, x20
	bl	_dev_set_drvdata
	ldr	x9, [x20, #72]
	str	x9, [x20, #56]
	ldr	x8, [x20, #8]
Lloh9:
	adrp	x10, _RC_DRIVER_SCANCODE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _RC_DRIVER_SCANCODE@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
Lloh12:
	adrp	x24, _RC_DRIVER_IR_RAW_TX@GOTPAGE
Lloh13:
	ldr	x24, [x24, _RC_DRIVER_IR_RAW_TX@GOTPAGEOFF]
	cmp	x8, x10
	b.ne	LBB0_4
; %bb.3:
	ldr	w10, [x20, #96]
	cbz	w10, LBB0_8
LBB0_4:
	ldr	x10, [x24]
	cmp	x8, x10
	b.ne	LBB0_7
; %bb.5:
	mov	w9, #0
	ldr	x10, [x20, #88]
	cbnz	x10, LBB0_10
	b	LBB0_11
LBB0_6:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_35
LBB0_7:
Lloh17:
	adrp	x10, _rc_dev_rw_protocol_attr_grp@GOTPAGE
Lloh18:
	ldr	x10, [x10, _rc_dev_rw_protocol_attr_grp@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh19:
	adrp	x10, _rc_dev_ro_protocol_attr_grp@GOTPAGE
Lloh20:
	ldr	x10, [x10, _rc_dev_ro_protocol_attr_grp@GOTPAGEOFF]
LBB0_9:
	str	x10, [x9]
	mov	w9, #1
	ldr	x10, [x20, #88]
	cbz	x10, LBB0_11
LBB0_10:
	ldr	x10, [x20, #72]
Lloh21:
	adrp	x11, _rc_dev_filter_attr_grp@GOTPAGE
Lloh22:
	ldr	x11, [x11, _rc_dev_filter_attr_grp@GOTPAGEOFF]
	str	x11, [x10, w9, uxtw #3]
	add	w9, w9, #1
LBB0_11:
	ldr	x10, [x20, #80]
	cbz	x10, LBB0_13
; %bb.12:
	ldr	x10, [x20, #72]
Lloh23:
	adrp	x11, _rc_dev_wakeup_filter_attr_grp@GOTPAGE
Lloh24:
	ldr	x11, [x11, _rc_dev_wakeup_filter_attr_grp@GOTPAGEOFF]
	str	x11, [x10, w9, uxtw #3]
	add	w9, w9, #1
LBB0_13:
	ldr	x10, [x20, #72]
	str	xzr, [x10, w9, uxtw #3]
Lloh25:
	adrp	x25, _RC_DRIVER_IR_RAW@GOTPAGE
Lloh26:
	ldr	x25, [x25, _RC_DRIVER_IR_RAW@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.14:
	mov	x0, x20
	bl	_ir_raw_event_prepare
	tbnz	w0, #31, LBB0_26
; %bb.15:
	ldr	x8, [x20, #8]
LBB0_16:
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_18
; %bb.17:
	mov	x0, x20
	bl	_rc_prepare_rx_device
	mov	x22, x0
	cbnz	w0, LBB0_33
LBB0_18:
	mov	x0, x21
	bl	_device_add
	mov	x22, x0
	cbnz	w0, LBB0_32
; %bb.19:
	ldr	w1, [x23]
	mov	x0, x21
	bl	_kobject_get_path
	mov	x22, x0
	ldr	x8, [x20, #64]
Lloh27:
	adrp	x9, l_.str.2@PAGE
Lloh28:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	x8, #0
	csel	x2, x9, x8, eq
Lloh29:
	adrp	x8, l_.str.3@PAGE
Lloh30:
	add	x8, x8, l_.str.3@PAGEOFF
	cmp	x0, #0
	csel	x3, x8, x0, eq
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_info
	mov	x0, x22
	bl	_kfree
	mov	w8, #1
	str	w8, [x20, #16]
	ldr	x8, [x20, #8]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_21
; %bb.20:
	mov	x0, x20
	bl	_rc_setup_rx_device
	mov	x22, x0
	cbnz	w0, LBB0_31
LBB0_21:
	ldr	x8, [x20, #24]
Lloh33:
	adrp	x23, _RC_PROTO_BIT_CEC@GOTPAGE
Lloh34:
	ldr	x23, [x23, _RC_PROTO_BIT_CEC@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_23
; %bb.22:
	mov	x0, x20
	bl	_ir_lirc_register
	tbnz	w0, #31, LBB0_27
LBB0_23:
	ldr	x8, [x20, #8]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_25
; %bb.24:
	mov	x0, x20
	bl	_ir_raw_event_register
	tbnz	w0, #31, LBB0_28
LBB0_25:
	ldr	w2, [x20]
	ldr	x8, [x20, #32]
Lloh35:
	adrp	x9, l_.str.5@PAGE
Lloh36:
	add	x9, x9, l_.str.5@PAGEOFF
	cmp	x8, #0
	csel	x3, x9, x8, eq
Lloh37:
	adrp	x1, l_.str.4@PAGE
Lloh38:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	mov	w19, #0
	b	LBB0_35
LBB0_26:
	mov	x22, x0
	b	LBB0_34
LBB0_27:
	mov	x22, x0
	b	LBB0_30
LBB0_28:
	mov	x22, x0
	ldr	x8, [x20, #24]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_30
; %bb.29:
	mov	x0, x20
	bl	_ir_lirc_unregister
LBB0_30:
	mov	x0, x20
	bl	_rc_free_rx_device
LBB0_31:
	mov	x0, x21
	bl	_device_del
LBB0_32:
	add	x0, x20, #40
	bl	_ir_free_table
LBB0_33:
	mov	x0, x20
	bl	_ir_raw_event_free
LBB0_34:
Lloh39:
	adrp	x0, _rc_ida@GOTPAGE
Lloh40:
	ldr	x0, [x0, _rc_ida@GOTPAGEOFF]
	mov	x1, x19
	bl	_ida_simple_remove
	mov	x19, x22
LBB0_35:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_rc_ida,4,2                     ; @rc_ida
	.comm	_RC_DEV_MAX,4,2                 ; @RC_DEV_MAX
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rc%u"

	.comm	_RC_DRIVER_SCANCODE,8,3         ; @RC_DRIVER_SCANCODE
	.comm	_rc_dev_ro_protocol_attr_grp,4,2 ; @rc_dev_ro_protocol_attr_grp
	.comm	_RC_DRIVER_IR_RAW_TX,8,3        ; @RC_DRIVER_IR_RAW_TX
	.comm	_rc_dev_rw_protocol_attr_grp,4,2 ; @rc_dev_rw_protocol_attr_grp
	.comm	_rc_dev_filter_attr_grp,4,2     ; @rc_dev_filter_attr_grp
	.comm	_rc_dev_wakeup_filter_attr_grp,4,2 ; @rc_dev_wakeup_filter_attr_grp
	.comm	_RC_DRIVER_IR_RAW,8,3           ; @RC_DRIVER_IR_RAW
l_.str.1:                               ; @.str.1
	.asciz	"%s as %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unspecified device"

l_.str.3:                               ; @.str.3
	.asciz	"N/A"

	.comm	_RC_PROTO_BIT_CEC,8,3           ; @RC_PROTO_BIT_CEC
l_.str.4:                               ; @.str.4
	.asciz	"Registered rc%u (driver: %s)\n"

l_.str.5:                               ; @.str.5
	.asciz	"unknown"

.subsections_via_symbols
