	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nmk_i2c_xfer_one
_nmk_i2c_xfer_one:                      ## @nmk_i2c_xfer_one
	.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, %r15
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_I2C_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r15)
	movq	%r15, %rdi
	callq	_read_i2c
	jmp	LBB0_3
LBB0_2:
	movq	_I2C_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r15)
	movq	%r15, %rdi
	callq	_write_i2c
LBB0_3:
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	cmpl	$0, (%r15)
	je	LBB0_5
LBB0_6:
	movq	_I2C_SR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	movl	%eax, %ebx
	notl	%eax
	testb	$12, %al
	jne	LBB0_11
## %bb.7:
	shrl	$4, %ebx
	andl	$7, %ebx
	movq	8(%r15), %r12
	movq	_abort_causes@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jge	LBB0_8
## %bb.9:
	movq	(%r13), %rax
	movl	%ebx, %ecx
	movq	(%rax,%rcx,8), %rdx
	jmp	LBB0_10
LBB0_8:
	leaq	L_.str.1(%rip), %rdx
LBB0_10:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
LBB0_11:
	movq	%r15, %rdi
	callq	_init_hw
	testl	%r14d, %r14d
	jne	LBB0_13
## %bb.12:
	movl	(%r15), %r14d
	jmp	LBB0_13
LBB0_5:
	xorl	%r14d, %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_I2C_READ,4,2                   ## @I2C_READ
	.comm	_I2C_WRITE,4,2                  ## @I2C_WRITE
	.comm	_I2C_SR,8,3                     ## @I2C_SR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s\n"

	.comm	_abort_causes,8,3               ## @abort_causes
L_.str.1:                               ## @.str.1
	.asciz	"unknown reason"

	.no_dead_strip	_nmk_i2c_xfer_one
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nmk_i2c_xfer_one
_nmk_i2c_xfer_one:                      ; @nmk_i2c_xfer_one
	.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
Lloh0:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _I2C_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I2C_READ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	mov	x0, x19
	bl	_read_i2c
	mov	x20, x0
	cbnz	w0, LBB0_4
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _I2C_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I2C_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	mov	x0, x19
	bl	_write_i2c
	mov	x20, x0
	cbnz	w0, LBB0_4
LBB0_3:
	ldr	w8, [x19]
	cbz	w8, LBB0_11
LBB0_4:
	ldr	x8, [x19, #16]
Lloh9:
	adrp	x9, _I2C_SR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _I2C_SR@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mvn	w8, w0
	tst	w8, #0xc
	b.ne	LBB0_9
; %bb.5:
	ubfx	w22, w0, #4, #3
	ldr	x21, [x19, #8]
Lloh12:
	adrp	x23, _abort_causes@GOTPAGE
Lloh13:
	ldr	x23, [x23, _abort_causes@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w22, w0
	b.ge	LBB0_7
; %bb.6:
	ldr	x8, [x23]
	ldr	x2, [x8, w22, uxtw #3]
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_8:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
LBB0_9:
	mov	x0, x19
	bl	_init_hw
	cbnz	w20, LBB0_12
; %bb.10:
	ldr	w20, [x19]
	b	LBB0_12
LBB0_11:
	mov	w20, #0
LBB0_12:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_I2C_READ,4,2                   ; @I2C_READ
	.comm	_I2C_WRITE,4,2                  ; @I2C_WRITE
	.comm	_I2C_SR,8,3                     ; @I2C_SR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s\n"

	.comm	_abort_causes,8,3               ; @abort_causes
l_.str.1:                               ; @.str.1
	.asciz	"unknown reason"

	.no_dead_strip	_nmk_i2c_xfer_one
.subsections_via_symbols
