	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gemtek_probe
_gemtek_probe:                          ## @gemtek_probe
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	4(%rdi), %rbx
	movq	l___const.gemtek_probe.ioports+16(%rip), %rax
	movq	%rax, -64(%rbp)
	movaps	l___const.gemtek_probe.ioports(%rip), %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	_probe@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_v4l2_info
	leaq	-80(%rbp), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_10
## %bb.3:
	leaq	L_.str.3(%rip), %r12
	leaq	-80(%rbp), %r13
	xorl	%r15d, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_v4l2_warn
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r15
	movq	%r13, %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r15
	jge	LBB0_10
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	-80(%rbp,%r15,4), %edx
	movq	%rbx, %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_v4l2_info
	movl	-80(%rbp,%r15,4), %edi
	movl	$1, %esi
	movq	%r12, %rdx
	callq	_request_region
	movl	-80(%rbp,%r15,4), %edx
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movl	%edx, %esi
	callq	_gemtek_verify
	movl	-80(%rbp,%r15,4), %edx
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%edx, %edi
	movl	$1, %esi
	callq	_release_region
	jmp	LBB0_9
LBB0_10:
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	callq	_v4l2_err
	jmp	LBB0_11
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_v4l2_info
LBB0_11:
	movl	$-1, %eax
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_v4l2_info
	movl	-80(%rbp,%r15,4), %edi
	movl	$1, %esi
	callq	_release_region
	movl	-80(%rbp,%r15,4), %eax
	movl	%eax, (%r14)
	jmp	LBB0_12
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.gemtek_probe.ioports
l___const.gemtek_probe.ioports:
	.long	524                             ## 0x20c
	.long	780                             ## 0x30c
	.long	588                             ## 0x24c
	.long	844                             ## 0x34c
	.long	584                             ## 0x248
	.long	652                             ## 0x28c

	.comm	_probe,4,2                      ## @probe
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Automatic device probing disabled.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Automatic device probing enabled.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Trying I/O port 0x%x...\n"

L_.str.3:                               ## @.str.3
	.asciz	"gemtek-probe"

L_.str.4:                               ## @.str.4
	.asciz	"I/O port 0x%x busy!\n"

L_.str.5:                               ## @.str.5
	.asciz	"Card found from I/O port 0x%x!\n"

L_.str.6:                               ## @.str.6
	.asciz	"Automatic probing failed!\n"

	.no_dead_strip	_gemtek_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gemtek_probe
_gemtek_probe:                          ; @gemtek_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	add	x20, x0, #4
Lloh3:
	adrp	x8, l___const.gemtek_probe.ioports@PAGE
Lloh4:
	add	x8, x8, l___const.gemtek_probe.ioports@PAGEOFF
	ldr	q0, [x8]
	str	q0, [sp, #16]
	ldr	x8, [x8, #16]
	str	x8, [sp, #32]
Lloh5:
	adrp	x8, _probe@GOTPAGE
Lloh6:
	ldr	x8, [x8, _probe@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cbz	w8, LBB0_9
; %bb.1:
	mov	x19, x0
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_v4l2_info
	add	x24, sp, #16
	add	x0, sp, #16
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.2:
	mov	x25, #0
Lloh10:
	adrp	x21, l_.str.2@PAGE
Lloh11:
	add	x21, x21, l_.str.2@PAGEOFF
Lloh12:
	adrp	x22, l_.str.3@PAGE
Lloh13:
	add	x22, x22, l_.str.3@PAGEOFF
Lloh14:
	adrp	x23, l_.str.4@PAGE
Lloh15:
	add	x23, x23, l_.str.4@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_v4l2_warn
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x25, #1
	add	x0, sp, #16
	bl	_ARRAY_SIZE
	cmp	x25, w0, sxtw
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x26, x25, #2
	ldr	w8, [x24, x26]
	str	x8, [sp]
	mov	x0, x20
	mov	x1, x21
	bl	_v4l2_info
	ldr	w0, [x24, x26]
	mov	w1, #1
	mov	x2, x22
	bl	_request_region
	ldr	w2, [x24, x26]
	cbz	w0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x2
	bl	_gemtek_verify
	mov	x8, x0
	ldr	w0, [x24, x25, lsl #2]
	cbnz	x8, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	w1, #1
	bl	_release_region
	b	LBB0_4
LBB0_8:
Lloh16:
	adrp	x1, l_.str.6@PAGE
Lloh17:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_v4l2_err
	b	LBB0_10
LBB0_9:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_v4l2_info
LBB0_10:
	mov	w0, #-1
LBB0_11:
	ldr	x8, [sp, #40]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.12:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_13:
	str	x0, [sp]
Lloh23:
	adrp	x1, l_.str.5@PAGE
Lloh24:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_v4l2_info
	add	x20, sp, #16
	ldr	w0, [x20, x26]
	mov	w1, #1
	bl	_release_region
	ldr	w0, [x20, x26]
	str	w0, [x19]
	b	LBB0_11
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.gemtek_probe.ioports
l___const.gemtek_probe.ioports:
	.long	524                             ; 0x20c
	.long	780                             ; 0x30c
	.long	588                             ; 0x24c
	.long	844                             ; 0x34c
	.long	584                             ; 0x248
	.long	652                             ; 0x28c

	.comm	_probe,4,2                      ; @probe
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Automatic device probing disabled.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Automatic device probing enabled.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Trying I/O port 0x%x...\n"

l_.str.3:                               ; @.str.3
	.asciz	"gemtek-probe"

l_.str.4:                               ; @.str.4
	.asciz	"I/O port 0x%x busy!\n"

l_.str.5:                               ; @.str.5
	.asciz	"Card found from I/O port 0x%x!\n"

l_.str.6:                               ; @.str.6
	.asciz	"Automatic probing failed!\n"

	.no_dead_strip	_gemtek_probe
.subsections_via_symbols
