	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __amd_mp2_process_event
___amd_mp2_process_event:               ## @__amd_mp2_process_event
	.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	32(%rdi), %r15
	movl	20(%rdi), %eax
	movq	_command_success@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.3:
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_19
## %bb.4:
	movl	16(%rbx), %r14d
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_11:
	movq	_i2c_writecomplete_event@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_12
## %bb.22:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_amd_mp2_pci_check_rw_event     ## TAILCALL
LBB0_1:
	movq	_command_failed@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_19
## %bb.2:
	movq	%r15, %rdi
	callq	_ndev_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_14:
	movq	_i2c_busenable_complete@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_18
## %bb.15:
	movq	_i2c_busenable_failed@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_19
## %bb.16:
	movq	%r15, %rdi
	callq	_ndev_dev
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_10
LBB0_17:
	movq	_i2c_busdisable_complete@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_20
LBB0_18:
	movl	$1, 4(%rbx)
	jmp	LBB0_19
LBB0_5:
	movq	_i2c_readcomplete_event@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_8
## %bb.6:
	movl	24(%rbx), %r14d
	movq	%rbx, %rdi
	callq	_amd_mp2_pci_check_rw_event
	cmpl	$32, %r14d
	jg	LBB0_19
## %bb.7:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movq	_AMD_C2P_MSG2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%r14d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memcpy_fromio                  ## TAILCALL
LBB0_12:
	movq	_i2c_writefail_event@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_19
## %bb.13:
	movq	%r15, %rdi
	callq	_ndev_dev
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
LBB0_20:
	movq	_i2c_busdisable_failed@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_19
## %bb.21:
	movq	%r15, %rdi
	callq	_ndev_dev
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_10
LBB0_8:
	movq	_i2c_readfail_event@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_9
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, %rdi
	callq	_ndev_dev
	leaq	L_.str.1(%rip), %rsi
LBB0_10:
	movl	%eax, %edi
	movl	%r14d, %edx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_11
	.long	L0_0_set_5
	.long	L0_0_set_14
	.long	L0_0_set_17
	.end_data_region
                                        ## -- End function
	.comm	_command_success,4,2            ## @command_success
	.comm	_command_failed,4,2             ## @command_failed
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid response to i2c command!\n"

	.comm	_i2c_readcomplete_event,4,2     ## @i2c_readcomplete_event
	.comm	_AMD_C2P_MSG2,8,3               ## @AMD_C2P_MSG2
	.comm	_i2c_readfail_event,4,2         ## @i2c_readfail_event
L_.str.1:                               ## @.str.1
	.asciz	"invalid i2c status after read (%d)!\n"

	.comm	_i2c_writecomplete_event,4,2    ## @i2c_writecomplete_event
	.comm	_i2c_writefail_event,4,2        ## @i2c_writefail_event
L_.str.2:                               ## @.str.2
	.asciz	"invalid i2c status after write (%d)!\n"

	.comm	_i2c_busenable_complete,4,2     ## @i2c_busenable_complete
	.comm	_i2c_busenable_failed,4,2       ## @i2c_busenable_failed
L_.str.3:                               ## @.str.3
	.asciz	"invalid i2c status after bus enable (%d)!\n"

	.comm	_i2c_busdisable_complete,4,2    ## @i2c_busdisable_complete
	.comm	_i2c_busdisable_failed,4,2      ## @i2c_busdisable_failed
L_.str.4:                               ## @.str.4
	.asciz	"invalid i2c status after bus disable (%d)!\n"

	.no_dead_strip	___amd_mp2_process_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __amd_mp2_process_event
