	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_set_ldg_sid
_niu_set_ldg_sid:                       ## @niu_set_ldg_sid
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_NIU_LDG_MIN@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jle	LBB0_1
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_1:
	movl	%ecx, %r14d
	cmpl	$31, %ecx
	ja	LBB0_4
## %bb.2:
	movl	%edx, %ebx
	cmpl	$3, %edx
	ja	LBB0_4
## %bb.3:
	movq	_NIU_LDG_MAX@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jl	LBB0_4
## %bb.5:
	movl	%esi, %edi
	callq	_SID
	movq	_SID_FUNC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	orl	%r14d, %ebx
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_nw64
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NIU_LDG_MIN,4,2                ## @NIU_LDG_MIN
	.comm	_NIU_LDG_MAX,4,2                ## @NIU_LDG_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SID_FUNC_SHIFT,4,2             ## @SID_FUNC_SHIFT
	.no_dead_strip	_niu_set_ldg_sid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_set_ldg_sid
_niu_set_ldg_sid:                       ; @niu_set_ldg_sid
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _NIU_LDG_MIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NIU_LDG_MIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.le	LBB0_2
LBB0_1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	mov	x19, x3
	cmp	w3, #31
	b.hi	LBB0_1
; %bb.3:
	mov	x20, x2
	cmp	w2, #3
	b.hi	LBB0_1
; %bb.4:
Lloh6:
	adrp	x8, _NIU_LDG_MAX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NIU_LDG_MAX@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w1
	b.lt	LBB0_1
; %bb.5:
	mov	x0, x1
	bl	_SID
Lloh9:
	adrp	x8, _SID_FUNC_SHIFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SID_FUNC_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	lsl	w8, w20, w8
	orr	w1, w8, w19
	bl	_nw64
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_NIU_LDG_MIN,4,2                ; @NIU_LDG_MIN
	.comm	_NIU_LDG_MAX,4,2                ; @NIU_LDG_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SID_FUNC_SHIFT,4,2             ; @SID_FUNC_SHIFT
	.no_dead_strip	_niu_set_ldg_sid
.subsections_via_symbols
