	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gas_query_new_dialog_token
_gas_query_new_dialog_token:            ## @gas_query_new_dialog_token
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	_gas_query_new_dialog_token.next_start(%rip), %eax
	movl	%ebx, %edx
	addl	%eax, %edx
	leal	255(%rbx,%rax), %eax
	cmovnsl	%edx, %eax
	andl	$-256, %eax
	subl	%eax, %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_gas_query_dialog_token_available
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	cmpl	$256, %ebx                      ## imm = 0x100
	jne	LBB0_1
## %bb.3:
	movl	$-1, %eax
	jmp	LBB0_5
LBB0_4:
	movl	_gas_query_new_dialog_token.next_start(%rip), %eax
	leal	(%rax,%rbx), %ecx
	addl	$255, %ecx
                                        ## kill: def $eax killed $eax killed $rax def $rax
	addl	%ebx, %eax
	cmovnsl	%eax, %ecx
	andl	$-256, %ecx
	subl	%ecx, %eax
	leal	1(%rax), %ecx
	leal	256(%rax), %edx
	testw	%cx, %cx
	cmovnsl	%ecx, %edx
	andl	$-256, %edx
	negl	%edx
	leal	(%rax,%rdx), %ecx
	incl	%ecx
	movswl	%cx, %ecx
	movl	%ecx, _gas_query_new_dialog_token.next_start(%rip)
LBB0_5:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_gas_query_new_dialog_token.next_start,4,2 ## @gas_query_new_dialog_token.next_start
	.no_dead_strip	_gas_query_new_dialog_token
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gas_query_new_dialog_token
_gas_query_new_dialog_token:            ; @gas_query_new_dialog_token
	.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
	mov	x19, x1
	mov	x20, x0
	mov	w22, #0
	adrp	x21, _gas_query_new_dialog_token.next_start@PAGE
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21, _gas_query_new_dialog_token.next_start@PAGEOFF]
	add	w8, w22, w8
	negs	w9, w8
	and	w8, w8, #0xff
	and	w9, w9, #0xff
	csneg	w2, w8, w9, mi
	mov	x0, x20
	mov	x1, x19
	bl	_gas_query_dialog_token_available
	cbnz	x0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w22, w22, #1
	cmp	w22, #256
	b.ne	LBB0_1
; %bb.3:
	mov	w0, #-1
	b	LBB0_5
LBB0_4:
	ldr	w8, [x21, _gas_query_new_dialog_token.next_start@PAGEOFF]
	add	w8, w8, w22
	negs	w9, w8
	and	w8, w8, #0xff
	and	w9, w9, #0xff
	csneg	w0, w8, w9, mi
	add	w8, w0, #1
	sxth	w9, w8
	lsr	w9, w9, #23
	add	w9, w8, w9, uxtb
	and	w9, w9, #0xff00
	sub	w8, w8, w9
	sxth	w8, w8
	str	w8, [x21, _gas_query_new_dialog_token.next_start@PAGEOFF]
LBB0_5:
	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
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_gas_query_new_dialog_token.next_start,4,2 ; @gas_query_new_dialog_token.next_start
	.no_dead_strip	_gas_query_new_dialog_token
.subsections_via_symbols
