	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prism2_ioctl_giwrate
_prism2_ioctl_giwrate:                  ## @prism2_ioctl_giwrate
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %r15
	callq	_netdev_priv
	movq	(%rax), %rbx
	movq	8(%rbx), %rax
	movq	_HFA384X_RID_TXRATECONTROL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	movl	$2, %ecx
	movl	$1, %r8d
	callq	*(%rax)
	testq	%rax, %rax
	js	LBB0_13
## %bb.1:
	movl	-28(%rbp), %eax
	testb	$1, %al
	sete	%cl
	cmpl	$2, %eax
	setl	%al
	orb	%cl, %al
	movzbl	%al, %eax
	movl	%eax, (%r14)
	movq	(%rbx), %rax
	movq	_IW_MODE_MASTER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.2:
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	cmpl	$0, 24(%rbx)
	je	LBB0_4
LBB0_5:
	movq	8(%rbx), %rax
	movq	_HFA384X_RID_CURRENTTXRATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	movl	$2, %ecx
	movl	$1, %r8d
	callq	*(%rax)
	testq	%rax, %rax
	js	LBB0_13
## %bb.6:
	movl	-28(%rbp), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_12
## %bb.7:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_10:
	movl	$5500000, 4(%r14)               ## imm = 0x53EC60
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_4:
	movl	(%rax), %eax
	imull	$100000, %eax, %ecx             ## imm = 0x186A0
	testl	%eax, %eax
	movl	$11000000, %eax                 ## imm = 0xA7D8C0
	cmovgl	%ecx, %eax
	movl	%eax, 4(%r14)
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_12:
	movl	$11000000, 4(%r14)              ## imm = 0xA7D8C0
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	$2000000, 4(%r14)               ## imm = 0x1E8480
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_8:
	movl	$1000000, 4(%r14)               ## imm = 0xF4240
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_11:
	movl	$11000000, 4(%r14)              ## imm = 0xA7D8C0
	xorl	%eax, %eax
	jmp	LBB0_14
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_9
	.long	L0_0_set_8
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_HFA384X_RID_TXRATECONTROL,4,2  ## @HFA384X_RID_TXRATECONTROL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IW_MODE_MASTER,8,3             ## @IW_MODE_MASTER
	.comm	_HFA384X_RID_CURRENTTXRATE,4,2  ## @HFA384X_RID_CURRENTTXRATE
	.no_dead_strip	_prism2_ioctl_giwrate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prism2_ioctl_giwrate
_prism2_ioctl_giwrate:                  ; @prism2_ioctl_giwrate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x20, x0
	bl	_netdev_priv
	ldr	x21, [x0]
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _HFA384X_RID_TXRATECONTROL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HFA384X_RID_TXRATECONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #2
	mov	w4, #1
	blr	x8
	tbnz	x0, #63, LBB0_10
; %bb.1:
	ldr	w8, [sp, #12]
	tst	w8, #0x1
	ccmp	w8, #2, #8, ne
	cset	w8, lt
	str	w8, [x19]
	ldr	x8, [x21]
Lloh3:
	adrp	x9, _IW_MODE_MASTER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IW_MODE_MASTER@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w9, [x21, #24]
	cbz	w9, LBB0_8
LBB0_4:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _HFA384X_RID_CURRENTTXRATE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HFA384X_RID_CURRENTTXRATE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #2
	mov	w4, #1
	blr	x8
	tbnz	x0, #63, LBB0_10
; %bb.5:
	ldr	w8, [sp, #12]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_9
; %bb.6:
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_7
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_7:
	mov	w0, #0
	mov	w8, #60512
	movk	w8, #83, lsl #16
	str	w8, [x19, #4]
	b	LBB0_11
LBB0_8:
	mov	w0, #0
	ldr	w8, [x8]
	mov	w9, #34464
	movk	w9, #1, lsl #16
	mul	w9, w8, w9
	mov	w10, #55488
	movk	w10, #167, lsl #16
	cmp	w8, #0
	csel	w8, w9, w10, gt
	str	w8, [x19, #4]
	b	LBB0_11
LBB0_9:
	mov	w8, #55488
	movk	w8, #167, lsl #16
	str	w8, [x19, #4]
LBB0_10:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	add	sp, sp, #64
	ret
LBB0_12:
	mov	w0, #0
	mov	w8, #33920
	movk	w8, #30, lsl #16
	str	w8, [x19, #4]
	b	LBB0_11
LBB0_13:
	mov	w0, #0
	mov	w8, #16960
	movk	w8, #15, lsl #16
	str	w8, [x19, #4]
	b	LBB0_11
LBB0_14:
	mov	w0, #0
	mov	w8, #55488
	movk	w8, #167, lsl #16
	str	w8, [x19, #4]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_13-LBB0_7)>>2
	.byte	(LBB0_14-LBB0_7)>>2
                                        ; -- End function
	.comm	_HFA384X_RID_TXRATECONTROL,4,2  ; @HFA384X_RID_TXRATECONTROL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IW_MODE_MASTER,8,3             ; @IW_MODE_MASTER
	.comm	_HFA384X_RID_CURRENTTXRATE,4,2  ; @HFA384X_RID_CURRENTTXRATE
	.no_dead_strip	_prism2_ioctl_giwrate
.subsections_via_symbols
