	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DSL_BSP_EventCBRegister        ## -- Begin function DSL_BSP_EventCBRegister
	.p2align	4, 0x90
_DSL_BSP_EventCBRegister:               ## @DSL_BSP_EventCBRegister
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.3:
	movq	(%rdi), %rsi
	movq	_DSL_BSP_CB_LAST@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	ja	LBB0_5
## %bb.4:
	movq	_DSL_BSP_CB_FIRST@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jb	LBB0_5
## %bb.6:
	movq	_dsl_bsp_event_callback@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rsi,%rsi,2), %rcx
	cmpq	$0, 16(%rax,%rcx,8)
	je	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_IFX_MEI_EMSG
	movl	$-1, %ebx
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_IFX_MEI_EMSG
	jmp	LBB0_2
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_IFX_MEI_EMSG
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	leaq	(%rax,%rcx,8), %rdx
	addq	$16, %rdx
	movq	16(%rdi), %rbx
	movq	%rbx, (%rdx)
	movq	%rsi, (%rax,%rcx,8)
	movl	8(%rdi), %edx
	movl	%edx, 8(%rax,%rcx,8)
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid parameter!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DSL_BSP_CB_LAST,8,3            ## @DSL_BSP_CB_LAST
	.comm	_DSL_BSP_CB_FIRST,8,3           ## @DSL_BSP_CB_FIRST
L_.str.1:                               ## @.str.1
	.asciz	"Invalid Event %d\n"

	.comm	_dsl_bsp_event_callback,8,3     ## @dsl_bsp_event_callback
L_.str.2:                               ## @.str.2
	.asciz	"Event %d already has a callback function registered!\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DSL_BSP_EventCBRegister        ; -- Begin function DSL_BSP_EventCBRegister
	.p2align	2
_DSL_BSP_EventCBRegister:               ; @DSL_BSP_EventCBRegister
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x9, [x0]
Lloh0:
	adrp	x8, _DSL_BSP_CB_LAST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DSL_BSP_CB_LAST@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x10, _DSL_BSP_CB_FIRST@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DSL_BSP_CB_FIRST@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x8
	ccmp	x9, x10, #0, ls
	b.hs	LBB0_5
; %bb.2:
	str	x9, [sp]
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
LBB0_4:
	bl	_IFX_MEI_EMSG
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w8, w8
	b	LBB0_8
LBB0_5:
Lloh13:
	adrp	x8, _dsl_bsp_event_callback@GOTPAGE
Lloh14:
	ldr	x8, [x8, _dsl_bsp_event_callback@GOTPAGEOFF]
Lloh15:
	ldr	x10, [x8]
	mov	w8, #24
	madd	x11, x9, x8, x10
	ldr	x8, [x11, #16]!
	cbz	x8, LBB0_7
; %bb.6:
	str	x9, [sp]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_IFX_MEI_EMSG
	mov	w8, #-1
	b	LBB0_8
LBB0_7:
	ldr	x12, [x0, #16]
	str	x12, [x11]
	mov	w11, #24
	madd	x10, x9, x11, x10
	str	x9, [x10]
	ldr	w9, [x0, #8]
	str	w9, [x10, #8]
LBB0_8:
	mov	x0, x8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid parameter!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DSL_BSP_CB_LAST,8,3            ; @DSL_BSP_CB_LAST
	.comm	_DSL_BSP_CB_FIRST,8,3           ; @DSL_BSP_CB_FIRST
l_.str.1:                               ; @.str.1
	.asciz	"Invalid Event %d\n"

	.comm	_dsl_bsp_event_callback,8,3     ; @dsl_bsp_event_callback
l_.str.2:                               ; @.str.2
	.asciz	"Event %d already has a callback function registered!\n"

.subsections_via_symbols
