	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amba_kmi_write
_amba_kmi_write:                        ## @amba_kmi_write
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	_KMISTAT@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_readb
	movq	_KMISTAT_TXEMPTY@GOTPCREL(%rip), %r12
	testl	%eax, (%r12)
	jne	LBB0_4
## %bb.1:
	movl	$-10000, %ebx                   ## imm = 0xD8F0
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$10, %edi
	callq	_udelay
	movl	(%r15), %edi
	callq	_readb
	testl	%eax, (%r12)
	je	LBB0_2
LBB0_4:
	movq	_KMIDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%r14b, %edi
	callq	_writeb
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_5:
	movq	_SERIO_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KMISTAT,4,2                    ## @KMISTAT
	.comm	_KMISTAT_TXEMPTY,4,2            ## @KMISTAT_TXEMPTY
	.comm	_KMIDATA,4,2                    ## @KMIDATA
	.comm	_SERIO_TIMEOUT,4,2              ## @SERIO_TIMEOUT
	.no_dead_strip	_amba_kmi_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amba_kmi_write
_amba_kmi_write:                        ; @amba_kmi_write
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
Lloh0:
	adrp	x20, _KMISTAT@GOTPAGE
Lloh1:
	ldr	x20, [x20, _KMISTAT@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_readb
Lloh2:
	adrp	x21, _KMISTAT_TXEMPTY@GOTPAGE
Lloh3:
	ldr	x21, [x21, _KMISTAT_TXEMPTY@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.1:
	mov	w22, #-10000
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	adds	w22, w22, #1
	b.hs	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	w0, [x20]
	bl	_readb
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_2
LBB0_4:
Lloh4:
	adrp	x8, _KMIDATA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _KMIDATA@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_writeb
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _SERIO_TIMEOUT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SERIO_TIMEOUT@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_KMISTAT,4,2                    ; @KMISTAT
	.comm	_KMISTAT_TXEMPTY,4,2            ; @KMISTAT_TXEMPTY
	.comm	_KMIDATA,4,2                    ; @KMIDATA
	.comm	_SERIO_TIMEOUT,4,2              ; @SERIO_TIMEOUT
	.no_dead_strip	_amba_kmi_write
.subsections_via_symbols
