	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function steam_register
_steam_register:                        ## @steam_register
	.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	%rdi, %r15
	movq	16(%rdi), %rax
	cmpl	$0, (%rax)
	jne	LBB0_6
## %bb.1:
	leaq	8(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	callq	_steam_get_serial
	testq	%rax, %rax
	jns	LBB0_3
## %bb.2:
	movq	16(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movl	$8, %edx
	callq	_strlcpy
LBB0_3:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	24(%r15), %edi
	movq	16(%r15), %rdx
	leaq	L_.str.1(%rip), %rsi
	callq	_hid_info
	movq	_STEAM_QUIRK_WIRELESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_steam_battery_register
LBB0_5:
	movq	_steam_devices_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	leaq	12(%r15), %rdi
	movq	_steam_devices@GOTPCREL(%rip), %rsi
	callq	_list_add
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_6:
	leaq	8(%r15), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	cmpl	$0, 4(%r15)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_lizard_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_steam_set_lizard_mode
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_steam_input_register           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"XXXXXXXXXX"

L_.str.1:                               ## @.str.1
	.asciz	"Steam Controller '%s' connected"

	.comm	_STEAM_QUIRK_WIRELESS,4,2       ## @STEAM_QUIRK_WIRELESS
	.comm	_steam_devices_lock,4,2         ## @steam_devices_lock
	.comm	_steam_devices,4,2              ## @steam_devices
	.comm	_lizard_mode,4,2                ## @lizard_mode
	.no_dead_strip	_steam_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function steam_register
_steam_register:                        ; @steam_register
	.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	x8, [x0, #16]
	ldr	w8, [x8]
	cbnz	w8, LBB0_6
; %bb.1:
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x19
	bl	_steam_get_serial
	tbz	x0, #63, LBB0_3
; %bb.2:
	ldr	x0, [x19, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #8
	bl	_strlcpy
LBB0_3:
	mov	x0, x20
	bl	_mutex_unlock
	ldr	w0, [x19, #24]
	ldr	x2, [x19, #16]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_hid_info
	ldr	w8, [x19]
Lloh4:
	adrp	x9, _STEAM_QUIRK_WIRELESS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _STEAM_QUIRK_WIRELESS@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_steam_battery_register
LBB0_5:
Lloh7:
	adrp	x20, _steam_devices_lock@GOTPAGE
Lloh8:
	ldr	x20, [x20, _steam_devices_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_mutex_lock
	add	x0, x19, #12
Lloh9:
	adrp	x1, _steam_devices@GOTPAGE
Lloh10:
	ldr	x1, [x1, _steam_devices@GOTPAGEOFF]
	bl	_list_add
	mov	x0, x20
	bl	_mutex_unlock
LBB0_6:
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_mutex_unlock
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh11:
	adrp	x8, _lizard_mode@GOTPAGE
Lloh12:
	ldr	x8, [x8, _lizard_mode@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_steam_set_lizard_mode
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_steam_input_register
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"XXXXXXXXXX"

l_.str.1:                               ; @.str.1
	.asciz	"Steam Controller '%s' connected"

	.comm	_STEAM_QUIRK_WIRELESS,4,2       ; @STEAM_QUIRK_WIRELESS
	.comm	_steam_devices_lock,4,2         ; @steam_devices_lock
	.comm	_steam_devices,4,2              ; @steam_devices
	.comm	_lizard_mode,4,2                ; @lizard_mode
	.no_dead_strip	_steam_register
.subsections_via_symbols
