	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function l4_cooked_read
_l4_cooked_read:                        ## @l4_cooked_read
	.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, %r15
	movq	%rsi, %r13
	movq	(%rdi), %r14
	movq	_L4_SELECT_ANALOG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_L4_PORT@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_outb
	movq	_L4_SELECT_DIGITAL@GOTPCREL(%rip), %rax
	movl	(%r14), %edi
	sarl	$2, %edi
	addl	(%rax), %edi
	movl	(%r12), %esi
	callq	_outb
	movl	(%r12), %edi
	callq	_inb
	movq	_L4_BUSY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_1
## %bb.2:
	movl	(%r14), %edi
	andl	$3, %edi
	movl	(%r12), %esi
	callq	_outb
	xorl	%eax, %eax
	callq	_l4_wait_ready
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	movq	_L4_SELECT_ANALOG@GOTPCREL(%rip), %rbx
	movl	$-1, %r15d
LBB0_18:
	movl	(%rbx), %edi
	movl	(%r12), %esi
	callq	_outb
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	(%r12), %edi
	callq	_inb
	movl	%eax, %ebx
	testb	$1, %bl
	movq	%r15, %r14
	je	LBB0_6
## %bb.4:
	xorl	%eax, %eax
	callq	_l4_wait_ready
	testq	%rax, %rax
	jne	LBB0_1
## %bb.5:
	movl	(%r12), %edi
	callq	_inb
	cmpl	$253, %eax
	movl	$-1, %ecx
	cmovll	%eax, %ecx
	movl	%ecx, (%r13)
LBB0_6:
	testb	$2, %bl
	je	LBB0_9
## %bb.7:
	xorl	%eax, %eax
	callq	_l4_wait_ready
	testq	%rax, %rax
	jne	LBB0_1
## %bb.8:
	movl	(%r12), %edi
	callq	_inb
	cmpl	$253, %eax
	movl	$-1, %ecx
	cmovll	%eax, %ecx
	movl	%ecx, 4(%r13)
LBB0_9:
	testb	$4, %bl
	je	LBB0_12
## %bb.10:
	xorl	%eax, %eax
	callq	_l4_wait_ready
	testq	%rax, %rax
	jne	LBB0_1
## %bb.11:
	movl	(%r12), %edi
	callq	_inb
	cmpl	$253, %eax
	movl	$-1, %ecx
	cmovll	%eax, %ecx
	movl	%ecx, 8(%r13)
LBB0_12:
	testb	$8, %bl
	je	LBB0_15
## %bb.13:
	xorl	%eax, %eax
	callq	_l4_wait_ready
	testq	%rax, %rax
	jne	LBB0_1
## %bb.14:
	movl	(%r12), %edi
	callq	_inb
	cmpl	$253, %eax
	movl	$-1, %ecx
	cmovll	%eax, %ecx
	movl	%ecx, 12(%r13)
LBB0_15:
	xorl	%r15d, %r15d
	testb	$16, %bl
	movq	_L4_SELECT_ANALOG@GOTPCREL(%rip), %rbx
	je	LBB0_18
## %bb.16:
	xorl	%eax, %eax
	callq	_l4_wait_ready
	movl	$-1, %r15d
	testq	%rax, %rax
	jne	LBB0_18
## %bb.17:
	movl	(%r12), %edi
	callq	_inb
	andl	$15, %eax
	movl	%eax, (%r14)
	xorl	%r15d, %r15d
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_L4_SELECT_ANALOG,4,2           ## @L4_SELECT_ANALOG
	.comm	_L4_PORT,4,2                    ## @L4_PORT
	.comm	_L4_SELECT_DIGITAL,4,2          ## @L4_SELECT_DIGITAL
	.comm	_L4_BUSY,4,2                    ## @L4_BUSY
	.no_dead_strip	_l4_cooked_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function l4_cooked_read
_l4_cooked_read:                        ; @l4_cooked_read
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
	ldr	x21, [x0]
Lloh0:
	adrp	x22, _L4_SELECT_ANALOG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _L4_SELECT_ANALOG@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x23, _L4_PORT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _L4_PORT@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_outb
Lloh4:
	adrp	x8, _L4_SELECT_DIGITAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _L4_SELECT_DIGITAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x21]
	add	w0, w8, w9, asr #2
	ldr	w1, [x23]
	bl	_outb
	ldr	w0, [x23]
	bl	_inb
Lloh7:
	adrp	x8, _L4_BUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _L4_BUSY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x21]
	and	w0, w8, #0x3
	ldr	w1, [x23]
	bl	_outb
	bl	_l4_wait_ready
	cbz	x0, LBB0_4
LBB0_2:
	mov	w20, #-1
LBB0_3:
	ldr	w0, [x22]
	ldr	w1, [x23]
	bl	_outb
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w0, [x23]
	bl	_inb
	mov	x21, x0
	tbz	w0, #0, LBB0_7
; %bb.5:
	bl	_l4_wait_ready
	cbnz	x0, LBB0_2
; %bb.6:
	ldr	w0, [x23]
	bl	_inb
	cmp	w0, #252
	csinv	w8, w0, wzr, le
	str	w8, [x20]
LBB0_7:
	tbz	w21, #1, LBB0_10
; %bb.8:
	bl	_l4_wait_ready
	cbnz	x0, LBB0_2
; %bb.9:
	ldr	w0, [x23]
	bl	_inb
	cmp	w0, #252
	csinv	w8, w0, wzr, le
	str	w8, [x20, #4]
LBB0_10:
	tbz	w21, #2, LBB0_13
; %bb.11:
	bl	_l4_wait_ready
	cbnz	x0, LBB0_2
; %bb.12:
	ldr	w0, [x23]
	bl	_inb
	cmp	w0, #252
	csinv	w8, w0, wzr, le
	str	w8, [x20, #8]
LBB0_13:
	tbz	w21, #3, LBB0_16
; %bb.14:
	bl	_l4_wait_ready
	cbnz	x0, LBB0_2
; %bb.15:
	ldr	w0, [x23]
	bl	_inb
	cmp	w0, #252
	csinv	w8, w0, wzr, le
	str	w8, [x20, #12]
LBB0_16:
	tbnz	w21, #4, LBB0_18
; %bb.17:
	mov	w20, #0
	b	LBB0_3
LBB0_18:
	bl	_l4_wait_ready
	cbnz	x0, LBB0_2
; %bb.19:
	ldr	w0, [x23]
	bl	_inb
	mov	w20, #0
	and	w8, w0, #0xf
	str	w8, [x19]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_L4_SELECT_ANALOG,4,2           ; @L4_SELECT_ANALOG
	.comm	_L4_PORT,4,2                    ; @L4_PORT
	.comm	_L4_SELECT_DIGITAL,4,2          ; @L4_SELECT_DIGITAL
	.comm	_L4_BUSY,4,2                    ; @L4_BUSY
	.no_dead_strip	_l4_cooked_read
.subsections_via_symbols
