	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_ldn_irq_enable
_niu_ldn_irq_enable:                    ## @niu_ldn_irq_enable
	.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
	testl	%esi, %esi
	js	LBB0_2
## %bb.1:
	movq	_LDN_MAX@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jl	LBB0_2
## %bb.3:
	movl	%edx, %r14d
	cmpl	$63, %esi
	ja	LBB0_5
## %bb.4:
	movl	%esi, %edi
	callq	_LD_IM0
	movq	%rax, %r15
	movq	_LD_IM0_MASK@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_5:
	addl	$-64, %esi
	movl	%esi, %edi
	callq	_LD_IM1
	movq	%rax, %r15
	movq	_LD_IM1_MASK@GOTPCREL(%rip), %rax
LBB0_6:
	movq	(%rax), %rbx
	movq	%r15, %rdi
	callq	_nr64
	movq	%rbx, %rcx
	notq	%rcx
	andq	%rax, %rcx
	orq	%rax, %rbx
	testl	%r14d, %r14d
	cmovneq	%rcx, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_nw64
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LDN_MAX,4,2                    ## @LDN_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_LD_IM0_MASK,8,3                ## @LD_IM0_MASK
	.comm	_LD_IM1_MASK,8,3                ## @LD_IM1_MASK
	.no_dead_strip	_niu_ldn_irq_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_ldn_irq_enable
_niu_ldn_irq_enable:                    ; @niu_ldn_irq_enable
	.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
	tbnz	w1, #31, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _LDN_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDN_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.lt	LBB0_4
; %bb.2:
	mov	x19, x2
	cmp	w1, #63
	b.hi	LBB0_5
; %bb.3:
	mov	x0, x1
	bl	_LD_IM0
	mov	x20, x0
Lloh3:
	adrp	x8, _LD_IM0_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LD_IM0_MASK@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_5:
	sub	w0, w1, #64
	bl	_LD_IM1
	mov	x20, x0
Lloh8:
	adrp	x8, _LD_IM1_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LD_IM1_MASK@GOTPAGEOFF]
LBB0_6:
	ldr	x21, [x8]
	mov	x0, x20
	bl	_nr64
	bic	x8, x0, x21
	orr	x9, x0, x21
	cmp	w19, #0
	csel	x1, x9, x8, eq
	mov	x0, x20
	bl	_nw64
	mov	w0, #0
LBB0_7:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_LDN_MAX,4,2                    ; @LDN_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_LD_IM0_MASK,8,3                ; @LD_IM0_MASK
	.comm	_LD_IM1_MASK,8,3                ; @LD_IM1_MASK
	.no_dead_strip	_niu_ldn_irq_enable
.subsections_via_symbols
