	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2c_dw_set_reg_access          ## -- Begin function i2c_dw_set_reg_access
	.p2align	4, 0x90
_i2c_dw_set_reg_access:                 ## @i2c_dw_set_reg_access
	.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
	movq	%rdi, %rbx
	callq	_i2c_dw_acquire_lock
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movq	_DW_IC_COMP_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dw_readl
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_i2c_dw_release_lock
	movq	_DW_IC_COMP_TYPE_VALUE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_swab32
	cmpl	%eax, %r14d
	jne	LBB0_4
## %bb.2:
	movq	_ACCESS_SWAP@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_4:
	movl	(%r15), %ecx
	movzwl	%cx, %eax
	cmpl	%eax, %r14d
	jne	LBB0_6
## %bb.5:
	movq	_ACCESS_16BIT@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%eax, %eax
	cmpl	%ecx, %r14d
	je	LBB0_8
## %bb.7:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_DW_IC_COMP_TYPE,4,2            ## @DW_IC_COMP_TYPE
	.comm	_DW_IC_COMP_TYPE_VALUE,4,2      ## @DW_IC_COMP_TYPE_VALUE
	.comm	_ACCESS_SWAP,4,2                ## @ACCESS_SWAP
	.comm	_ACCESS_16BIT,4,2               ## @ACCESS_16BIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown Synopsys component type: 0x%08x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2c_dw_set_reg_access          ; -- Begin function i2c_dw_set_reg_access
	.p2align	2
_i2c_dw_set_reg_access:                 ; @i2c_dw_set_reg_access
	.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, x0
	bl	_i2c_dw_acquire_lock
	cbnz	w0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _DW_IC_COMP_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DW_IC_COMP_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dw_readl
	mov	x20, x0
	mov	x0, x19
	bl	_i2c_dw_release_lock
Lloh3:
	adrp	x21, _DW_IC_COMP_TYPE_VALUE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _DW_IC_COMP_TYPE_VALUE@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_swab32
	cmp	w20, w0
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
Lloh5:
	adrp	x8, _ACCESS_SWAP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ACCESS_SWAP@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
	ldr	w8, [x21]
	cmp	w20, w8, uxth
	b.ne	LBB0_7
; %bb.4:
	mov	w0, #0
Lloh7:
	adrp	x8, _ACCESS_16BIT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ACCESS_16BIT@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_6:
	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
LBB0_7:
	cmp	w20, w8
	b.ne	LBB0_9
; %bb.8:
	mov	w0, #0
	b	LBB0_6
LBB0_9:
	ldr	w0, [x19]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DW_IC_COMP_TYPE,4,2            ; @DW_IC_COMP_TYPE
	.comm	_DW_IC_COMP_TYPE_VALUE,4,2      ; @DW_IC_COMP_TYPE_VALUE
	.comm	_ACCESS_SWAP,4,2                ; @ACCESS_SWAP
	.comm	_ACCESS_16BIT,4,2               ; @ACCESS_16BIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown Synopsys component type: 0x%08x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
.subsections_via_symbols
