	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_emad_init
_mlxsw_emad_init:                       ## @mlxsw_emad_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	32(%rdi), %rax
	movq	_MLXSW_BUS_F_TXRX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_8
## %bb.1:
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_alloc_workqueue
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, (%r14)
	leaq	-20(%rbp), %rdi
	movl	$4, %esi
	callq	_get_random_bytes
	leaq	20(%r14), %rdi
	callq	_atomic64_set
	leaq	16(%r14), %rdi
	callq	_INIT_LIST_HEAD
	leaq	12(%r14), %rdi
	callq	_spin_lock_init
	movq	_mlxsw_emad_rx_listener@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	movq	%r14, %rdx
	callq	_mlxsw_core_trap_register
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movq	24(%r14), %rax
	movq	%r14, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movl	%eax, %ebx
	movq	_mlxsw_emad_rx_listener@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	movq	%r14, %rdx
	callq	_mlxsw_core_trap_unregister
	movq	(%r14), %rdi
	callq	_destroy_workqueue
	jmp	LBB0_9
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_7:
	movl	$1, 8(%r14)
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_BUS_F_TXRX,4,2           ## @MLXSW_BUS_F_TXRX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mlxsw_core_emad"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_mlxsw_emad_rx_listener,4,2     ## @mlxsw_emad_rx_listener
	.no_dead_strip	_mlxsw_emad_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_emad_init
_mlxsw_emad_init:                       ; @mlxsw_emad_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	x8, [x0, #32]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _MLXSW_BUS_F_TXRX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLXSW_BUS_F_TXRX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #0
	mov	w2, #0
	bl	_alloc_workqueue
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x19
	str	x0, [x20], #20
	add	x0, sp, #12
	mov	w1, #4
	bl	_get_random_bytes
	mov	x0, x20
	bl	_atomic64_set
	add	x0, x19, #16
	bl	_INIT_LIST_HEAD
	add	x0, x19, #12
	bl	_spin_lock_init
Lloh5:
	adrp	x1, _mlxsw_emad_rx_listener@GOTPAGE
Lloh6:
	ldr	x1, [x1, _mlxsw_emad_rx_listener@GOTPAGEOFF]
	mov	x0, x19
	mov	x2, x19
	bl	_mlxsw_core_trap_register
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.3:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.4:
Lloh7:
	adrp	x1, _mlxsw_emad_rx_listener@GOTPAGE
Lloh8:
	ldr	x1, [x1, _mlxsw_emad_rx_listener@GOTPAGEOFF]
	mov	x0, x19
	mov	x2, x19
	bl	_mlxsw_core_trap_unregister
	ldr	x0, [x19]
	bl	_destroy_workqueue
	b	LBB0_8
LBB0_5:
	mov	w20, #0
	b	LBB0_8
LBB0_6:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_7:
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_BUS_F_TXRX,4,2           ; @MLXSW_BUS_F_TXRX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mlxsw_core_emad"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_mlxsw_emad_rx_listener,4,2     ; @mlxsw_emad_rx_listener
	.no_dead_strip	_mlxsw_emad_init
.subsections_via_symbols
