#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*/ assert(int);
void f(void *s1, void *s2) {
  char *us1 = (char *)s1;
  char *us2 = (char *)s2;
  char us10 = us1[0];
  char us20 = us2[0];
  char us11 = us1[1];
  char us21 = us2[1];
  assert(us10 == 'a');
  assert(us11 == 'b');
  assert(us20 == 'g');
  assert(us21 == 'b');
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x21(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x22(%rbp)
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x23(%rbp)
mov    -0x20(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x24(%rbp)
movsbl -0x21(%rbp),%eax
cmp    $0x61,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x23(%rbp),%eax
cmp    $0x62,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x22(%rbp),%eax
cmp    $0x67,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x24(%rbp),%eax
cmp    $0x62,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbp
push   %r14
push   %rbx
mov    0x1(%rdi),%bl
mov    (%rsi),%bpl
mov    0x1(%rsi),%r14b
xor    %eax,%eax
cmpb   $0x61,(%rdi)
sete   %al
mov    %eax,%edi
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x62,%bl
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x67,%bpl
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x62,%r14b
sete   %dil
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @f(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%11 = load i8*, i8** %3
store i8* %11, i8** %5
%12 = load i8*, i8** %4
store i8* %12, i8** %6
%13 = load i8*, i8** %5
%14 = getelementptr inbounds i8, i8* %13, i64 0
%15 = load i8, i8* %14
store i8 %15, i8* %7
%16 = load i8*, i8** %6
%17 = getelementptr inbounds i8, i8* %16, i64 0
%18 = load i8, i8* %17
store i8 %18, i8* %8
%19 = load i8*, i8** %5
%20 = getelementptr inbounds i8, i8* %19, i64 1
%21 = load i8, i8* %20
store i8 %21, i8* %9
%22 = load i8*, i8** %6
%23 = getelementptr inbounds i8, i8* %22, i64 1
%24 = load i8, i8* %23
store i8 %24, i8* %10
%25 = load i8, i8* %7
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 97
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
%30 = load i8, i8* %9
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 98
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = load i8, i8* %8
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 103
%38 = zext i1 %37 to i32
%39 = call i32 @assert(i32 %38)
%40 = load i8, i8* %10
%41 = sext i8 %40 to i32
%42 = icmp eq i32 %41, 98
%43 = zext i1 %42 to i32
%44 = call i32 @assert(i32 %43)
ret void
}

LLVM IR (-O2):
define void @f(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %1, i64 1
%8 = load i8, i8* %7
%9 = icmp eq i8 %3, 97
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = icmp eq i8 %6, 98
%13 = zext i1 %12 to i32
%14 = tail call i32 @assert(i32 %13)
%15 = icmp eq i8 %4, 103
%16 = zext i1 %15 to i32
%17 = tail call i32 @assert(i32 %16)
%18 = icmp eq i8 %8, 98
%19 = zext i1 %18 to i32
%20 = tail call i32 @assert(i32 %19)
ret void
}