xunge/DecIR huggingface dataset:
/* Type definitions */
struct timespec {
  unsigned long long tv_sec;
  unsigned long long tv_nsec;
};

/* Variables and functions */
long long timespec_sub(struct timespec a, struct timespec b) {
  long long ret = 1000000000ULL * b.tv_sec + b.tv_nsec;
  ret -= 1000000000ULL * a.tv_sec + a.tv_nsec;
  return ret;
}


x86 assembly (clang, -O0):
<timespec_sub>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x8(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x18(%rbp)
imul   $0x3b9aca00,-0x20(%rbp),%rax
3b
add    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
imul   $0x3b9aca00,-0x10(%rbp),%rcx
3b
add    -0x8(%rbp),%rcx
mov    -0x28(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespec_sub>:
sub    %rdi,%rdx
imul   $0x3b9aca00,%rdx,%rax
sub    %rsi,%rcx
add    %rcx,%rax
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define i64 @timespec_sub(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca %struct.timespec
%6 = alloca %struct.timespec
%7 = alloca i64
%8 = bitcast %struct.timespec* %5 to { i64, i64 }*
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 0
store i64 %0, i64* %9
%10 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 1
store i64 %1, i64* %10
%11 = bitcast %struct.timespec* %6 to { i64, i64 }*
%12 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %11, i32 0, i32 0
store i64 %2, i64* %12
%13 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %11, i32 0, i32 1
store i64 %3, i64* %13
%14 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i32 0, i32 0
%15 = load i64, i64* %14
%16 = mul i64 1000000000, %15
%17 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i32 0, i32 1
%18 = load i64, i64* %17
%19 = add i64 %16, %18
store i64 %19, i64* %7
%20 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 0
%21 = load i64, i64* %20
%22 = mul i64 1000000000, %21
%23 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 1
%24 = load i64, i64* %23
%25 = add i64 %22, %24
%26 = load i64, i64* %7
%27 = sub i64 %26, %25
store i64 %27, i64* %7
%28 = load i64, i64* %7
ret i64 %28
}

LLVM IR (-O2):
define i64 @timespec_sub(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = sub i64 %2, %0
%6 = mul i64 %5, 1000000000
%7 = sub i64 %3, %1
%8 = add i64 %7, %6
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() { printf("hello\n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"hello\0A\00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [6 x i8] c"hello\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
int /*<<< orphan*/ HuffDecode(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int,
                              int *);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int sudp_vis(u_char *data, int len) {
  static u_char huffbuff[2000];
  HuffDecode(data, huffbuff, len, &len);
  memcpy(data, huffbuff, len);
  return (len);
}


x86 assembly (clang, -O0):
<sudp_vis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0x2f03(%rip),%rsi
lea    -0xc(%rbp),%rcx
call   1040 <HuffDecode@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0x2eec(%rip),%rsi
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sudp_vis>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%edx
mov    %rdi,%rbx
mov    %esi,0x4(%rsp)
lea    0x2f0c(%rip),%r14
lea    0x4(%rsp),%rcx
mov    %r14,%rsi
call   1040 <HuffDecode@plt>
mov    0x4(%rsp),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@sudp_vis.huffbuff = internal global [2000 x i32] zeroinitializer
define i32 @sudp_vis(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = call i32 @HuffDecode(i32* %5, i32* getelementptr inbounds ([2000 x i32], [2000 x i32]* @sudp_vis.huffbuff, i64 0, i64 0), i32 %6, i32* %4)
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = call i32 @memcpy(i32* %8, i32* getelementptr inbounds ([2000 x i32], [2000 x i32]* @sudp_vis.huffbuff, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
@sudp_vis.huffbuff = internal global [2000 x i32] zeroinitializer
define i32 @sudp_vis(i32* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @HuffDecode(i32* %0, i32* getelementptr inbounds ([2000 x i32], [2000 x i32]* @sudp_vis.huffbuff, i64 0, i64 0), i32 %1, i32* %3)
%5 = load i32, i32* %3
%6 = call i32 @memcpy(i32* %0, i32* getelementptr inbounds ([2000 x i32], [2000 x i32]* @sudp_vis.huffbuff, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %3
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ duplicates(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  if (argc < 2) {
    printf("missing filename\n");
    exit(127);
  }
  duplicates(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1166 <main+0x36>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x7f,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <duplicates@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jle    1143 <main+0x13>
mov    0x8(%rsi),%rdi
call   1040 <duplicates@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
mov    $0x7f,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"missing filename\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 127)
unreachable
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @duplicates(i8* %14)
ret i32 0
}

LLVM IR (-O2):
@str = [17 x i8] c"missing filename\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 127)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @duplicates(i8* %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, int);
int strlen(char const *);
void strlcpy(char *Destination, const char *Source, int MaxLength) {
  int SourceLen = strlen(Source);
  if ((SourceLen + 1) < MaxLength)
    MaxLength = SourceLen + 1;
  memcpy(Destination, Source, MaxLength - 1);
  Destination[MaxLength - 1] = 0;
}


x86 assembly (clang, -O0):
<strlcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
cmp    -0x14(%rbp),%eax
jge    1157 <strlcpy+0x37>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlcpy>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cmp    %ebx,%eax
cmovge %ebx,%eax
movslq %eax,%rbx
lea    -0x1(%rbx),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <memcpy@plt>
movb   $0x0,-0x1(%r15,%rbx,1)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @strlcpy(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %5
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %7
%10 = load i32, i32* %7
%11 = add nsw i32 %10, 1
%12 = load i32, i32* %6
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %17
14: ; preds = %3
%15 = load i32, i32* %7
%16 = add nsw i32 %15, 1
store i32 %16, i32* %6
br label %17
17: ; preds = %14, %3
%18 = load i8*, i8** %4
%19 = load i8*, i8** %5
%20 = load i32, i32* %6
%21 = sub nsw i32 %20, 1
%22 = call i32 @memcpy(i8* %18, i8* %19, i32 %21)
%23 = load i8*, i8** %4
%24 = load i32, i32* %6
%25 = sub nsw i32 %24, 1
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8, i8* %23, i64 %26
store i8 0, i8* %27
ret void
}

LLVM IR (-O2):
define void @strlcpy(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @strlen(i8* %1)
%5 = add nsw i32 %4, 1
%6 = icmp slt i32 %5, %2
%7 = select i1 %6, i32 %5, i32 %2
%8 = add nsw i32 %7, -1
%9 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %8)
%10 = sext i32 %8 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
store i8 0, i8* %11
ret void
}
int test_imm_5Cuint8_reg(unsigned char val) {
  return ((val) & (0x5C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Cuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x5c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Cuint8_reg>:
test   $0x5c,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_5Cuint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 92
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_5Cuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 92
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void party_check_conflict(struct map_session_data *sd) {
  if (nullpo_chk("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                 "outputs/2022-01-22/02-19-57/repos/AurigaProject/root/refs/"
                 "heads/master/src/map/party.c",
                 403, __FUNCTION__, (void *)(sd))) {
    return;
  };
  return;
}


x86 assembly (clang, -O0):
<party_check_conflict>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    0xed9(%rip),%rdi
mov    $0x193,%esi
lea    0xf5c(%rip),%rdx
mov    $0x0,%al
call   1030 <nullpo_chk@plt>
cmp    $0x0,%eax
je     1148 <party_check_conflict+0x38>
jmp    114d <party_check_conflict+0x3d>
jmp    114d <party_check_conflict+0x3d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<party_check_conflict>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
lea    0xf6e(%rip),%rdx
mov    $0x193,%esi
xor    %eax,%eax
jmp    1030 <nullpo_chk@plt>

LLVM IR (-O0):
%struct.map_session_data = type opaque
@.str = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AurigaProject/root/refs/heads/master/src/map/party.c\00"
@__FUNCTION__.party_check_conflict = [21 x i8] c"party_check_conflict\00"
define void @party_check_conflict(%struct.map_session_data* %0) {
%2 = alloca %struct.map_session_data*
store %struct.map_session_data* %0, %struct.map_session_data** %2
%3 = load %struct.map_session_data*, %struct.map_session_data** %2
%4 = bitcast %struct.map_session_data* %3 to i8*
%5 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @nullpo_chk to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0), i32 403, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__FUNCTION__.party_check_conflict, i64 0, i64 0), i8* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
%struct.map_session_data = type opaque
@.str = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AurigaProject/root/refs/heads/master/src/map/party.c\00"
@__FUNCTION__.party_check_conflict = [21 x i8] c"party_check_conflict\00"
define void @party_check_conflict(%struct.map_session_data* %0) {
%2 = bitcast %struct.map_session_data* %0 to i8*
%3 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @nullpo_chk to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0), i32 403, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__FUNCTION__.party_check_conflict, i64 0, i64 0), i8* %2)
ret void
}
int fun384() { return 384; }


x86 assembly (clang, -O0):
<fun384>:
push   %rbp
mov    %rsp,%rbp
mov    $0x180,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun384>:
mov    $0x180,%eax
ret

LLVM IR (-O0):
define i32 @fun384() {
ret i32 384
}

LLVM IR (-O2):
define i32 @fun384() {
ret i32 384
}
void gtk_grab_add() {}


x86 assembly (clang, -O0):
<gtk_grab_add>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_grab_add>:
ret

LLVM IR (-O0):
define void @gtk_grab_add() {
ret void
}

LLVM IR (-O2):
define void @gtk_grab_add() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int state;
};
typedef TYPE_1__ XColormapEvent;

/* Variables and functions */
void set_XColormapEvent_state(void *_p, int _v) {
  ((XColormapEvent *)_p)->state = (int)_v;
}


x86 assembly (clang, -O0):
<set_XColormapEvent_state>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XColormapEvent_state>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XColormapEvent_state(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XColormapEvent_state(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void PDMR3ThreadIAmRunning(void) {}


x86 assembly (clang, -O0):
<PDMR3ThreadIAmRunning>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PDMR3ThreadIAmRunning>:
ret

LLVM IR (-O0):
define void @PDMR3ThreadIAmRunning() {
ret void
}

LLVM IR (-O2):
define void @PDMR3ThreadIAmRunning() {
ret void
}
__attribute__((always_)) int kinetis_hsrun_enable(void) { return 0; }


x86 assembly (clang, -O0):
<kinetis_hsrun_enable>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kinetis_hsrun_enable>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @kinetis_hsrun_enable() {
ret i32 0
}

LLVM IR (-O2):
define i32 @kinetis_hsrun_enable() {
ret i32 0
}
void ARGBToUVRow_Any_SSSE3() {}


x86 assembly (clang, -O0):
<ARGBToUVRow_Any_SSSE3>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ARGBToUVRow_Any_SSSE3>:
ret

LLVM IR (-O0):
define void @ARGBToUVRow_Any_SSSE3() {
ret void
}

LLVM IR (-O2):
define void @ARGBToUVRow_Any_SSSE3() {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t smpte_hbrmt_get_reference_for_time_stamp(const uint8_t *p_hbrmt) {
  return p_hbrmt[2] >> 6;
}


x86 assembly (clang, -O0):
<smpte_hbrmt_get_reference_for_time_stamp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
sar    $0x6,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<smpte_hbrmt_get_reference_for_time_stamp>:
mov    0x8(%rdi),%eax
sar    $0x6,%eax
ret

LLVM IR (-O0):
define i32 @smpte_hbrmt_get_reference_for_time_stamp(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = load i32, i32* %4
%6 = ashr i32 %5, 6
ret i32 %6
}

LLVM IR (-O2):
define i32 @smpte_hbrmt_get_reference_for_time_stamp(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 6
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long double);
void print_longdouble(long double f) { printf("%.2Lf", f); }


x86 assembly (clang, -O0):
<print_longdouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_longdouble>:
lea    0xee9(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%.2Lf\00"
define void @print_longdouble(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), x86_fp80 %3)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.2Lf\00"
define void @print_longdouble(x86_fp80 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), x86_fp80 %0)
ret void
}
/* Variables and functions */
char *get_goodbye();
char *get_hello();
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  printf("%s", get_hello());
  printf("%s", get_goodbye());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <get_hello@plt>
mov    %rax,%rsi
lea    0xeb0(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <get_goodbye@plt>
mov    %rax,%rsi
lea    0xe9a(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <get_hello@plt>
lea    0xec1(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <get_goodbye@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i8* (...) @get_hello()
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i8* (...) @get_goodbye()
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = tail call i8* (...) @get_hello()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call i8* (...) @get_goodbye()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ init_sysCx();
int /*<<< orphan*/ lose_sysCx();
int main_elastic_aio(unsigned int, char **);
int main(int argc, char **argv) {
  int exstatus;
  init_sysCx();
  exstatus = main_elastic_aio((unsigned)argc, argv);
  lose_sysCx();
  return exstatus;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <init_sysCx@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <main_elastic_aio@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <lose_sysCx@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <init_sysCx@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <main_elastic_aio@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <lose_sysCx@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @init_sysCx()
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @main_elastic_aio(i32 %8, i8** %9)
store i32 %10, i32* %6
%11 = call i32 (...) @lose_sysCx()
%12 = load i32, i32* %6
ret i32 %12
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @init_sysCx()
%4 = tail call i32 @main_elastic_aio(i32 %0, i8** %1)
%5 = tail call i32 (...) @lose_sysCx()
ret i32 %4
}
/* Variables and functions */
scalar_t__ EISDIR;
scalar_t__ errno;
scalar_t__ fs_remove_directory(char const *, int);
scalar_t__ unlink(char const *);
int fs_remove_any(const char *path) {
  return (unlink(path) && errno != EISDIR) || fs_remove_directory(path, 1) ? -1
                                                                           : 0;
}


x86 assembly (clang, -O0):
<fs_remove_any>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <unlink@plt>
cmp    $0x0,%rax
je     115e <fs_remove_any+0x3e>
mov    0x2e92(%rip),%rax
mov    (%rax),%rcx
mov    $0x1,%al
mov    0x2e96(%rip),%rdx
cmp    (%rdx),%rcx
mov    %al,-0x9(%rbp)
jne    1176 <fs_remove_any+0x56>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <fs_remove_directory@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%dl
xor    %eax,%eax
mov    $0xffffffff,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_remove_any>:
push   %rbx
mov    %rdi,%rbx
call   1030 <unlink@plt>
test   %rax,%rax
je     1149 <fs_remove_any+0x29>
mov    0x2ea3(%rip),%rax
mov    (%rax),%rcx
mov    0x2ea9(%rip),%rdx
mov    $0xffffffff,%eax
cmp    (%rdx),%rcx
jne    115b <fs_remove_any+0x3b>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1040 <fs_remove_directory@plt>
neg    %rax
sbb    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i64 0
@EISDIR = global i64 0
define i32 @fs_remove_any(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @unlink(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i64, i64* @errno
%8 = load i64, i64* @EISDIR
%9 = icmp ne i64 %7, %8
br i1 %9, label %14, label %10
10: ; preds = %6, %1
%11 = load i8*, i8** %2
%12 = call i64 @fs_remove_directory(i8* %11, i32 1)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %10, %6
%15 = phi i1 [ true, %6 ], [ %13, %10 ]
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 -1, i32 0
ret i32 %17
}

LLVM IR (-O2):
@errno = global i64 0
@EISDIR = global i64 0
define i32 @fs_remove_any(i8* %0) {
%2 = tail call i64 @unlink(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = load i64, i64* @errno
%6 = load i64, i64* @EISDIR
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4, %1
%9 = tail call i64 @fs_remove_directory(i8* %0, i32 1)
%10 = icmp ne i64 %9, 0
%11 = sext i1 %10 to i32
br label %12
12: ; preds = %8, %4
%13 = phi i32 [ -1, %4 ], [ %11, %8 ]
ret i32 %13
}
int test(int a, int b, int c) {
  if (a < b || b < c)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1125 <test+0x25>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1131 <test+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1138 <test+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
cmp    %esi,%edi
setl   %al
cmp    %edx,%esi
setl   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @test(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %15, label %11
11: ; preds = %3
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %11, %3
store i32 1, i32* %4
br label %17
16: ; preds = %11
store i32 0, i32* %4
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp slt i32 %1, %2
%6 = or i1 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
unsigned getval_261() { return 3769190607U; }


x86 assembly (clang, -O0):
<getval_261>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0a948cf,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getval_261>:
mov    $0xe0a948cf,%eax
ret

LLVM IR (-O0):
define i32 @getval_261() {
ret i32 -525776689
}

LLVM IR (-O2):
define i32 @getval_261() {
ret i32 -525776689
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
scalar_t__ write(int, char *, size_t);
void write_ignore_fail(int fd, char *data, size_t count) {
  ssize_t written;
  while ((written = write(fd, data, count)) > 0) {
    data += written;
    count -= written;
  }
}


x86 assembly (clang, -O0):
<write_ignore_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jle    1161 <write_ignore_fail+0x51>
mov    -0x20(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x18(%rbp)
jmp    1123 <write_ignore_fail+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_ignore_fail>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
nopl   0x0(%rax)
call   1030 <write@plt>
test   %rax,%rax
jle    113a <write_ignore_fail+0x2a>
add    %rax,%rbx
sub    %rax,%r14
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
jmp    1120 <write_ignore_fail+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @write_ignore_fail(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
br label %8
8: ; preds = %14, %3
%9 = load i32, i32* %4
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = call i64 @write(i32 %9, i8* %10, i64 %11)
store i64 %12, i64* %7
%13 = icmp sgt i64 %12, 0
br i1 %13, label %14, label %21
14: ; preds = %8
%15 = load i64, i64* %7
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 %15
store i8* %17, i8** %5
%18 = load i64, i64* %7
%19 = load i64, i64* %6
%20 = sub i64 %19, %18
store i64 %20, i64* %6
br label %8
21: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @write_ignore_fail(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i64 @write(i32 %0, i8* %1, i64 %2)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %3, %6
%7 = phi i64 [ %12, %6 ], [ %4, %3 ]
%8 = phi i8* [ %10, %6 ], [ %1, %3 ]
%9 = phi i64 [ %11, %6 ], [ %2, %3 ]
%10 = getelementptr inbounds i8, i8* %8, i64 %7
%11 = sub i64 %9, %7
%12 = tail call i64 @write(i32 %0, i8* %10, i64 %11)
%13 = icmp sgt i64 %12, 0
br i1 %13, label %6, label %14
14: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ crStrcpy(char *, char const *);
int crStrlen(char *);
void crStrcat(char *dest, const char *src) {
  crStrcpy(dest + crStrlen(dest), src);
}


x86 assembly (clang, -O0):
<crStrcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <crStrlen@plt>
mov    -0x18(%rbp),%rdi
cltq
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <crStrcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crStrcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <crStrlen@plt>
movslq %eax,%rdi
add    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <crStrcpy@plt>

LLVM IR (-O0):
define void @crStrcat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @crStrlen(i8* %6)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = load i8*, i8** %4
%11 = call i32 @crStrcpy(i8* %9, i8* %10)
ret void
}

LLVM IR (-O2):
define void @crStrcat(i8* %0, i8* %1) {
%3 = tail call i32 @crStrlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i32 @crStrcpy(i8* %5, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _L3L4_clock_domain_status_set(int /*<<< orphan*/);
void L3L4_driver_init(void) { _L3L4_clock_domain_status_set(0); }


x86 assembly (clang, -O0):
<L3L4_driver_init>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <_L3L4_clock_domain_status_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<L3L4_driver_init>:
xor    %edi,%edi
jmp    1030 <_L3L4_clock_domain_status_set@plt>

LLVM IR (-O0):
define void @L3L4_driver_init() {
%1 = call i32 @_L3L4_clock_domain_status_set(i32 0)
ret void
}

LLVM IR (-O2):
define void @L3L4_driver_init() {
%1 = tail call i32 @_L3L4_clock_domain_status_set(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ path_strv_canonicalize(char **);
scalar_t__ strv_isempty(char **);
char **strv_uniq(char **);
char **path_strv_canonicalize_uniq(char **l) {
  if (strv_isempty(l))
    return l;
  if (!path_strv_canonicalize(l))
    return NULL;
  return strv_uniq(l);
}


x86 assembly (clang, -O0):
<path_strv_canonicalize_uniq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strv_isempty@plt>
cmp    $0x0,%rax
je     115c <path_strv_canonicalize_uniq+0x2c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1188 <path_strv_canonicalize_uniq+0x58>
mov    -0x10(%rbp),%rdi
call   1040 <path_strv_canonicalize@plt>
cmp    $0x0,%eax
jne    117b <path_strv_canonicalize_uniq+0x4b>
movq   $0x0,-0x8(%rbp)
jmp    1188 <path_strv_canonicalize_uniq+0x58>
mov    -0x10(%rbp),%rdi
call   1030 <strv_uniq@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_strv_canonicalize_uniq>:
push   %rbx
mov    %rdi,%rbx
call   1050 <strv_isempty@plt>
test   %rax,%rax
je     1143 <path_strv_canonicalize_uniq+0x13>
mov    %rbx,%rax
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <path_strv_canonicalize@plt>
test   %eax,%eax
je     1158 <path_strv_canonicalize_uniq+0x28>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strv_uniq@plt>
xor    %ebx,%ebx
jmp    113e <path_strv_canonicalize_uniq+0xe>

LLVM IR (-O0):
define i8** @path_strv_canonicalize_uniq(i8** %0) {
%2 = alloca i8**
%3 = alloca i8**
store i8** %0, i8*** %3
%4 = load i8**, i8*** %3
%5 = call i64 @strv_isempty(i8** %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i8**, i8*** %3
store i8** %8, i8*** %2
br label %17
9: ; preds = %1
%10 = load i8**, i8*** %3
%11 = call i32 @path_strv_canonicalize(i8** %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %9
store i8** null, i8*** %2
br label %17
14: ; preds = %9
%15 = load i8**, i8*** %3
%16 = call i8** @strv_uniq(i8** %15)
store i8** %16, i8*** %2
br label %17
17: ; preds = %14, %13, %7
%18 = load i8**, i8*** %2
ret i8** %18
}

LLVM IR (-O2):
define i8** @path_strv_canonicalize_uniq(i8** %0) {
%2 = tail call i64 @strv_isempty(i8** %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = tail call i32 @path_strv_canonicalize(i8** %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i8** @strv_uniq(i8** %0)
br label %9
9: ; preds = %4, %1, %7
%10 = phi i8** [ %8, %7 ], [ %0, %1 ], [ null, %4 ]
ret i8** %10
}
/* Type definitions */
struct msmsdcc_host {
  int dummy;
};
struct mmc_host {
  int dummy;
};

/* Variables and functions */
struct msmsdcc_host *mmc_priv(struct mmc_host *);
void template(struct mmc_host *mmc) {
  struct msmsdcc_host *host;
  host = mmc_priv(mmc);
}


x86 assembly (clang, -O0):
<template>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <mmc_priv@plt>
mov    %rax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<template>:
jmp    1030 <mmc_priv@plt>

LLVM IR (-O0):
%struct.mmc_host = type { i32 }
%struct.msmsdcc_host = type { i32 }
define void @template(%struct.mmc_host* %0) {
%2 = alloca %struct.mmc_host*
%3 = alloca %struct.msmsdcc_host*
store %struct.mmc_host* %0, %struct.mmc_host** %2
%4 = load %struct.mmc_host*, %struct.mmc_host** %2
%5 = call %struct.msmsdcc_host* @mmc_priv(%struct.mmc_host* %4)
store %struct.msmsdcc_host* %5, %struct.msmsdcc_host** %3
ret void
}

LLVM IR (-O2):
%struct.mmc_host = type { i32 }
%struct.msmsdcc_host = type { i32 }
define void @template(%struct.mmc_host* %0) {
%2 = tail call %struct.msmsdcc_host* @mmc_priv(%struct.mmc_host* %0)
ret void
}
float FfbSin(float angle) { return 0; }


x86 assembly (clang, -O0):
<FfbSin>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<FfbSin>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @FfbSin(float %0) {
%2 = alloca float
store float %0, float* %2
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @FfbSin(float %0) {
ret float 0.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_CRL;
typedef int /*<<< orphan*/ ASN1_TIME;

/* Variables and functions */
int /*<<< orphan*/ *X509_CRL_get_nextUpdate(int /*<<< orphan*/ *);
ASN1_TIME *GetX509CrlNextUpdate(X509_CRL *crl) {
  if (crl) {
    return X509_CRL_get_nextUpdate(crl);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<GetX509CrlNextUpdate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1139 <GetX509CrlNextUpdate+0x29>
mov    -0x10(%rbp),%rdi
call   1030 <X509_CRL_get_nextUpdate@plt>
mov    %rax,-0x8(%rbp)
jmp    1141 <GetX509CrlNextUpdate+0x31>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetX509CrlNextUpdate>:
test   %rdi,%rdi
je     111a <GetX509CrlNextUpdate+0xa>
jmp    1030 <X509_CRL_get_nextUpdate@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32* @GetX509CrlNextUpdate(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = icmp ne i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32*, i32** %3
%8 = call i32* @X509_CRL_get_nextUpdate(i32* %7)
store i32* %8, i32** %2
br label %10
9: ; preds = %1
store i32* null, i32** %2
br label %10
10: ; preds = %9, %6
%11 = load i32*, i32** %2
ret i32* %11
}

LLVM IR (-O2):
define i32* @GetX509CrlNextUpdate(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32* @X509_CRL_get_nextUpdate(i32* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32* [ %4, %3 ], [ null, %1 ]
ret i32* %6
}
/* Type definitions */
struct lobject {
  int dummy;
};
struct lemon {
  int dummy;
};

/* Variables and functions */
struct lobject *lobject_del_attr(struct lemon *, struct lobject *,
                                 struct lobject *);
struct lobject *lobject_get_default_del_attr(struct lemon *lemon,
                                             struct lobject *self, int argc,
                                             struct lobject *argv[]) {
  return lobject_del_attr(lemon, self, argv[0]);
}


x86 assembly (clang, -O0):
<lobject_get_default_del_attr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rax
mov    (%rax),%rdx
call   1030 <lobject_del_attr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lobject_get_default_del_attr>:
mov    (%rcx),%rdx
jmp    1030 <lobject_del_attr@plt>

LLVM IR (-O0):
%struct.lemon = type { i32 }
%struct.lobject = type { i32 }
define %struct.lobject* @lobject_get_default_del_attr(%struct.lemon* %0, %struct.lobject* %1, i32 %2, %struct.lobject** %3) {
%5 = alloca %struct.lemon*
%6 = alloca %struct.lobject*
%7 = alloca i32
%8 = alloca %struct.lobject**
store %struct.lemon* %0, %struct.lemon** %5
store %struct.lobject* %1, %struct.lobject** %6
store i32 %2, i32* %7
store %struct.lobject** %3, %struct.lobject*** %8
%9 = load %struct.lemon*, %struct.lemon** %5
%10 = load %struct.lobject*, %struct.lobject** %6
%11 = load %struct.lobject**, %struct.lobject*** %8
%12 = getelementptr inbounds %struct.lobject*, %struct.lobject** %11, i64 0
%13 = load %struct.lobject*, %struct.lobject** %12
%14 = call %struct.lobject* @lobject_del_attr(%struct.lemon* %9, %struct.lobject* %10, %struct.lobject* %13)
ret %struct.lobject* %14
}

LLVM IR (-O2):
%struct.lemon = type { i32 }
%struct.lobject = type { i32 }
define %struct.lobject* @lobject_get_default_del_attr(%struct.lemon* %0, %struct.lobject* %1, i32 %2, %struct.lobject** nocapture %3) {
%5 = load %struct.lobject*, %struct.lobject** %3
%6 = tail call %struct.lobject* @lobject_del_attr(%struct.lemon* %0, %struct.lobject* %1, %struct.lobject* %5)
ret %struct.lobject* %6
}
/* Variables and functions */
char *ltrimsp(char *);
char *ltrimt(char *);
char *ltrim(char *str) {
  char *string;
  string = ltrimsp(str);
  return ltrimt(string);
}


x86 assembly (clang, -O0):
<ltrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ltrimsp@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ltrimt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltrim>:
push   %rax
call   1040 <ltrimsp@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <ltrimt@plt>

LLVM IR (-O0):
define i8* @ltrim(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @ltrimsp(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i8* @ltrimt(i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @ltrim(i8* %0) {
%2 = tail call i8* @ltrimsp(i8* %0)
%3 = tail call i8* @ltrimt(i8* %2)
ret i8* %3
}
int test_imm_AFint8_reg(signed char val) {
  return ((val) & (0xAF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_AFint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xaf,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_AFint8_reg>:
test   $0xaf,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_AFint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 175
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_AFint8_reg(i8 signext %0) {
%2 = and i8 %0, -81
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void LedsP$Led2$toggle(void) { ReverseGPIOP$1$Out$toggle(); }


x86 assembly (clang, -O0):
<LedsP$Led2$toggle>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ReverseGPIOP$1$Out$toggle@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LedsP$Led2$toggle>:
xor    %eax,%eax
jmp    1030 <ReverseGPIOP$1$Out$toggle@plt>

LLVM IR (-O0):
define void @"LedsP$Led2$toggle"() {
%1 = call i32 (...) @"ReverseGPIOP$1$Out$toggle"()
ret void
}

LLVM IR (-O2):
define void @"LedsP$Led2$toggle"() {
%1 = tail call i32 (...) @"ReverseGPIOP$1$Out$toggle"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main() {
  int radius = 5;
  float umfang, pi = 3.14159265359;
  umfang = (2 * pi) * (radius);
  printf("\n\n\tUmfang: %.20f\n\n", umfang);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movss  0xed6(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xec5(%rip),%xmm0
mulss  -0x10(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeec(%rip),%rdi
movss  0xee0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"\0A\0A\09Umfang: %.20f\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
store i32 5, i32* %2
store float 0x400921FB60000000, float* %4
%5 = load float, float* %4
%6 = fmul float 2.000000e+00, %5
%7 = load i32, i32* %2
%8 = sitofp i32 %7 to float
%9 = fmul float %6, %8
store float %9, float* %3
%10 = load float, float* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"\0A\0A\09Umfang: %.20f\0A\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), float 0x403F6A7A40000000)
ret i32 0
}
void endianSwapInt16(unsigned long i, char *out) {
  unsigned char *ia = (unsigned char *)&i;
  out[0] = ia[1];
  out[1] = ia[0];
}


x86 assembly (clang, -O0):
<endianSwapInt16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<endianSwapInt16>:
rol    $0x8,%di
mov    %di,(%rsi)
ret

LLVM IR (-O0):
define void @endianSwapInt16(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = bitcast i64* %3 to i8*
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i64 0
%14 = load i8, i8* %13
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
ret void
}

LLVM IR (-O2):
define void @endianSwapInt16(i64 %0, i8* nocapture writeonly %1) {
%3 = trunc i64 %0 to i8
%4 = lshr i64 %0, 8
%5 = trunc i64 %4 to i8
store i8 %5, i8* %1
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %3, i8* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Queens(int);
int main() {
  int i;
  for (i = 0; i < 100; i++)
    Queens(i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1146 <main+0x36>
mov    -0x8(%rbp),%edi
call   1030 <Queens@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <Queens@plt>
add    $0x1,%ebx
cmp    $0x64,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 100
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @Queens(i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @Queens(i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 100
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ core4_swap(char *, int);
void U_EMRSTROKEANDFILLPATH_swap(char *record, int torev) {
  core4_swap(record, torev);
}


x86 assembly (clang, -O0):
<U_EMRSTROKEANDFILLPATH_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <core4_swap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_EMRSTROKEANDFILLPATH_swap>:
jmp    1030 <core4_swap@plt>

LLVM IR (-O0):
define void @U_EMRSTROKEANDFILLPATH_swap(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @core4_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_EMRSTROKEANDFILLPATH_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core4_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i = 0;
  for (;;) {
    scanf("%d", &i);
    if (i == 42)
      break;
    else
      printf("%d\n", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x2a,-0x8(%rbp)
jne    1155 <main+0x35>
jmp    1169 <main+0x49>
mov    -0x8(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xec8(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
cmp    $0x2a,%esi
je     117c <main+0x5c>
lea    0xeb1(%rip),%r14
lea    0xea7(%rip),%r15
lea    0xc(%rsp),%rbx
xchg   %ax,%ax
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
cmp    $0x2a,%esi
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %11, %0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 42
br i1 %6, label %7, label %8
7: ; preds = %3
br label %12
8: ; preds = %3
%9 = load i32, i32* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8
br label %3
12: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 42
br i1 %5, label %12, label %6
6: ; preds = %0, %6
%7 = phi i32 [ %10, %6 ], [ %4, %0 ]
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = icmp eq i32 %10, 42
br i1 %11, label %12, label %6
12: ; preds = %6, %0
ret i32 0
}