	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function l4_setcal
_l4_setcal:                             ## @l4_setcal
	.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	%rsi, %r15
	movl	%edi, %r14d
	movq	_L4_SELECT_ANALOG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_L4_PORT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_outb
	movq	_L4_SELECT_DIGITAL@GOTPCREL(%rip), %r12
	movl	%r14d, %ebx
	sarl	$2, %ebx
	movl	(%r12), %edi
	addl	%ebx, %edi
	movl	(%r13), %esi
	callq	_outb
	movl	(%r13), %edi
	callq	_inb
	movq	_L4_BUSY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_1
## %bb.2:
	movq	_L4_CMD_SETCAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	callq	_outb
	xorl	%eax, %eax
	callq	_l4_wait_ready
	testq	%rax, %rax
	jne	LBB0_1
## %bb.3:
	movl	(%r13), %edi
	callq	_inb
	addl	(%r12), %ebx
	cmpl	%ebx, %eax
	jne	LBB0_1
## %bb.4:
	xorl	%eax, %eax
	callq	_l4_wait_ready
	testq	%rax, %rax
	jne	LBB0_1
## %bb.5:
	andl	$3, %r14d
	movl	(%r13), %esi
	movl	%r14d, %edi
	callq	_outb
	xorl	%eax, %eax
	callq	_l4_wait_ready
	testq	%rax, %rax
	je	LBB0_6
LBB0_1:
	movq	_L4_SELECT_ANALOG@GOTPCREL(%rip), %r14
	movl	$-1, %ebx
LBB0_10:
	movl	(%r14), %edi
	movl	(%r13), %esi
	callq	_outb
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r15), %edi
	movl	(%r13), %esi
	callq	_outb
	xorl	%eax, %eax
	callq	_l4_wait_ready
	testq	%rax, %rax
	movq	_L4_SELECT_ANALOG@GOTPCREL(%rip), %r14
	movl	$-1, %ebx
	jne	LBB0_10
## %bb.7:
	movl	4(%r15), %edi
	movl	(%r13), %esi
	callq	_outb
	xorl	%eax, %eax
	callq	_l4_wait_ready
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:
	movl	8(%r15), %edi
	movl	(%r13), %esi
	callq	_outb
	xorl	%eax, %eax
	callq	_l4_wait_ready
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movl	12(%r15), %edi
	movl	(%r13), %esi
	callq	_outb
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.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
	.comm	_L4_CMD_SETCAL,4,2              ## @L4_CMD_SETCAL
	.no_dead_strip	_l4_setcal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function l4_setcal
_l4_setcal:                             ; @l4_setcal
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _L4_SELECT_ANALOG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _L4_SELECT_ANALOG@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x22, _L4_PORT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _L4_PORT@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_outb
Lloh4:
	adrp	x23, _L4_SELECT_DIGITAL@GOTPAGE
Lloh5:
	ldr	x23, [x23, _L4_SELECT_DIGITAL@GOTPAGEOFF]
	ldr	w8, [x23]
	asr	w24, w20, #2
	add	w0, w8, w24
	ldr	w1, [x22]
	bl	_outb
	ldr	w0, [x22]
	bl	_inb
Lloh6:
	adrp	x8, _L4_BUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _L4_BUSY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_8
; %bb.1:
Lloh9:
	adrp	x8, _L4_CMD_SETCAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _L4_CMD_SETCAL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	w1, [x22]
	bl	_outb
	bl	_l4_wait_ready
	cbnz	x0, LBB0_8
; %bb.2:
	ldr	w0, [x22]
	bl	_inb
	ldr	w8, [x23]
	add	w8, w8, w24
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.3:
	bl	_l4_wait_ready
	cbnz	x0, LBB0_8
; %bb.4:
	and	w0, w20, #0x3
	ldr	w1, [x22]
	bl	_outb
	bl	_l4_wait_ready
	cbnz	x0, LBB0_8
; %bb.5:
	ldr	w0, [x19]
	ldr	w1, [x22]
	bl	_outb
	bl	_l4_wait_ready
	cbnz	x0, LBB0_8
; %bb.6:
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	bl	_outb
	bl	_l4_wait_ready
	cbnz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x19, #8]
	ldr	w1, [x22]
	bl	_outb
	bl	_l4_wait_ready
	cbz	x0, LBB0_10
LBB0_8:
	mov	w19, #-1
LBB0_9:
	ldr	w0, [x21]
	ldr	w1, [x22]
	bl	_outb
	mov	x0, x19
	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_10:
	ldr	w0, [x19, #12]
	ldr	w1, [x22]
	bl	_outb
	mov	w19, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.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
	.comm	_L4_CMD_SETCAL,4,2              ; @L4_CMD_SETCAL
	.no_dead_strip	_l4_setcal
.subsections_via_symbols
