	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ql_get_routing_reg             ## -- Begin function ql_get_routing_reg
	.p2align	4, 0x90
_ql_get_routing_reg:                    ## @ql_get_routing_reg
	.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
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_RT_IDX@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_RT_IDX_MW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_ql_wait_reg_rdy
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movl	(%r12), %esi
	movq	_RT_IDX_TYPE_NICQ@GOTPCREL(%rip), %rax
	movq	_RT_IDX_RS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_RT_IDX_IDX_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	orl	%edx, %ebx
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_ql_write32
	movl	(%r12), %esi
	movq	_RT_IDX_MR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_ql_wait_reg_rdy
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_RT_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ql_read32
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RT_IDX,4,2                     ## @RT_IDX
	.comm	_RT_IDX_MW,4,2                  ## @RT_IDX_MW
	.comm	_RT_IDX_TYPE_NICQ,4,2           ## @RT_IDX_TYPE_NICQ
	.comm	_RT_IDX_RS,4,2                  ## @RT_IDX_RS
	.comm	_RT_IDX_IDX_SHIFT,4,2           ## @RT_IDX_IDX_SHIFT
	.comm	_RT_IDX_MR,4,2                  ## @RT_IDX_MR
	.comm	_RT_DATA,4,2                    ## @RT_DATA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ql_get_routing_reg             ; -- Begin function ql_get_routing_reg
	.p2align	2
_ql_get_routing_reg:                    ; @ql_get_routing_reg
	.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, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _RT_IDX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _RT_IDX@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x8, _RT_IDX_MW@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RT_IDX_MW@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_ql_wait_reg_rdy
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	w1, [x22]
Lloh5:
	adrp	x8, _RT_IDX_TYPE_NICQ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RT_IDX_TYPE_NICQ@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _RT_IDX_RS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RT_IDX_RS@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _RT_IDX_IDX_SHIFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _RT_IDX_IDX_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	lsl	w9, w21, w9
	orr	w2, w8, w9
	mov	x0, x20
	bl	_ql_write32
	ldr	w1, [x22]
Lloh14:
	adrp	x8, _RT_IDX_MR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RT_IDX_MR@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w3, #0
	bl	_ql_wait_reg_rdy
	cbnz	w0, LBB0_3
; %bb.2:
Lloh17:
	adrp	x8, _RT_DATA@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RT_DATA@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ql_read32
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
LBB0_3:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_RT_IDX,4,2                     ; @RT_IDX
	.comm	_RT_IDX_MW,4,2                  ; @RT_IDX_MW
	.comm	_RT_IDX_TYPE_NICQ,4,2           ; @RT_IDX_TYPE_NICQ
	.comm	_RT_IDX_RS,4,2                  ; @RT_IDX_RS
	.comm	_RT_IDX_IDX_SHIFT,4,2           ; @RT_IDX_IDX_SHIFT
	.comm	_RT_IDX_MR,4,2                  ; @RT_IDX_MR
	.comm	_RT_DATA,4,2                    ; @RT_DATA
.subsections_via_symbols
