#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ test(char *, char *);
void TEST_pointer_op(void) {
  test("17", "main(){long i=17; long *j=&i; printf(\"%d\", *j);}");
  test("17",
       "main(){long i=17; long *j=&i; long **k=&j; printf(\"%d\", **k);}");
  test("42", "main(){long i=17; long *j=&i; *j=42; printf(\"%d\", *j);}");
  test("42", "main(){long i=17; long *j=&i; long **k=&j; **k=42; "
             "printf(\"%d\", **k);}");
}


x86 assembly (clang, -O0):
<TEST_pointer_op>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee1(%rip),%rsi
call   1030 <test@plt>
lea    0xed2(%rip),%rdi
lea    0xeff(%rip),%rsi
call   1030 <test@plt>
lea    0xf32(%rip),%rdi
lea    0xf2e(%rip),%rsi
call   1030 <test@plt>
lea    0xf1f(%rip),%rdi
lea    0xf53(%rip),%rsi
call   1030 <test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TEST_pointer_op>:
push   %rbx
lea    0xee8(%rip),%rbx
lea    0xee4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test@plt>
lea    0xf06(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test@plt>
lea    0xf36(%rip),%rbx
lea    0xf32(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test@plt>
lea    0xf5b(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <test@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"17\00"
@.str.1 = [49 x i8] c"main(){long i=17; long *j=&i; printf(\22%d\22, *j);}\00"
@.str.2 = [63 x i8] c"main(){long i=17; long *j=&i; long **k=&j; printf(\22%d\22, **k);}\00"
@.str.3 = [3 x i8] c"42\00"
@.str.4 = [56 x i8] c"main(){long i=17; long *j=&i; *j=42; printf(\22%d\22, *j);}\00"
@.str.5 = [71 x i8] c"main(){long i=17; long *j=&i; long **k=&j; **k=42; printf(\22%d\22, **k);}\00"
define void @TEST_pointer_op() {
%1 = call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0))
%4 = call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"17\00"
@.str.1 = [49 x i8] c"main(){long i=17; long *j=&i; printf(\22%d\22, *j);}\00"
@.str.2 = [63 x i8] c"main(){long i=17; long *j=&i; long **k=&j; printf(\22%d\22, **k);}\00"
@.str.3 = [3 x i8] c"42\00"
@.str.4 = [56 x i8] c"main(){long i=17; long *j=&i; *j=42; printf(\22%d\22, *j);}\00"
@.str.5 = [71 x i8] c"main(){long i=17; long *j=&i; long **k=&j; **k=42; printf(\22%d\22, **k);}\00"
define void @TEST_pointer_op() {
%1 = tail call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0))
%4 = tail call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.5, i64 0, i64 0))
ret void
}