	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdio_i2c_alloc                 ## -- Begin function mdio_i2c_alloc
	.p2align	4, 0x90
_mdio_i2c_alloc:                        ## @mdio_i2c_alloc
	.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, %r15
	movq	%rdi, %r14
	movq	_I2C_FUNC_I2C@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_mdiobus_alloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movl	24(%rax), %r12d
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r14, %rdi
	callq	_dev_name
	leaq	L_.str(%rip), %rdx
	movl	%r12d, %edi
	movl	%r13d, %esi
	movq	%rax, %rcx
	callq	_snprintf
	movq	%r14, 16(%rbx)
	movq	_i2c_mii_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	_i2c_mii_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%r15, (%rbx)
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movl	%r12d, %edi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_I2C,4,2               ## @I2C_FUNC_I2C
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c:%s"

	.comm	_i2c_mii_read,4,2               ## @i2c_mii_read
	.comm	_i2c_mii_write,4,2              ## @i2c_mii_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdio_i2c_alloc                 ; -- Begin function mdio_i2c_alloc
	.p2align	2
_mdio_i2c_alloc:                        ; @mdio_i2c_alloc
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _I2C_FUNC_I2C@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_FUNC_I2C@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i2c_check_functionality
	cbz	w0, LBB0_3
; %bb.1:
	bl	_mdiobus_alloc
	cbz	x0, LBB0_4
; %bb.2:
	mov	x21, x0
	ldr	w22, [x0, #24]
Lloh3:
	adrp	x8, _MII_BUS_ID_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MII_BUS_ID_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	mov	x0, x20
	bl	_dev_name
	mov	x3, x0
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	mov	x1, x23
	bl	_snprintf
	str	x20, [x21, #16]
Lloh8:
	adrp	x8, _i2c_mii_read@GOTPAGE
Lloh9:
	ldr	x8, [x8, _i2c_mii_read@GOTPAGEOFF]
Lloh10:
	adrp	x9, _i2c_mii_write@GOTPAGE
Lloh11:
	ldr	x9, [x9, _i2c_mii_write@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #8]
	str	x19, [x21]
	mov	x0, x21
	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_3:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_I2C,4,2               ; @I2C_FUNC_I2C
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c:%s"

	.comm	_i2c_mii_read,4,2               ; @i2c_mii_read
	.comm	_i2c_mii_write,4,2              ; @i2c_mii_write
.subsections_via_symbols
