	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sony_set_device_id
_sony_set_device_id:                    ## @sony_set_device_id
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movq	_SIXAXIS_CONTROLLER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_2
## %bb.1:
	movq	_DUALSHOCK4_CONTROLLER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
LBB0_2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_sony_device_id_allocator@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ida_simple_get
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	%eax, 4(%rbx)
	jmp	LBB0_6
LBB0_3:
	movl	$-1, 4(%rbx)
	jmp	LBB0_7
LBB0_5:
	movl	$-1, 4(%rbx)
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIXAXIS_CONTROLLER,4,2         ## @SIXAXIS_CONTROLLER
	.comm	_DUALSHOCK4_CONTROLLER,4,2      ## @DUALSHOCK4_CONTROLLER
	.comm	_sony_device_id_allocator,4,2   ## @sony_device_id_allocator
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_sony_set_device_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sony_set_device_id
_sony_set_device_id:                    ; @sony_set_device_id
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _SIXAXIS_CONTROLLER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SIXAXIS_CONTROLLER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _DUALSHOCK4_CONTROLLER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DUALSHOCK4_CONTROLLER@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
Lloh9:
	adrp	x0, _sony_device_id_allocator@GOTPAGE
Lloh10:
	ldr	x0, [x0, _sony_device_id_allocator@GOTPAGEOFF]
	mov	w1, #0
	mov	w2, #0
	bl	_ida_simple_get
	tbnz	w0, #31, LBB0_5
; %bb.3:
	str	w0, [x19, #4]
	mov	w0, #0
	b	LBB0_6
LBB0_4:
	mov	w0, #0
LBB0_5:
	mov	w8, #-1
	str	w8, [x19, #4]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SIXAXIS_CONTROLLER,4,2         ; @SIXAXIS_CONTROLLER
	.comm	_DUALSHOCK4_CONTROLLER,4,2      ; @DUALSHOCK4_CONTROLLER
	.comm	_sony_device_id_allocator,4,2   ; @sony_device_id_allocator
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_sony_set_device_id
.subsections_via_symbols
