	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cocoa_input_find_any_button    ## -- Begin function cocoa_input_find_any_button
	.p2align	4, 0x90
_cocoa_input_find_any_button:           ## @cocoa_input_find_any_button
	.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
	movl	%edi, %r14d
	xorl	%eax, %eax
	callq	_input_driver_get_data
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.2:
	xorl	%eax, %eax
	callq	*8(%rcx)
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	-32(%rbp), %r15
	movl	%r14d, %edi
	movq	%r15, %rsi
	callq	*%rax
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_cocoa_input_find_any_button_ret
	cmpl	$-1, %eax
	jne	LBB0_9
LBB0_4:
	movq	(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.5:
	xorl	%eax, %eax
	callq	*8(%rcx)
	movq	(%rbx), %rcx
	cmpq	$0, (%rcx)
	movl	$-1, %eax
	je	LBB0_9
## %bb.6:
	xorl	%eax, %eax
	callq	*8(%rcx)
	movq	(%rbx), %rax
	leaq	-28(%rbp), %r15
	movl	%r14d, %edi
	movq	%r15, %rsi
	callq	*(%rax)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_cocoa_input_find_any_button_ret
	jmp	LBB0_9
LBB0_8:
	movl	$-1, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	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	_cocoa_input_find_any_button    ; -- Begin function cocoa_input_find_any_button
	.p2align	2
_cocoa_input_find_any_button:           ; @cocoa_input_find_any_button
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	bl	_input_driver_get_data
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x8, [x8, #8]
	blr	x8
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
	add	x1, sp, #12
	mov	x0, x19
	blr	x8
	add	x1, sp, #12
	mov	x0, x20
	mov	x2, x19
	bl	_cocoa_input_find_any_button_ret
	cmn	w0, #1
	b.ne	LBB0_8
LBB0_4:
	ldr	x8, [x20]
	cbz	x8, LBB0_7
; %bb.5:
	ldr	x8, [x8, #8]
	blr	x8
	ldr	x8, [x20]
	ldr	x9, [x8]
	cbz	x9, LBB0_7
; %bb.6:
	ldr	x8, [x8, #8]
	blr	x8
	ldr	x8, [x20]
	ldr	x8, [x8]
	add	x1, sp, #8
	mov	x0, x19
	blr	x8
	add	x1, sp, #8
	mov	x0, x20
	mov	x2, x19
	bl	_cocoa_input_find_any_button_ret
	b	LBB0_8
LBB0_7:
	mov	w0, #-1
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
