	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8152_ioctl
_rtl8152_ioctl:                         ## @rtl8152_ioctl
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %rbx
	callq	_netdev_priv
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_if_mii
	movq	%rax, %r15
	movq	_RTL8152_UNPLUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r14), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_2:
	movl	(%r14), %edi
	callq	_usb_autopm_get_interface
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_15
## %bb.3:
	cmpl	$128, %r12d
	je	LBB0_9
## %bb.4:
	cmpl	$129, %r12d
	je	LBB0_7
## %bb.5:
	cmpl	$130, %r12d
	jne	LBB0_12
## %bb.6:
	movq	_R8152_PHY_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	jmp	LBB0_14
LBB0_9:
	movq	_CAP_NET_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	%r14, %r12
	addq	$4, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	(%r15), %edx
	movl	4(%r15), %esi
	movq	%r14, %rdi
	callq	_r8152_mdio_write
	jmp	LBB0_8
LBB0_7:
	movq	%r14, %r12
	addq	$4, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	4(%r15), %esi
	movq	%r14, %rdi
	callq	_r8152_mdio_read
	movl	%eax, 8(%r15)
LBB0_8:
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_14
LBB0_12:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_13:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	(%r14), %edi
	callq	_usb_autopm_put_interface
LBB0_15:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL8152_UNPLUG,4,2             ## @RTL8152_UNPLUG
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_R8152_PHY_ID,4,2               ## @R8152_PHY_ID
	.comm	_CAP_NET_ADMIN,4,2              ## @CAP_NET_ADMIN
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.no_dead_strip	_rtl8152_ioctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8152_ioctl
_rtl8152_ioctl:                         ; @rtl8152_ioctl
	.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	x22, x2
	mov	x20, x1
	bl	_netdev_priv
	mov	x19, x0
	mov	x0, x20
	bl	_if_mii
	mov	x21, x0
Lloh0:
	adrp	x8, _RTL8152_UNPLUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTL8152_UNPLUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_15
LBB0_2:
	ldr	w0, [x19]
	bl	_usb_autopm_get_interface
	mov	x20, x0
	tbnz	w0, #31, LBB0_15
; %bb.3:
	cmp	w22, #128
	b.eq	LBB0_7
; %bb.4:
	cmp	w22, #129
	b.eq	LBB0_9
; %bb.5:
	cmp	w22, #130
	b.ne	LBB0_11
; %bb.6:
Lloh6:
	adrp	x8, _R8152_PHY_ID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R8152_PHY_ID@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x21, #12]
	b	LBB0_14
LBB0_7:
Lloh9:
	adrp	x8, _CAP_NET_ADMIN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CAP_NET_ADMIN@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_12
; %bb.8:
	add	x22, x19, #4
	mov	x0, x22
	bl	_mutex_lock
	ldp	w2, w1, [x21]
	mov	x0, x19
	bl	_r8152_mdio_write
	b	LBB0_10
LBB0_9:
	add	x22, x19, #4
	mov	x0, x22
	bl	_mutex_lock
	ldr	w1, [x21, #4]
	mov	x0, x19
	bl	_r8152_mdio_read
	str	w0, [x21, #8]
LBB0_10:
	mov	x0, x22
	bl	_mutex_unlock
	b	LBB0_14
LBB0_11:
Lloh12:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh14:
	adrp	x8, _EPERM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_14:
	ldr	w0, [x19]
	bl	_usb_autopm_put_interface
LBB0_15:
	mov	x0, x20
	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
	.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 AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL8152_UNPLUG,4,2             ; @RTL8152_UNPLUG
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_R8152_PHY_ID,4,2               ; @R8152_PHY_ID
	.comm	_CAP_NET_ADMIN,4,2              ; @CAP_NET_ADMIN
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.no_dead_strip	_rtl8152_ioctl
.subsections_via_symbols
