	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sch56xx_send_cmd
_sch56xx_send_cmd:                      ## @sch56xx_send_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
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movl	%esi, %r13d
	movl	%edi, %r12d
	leal	1(%r12), %ebx
	movl	%ebx, %edi
	callq	_inb
	movl	%eax, %edi
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	callq	_outb
	leal	2(%r12), %r14d
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	movl	%r14d, %esi
	callq	_outb
	leal	3(%r12), %esi
	movl	$128, %edi
	callq	_outb
	leal	4(%r12), %ebx
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_outb
	leal	5(%r12), %esi
	movl	$1, %edi
	callq	_outb
	movl	$4, %edi
	movl	%r14d, %esi
	callq	_outb
	movq	_SCH56XX_CMD_WRITE@GOTPCREL(%rip), %rax
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	cmpl	%r13d, (%rax)
	jne	LBB0_2
## %bb.1:
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_outb
LBB0_2:
	movl	%ebx, %r13d
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	movzbl	%bl, %edi
	leal	6(%r12), %esi
	callq	_outb
	movl	%ebx, %r14d
	movl	%ebx, %edi
	sarl	$8, %edi
	leal	7(%r12), %esi
	callq	_outb
	movl	$1, %edi
	movl	%r12d, %esi
	callq	_outb
	addl	$8, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%r15d
	cmpl	$96, %r15d
	je	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$64, %r15d
	jb	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_msleep
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %edi
	callq	_inb
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ebx
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_outb
	testb	$1, %bl
	je	LBB0_7
## %bb.10:
	cmpl	$96, %r15d
	jne	LBB0_11
LBB0_8:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	$1, %edx
LBB0_9:
	callq	_pr_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	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_11:
	movl	$64, %ebx
	leaq	L_.str.1(%rip), %r15
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	decl	%ebx
	je	LBB0_16
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	callq	_inb
	cmpl	$1, %eax
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$64, %ebx
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	_pr_warn
	jmp	LBB0_15
LBB0_16:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	$2, %edx
	jmp	LBB0_9
LBB0_17:
	movq	_SCH56XX_CMD_READ@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rcx)
	jne	LBB0_18
## %bb.19:
	movl	%r13d, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_inb                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SCH56XX_CMD_WRITE,4,2          ## @SCH56XX_CMD_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Max retries exceeded reading virtual register 0x%04hx (%d)\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"EC reports: 0x%02x reading virtual register 0x%04hx\n"

	.comm	_SCH56XX_CMD_READ,4,2           ## @SCH56XX_CMD_READ
	.no_dead_strip	_sch56xx_send_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sch56xx_send_cmd
_sch56xx_send_cmd:                      ; @sch56xx_send_cmd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x3
	mov	x19, x2
	mov	x20, x1
	mov	x23, x0
	add	w21, w0, #1
	mov	x0, x21
	bl	_inb
	mov	x1, x21
	bl	_outb
	add	w25, w23, #2
	mov	w0, #0
	mov	x1, x25
	bl	_outb
	add	w1, w23, #3
	mov	w0, #128
	bl	_outb
	add	w22, w23, #4
	mov	x0, x20
	mov	x1, x22
	bl	_outb
	add	w1, w23, #5
	mov	w0, #1
	bl	_outb
	mov	w0, #4
	mov	x1, x25
	bl	_outb
Lloh0:
	adrp	x8, _SCH56XX_CMD_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCH56XX_CMD_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x24
	mov	x1, x22
	bl	_outb
LBB0_2:
	and	w0, w19, #0xff
	add	w1, w23, #6
	bl	_outb
	asr	w0, w19, #8
	add	w1, w23, #7
	bl	_outb
	mov	w0, #1
	mov	x1, x23
	bl	_outb
	mov	w25, #0
	add	w23, w23, #8
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w25, w25, #1
	cmp	w25, #96
	b.eq	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w25, #64
	b.lo	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1
	bl	_msleep
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	bl	_inb
	cbz	w0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, x0
	mov	x1, x23
	bl	_outb
	tbz	w24, #0, LBB0_3
; %bb.8:
	cmp	w25, #96
	b.ne	LBB0_12
LBB0_9:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	w2, #1
LBB0_10:
	bl	_pr_err
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	w24, #64
Lloh8:
	adrp	x23, l_.str.1@PAGE
Lloh9:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	subs	w24, w24, #1
	b.eq	LBB0_17
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_inb
	cmp	w0, #1
	b.eq	LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	cmp	w24, #64
	b.ne	LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x1, x0
	mov	x0, x23
	mov	x2, x19
	bl	_pr_warn
	b	LBB0_13
LBB0_17:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	w2, #2
	b	LBB0_10
LBB0_18:
Lloh12:
	adrp	x8, _SCH56XX_CMD_READ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SCH56XX_CMD_READ@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_20
; %bb.19:
	mov	x0, 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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_inb
LBB0_20:
	mov	w0, #0
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SCH56XX_CMD_WRITE,4,2          ; @SCH56XX_CMD_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Max retries exceeded reading virtual register 0x%04hx (%d)\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"EC reports: 0x%02x reading virtual register 0x%04hx\n"

	.comm	_SCH56XX_CMD_READ,4,2           ; @SCH56XX_CMD_READ
	.no_dead_strip	_sch56xx_send_cmd
.subsections_via_symbols
