#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 /*<<< orphan*/ printf(char *, unsigned char, unsigned char);
void ver(int l, int b, char *buff) {
  char *v = (char *)0;
  if (buff[0] == 0x13 && buff[1] == 0x32) {
    printf("BINGO: %x %x\n", (unsigned char)buff[0], (unsigned char)buff[1]);
    *v = 0;
  }
  printf("data %x %x\n", (unsigned char)buff[0], (unsigned char)buff[1]);
}


x86 assembly (clang, -O0):
<ver>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x13,%eax
jne    116f <ver+0x5f>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x32,%eax
jne    116f <ver+0x5f>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
lea    0xea4(%rip),%rdi
movzbl %cl,%esi
movzbl 0x1(%rax),%edx
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
lea    0xe8e(%rip),%rdi
movzbl %cl,%esi
movzbl 0x1(%rax),%edx
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ver>:
push   %rax
mov    (%rdx),%al
mov    0x1(%rdx),%cl
cmp    $0x13,%al
jne    111f <ver+0xf>
cmp    $0x32,%cl
je     1132 <ver+0x22>
movzbl %al,%esi
movzbl %cl,%edx
lea    0xee2(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>
lea    0xec7(%rip),%rdi
mov    $0x13,%esi
mov    $0x32,%edx
call   1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"BINGO: %x %x\0A\00"
@.str.1 = [12 x i8] c"data %x %x\0A\00"
define void @ver(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
store i8* null, i8** %7
%8 = load i8*, i8** %6
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 19
br i1 %12, label %13, label %28
13: ; preds = %3
%14 = load i8*, i8** %6
%15 = getelementptr inbounds i8, i8* %14, i64 1
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 50
br i1 %18, label %19, label %28
19: ; preds = %13
%20 = load i8*, i8** %6
%21 = getelementptr inbounds i8, i8* %20, i64 0
%22 = load i8, i8* %21
%23 = load i8*, i8** %6
%24 = getelementptr inbounds i8, i8* %23, i64 1
%25 = load i8, i8* %24
%26 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8 zeroext %22, i8 zeroext %25)
%27 = load i8*, i8** %7
store i8 0, i8* %27
br label %28
28: ; preds = %19, %13, %3
%29 = load i8*, i8** %6
%30 = getelementptr inbounds i8, i8* %29, i64 0
%31 = load i8, i8* %30
%32 = load i8*, i8** %6
%33 = getelementptr inbounds i8, i8* %32, i64 1
%34 = load i8, i8* %33
%35 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %31, i8 zeroext %34)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"BINGO: %x %x\0A\00"
@.str.1 = [12 x i8] c"data %x %x\0A\00"
define void @ver(i32 %0, i32 %1, i8* nocapture %2) {
%4 = load i8, i8* %2
%5 = icmp eq i8 %4, 19
%6 = getelementptr inbounds i8, i8* %2, i64 1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 50
%9 = select i1 %5, i1 %8, i1 false
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8 zeroext 19, i8 zeroext 50)
unreachable
12: ; preds = %3
%13 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %4, i8 zeroext %7)
ret void
}