	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mrb_random_genrand_int32       ## -- Begin function mrb_random_genrand_int32
	.p2align	4, 0x90
_mrb_random_genrand_int32:              ## @mrb_random_genrand_int32
	.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
	movq	%rdi, %r14
	movl	(%rdi), %eax
	movq	_N@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r11d
	cmpl	%r11d, %eax
	jge	LBB0_2
## %bb.1:
	movq	8(%r14), %rcx
	jmp	LBB0_10
LBB0_2:
	leal	1(%r11), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_4
## %bb.3:
	movl	$5489, %esi                     ## imm = 0x1571
	movq	%r14, %rdi
	callq	_mrb_random_init_genrand
	movl	(%rbx), %r11d
LBB0_4:
	movq	_M@GOTPCREL(%rip), %rax
	movslq	(%rax), %r8
	movl	%r11d, %r10d
	subl	%r8d, %r10d
	testl	%r10d, %r10d
	jle	LBB0_5
## %bb.11:
	movq	8(%r14), %rax
	movl	%r10d, %r13d
	movq	(%rax), %rdx
	leaq	(%rax,%r8,8), %rdi
	xorl	%esi, %esi
	movq	_UPPER_MASK@GOTPCREL(%rip), %r9
	movq	_LOWER_MASK@GOTPCREL(%rip), %r15
	leaq	_mrb_random_genrand_int32.mag01(%rip), %r12
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	andq	(%r9), %rdx
	movq	8(%rax,%rsi,8), %rbx
	movq	(%r15), %rcx
	andq	%rbx, %rcx
	orq	%rdx, %rcx
	movq	%rcx, %rdx
	shrq	%rdx
	andl	$1, %ecx
	movq	(%r12,%rcx,8), %rcx
	xorq	(%rdi,%rsi,8), %rcx
	xorq	%rdx, %rcx
	movq	%rcx, (%rax,%rsi,8)
	leaq	1(%rsi), %rcx
	movq	%rbx, %rdx
	movq	%rcx, %rsi
	cmpq	%rcx, %r13
	jne	LBB0_12
	jmp	LBB0_6
LBB0_5:
	xorl	%r10d, %r10d
LBB0_6:
	leal	-1(%r11), %r9d
	movq	8(%r14), %rcx
	cmpl	%r9d, %r10d
	jge	LBB0_9
## %bb.7:
	movl	%r8d, %eax
	subl	%r11d, %eax
	movl	%r10d, %edx
	cltq
	movl	%r9d, %esi
	leaq	(%rcx,%rax,8), %r12
	incq	%rdx
	negq	%rsi
	movq	_UPPER_MASK@GOTPCREL(%rip), %r10
	movq	_LOWER_MASK@GOTPCREL(%rip), %r11
	leaq	_mrb_random_genrand_int32.mag01(%rip), %r15
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r10), %rbx
	andq	-8(%rcx,%rdx,8), %rbx
	movl	%edx, %edi
	movq	(%r11), %rax
	andq	(%rcx,%rdi,8), %rax
	orq	%rbx, %rax
	movq	%rax, %rdi
	shrq	%rdi
	andl	$1, %eax
	movq	(%r15,%rax,8), %rax
	xorq	-8(%r12,%rdx,8), %rax
	xorq	%rdi, %rax
	movq	%rax, -8(%rcx,%rdx,8)
	leaq	(%rsi,%rdx), %rax
	incq	%rax
	incq	%rdx
	cmpq	$1, %rax
	jne	LBB0_8
LBB0_9:
	movslq	%r9d, %rax
	movq	_UPPER_MASK@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	andq	(%rcx,%rax,8), %rdx
	movq	_LOWER_MASK@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	andq	(%rcx), %rsi
	orq	%rdx, %rsi
	movq	%rsi, %rdx
	andl	$1, %esi
	leaq	_mrb_random_genrand_int32.mag01(%rip), %rdi
	movq	(%rdi,%rsi,8), %rsi
	xorq	-8(%rcx,%r8,8), %rsi
	shrq	%rdx
	xorq	%rdx, %rsi
	movq	%rsi, (%rcx,%rax,8)
	xorl	%eax, %eax
