	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_core_event_listener_register ## -- Begin function mlxsw_core_event_listener_register
	.p2align	4, 0x90
_mlxsw_core_event_listener_register:    ## @mlxsw_core_event_listener_register
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rsi), %eax
	movl	%eax, -48(%rbp)
	movq	_MLXSW_PORT_DONT_CARE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_mlxsw_core_event_listener_func@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	callq	___find_event_listener_item
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EEXIST@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	movl	(%rbx), %eax
	movl	%eax, 16(%r12)
	movq	%r15, 8(%r12)
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_mlxsw_core_rx_listener_register
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_8
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_list_add_rcu
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_PORT_DONT_CARE,4,2       ## @MLXSW_PORT_DONT_CARE
	.comm	_mlxsw_core_event_listener_func,4,2 ## @mlxsw_core_event_listener_func
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_core_event_listener_register ; -- Begin function mlxsw_core_event_listener_register
	.p2align	2
_mlxsw_core_event_listener_register:    ; @mlxsw_core_event_listener_register
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _MLXSW_PORT_DONT_CARE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLXSW_PORT_DONT_CARE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	stp	w8, w9, [sp]
Lloh3:
	adrp	x8, _mlxsw_core_event_listener_func@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mlxsw_core_event_listener_func@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	bl	___find_event_listener_item
	cbz	x0, LBB0_4
; %bb.1:
Lloh6:
	adrp	x8, _EEXIST@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kmalloc
	cbz	x0, LBB0_7
; %bb.5:
	mov	x22, x0
	ldr	w8, [x21]
	str	w8, [x0, #16]
	str	x20, [x0, #8]
	mov	x1, sp
	mov	x0, x19
	mov	x2, x22
	bl	_mlxsw_core_rx_listener_register
	mov	x20, x0
	cbz	w0, LBB0_8
; %bb.6:
	mov	x0, x22
	bl	_kfree
	b	LBB0_3
LBB0_7:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_8:
	mov	x0, x22
	mov	x1, x19
	bl	_list_add_rcu
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_PORT_DONT_CARE,4,2       ; @MLXSW_PORT_DONT_CARE
	.comm	_mlxsw_core_event_listener_func,4,2 ; @mlxsw_core_event_listener_func
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
