#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 *, int);
int string_match(char *, char *);
char *test_text_lt_pattern() {
  char *text = "hi";
  char *pattern = "Hello";
  do {
    if (!(string_match(text, pattern) == -3)) {
      printf("Line number is: %d\n", 32);
      return "error, did not return failure";
    }
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_text_lt_pattern>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec9(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <string_match@plt>
cmp    $0xfffffffd,%eax
je     1175 <test_text_lt_pattern+0x55>
lea    0xeae(%rip),%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
lea    0xeb1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1182 <test_text_lt_pattern+0x62>
jmp    117a <test_text_lt_pattern+0x5a>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_text_lt_pattern>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1040 <string_match@plt>
cmp    $0xfffffffd,%eax
jne    113d <test_text_lt_pattern+0x1d>
xor    %eax,%eax
pop    %rcx
ret
lea    0xec5(%rip),%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
lea    0xec8(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"hi\00"
@.str.1 = [6 x i8] c"Hello\00"
@.str.2 = [20 x i8] c"Line number is: %d\0A\00"
@.str.3 = [30 x i8] c"error, did not return failure\00"
define i8* @test_text_lt_pattern() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %4
4: ; preds = %0
%5 = load i8*, i8** %2
%6 = load i8*, i8** %3
%7 = call i32 @string_match(i8* %5, i8* %6)
%8 = icmp eq i32 %7, -3
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 32)
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8** %1
br label %13
11: ; preds = %4
br label %12
12: ; preds = %11
store i8* null, i8** %1
br label %13
13: ; preds = %12, %9
%14 = load i8*, i8** %1
ret i8* %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"hi\00"
@.str.1 = [6 x i8] c"Hello\00"
@.str.2 = [20 x i8] c"Line number is: %d\0A\00"
@.str.3 = [30 x i8] c"error, did not return failure\00"
define i8* @test_text_lt_pattern() {
%1 = tail call i32 @string_match(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32 %1, -3
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 32)
br label %5
5: ; preds = %0, %3
%6 = phi i8* [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), %3 ], [ null, %0 ]
ret i8* %6
}