	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gem_init_pause_thresholds
_gem_init_pause_thresholds:             ## @gem_init_pause_thresholds
	.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	%rdi, %rbx
	movl	(%rdi), %eax
	cmpl	$2049, %eax                     ## imm = 0x801
	jge	LBB0_2
## %bb.1:
	movl	%eax, %ecx
	jmp	LBB0_3
LBB0_2:
	movl	12(%rbx), %edx
	addl	$68, %edx
	andl	$-64, %edx
	movl	%eax, %ecx
	subl	%edx, %ecx
	subl	%edx, %ecx
	movl	%ecx, %eax
	subl	%edx, %eax
LBB0_3:
	movl	%eax, 8(%rbx)
	movl	%ecx, 4(%rbx)
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	movq	_PCI_VENDOR_ID_APPLE@GOTPCREL(%rip), %rcx
	movq	_GREG_CFG_RONPAULBIT@GOTPCREL(%rip), %rdx
	movq	_GREG_CFG_ENBUG2FIX@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rdx), %esi
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	cmovel	%esi, %edx
	movq	_GREG_CFG_IBURST@GOTPCREL(%rip), %r12
	orl	(%r12), %edx
	movq	_GREG_CFG_TXDMALIM@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	andl	$62, %eax
	movq	_GREG_CFG_RXDMALIM@GOTPCREL(%rip), %r14
	movl	$1984, %edi                     ## imm = 0x7C0
	andl	(%r14), %edi
	orl	%eax, %edi
	orl	%edx, %edi
	movq	_GREG_CFG@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	addq	16(%rbx), %rsi
	callq	_writel
	movq	(%r13), %rdi
	addq	16(%rbx), %rdi
	callq	_readl
	testl	%eax, (%r12)
	je	LBB0_5
## %bb.4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	(%r15), %eax
	andl	$4, %eax
	movl	$512, %edi                      ## imm = 0x200
	andl	(%r14), %edi
	orl	%eax, %edi
	movq	(%r13), %rsi
	addq	16(%rbx), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_VENDOR_ID_APPLE,8,3        ## @PCI_VENDOR_ID_APPLE
	.comm	_GREG_CFG_RONPAULBIT,4,2        ## @GREG_CFG_RONPAULBIT
	.comm	_GREG_CFG_ENBUG2FIX,4,2         ## @GREG_CFG_ENBUG2FIX
	.comm	_GREG_CFG_IBURST,4,2            ## @GREG_CFG_IBURST
	.comm	_GREG_CFG_TXDMALIM,4,2          ## @GREG_CFG_TXDMALIM
	.comm	_GREG_CFG_RXDMALIM,4,2          ## @GREG_CFG_RXDMALIM
	.comm	_GREG_CFG,8,3                   ## @GREG_CFG
	.no_dead_strip	_gem_init_pause_thresholds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gem_init_pause_thresholds
_gem_init_pause_thresholds:             ; @gem_init_pause_thresholds
	.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, x0
	ldr	w8, [x0]
	mov	x9, x8
	cmp	w8, #2049
	b.lt	LBB0_2
; %bb.1:
	ldr	w9, [x19, #12]
	add	w9, w9, #68
	and	w10, w9, #0xffffffc0
	sub	w9, w8, w10, lsl #1
	sub	w8, w9, w10
LBB0_2:
	stp	w9, w8, [x19, #4]
	ldp	x9, x8, [x19, #16]
	ldr	x8, [x8]
Lloh0:
	adrp	x10, _PCI_VENDOR_ID_APPLE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PCI_VENDOR_ID_APPLE@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
Lloh3:
	adrp	x11, _GREG_CFG_RONPAULBIT@GOTPAGE
Lloh4:
	ldr	x11, [x11, _GREG_CFG_RONPAULBIT@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
Lloh6:
	adrp	x12, _GREG_CFG_ENBUG2FIX@GOTPAGE
Lloh7:
	ldr	x12, [x12, _GREG_CFG_ENBUG2FIX@GOTPAGEOFF]
Lloh8:
	ldr	w12, [x12]
	orr	w11, w12, w11
	cmp	x8, x10
	csel	w8, w11, wzr, eq
Lloh9:
	adrp	x23, _GREG_CFG_IBURST@GOTPAGE
Lloh10:
	ldr	x23, [x23, _GREG_CFG_IBURST@GOTPAGEOFF]
	ldr	w10, [x23]
	orr	w8, w8, w10
Lloh11:
	adrp	x21, _GREG_CFG_TXDMALIM@GOTPAGE
Lloh12:
	ldr	x21, [x21, _GREG_CFG_TXDMALIM@GOTPAGEOFF]
	ldr	w10, [x21]
	and	w10, w10, #0x3e
	orr	w8, w8, w10
Lloh13:
	adrp	x22, _GREG_CFG_RXDMALIM@GOTPAGE
Lloh14:
	ldr	x22, [x22, _GREG_CFG_RXDMALIM@GOTPAGEOFF]
	ldr	w10, [x22]
	and	w10, w10, #0x7c0
	orr	w0, w8, w10
Lloh15:
	adrp	x20, _GREG_CFG@GOTPAGE
Lloh16:
	ldr	x20, [x20, _GREG_CFG@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x1, x8, x9
	bl	_writel
	ldr	x8, [x19, #16]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
	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	w8, [x21]
	and	w8, w8, #0x4
	ldr	w9, [x22]
	and	w9, w9, #0x200
	orr	w0, w9, w8
	ldr	x8, [x19, #16]
	ldr	x9, [x20]
	add	x1, x9, x8
	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
	b	_writel
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_VENDOR_ID_APPLE,8,3        ; @PCI_VENDOR_ID_APPLE
	.comm	_GREG_CFG_RONPAULBIT,4,2        ; @GREG_CFG_RONPAULBIT
	.comm	_GREG_CFG_ENBUG2FIX,4,2         ; @GREG_CFG_ENBUG2FIX
	.comm	_GREG_CFG_IBURST,4,2            ; @GREG_CFG_IBURST
	.comm	_GREG_CFG_TXDMALIM,4,2          ; @GREG_CFG_TXDMALIM
	.comm	_GREG_CFG_RXDMALIM,4,2          ; @GREG_CFG_RXDMALIM
	.comm	_GREG_CFG,8,3                   ; @GREG_CFG
	.no_dead_strip	_gem_init_pause_thresholds
.subsections_via_symbols
