	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isst_if_mbox_cmd
_isst_if_mbox_cmd:                      ## @isst_if_mbox_cmd
	.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	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	_OS_MAILBOX_RETRY_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_PUNIT_MAILBOX_INTERFACE@GOTPCREL(%rip), %r12
	leaq	-44(%rbp), %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_pci_read_config_dword
	testl	%eax, %eax
	jne	LBB0_18
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-44(%rbp), %r13d
	movq	_PUNIT_MAILBOX_BUSY_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT_ULL
	testl	%r13d, %eax
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	decl	%r14d
	jne	LBB0_1
## %bb.4:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	negl	%eax
	jmp	LBB0_18
LBB0_6:
	movq	_PUNIT_MAILBOX_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_pci_write_config_dword
	testl	%eax, %eax
	jne	LBB0_18
## %bb.7:
	movq	_PUNIT_MAILBOX_BUSY_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT_ULL
	movl	%eax, %r14d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %ebx
	movl	$13, %edi
	xorl	%esi, %esi
	callq	_GENMASK_ULL
	andl	%eax, %ebx
	shll	$16, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edx
	shll	$8, %edx
	orl	%ebx, %edx
	orl	%r14d, %edx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	orl	12(%rax), %edx
	movl	%edx, -44(%rbp)
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_pci_write_config_dword
	testl	%eax, %eax
	jne	LBB0_18
## %bb.8:
	movq	_OS_MAILBOX_RETRY_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	-44(%rbp), %r14
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_pci_read_config_dword
	testl	%eax, %eax
	jne	LBB0_18
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	-44(%rbp), %r13d
	movq	_PUNIT_MAILBOX_BUSY_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT_ULL
	testl	%r13d, %eax
	je	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	decl	%ebx
	jne	LBB0_9
## %bb.12:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_14:
	cmpb	$0, -44(%rbp)
	je	LBB0_16
## %bb.15:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
LBB0_13:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_PUNIT_MAILBOX_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_dword
	testl	%eax, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_18
## %bb.17:
	movl	-44(%rbp), %eax
	movl	%eax, 16(%rcx)
	xorl	%eax, %eax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_OS_MAILBOX_RETRY_COUNT,4,2     ## @OS_MAILBOX_RETRY_COUNT
	.comm	_PUNIT_MAILBOX_INTERFACE,4,2    ## @PUNIT_MAILBOX_INTERFACE
	.comm	_PUNIT_MAILBOX_BUSY_BIT,4,2     ## @PUNIT_MAILBOX_BUSY_BIT
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_PUNIT_MAILBOX_DATA,4,2         ## @PUNIT_MAILBOX_DATA
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_isst_if_mbox_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isst_if_mbox_cmd
_isst_if_mbox_cmd:                      ; @isst_if_mbox_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x24, _OS_MAILBOX_RETRY_COUNT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _OS_MAILBOX_RETRY_COUNT@GOTPAGEOFF]
	ldr	w21, [x24]
Lloh2:
	adrp	x22, _PUNIT_MAILBOX_INTERFACE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _PUNIT_MAILBOX_INTERFACE@GOTPAGEOFF]
Lloh4:
	adrp	x23, _PUNIT_MAILBOX_BUSY_BIT@GOTPAGE
Lloh5:
	ldr	x23, [x23, _PUNIT_MAILBOX_BUSY_BIT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_dword
	cbnz	w0, LBB0_8
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w25, [sp, #12]
	ldr	w0, [x23]
	bl	_BIT_ULL
	tst	w0, w25
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	subs	w21, w21, #1
	b.ne	LBB0_1
; %bb.4:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cbz	w8, LBB0_6
LBB0_5:
	neg	w0, w8
	b	LBB0_8
LBB0_6:
Lloh9:
	adrp	x25, _PUNIT_MAILBOX_DATA@GOTPAGE
Lloh10:
	ldr	x25, [x25, _PUNIT_MAILBOX_DATA@GOTPAGEOFF]
	ldr	w1, [x25]
	ldr	w2, [x19]
	mov	x0, x20
	bl	_pci_write_config_dword
	cbnz	w0, LBB0_8
; %bb.7:
	ldr	w0, [x23]
	bl	_BIT_ULL
	mov	x21, x0
	ldr	w26, [x19, #4]
	mov	w0, #13
	mov	w1, #0
	bl	_GENMASK_ULL
	and	w8, w0, w26
	orr	w8, w21, w8, lsl #16
	ldp	w9, w10, [x19, #8]
	orr	w8, w8, w9, lsl #8
	orr	w2, w8, w10
	str	w2, [sp, #12]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_pci_write_config_dword
	cbz	w0, LBB0_9
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_9:
	ldr	w21, [x24]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_dword
	cbnz	w0, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w24, [sp, #12]
	ldr	w0, [x23]
	bl	_BIT_ULL
	tst	w0, w24
	b.eq	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	subs	w21, w21, #1
	b.ne	LBB0_10
; %bb.13:
Lloh11:
	adrp	x8, _EBUSY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
	ldrb	w8, [sp, #12]
	cbz	w8, LBB0_17
; %bb.15:
Lloh13:
	adrp	x8, _ENXIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	b	LBB0_5
LBB0_17:
	ldr	w1, [x25]
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_dword
	cbnz	w0, LBB0_8
; %bb.18:
	ldr	w8, [sp, #12]
	str	w8, [x19, #16]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_OS_MAILBOX_RETRY_COUNT,4,2     ; @OS_MAILBOX_RETRY_COUNT
	.comm	_PUNIT_MAILBOX_INTERFACE,4,2    ; @PUNIT_MAILBOX_INTERFACE
	.comm	_PUNIT_MAILBOX_BUSY_BIT,4,2     ; @PUNIT_MAILBOX_BUSY_BIT
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_PUNIT_MAILBOX_DATA,4,2         ; @PUNIT_MAILBOX_DATA
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_isst_if_mbox_cmd
.subsections_via_symbols
