	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_divmod64                  ## -- Begin function grub_divmod64
	.p2align	4, 0x90
_grub_divmod64:                         ## @grub_divmod64
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movq	%rdx, %r8
	cmpl	$-1, %edi
	je	LBB0_1
## %bb.9:
	movl	%edi, %eax
	cltd
	idivl	%esi
                                        ## kill: def $eax killed $eax def $rax
	testq	%r8, %r8
	je	LBB0_11
## %bb.10:
	movl	%edx, (%r8)
	jmp	LBB0_11
LBB0_1:
	movl	$-1, %r10d
	xorl	%edx, %edx
	movl	$-64, %r9d
	xorl	%eax, %eax
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rcx,%rax,4), %rcx
	shll	$2, %r10d
	movb	%bl, %dil
	movq	%rdi, %rax
	orq	%rcx, %rax
	subl	%r11d, %edx
	addl	$2, %r9d
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	shldl	$1, %r10d, %edx
	leal	(%r10,%r10), %edi
	xorl	%ecx, %ecx
	movl	$0, %ebx
	cmpl	%esi, %edx
	setae	%r11b
	jb	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%esi, %ebx
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	subl	%ebx, %edx
	shldl	$1, %edi, %edx
	movb	%r11b, %cl
	addq	%rcx, %rcx
	xorl	%edi, %edi
	movl	$0, %r11d
	cmpl	%esi, %edx
	setae	%bl
	jb	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%esi, %r11d
	jmp	LBB0_6
LBB0_7:
	testq	%r8, %r8
	je	LBB0_11
## %bb.8:
	movl	%edx, (%r8)
LBB0_11:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_divmod64                  ; -- Begin function grub_divmod64
	.p2align	2
_grub_divmod64:                         ; @grub_divmod64
	.cfi_startproc
; %bb.0:
	mov	x8, x0
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.1:
	sdiv	w0, w8, w1
	cbz	x2, LBB0_3
; %bb.2:
	msub	w8, w0, w1, w8
	str	w8, [x2]
LBB0_3:
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
LBB0_4:
	mov	w10, #0
	mov	x0, #0
	mov	w9, #-64
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	extr	w10, w10, w8, #31
	lsl	w8, w8, #1
	cmp	w10, w1
	csel	w11, wzr, w1, lo
	cset	w12, hs
	bfi	x12, x0, #1, #63
	mov	x0, x12
	sub	w10, w10, w11
	adds	w9, w9, #1
	b.lo	LBB0_5
; %bb.6:
	cbz	x2, LBB0_3
; %bb.7:
	str	w10, [x2]
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
