	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atp_geyser_init
_atp_geyser_init:                       ## @atp_geyser_init
	.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, %r15
	movq	8(%rdi), %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	movq	_ATP_GEYSER_MODE_READ_REQUEST_ID@GOTPCREL(%rip), %rdx
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rsi
	movq	_USB_TYPE_CLASS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rsi), %ecx
	movl	(%rdx), %edx
	movq	_USB_RECIP_INTERFACE@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	movq	_ATP_GEYSER_MODE_REQUEST_VALUE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	movq	_ATP_GEYSER_MODE_REQUEST_INDEX@GOTPCREL(%rip), %r13
	movl	(%r13), %r9d
	subq	$8, %rsp
	movq	%r12, %rdi
	movl	%eax, %esi
	pushq	$5000                           ## imm = 0x1388
	pushq	$8
	pushq	%rbx
	callq	_usb_control_msg
	addq	$32, %rsp
	cmpl	$8, %eax
	jne	LBB0_3
## %bb.4:
	movq	_ATP_GEYSER_MODE_VENDOR_VALUE@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, (%rbx)
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_ATP_GEYSER_MODE_WRITE_REQUEST_ID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rsi
	movq	_USB_TYPE_CLASS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rsi), %ecx
	movq	_USB_RECIP_INTERFACE@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	movq	_ATP_GEYSER_MODE_REQUEST_VALUE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	movl	(%r13), %r9d
	subq	$8, %rsp
	movq	%r12, %rdi
	movl	%eax, %esi
	pushq	$5000                           ## imm = 0x1388
	pushq	$8
	pushq	%rbx
	callq	_usb_control_msg
	addq	$32, %rsp
	cmpl	$8, %eax
	je	LBB0_7
## %bb.5:
	leaq	L_.str.5(%rip), %r12
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_6
LBB0_1:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_3:
	leaq	L_.str.3(%rip), %r12
	leaq	L_.str.1(%rip), %rdi
LBB0_6:
	xorl	%eax, %eax
	callq	_dprintk
	movsbl	(%rbx), %edx
	leaq	L_.str.2(%rip), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movsbl	1(%rbx), %edx
	movq	%r13, %rdi
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movsbl	2(%rbx), %edx
	movq	%r13, %rdi
	movl	$2, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movsbl	3(%rbx), %edx
	movq	%r13, %rdi
	movl	$3, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movsbl	4(%rbx), %edx
	movq	%r13, %rdi
	movl	$4, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movsbl	5(%rbx), %edx
	movq	%r13, %rdi
	movl	$5, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movsbl	6(%rbx), %edx
	movq	%r13, %rdi
	movl	$6, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movsbl	7(%rbx), %edx
	movq	%r13, %rdi
	movl	$7, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	(%r15), %rdi
	movq	%r12, %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_7:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of memory\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ATP_GEYSER_MODE_READ_REQUEST_ID,4,2 ## @ATP_GEYSER_MODE_READ_REQUEST_ID
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.comm	_USB_TYPE_CLASS,4,2             ## @USB_TYPE_CLASS
	.comm	_USB_RECIP_INTERFACE,4,2        ## @USB_RECIP_INTERFACE
	.comm	_ATP_GEYSER_MODE_REQUEST_VALUE,4,2 ## @ATP_GEYSER_MODE_REQUEST_VALUE
	.comm	_ATP_GEYSER_MODE_REQUEST_INDEX,4,2 ## @ATP_GEYSER_MODE_REQUEST_INDEX
L_.str.1:                               ## @.str.1
	.asciz	"atp_geyser_init: read error\n"

L_.str.2:                               ## @.str.2
	.asciz	"appletouch[%d]: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to read mode from device.\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_ATP_GEYSER_MODE_VENDOR_VALUE,1,0 ## @ATP_GEYSER_MODE_VENDOR_VALUE
	.comm	_ATP_GEYSER_MODE_WRITE_REQUEST_ID,4,2 ## @ATP_GEYSER_MODE_WRITE_REQUEST_ID
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
L_.str.4:                               ## @.str.4
	.asciz	"atp_geyser_init: write error\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to request geyser raw mode\n"

	.no_dead_strip	_atp_geyser_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atp_geyser_init
_atp_geyser_init:                       ; @atp_geyser_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x0
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kmalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	mov	x0, x21
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x1, x0
Lloh3:
	adrp	x8, _ATP_GEYSER_MODE_READ_REQUEST_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATP_GEYSER_MODE_READ_REQUEST_ID@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _USB_DIR_IN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _USB_DIR_IN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x22, _USB_TYPE_CLASS@GOTPAGE
