	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dfx_hw_port_ctrl_req
_dfx_hw_port_ctrl_req:                  ## @dfx_hw_port_ctrl_req
	.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	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_PI_PCTRL_M_CMD_ERROR@GOTPCREL(%rip), %r14
	movl	(%r14), %r13d
	orl	%esi, %r13d
	movl	%r13d, -44(%rbp)
	movq	_PI_PDQ_K_REG_PORT_DATA_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dfx_port_write_long
	movq	_PI_PDQ_K_REG_PORT_DATA_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_dfx_port_write_long
	movq	_PI_PDQ_K_REG_PORT_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_dfx_port_write_long
	movq	_PI_PCTRL_M_BLAST_FLASH@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	movl	$600001, %eax                   ## imm = 0x927C1
	movl	$20001, %r13d                   ## imm = 0x4E21
	cmovel	%eax, %r13d
	leaq	-44(%rbp), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_dfx_port_read_long
	movl	(%r14), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$100, %edi
	callq	_udelay
	decl	%r13d
	cmpl	$1, %r13d
	jg	LBB0_1
## %bb.3:
	movq	_DFX_K_HW_TIMEOUT@GOTPCREL(%rip), %r14
	jmp	LBB0_6
LBB0_4:
	movq	_DFX_K_SUCCESS@GOTPCREL(%rip), %r14
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.5:
	movq	_PI_PDQ_K_REG_HOST_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dfx_port_read_long
LBB0_6:
	movl	(%r14), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PI_PCTRL_M_CMD_ERROR,4,2       ## @PI_PCTRL_M_CMD_ERROR
	.comm	_PI_PDQ_K_REG_PORT_DATA_A,4,2   ## @PI_PDQ_K_REG_PORT_DATA_A
	.comm	_PI_PDQ_K_REG_PORT_DATA_B,4,2   ## @PI_PDQ_K_REG_PORT_DATA_B
	.comm	_PI_PDQ_K_REG_PORT_CTRL,4,2     ## @PI_PDQ_K_REG_PORT_CTRL
	.comm	_PI_PCTRL_M_BLAST_FLASH,4,2     ## @PI_PCTRL_M_BLAST_FLASH
	.comm	_DFX_K_HW_TIMEOUT,4,2           ## @DFX_K_HW_TIMEOUT
	.comm	_PI_PDQ_K_REG_HOST_DATA,4,2     ## @PI_PDQ_K_REG_HOST_DATA
	.comm	_DFX_K_SUCCESS,4,2              ## @DFX_K_SUCCESS
	.no_dead_strip	_dfx_hw_port_ctrl_req
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dfx_hw_port_ctrl_req
_dfx_hw_port_ctrl_req:                  ; @dfx_hw_port_ctrl_req
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x4
	mov	x21, x3
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x24, _PI_PCTRL_M_CMD_ERROR@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PI_PCTRL_M_CMD_ERROR@GOTPAGEOFF]
	ldr	w8, [x24]
	orr	w23, w8, w1
	str	w23, [sp, #12]
Lloh2:
	adrp	x8, _PI_PDQ_K_REG_PORT_DATA_A@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PI_PDQ_K_REG_PORT_DATA_A@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_dfx_port_write_long
Lloh5:
	adrp	x8, _PI_PDQ_K_REG_PORT_DATA_B@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PI_PDQ_K_REG_PORT_DATA_B@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_dfx_port_write_long
Lloh8:
	adrp	x21, _PI_PDQ_K_REG_PORT_CTRL@GOTPAGE
Lloh9:
	ldr	x21, [x21, _PI_PDQ_K_REG_PORT_CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	mov	x2, x23
	bl	_dfx_port_write_long
Lloh10:
	adrp	x8, _PI_PCTRL_M_BLAST_FLASH@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PI_PCTRL_M_BLAST_FLASH@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	mov	w9, #20001
	mov	w10, #10177
	movk	w10, #9, lsl #16
	cmp	w8, w22
	csel	w23, w10, w9, eq
Lloh13:
	adrp	x22, _DFX_K_HW_TIMEOUT@GOTPAGE
Lloh14:
	ldr	x22, [x22, _DFX_K_HW_TIMEOUT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	bl	_dfx_port_read_long
	ldr	w8, [sp, #12]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #100
	bl	_udelay
	sub	w23, w23, #1
	cmp	w23, #1
	b.gt	LBB0_1
	b	LBB0_6
LBB0_3:
	cbz	x19, LBB0_5
; %bb.4:
Lloh15:
	adrp	x8, _PI_PDQ_K_REG_HOST_DATA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PI_PDQ_K_REG_HOST_DATA@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x19
	bl	_dfx_port_read_long
LBB0_5:
Lloh18:
	adrp	x22, _DFX_K_SUCCESS@GOTPAGE
Lloh19:
	ldr	x22, [x22, _DFX_K_SUCCESS@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x22]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_PI_PCTRL_M_CMD_ERROR,4,2       ; @PI_PCTRL_M_CMD_ERROR
	.comm	_PI_PDQ_K_REG_PORT_DATA_A,4,2   ; @PI_PDQ_K_REG_PORT_DATA_A
	.comm	_PI_PDQ_K_REG_PORT_DATA_B,4,2   ; @PI_PDQ_K_REG_PORT_DATA_B
	.comm	_PI_PDQ_K_REG_PORT_CTRL,4,2     ; @PI_PDQ_K_REG_PORT_CTRL
	.comm	_PI_PCTRL_M_BLAST_FLASH,4,2     ; @PI_PCTRL_M_BLAST_FLASH
	.comm	_DFX_K_HW_TIMEOUT,4,2           ; @DFX_K_HW_TIMEOUT
	.comm	_PI_PDQ_K_REG_HOST_DATA,4,2     ; @PI_PDQ_K_REG_HOST_DATA
	.comm	_DFX_K_SUCCESS,4,2              ; @DFX_K_SUCCESS
	.no_dead_strip	_dfx_hw_port_ctrl_req
.subsections_via_symbols
