#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int sscanf(char const *, char *, char *, char *);
char *strchr(char *, char);
char *get_after_point(char *heystack) {
  int parties = 0;
  char *res;
  const char *chaine = heystack;
  char osef[2048], needle[2048];
  if ((res = strchr(heystack, '.')) != NULL) {
    *res = ' ';
    if ((parties = sscanf(chaine, "%s %s", osef, needle)) == 2) {
      res = needle;
      return res;
    }
  }
  return "";
}


x86 assembly (clang, -O0):
<get_after_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1030,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     11a8 <get_after_point+0x88>
mov    -0x20(%rbp),%rax
movb   $0x20,(%rax)
mov    -0x28(%rbp),%rdi
lea    -0x830(%rbp),%rdx
lea    -0x1030(%rbp),%rcx
lea    0xe86(%rip),%rsi
call   1040 <sscanf@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x2,%eax
jne    11a3 <get_after_point+0x83>
lea    -0x1030(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11b3 <get_after_point+0x93>
jmp    11a8 <get_after_point+0x88>
lea    0xe56(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1030,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_after_point>:
push   %r14
push   %rbx
sub    $0x1008,%rsp
mov    %rdi,%r14
mov    $0x2e,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1161 <get_after_point+0x41>
mov    %rsp,%rbx
movb   $0x20,(%rax)
lea    0xeb7(%rip),%rsi
lea    0x800(%rsp),%rdx
mov    %r14,%rdi
mov    %rbx,%rcx
call   1040 <sscanf@plt>
cmp    $0x2,%eax
je     1168 <get_after_point+0x48>
lea    0xe9d(%rip),%rbx
mov    %rbx,%rax
add    $0x1008,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @get_after_point(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [2048 x i8]
%8 = alloca [2048 x i8]
store i8* %0, i8** %3
store i32 0, i32* %4
%9 = load i8*, i8** %3
store i8* %9, i8** %6
%10 = load i8*, i8** %3
%11 = call i8* @strchr(i8* %10, i8 signext 46)
store i8* %11, i8** %5
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %24
13: ; preds = %1
%14 = load i8*, i8** %5
store i8 32, i8* %14
%15 = load i8*, i8** %6
%16 = getelementptr inbounds [2048 x i8], [2048 x i8]* %7, i64 0, i64 0
%17 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%18 = call i32 @sscanf(i8* %15, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %16, i8* %17)
store i32 %18, i32* %4
%19 = icmp eq i32 %18, 2
br i1 %19, label %20, label %23
20: ; preds = %13
%21 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
store i8* %21, i8** %5
%22 = load i8*, i8** %5
store i8* %22, i8** %2
br label %25
23: ; preds = %13
br label %24
24: ; preds = %23, %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %25
25: ; preds = %24, %20
%26 = load i8*, i8** %2
ret i8* %26
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @get_after_point(i8* %0) {
%2 = alloca [2048 x i8]
%3 = alloca [2048 x i8]
%4 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%6 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 46)
%7 = icmp eq i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %1
store i8 32, i8* %6
%9 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
%10 = icmp eq i32 %9, 2
br i1 %10, label %12, label %11
11: ; preds = %8, %1
br label %12
12: ; preds = %8, %11
%13 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %11 ], [ %5, %8 ]
ret i8* %13
}