Lloh10:
	ldr	x22, [x22, _USB_TYPE_CLASS@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w8, w9, w8
Lloh11:
	adrp	x23, _USB_RECIP_INTERFACE@GOTPAGE
Lloh12:
	ldr	x23, [x23, _USB_RECIP_INTERFACE@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w3, w8, w9
Lloh13:
	adrp	x24, _ATP_GEYSER_MODE_REQUEST_VALUE@GOTPAGE
Lloh14:
	ldr	x24, [x24, _ATP_GEYSER_MODE_REQUEST_VALUE@GOTPAGEOFF]
	ldr	w4, [x24]
Lloh15:
	adrp	x25, _ATP_GEYSER_MODE_REQUEST_INDEX@GOTPAGE
Lloh16:
	ldr	x25, [x25, _ATP_GEYSER_MODE_REQUEST_INDEX@GOTPAGEOFF]
	ldr	w5, [x25]
	mov	w26, #5000
	str	w26, [sp]
	mov	x0, x21
	mov	x6, x19
	mov	w7, #8
	bl	_usb_control_msg
	cmp	w0, #8
	b.ne	LBB0_5
; %bb.2:
Lloh17:
	adrp	x8, _ATP_GEYSER_MODE_VENDOR_VALUE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ATP_GEYSER_MODE_VENDOR_VALUE@GOTPAGEOFF]
	ldrb	w8, [x8]
	strb	w8, [x19]
	mov	x0, x21
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh19:
	adrp	x8, _ATP_GEYSER_MODE_WRITE_REQUEST_ID@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ATP_GEYSER_MODE_WRITE_REQUEST_ID@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
Lloh22:
	adrp	x8, _USB_DIR_OUT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _USB_DIR_OUT@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w8, w9, w8
	ldr	w9, [x23]
	orr	w3, w8, w9
	ldr	w4, [x24]
	ldr	w5, [x25]
	str	w26, [sp]
	mov	x0, x21
	mov	x6, x19
	mov	w7, #8
	bl	_usb_control_msg
	mov	w21, #0
	cmp	w0, #8
	b.eq	LBB0_7
; %bb.3:
Lloh25:
	adrp	x21, l_.str.5@PAGE
Lloh26:
	add	x21, x21, l_.str.5@PAGEOFF
Lloh27:
	adrp	x0, l_.str.4@PAGE
Lloh28:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_6
LBB0_4:
	ldr	x0, [x20]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh31:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_5:
Lloh34:
	adrp	x21, l_.str.3@PAGE
Lloh35:
	add	x21, x21, l_.str.3@PAGEOFF
Lloh36:
	adrp	x0, l_.str.1@PAGE
Lloh37:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_dprintk
	ldrsb	x8, [x19]
	stp	xzr, x8, [sp]
Lloh38:
	adrp	x22, l_.str.2@PAGE
Lloh39:
	add	x22, x22, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_dprintk
	ldrsb	x8, [x19, #1]
	mov	w9, #1
	stp	x9, x8, [sp]
	mov	x0, x22
	bl	_dprintk
	ldrsb	x8, [x19, #2]
	mov	w9, #2
	stp	x9, x8, [sp]
	mov	x0, x22
	bl	_dprintk
	ldrsb	x8, [x19, #3]
	mov	w9, #3
	stp	x9, x8, [sp]
	mov	x0, x22
	bl	_dprintk
	ldrsb	x8, [x19, #4]
	mov	w9, #4
	stp	x9, x8, [sp]
	mov	x0, x22
	bl	_dprintk
	ldrsb	x8, [x19, #5]
	mov	w9, #5
	stp	x9, x8, [sp]
	mov	x0, x22
	bl	_dprintk
	ldrsb	x8, [x19, #6]
	mov	w9, #6
	stp	x9, x8, [sp]
	mov	x0, x22
	bl	_dprintk
	ldrsb	x8, [x19, #7]
	mov	w9, #7
	stp	x9, x8, [sp]
	mov	x0, x22
	bl	_dprintk
	ldr	x0, [x20]
	mov	x1, x21
	bl	_dev_err
Lloh40:
	adrp	x8, _EIO@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	mov	x0, x19
	bl	_kfree
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of memory\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ATP_GEYSER_MODE_READ_REQUEST_ID,4,2 ; @ATP_GEYSER_MODE_READ_REQUEST_ID
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.comm	_USB_TYPE_CLASS,4,2             ; @USB_TYPE_CLASS
	.comm	_USB_RECIP_INTERFACE,4,2        ; @USB_RECIP_INTERFACE
	.comm	_ATP_GEYSER_MODE_REQUEST_VALUE,4,2 ; @ATP_GEYSER_MODE_REQUEST_VALUE
	.comm	_ATP_GEYSER_MODE_REQUEST_INDEX,4,2 ; @ATP_GEYSER_MODE_REQUEST_INDEX
l_.str.1:                               ; @.str.1
	.asciz	"atp_geyser_init: read error\n"

l_.str.2:                               ; @.str.2
	.asciz	"appletouch[%d]: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to read mode from device.\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_ATP_GEYSER_MODE_VENDOR_VALUE,1,0 ; @ATP_GEYSER_MODE_VENDOR_VALUE
	.comm	_ATP_GEYSER_MODE_WRITE_REQUEST_ID,4,2 ; @ATP_GEYSER_MODE_WRITE_REQUEST_ID
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
l_.str.4:                               ; @.str.4
	.asciz	"atp_geyser_init: write error\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to request geyser raw mode\n"

	.no_dead_strip	_atp_geyser_init
.subsections_via_symbols
