	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad_agg_selection_test
_ad_agg_selection_test:                 ## @ad_agg_selection_test
	.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
	movq	%rsi, %rbx
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.1:
	movq	%rdi, %r14
	cmpq	$0, 16(%rbx)
	movq	16(%rdi), %rax
	je	LBB0_2
## %bb.3:
	testq	%rax, %rax
	jne	LBB0_4
	jmp	LBB0_15
LBB0_2:
	testq	%rax, %rax
	jne	LBB0_16
LBB0_4:
	movq	%rbx, %rdi
	callq	___agg_has_partner
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	___agg_has_partner
	testq	%rax, %rax
	je	LBB0_16
LBB0_6:
	movq	%rbx, %rdi
	callq	___agg_has_partner
	testq	%rax, %rax
	je	LBB0_7
LBB0_8:
	movl	(%rbx), %edi
	callq	___get_agg_selection_mode
	cmpl	$128, %eax
	je	LBB0_13
## %bb.9:
	cmpl	$130, %eax
	je	LBB0_13
## %bb.10:
	cmpl	$129, %eax
	jne	LBB0_14
## %bb.11:
	movq	%rbx, %rdi
	callq	___agg_active_ports
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	___agg_active_ports
	cmpl	%eax, %r15d
	jg	LBB0_16
## %bb.12:
	movq	%rbx, %rdi
	callq	___agg_active_ports
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	___agg_active_ports
	cmpl	%eax, %r15d
	jl	LBB0_15
LBB0_13:
	movq	%rbx, %rdi
	callq	___get_agg_bandwidth
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	___get_agg_bandwidth
	cmpl	%eax, %r15d
	jle	LBB0_15
	jmp	LBB0_16
LBB0_7:
	movq	%r14, %rdi
	callq	___agg_has_partner
	testq	%rax, %rax
	jne	LBB0_15
	jmp	LBB0_8
LBB0_14:
	movq	8(%rbx), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %r15d
	movl	(%rcx), %r12d
	movl	(%rbx), %edi
	callq	___get_agg_selection_mode
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_net_warn_ratelimited
LBB0_15:
	movq	%r14, %rbx
LBB0_16:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: (slave %s): Impossible agg select mode %d\n"

	.no_dead_strip	_ad_agg_selection_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad_agg_selection_test
_ad_agg_selection_test:                 ; @ad_agg_selection_test
	.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, x1
	cbz	x0, LBB0_16
; %bb.1:
	mov	x20, x0
	ldr	x9, [x19, #16]
	ldr	x8, [x0, #16]
	cbz	x9, LBB0_3
; %bb.2:
	cbnz	x8, LBB0_4
	b	LBB0_15
LBB0_3:
	cbnz	x8, LBB0_16
LBB0_4:
	mov	x0, x19
	bl	___agg_has_partner
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x20
	bl	___agg_has_partner
	cbz	x0, LBB0_16
LBB0_6:
	mov	x0, x19
	bl	___agg_has_partner
	cbz	x0, LBB0_13
LBB0_7:
	ldr	w0, [x19]
	bl	___get_agg_selection_mode
	cmp	w0, #128
	b.eq	LBB0_12
; %bb.8:
	cmp	w0, #130
	b.eq	LBB0_12
; %bb.9:
	cmp	w0, #129
	b.ne	LBB0_14
; %bb.10:
	mov	x0, x19
	bl	___agg_active_ports
	mov	x21, x0
	mov	x0, x20
	bl	___agg_active_ports
	cmp	w21, w0
	b.gt	LBB0_16
; %bb.11:
	mov	x0, x19
	bl	___agg_active_ports
	mov	x21, x0
	mov	x0, x20
	bl	___agg_active_ports
	cmp	w21, w0
	b.lt	LBB0_15
LBB0_12:
	mov	x0, x19
	bl	___get_agg_bandwidth
	mov	x21, x0
	mov	x0, x20
	bl	___get_agg_bandwidth
	cmp	w21, w0
	b.le	LBB0_15
	b	LBB0_16
LBB0_13:
	mov	x0, x20
	bl	___agg_has_partner
	cbnz	x0, LBB0_15
	b	LBB0_7
LBB0_14:
	ldr	x8, [x19, #8]
	ldp	x8, x9, [x8]
	ldr	x9, [x9]
	ldr	w21, [x9]
	ldr	w22, [x8]
	ldr	w0, [x19]
	bl	___get_agg_selection_mode
	mov	x3, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x22
	bl	_net_warn_ratelimited
LBB0_15:
	mov	x19, x20
LBB0_16:
	mov	x0, x19
	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 AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: (slave %s): Impossible agg select mode %d\n"

	.no_dead_strip	_ad_agg_selection_test
.subsections_via_symbols
