	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_i2c_xfer
_xgbe_i2c_xfer:                         ## @xgbe_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
	movq	%rsi, %r13
	movq	%rdi, %rbx
	callq	_mutex_lock
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_reinit_completion
	movq	%rbx, %rdi
	callq	_xgbe_i2c_disable
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	jmp	LBB0_14
LBB0_2:
	leaq	16(%rbx), %r12
	movl	8(%r13), %esi
	movq	%rbx, %rdi
	callq	_xgbe_i2c_set_target
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	%r13, 40(%rbx)
	movq	(%r13), %xmm0                   ## xmm0 = mem[0],zero
	pshufd	$68, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,0,1]
	movdqu	%xmm0, 24(%rbx)
	movq	%rbx, %rdi
	callq	_xgbe_i2c_clear_all_interrupts
	movq	%rbx, %rdi
	callq	_xgbe_i2c_enable
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	movl	4(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_err
	jmp	LBB0_14
LBB0_4:
	movq	%rbx, %rdi
	callq	_xgbe_i2c_enable_interrupts
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	(%r12), %r14d
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.8:
	movl	20(%rbx), %eax
	movq	_IC_TX_ABRT_7B_ADDR_NOACK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.9:
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_5:
	movl	4(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_netdev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_7:
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_10:
	movq	_IC_TX_ABRT_ARB_LOST@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.11:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_13:
	movq	%rbx, %rdi
	callq	_xgbe_i2c_disable_interrupts
	movq	%rbx, %rdi
	callq	_xgbe_i2c_disable
LBB0_14:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to disable i2c master\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to enable i2c master\n"

	.comm	_HZ,4,2                         ## @HZ
L_.str.2:                               ## @.str.2
	.asciz	"i2c operation timed out\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_IC_TX_ABRT_7B_ADDR_NOACK,4,2   ## @IC_TX_ABRT_7B_ADDR_NOACK
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.comm	_IC_TX_ABRT_ARB_LOST,4,2        ## @IC_TX_ABRT_ARB_LOST
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_xgbe_i2c_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgbe_i2c_xfer
_xgbe_i2c_xfer:                         ; @xgbe_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	x23, x1
	mov	x19, x0
	bl	_mutex_lock
	add	x21, x19, #8
	mov	x0, x21
	bl	_reinit_completion
	mov	x0, x19
	bl	_xgbe_i2c_disable
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	b	LBB0_13
LBB0_2:
	add	x22, x19, #16
	ldr	w1, [x23, #8]
	mov	x0, x19
	bl	_xgbe_i2c_set_target
	mov	x0, x22
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	str	x23, [x19, #40]
	ldr	d0, [x23]
	mov.d	v0[1], v0[0]
	stur	q0, [x19, #24]
	mov	x0, x19
	bl	_xgbe_i2c_clear_all_interrupts
	mov	x0, x19
	bl	_xgbe_i2c_enable
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
	ldr	w0, [x19, #4]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_err
	b	LBB0_13
LBB0_4:
	mov	x0, x19
	bl	_xgbe_i2c_enable_interrupts
Lloh4:
	adrp	x8, _HZ@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_8
; %bb.5:
	ldr	w20, [x22]
	cbz	w20, LBB0_12
; %bb.6:
	ldr	w8, [x19, #20]
Lloh7:
	adrp	x9, _IC_TX_ABRT_7B_ADDR_NOACK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _IC_TX_ABRT_7B_ADDR_NOACK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.7:
Lloh10:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:
	ldr	w0, [x19, #4]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_netdev_err
Lloh14:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh16:
	adrp	x9, _IC_TX_ABRT_ARB_LOST@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IC_TX_ABRT_ARB_LOST@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.10:
Lloh19:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_12:
	mov	x0, x19
	bl	_xgbe_i2c_disable_interrupts
	mov	x0, x19
	bl	_xgbe_i2c_disable
LBB0_13:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to disable i2c master\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to enable i2c master\n"

	.comm	_HZ,4,2                         ; @HZ
l_.str.2:                               ; @.str.2
	.asciz	"i2c operation timed out\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_IC_TX_ABRT_7B_ADDR_NOACK,4,2   ; @IC_TX_ABRT_7B_ADDR_NOACK
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.comm	_IC_TX_ABRT_ARB_LOST,4,2        ; @IC_TX_ABRT_ARB_LOST
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_xgbe_i2c_xfer
.subsections_via_symbols
