	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rmi_register_function          ## -- Begin function rmi_register_function
	.p2align	4, 0x90
_rmi_register_function:                 ## @rmi_register_function
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	32(%rdi), %r14
	callq	_device_initialize
	movq	%r14, %rdi
	callq	_dev_name
	movl	24(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_dev_set_name
	movq	%r14, 16(%rbx)
	movq	_rmi_function_type@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rbx)
	movq	_rmi_bus_type@GOTPCREL(%rip), %rax
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	callq	_device_add
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_dev_name
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_put_device
	jmp	LBB0_3
LBB0_2:
	movq	_RMI_DEBUG_CORE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	24(%rbx), %ecx
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rsi
	callq	_rmi_dbg
LBB0_3:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s.fn%02x"

	.comm	_rmi_function_type,4,2          ## @rmi_function_type
	.comm	_rmi_bus_type,4,2               ## @rmi_bus_type
L_.str.1:                               ## @.str.1
	.asciz	"Failed device_register function device %s\n"

	.comm	_RMI_DEBUG_CORE,4,2             ## @RMI_DEBUG_CORE
L_.str.2:                               ## @.str.2
	.asciz	"Registered F%02X.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rmi_register_function          ; -- Begin function rmi_register_function
	.p2align	2
_rmi_register_function:                 ; @rmi_register_function
	.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	x19, x0
	ldr	x20, [x0, #32]
	bl	_device_initialize
	mov	x0, x20
	bl	_dev_name
	mov	x2, x0
	ldr	w3, [x19, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_set_name
	str	x20, [x19, #16]
Lloh2:
	adrp	x8, _rmi_function_type@GOTPAGE
Lloh3:
	ldr	x8, [x8, _rmi_function_type@GOTPAGEOFF]
Lloh4:
	adrp	x9, _rmi_bus_type@GOTPAGE
Lloh5:
	ldr	x9, [x9, _rmi_bus_type@GOTPAGEOFF]
	stp	x9, x8, [x19]
	mov	x0, x19
	bl	_device_add
	mov	x21, x0
	cbz	w0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_dev_name
	mov	x2, x0
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x0, x19
	bl	_put_device
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x8, _RMI_DEBUG_CORE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RMI_DEBUG_CORE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	w3, [x19, #24]
Lloh11:
	adrp	x2, l_.str.2@PAGE
Lloh12:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_rmi_dbg
LBB0_3:
	mov	x0, x21
	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
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s.fn%02x"

	.comm	_rmi_function_type,4,2          ; @rmi_function_type
	.comm	_rmi_bus_type,4,2               ; @rmi_bus_type
l_.str.1:                               ; @.str.1
	.asciz	"Failed device_register function device %s\n"

	.comm	_RMI_DEBUG_CORE,4,2             ; @RMI_DEBUG_CORE
l_.str.2:                               ; @.str.2
	.asciz	"Registered F%02X.\n"

.subsections_via_symbols
