	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smi_event_handler
_smi_event_handler:                     ## @smi_event_handler
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	leaq	32(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_SI_SM_CALL_WITHOUT_DELAY@GOTPCREL(%rip), %r15
	movq	_SI_SM_TRANSACTION_COMPLETE@GOTPCREL(%rip), %r14
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_attentions@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_smi_inc_stat
	movq	_IPMI_NETFN_APP_REQUEST@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	shlb	$2, %al
	movb	%al, -42(%rbp)
	movq	_IPMI_GET_MSG_FLAGS_CMD@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, -41(%rbp)
	movq	24(%r13), %rax
	movl	16(%r13), %edi
	leaq	-42(%rbp), %rsi
	movl	$2, %edx
	callq	*8(%rax)
	movq	_SI_GETTING_FLAGS@GOTPCREL(%rip), %rax
LBB0_18:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rax), %eax
	movl	%eax, (%r13)
	xorl	%esi, %esi
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movq	24(%r13), %rax
	movl	16(%r13), %edi
	callq	*(%rax)
	movl	%eax, %ebx
	cmpl	(%r15), %eax
	je	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	(%r14), %ebx
	jne	LBB0_6
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_complete_transactions@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_smi_inc_stat
	movq	%r13, %rdi
	callq	_handle_transaction_done
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	24(%r13), %rax
	movl	16(%r13), %edi
	xorl	%esi, %esi
	callq	*(%rax)
	cmpl	(%r15), %eax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %ebx
	cmpl	(%r14), %ebx
	je	LBB0_5
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_SI_SM_HOSED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_hosed_count@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_smi_inc_stat
	movq	_SI_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	cmpq	$0, 8(%r13)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_IPMI_ERR_UNSPECIFIED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_return_hosed_msg
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	24(%r13), %rax
	movl	16(%r13), %edi
	xorl	%esi, %esi
	callq	*(%rax)
	movl	%eax, %ebx
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	36(%r13), %edi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_SI_SM_ATTN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_12
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_SI_SM_IDLE@GOTPCREL(%rip), %r12
	cmpl	(%r12), %ebx
	jne	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_idles@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_smi_inc_stat
	movq	%r13, %rdi
	callq	_start_next_msg
	xorl	%esi, %esi
	cmpl	(%r12), %eax
	jne	LBB0_1
## %bb.15:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %ebx
	movq	%r14, %r12
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	je	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	xorl	%eax, %eax
	callq	_ipmi_alloc_smi_msg
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %r14
	movq	_IPMI_NETFN_APP_REQUEST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$2, %ecx
	movq	(%rax), %rsi
	movl	%ecx, (%rsi)
	movq	_IPMI_READ_EVENT_MSG_BUFFER_CMD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rsi)
	movl	$2, 8(%rax)
	movq	24(%r13), %rax
	movl	16(%r13), %edi
	movl	$2, %edx
	callq	*8(%rax)
	movq	_SI_GETTING_EVENTS@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_19:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SI_SM_CALL_WITHOUT_DELAY,4,2   ## @SI_SM_CALL_WITHOUT_DELAY
	.comm	_SI_SM_TRANSACTION_COMPLETE,4,2 ## @SI_SM_TRANSACTION_COMPLETE
	.comm	_complete_transactions,4,2      ## @complete_transactions
	.comm	_SI_SM_HOSED,4,2                ## @SI_SM_HOSED
	.comm	_hosed_count,4,2                ## @hosed_count
	.comm	_SI_NORMAL,4,2                  ## @SI_NORMAL
	.comm	_IPMI_ERR_UNSPECIFIED,4,2       ## @IPMI_ERR_UNSPECIFIED
	.comm	_SI_SM_ATTN,4,2                 ## @SI_SM_ATTN
	.comm	_attentions,4,2                 ## @attentions
	.comm	_IPMI_NETFN_APP_REQUEST,4,2     ## @IPMI_NETFN_APP_REQUEST
	.comm	_IPMI_GET_MSG_FLAGS_CMD,1,0     ## @IPMI_GET_MSG_FLAGS_CMD
	.comm	_SI_GETTING_FLAGS,4,2           ## @SI_GETTING_FLAGS
	.comm	_SI_SM_IDLE,4,2                 ## @SI_SM_IDLE
	.comm	_idles,4,2                      ## @idles
	.comm	_IPMI_READ_EVENT_MSG_BUFFER_CMD,4,2 ## @IPMI_READ_EVENT_MSG_BUFFER_CMD
	.comm	_SI_GETTING_EVENTS,4,2          ## @SI_GETTING_EVENTS
	.no_dead_strip	_smi_event_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smi_event_handler
_smi_event_handler:                     ; @smi_event_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x22, _SI_SM_CALL_WITHOUT_DELAY@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SI_SM_CALL_WITHOUT_DELAY@GOTPAGEOFF]
Lloh2:
	adrp	x23, _SI_SM_TRANSACTION_COMPLETE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SI_SM_TRANSACTION_COMPLETE@GOTPAGEOFF]
Lloh4:
	adrp	x25, _SI_SM_ATTN@GOTPAGE
Lloh5:
	ldr	x25, [x25, _SI_SM_ATTN@GOTPAGEOFF]
	add	x20, x0, #32
Lloh6:
	adrp	x27, _IPMI_NETFN_APP_REQUEST@GOTPAGE
Lloh7:
	ldr	x27, [x27, _IPMI_NETFN_APP_REQUEST@GOTPAGEOFF]
