	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rwebpad_joypad_get_buttons
_rwebpad_joypad_get_buttons:            ## @rwebpad_joypad_get_buttons
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	leaq	-32(%rbp), %rsi
	callq	_emscripten_get_gamepad_status
	movq	_EMSCRIPTEN_RESULT_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.1:
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movl	%eax, %ecx
	cmpq	%rcx, %rbx
	jae	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-24(%rbp), %rcx
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_BIT256_SET_PTR
	movl	-32(%rbp), %eax
	jmp	LBB0_5
LBB0_6:
	movq	%r14, %rdi
	callq	_BIT256_CLEAR_ALL_PTR
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EMSCRIPTEN_RESULT_SUCCESS,8,3  ## @EMSCRIPTEN_RESULT_SUCCESS
	.no_dead_strip	_rwebpad_joypad_get_buttons
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rwebpad_joypad_get_buttons
_rwebpad_joypad_get_buttons:            ; @rwebpad_joypad_get_buttons
	.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, x1
	mov	x1, sp
	bl	_emscripten_get_gamepad_status
Lloh0:
	adrp	x8, _EMSCRIPTEN_RESULT_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EMSCRIPTEN_RESULT_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.1:
	ldr	w8, [sp]
	cbz	w8, LBB0_7
; %bb.2:
	mov	x20, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	cmp	x20, w8, uxtw
	b.hs	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [sp, #8]
	ldr	x9, [x9, x20, lsl #3]
	cbz	x9, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_BIT256_SET_PTR
	ldr	w8, [sp]
	b	LBB0_3
LBB0_6:
	mov	x0, x19
	bl	_BIT256_CLEAR_ALL_PTR
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EMSCRIPTEN_RESULT_SUCCESS,8,3  ; @EMSCRIPTEN_RESULT_SUCCESS
	.no_dead_strip	_rwebpad_joypad_get_buttons
.subsections_via_symbols
