	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tpm_nsc_send
_tpm_nsc_send:                          ## @tpm_nsc_send
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_NSC_COMMAND_CANCEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_NSC_COMMAND@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	addq	(%rbx), %rsi
	callq	_outb
	movq	%rbx, %rdi
	callq	_nsc_wait_for_ready
	testq	%rax, %rax
	je	LBB0_4
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
LBB0_2:
	subl	(%rax), %r12d
LBB0_3:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_NSC_STATUS_IBF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	leaq	-44(%rbp), %rcx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_wait_for_stat
	testq	%rax, %rax
	js	LBB0_12
## %bb.5:
	movq	_NSC_COMMAND_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r13), %rsi
	addq	(%rbx), %rsi
	callq	_outb
	movq	_NSC_STATUS_IBR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%edx, %esi
	callq	_wait_for_stat
	testq	%rax, %rax
	js	LBB0_13
## %bb.6:
	testq	%r14, %r14
	je	LBB0_10
## %bb.7:
	xorl	%r13d, %r13d
	leaq	-44(%rbp), %r12
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	_NSC_STATUS_IBF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movq	%r12, %rcx
	callq	_wait_for_stat
	testq	%rax, %rax
	js	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r15,%r13,4), %edi
	movq	_NSC_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_outb
	incq	%r13
	cmpq	%r13, %r14
	jne	LBB0_8
LBB0_10:
	movq	_NSC_STATUS_IBF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	leaq	-44(%rbp), %rcx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_wait_for_stat
	testq	%rax, %rax
	js	LBB0_12
## %bb.11:
	movq	_NSC_COMMAND_EOC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_NSC_COMMAND@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_outb
	movl	%r14d, %r12d
	jmp	LBB0_3
LBB0_12:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_13:
	movl	8(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_1
LBB0_14:
	movl	8(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.comm	_NSC_COMMAND_CANCEL,4,2         ## @NSC_COMMAND_CANCEL
	.comm	_NSC_COMMAND,8,3                ## @NSC_COMMAND
	.comm	_EIO,4,2                        ## @EIO
	.comm	_NSC_STATUS_IBF,4,2             ## @NSC_STATUS_IBF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IBF timeout\n"

	.comm	_NSC_COMMAND_NORMAL,4,2         ## @NSC_COMMAND_NORMAL
	.comm	_NSC_STATUS_IBR,4,2             ## @NSC_STATUS_IBR
L_.str.1:                               ## @.str.1
	.asciz	"IBR timeout\n"

L_.str.2:                               ## @.str.2
	.asciz	"IBF timeout (while writing data)\n"

	.comm	_NSC_DATA,8,3                   ## @NSC_DATA
	.comm	_NSC_COMMAND_EOC,4,2            ## @NSC_COMMAND_EOC
	.no_dead_strip	_tpm_nsc_send
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tpm_nsc_send
_tpm_nsc_send:                          ; @tpm_nsc_send
	.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, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _NSC_COMMAND_CANCEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NSC_COMMAND_CANCEL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x8, [x20]
Lloh3:
	adrp	x22, _NSC_COMMAND@GOTPAGE
Lloh4:
	ldr	x22, [x22, _NSC_COMMAND@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_outb
	mov	x0, x20
	bl	_nsc_wait_for_ready
	cbnz	x0, LBB0_13
; %bb.1:
Lloh5:
	adrp	x23, _NSC_STATUS_IBF@GOTPAGE
Lloh6:
	ldr	x23, [x23, _NSC_STATUS_IBF@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x3, sp, #12
	mov	x0, x20
	mov	w2, #0
	bl	_wait_for_stat
	tbnz	x0, #63, LBB0_9
; %bb.2:
Lloh7:
	adrp	x8, _NSC_COMMAND_NORMAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NSC_COMMAND_NORMAL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_outb
Lloh10:
	adrp	x8, _NSC_STATUS_IBR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NSC_STATUS_IBR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x20
	mov	x2, x1
	bl	_wait_for_stat
	tbnz	x0, #63, LBB0_10
; %bb.3:
	cbz	x19, LBB0_7
; %bb.4:
Lloh13:
	adrp	x24, _NSC_DATA@GOTPAGE
Lloh14:
	ldr	x24, [x24, _NSC_DATA@GOTPAGEOFF]
	mov	x25, x19
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	add	x3, sp, #12
	mov	x0, x20
	mov	w2, #0
	bl	_wait_for_stat
	tbnz	x0, #63, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x21], #4
	ldr	x8, [x20]
	ldr	x9, [x24]
	add	x1, x9, x8
	bl	_outb
	subs	x25, x25, #1
	b.ne	LBB0_5
LBB0_7:
	ldr	w1, [x23]
	add	x3, sp, #12
	mov	x0, x20
	mov	w2, #0
	bl	_wait_for_stat
	tbnz	x0, #63, LBB0_9
; %bb.8:
Lloh15:
	adrp	x8, _NSC_COMMAND_EOC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NSC_COMMAND_EOC@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_outb
	b	LBB0_14
LBB0_9:
	ldr	w0, [x20, #8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_12
LBB0_10:
	ldr	w0, [x20, #8]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_11:
	ldr	w0, [x20, #8]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_12:
	bl	_dev_err
LBB0_13:
Lloh24:
	adrp	x8, _EIO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_14:
	mov	x0, x19
	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
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_NSC_COMMAND_CANCEL,4,2         ; @NSC_COMMAND_CANCEL
	.comm	_NSC_COMMAND,8,3                ; @NSC_COMMAND
	.comm	_EIO,4,2                        ; @EIO
	.comm	_NSC_STATUS_IBF,4,2             ; @NSC_STATUS_IBF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IBF timeout\n"

	.comm	_NSC_COMMAND_NORMAL,4,2         ; @NSC_COMMAND_NORMAL
	.comm	_NSC_STATUS_IBR,4,2             ; @NSC_STATUS_IBR
l_.str.1:                               ; @.str.1
	.asciz	"IBR timeout\n"

l_.str.2:                               ; @.str.2
	.asciz	"IBF timeout (while writing data)\n"

	.comm	_NSC_DATA,8,3                   ; @NSC_DATA
	.comm	_NSC_COMMAND_EOC,4,2            ; @NSC_COMMAND_EOC
	.no_dead_strip	_tpm_nsc_send
.subsections_via_symbols
