xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct chirp_client {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ simple_command(struct chirp_client *, int /*<<< orphan*/,
                                  char *, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int /*<<< orphan*/);
int64_t chirp_client_fchown(struct chirp_client *c, int64_t fd, int64_t uid,
                            int64_t gid, time_t stoptime) {
  return simple_command(c, stoptime, "fchown %lld %lld %lld\n", fd, uid, gid);
}


x86 assembly (clang, -O0):
<chirp_client_fchown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xebe(%rip),%rdx
call   1030 <simple_command@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chirp_client_fchown>:
mov    %ecx,%r9d
mov    %edx,%eax
mov    %esi,%ecx
lea    0xee2(%rip),%rdx
mov    %r8d,%esi
mov    %eax,%r8d
jmp    1030 <simple_command@plt>

LLVM IR (-O0):
%struct.chirp_client = type { i32 }
@.str = [23 x i8] c"fchown %lld %lld %lld\0A\00"
define i32 @chirp_client_fchown(%struct.chirp_client* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.chirp_client*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.chirp_client* %0, %struct.chirp_client** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load %struct.chirp_client*, %struct.chirp_client** %6
%12 = load i32, i32* %10
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = call i32 @simple_command(%struct.chirp_client* %11, i32 %12, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.chirp_client = type { i32 }
@.str = [23 x i8] c"fchown %lld %lld %lld\0A\00"
define i32 @chirp_client_fchown(%struct.chirp_client* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @simple_command(%struct.chirp_client* %0, i32 %4, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 %3)
ret i32 %6
}
int test_imm_81uint16_mem(unsigned short *val) {
  return ((*val) & (-0x81 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_81uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff7f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_81uint16_mem>:
movzwl (%rdi),%eax
test   $0xff7f,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_81uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -129
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *malloc(size_t);
size_t strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, size_t);
char *getInfo() {
  char *name;
  size_t size;
  size = strlen("Random Walk (C) 2004 Panayotis Katsaloulis "
                "http://www.panayotis.com under GNU GPL");
  name = malloc(size + 1);
  strncpy(name,
          ("Random Walk (C) 2004 Panayotis Katsaloulis "
           "http://www.panayotis.com under GNU GPL"),
          size + 1);
  return name;
}


x86 assembly (clang, -O0):
<getInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
add    $0x1,%rdx
lea    0xe94(%rip),%rsi
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getInfo>:
push   %rbx
mov    $0x52,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rsi
mov    $0x52,%edx
mov    %rax,%rdi
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [82 x i8] c"Random Walk (C) 2004 Panayotis Katsaloulis http://www.panayotis.com under GNU GPL\00"
define i8* @getInfo() {
%1 = alloca i8*
%2 = alloca i64
%3 = call i64 @strlen(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0))
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = add i64 %4, 1
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %1
%7 = load i8*, i8** %1
%8 = load i64, i64* %2
%9 = add i64 %8, 1
%10 = call i32 @strncpy(i8* %7, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i64 %9)
%11 = load i8*, i8** %1
ret i8* %11
}

LLVM IR (-O2):
@.str = [82 x i8] c"Random Walk (C) 2004 Panayotis Katsaloulis http://www.panayotis.com under GNU GPL\00"
define i8* @getInfo() {
%1 = tail call dereferenceable_or_null(82) i8* @malloc(i64 82)
%2 = tail call i32 @strncpy(i8* %1, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i64 82)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ system(char *);
void taintDiagnostic() {
  char buf[128];
  scanf("%s", buf);
  system(buf);
}


x86 assembly (clang, -O0):
<taintDiagnostic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    -0x80(%rbp),%rsi
lea    0xeca(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <system@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<taintDiagnostic>:
push   %rbx
sub    $0x80,%rsp
lea    0xed1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @taintDiagnostic() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @taintDiagnostic() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @system(i8* %2)
ret void
}
/* Type definitions */
typedef scalar_t__ uint;

/* Variables and functions */
uint id(uint x) { return x - 1; }


x86 assembly (clang, -O0):
<id>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<id>:
lea    -0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @id(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub nsw i64 %3, 1
ret i64 %4
}

LLVM IR (-O2):
define i64 @id(i64 %0) {
%2 = add nsw i64 %0, -1
ret i64 %2
}
/* Variables and functions */
void *malloc(size_t);
int *MakeArray(size_t size) {
  void *v = 0;
  v = malloc(size * sizeof(int));
  if (v)
    return (int *)v;
  else
    return 0;
}


x86 assembly (clang, -O0):
<MakeArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
shl    $0x2,%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114d <MakeArray+0x3d>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1155 <MakeArray+0x45>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MakeArray>:
shl    $0x2,%rdi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @MakeArray(i64 %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* null, i8** %4
%5 = load i64, i64* %3
%6 = mul i64 %5, 4
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i8*, i8** %4
%12 = bitcast i8* %11 to i32*
store i32* %12, i32** %2
br label %14
13: ; preds = %1
store i32* null, i32** %2
br label %14
14: ; preds = %13, %10
%15 = load i32*, i32** %2
ret i32* %15
}

LLVM IR (-O2):
define noalias i32* @MakeArray(i64 %0) {
%2 = shl i64 %0, 2
%3 = tail call i8* @malloc(i64 %2)
%4 = bitcast i8* %3 to i32*
ret i32* %4
}
void INT_Excep_ICU_GROUPAL1(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_ICU_GROUPAL1() {
ret void
}
extern unsigned short ip_compute_csum(unsigned char *buff, int len) {
  barrier();
  return ~from32to16(do_csum(buff, len));
  barrier();
}


x86 assembly (clang, -O0):
<ip_compute_csum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <barrier@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1040 <do_csum@plt>
mov    %eax,%edi
mov    $0x0,%al
call   1050 <from32to16@plt>
xor    $0xffffffff,%eax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_compute_csum>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <barrier@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <do_csum@plt>
mov    %eax,%edi
xor    %eax,%eax
call   1050 <from32to16@plt>
not    %eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i16 @ip_compute_csum(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (...) @barrier()
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_csum to i32 (i8*, i32, ...)*)(i8* %6, i32 %7)
%9 = call i32 (i32, ...) bitcast (i32 (...)* @from32to16 to i32 (i32, ...)*)(i32 %8)
%10 = xor i32 %9, -1
%11 = trunc i32 %10 to i16
ret i16 %11
}

LLVM IR (-O2):
define zeroext i16 @ip_compute_csum(i8* %0, i32 %1) {
%3 = tail call i32 (...) @barrier()
%4 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_csum to i32 (i8*, i32, ...)*)(i8* %0, i32 %1)
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @from32to16 to i32 (i32, ...)*)(i32 %4)
%6 = trunc i32 %5 to i16
%7 = xor i16 %6, -1
ret i16 %7
}
__attribute((always_)) float glm_step(float edge, float x) {
  return (x < edge) ? 0.0f : 1.0f;
}


x86 assembly (clang, -O0):
<glm_step>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
xorps  %xmm3,%xmm3
movss  0xedd(%rip),%xmm2
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm1
andps  %xmm3,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<glm_step>:
cmpltss %xmm0,%xmm1
movss  0xef3(%rip),%xmm0
andnps %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @glm_step(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load float, float* %3
%7 = fcmp olt float %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, float 0.000000e+00, float 1.000000e+00
ret float %9
}

LLVM IR (-O2):
define float @glm_step(float %0, float %1) {
%3 = fcmp olt float %1, %0
%4 = select i1 %3, float 0.000000e+00, float 1.000000e+00
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ direction_reverse(int);
int myinb(int);
int wait_status(int expected) {
  int status;
  direction_reverse(1);
  status = myinb((0x378 + 3)) & 0xf0;
  if (status == expected)
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<wait_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <direction_reverse@plt>
mov    $0x37b,%edi
call   1040 <myinb@plt>
and    $0xf0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    115f <wait_status+0x3f>
movl   $0x0,-0x4(%rbp)
jmp    1166 <wait_status+0x46>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_status>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
call   1030 <direction_reverse@plt>
mov    $0x37b,%edi
call   1040 <myinb@plt>
and    $0xf0,%eax
xor    %ecx,%ecx
cmp    %ebx,%eax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @wait_status(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = call i32 @direction_reverse(i32 1)
%6 = call i32 @myinb(i32 891)
%7 = and i32 %6, 240
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 0, i32* %2
br label %13
12: ; preds = %1
store i32 -1, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @wait_status(i32 %0) {
%2 = tail call i32 @direction_reverse(i32 1)
%3 = tail call i32 @myinb(i32 891)
%4 = and i32 %3, 240
%5 = icmp ne i32 %4, %0
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void TclpFree(char *cp) {
  free(cp);
  return;
}


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

x86 assembly (clang, -O2):
<TclpFree>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @TclpFree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @free(i8* %3)
ret void
}

LLVM IR (-O2):
define void @TclpFree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void gtk_icon_size_get_name() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_size_get_name() {
ret void
}
void pinModeOut(int pin) { ; }


x86 assembly (clang, -O0):
<pinModeOut>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @pinModeOut(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @pinModeOut(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clock1();
int /*<<< orphan*/ dataA0();
int /*<<< orphan*/ dataA1();
int /*<<< orphan*/ dataB0();
int /*<<< orphan*/ dataB1();
int /*<<< orphan*/ dataToOutput();
int /*<<< orphan*/ delay();
int /*<<< orphan*/ waitBusy();
void begin(void) {
  dataToOutput();
  dataA1();
  dataB1();
  delay();
  clock1();
  delay();
  delay();
  waitBusy();
  dataA0();
  dataB0();
  delay();
  delay();
}


x86 assembly (clang, -O0):
<begin>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   10a0 <dataToOutput@plt>
mov    $0x0,%al
call   1090 <dataA1@plt>
mov    $0x0,%al
call   1040 <dataB1@plt>
mov    $0x0,%al
call   1060 <delay@plt>
mov    $0x0,%al
call   1080 <clock1@plt>
mov    $0x0,%al
call   1060 <delay@plt>
mov    $0x0,%al
call   1060 <delay@plt>
mov    $0x0,%al
call   1030 <waitBusy@plt>
mov    $0x0,%al
call   1050 <dataA0@plt>
mov    $0x0,%al
call   1070 <dataB0@plt>
mov    $0x0,%al
call   1060 <delay@plt>
mov    $0x0,%al
call   1060 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<begin>:
push   %rax
xor    %eax,%eax
call   10a0 <dataToOutput@plt>
xor    %eax,%eax
call   1090 <dataA1@plt>
xor    %eax,%eax
call   1040 <dataB1@plt>
xor    %eax,%eax
call   1060 <delay@plt>
xor    %eax,%eax
call   1080 <clock1@plt>
xor    %eax,%eax
call   1060 <delay@plt>
xor    %eax,%eax
call   1060 <delay@plt>
xor    %eax,%eax
call   1030 <waitBusy@plt>
xor    %eax,%eax
call   1050 <dataA0@plt>
xor    %eax,%eax
call   1070 <dataB0@plt>
xor    %eax,%eax
call   1060 <delay@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <delay@plt>

LLVM IR (-O0):
define void @begin() {
%1 = call i32 (...) @dataToOutput()
%2 = call i32 (...) @dataA1()
%3 = call i32 (...) @dataB1()
%4 = call i32 (...) @delay()
%5 = call i32 (...) @clock1()
%6 = call i32 (...) @delay()
%7 = call i32 (...) @delay()
%8 = call i32 (...) @waitBusy()
%9 = call i32 (...) @dataA0()
%10 = call i32 (...) @dataB0()
%11 = call i32 (...) @delay()
%12 = call i32 (...) @delay()
ret void
}

LLVM IR (-O2):
define void @begin() {
%1 = tail call i32 (...) @dataToOutput()
%2 = tail call i32 (...) @dataA1()
%3 = tail call i32 (...) @dataB1()
%4 = tail call i32 (...) @delay()
%5 = tail call i32 (...) @clock1()
%6 = tail call i32 (...) @delay()
%7 = tail call i32 (...) @delay()
%8 = tail call i32 (...) @waitBusy()
%9 = tail call i32 (...) @dataA0()
%10 = tail call i32 (...) @dataB0()
%11 = tail call i32 (...) @delay()
%12 = tail call i32 (...) @delay()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int read_int() {
  int ret = 0;
  printf("Enter an integer: ");
  scanf("%d", &ret);
  return ret;
}


x86 assembly (clang, -O0):
<read_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_int>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Enter an integer: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @read_int() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [19 x i8] c"Enter an integer: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @read_int() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char);
void to_first_space(char *str) {
  while (!isspace(*str) && *str != '\0') {
    str++;
  }
  *str = '\0';
}


x86 assembly (clang, -O0):
<to_first_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    1148 <to_first_space+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1158 <to_first_space+0x48>
jmp    1169 <to_first_space+0x59>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <to_first_space+0xc>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_first_space>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <isspace@plt>
test   %eax,%eax
jne    1138 <to_first_space+0x28>
cmpb   $0x0,(%rbx)
je     1138 <to_first_space+0x28>
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
jmp    1120 <to_first_space+0x10>
movb   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @to_first_space(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i32 @isspace(i8 signext %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
store i8 0, i8* %19
ret void
}

LLVM IR (-O2):
define void @to_first_space(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @isspace(i8 signext %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %1, %9
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = tail call i32 @isspace(i8 signext %11)
%13 = icmp eq i32 %12, 0
br i1 %13, label %5, label %14
14: ; preds = %5, %9, %1
%15 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %5 ]
store i8 0, i8* %15
ret void
}
/* Type definitions */
struct icom {
  int dummy;
};

/* Variables and functions */
int BUFSIZ;
int imc_getWCS(struct icom *, char *, char *, char *, char *, char *, char *,
               char *, char *, char *, char *, char *, char *, char *, char *,
               char *, char *);
int imc_checkWCS(struct icom *icom) {
  char tmp[BUFSIZ];
  return imc_getWCS(icom, tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
                    tmp, tmp, tmp, tmp, tmp);
}


x86 assembly (clang, -O0):
<imc_checkWCS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
mov    %eax,%ecx
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
mov    %rcx,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rax
sub    %rdx,%rax
mov    %rax,%rsp
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
sub    $0x60,%rsp
mov    %rax,%rsi
mov    %rax,%rdx
mov    %rax,%rcx
mov    %rax,%r8
mov    %rax,%r9
mov    %rax,(%rsp)
mov    %rax,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    %rax,0x20(%rsp)
mov    %rax,0x28(%rsp)
mov    %rax,0x30(%rsp)
mov    %rax,0x38(%rsp)
mov    %rax,0x40(%rsp)
mov    %rax,0x48(%rsp)
mov    %rax,0x50(%rsp)
call   1030 <imc_getWCS@plt>
add    $0x60,%rsp
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imc_checkWCS>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,%rsp
sub    $0x8,%rsp
mov    %rcx,%rsi
mov    %rcx,%rdx
mov    %rcx,%r8
mov    %rcx,%r9
push   %rcx
push   %rcx
push   %rcx
push   %rcx
push   %rcx
push   %rcx
push   %rcx
push   %rcx
push   %rcx
push   %rcx
push   %rcx
call   1030 <imc_getWCS@plt>
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
%struct.icom = type { i32 }
@BUFSIZ = global i32 0
define i32 @imc_checkWCS(%struct.icom* %0) {
%2 = alloca %struct.icom*
%3 = alloca i8*
%4 = alloca i64
store %struct.icom* %0, %struct.icom** %2
%5 = load i32, i32* @BUFSIZ
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %3
%8 = alloca i8, i64 %6
store i64 %6, i64* %4
%9 = load %struct.icom*, %struct.icom** %2
%10 = call i32 @imc_getWCS(%struct.icom* %9, i8* %8, i8* %8, i8* %8, i8* %8, i8* %8, i8* %8, i8* %8, i8* %8, i8* %8, i8* %8, i8* %8, i8* %8, i8* %8, i8* %8, i8* %8, i8* %8)
%11 = load i8*, i8** %3
ret i32 %10
}

LLVM IR (-O2):
%struct.icom = type { i32 }
@BUFSIZ = global i32 0
define i32 @imc_checkWCS(%struct.icom* %0) {
%2 = load i32, i32* @BUFSIZ
%3 = zext i32 %2 to i64
%4 = alloca i8, i64 %3
%5 = call i32 @imc_getWCS(%struct.icom* %0, i8* %4, i8* %4, i8* %4, i8* %4, i8* %4, i8* %4, i8* %4, i8* %4, i8* %4, i8* %4, i8* %4, i8* %4, i8* %4, i8* %4, i8* %4, i8* %4)
ret i32 %5
}
/* Variables and functions */
int command(char *, int);
int pop_dele(int msgno) { return command("DELE %d", msgno); }


x86 assembly (clang, -O0):
<pop_dele>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pop_dele>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <command@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"DELE %d\00"
define i32 @pop_dele(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @command(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 %4
}

LLVM IR (-O2):
@.str = [8 x i8] c"DELE %d\00"
define i32 @pop_dele(i32 %0) {
%2 = tail call i32 @command(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 %2
}
/* Variables and functions */
int vdb_printf(char *, float, float, float, float, float, float);
__attribute__((weak)) int vdb_normal(float x0, float y0, float z0, float x1,
                                     float y1, float z1) {
  return vdb_printf("n %f %f %f %f %f %f\n", x0, y0, z0, x1, y1, z1);
}


x86 assembly (clang, -O0):
<vdb_normal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
movss  -0x14(%rbp),%xmm4
movss  -0x18(%rbp),%xmm5
lea    0xea5(%rip),%rdi
call   1030 <vdb_printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"n %f %f %f %f %f %f\0A\00"
define weak i32 @vdb_normal(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load float, float* %7
%14 = load float, float* %8
%15 = load float, float* %9
%16 = load float, float* %10
%17 = load float, float* %11
%18 = load float, float* %12
%19 = call i32 @vdb_printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), float %13, float %14, float %15, float %16, float %17, float %18)
ret i32 %19
}

LLVM IR (-O2):
@.str = [21 x i8] c"n %f %f %f %f %f %f\0A\00"
define weak i32 @vdb_normal(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = tail call i32 @vdb_printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), float %0, float %1, float %2, float %3, float %4, float %5)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test2(int);
int main(void) {
  test1();
  test2(20);
  test2(10000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test1@plt>
mov    $0x14,%edi
call   1040 <test2@plt>
mov    $0x2710,%edi
call   1040 <test2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test1@plt>
mov    $0x14,%edi
call   1040 <test2@plt>
mov    $0x2710,%edi
call   1040 <test2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test1()
%3 = call i32 @test2(i32 20)
%4 = call i32 @test2(i32 10000)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test1()
%2 = tail call i32 @test2(i32 20)
%3 = tail call i32 @test2(i32 10000)
ret i32 0
}
int test_imm_78int32_mem(int *val) {
  return ((*val) & (0x78 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_78int32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x78,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_78int32_mem>:
testb  $0x78,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_78int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 120
%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_78int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 120
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int __attribute__((target("arch=ivybridge"))) redecl3(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @redecl3() {
ret i32 1
}

LLVM IR (-O2):
define i32 @redecl3() {
ret i32 1
}
int test_imm_0Aint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x0A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Aint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0xa,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_0Aint64_highword_mem>:
testb  $0xa,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_0Aint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 42949672960
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void tegra_overlay_disable(struct tegra_overlay_info *overlay_info) {}


x86 assembly (clang, -O0):
<tegra_overlay_disable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.tegra_overlay_info = type opaque
define void @tegra_overlay_disable(%struct.tegra_overlay_info* %0) {
%2 = alloca %struct.tegra_overlay_info*
store %struct.tegra_overlay_info* %0, %struct.tegra_overlay_info** %2
ret void
}

LLVM IR (-O2):
%struct.tegra_overlay_info = type opaque
define void @tegra_overlay_disable(%struct.tegra_overlay_info* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test5();
void test_test5() { test5(); }


x86 assembly (clang, -O0):
<test_test5>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <test5@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_test5>:
xor    %eax,%eax
jmp    1030 <test5@plt>

LLVM IR (-O0):
define void @test_test5() {
%1 = call i32 (...) @test5()
ret void
}

LLVM IR (-O2):
define void @test_test5() {
%1 = tail call i32 (...) @test5()
ret void
}
void gtk_accel_group_find() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accel_group_find() {
ret void
}
/* Variables and functions */
unsigned char readb(long);
unsigned char inb_p(long address) {
  readb((void *)(address & 0xffffff00) + 0x40);
  return readb(address);
}


x86 assembly (clang, -O0):
<inb_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movabs $0xffffff00,%rdi
and    -0x8(%rbp),%rdi
add    $0x40,%rdi
call   1030 <readb@plt>
mov    -0x8(%rbp),%rdi
call   1030 <readb@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inb_p>:
push   %rbx
mov    %rdi,%rbx
and    $0xffffff00,%edi
or     $0x40,%rdi
call   1030 <readb@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <readb@plt>

LLVM IR (-O0):
define zeroext i8 @inb_p(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 4294967040
%5 = inttoptr i64 %4 to i8*
%6 = getelementptr i8, i8* %5, i64 64
%7 = ptrtoint i8* %6 to i64
%8 = call zeroext i8 @readb(i64 %7)
%9 = load i64, i64* %2
%10 = call zeroext i8 @readb(i64 %9)
ret i8 %10
}

LLVM IR (-O2):
define zeroext i8 @inb_p(i64 %0) {
%2 = and i64 %0, 4294967040
%3 = inttoptr i64 %2 to i8*
%4 = getelementptr i8, i8* %3, i64 64
%5 = ptrtoint i8* %4 to i64
%6 = tail call zeroext i8 @readb(i64 %5)
%7 = tail call zeroext i8 @readb(i64 %0)
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcat1(char *, char *);
int main(void) {
  int ret = 0;
  char source[] = "Pouvez vous me dire quelle e la correct pronontiation?";
  char dest[] = "Q:";
  strcat1(dest, source);
  printf("\n%s\n", dest);
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x37,%edx
call   1040 <memcpy@plt>
mov    0xed5(%rip),%ax
mov    %ax,-0x43(%rbp)
mov    0xecd(%rip),%al
mov    %al,-0x41(%rbp)
lea    -0x43(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1050 <strcat1@plt>
lea    -0x43(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
movaps 0xef4(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0x3f6e6f69746169,%rax
mov    %rax,0x3f(%rsp)
movb   $0x0,0xe(%rsp)
movw   $0x3a51,0xc(%rsp)
lea    0xc(%rsp),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <strcat1@plt>
lea    0xebd(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.source = [55 x i8] c"Pouvez vous me dire quelle e la correct pronontiation?\00"
@__const.main.dest = [3 x i8] c"Q:\00"
@.str = [5 x i8] c"\0A%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [55 x i8]
%4 = alloca [3 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
%5 = bitcast [55 x i8]* %3 to i8*
%6 = bitcast [3 x i8]* %4 to i8*
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [55 x i8], [55 x i8]* %3, i64 0, i64 0
%9 = call i32 @strcat1(i8* %7, i8* %8)
%10 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@__const.main.source = [55 x i8] c"Pouvez vous me dire quelle e la correct pronontiation?\00"
@__const.main.dest = [3 x i8] c"Q:\00"
@.str = [5 x i8] c"\0A%s\0A\00"
define i32 @main() {
%1 = alloca [55 x i8]
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [55 x i8], [55 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%5 = call i32 @strcat1(i8* %4, i8* %3)
%6 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
char *baseName(char *n, char *a) {
  extern char *strrchr(const char *, int);
  n = strrchr(a, (int)'/');
  if (n == NULL)
    n = a;
  else
    ++n;
  return (n);
}


x86 assembly (clang, -O0):
<baseName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    114a <baseName+0x3a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1156 <baseName+0x46>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baseName>:
push   %rbx
mov    %rsi,%rbx
mov    %rsi,%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @baseName(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i8* @strrchr(i8* %5, i32 47)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i8*, i8** %4
store i8* %10, i8** %3
br label %14
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %3
br label %14
14: ; preds = %11, %9
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @baseName(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %1, i32 47)
%4 = icmp eq i8* %3, null
%5 = getelementptr inbounds i8, i8* %3, i64 1
%6 = select i1 %4, i8* %1, i8* %5
ret i8* %6
}
int c() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xc4() {
  Assert_real((isascii(196) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              985, ("isascii should be 0 for 0xc4"));
}


x86 assembly (clang, -O0):
<t_isascii_0xc4>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc4,%edi
call   1030 <isascii@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3d9,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0xc4>:
push   %rax
mov    $0xc4,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3d9,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xc4\00"
define void @t_isascii_0xc4() {
%1 = call i64 @isascii(i32 196)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 985, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xc4\00"
define void @t_isascii_0xc4() {
%1 = tail call i64 @isascii(i32 196)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 985, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void funcPointers() {
  int a = 3;
  int *pa = &a;
  int **ppa = &pa;
  *pa = 3;
  **ppa = *pa + a;
}


x86 assembly (clang, -O0):
<funcPointers>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x3,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    -0x4(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @funcPointers() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32**
store i32 3, i32* %1
store i32* %1, i32** %2
store i32** %2, i32*** %3
%4 = load i32*, i32** %2
store i32 3, i32* %4
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = load i32, i32* %1
%8 = add nsw i32 %6, %7
%9 = load i32**, i32*** %3
%10 = load i32*, i32** %9
store i32 %8, i32* %10
ret void
}

LLVM IR (-O2):
define void @funcPointers() {
ret void
}
/* Variables and functions */
size_t m_max_size(size_t left, size_t right) {
  return (left > right) ? left : right;
}


x86 assembly (clang, -O0):
<m_max_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1127 <m_max_size+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <m_max_size+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_max_size>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmova  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @m_max_size(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ugt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @m_max_size(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ helper(struct TreeNode **, int, struct TreeNode *, int, int);
struct TreeNode *addOneRow(struct TreeNode *root, int v, int d) {
  helper(&root, 1, root, v, d);
  return root;
}


x86 assembly (clang, -O0):
<addOneRow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <helper@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addOneRow>:
push   %rax
mov    %edx,%r8d
mov    %esi,%ecx
mov    %rdi,%rdx
mov    %rdi,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <helper@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define %struct.TreeNode* @addOneRow(%struct.TreeNode* %0, i32 %1, i32 %2) {
%4 = alloca %struct.TreeNode*
%5 = alloca i32
%6 = alloca i32
store %struct.TreeNode* %0, %struct.TreeNode** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.TreeNode*, %struct.TreeNode** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @helper(%struct.TreeNode** %4, i32 1, %struct.TreeNode* %7, i32 %8, i32 %9)
%11 = load %struct.TreeNode*, %struct.TreeNode** %4
ret %struct.TreeNode* %11
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define %struct.TreeNode* @addOneRow(%struct.TreeNode* %0, i32 %1, i32 %2) {
%4 = alloca %struct.TreeNode*
store %struct.TreeNode* %0, %struct.TreeNode** %4
%5 = call i32 @helper(%struct.TreeNode** %4, i32 1, %struct.TreeNode* %0, i32 %1, i32 %2)
%6 = load %struct.TreeNode*, %struct.TreeNode** %4
ret %struct.TreeNode* %6
}
void TEKNULLunload(void) {}


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

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

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

LLVM IR (-O2):
define void @TEKNULLunload() {
ret void
}
int test_imm_08uint8_reg(unsigned char val) {
  return ((val) & (0x08 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_08uint8_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, 8
%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_08uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 8
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int odd(int number) {
  if ((number / 2) * 2 == number) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<odd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
shl    $0x1,%eax
cmp    -0x8(%rbp),%eax
jne    112a <odd+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1131 <odd+0x31>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<odd>:
mov    %edi,%ecx
shr    $0x1f,%ecx
add    %edi,%ecx
and    $0xfffffffe,%ecx
xor    %eax,%eax
cmp    %edi,%ecx
setne  %al
ret

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

LLVM IR (-O2):
define i32 @odd(i32 %0) {
%2 = sdiv i32 %0, 2
%3 = shl nsw i32 %2, 1
%4 = icmp ne i32 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct section_list {
  int dummy;
};
struct genlist {
  int dummy;
};

/* Variables and functions */
int genlist_size(struct genlist const *);
int section_list_size(const struct section_list *tthis) {
  return genlist_size((const struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<section_list_size>:
jmp    1030 <genlist_size@plt>

LLVM IR (-O0):
%struct.section_list = type { i32 }
%struct.genlist = type { i32 }
define i32 @section_list_size(%struct.section_list* %0) {
%2 = alloca %struct.section_list*
store %struct.section_list* %0, %struct.section_list** %2
%3 = load %struct.section_list*, %struct.section_list** %2
%4 = bitcast %struct.section_list* %3 to %struct.genlist*
%5 = call i32 @genlist_size(%struct.genlist* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.section_list = type { i32 }
%struct.genlist = type { i32 }
define i32 @section_list_size(%struct.section_list* %0) {
%2 = bitcast %struct.section_list* %0 to %struct.genlist*
%3 = tail call i32 @genlist_size(%struct.genlist* %2)
ret i32 %3
}
/* Variables and functions */
double lua_check_number(int, char *);
int /*<<< orphan*/ lua_pushnumber(int /*<<< orphan*/);
int /*<<< orphan*/ sqrt(double);
void math_sqrt(void) {
  double d = lua_check_number(1, "sqrt");
  lua_pushnumber(sqrt(d));
}


x86 assembly (clang, -O0):
<math_sqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
lea    0xebc(%rip),%rsi
call   1030 <lua_check_number@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <sqrt@plt>
mov    %eax,%edi
call   1040 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_sqrt>:
push   %rax
lea    0xec8(%rip),%rsi
mov    $0x1,%edi
call   1030 <lua_check_number@plt>
call   1050 <sqrt@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <lua_pushnumber@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"sqrt\00"
define void @math_sqrt() {
%1 = alloca double
%2 = call double @lua_check_number(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store double %2, double* %1
%3 = load double, double* %1
%4 = call i32 @sqrt(double %3)
%5 = call i32 @lua_pushnumber(i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"sqrt\00"
define void @math_sqrt() {
%1 = tail call double @lua_check_number(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @sqrt(double %1)
%3 = tail call i32 @lua_pushnumber(i32 %2)
ret void
}