	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_i2c_bus_acquire           ## -- Begin function nvkm_i2c_bus_acquire
	.p2align	4, 0x90
_nvkm_i2c_bus_acquire:                  ## @nvkm_i2c_bus_acquire
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	leaq	L_.str(%rip), %rsi
	callq	_BUS_TRACE
	movq	%rbx, %rdi
	callq	_mutex_lock
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_NVKM_I2C_PAD_I2C@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_nvkm_i2c_pad_acquire
	movl	%eax, %r14d
	testl	%r14d, %r14d
	je	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	testl	%r14d, %r14d
	jne	LBB0_4
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"acquire"

	.comm	_NVKM_I2C_PAD_I2C,4,2           ## @NVKM_I2C_PAD_I2C
	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_i2c_bus_acquire           ; -- Begin function nvkm_i2c_bus_acquire
	.p2align	2
_nvkm_i2c_bus_acquire:                  ; @nvkm_i2c_bus_acquire
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_BUS_TRACE
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _NVKM_I2C_PAD_I2C@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NVKM_I2C_PAD_I2C@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_nvkm_i2c_pad_acquire
	mov	x20, x0
	cbz	w20, LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
	cbnz	w20, LBB0_2
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"acquire"

	.comm	_NVKM_I2C_PAD_I2C,4,2           ; @NVKM_I2C_PAD_I2C
	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
