	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nx842_exec_icswx
_nx842_exec_icswx:                      ## @nx842_exec_icswx
	.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
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r15
	movl	(%rcx), %r13d
	movq	_WORKMEM_ALIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r8, %rdi
	callq	_PTR_ALIGN
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	$0, (%rbx)
	movq	_nx842_ct@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	%r14, %rdx
	movl	%r13d, %ecx
	movq	%rax, %r8
	movq	%rax, %r12
	callq	_nx842_config_crb
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.3:
	leaq	4(%r12), %r14
	movq	%r12, %rax
	addq	$8, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_CCW_CT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_nx842_ct@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_SET_FIELD
	movq	_CCW_CI_842@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_SET_FIELD
	movq	_CCW_FC_842@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	%rax, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_SET_FIELD
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, (%r12)
	movq	%rbx, %rdi
	callq	_cpu_to_be32
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_icswx
	movl	%eax, %r14d
	movq	%r12, %r13
	movl	4(%r12), %edi
	callq	_be32_to_cpu
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_pr_debug_ratelimited
	movq	_ICSWX_XERS0@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	andl	%r14d, %ebx
	cmpl	$128, %ebx
	je	LBB0_8
## %bb.4:
	cmpl	$130, %ebx
	je	LBB0_7
## %bb.5:
	cmpl	$129, %ebx
	jne	LBB0_9
## %bb.6:
	movq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_wait_for_csb
	movl	%eax, %ebx
	testl	%ebx, %ebx
	jne	LBB0_11
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err_ratelimited
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_err_ratelimited
	movq	_EPROTO@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movl	%r15d, %ebx
LBB0_9:
	testl	%ebx, %ebx
	jne	LBB0_11
LBB0_10:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_be32_to_cpu
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%ebx, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_debug_ratelimited
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	testl	%ebx, %ebx
	jne	LBB0_11
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_WORKMEM_ALIGN,4,2              ## @WORKMEM_ALIGN
	.comm	_nx842_ct,4,2                   ## @nx842_ct
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"coprocessor CT is 0"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_CCW_CT,4,2                     ## @CCW_CT
	.comm	_CCW_CI_842,4,2                 ## @CCW_CI_842
	.comm	_CCW_FC_842,4,2                 ## @CCW_FC_842
L_.str.1:                               ## @.str.1
	.asciz	"icswx CR %x ccw %x crb->ccw %x\n"

	.comm	_ICSWX_XERS0,4,2                ## @ICSWX_XERS0
L_.str.2:                               ## @.str.2
	.asciz	"842 Coprocessor busy\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.3:                               ## @.str.3
	.asciz	"ICSWX rejected\n"

	.comm	_EPROTO,4,2                     ## @EPROTO
	.no_dead_strip	_nx842_exec_icswx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nx842_exec_icswx
_nx842_exec_icswx:                      ; @nx842_exec_icswx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x22, x5
	mov	x19, x3
	mov	x20, x2
	mov	x23, x1
	mov	x25, x0
	ldr	w24, [x3]
Lloh0:
	adrp	x8, _WORKMEM_ALIGN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WORKMEM_ALIGN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x4
	bl	_PTR_ALIGN
	str	wzr, [x19]
Lloh3:
	adrp	x26, _nx842_ct@GOTPAGE
Lloh4:
	ldr	x26, [x26, _nx842_ct@GOTPAGEOFF]
	ldr	w8, [x26]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x21, x0
	mov	x0, x25
	mov	x1, x23
	mov	x2, x20
	mov	x3, x24
	mov	x4, x21
	bl	_nx842_config_crb
	cbnz	w0, LBB0_12
; %bb.2:
	add	x23, x21, #4
	add	x20, x21, #8
Lloh5:
	adrp	x8, _CCW_CT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CCW_CT@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w2, [x26]
	mov	x1, #0
	bl	_SET_FIELD
	mov	x1, x0
Lloh8:
	adrp	x8, _CCW_CI_842@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CCW_CI_842@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	w2, #0
	bl	_SET_FIELD
	mov	x1, x0
Lloh11:
	adrp	x8, _CCW_FC_842@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CCW_FC_842@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	x2, x22
	bl	_SET_FIELD
	mov	x22, x0
	bl	_ktime_get
	str	w0, [x21]
	mov	x0, x22
	bl	_cpu_to_be32
	mov	x1, x23
	bl	_icswx
	mov	x23, x0
	ldr	w0, [x21, #4]
	bl	_be32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp, #8]
	str	x23, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug_ratelimited
Lloh16:
	adrp	x8, _ICSWX_XERS0@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ICSWX_XERS0@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	bic	w0, w23, w8
	cmp	w0, #128
	b.eq	LBB0_7
; %bb.3:
	cmp	w0, #130
	b.eq	LBB0_8
; %bb.4:
	cmp	w0, #129
	b.ne	LBB0_10
; %bb.5:
	mov	x0, x21
	mov	x1, x20
	bl	_wait_for_csb
	b	LBB0_10
LBB0_6:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err_ratelimited
Lloh21:
	adrp	x8, _ENODEV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_7:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err_ratelimited
Lloh26:
	adrp	x8, _EPROTO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EPROTO@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh28:
	adrp	x0, l_.str.2@PAGE
Lloh29:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_debug_ratelimited
Lloh30:
	adrp	x8, _EBUSY@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	cbnz	w0, LBB0_12
; %bb.11:
	ldr	w0, [x20]
	bl	_be32_to_cpu
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
LBB0_12:
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_WORKMEM_ALIGN,4,2              ; @WORKMEM_ALIGN
	.comm	_nx842_ct,4,2                   ; @nx842_ct
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"coprocessor CT is 0"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_CCW_CT,4,2                     ; @CCW_CT
	.comm	_CCW_CI_842,4,2                 ; @CCW_CI_842
	.comm	_CCW_FC_842,4,2                 ; @CCW_FC_842
l_.str.1:                               ; @.str.1
	.asciz	"icswx CR %x ccw %x crb->ccw %x\n"

	.comm	_ICSWX_XERS0,4,2                ; @ICSWX_XERS0
l_.str.2:                               ; @.str.2
	.asciz	"842 Coprocessor busy\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.3:                               ; @.str.3
	.asciz	"ICSWX rejected\n"

	.comm	_EPROTO,4,2                     ; @EPROTO
	.no_dead_strip	_nx842_exec_icswx
.subsections_via_symbols
