	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_hw_i2c_xfer
_radeon_hw_i2c_xfer:                    ## @radeon_hw_i2c_xfer
	.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
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_i2c_get_adapdata
	movq	%rax, %r13
	movq	8(%rax), %rax
	movq	(%rax), %rbx
	movq	%r13, %rdi
	callq	_mutex_lock
	movl	(%rbx), %eax
	addl	$-128, %eax
	cmpl	$43, %eax
	ja	LBB0_8
## %bb.1:
	xorl	%ebx, %ebx
	movabsq	$16495928148479, %rcx           ## imm = 0xF00C1F001FF
	btq	%rax, %rcx
	jb	LBB0_5
## %bb.2:
	movabsq	$1083372986368, %rcx            ## imm = 0xFC3E0FE000
	btq	%rax, %rcx
	jae	LBB0_6
LBB0_3:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_r100_hw_i2c_xfer
LBB0_4:
	movl	%eax, %ebx
LBB0_5:
	movq	%r13, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpl	$0, 4(%r13)
	jne	LBB0_3
## %bb.7:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_r500_hw_i2c_xfer
	jmp	LBB0_4
LBB0_8:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c: unhandled radeon chip\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_radeon_hw_i2c_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_hw_i2c_xfer
_radeon_hw_i2c_xfer:                    ; @radeon_hw_i2c_xfer
	.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	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_i2c_get_adapdata
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x23, [x8]
	bl	_mutex_lock
	ldr	w8, [x23]
	sub	w8, w8, #128
	cmp	w8, #43
	b.hi	LBB0_8
; %bb.1:
	mov	w9, #1
	lsl	x9, x9, x8
	mov	x10, #511
	movk	x10, #49648, lsl #16
	movk	x10, #3840, lsl #32
	tst	x9, x10
	b.ne	LBB0_4
; %bb.2:
	mov	w9, #1
	lsl	x8, x9, x8
	mov	x9, #57344
	movk	x9, #15887, lsl #16
	movk	x9, #252, lsl #32
	tst	x8, x9
	b.eq	LBB0_6
LBB0_3:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_r100_hw_i2c_xfer
	mov	x20, x0
	b	LBB0_5
LBB0_4:
	mov	w20, #0
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
	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_6:
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_3
; %bb.7:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_r500_hw_i2c_xfer
	mov	x20, x0
	b	LBB0_5
LBB0_8:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c: unhandled radeon chip\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_radeon_hw_i2c_xfer
.subsections_via_symbols
