	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s10_ops_write_complete
_s10_ops_write_complete:                ## @s10_ops_write_complete
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	movq	16(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %edi
	callq	_usecs_to_jiffies
	movq	%rax, %r14
	leaq	8(%r15), %r12
	leaq	4(%r15), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_reinit_completion
	movq	_COMMAND_RECONFIG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_s10_svc_send_msg
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_wait_for_completion_interruptible_timeout
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %ebx
	js	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_SVC_STATUS_RECONFIG_COMPLETED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_test_and_clear_bit
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %r14d
	movq	_SVC_STATUS_RECONFIG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_test_and_clear_bit
	testq	%rax, %rax
	je	LBB0_1
## %bb.10:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_2:
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_4:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
LBB0_11:
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_12
LBB0_8:
	xorl	%ebx, %ebx
LBB0_12:
	movl	(%r15), %edi
	callq	_stratix10_svc_done
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COMMAND_RECONFIG_STATUS,4,2    ## @COMMAND_RECONFIG_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout waiting for RECONFIG_COMPLETED\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.1:                               ## @.str.1
	.asciz	"error (%d) waiting for RECONFIG_COMPLETED\n"

	.comm	_SVC_STATUS_RECONFIG_COMPLETED,4,2 ## @SVC_STATUS_RECONFIG_COMPLETED
	.comm	_SVC_STATUS_RECONFIG_ERROR,4,2  ## @SVC_STATUS_RECONFIG_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"ERROR - giving up - SVC_STATUS_RECONFIG_ERROR\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_s10_ops_write_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s10_ops_write_complete
_s10_ops_write_complete:                ; @s10_ops_write_complete
	.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
	ldr	x19, [x0]
	ldr	x20, [x19, #16]
	ldr	w0, [x1]
	bl	_usecs_to_jiffies
	mov	x24, x0
	add	x21, x19, #8
	add	x22, x19, #4
Lloh0:
	adrp	x25, _COMMAND_RECONFIG_STATUS@GOTPAGE
Lloh1:
	ldr	x25, [x25, _COMMAND_RECONFIG_STATUS@GOTPAGEOFF]
Lloh2:
	adrp	x26, _SVC_STATUS_RECONFIG_COMPLETED@GOTPAGE
Lloh3:
	ldr	x26, [x26, _SVC_STATUS_RECONFIG_COMPLETED@GOTPAGEOFF]
Lloh4:
	adrp	x27, _SVC_STATUS_RECONFIG_ERROR@GOTPAGE
Lloh5:
	ldr	x27, [x27, _SVC_STATUS_RECONFIG_ERROR@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_reinit_completion
	ldr	w1, [x25]
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	bl	_s10_svc_send_msg
	tbnz	w0, #31, LBB0_7
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	mov	x1, x24
	bl	_wait_for_completion_interruptible_timeout
	cbz	w0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x23, x0
	tbnz	w0, #31, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x26]
	mov	x1, x22
	bl	_test_and_clear_bit
	cbnz	x0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w24, w23
	ldr	w0, [x27]
	mov	x1, x22
	bl	_test_and_clear_bit
	cbz	x0, LBB0_1
; %bb.6:
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh8:
	adrp	x8, _EFAULT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	mov	x23, x0
	b	LBB0_12
LBB0_8:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh12:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_12
LBB0_10:
	str	x23, [sp]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_12
LBB0_11:
	mov	w23, #0
LBB0_12:
	ldr	w0, [x19]
	bl	_stratix10_svc_done
	mov	x0, x23
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_COMMAND_RECONFIG_STATUS,4,2    ; @COMMAND_RECONFIG_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout waiting for RECONFIG_COMPLETED\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.1:                               ; @.str.1
	.asciz	"error (%d) waiting for RECONFIG_COMPLETED\n"

	.comm	_SVC_STATUS_RECONFIG_COMPLETED,4,2 ; @SVC_STATUS_RECONFIG_COMPLETED
	.comm	_SVC_STATUS_RECONFIG_ERROR,4,2  ; @SVC_STATUS_RECONFIG_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"ERROR - giving up - SVC_STATUS_RECONFIG_ERROR\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_s10_ops_write_complete
.subsections_via_symbols
