	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __mlxsw_item_bit_array_offset
___mlxsw_item_bit_array_offset:         ## @__mlxsw_item_bit_array_offset
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	cmpl	$0, (%rbx)
	sete	%dil
LBB0_2:
	callq	_BUG_ON
	movl	4(%rbx), %r8d
	testb	$3, %r8b
	je	LBB0_4
## %bb.3:
	movl	(%rbx), %ecx
	jmp	LBB0_5
LBB0_4:
	movq	_BITS_PER_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %ecx
	movl	%esi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	LBB0_6
LBB0_5:
	movl	12(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r8d, %edx
	callq	_pr_err
	xorl	%eax, %eax
	callq	_BUG
	movl	(%rbx), %ecx
	movq	_BITS_PER_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_6:
	movl	8(%rbx), %eax
	shll	$3, %eax
	cltd
	idivl	%ecx
	movl	%eax, %edi
	movl	%r15d, %eax
	notl	%eax
	addl	%eax, %edi
	imull	%ecx, %edi
	sarl	$3, %edi
	movl	%esi, %eax
	cltd
	idivl	%ecx
	movl	%eax, %esi
	movl	%r15d, %eax
	cltd
	idivl	%esi
	imull	%ecx, %edx
	movl	%edx, (%r14)
	addl	4(%rbx), %edi
	movl	%edi, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BITS_PER_BYTE,4,2              ## @BITS_PER_BYTE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mlxsw: item bug (name=%s,offset=%x,element_size=%x)\n"

	.no_dead_strip	___mlxsw_item_bit_array_offset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __mlxsw_item_bit_array_offset
___mlxsw_item_bit_array_offset:         ; @__mlxsw_item_bit_array_offset
	.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, x2
	mov	x21, x1
	mov	x20, x0
	cbz	w1, LBB0_2
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, #0
	cset	w0, eq
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_BUG_ON
	ldr	w2, [x20, #4]
Lloh0:
	adrp	x22, _BITS_PER_BYTE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _BITS_PER_BYTE@GOTPAGEOFF]
	tst	w2, #0x3
	b.eq	LBB0_5
; %bb.4:
	ldr	w3, [x20]
	b	LBB0_6
LBB0_5:
	ldr	w8, [x22]
	ldr	w3, [x20]
	sdiv	w9, w8, w3
	msub	w9, w9, w3, w8
	cbz	w9, LBB0_7
LBB0_6:
	ldr	w1, [x20, #12]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	bl	_BUG
	ldr	w3, [x20]
	ldr	w8, [x22]
LBB0_7:
	ldr	w9, [x20, #8]
	lsl	w9, w9, #3
	sdiv	w9, w9, w3
	mvn	w10, w21
	add	w9, w9, w10
	mul	w9, w9, w3
	sdiv	w8, w8, w3
	sdiv	w10, w21, w8
	msub	w8, w10, w8, w21
	mul	w8, w8, w3
	str	w8, [x19]
	ldr	w8, [x20, #4]
	add	w0, w8, w9, asr #3
	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	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_BITS_PER_BYTE,4,2              ; @BITS_PER_BYTE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mlxsw: item bug (name=%s,offset=%x,element_size=%x)\n"

	.no_dead_strip	___mlxsw_item_bit_array_offset
.subsections_via_symbols
