// File: /workspace/github_c_makefile_star2_O3/findstr[P]version-database/main.c
// Function: patch_h
static void
patch_h(int argc, char *argv[])
{
	int c;
	struct patch_args args;
	memset(&args, 0, sizeof(args));
	while ((c = getopt(argc, argv, "a:p:o:?")) != -1) {
		switch (c) {
		case 'a':
			args.hash = dr_newstr(optarg);
			break;
		case 'p':
			args.patch = dr_newstr(optarg);
			break;
		case 'o':
			args.output = dr_newstr(optarg);
			break;
		case '?':
			exit(EINVAL);
			break;
		}
	}
	if (!(args.hash && args.patch && args.output)) {
		fprintf(stderr, "usage: %s patch -a hash -p patch -o output\n",
			argv[0]);
		exit(EINVAL);
	}
	patch(&args);
	dr_unref(args.hash);
	dr_unref(args.patch);
	dr_unref(args.output);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movl %edi, %r14d
movq $0x0, -0x40(%rbp)
leaq 0x714d(%rip), %r15      # 0xa14a
movq $0x0, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movl %r14d, %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2260
cmpl $0x6e, %eax
jg 0x303c
cmpl $-0x1, %eax
je 0x312d
cmpl $0x61, %eax
je 0x30db
cmpl $0x3f, %eax
jne 0x300d
jmp 0x31d0
cmpl $0x6f, %eax
je 0x3092
cmpl $0x70, %eax
jne 0x300d
movq 0x9f8b(%rip), %rax      # 0xcfd8
movq (%rax), %r13
movq %r13, %rdi
callq 0x20e0
movslq %eax, %r12
leaq 0xc(%r12), %rdi
callq 0x2200
movq %r13, %rsi
movq %rax, %r13
movl $0x1, (%rax)
movl %r12d, 0x4(%rax)
testq %rsi, %rsi
je 0x3089
movq %r13, %rdi
addq $0x8, %rdi
movq %r12, %rdx
callq 0x21d0
movq %r13, -0x40(%rbp)
jmp 0x3122
movq 0x9f3f(%rip), %rax      # 0xcfd8
movq (%rax), %r13
movq %r13, %rdi
callq 0x20e0
movslq %eax, %r12
leaq 0xc(%r12), %rdi
callq 0x2200
movq %r13, %rsi
movq %rax, %r13
movl $0x1, (%rax)
movl %r12d, 0x4(%rax)
testq %rsi, %rsi
je 0x30d5
movq %r13, %rdi
addq $0x8, %rdi
movq %r12, %rdx
callq 0x21d0
movq %r13, -0x38(%rbp)
jmp 0x3122
movq 0x9ef6(%rip), %rax      # 0xcfd8
movq (%rax), %r13
movq %r13, %rdi
callq 0x20e0
movslq %eax, %r12
leaq 0xc(%r12), %rdi
callq 0x2200
movq %r13, %rsi
movq %rax, %r13
movl $0x1, (%rax)
movl %r12d, 0x4(%rax)
testq %rsi, %rsi
je 0x311e
movq %r13, %rdi
addq $0x8, %rdi
movq %r12, %rdx
callq 0x21d0
movq %r13, -0x30(%rbp)
movb $0x0, 0x8(%r13,%r12)
jmp 0x300d
movq -0x38(%rbp), %rcx
movq %rcx, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rdx
movq %rdx, -0x58(%rbp)
testq %rdx, %rdx
je 0x31da
testq %rax, %rax
je 0x31da
testq %rcx, %rcx
je 0x31da
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
callq 0x4950
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3185
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x3185
testl %eax, %eax
jne 0x31e2
callq 0x2030
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x31a3
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x31a3
testl %eax, %eax
jne 0x31e2
callq 0x2030
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x31c1
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x31c1
testl %eax, %eax
jne 0x31e2
callq 0x2030
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x16, %edi
callq 0x2280
movq %rbx, %rdi
callq 0x23b6
leaq 0x6e98(%rip), %rdi      # 0xa081
leaq 0x6e9d(%rip), %rsi      # 0xa08d
leaq 0x6e9d(%rip), %rcx      # 0xa094
movl $0x2d, %edx
callq 0x2130
nopl (%rax)