#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*/ extended_gcd(long *, long, long);
int /*<<< orphan*/ set_zero(long **, int, int, long, long, long, long, long);
void zero_second_column(long L[3][3], long A[3][3]) {
  long vals[3];
  extended_gcd(vals, A[1][1], A[2][1]);
  set_zero(L, 1, 2, A[1][1], A[2][1], vals[0], vals[1], vals[2]);
}


x86 assembly (clang, -O0):
<zero_second_column>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x38(%rax),%rdx
call   1040 <extended_gcd@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    0x38(%rax),%r8
mov    -0x30(%rbp),%r9
mov    -0x28(%rbp),%r10
mov    -0x20(%rbp),%rax
mov    $0x1,%esi
mov    $0x2,%edx
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <set_zero@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero_second_column>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
mov    0x20(%rsi),%rsi
mov    0x38(%rbx),%rdx
lea    0x10(%rsp),%rdi
call   1040 <extended_gcd@plt>
mov    0x20(%rbx),%rcx
mov    0x38(%rbx),%r8
mov    0x10(%rsp),%r9
movups 0x18(%rsp),%xmm0
movups %xmm0,(%rsp)
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <set_zero@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @zero_second_column([3 x i64]* %0, [3 x i64]* %1) {
%3 = alloca [3 x i64]*
%4 = alloca [3 x i64]*
%5 = alloca [3 x i64]
store [3 x i64]* %0, [3 x i64]** %3
store [3 x i64]* %1, [3 x i64]** %4
%6 = getelementptr inbounds [3 x i64], [3 x i64]* %5, i64 0, i64 0
%7 = load [3 x i64]*, [3 x i64]** %4
%8 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 1
%9 = getelementptr inbounds [3 x i64], [3 x i64]* %8, i64 0, i64 1
%10 = load i64, i64* %9
%11 = load [3 x i64]*, [3 x i64]** %4
%12 = getelementptr inbounds [3 x i64], [3 x i64]* %11, i64 2
%13 = getelementptr inbounds [3 x i64], [3 x i64]* %12, i64 0, i64 1
%14 = load i64, i64* %13
%15 = call i32 @extended_gcd(i64* %6, i64 %10, i64 %14)
%16 = load [3 x i64]*, [3 x i64]** %3
%17 = bitcast [3 x i64]* %16 to i64**
%18 = load [3 x i64]*, [3 x i64]** %4
%19 = getelementptr inbounds [3 x i64], [3 x i64]* %18, i64 1
%20 = getelementptr inbounds [3 x i64], [3 x i64]* %19, i64 0, i64 1
%21 = load i64, i64* %20
%22 = load [3 x i64]*, [3 x i64]** %4
%23 = getelementptr inbounds [3 x i64], [3 x i64]* %22, i64 2
%24 = getelementptr inbounds [3 x i64], [3 x i64]* %23, i64 0, i64 1
%25 = load i64, i64* %24
%26 = getelementptr inbounds [3 x i64], [3 x i64]* %5, i64 0, i64 0
%27 = load i64, i64* %26
%28 = getelementptr inbounds [3 x i64], [3 x i64]* %5, i64 0, i64 1
%29 = load i64, i64* %28
%30 = getelementptr inbounds [3 x i64], [3 x i64]* %5, i64 0, i64 2
%31 = load i64, i64* %30
%32 = call i32 @set_zero(i64** %17, i32 1, i32 2, i64 %21, i64 %25, i64 %27, i64 %29, i64 %31)
ret void
}

LLVM IR (-O2):
define void @zero_second_column([3 x i64]* %0, [3 x i64]* nocapture %1) {
%3 = alloca [3 x i64]
%4 = bitcast [3 x i64]* %3 to i8*
%5 = getelementptr inbounds [3 x i64], [3 x i64]* %3, i64 0, i64 0
%6 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 1, i64 1
%7 = load i64, i64* %6
%8 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 2, i64 1
%9 = load i64, i64* %8
%10 = call i32 @extended_gcd(i64* %5, i64 %7, i64 %9)
%11 = bitcast [3 x i64]* %0 to i64**
%12 = load i64, i64* %6
%13 = load i64, i64* %8
%14 = load i64, i64* %5
%15 = getelementptr inbounds [3 x i64], [3 x i64]* %3, i64 0, i64 1
%16 = load i64, i64* %15
%17 = getelementptr inbounds [3 x i64], [3 x i64]* %3, i64 0, i64 2
%18 = load i64, i64* %17
%19 = call i32 @set_zero(i64** %11, i32 1, i32 2, i64 %12, i64 %13, i64 %14, i64 %16, i64 %18)
ret void
}