	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen7_bsd_get_cmd_length_mask
_gen7_bsd_get_cmd_length_mask:          ## @gen7_bsd_get_cmd_length_mask
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rdi, %r8
	movq	_INSTR_CLIENT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarq	%cl, %rdi
	movq	_INSTR_SUBCLIENT_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	andq	%r8, %rdx
	movq	_INSTR_SUBCLIENT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarq	%cl, %rdx
	movq	_INSTR_26_TO_24_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	andq	%r8, %rsi
	movq	_INSTR_26_TO_24_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarq	%cl, %rsi
	movq	_INSTR_MI_CLIENT@GOTPCREL(%rip), %rcx
	movl	$63, %eax
	cmpq	(%rcx), %rdi
	je	LBB0_5
## %bb.1:
	movq	_INSTR_RC_CLIENT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_4
## %bb.2:
	movq	_INSTR_MEDIA_SUBCLIENT@GOTPCREL(%rip), %rcx
	movl	$255, %eax
	cmpq	(%rcx), %rdx
	jne	LBB0_5
## %bb.3:
	cmpq	$6, %rsi
	movl	$65535, %ecx                    ## imm = 0xFFFF
	movl	$4095, %eax                     ## imm = 0xFFF
	cmoveq	%rcx, %rax
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str(%rip), %rdi
	movq	%r8, %rsi
	callq	_DRM_DEBUG_DRIVER
	xorl	%eax, %eax
LBB0_5:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INSTR_CLIENT_SHIFT,8,3         ## @INSTR_CLIENT_SHIFT
	.comm	_INSTR_SUBCLIENT_MASK,8,3       ## @INSTR_SUBCLIENT_MASK
	.comm	_INSTR_SUBCLIENT_SHIFT,8,3      ## @INSTR_SUBCLIENT_SHIFT
	.comm	_INSTR_26_TO_24_MASK,8,3        ## @INSTR_26_TO_24_MASK
	.comm	_INSTR_26_TO_24_SHIFT,8,3       ## @INSTR_26_TO_24_SHIFT
	.comm	_INSTR_MI_CLIENT,8,3            ## @INSTR_MI_CLIENT
	.comm	_INSTR_RC_CLIENT,8,3            ## @INSTR_RC_CLIENT
	.comm	_INSTR_MEDIA_SUBCLIENT,8,3      ## @INSTR_MEDIA_SUBCLIENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CMD: Abnormal bsd cmd length! 0x%08X\n"

	.no_dead_strip	_gen7_bsd_get_cmd_length_mask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen7_bsd_get_cmd_length_mask
_gen7_bsd_get_cmd_length_mask:          ; @gen7_bsd_get_cmd_length_mask
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _INSTR_CLIENT_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INSTR_CLIENT_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	asr	x8, x0, x8
Lloh3:
	adrp	x9, _INSTR_MI_CLIENT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _INSTR_MI_CLIENT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #63
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x1, x0
Lloh6:
	adrp	x9, _INSTR_RC_CLIENT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _INSTR_RC_CLIENT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
Lloh9:
	adrp	x8, _INSTR_SUBCLIENT_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _INSTR_SUBCLIENT_MASK@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	and	x8, x8, x1
Lloh12:
	adrp	x9, _INSTR_SUBCLIENT_SHIFT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _INSTR_SUBCLIENT_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	asr	x8, x8, x9
Lloh15:
	adrp	x9, _INSTR_MEDIA_SUBCLIENT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _INSTR_MEDIA_SUBCLIENT@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
Lloh18:
	adrp	x8, _INSTR_26_TO_24_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _INSTR_26_TO_24_MASK@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	and	x8, x8, x1
Lloh21:
	adrp	x9, _INSTR_26_TO_24_SHIFT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _INSTR_26_TO_24_SHIFT@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	asr	x8, x8, x9
	mov	w9, #4095
	mov	w10, #65535
	cmp	x8, #6
	csel	x0, x10, x9, eq
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	mov	x0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	w0, #255
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_INSTR_CLIENT_SHIFT,8,3         ; @INSTR_CLIENT_SHIFT
	.comm	_INSTR_SUBCLIENT_MASK,8,3       ; @INSTR_SUBCLIENT_MASK
	.comm	_INSTR_SUBCLIENT_SHIFT,8,3      ; @INSTR_SUBCLIENT_SHIFT
	.comm	_INSTR_26_TO_24_MASK,8,3        ; @INSTR_26_TO_24_MASK
	.comm	_INSTR_26_TO_24_SHIFT,8,3       ; @INSTR_26_TO_24_SHIFT
	.comm	_INSTR_MI_CLIENT,8,3            ; @INSTR_MI_CLIENT
	.comm	_INSTR_RC_CLIENT,8,3            ; @INSTR_RC_CLIENT
	.comm	_INSTR_MEDIA_SUBCLIENT,8,3      ; @INSTR_MEDIA_SUBCLIENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CMD: Abnormal bsd cmd length! 0x%08X\n"

	.no_dead_strip	_gen7_bsd_get_cmd_length_mask
.subsections_via_symbols
