	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sixaxis_set_operational_usb
_sixaxis_set_operational_usb:           ## @sixaxis_set_operational_usb
	.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	%rdi, %r14
	callq	_hid_get_drvdata
	movq	%rax, %rbx
	movq	_SIXAXIS_REPORT_0xF2_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_SIXAXIS_REPORT_0xF5_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_max
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	(%r15), %ecx
	movq	_HID_FEATURE_REPORT@GOTPCREL(%rip), %r15
	movl	(%r15), %r8d
	movq	_HID_REQ_GET_REPORT@GOTPCREL(%rip), %r13
	movl	(%r13), %r9d
	movq	%r14, %rdi
	movl	$242, %esi
	movq	%rax, %rdx
	callq	_hid_hw_raw_request
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_SIXAXIS_REPORT_0xF5_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r15), %r8d
	movl	(%r13), %r9d
	movq	%r14, %rdi
	movl	$245, %esi
	movq	%r12, %rdx
	callq	_hid_hw_raw_request
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:
	movq	_SHANWAN_GAMEPAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	jne	LBB0_10
## %bb.8:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_hid_hw_output_report
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_hid_info
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_3:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	movq	%r14, %rdi
	callq	_hid_err
LBB0_10:
	movq	%r12, %rdi
	callq	_kfree
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIXAXIS_REPORT_0xF2_SIZE,4,2   ## @SIXAXIS_REPORT_0xF2_SIZE
	.comm	_SIXAXIS_REPORT_0xF5_SIZE,4,2   ## @SIXAXIS_REPORT_0xF5_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HID_FEATURE_REPORT,4,2         ## @HID_FEATURE_REPORT
	.comm	_HID_REQ_GET_REPORT,4,2         ## @HID_REQ_GET_REPORT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't set operational mode: step 1\n"

L_.str.1:                               ## @.str.1
	.asciz	"can't set operational mode: step 2\n"

	.comm	_SHANWAN_GAMEPAD,4,2            ## @SHANWAN_GAMEPAD
L_.str.2:                               ## @.str.2
	.asciz	"can't set operational mode: step 3, ignoring\n"

	.no_dead_strip	_sixaxis_set_operational_usb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sixaxis_set_operational_usb
_sixaxis_set_operational_usb:           ; @sixaxis_set_operational_usb
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_hid_get_drvdata
	mov	x21, x0
Lloh0:
	adrp	x22, _SIXAXIS_REPORT_0xF2_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SIXAXIS_REPORT_0xF2_SIZE@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x23, _SIXAXIS_REPORT_0xF5_SIZE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SIXAXIS_REPORT_0xF5_SIZE@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_max
Lloh4:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	w3, [x22]
Lloh7:
	adrp	x24, _HID_FEATURE_REPORT@GOTPAGE
Lloh8:
	ldr	x24, [x24, _HID_FEATURE_REPORT@GOTPAGEOFF]
	ldr	w4, [x24]
Lloh9:
	adrp	x25, _HID_REQ_GET_REPORT@GOTPAGE
Lloh10:
	ldr	x25, [x25, _HID_REQ_GET_REPORT@GOTPAGEOFF]
	ldr	w5, [x25]
	mov	x0, x19
	mov	w1, #242
	mov	x2, x20
	bl	_hid_hw_raw_request
	tbnz	w0, #31, LBB0_7
; %bb.2:
	ldr	w3, [x23]
	ldr	w4, [x24]
	ldr	w5, [x25]
	mov	x0, x19
	mov	w1, #245
	mov	x2, x20
	bl	_hid_hw_raw_request
	mov	x22, x0
	tbnz	w0, #31, LBB0_8
; %bb.3:
	ldr	w8, [x21]
Lloh11:
	adrp	x9, _SHANWAN_GAMEPAD@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SHANWAN_GAMEPAD@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_10
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_hid_hw_output_report
	mov	x22, x0
	tbz	w0, #31, LBB0_10
; %bb.5:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_hid_info
	mov	w22, #0
	b	LBB0_10
LBB0_6:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_11
LBB0_7:
	mov	x22, x0
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_hid_err
LBB0_10:
	mov	x0, x20
	bl	_kfree
LBB0_11:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_SIXAXIS_REPORT_0xF2_SIZE,4,2   ; @SIXAXIS_REPORT_0xF2_SIZE
	.comm	_SIXAXIS_REPORT_0xF5_SIZE,4,2   ; @SIXAXIS_REPORT_0xF5_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HID_FEATURE_REPORT,4,2         ; @HID_FEATURE_REPORT
	.comm	_HID_REQ_GET_REPORT,4,2         ; @HID_REQ_GET_REPORT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't set operational mode: step 1\n"

l_.str.1:                               ; @.str.1
	.asciz	"can't set operational mode: step 2\n"

	.comm	_SHANWAN_GAMEPAD,4,2            ; @SHANWAN_GAMEPAD
l_.str.2:                               ; @.str.2
	.asciz	"can't set operational mode: step 3, ignoring\n"

	.no_dead_strip	_sixaxis_set_operational_usb
.subsections_via_symbols
