	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_atom_output_lock        ## -- Begin function radeon_atom_output_lock
	.p2align	4, 0x90
_radeon_atom_output_lock:               ## @radeon_atom_output_lock
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	movq	(%rbx), %rax
	movq	_CHIP_R600@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jge	LBB0_1
## %bb.2:
	movq	_RADEON_BIOS_6_SCRATCH@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_R600_BIOS_6_SCRATCH@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edi
	callq	_RREG32
	movq	_ATOM_S6_CRITICAL_STATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.4:
	orl	%eax, %ecx
	movq	_ATOM_S6_ACC_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%ecx, %eax
	jmp	LBB0_6
LBB0_5:
	notl	%ecx
	andl	%ecx, %eax
	movq	_ATOM_S6_ACC_MODE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
LBB0_6:
	movq	(%rbx), %rcx
	cmpq	(%r15), %rcx
	jge	LBB0_7
## %bb.8:
	movq	_RADEON_BIOS_6_SCRATCH@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_7:
	movq	_R600_BIOS_6_SCRATCH@GOTPCREL(%rip), %rcx
LBB0_9:
	movl	(%rcx), %edi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_R600,8,3                  ## @CHIP_R600
	.comm	_R600_BIOS_6_SCRATCH,4,2        ## @R600_BIOS_6_SCRATCH
	.comm	_RADEON_BIOS_6_SCRATCH,4,2      ## @RADEON_BIOS_6_SCRATCH
	.comm	_ATOM_S6_CRITICAL_STATE,4,2     ## @ATOM_S6_CRITICAL_STATE
	.comm	_ATOM_S6_ACC_MODE,4,2           ## @ATOM_S6_ACC_MODE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_atom_output_lock        ; -- Begin function radeon_atom_output_lock
	.p2align	2
_radeon_atom_output_lock:               ; @radeon_atom_output_lock
	.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
	ldr	x8, [x0]
	ldr	x20, [x8]
	ldr	x8, [x20]
Lloh0:
	adrp	x21, _CHIP_R600@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CHIP_R600@GOTPAGEOFF]
Lloh2:
	adrp	x22, _RADEON_BIOS_6_SCRATCH@GOTPAGE
Lloh3:
	ldr	x22, [x22, _RADEON_BIOS_6_SCRATCH@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh4:
	adrp	x23, _R600_BIOS_6_SCRATCH@GOTPAGE
Lloh5:
	ldr	x23, [x23, _R600_BIOS_6_SCRATCH@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x22, x23, lt
	ldr	w0, [x8]
	bl	_RREG32
Lloh6:
	adrp	x8, _ATOM_S6_CRITICAL_STATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATOM_S6_CRITICAL_STATE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cbz	w19, LBB0_2
; %bb.1:
	orr	w8, w8, w0
Lloh9:
	adrp	x9, _ATOM_S6_ACC_MODE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ATOM_S6_ACC_MODE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	bic	w1, w8, w9
	b	LBB0_3
LBB0_2:
	bic	w8, w0, w8
Lloh12:
	adrp	x9, _ATOM_S6_ACC_MODE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ATOM_S6_ACC_MODE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w1, w8, w9
LBB0_3:
	ldr	x8, [x20]
	ldr	x9, [x21]
	cmp	x8, x9
	csel	x8, x22, x23, lt
	ldr	w0, [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	_WREG32
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_R600,8,3                  ; @CHIP_R600
	.comm	_R600_BIOS_6_SCRATCH,4,2        ; @R600_BIOS_6_SCRATCH
	.comm	_RADEON_BIOS_6_SCRATCH,4,2      ; @RADEON_BIOS_6_SCRATCH
	.comm	_ATOM_S6_CRITICAL_STATE,4,2     ; @ATOM_S6_CRITICAL_STATE
	.comm	_ATOM_S6_ACC_MODE,4,2           ; @ATOM_S6_ACC_MODE
.subsections_via_symbols
