	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcms_c_duty_cycle_set
_brcms_c_duty_cycle_set:                ## @brcms_c_duty_cycle_set
	.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
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r15
	testl	%edx, %edx
	jne	LBB0_1
## %bb.2:
	movq	_M_TX_IDLE_BUSY_RATIO_X_16_CCK@GOTPCREL(%rip), %rax
	cmpl	$101, %ebx
	jae	LBB0_4
LBB0_5:
	movl	(%rax), %esi
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.7:
	movl	%ebx, %edx
	shll	$4, %edx
	movl	$1600, %eax                     ## imm = 0x640
	subl	%edx, %eax
                                        ## kill: def $ax killed $ax killed $eax
	xorl	%edx, %edx
	divw	%bx
	movzwl	%ax, %edx
	testl	%ecx, %ecx
	je	LBB0_10
LBB0_9:
	movq	16(%r15), %rdi
	callq	_brcms_b_write_shm
LBB0_10:
	movl	%ebx, %eax
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.11:
	movq	%rax, 8(%r15)
	jmp	LBB0_13
LBB0_1:
	movq	_M_TX_IDLE_BUSY_RATIO_X_16_OFDM@GOTPCREL(%rip), %rax
	cmpl	$101, %ebx
	jb	LBB0_5
LBB0_4:
	movq	16(%r15), %rax
	movq	24(%r15), %rcx
	movl	(%rax), %edi
	movl	(%rcx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_brcms_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_6:
	xorl	%edx, %edx
	testl	%ecx, %ecx
	jne	LBB0_9
	jmp	LBB0_10
LBB0_12:
	movq	%rax, (%r15)
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_M_TX_IDLE_BUSY_RATIO_X_16_OFDM,4,2 ## @M_TX_IDLE_BUSY_RATIO_X_16_OFDM
	.comm	_M_TX_IDLE_BUSY_RATIO_X_16_CCK,4,2 ## @M_TX_IDLE_BUSY_RATIO_X_16_CCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wl%d:  duty cycle value off limit\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_brcms_c_duty_cycle_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcms_c_duty_cycle_set
_brcms_c_duty_cycle_set:                ; @brcms_c_duty_cycle_set
	.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	x19, x0
Lloh0:
	adrp	x8, _M_TX_IDLE_BUSY_RATIO_X_16_OFDM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M_TX_IDLE_BUSY_RATIO_X_16_OFDM@GOTPAGEOFF]
Lloh2:
	adrp	x9, _M_TX_IDLE_BUSY_RATIO_X_16_CCK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _M_TX_IDLE_BUSY_RATIO_X_16_CCK@GOTPAGEOFF]
	cmp	w2, #0
	csel	x8, x9, x8, eq
	cmp	w1, #101
	b.lo	LBB0_2
; %bb.1:
	ldp	x8, x9, [x19, #16]
	ldr	w0, [x8]
	ldr	w2, [x9]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcms_err
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_2:
	mov	x20, x2
	mov	x21, x1
	cbz	w1, LBB0_7
; %bb.3:
	and	w9, w21, #0xffff
	mov	w10, #1600
	sub	w10, w10, w21, lsl #4
	and	w10, w10, #0xfff0
	udiv	w2, w10, w9
	cbz	w3, LBB0_5
LBB0_4:
	ldr	w1, [x8]
	ldr	x0, [x19, #16]
	bl	_brcms_b_write_shm
LBB0_5:
	mov	w8, w21
	mov	w0, #0
	cbz	w20, LBB0_8
; %bb.6:
	str	x8, [x19, #8]
	b	LBB0_9
LBB0_7:
	mov	x2, #0
	cbnz	w3, LBB0_4
	b	LBB0_5
LBB0_8:
	str	x8, [x19]
LBB0_9:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_M_TX_IDLE_BUSY_RATIO_X_16_OFDM,4,2 ; @M_TX_IDLE_BUSY_RATIO_X_16_OFDM
	.comm	_M_TX_IDLE_BUSY_RATIO_X_16_CCK,4,2 ; @M_TX_IDLE_BUSY_RATIO_X_16_CCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wl%d:  duty cycle value off limit\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_brcms_c_duty_cycle_set
.subsections_via_symbols
