	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_nilfs2_btree_node_lookup
_grub_nilfs2_btree_node_lookup:         ## @grub_nilfs2_btree_node_lookup
	.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	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	8(%rdi), %edi
	callq	_grub_le_to_cpu16
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movl	%eax, %r13d
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	decl	%r13d
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	leal	-1(%rbx), %r13d
	cmpl	%r13d, %r14d
	jg	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r14,%r13), %eax
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_grub_nilfs2_btree_node_get_key
	cmpq	%r12, %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	1(%rbx), %r14d
	cmpl	%r13d, %r14d
	jle	LBB0_3
LBB0_9:
	xorl	%ecx, %ecx
	cmpq	%r12, %rax
	setge	%cl
	addl	%ecx, %ecx
	decl	%ecx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_1:
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
LBB0_10:
	movq	(%r15), %rax
	movq	_NILFS_BTREE_LEVEL_NODE_MIN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jle	LBB0_12
## %bb.11:
	testl	%ecx, %ecx
	setg	%al
	testl	%ebx, %ebx
	setg	%dl
	andb	%al, %dl
	movzbl	%dl, %eax
	negl	%eax
	jmp	LBB0_13
LBB0_4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	movl	$1, %eax
	jmp	LBB0_14
LBB0_12:
	movl	%ecx, %eax
	shrl	$31, %eax
LBB0_13:
	addl	%ebx, %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
	testl	%ecx, %ecx
	sete	%al
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NILFS_BTREE_LEVEL_NODE_MIN,8,3 ## @NILFS_BTREE_LEVEL_NODE_MIN
	.no_dead_strip	_grub_nilfs2_btree_node_lookup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_nilfs2_btree_node_lookup
_grub_nilfs2_btree_node_lookup:         ; @grub_nilfs2_btree_node_lookup
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	ldr	w0, [x0, #8]
	bl	_grub_le_to_cpu16
	subs	w23, w0, #1
	b.lt	LBB0_5
; %bb.1:
	mov	w24, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w23, w24
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w21, w8, #1
	mov	x0, x20
	mov	x1, x21
	bl	_grub_nilfs2_btree_node_get_key
	cmp	x0, x22
	b.eq	LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w8, w21, #1
	cmp	x0, x22
	csinc	w24, w24, w21, ge
	csel	w23, w23, w8, lt
	cmp	w24, w23
	b.le	LBB0_2
; %bb.4:
	cmp	x0, x22
	mov	w8, #-1
	cneg	w8, w8, ge
	b	LBB0_6
LBB0_5:
	mov	w21, #0
	mov	w8, #0
LBB0_6:
	ldr	x9, [x20]
Lloh0:
	adrp	x10, _NILFS_BTREE_LEVEL_NODE_MIN@GOTPAGE
Lloh1:
	ldr	x10, [x10, _NILFS_BTREE_LEVEL_NODE_MIN@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.le	LBB0_9
; %bb.7:
	cmp	w21, #0
	ccmp	w8, #0, #4, gt
	cset	w9, gt
	sbfx	w9, w9, #0, #1
	b	LBB0_10
LBB0_8:
	str	w21, [x19]
	mov	w0, #1
	b	LBB0_11
LBB0_9:
	lsr	w9, w8, #31
LBB0_10:
	add	w9, w9, w21
	str	w9, [x19]
	cmp	w8, #0
	cset	w0, eq
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NILFS_BTREE_LEVEL_NODE_MIN,8,3 ; @NILFS_BTREE_LEVEL_NODE_MIN
	.no_dead_strip	_grub_nilfs2_btree_node_lookup
.subsections_via_symbols