Lloh8:
	adrp	x24, _SI_GETTING_FLAGS@GOTPAGE
Lloh9:
	ldr	x24, [x24, _SI_GETTING_FLAGS@GOTPAGEOFF]
Lloh10:
	adrp	x26, _SI_SM_IDLE@GOTPAGE
Lloh11:
	ldr	x26, [x26, _SI_SM_IDLE@GOTPAGEOFF]
Lloh12:
	adrp	x28, _SI_SM_HOSED@GOTPAGE
Lloh13:
	ldr	x28, [x28, _SI_SM_HOSED@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh14:
	adrp	x8, _attentions@GOTPAGE
Lloh15:
	ldr	x8, [x8, _attentions@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smi_inc_stat
	ldrb	w8, [x27]
	lsl	w8, w8, #2
	strb	w8, [sp, #14]
Lloh17:
	adrp	x8, _IPMI_GET_MSG_FLAGS_CMD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IPMI_GET_MSG_FLAGS_CMD@GOTPAGEOFF]
	ldrb	w8, [x8]
	strb	w8, [sp, #15]
	ldr	x8, [x19, #24]
	ldr	x8, [x8, #8]
	ldr	w0, [x19, #16]
	add	x1, sp, #14
	mov	w2, #2
	blr	x8
	mov	w1, #0
	ldr	w8, [x24]
	str	w8, [x19]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	w0, [x19, #16]
	blr	x8
	mov	x21, x0
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_5
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	w0, [x19, #16]
	mov	w1, #0
	blr	x8
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_3
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x21, x0
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x23]
	cmp	w21, w8
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh19:
	adrp	x8, _complete_transactions@GOTPAGE
Lloh20:
	ldr	x8, [x8, _complete_transactions@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smi_inc_stat
	mov	x0, x19
	bl	_handle_transaction_done
	b	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x28]
	cmp	w21, w8
	b.ne	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh22:
	adrp	x8, _hosed_count@GOTPAGE
Lloh23:
	ldr	x8, [x8, _hosed_count@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smi_inc_stat
Lloh25:
	adrp	x8, _SI_NORMAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SI_NORMAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh28:
	adrp	x8, _IPMI_ERR_UNSPECIFIED@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IPMI_ERR_UNSPECIFIED@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_return_hosed_msg
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	w0, [x19, #16]
	mov	w1, #0
	blr	x8
	mov	x21, x0
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #36]
	bl	_likely
	cbz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x25]
	cmp	w21, w8
	b.eq	LBB0_1
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x26]
	cmp	w21, w8
	b.ne	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
Lloh31:
	adrp	x8, _idles@GOTPAGE
Lloh32:
	ldr	x8, [x8, _idles@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smi_inc_stat
	mov	x0, x19
	bl	_start_next_msg
	mov	w1, #0
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.15:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x21, x0
	mov	x0, x20
	bl	_atomic_read
	cbz	x0, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	w1, #0
	bl	_atomic_set
	bl	_ipmi_alloc_smi_msg
	str	x0, [x19, #8]
	cbz	x0, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x27]
	lsl	w8, w8, #2
	ldr	x1, [x0]
	str	w8, [x1]
Lloh34:
	adrp	x8, _IPMI_READ_EVENT_MSG_BUFFER_CMD@GOTPAGE
Lloh35:
	ldr	x8, [x8, _IPMI_READ_EVENT_MSG_BUFFER_CMD@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	str	w8, [x1, #4]
	mov	w8, #2
	str	w8, [x0, #8]
	ldr	x8, [x19, #24]
	ldr	x8, [x8, #8]
	ldr	w0, [x19, #16]
	mov	w2, #2
	blr	x8
	mov	w1, #0
Lloh37:
	adrp	x8, _SI_GETTING_EVENTS@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SI_GETTING_EVENTS@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_2
LBB0_18:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_SI_SM_CALL_WITHOUT_DELAY,4,2   ; @SI_SM_CALL_WITHOUT_DELAY
	.comm	_SI_SM_TRANSACTION_COMPLETE,4,2 ; @SI_SM_TRANSACTION_COMPLETE
	.comm	_complete_transactions,4,2      ; @complete_transactions
	.comm	_SI_SM_HOSED,4,2                ; @SI_SM_HOSED
	.comm	_hosed_count,4,2                ; @hosed_count
	.comm	_SI_NORMAL,4,2                  ; @SI_NORMAL
	.comm	_IPMI_ERR_UNSPECIFIED,4,2       ; @IPMI_ERR_UNSPECIFIED
	.comm	_SI_SM_ATTN,4,2                 ; @SI_SM_ATTN
	.comm	_attentions,4,2                 ; @attentions
	.comm	_IPMI_NETFN_APP_REQUEST,4,2     ; @IPMI_NETFN_APP_REQUEST
	.comm	_IPMI_GET_MSG_FLAGS_CMD,1,0     ; @IPMI_GET_MSG_FLAGS_CMD
	.comm	_SI_GETTING_FLAGS,4,2           ; @SI_GETTING_FLAGS
	.comm	_SI_SM_IDLE,4,2                 ; @SI_SM_IDLE
	.comm	_idles,4,2                      ; @idles
	.comm	_IPMI_READ_EVENT_MSG_BUFFER_CMD,4,2 ; @IPMI_READ_EVENT_MSG_BUFFER_CMD
	.comm	_SI_GETTING_EVENTS,4,2          ; @SI_GETTING_EVENTS
	.no_dead_strip	_smi_event_handler
.subsections_via_symbols
