	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nic_set_tx_pkt_pad
_nic_set_tx_pkt_pad:                    ## @nic_set_tx_pkt_pad
	.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
	cmpl	$52, %esi
	movl	$52, %r15d
	cmovll	%esi, %r15d
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	movq	_PCI_SUBSYSTEM_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_pci_read_config_word
	movq	-48(%rbp), %rax
	movq	_PCI_SUBSYS_DEVID_81XX_NIC_PF@GOTPCREL(%rip), %rcx
	movq	(%r14), %rdx
	movl	(%rdx), %r13d
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	decl	%r13d
	movq	_MAX_LMAC_PER_BGX@GOTPCREL(%rip), %rax
	imull	(%rax), %r13d
	incl	%r13d
	testl	%r13d, %r13d
	jg	LBB0_4
	jmp	LBB0_6
LBB0_2:
	movq	_MAX_LMAC_PER_BGX@GOTPCREL(%rip), %rax
	imull	(%rax), %r13d
	testl	%r13d, %r13d
	jle	LBB0_6
LBB0_4:
	leal	3(%r15), %r12d
	testl	%r15d, %r15d
	cmovnsl	%r15d, %r12d
	andl	$-4, %r12d
	xorl	%ebx, %ebx
	movq	_NIC_PF_LMAC_0_7_CFG@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	orl	%ebx, %esi
	movq	%r14, %rdi
	callq	_nic_reg_read
	andl	$-61, %eax
	orl	%r12d, %eax
	movl	(%r15), %esi
	orl	%ebx, %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_nic_reg_write
	addl	$8, %ebx
	decl	%r13d
	jne	LBB0_5
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_SUBSYSTEM_ID,4,2           ## @PCI_SUBSYSTEM_ID
	.comm	_PCI_SUBSYS_DEVID_81XX_NIC_PF,8,3 ## @PCI_SUBSYS_DEVID_81XX_NIC_PF
	.comm	_MAX_LMAC_PER_BGX,4,2           ## @MAX_LMAC_PER_BGX
	.comm	_NIC_PF_LMAC_0_7_CFG,4,2        ## @NIC_PF_LMAC_0_7_CFG
	.no_dead_strip	_nic_set_tx_pkt_pad
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nic_set_tx_pkt_pad
_nic_set_tx_pkt_pad:                    ; @nic_set_tx_pkt_pad
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
	mov	w8, #52
	cmp	w1, #52
	csel	w21, w1, w8, lt
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x8, _PCI_SUBSYSTEM_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_SUBSYSTEM_ID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_pci_read_config_word
	ldr	x9, [sp, #8]
Lloh3:
	adrp	x8, _PCI_SUBSYS_DEVID_81XX_NIC_PF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_SUBSYS_DEVID_81XX_NIC_PF@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x8]
	ldr	x8, [x19]
	ldr	w8, [x8]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
	sub	w8, w8, #1
Lloh6:
	adrp	x9, _MAX_LMAC_PER_BGX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MAX_LMAC_PER_BGX@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w10, wzr, #0x1
	madd	w20, w8, w9, w10
	cmp	w20, #1
	b.ge	LBB0_3
	b	LBB0_5
LBB0_2:
Lloh9:
	adrp	x9, _MAX_LMAC_PER_BGX@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MAX_LMAC_PER_BGX@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	mul	w20, w9, w8
	cmp	w20, #1
	b.lt	LBB0_5
LBB0_3:
	mov	w22, #0
	add	w8, w21, #3
	cmp	w21, #0
	csel	w8, w8, w21, lt
	and	w21, w8, #0xfffffffc
Lloh12:
	adrp	x23, _NIC_PF_LMAC_0_7_CFG@GOTPAGE
Lloh13:
	ldr	x23, [x23, _NIC_PF_LMAC_0_7_CFG@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	orr	w1, w8, w22
	mov	x0, x19
	bl	_nic_reg_read
	and	w8, w0, #0xffffffc3
	orr	w2, w8, w21
	ldr	w8, [x23]
	orr	w1, w8, w22
	mov	x0, x19
	bl	_nic_reg_write
	add	w22, w22, #8
	subs	w20, w20, #1
	b.ne	LBB0_4
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_SUBSYSTEM_ID,4,2           ; @PCI_SUBSYSTEM_ID
	.comm	_PCI_SUBSYS_DEVID_81XX_NIC_PF,8,3 ; @PCI_SUBSYS_DEVID_81XX_NIC_PF
	.comm	_MAX_LMAC_PER_BGX,4,2           ; @MAX_LMAC_PER_BGX
	.comm	_NIC_PF_LMAC_0_7_CFG,4,2        ; @NIC_PF_LMAC_0_7_CFG
	.no_dead_strip	_nic_set_tx_pkt_pad
.subsections_via_symbols