___amd_mp2_process_event:               ; @__amd_mp2_process_event
	.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
	ldr	x19, [x0, #32]
	ldr	w8, [x0, #20]
Lloh0:
	adrp	x9, _command_success@GOTPAGE
Lloh1:
	ldr	x9, [x9, _command_success@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_22
; %bb.2:
	ldr	w21, [x20, #16]
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
Lloh5:
	adrp	x8, _i2c_writecomplete_event@GOTPAGE
Lloh6:
	ldr	x8, [x8, _i2c_writecomplete_event@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_15
; %bb.4:
	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
	b	_amd_mp2_pci_check_rw_event
LBB0_5:
Lloh8:
	adrp	x9, _command_failed@GOTPAGE
Lloh9:
	ldr	x9, [x9, _command_failed@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_22
; %bb.6:
	mov	x0, x19
	bl	_ndev_dev
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	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
	b	_dev_err
LBB0_7:
Lloh13:
	adrp	x8, _i2c_busenable_complete@GOTPAGE
Lloh14:
	ldr	x8, [x8, _i2c_busenable_complete@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w21, w8
	b.eq	LBB0_11
; %bb.8:
Lloh16:
	adrp	x8, _i2c_busenable_failed@GOTPAGE
Lloh17:
	ldr	x8, [x8, _i2c_busenable_failed@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w21, w8
	b.eq	LBB0_22
; %bb.9:
	mov	x0, x19
	bl	_ndev_dev
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_21
LBB0_10:
Lloh21:
	adrp	x8, _i2c_busdisable_complete@GOTPAGE
Lloh22:
	ldr	x8, [x8, _i2c_busdisable_complete@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_17
LBB0_11:
	mov	w8, #1
	str	w8, [x20, #4]
	b	LBB0_22
LBB0_12:
Lloh24:
	adrp	x8, _i2c_readcomplete_event@GOTPAGE
Lloh25:
	ldr	x8, [x8, _i2c_readcomplete_event@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_19
; %bb.13:
	ldr	w21, [x20, #24]
	mov	x0, x20
	bl	_amd_mp2_pci_check_rw_event
	cmp	w21, #32
	b.gt	LBB0_22
; %bb.14:
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
Lloh27:
	adrp	x8, _AMD_C2P_MSG2@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AMD_C2P_MSG2@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh29:
	ldr	x8, [x8]
	add	x1, x8, x9
	mov	x2, x21
	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
	b	_memcpy_fromio
LBB0_15:
Lloh30:
	adrp	x8, _i2c_writefail_event@GOTPAGE
Lloh31:
	ldr	x8, [x8, _i2c_writefail_event@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	cmp	w21, w8
	b.eq	LBB0_22
; %bb.16:
	mov	x0, x19
	bl	_ndev_dev
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp]
Lloh33:
	adrp	x1, l_.str.2@PAGE
Lloh34:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_21
LBB0_17:
Lloh35:
	adrp	x8, _i2c_busdisable_failed@GOTPAGE
Lloh36:
	ldr	x8, [x8, _i2c_busdisable_failed@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	cmp	w21, w8
	b.eq	LBB0_22
; %bb.18:
	mov	x0, x19
	bl	_ndev_dev
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp]
Lloh38:
	adrp	x1, l_.str.4@PAGE
Lloh39:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_21
LBB0_19:
Lloh40:
	adrp	x8, _i2c_readfail_event@GOTPAGE
Lloh41:
	ldr	x8, [x8, _i2c_readfail_event@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	cmp	w21, w8
	b.eq	LBB0_22
; %bb.20:
	mov	x0, x19
	bl	_ndev_dev
	str	x21, [sp]
Lloh43:
	adrp	x1, l_.str.1@PAGE
Lloh44:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_21:
	bl	_dev_err
LBB0_22:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_12-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_10-LBB0_3)>>2
                                        ; -- End function
	.comm	_command_success,4,2            ; @command_success
	.comm	_command_failed,4,2             ; @command_failed
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid response to i2c command!\n"

	.comm	_i2c_readcomplete_event,4,2     ; @i2c_readcomplete_event
	.comm	_AMD_C2P_MSG2,8,3               ; @AMD_C2P_MSG2
	.comm	_i2c_readfail_event,4,2         ; @i2c_readfail_event
l_.str.1:                               ; @.str.1
	.asciz	"invalid i2c status after read (%d)!\n"

	.comm	_i2c_writecomplete_event,4,2    ; @i2c_writecomplete_event
	.comm	_i2c_writefail_event,4,2        ; @i2c_writefail_event
l_.str.2:                               ; @.str.2
	.asciz	"invalid i2c status after write (%d)!\n"

	.comm	_i2c_busenable_complete,4,2     ; @i2c_busenable_complete
	.comm	_i2c_busenable_failed,4,2       ; @i2c_busenable_failed
l_.str.3:                               ; @.str.3
	.asciz	"invalid i2c status after bus enable (%d)!\n"

	.comm	_i2c_busdisable_complete,4,2    ; @i2c_busdisable_complete
	.comm	_i2c_busdisable_failed,4,2      ; @i2c_busdisable_failed
l_.str.4:                               ; @.str.4
	.asciz	"invalid i2c status after bus disable (%d)!\n"

	.no_dead_strip	___amd_mp2_process_event
.subsections_via_symbols