LBB0_10:
	leal	1(%rax), %edx
	movl	%edx, (%r14)
	cltq
	movq	(%rcx,%rax,8), %rax
	movq	%rax, %rcx
	shrq	$11, %rcx
	xorq	%rax, %rcx
	movl	%ecx, %eax
	andl	$20601005, %eax                 ## imm = 0x13A58AD
	shlq	$7, %rax
	xorq	%rcx, %rax
	movl	%eax, %ecx
	andl	$122764, %ecx                   ## imm = 0x1DF8C
	shlq	$15, %rcx
	xorq	%rax, %rcx
	movq	%rcx, %rax
	shrq	$18, %rax
	xorq	%rcx, %rax
	movq	%rax, 16(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @mrb_random_genrand_int32.mag01
_mrb_random_genrand_int32.mag01:
	.quad	0                               ## 0x0
	.quad	128                             ## 0x80

	.comm	_N,4,2                          ## @N
	.comm	_M,4,2                          ## @M
	.comm	_UPPER_MASK,8,3                 ## @UPPER_MASK
	.comm	_LOWER_MASK,8,3                 ## @LOWER_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mrb_random_genrand_int32       ; -- Begin function mrb_random_genrand_int32
	.p2align	2
_mrb_random_genrand_int32:              ; @mrb_random_genrand_int32
	.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
	mov	x19, x0
	ldr	w15, [x0]
Lloh0:
	adrp	x20, _N@GOTPAGE
Lloh1:
	ldr	x20, [x20, _N@GOTPAGEOFF]
	ldr	w14, [x20]
	cmp	w15, w14
	b.ge	LBB0_2
; %bb.1:
	ldr	x12, [x19, #8]
	b	LBB0_23
LBB0_2:
	add	w8, w14, #1
	cmp	w15, w8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #5489
	bl	_mrb_random_init_genrand
	ldr	w14, [x20]
LBB0_4:
Lloh2:
	adrp	x8, _M@GOTPAGE
Lloh3:
	ldr	x8, [x8, _M@GOTPAGEOFF]
Lloh4:
	ldrsw	x8, [x8]
Lloh5:
	adrp	x11, _UPPER_MASK@GOTPAGE
Lloh6:
	ldr	x11, [x11, _UPPER_MASK@GOTPAGEOFF]
	sub	w16, w14, w8
Lloh7:
	adrp	x10, _LOWER_MASK@GOTPAGE
Lloh8:
	ldr	x10, [x10, _LOWER_MASK@GOTPAGEOFF]
Lloh9:
	adrp	x9, _mrb_random_genrand_int32.mag01@PAGE
Lloh10:
	add	x9, x9, _mrb_random_genrand_int32.mag01@PAGEOFF
	cmp	w16, #1
	b.lt	LBB0_7
; %bb.5:
	ldr	x13, [x19, #8]
	ldr	x15, [x13]
	mov	x12, x16
	mov	x17, x13
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x11]
	and	x0, x0, x15
	ldr	x15, [x17, #8]!
	ldr	x1, [x10]
	and	x1, x1, x15
	orr	x0, x1, x0
	ldr	x1, [x13, x8, lsl #3]
	and	x2, x0, #0x1
	ldr	x2, [x9, x2, lsl #3]
	eor	x1, x2, x1
	eor	x0, x1, x0, lsr #1
	str	x0, [x13]
	mov	x13, x17
	subs	x12, x12, #1
	b.ne	LBB0_6
	b	LBB0_8
LBB0_7:
	mov	w16, #0
LBB0_8:
	sub	w13, w14, #1
	ldr	x12, [x19, #8]
	cmp	w16, w13
	b.ge	LBB0_22
; %bb.9:
	sub	w14, w8, w14
	mov	w17, w16
	sxtw	x14, w14
	sub	x15, x13, x17
	cmp	x15, #2
	b.lo	LBB0_19
; %bb.10:
	mvn	x0, x17
	add	x0, x0, x13
	mov	w1, #-2
	sub	w16, w1, w16
	cmp	w16, w0
	b.lo	LBB0_19
; %bb.11:
	lsr	x16, x0, #32
	cbnz	x16, LBB0_19
; %bb.12:
	add	x2, x12, x17, lsl #3
	add	x3, x12, x13, lsl #3
	add	x16, x2, #8
	add	x0, x3, #8
	add	x1, x14, x17
	add	x1, x12, x1, lsl #3
	add	x4, x14, x13
	add	x4, x12, x4, lsl #3
	add	x5, x11, #8
	cmp	x2, x0
	ccmp	x16, x3, #2, lo
	cset	w16, lo
	add	x0, x10, #8
	cmp	x2, x0
	ccmp	x3, x10, #0, lo
	cset	w0, hi
	cmp	x2, x4
	ccmp	x1, x3, #2, lo
	cset	w1, lo
	cmp	x3, x11
	ccmp	x2, x5, #2, hi
	b.lo	LBB0_19
; %bb.13:
	tbnz	w16, #0, LBB0_19
; %bb.14:
	tbnz	w0, #0, LBB0_19
; %bb.15:
	tbnz	w1, #0, LBB0_19
; %bb.16:
	and	x0, x15, #0xfffffffffffffffe
	add	x16, x0, x17
	add	x1, x12, x17, lsl #3
	add	x2, x17, #1
	add	x3, x14, x17
	mov	w17, #1
	dup.2d	v0, x17
	mov	x17, x0
	add	x3, x12, x3, lsl #3
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	q1, [x1]
	ldr	d2, [x11]
	dup.2d	v2, v2[0]
	and.16b	v1, v2, v1
	and	x4, x2, #0xffffffff
	lsl	x4, x4, #3
	ldr	q2, [x12, x4]
	ldr	d3, [x10]
	dup.2d	v3, v3[0]
	and.16b	v2, v3, v2
	orr.16b	v1, v2, v1
	ldr	q2, [x3], #16
	and.16b	v3, v1, v0
	mov.d	x4, v3[1]
	fmov	x5, d3
	add	x4, x9, x4, lsl #3
	ldr	d3, [x9, x5, lsl #3]
	ld1.d	{ v3 }[1], [x4]
	ushr.2d	v1, v1, #1
	eor3.16b	v1, v3, v2, v1
	str	q1, [x1], #16
	add	x2, x2, #2
	subs	x17, x17, #2
	b.ne	LBB0_17
; %bb.18:
	cmp	x15, x0
	b.ne	LBB0_20
	b	LBB0_22
LBB0_19:
	mov	x16, x17
LBB0_20:
	add	x14, x12, x14, lsl #3
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	lsl	x15, x16, #3
	ldr	x17, [x12, x15]
	ldr	x0, [x11]
	and	x17, x0, x17
	add	x16, x16, #1
	ldr	x0, [x12, w16, uxtw #3]
	ldr	x1, [x10]
	and	x0, x1, x0
	orr	x17, x0, x17
	ldr	x0, [x14, x15]
	and	x1, x17, #0x1
	ldr	x1, [x9, x1, lsl #3]
	eor	x0, x1, x0
	eor	x17, x0, x17, lsr #1
	str	x17, [x12, x15]
	cmp	x13, x16
	b.ne	LBB0_21
LBB0_22:
	mov	w15, #0
                                        ; kill: def $w13 killed $w13 killed $x13 def $x13
	sbfiz	x13, x13, #3, #32
	ldr	x14, [x12, x13]
	ldr	x11, [x11]
	and	x11, x11, x14
	ldr	x14, [x12]
	ldr	x10, [x10]
	and	x10, x10, x14
	orr	x10, x10, x11
	sub	w8, w8, #1
	ldr	x8, [x12, w8, sxtw #3]
	and	x11, x10, #0x1
	ldr	x9, [x9, x11, lsl #3]
	eor	x8, x9, x8
	eor	x8, x8, x10, lsr #1
	str	x8, [x12, x13]
LBB0_23:
	add	w8, w15, #1
	str	w8, [x19]
	ldr	x8, [x12, w15, sxtw #3]
	eor	x8, x8, x8, lsr #11
	lsl	w9, w8, #7
	mov	w10, #22144
	movk	w10, #40236, lsl #16
	and	x9, x9, x10
	eor	x8, x9, x8
	lsl	w9, w8, #15
	mov	w10, #-272236544
	and	x9, x9, x10
	eor	x8, x9, x8
	eor	x0, x8, x8, lsr #18
	str	x0, [x19, #16]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	3                               ; @mrb_random_genrand_int32.mag01
_mrb_random_genrand_int32.mag01:
	.quad	0                               ; 0x0
	.quad	128                             ; 0x80

	.comm	_N,4,2                          ; @N
	.comm	_M,4,2                          ; @M
	.comm	_UPPER_MASK,8,3                 ; @UPPER_MASK
	.comm	_LOWER_MASK,8,3                 ; @LOWER_MASK
.subsections_via_symbols
